235 lines
4.1 MiB
235 lines
4.1 MiB
(()=>{var __webpack_modules__={66339:(e,t,r)=>{"use strict";var i=r(67526),n=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/t.hp=l,t.IS=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),i=a(r),n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);var n=function(e){if(l.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function p(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,l.prototype),i}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return i?-1:q(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,i,n){var o,s=1,a=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function d(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var c=-1;for(o=r;o<a;o++)if(d(e,o)===d(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var u=!0,p=0;p<l;p++)if(d(e,o+p)!==d(t,p)){u=!1;break}if(u)return o}return-1}function w(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=t.length;i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(H(a))return s;e[r+s]=a}return s}function _(e,t,r,i){return L(q(t,e.length-r),e,r,i)}function x(e,t,r,i){return L(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function S(e,t,r,i){return x(e,t,r,i)}function k(e,t,r,i){return L(U(t),e,r,i)}function E(e,t,r,i){return L(function(e,t){for(var r,i,n,o=[],s=0;s<e.length&&!((t-=2)<0);++s)i=(r=e.charCodeAt(s))>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function T(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var o,s,a,l,d=e[n],c=null,u=d>239?4:d>223?3:d>191?2:1;if(n+u<=r)switch(u){case 1:d<128&&(c=d);break;case 2:128==(192&(o=e[n+1]))&&(l=(31&d)<<6|63&o)>127&&(c=l);break;case 3:o=e[n+1],s=e[n+2],128==(192&o)&&128==(192&s)&&(l=(15&d)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[n+1],s=e[n+2],a=e[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&d)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=C));return r}(i)}l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(j(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=l.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(j(o,Uint8Array)&&(o=l.from(o)),!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,i,n){if(j(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),d=this.slice(i,n),c=e.slice(t,r),u=0;u<a;++u)if(d[u]!==c[u]){o=d[u],s=c[u];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},l.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function I(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function A(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function F(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=t;o<r;++o)n+=$[e[o]];return n}function M(e,t,r){for(var i=e.slice(t,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,i,n,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function P(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,i,o){return t=+t,r>>>=0,o||P(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function z(e,t,r,i,o){return t=+t,r>>>=0,o||P(e,0,r,8),n.write(e,t,r,i,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i=this.subarray(e,t);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i},l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},l.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var i=t,n=1,o=this[e+--i];i>0&&(n*=256);)o+=this[e+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t>>>=0,r>>>=0,i)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t>>>=0,r>>>=0,i)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,i){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n=i-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,i);else if(this===e&&r<t&&t<i)for(var o=n-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),t);return n},l.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var n=e.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=l.isBuffer(e)?e:l.from(e,i),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var N=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var i=e.length,n=null,o=[],s=0;s<i;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},64114:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AESCipherBlock=t.EMECipher=void 0;const n=r(80469);function o(e,t){if(16!==t.length)throw Error("len must be 16");const r=new Uint8Array(16);r[0]=2*t[0],t[15]>=128&&(r[0]=135^r[0]);for(let e=1;e<16;e++)r[e]=2*t[e],t[e-1]>=128&&(r[e]=r[e]+1);e.set(r)}function s(e,t,r){if(t.length!==r.length)throw Error(`input1.length=${t.length} is not equal to input2.length=${r.length}`);for(let i=0;i<t.length;++i)e[i]=t[i]^r[i]}function a(e,t,r,n){return i(this,void 0,void 0,(function*(){r?yield n.encrypt(e,t):yield n.decrypt(e,t)}))}function l(e,t,r,n){return i(this,void 0,void 0,(function*(){const l=t,d=r;if(16!==e.blockSize())throw Error("Using a block size other than 16 is not implemented");if(16!==l.length)throw Error(`Tweak must be 16 bytes long, is ${l.length}`);if(d.length%16!=0)throw Error(`Data P must be a multiple of 16 long, is ${d.length}`);const c=d.length/16;if(0===c||c>128)throw Error(`EME operates on 1 to 128 block-cipher blocks, you passed ${c}`);const u=new Uint8Array(d.length),p=yield function(e,t){return i(this,void 0,void 0,(function*(){const r=new Uint8Array(16),i=new Uint8Array(16);yield e.encrypt(i,r);const n=new Array(t);for(let e=0;e<t;e++)o(i,i),n[e]=new Uint8Array(i);return n}))}(e,c),h=new Uint8Array(16);for(let t=0;t<c;t++){s(h,d.subarray(16*t,16*(t+1)),p[t]),yield a(u.subarray(16*t,16*(t+1)),h,n,e)}const f=new Uint8Array(16);s(f,u.subarray(0,16),l);for(let e=1;e<c;e++)s(f,f,u.subarray(16*e,16*(e+1)));const m=new Uint8Array(16);yield a(m,f,n,e);const g=new Uint8Array(16);s(g,f,m);const y=new Uint8Array(16);for(let e=1;e<c;e++)o(g,g),s(y,u.subarray(16*e,16*(e+1)),g),u.subarray(16*e,16*(e+1)).set(y);const v=new Uint8Array(16);s(v,m,l);for(let e=1;e<c;e++)s(v,v,u.subarray(16*e,16*(e+1)));u.subarray(0,16).set(v);for(let t=0;t<c;t++)yield a(u.subarray(16*t,16*(t+1)),u.subarray(16*t,16*(t+1)),n,e),s(u.subarray(16*t,16*(t+1)),u.subarray(16*t,16*(t+1)),p[t]);return u}))}t.EMECipher=class{constructor(e){this.bc=e}encrypt(e,t){return i(this,void 0,void 0,(function*(){return yield l(this.bc,e,t,!0)}))}decrypt(e,t){return i(this,void 0,void 0,(function*(){return yield l(this.bc,e,t,!1)}))}};t.AESCipherBlock=class{constructor(e){if(this.keyRaw=e,this.iv=new Uint8Array(16),16===e.length)this.algo="aes128";else if(24===e.length)this.algo="aes192";else{if(32!==e.length)throw Error(`invalid key length = ${e.length}`);this.algo="aes256"}}encrypt(e,t){return i(this,void 0,void 0,(function*(){const r=(0,n.ecb)(this.keyRaw,{disablePadding:!0});e.set([...r.encrypt(t)])}))}decrypt(e,t){return i(this,void 0,void 0,(function*(){const r=(0,n.ecb)(this.keyRaw,{disablePadding:!0});e.set([...r.decrypt(t)])}))}blockSize(){return 16}}},88563:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t},s=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.decryptedSize=t.encryptedSize=t.add=t.increment=t.carry=t.Cipher=t.msgErrorSuffixMissingDot=t.msgErrorBadSeek=t.msgErrorNotAnEncryptedFile=t.msgErrorFileClosed=t.msgErrorBadBase32Encoding=t.msgErrorEncryptedBadBlock=t.msgErrorEncryptedBadMagic=t.msgErrorEncryptedFileBadHeader=t.msgErrorEncryptedFileTooShort=t.msgErrorBadDecryptControlChar=t.msgErrorBadDecryptUTF8=void 0;const a=r(25663),l=r(71190),d=r(68489),c=r(80819),u=r(64114),p=r(99211),h=o(r(62718)),f="RCLONE\0\0",m=(new TextEncoder).encode(f),g=l.xsalsa20poly1305.tagLength,y=65536,v=g+y,b=new Uint8Array([168,13,244,58,143,189,3,8,167,202,184,62,88,31,134,177]);t.msgErrorBadDecryptUTF8="bad decryption - utf-8 invalid",t.msgErrorBadDecryptControlChar="bad decryption - contains control chars",t.msgErrorEncryptedFileTooShort="file is too short to be encrypted",t.msgErrorEncryptedFileBadHeader="file has truncated block header",t.msgErrorEncryptedBadMagic="not an encrypted file - bad magic string",t.msgErrorEncryptedBadBlock="failed to authenticate decrypted block - bad password?",t.msgErrorBadBase32Encoding="bad base32 filename encoding",t.msgErrorFileClosed="file already closed",t.msgErrorNotAnEncryptedFile="not an encrypted file - does not match suffix",t.msgErrorBadSeek="Seek beyond end of file",t.msgErrorSuffixMissingDot="suffix config setting should include a '.'";function w(e,t){for(;e<t.length;e++){const r=t[e],i=r+1&255;if(t[e]=i,i>=r)break}}function _(e){return w(0,e)}function x(e){const t=Math.floor(e/y),r=e%y;let i=32+t*(g+y);return 0!==r&&(i+=g+r),i}function S(e){let r=e;if(r-=32,r<0)throw new Error(t.msgErrorEncryptedFileTooShort);const i=Math.floor(r/v);let n=r%v,o=i*y;if(0!==n&&(n-=g,n<=0))throw new Error(t.msgErrorEncryptedFileBadHeader);return o+=n,o}t.Cipher=class{constructor(e){this.dataKey=new Uint8Array(32),this.nameKey=new Uint8Array(32),this.nameTweak=new Uint8Array(16),this.dirNameEncrypt=!0,this.fileNameEnc=e}toString(){return`\ndataKey=${this.dataKey} \nnameKey=${this.nameKey}\nnameTweak=${this.nameTweak}\ndirNameEncrypt=${this.dirNameEncrypt}\nfileNameEnc=${this.fileNameEnc}\n`}encodeToString(e){if("base32"===this.fileNameEnc)return p.base32hex.stringify(e,{pad:!1}).toLowerCase();if("base64"===this.fileNameEnc)return p.base64url.stringify(e,{pad:!1});if("base32768"===this.fileNameEnc)return h.encode(e);throw Error(`unknown fileNameEnc=${this.fileNameEnc}`)}decodeString(e){if("base32"===this.fileNameEnc){if(e.endsWith("="))throw new Error(t.msgErrorBadBase32Encoding);return p.base32hex.parse(e.toUpperCase(),{loose:!0})}if("base64"===this.fileNameEnc)return p.base64url.parse(e,{loose:!0});if("base32768"===this.fileNameEnc)return h.decode(e);throw Error(`unknown fileNameEnc=${this.fileNameEnc}`)}key(e,t){return s(this,void 0,void 0,(function*(){const r=this.dataKey.length+this.nameKey.length+this.nameTweak.length;let i,n=b;return""!==t&&(n=(new TextEncoder).encode(t)),i=""===e?new Uint8Array(r):yield(0,a.scryptAsync)((new TextEncoder).encode(e),n,{N:16384,r:8,p:1,dkLen:r}),this.dataKey.set(i.slice(0,this.dataKey.length)),this.nameKey.set(i.slice(this.dataKey.length,this.dataKey.length+this.nameKey.length)),this.nameTweak.set(i.slice(this.dataKey.length+this.nameKey.length)),this}))}updateInternalKey(e,t,r){return this.dataKey=e,this.nameKey=t,this.nameTweak=r,this}getInternalKey(){return{dataKey:this.dataKey,nameKey:this.nameKey,nameTweak:this.nameTweak}}encryptSegment(e){return s(this,void 0,void 0,(function*(){if(""===e)return"";const t=(0,c.pad)((new TextEncoder).encode(e),16),r=new u.AESCipherBlock(this.nameKey),i=new u.EMECipher(r),n=yield i.encrypt(this.nameTweak,t);return this.encodeToString(n)}))}encryptFileName(e){return s(this,void 0,void 0,(function*(){const t=e.split("/");for(let e=0;e<t.length;++e)(this.dirNameEncrypt||e===t.length-1)&&(t[e]=yield this.encryptSegment(t[e]));return t.join("/")}))}decryptSegment(e){return s(this,void 0,void 0,(function*(){if(""===e)return"";const t=this.decodeString(e),r=new u.AESCipherBlock(this.nameKey),i=new u.EMECipher(r),n=yield i.decrypt(this.nameTweak,t),o=(0,c.unpad)(n);return(new TextDecoder).decode(o)}))}decryptFileName(e){return s(this,void 0,void 0,(function*(){const t=e.split("/");for(let e=0;e<t.length;++e)(this.dirNameEncrypt||e===t.length-1)&&(t[e]=yield this.decryptSegment(t[e]));return t.join("/")}))}encryptData(e,t){return s(this,void 0,void 0,(function*(){let r;r=void 0!==t?t:(0,d.randomBytes)(l.xsalsa20poly1305.nonceLength);const i=new Uint8Array(x(e.byteLength));i.set(m),i.set(r,8);for(let t=0,n=0;t<e.byteLength;t+=y,n+=1){const o=e.slice(t,t+y),s=(0,l.xsalsa20poly1305)(this.dataKey,r).encrypt(o);_(r),i.set(s,32+t+n*g)}return i}))}decryptData(e){return s(this,void 0,void 0,(function*(){if(e.byteLength<32)throw Error(t.msgErrorEncryptedFileTooShort);if(!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(e.slice(0,8),m))throw Error(t.msgErrorEncryptedBadMagic);const r=e.slice(8,32),i=new Uint8Array(S(e.byteLength));for(let n=32,o=0,s=0;n<e.byteLength;n+=v,o+=y,s+=1){const s=e.slice(n,n+v),a=(0,l.xsalsa20poly1305)(this.dataKey,r).decrypt(s);if(null===a)throw Error(t.msgErrorEncryptedBadBlock);_(r),i.set(a,o)}return i}))}},t.carry=w,t.increment=_,t.add=function(e,t){let r=BigInt(0);"bigint"==typeof e?r=BigInt.asUintN(64,e):"number"==typeof e&&(r=BigInt.asUintN(64,BigInt(e)));let i=BigInt.asUintN(16,BigInt(0));for(let e=0;e<8;e++){const n=t[e],o=r&BigInt(255);r>>=BigInt(8),i=i+BigInt(n)+BigInt(o),t[e]=Number(i),i>>=BigInt(8)}i!==BigInt(0)&&w(8,t)},t.encryptedSize=x,t.decryptedSize=S},19409:(e,t)=>{"use strict";t.op=void 0;t.op=class{constructor(e){if(void 0===e)this.stackBack=[],this.stackFront=[],this.length=0;else{this.stackFront=[];for(let t=e.length-1;t>=0;t--)this.stackFront.push(e[t]);this.stackBack=[],this.length=this.stackFront.length}}push(e){this.stackBack.push(e),this.length+=1}pop(){if(0!==this.length){if(0===this.stackFront.length)for(;this.stackBack.length>0;)this.stackFront.push(this.stackBack.pop());return this.length-=1,this.stackFront.pop()}}shift(){return this.pop()}size(){return this.length}front(){if(0!==this.length){if(0===this.stackFront.length)for(;this.stackBack.length>0;)this.stackFront.push(this.stackBack.pop());return this.stackFront[this.stackFront.length-1]}}back(){if(0!==this.length)return this.stackBack.length>0?this.stackBack[this.stackBack.length-1]:this.stackFront[0]}}},32506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCipher=t.rotl=t.sigma=void 0;const i=r(24605),n=r(36527),o=e=>Uint8Array.from(e.split("").map((e=>e.charCodeAt(0)))),s=o("expand 16-byte k"),a=o("expand 32-byte k"),l=(0,n.u32)(s),d=(0,n.u32)(a);function c(e){return e.byteOffset%4==0}t.sigma=d.slice(),t.rotl=function(e,t){return e<<t|e>>>32-t};const u=2**32-1,p=new Uint32Array;t.createCipher=function(e,t){const{allowShortKeys:r,extendNonceFn:o,counterLength:s,counterRight:a,rounds:h}=(0,n.checkOpts)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw new Error("core must be a function");return(0,i.number)(s),(0,i.number)(h),(0,i.bool)(a),(0,i.bool)(r),(t,f,m,g,y=0)=>{(0,i.bytes)(t),(0,i.bytes)(f),(0,i.bytes)(m);const v=m.length;if(g||(g=new Uint8Array(v)),(0,i.bytes)(g),(0,i.number)(y),y<0||y>=u)throw new Error("arx: counter overflow");if(g.length<v)throw new Error(`arx: output (${g.length}) is shorter than data (${v})`);const b=[];let w,_,x=t.length;if(32===x)w=t.slice(),b.push(w),_=d;else{if(16!==x||!r)throw new Error(`arx: invalid 32-byte key, got length=${x}`);w=new Uint8Array(32),w.set(t),w.set(t,16),_=l,b.push(w)}c(f)||(f=f.slice(),b.push(f));const S=(0,n.u32)(w);if(o){if(24!==f.length)throw new Error("arx: extended nonce must be 24 bytes");o(_,S,(0,n.u32)(f.subarray(0,16)),S),f=f.subarray(16)}const k=16-s;if(k!==f.length)throw new Error(`arx: nonce must be ${k} or 16 bytes`);if(12!==k){const e=new Uint8Array(12);e.set(f,a?0:12-f.length),f=e,b.push(f)}const E=(0,n.u32)(f);for(!function(e,t,r,i,o,s,a,l){const d=o.length,h=new Uint8Array(64),f=(0,n.u32)(h),m=c(o)&&c(s),g=m?(0,n.u32)(o):p,y=m?(0,n.u32)(s):p;for(let n=0;n<d;a++){if(e(t,r,i,f,a,l),a>=u)throw new Error("arx: counter overflow");const c=Math.min(64,d-n);if(m&&64===c){const e=n/4;if(n%4!=0)throw new Error("arx: invalid block position");for(let t,r=0;r<16;r++)t=e+r,y[t]=g[t]^f[r];n+=64}else{for(let e,t=0;t<c;t++)e=n+t,s[e]=o[e]^h[t];n+=c}}}(e,_,S,E,m,g,y,h);b.length>0;)b.pop().fill(0);return g}}},24605:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("hash must be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function l(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=r,t.bool=i,t.isBytes=n,t.bytes=o,t.hash=s,t.exists=a,t.output=l;const d={number:r,bool:i,bytes:o,hash:s,exists:a,output:l};t.default=d},8829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poly1305=t.wrapConstructorWithKey=void 0;const i=r(24605),n=r(36527),o=(e,t)=>255&e[t++]|(255&e[t++])<<8;class s{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=(0,n.toBytes)(e),(0,i.bytes)(e,32);const t=o(e,0),r=o(e,2),s=o(e,4),a=o(e,6),l=o(e,8),d=o(e,10),c=o(e,12),u=o(e,14);this.r[0]=8191&t,this.r[1]=8191&(t>>>13|r<<3),this.r[2]=7939&(r>>>10|s<<6),this.r[3]=8191&(s>>>7|a<<9),this.r[4]=255&(a>>>4|l<<12),this.r[5]=l>>>1&8190,this.r[6]=8191&(l>>>14|d<<2),this.r[7]=8065&(d>>>11|c<<5),this.r[8]=8191&(c>>>8|u<<8),this.r[9]=u>>>5&127;for(let t=0;t<8;t++)this.pad[t]=o(e,16+2*t)}process(e,t,r=!1){const i=r?0:2048,{h:n,r:s}=this,a=s[0],l=s[1],d=s[2],c=s[3],u=s[4],p=s[5],h=s[6],f=s[7],m=s[8],g=s[9],y=o(e,t+0),v=o(e,t+2),b=o(e,t+4),w=o(e,t+6),_=o(e,t+8),x=o(e,t+10),S=o(e,t+12),k=o(e,t+14);let E=n[0]+(8191&y),T=n[1]+(8191&(y>>>13|v<<3)),B=n[2]+(8191&(v>>>10|b<<6)),C=n[3]+(8191&(b>>>7|w<<9)),I=n[4]+(8191&(w>>>4|_<<12)),A=n[5]+(_>>>1&8191),F=n[6]+(8191&(_>>>14|x<<2)),M=n[7]+(8191&(x>>>11|S<<5)),D=n[8]+(8191&(S>>>8|k<<8)),R=n[9]+(k>>>5|i),P=0,O=P+E*a+T*(5*g)+B*(5*m)+C*(5*f)+I*(5*h);P=O>>>13,O&=8191,O+=A*(5*p)+F*(5*u)+M*(5*c)+D*(5*d)+R*(5*l),P+=O>>>13,O&=8191;let z=P+E*l+T*a+B*(5*g)+C*(5*m)+I*(5*f);P=z>>>13,z&=8191,z+=A*(5*h)+F*(5*p)+M*(5*u)+D*(5*c)+R*(5*d),P+=z>>>13,z&=8191;let N=P+E*d+T*l+B*a+C*(5*g)+I*(5*m);P=N>>>13,N&=8191,N+=A*(5*f)+F*(5*h)+M*(5*p)+D*(5*u)+R*(5*c),P+=N>>>13,N&=8191;let q=P+E*c+T*d+B*l+C*a+I*(5*g);P=q>>>13,q&=8191,q+=A*(5*m)+F*(5*f)+M*(5*h)+D*(5*p)+R*(5*u),P+=q>>>13,q&=8191;let U=P+E*u+T*c+B*d+C*l+I*a;P=U>>>13,U&=8191,U+=A*(5*g)+F*(5*m)+M*(5*f)+D*(5*h)+R*(5*p),P+=U>>>13,U&=8191;let L=P+E*p+T*u+B*c+C*d+I*l;P=L>>>13,L&=8191,L+=A*a+F*(5*g)+M*(5*m)+D*(5*f)+R*(5*h),P+=L>>>13,L&=8191;let j=P+E*h+T*p+B*u+C*c+I*d;P=j>>>13,j&=8191,j+=A*l+F*a+M*(5*g)+D*(5*m)+R*(5*f),P+=j>>>13,j&=8191;let H=P+E*f+T*h+B*p+C*u+I*c;P=H>>>13,H&=8191,H+=A*d+F*l+M*a+D*(5*g)+R*(5*m),P+=H>>>13,H&=8191;let $=P+E*m+T*f+B*h+C*p+I*u;P=$>>>13,$&=8191,$+=A*c+F*d+M*l+D*a+R*(5*g),P+=$>>>13,$&=8191;let G=P+E*g+T*m+B*f+C*h+I*p;P=G>>>13,G&=8191,G+=A*u+F*c+M*d+D*l+R*a,P+=G>>>13,G&=8191,P=(P<<2)+P|0,P=P+O|0,O=8191&P,P>>>=13,z+=P,n[0]=O,n[1]=z,n[2]=N,n[3]=q,n[4]=U,n[5]=L,n[6]=j,n[7]=H,n[8]=$,n[9]=G}finalize(){const{h:e,pad:t}=this,r=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=i,i=e[t]>>>13,e[t]&=8191;e[0]+=5*i,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,r[0]=e[0]+5,i=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+i,i=r[t]>>>13,r[t]&=8191;r[9]-=8192;let n=(1^i)-1;for(let e=0;e<10;e++)r[e]&=n;n=~n;for(let t=0;t<10;t++)e[t]=e[t]&n|r[t];e[0]=65535&(e[0]|e[1]<<13),e[1]=65535&(e[1]>>>3|e[2]<<10),e[2]=65535&(e[2]>>>6|e[3]<<7),e[3]=65535&(e[3]>>>9|e[4]<<4),e[4]=65535&(e[4]>>>12|e[5]<<1|e[6]<<14),e[5]=65535&(e[6]>>>2|e[7]<<11),e[6]=65535&(e[7]>>>5|e[8]<<8),e[7]=65535&(e[8]>>>8|e[9]<<5);let o=e[0]+t[0];e[0]=65535&o;for(let r=1;r<8;r++)o=(e[r]+t[r]|0)+(o>>>16)|0,e[r]=65535&o}update(e){(0,i.exists)(this);const{buffer:t,blockLen:r}=this,o=(e=(0,n.toBytes)(e)).length;for(let i=0;i<o;){const n=Math.min(r-this.pos,o-i);if(n!==r)t.set(e.subarray(i,i+n),this.pos),this.pos+=n,i+=n,this.pos===r&&(this.process(t,0,!1),this.pos=0);else for(;r<=o-i;i+=r)this.process(e,i)}return this}destroy(){this.h.fill(0),this.r.fill(0),this.buffer.fill(0),this.pad.fill(0)}digestInto(e){(0,i.exists)(this),(0,i.output)(e,this),this.finished=!0;const{buffer:t,h:r}=this;let{pos:n}=this;if(n){for(t[n++]=1;n<16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let o=0;for(let t=0;t<8;t++)e[o++]=r[t]>>>0,e[o++]=r[t]>>>8;return e}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}}function a(e){const t=(t,r)=>e(r).update((0,n.toBytes)(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.wrapConstructorWithKey=a,t.poly1305=a((e=>new s(e)))},60022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyval=t.ghash=t._toGHASHKey=void 0;const i=r(36527),n=r(24605),o=16,s=new Uint8Array(16),a=(0,i.u32)(s),l=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255;function d(e){e.reverse();const t=1&e[15];let r=0;for(let t=0;t<e.length;t++){const i=e[t];e[t]=i>>>1|r,r=(1&i)<<7}return e[0]^=225&-t,e}t._toGHASHKey=d;class c{constructor(e,t){this.blockLen=o,this.outputLen=o,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,e=(0,i.toBytes)(e),(0,n.bytes)(e,16);const r=(0,i.createView)(e);let s=r.getUint32(0,!1),a=r.getUint32(4,!1),d=r.getUint32(8,!1),c=r.getUint32(12,!1);const u=[];for(let e=0;e<128;e++)u.push({s0:l(s),s1:l(a),s2:l(d),s3:l(c)}),({s0:s,s1:a,s2:d,s3:c}={s3:(f=d)<<31|(m=c)>>>1,s2:(h=a)<<31|f>>>1,s1:(p=s)<<31|h>>>1,s0:p>>>1^225<<24&-(1&m)});var p,h,f,m;const g=(y=t||1024)>65536?8:y>1024?4:2;var y;if(![1,2,4,8].includes(g))throw new Error(`ghash: wrong window size=${g}, should be 2, 4 or 8`);this.W=g;const v=128/g,b=this.windowSize=2**g,w=[];for(let e=0;e<v;e++)for(let t=0;t<b;t++){let r=0,i=0,n=0,o=0;for(let s=0;s<g;s++){if(!(t>>>g-s-1&1))continue;const{s0:a,s1:l,s2:d,s3:c}=u[g*e+s];r^=a,i^=l,n^=d,o^=c}w.push({s0:r,s1:i,s2:n,s3:o})}this.t=w}_updateBlock(e,t,r,i){e^=this.s0,t^=this.s1,r^=this.s2,i^=this.s3;const{W:n,t:o,windowSize:s}=this;let a=0,l=0,d=0,c=0;const u=(1<<n)-1;let p=0;for(const h of[e,t,r,i])for(let e=0;e<4;e++){const t=h>>>8*e&255;for(let e=8/n-1;e>=0;e--){const r=t>>>n*e&u,{s0:i,s1:h,s2:f,s3:m}=o[p*s+r];a^=i,l^=h,d^=f,c^=m,p+=1}}this.s0=a,this.s1=l,this.s2=d,this.s3=c}update(e){e=(0,i.toBytes)(e),(0,n.exists)(this);const t=(0,i.u32)(e),r=Math.floor(e.length/o),l=e.length%o;for(let e=0;e<r;e++)this._updateBlock(t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]);return l&&(s.set(e.subarray(r*o)),this._updateBlock(a[0],a[1],a[2],a[3]),a.fill(0)),this}destroy(){const{t:e}=this;for(const t of e)t.s0=0,t.s1=0,t.s2=0,t.s3=0}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{s0:t,s1:r,s2:o,s3:s}=this,a=(0,i.u32)(e);return a[0]=t,a[1]=r,a[2]=o,a[3]=s,e}digest(){const e=new Uint8Array(o);return this.digestInto(e),this.destroy(),e}}class u extends c{constructor(e,t){const r=d((e=(0,i.toBytes)(e)).slice());super(r,t),r.fill(0)}update(e){e=(0,i.toBytes)(e),(0,n.exists)(this);const t=(0,i.u32)(e),r=e.length%o,d=Math.floor(e.length/o);for(let e=0;e<d;e++)this._updateBlock(l(t[4*e+3]),l(t[4*e+2]),l(t[4*e+1]),l(t[4*e+0]));return r&&(s.set(e.subarray(d*o)),this._updateBlock(l(a[3]),l(a[2]),l(a[1]),l(a[0])),a.fill(0)),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{s0:t,s1:r,s2:o,s3:s}=this,a=(0,i.u32)(e);return a[0]=t,a[1]=r,a[2]=o,a[3]=s,e.reverse()}}function p(e){const t=(t,r)=>e(r,t.length).update((0,i.toBytes)(t)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(t,r)=>e(t,r),t}t.ghash=p(((e,t)=>new c(e,t))),t.polyval=p(((e,t)=>new u(e,t)))},80469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafe=t.siv=t.gcm=t.cfb=t.cbc=t.ecb=t.ctr=t.expandKeyDecLE=t.expandKeyLE=void 0;const i=r(36527),n=r(60022),o=r(24605),s=16,a=new Uint8Array(s);function l(e){return e<<1^283&-(e>>7)}function d(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(1&t),e=l(e);return r}const c=(()=>{let e=new Uint8Array(256);for(let t=0,r=1;t<256;t++,r^=l(r))e[t]=r;const t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let i=e[255-r];i|=i<<8,t[e[r]]=255&(i^i>>4^i>>5^i>>6^i>>7^99)}return t})(),u=c.map(((e,t)=>c.indexOf(t))),p=e=>e<<8|e>>>24;function h(e,t){if(256!==e.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map(((r,i)=>t(e[i]))),i=r.map(p),n=i.map(p),o=n.map(p),s=new Uint32Array(65536),a=new Uint32Array(65536),l=new Uint16Array(65536);for(let t=0;t<256;t++)for(let d=0;d<256;d++){const c=256*t+d;s[c]=r[t]^i[d],a[c]=n[t]^o[d],l[c]=e[t]<<8|e[d]}return{sbox:e,sbox2:l,T0:r,T1:i,T2:n,T3:o,T01:s,T23:a}}const f=h(c,(e=>d(e,3)<<24|e<<16|e<<8|d(e,2))),m=h(u,(e=>d(e,11)<<24|d(e,13)<<16|d(e,9)<<8|d(e,14))),g=(()=>{const e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=l(r))e[t]=r;return e})();function y(e){(0,o.bytes)(e);const t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);const{sbox2:r}=f,n=(0,i.u32)(e),s=n.length,a=e=>w(r,e,e,e,e),l=new Uint32Array(t+28);l.set(n);for(let e=s;e<l.length;e++){let t=l[e-1];e%s==0?t=a((d=t)<<24|d>>>8)^g[e/s-1]:s>6&&e%s==4&&(t=a(t)),l[e]=l[e-s]^t}var d;return l}function v(e){const t=y(e),r=t.slice(),i=t.length,{sbox2:n}=f,{T0:o,T1:s,T2:a,T3:l}=m;for(let e=0;e<i;e+=4)for(let n=0;n<4;n++)r[e+n]=t[i-e-4+n];t.fill(0);for(let e=4;e<i-4;e++){const t=r[e],i=w(n,t,t,t,t);r[e]=o[255&i]^s[i>>>8&255]^a[i>>>16&255]^l[i>>>24]}return r}function b(e,t,r,i,n,o){return e[r<<8&65280|i>>>8&255]^t[n>>>8&65280|o>>>24&255]}function w(e,t,r,i,n){return e[255&t|65280&r]|e[i>>>16&255|n>>>16&65280]<<16}function _(e,t,r,i,n){const{sbox2:o,T01:s,T23:a}=f;let l=0;t^=e[l++],r^=e[l++],i^=e[l++],n^=e[l++];const d=e.length/4-2;for(let o=0;o<d;o++){const o=e[l++]^b(s,a,t,r,i,n),d=e[l++]^b(s,a,r,i,n,t),c=e[l++]^b(s,a,i,n,t,r),u=e[l++]^b(s,a,n,t,r,i);t=o,r=d,i=c,n=u}return{s0:e[l++]^w(o,t,r,i,n),s1:e[l++]^w(o,r,i,n,t),s2:e[l++]^w(o,i,n,t,r),s3:e[l++]^w(o,n,t,r,i)}}function x(e,t,r,i,n){const{sbox2:o,T01:s,T23:a}=m;let l=0;t^=e[l++],r^=e[l++],i^=e[l++],n^=e[l++];const d=e.length/4-2;for(let o=0;o<d;o++){const o=e[l++]^b(s,a,t,n,i,r),d=e[l++]^b(s,a,r,t,n,i),c=e[l++]^b(s,a,i,r,t,n),u=e[l++]^b(s,a,n,i,r,t);t=o,r=d,i=c,n=u}return{s0:e[l++]^w(o,t,n,i,r),s1:e[l++]^w(o,r,t,n,i),s2:e[l++]^w(o,i,r,t,n),s3:e[l++]^w(o,n,i,r,t)}}function S(e,t){if(!t)return new Uint8Array(e);if((0,o.bytes)(t),t.length<e)throw new Error(`aes: wrong destination length, expected at least ${e}, got: ${t.length}`);return t}function k(e,t,r,n){(0,o.bytes)(t,s),(0,o.bytes)(r);const a=r.length;n=S(a,n);const l=t,d=(0,i.u32)(l);let{s0:c,s1:u,s2:p,s3:h}=_(e,d[0],d[1],d[2],d[3]);const f=(0,i.u32)(r),m=(0,i.u32)(n);for(let t=0;t+4<=f.length;t+=4){m[t+0]=f[t+0]^c,m[t+1]=f[t+1]^u,m[t+2]=f[t+2]^p,m[t+3]=f[t+3]^h;let r=1;for(let e=l.length-1;e>=0;e--)r=r+(255&l[e])|0,l[e]=255&r,r>>>=8;({s0:c,s1:u,s2:p,s3:h}=_(e,d[0],d[1],d[2],d[3]))}const g=s*Math.floor(f.length/4);if(g<a){const e=new Uint32Array([c,u,p,h]),t=(0,i.u8)(e);for(let e=g,i=0;e<a;e++,i++)n[e]=r[e]^t[i]}return n}function E(e,t,r,n,a){(0,o.bytes)(r,s),(0,o.bytes)(n),a=S(n.length,a);const l=r,d=(0,i.u32)(l),c=(0,i.createView)(l),u=(0,i.u32)(n),p=(0,i.u32)(a),h=t?0:12,f=n.length;let m=c.getUint32(h,t),{s0:g,s1:y,s2:v,s3:b}=_(e,d[0],d[1],d[2],d[3]);for(let r=0;r+4<=u.length;r+=4)p[r+0]=u[r+0]^g,p[r+1]=u[r+1]^y,p[r+2]=u[r+2]^v,p[r+3]=u[r+3]^b,m=m+1>>>0,c.setUint32(h,m,t),({s0:g,s1:y,s2:v,s3:b}=_(e,d[0],d[1],d[2],d[3]));const w=s*Math.floor(u.length/4);if(w<f){const e=new Uint32Array([g,y,v,b]),t=(0,i.u8)(e);for(let e=w,r=0;e<f;e++,r++)a[e]=n[e]^t[r]}return a}function T(e){if((0,o.bytes)(e),e.length%s!=0)throw new Error("aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size 16")}function B(e,t,r){let n=e.length;const o=n%s;if(!t&&0!==o)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const a=(0,i.u32)(e);if(t){let e=s-o;e||(e=s),n+=e}const l=S(n,r);return{b:a,o:(0,i.u32)(l),out:l}}function C(e,t){if(!t)return e;const r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const i=e[r-1];if(i<=0||i>16)throw new Error(`aes/pcks5: wrong padding byte: ${i}`);const n=e.subarray(0,-i);for(let t=0;t<i;t++)if(e[r-t-1]!==i)throw new Error("aes/pcks5: wrong padding");return n}function I(e){const t=new Uint8Array(16),r=(0,i.u32)(t);t.set(e);const n=s-e.length;for(let e=s-n;e<s;e++)t[e]=n;return r}function A(e,t,r,n,o){const s=e.create(r,n.length+(o?.length||0));o&&s.update(o),s.update(n);const a=new Uint8Array(16),l=(0,i.createView)(a);return o&&(0,i.setBigUint64)(l,0,BigInt(8*o.length),t),(0,i.setBigUint64)(l,8,BigInt(8*n.length),t),s.update(a),s.digest()}t.expandKeyLE=y,t.expandKeyDecLE=v,t.ctr=(0,i.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t){function r(r,i){const n=y(e),o=t.slice(),s=k(n,o,r,i);return n.fill(0),o.fill(0),s}return(0,o.bytes)(e),(0,o.bytes)(t,s),{encrypt:(e,t)=>r(e,t),decrypt:(e,t)=>r(e,t)}})),t.ecb=(0,i.wrapCipher)({blockSize:16},(function(e,t={}){(0,o.bytes)(e);const r=!t.disablePadding;return{encrypt:(t,i)=>{(0,o.bytes)(t);const{b:n,o:s,out:a}=B(t,r,i),l=y(e);let d=0;for(;d+4<=n.length;){const{s0:e,s1:t,s2:r,s3:i}=_(l,n[d+0],n[d+1],n[d+2],n[d+3]);s[d++]=e,s[d++]=t,s[d++]=r,s[d++]=i}if(r){const e=I(t.subarray(4*d)),{s0:r,s1:i,s2:n,s3:o}=_(l,e[0],e[1],e[2],e[3]);s[d++]=r,s[d++]=i,s[d++]=n,s[d++]=o}return l.fill(0),a},decrypt:(t,n)=>{T(t);const o=v(e),s=S(t.length,n),a=(0,i.u32)(t),l=(0,i.u32)(s);for(let e=0;e+4<=a.length;){const{s0:t,s1:r,s2:i,s3:n}=x(o,a[e+0],a[e+1],a[e+2],a[e+3]);l[e++]=t,l[e++]=r,l[e++]=i,l[e++]=n}return o.fill(0),C(s,r)}}})),t.cbc=(0,i.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t,r={}){(0,o.bytes)(e),(0,o.bytes)(t,16);const n=!r.disablePadding;return{encrypt:(r,o)=>{const s=y(e),{b:a,o:l,out:d}=B(r,n,o),c=(0,i.u32)(t);let u=c[0],p=c[1],h=c[2],f=c[3],m=0;for(;m+4<=a.length;)u^=a[m+0],p^=a[m+1],h^=a[m+2],f^=a[m+3],({s0:u,s1:p,s2:h,s3:f}=_(s,u,p,h,f)),l[m++]=u,l[m++]=p,l[m++]=h,l[m++]=f;if(n){const e=I(r.subarray(4*m));u^=e[0],p^=e[1],h^=e[2],f^=e[3],({s0:u,s1:p,s2:h,s3:f}=_(s,u,p,h,f)),l[m++]=u,l[m++]=p,l[m++]=h,l[m++]=f}return s.fill(0),d},decrypt:(r,o)=>{T(r);const s=v(e),a=(0,i.u32)(t),l=S(r.length,o),d=(0,i.u32)(r),c=(0,i.u32)(l);let u=a[0],p=a[1],h=a[2],f=a[3];for(let e=0;e+4<=d.length;){const t=u,r=p,i=h,n=f;u=d[e+0],p=d[e+1],h=d[e+2],f=d[e+3];const{s0:o,s1:a,s2:l,s3:m}=x(s,u,p,h,f);c[e++]=o^t,c[e++]=a^r,c[e++]=l^i,c[e++]=m^n}return s.fill(0),C(l,n)}}})),t.cfb=(0,i.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t){function r(r,n,o){const a=y(e),l=r.length;o=S(l,o);const d=(0,i.u32)(r),c=(0,i.u32)(o),u=n?c:d,p=(0,i.u32)(t);let h=p[0],f=p[1],m=p[2],g=p[3];for(let e=0;e+4<=d.length;){const{s0:t,s1:r,s2:i,s3:n}=_(a,h,f,m,g);c[e+0]=d[e+0]^t,c[e+1]=d[e+1]^r,c[e+2]=d[e+2]^i,c[e+3]=d[e+3]^n,h=u[e++],f=u[e++],m=u[e++],g=u[e++]}const v=s*Math.floor(d.length/4);if(v<l){({s0:h,s1:f,s2:m,s3:g}=_(a,h,f,m,g));const e=(0,i.u8)(new Uint32Array([h,f,m,g]));for(let t=v,i=0;t<l;t++,i++)o[t]=r[t]^e[i];e.fill(0)}return a.fill(0),o}return(0,o.bytes)(e),(0,o.bytes)(t,16),{encrypt:(e,t)=>r(e,!0,t),decrypt:(e,t)=>r(e,!1,t)}})),t.gcm=(0,i.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(e,t,r){if((0,o.bytes)(t),0===t.length)throw new Error("aes/gcm: empty nonce");const s=16;function l(e,t,i){const o=A(n.ghash,!1,e,i,r);for(let e=0;e<t.length;e++)o[e]^=t[e];return o}function d(){const r=y(e),o=a.slice(),s=a.slice();if(E(r,!1,s,s,o),12===t.length)s.set(t);else{const e=a.slice(),r=(0,i.createView)(e);(0,i.setBigUint64)(r,8,BigInt(8*t.length),!1),n.ghash.create(o).update(t).update(e).digestInto(s)}return{xk:r,authKey:o,counter:s,tagMask:E(r,!1,s,a)}}return{encrypt:e=>{(0,o.bytes)(e);const{xk:t,authKey:r,counter:i,tagMask:n}=d(),a=new Uint8Array(e.length+s);E(t,!1,i,e,a);const c=l(r,n,a.subarray(0,a.length-s));return a.set(c,e.length),t.fill(0),a},decrypt:e=>{if((0,o.bytes)(e),e.length<s)throw new Error("aes/gcm: ciphertext less than tagLen (16)");const{xk:t,authKey:r,counter:n,tagMask:a}=d(),c=e.subarray(0,-16),u=e.subarray(-16),p=l(r,a,c);if(!(0,i.equalBytes)(p,u))throw new Error("aes/gcm: invalid ghash tag");const h=E(t,!1,n,c);return r.fill(0),a.fill(0),t.fill(0),h}}}));const F=(e,t,r)=>i=>{if(!Number.isSafeInteger(i)||t>i||i>r)throw new Error(`${e}: invalid value=${i}, must be [${t}..${r}]`)};function M(e){return null!=e&&"object"==typeof e&&(e instanceof Uint32Array||"Uint32Array"===e.constructor.name)}t.siv=(0,i.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(e,t,r){const s=F("AAD",0,2**36),a=F("plaintext",0,2**36),l=F("nonce",12,12),d=F("ciphertext",16,2**36+16);function c(){const r=e.length;if(16!==r&&24!==r&&32!==r)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${r} bytes`);const n=y(e),o=new Uint8Array(r),s=new Uint8Array(16),a=(0,i.u32)(t);let l=0,d=a[0],c=a[1],u=a[2],p=0;for(const e of[s,o].map(i.u32)){const t=(0,i.u32)(e);for(let e=0;e<t.length;e+=2){const{s0:r,s1:i}=_(n,l,d,c,u);t[e+0]=r,t[e+1]=i,l=++p}}return n.fill(0),{authKey:s,encKey:y(o)}}function u(e,o,s){const a=A(n.polyval,!0,o,s,r);for(let e=0;e<12;e++)a[e]^=t[e];a[15]&=127;const l=(0,i.u32)(a);let d=l[0],c=l[1],u=l[2],p=l[3];return({s0:d,s1:c,s2:u,s3:p}=_(e,d,c,u,p)),l[0]=d,l[1]=c,l[2]=u,l[3]=p,a}function p(e,t,r){let i=t.slice();return i[15]|=128,E(e,!0,i,r)}return(0,o.bytes)(t),l(t.length),r&&((0,o.bytes)(r),s(r.length)),{encrypt:e=>{(0,o.bytes)(e),a(e.length);const{encKey:t,authKey:r}=c(),i=u(t,r,e),n=new Uint8Array(e.length+16);return n.set(i,e.length),n.set(p(t,i,e)),t.fill(0),r.fill(0),n},decrypt:e=>{(0,o.bytes)(e),d(e.length);const t=e.subarray(-16),{encKey:r,authKey:n}=c(),s=p(r,t,e.subarray(0,-16)),a=u(r,n,s);if(r.fill(0),n.fill(0),!(0,i.equalBytes)(t,a))throw new Error("invalid polyval tag");return s}}})),t.unsafe={expandKeyLE:y,expandKeyDecLE:v,encrypt:_,decrypt:x,encryptBlock:function(e,t){if((0,o.bytes)(t,16),!M(e))throw new Error("_encryptBlock accepts result of expandKeyLE");const r=(0,i.u32)(t);let{s0:n,s1:s,s2:a,s3:l}=_(e,r[0],r[1],r[2],r[3]);return r[0]=n,r[1]=s,r[2]=a,r[3]=l,t},decryptBlock:function(e,t){if((0,o.bytes)(t,16),!M(e))throw new Error("_decryptBlock accepts result of expandKeyLE");const r=(0,i.u32)(t);let{s0:n,s1:s,s2:a,s3:l}=x(e,r[0],r[1],r[2],r[3]);return r[0]=n,r[1]=s,r[2]=a,r[3]=l,t},ctrCounter:k,ctr32:E}},25297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebcryptoSubtle=t.randomBytes=void 0;const r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;t.randomBytes=function(e=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")},t.getWebcryptoSubtle=function(){if(r&&"object"==typeof r.subtle&&null!=r.subtle)return r.subtle;throw new Error("crypto.subtle must be defined")}},71190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secretbox=t.xsalsa20poly1305=t.xsalsa20=t.salsa20=t.hsalsa=void 0;const i=r(24605),n=r(32506),o=r(8829),s=r(36527);function a(e,t,r,i,o,s=20){let a=e[0],l=t[0],d=t[1],c=t[2],u=t[3],p=e[1],h=r[0],f=r[1],m=o,g=e[2],y=t[4],v=t[5],b=t[6],w=t[7],_=e[3],x=a,S=l,k=d,E=c,T=u,B=p,C=h,I=f,A=m,F=0,M=g,D=y,R=v,P=b,O=w,z=_;for(let e=0;e<s;e+=2)T^=(0,n.rotl)(x+R|0,7),A^=(0,n.rotl)(T+x|0,9),R^=(0,n.rotl)(A+T|0,13),x^=(0,n.rotl)(R+A|0,18),F^=(0,n.rotl)(B+S|0,7),P^=(0,n.rotl)(F+B|0,9),S^=(0,n.rotl)(P+F|0,13),B^=(0,n.rotl)(S+P|0,18),O^=(0,n.rotl)(M+C|0,7),k^=(0,n.rotl)(O+M|0,9),C^=(0,n.rotl)(k+O|0,13),M^=(0,n.rotl)(C+k|0,18),E^=(0,n.rotl)(z+D|0,7),I^=(0,n.rotl)(E+z|0,9),D^=(0,n.rotl)(I+E|0,13),z^=(0,n.rotl)(D+I|0,18),S^=(0,n.rotl)(x+E|0,7),k^=(0,n.rotl)(S+x|0,9),E^=(0,n.rotl)(k+S|0,13),x^=(0,n.rotl)(E+k|0,18),C^=(0,n.rotl)(B+T|0,7),I^=(0,n.rotl)(C+B|0,9),T^=(0,n.rotl)(I+C|0,13),B^=(0,n.rotl)(T+I|0,18),D^=(0,n.rotl)(M+F|0,7),A^=(0,n.rotl)(D+M|0,9),F^=(0,n.rotl)(A+D|0,13),M^=(0,n.rotl)(F+A|0,18),R^=(0,n.rotl)(z+O|0,7),P^=(0,n.rotl)(R+z|0,9),O^=(0,n.rotl)(P+R|0,13),z^=(0,n.rotl)(O+P|0,18);let N=0;i[N++]=a+x|0,i[N++]=l+S|0,i[N++]=d+k|0,i[N++]=c+E|0,i[N++]=u+T|0,i[N++]=p+B|0,i[N++]=h+C|0,i[N++]=f+I|0,i[N++]=m+A|0,i[N++]=0+F|0,i[N++]=g+M|0,i[N++]=y+D|0,i[N++]=v+R|0,i[N++]=b+P|0,i[N++]=w+O|0,i[N++]=_+z|0}function l(e,t,r,i){let o=e[0],s=t[0],a=t[1],l=t[2],d=t[3],c=e[1],u=r[0],p=r[1],h=r[2],f=r[3],m=e[2],g=t[4],y=t[5],v=t[6],b=t[7],w=e[3];for(let e=0;e<20;e+=2)d^=(0,n.rotl)(o+y|0,7),h^=(0,n.rotl)(d+o|0,9),y^=(0,n.rotl)(h+d|0,13),o^=(0,n.rotl)(y+h|0,18),f^=(0,n.rotl)(c+s|0,7),v^=(0,n.rotl)(f+c|0,9),s^=(0,n.rotl)(v+f|0,13),c^=(0,n.rotl)(s+v|0,18),b^=(0,n.rotl)(m+u|0,7),a^=(0,n.rotl)(b+m|0,9),u^=(0,n.rotl)(a+b|0,13),m^=(0,n.rotl)(u+a|0,18),l^=(0,n.rotl)(w+g|0,7),p^=(0,n.rotl)(l+w|0,9),g^=(0,n.rotl)(p+l|0,13),w^=(0,n.rotl)(g+p|0,18),s^=(0,n.rotl)(o+l|0,7),a^=(0,n.rotl)(s+o|0,9),l^=(0,n.rotl)(a+s|0,13),o^=(0,n.rotl)(l+a|0,18),u^=(0,n.rotl)(c+d|0,7),p^=(0,n.rotl)(u+c|0,9),d^=(0,n.rotl)(p+u|0,13),c^=(0,n.rotl)(d+p|0,18),g^=(0,n.rotl)(m+f|0,7),h^=(0,n.rotl)(g+m|0,9),f^=(0,n.rotl)(h+g|0,13),m^=(0,n.rotl)(f+h|0,18),y^=(0,n.rotl)(w+b|0,7),v^=(0,n.rotl)(y+w|0,9),b^=(0,n.rotl)(v+y|0,13),w^=(0,n.rotl)(b+v|0,18);let _=0;i[_++]=o,i[_++]=c,i[_++]=m,i[_++]=w,i[_++]=u,i[_++]=p,i[_++]=h,i[_++]=f}t.hsalsa=l,t.salsa20=(0,n.createCipher)(a,{allowShortKeys:!0,counterRight:!0}),t.xsalsa20=(0,n.createCipher)(a,{counterRight:!0,extendNonceFn:l}),t.xsalsa20poly1305=(0,s.wrapCipher)({blockSize:64,nonceLength:24,tagLength:16},((e,r)=>{const n=16;return(0,i.bytes)(e,32),(0,i.bytes)(r,24),{encrypt:(s,a)=>{(0,i.bytes)(s);const l=s.length+32;a?(0,i.bytes)(a,l):a=new Uint8Array(l),a.set(s,32),(0,t.xsalsa20)(e,r,a,a);const d=a.subarray(0,32),c=(0,o.poly1305)(a.subarray(32),d);return a.set(c,n),a.subarray(0,n).fill(0),a.subarray(n)},decrypt:a=>{(0,i.bytes)(a);const l=a.length;if(l<n)throw new Error("encrypted data should be at least 16 bytes");const d=new Uint8Array(l+n);d.set(a,n);const c=(0,t.xsalsa20)(e,r,new Uint8Array(32)),u=(0,o.poly1305)(d.subarray(32),c);if(!(0,s.equalBytes)(d.subarray(16,32),u))throw new Error("invalid tag");const p=(0,t.xsalsa20)(e,r,d);return p.subarray(0,32).fill(0),c.fill(0),p.subarray(32)}}})),t.secretbox=function(e,r){const i=(0,t.xsalsa20poly1305)(e,r);return{seal:i.encrypt,open:i.decrypt}}},36527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.u64Lengths=t.setBigUint64=t.wrapCipher=t.Hash=t.equalBytes=t.checkOpts=t.concatBytes=t.toBytes=t.bytesToUtf8=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.numberToBytesBE=t.bytesToNumberBE=t.hexToNumber=t.hexToBytes=t.bytesToHex=t.isLE=t.createView=t.u32=t.u16=t.u8=void 0;
|
||
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
||
const i=r(24605);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u16=e=>new Uint16Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/2));t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const n=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){(0,i.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=n[e[r]];return t}t.bytesToHex=o;const s=48,a=57,l=65,d=70,c=97,u=102;function p(e){return e>=s&&e<=a?e-s:e>=l&&e<=d?e-(l-10):e>=c&&e<=u?e-(c-10):void 0}function h(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=p(e.charCodeAt(n)),o=p(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}t.hexToBytes=h,t.hexToNumber=f,t.bytesToNumberBE=function(e){return f(o(e))},t.numberToBytesBE=function(e,t){return h(e.toString(16).padStart(2*t,"0"))};function m(e){if("string"!=typeof e)throw new Error("string expected, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}t.nextTick=async()=>{},t.asyncLoop=async function(e,r,i){let n=Date.now();for(let o=0;o<e;o++){i(o);const e=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=m,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=function(e){if("string"==typeof e)e=m(e);else{if(!(0,i.isBytes)(e))throw new Error("Uint8Array expected, got "+typeof e);e=e.slice()}return e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];(0,i.bytes)(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r},t.checkOpts=function(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign(e,t)},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r};t.Hash=class{};function g(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);const n=BigInt(32),o=BigInt(4294967295),s=Number(r>>n&o),a=Number(r&o),l=i?4:0,d=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+d,a,i)}t.wrapCipher=(e,t)=>(Object.assign(t,e),t),t.setBigUint64=g,t.u64Lengths=function(e,r){const i=new Uint8Array(16),n=(0,t.createView)(i);return g(n,0,BigInt(r?r.length:0),!0),g(n,8,BigInt(e.length),!0),i}},68489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gcm=t.ctr=t.cbc=t.utils=t.managedNonce=t.getWebcryptoSubtle=t.randomBytes=void 0;const i=r(25297);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"getWebcryptoSubtle",{enumerable:!0,get:function(){return i.getWebcryptoSubtle}});const n=r(36527),o=r(24605);t.managedNonce=function(e){return(0,o.number)(e.nonceLength),(t,...r)=>({encrypt:(o,...s)=>{const{nonceLength:a}=e,l=(0,i.randomBytes)(a),d=e(t,l,...r).encrypt(o,...s),c=(0,n.concatBytes)(l,d);return d.fill(0),c},decrypt:(i,...n)=>{const{nonceLength:o}=e,s=i.subarray(0,o),a=i.subarray(o);return e(t,s,...r).decrypt(a,...n)}})},t.utils={async encrypt(e,t,r,n){const o=(0,i.getWebcryptoSubtle)(),s=await o.importKey("raw",e,t,!0,["encrypt"]),a=await o.encrypt(r,s,n);return new Uint8Array(a)},async decrypt(e,t,r,n){const o=(0,i.getWebcryptoSubtle)(),s=await o.importKey("raw",e,t,!0,["decrypt"]),a=await o.decrypt(r,s,n);return new Uint8Array(a)}};const s="AES-CBC",a="AES-CTR",l="AES-GCM";function d(e){return(r,i,n)=>{(0,o.bytes)(r),(0,o.bytes)(i);const d={name:e,length:8*r.length},c=function(e,t,r){if(e===s)return{name:s,iv:t};if(e===a)return{name:a,counter:t,length:64};if(e===l)return r?{name:l,iv:t,additionalData:r}:{name:l,iv:t};throw new Error("unknown aes block mode")}(e,i,n);return{encrypt:e=>((0,o.bytes)(e),t.utils.encrypt(r,d,c,e)),decrypt:e=>((0,o.bytes)(e),t.utils.decrypt(r,d,c,e))}}}t.cbc=d(s),t.ctr=d(a),t.gcm=d(l)},67557:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function l(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=n,t.number=r,t.bool=i,t.bytes=o,t.hash=s,t.exists=a,t.output=l;const d={number:r,bool:i,bytes:o,hash:s,exists:a,output:l};t.default=d},37202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=t.Maj=t.Chi=void 0;const i=r(67557),n=r(99175);t.Chi=(e,t,r)=>e&t^~e&r;t.Maj=(e,t,r)=>e&t^e&r^t&r;class o extends n.Hash{constructor(e,t,r,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,i.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,n.toBytes)(e)).length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a!==o)r.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,n.createView)(e);for(;o<=s-i;i+=o)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.exists)(this),(0,i.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);const n=BigInt(32),o=BigInt(4294967295),s=Number(r>>n&o),a=Number(r&o),l=i?4:0,d=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+d,a,i)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const l=(0,n.createView)(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=d/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)l.setUint32(4*e,u[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:s}=this;return e.length=i,e.pos=s,e.finished=n,e.destroyed=o,i%t&&e.buffer.set(r),e}}t.HashMD=o},25145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},39615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const i=r(67557),n=r(99175);class o extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,i.hash)(e);const r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,i.exists)(this),this.iHash.update(e),this}digestInto(e){(0,i.exists)(this),(0,i.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:s}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o;t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},18941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=function(e,t,r,i){const{c:n,dkLen:l,DK:d,PRF:c,PRFSalt:u}=s(e,t,r,i);let p;const h=new Uint8Array(4),f=(0,o.createView)(h),m=new Uint8Array(c.outputLen);for(let e=1,t=0;t<l;e++,t+=c.outputLen){const r=d.subarray(t,t+c.outputLen);f.setInt32(0,e,!1),(p=u._cloneInto(p)).update(h).digestInto(m),r.set(m.subarray(0,r.length));for(let e=1;e<n;e++){c._cloneInto(p).update(m).digestInto(m);for(let e=0;e<r.length;e++)r[e]^=m[e]}}return a(c,u,d,p,m)},t.pbkdf2Async=async function(e,t,r,i){const{c:n,dkLen:l,asyncTick:d,DK:c,PRF:u,PRFSalt:p}=s(e,t,r,i);let h;const f=new Uint8Array(4),m=(0,o.createView)(f),g=new Uint8Array(u.outputLen);for(let e=1,t=0;t<l;e++,t+=u.outputLen){const r=c.subarray(t,t+u.outputLen);m.setInt32(0,e,!1),(h=p._cloneInto(h)).update(f).digestInto(g),r.set(g.subarray(0,r.length)),await(0,o.asyncLoop)(n-1,d,(()=>{u._cloneInto(h).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}))}return a(u,p,c,h,g)};const i=r(67557),n=r(39615),o=r(99175);function s(e,t,r,s){(0,i.hash)(e);const a=(0,o.checkOpts)({dkLen:32,asyncTick:10},s),{c:l,dkLen:d,asyncTick:c}=a;if((0,i.number)(l),(0,i.number)(d),(0,i.number)(c),l<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const u=(0,o.toBytes)(t),p=(0,o.toBytes)(r),h=new Uint8Array(d),f=n.hmac.create(e,u),m=f._cloneInto().update(p);return{c:l,dkLen:d,asyncTick:c,DK:h,PRF:f,PRFSalt:m}}function a(e,t,r,i,n){return e.destroy(),t.destroy(),i&&i.destroy(),n.fill(0),r}},25663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scrypt=function(e,t,r){const{N:i,r:n,p:o,dkLen:a,blockSize32:u,V:p,B32:h,B:f,tmp:m,blockMixCb:g}=d(e,t,r);s.isLE||(0,s.byteSwap32)(h);for(let e=0;e<o;e++){const t=u*e;for(let e=0;e<u;e++)p[e]=h[t+e];for(let e=0,t=0;e<i-1;e++)l(p,t,p,t+=u,n),g();l(p,(i-1)*u,h,t,n),g();for(let e=0;e<i;e++){const e=h[t+u-16]%i;for(let r=0;r<u;r++)m[r]=h[t+r]^p[e*u+r];l(m,0,h,t,n),g()}}s.isLE||(0,s.byteSwap32)(h);return c(e,a,f,p,m)},t.scryptAsync=async function(e,t,r){const{N:i,r:n,p:o,dkLen:a,blockSize32:u,V:p,B32:h,B:f,tmp:m,blockMixCb:g,asyncTick:y}=d(e,t,r);s.isLE||(0,s.byteSwap32)(h);for(let e=0;e<o;e++){const t=u*e;for(let e=0;e<u;e++)p[e]=h[t+e];let r=0;await(0,s.asyncLoop)(i-1,y,(()=>{l(p,r,p,r+=u,n),g()})),l(p,(i-1)*u,h,t,n),g(),await(0,s.asyncLoop)(i,y,(()=>{const e=h[t+u-16]%i;for(let r=0;r<u;r++)m[r]=h[t+r]^p[e*u+r];l(m,0,h,t,n),g()}))}s.isLE||(0,s.byteSwap32)(h);return c(e,a,f,p,m)};const i=r(67557),n=r(22623),o=r(18941),s=r(99175);function a(e,t,r,i,n,o){let a=e[t++]^r[i++],l=e[t++]^r[i++],d=e[t++]^r[i++],c=e[t++]^r[i++],u=e[t++]^r[i++],p=e[t++]^r[i++],h=e[t++]^r[i++],f=e[t++]^r[i++],m=e[t++]^r[i++],g=e[t++]^r[i++],y=e[t++]^r[i++],v=e[t++]^r[i++],b=e[t++]^r[i++],w=e[t++]^r[i++],_=e[t++]^r[i++],x=e[t++]^r[i++],S=a,k=l,E=d,T=c,B=u,C=p,I=h,A=f,F=m,M=g,D=y,R=v,P=b,O=w,z=_,N=x;for(let e=0;e<8;e+=2)B^=(0,s.rotl)(S+P|0,7),F^=(0,s.rotl)(B+S|0,9),P^=(0,s.rotl)(F+B|0,13),S^=(0,s.rotl)(P+F|0,18),M^=(0,s.rotl)(C+k|0,7),O^=(0,s.rotl)(M+C|0,9),k^=(0,s.rotl)(O+M|0,13),C^=(0,s.rotl)(k+O|0,18),z^=(0,s.rotl)(D+I|0,7),E^=(0,s.rotl)(z+D|0,9),I^=(0,s.rotl)(E+z|0,13),D^=(0,s.rotl)(I+E|0,18),T^=(0,s.rotl)(N+R|0,7),A^=(0,s.rotl)(T+N|0,9),R^=(0,s.rotl)(A+T|0,13),N^=(0,s.rotl)(R+A|0,18),k^=(0,s.rotl)(S+T|0,7),E^=(0,s.rotl)(k+S|0,9),T^=(0,s.rotl)(E+k|0,13),S^=(0,s.rotl)(T+E|0,18),I^=(0,s.rotl)(C+B|0,7),A^=(0,s.rotl)(I+C|0,9),B^=(0,s.rotl)(A+I|0,13),C^=(0,s.rotl)(B+A|0,18),R^=(0,s.rotl)(D+M|0,7),F^=(0,s.rotl)(R+D|0,9),M^=(0,s.rotl)(F+R|0,13),D^=(0,s.rotl)(M+F|0,18),P^=(0,s.rotl)(N+z|0,7),O^=(0,s.rotl)(P+N|0,9),z^=(0,s.rotl)(O+P|0,13),N^=(0,s.rotl)(z+O|0,18);n[o++]=a+S|0,n[o++]=l+k|0,n[o++]=d+E|0,n[o++]=c+T|0,n[o++]=u+B|0,n[o++]=p+C|0,n[o++]=h+I|0,n[o++]=f+A|0,n[o++]=m+F|0,n[o++]=g+M|0,n[o++]=y+D|0,n[o++]=v+R|0,n[o++]=b+P|0,n[o++]=w+O|0,n[o++]=_+z|0,n[o++]=x+N|0}function l(e,t,r,i,n){let o=i+0,s=i+16*n;for(let i=0;i<16;i++)r[s+i]=e[t+16*(2*n-1)+i];for(let i=0;i<n;i++,o+=16,t+=16)a(r,s,e,t,r,o),i>0&&(s+=16),a(r,o,e,t+=16,r,s)}function d(e,t,r){const a=(0,s.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:l,r:d,p:c,dkLen:u,asyncTick:p,maxmem:h,onProgress:f}=a;if((0,i.number)(l),(0,i.number)(d),(0,i.number)(c),(0,i.number)(u),(0,i.number)(p),(0,i.number)(h),void 0!==f&&"function"!=typeof f)throw new Error("progressCb should be function");const m=128*d,g=m/4;if(l<=1||l&l-1||l>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>137438953440/m)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(u<0||u>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const y=m*(l+c);if(y>h)throw new Error(`Scrypt: parameters too large, ${y} (128 * r * (N + p)) > ${h} (maxmem)`);const v=(0,o.pbkdf2)(n.sha256,e,t,{c:1,dkLen:m*c}),b=(0,s.u32)(v),w=(0,s.u32)(new Uint8Array(m*l)),_=(0,s.u32)(new Uint8Array(m));let x=()=>{};if(f){const e=2*l*c,t=Math.max(Math.floor(e/1e4),1);let r=0;x=()=>{r++,!f||r%t&&r!==e||f(r/e)}}return{N:l,r:d,p:c,dkLen:u,blockSize32:g,V:w,B32:b,B:v,tmp:_,blockMixCb:x,asyncTick:p}}function c(e,t,r,i,s){const a=(0,o.pbkdf2)(n.sha256,e,r,{c:1,dkLen:t});return r.fill(0),i.fill(0),s.fill(0),a}},22623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=t.SHA256=void 0;const i=r(37202),n=r(99175),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class l extends i.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:i,E:n,F:o,G:s,H:a}=this;return[e,t,r,i,n,o,s,a]}set(e,t,r,i,n,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],r=a[e-2],i=(0,n.rotr)(t,7)^(0,n.rotr)(t,18)^t>>>3,o=(0,n.rotr)(r,17)^(0,n.rotr)(r,19)^r>>>10;a[e]=o+a[e-7]+i+a[e-16]|0}let{A:r,B:s,C:l,D:d,E:c,F:u,G:p,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,n.rotr)(c,6)^(0,n.rotr)(c,11)^(0,n.rotr)(c,25))+(0,i.Chi)(c,u,p)+o[e]+a[e]|0,f=((0,n.rotr)(r,2)^(0,n.rotr)(r,13)^(0,n.rotr)(r,22))+(0,i.Maj)(r,s,l)|0;h=p,p=u,u=c,c=d+t|0,d=l,l=s,s=r,r=t+f|0}r=r+this.A|0,s=s+this.B|0,l=l+this.C|0,d=d+this.D|0,c=c+this.E|0,u=u+this.F|0,p=p+this.G|0,h=h+this.H|0,this.set(r,s,l,d,c,u,p,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.SHA256=l;class d extends l{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,n.wrapConstructor)((()=>new l)),t.sha224=(0,n.wrapConstructor)((()=>new d))},99175:(e,t,r)=>{"use strict";
|
||
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=void 0,t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.byteSwap32=function(e){for(let r=0;r<e.length;r++)e[r]=(0,t.byteSwap)(e[r])},t.bytesToHex=function(e){(0,n.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=a(e.charCodeAt(n)),o=a(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i},t.asyncLoop=async function(e,r,i){let n=Date.now();for(let o=0;o<e;o++){i(o);const e=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=l,t.toBytes=d,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];(0,n.bytes)(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(d(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(d(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(d(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(i.crypto&&"function"==typeof i.crypto.getRandomValues)return i.crypto.getRandomValues(new Uint8Array(e));if(i.crypto&&"function"==typeof i.crypto.randomBytes)return i.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")};const i=r(25145),n=r(67557);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);t.rotr=(e,t)=>e<<32-t|e>>>t;t.rotl=(e,t)=>e<<t|e>>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e);const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=s._0&&e<=s._9?e-s._0:e>=s._A&&e<=s._F?e-(s._A-10):e>=s._a&&e<=s._f?e-(s._a-10):void 0}function l(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function d(e){return"string"==typeof e&&(e=l(e)),(0,n.bytes)(e),e}t.nextTick=async()=>{};t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString},87568:(e,t,r)=>{var i=t;i.bignum=r(72344),i.define=r(47363).define,i.base=r(9673),i.constants=r(22153),i.decoders=r(22853),i.encoders=r(24669)},47363:(e,t,r)=>{var i=r(87568),n=r(56698);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r(18950).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return n(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},47227:(e,t,r)=>{var i=r(56698),n=r(9673).Reporter,o=r(48287).Buffer;function s(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(s,n),t.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},9673:(e,t,r)=>{var i=t;i.Reporter=r(89220).a,i.DecoderBuffer=r(47227).t,i.EncoderBuffer=r(47227).d,i.Node=r(90993)},90993:(e,t,r)=>{var i=r(9673).Reporter,n=r(9673).EncoderBuffer,o=r(9673).DecoderBuffer,s=r(43349),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function d(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=d;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){var e=this._baseState,t={};c.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},d.prototype._wrap=function(){var e=this._baseState;l.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},d.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},d.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var i=e[r];t[i]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){d.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){d.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),d.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},d.prototype.optional=function(){return this._baseState.optional=!0,this},d.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},d.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},d.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},d.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},d.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},d.prototype.any=function(){return this._baseState.any=!0,this},d.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},d.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},d.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var i,n=r.default,s=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){var l=null;if(null!==r.explicit?l=r.explicit:null!==r.implicit?l=r.implicit:null!==r.tag&&(l=r.tag),null!==l||r.any){if(s=this._peekTag(e,l,r.any),e.isError(s))return s}else{var d=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(d)}}if(r.obj&&s&&(i=e.enterObject()),s){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var u=e.offset;if(null===r.use&&null===r.choice){if(r.any)d=e.save();var p=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(p))return p;r.any?n=e.raw(d):e=p}if(t&&t.track&&null!==r.tag&&t.track(e.path(),u,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var h=new o(n);n=this._getUse(r.contains,e._reporterState.obj)._decode(h,t)}}return r.obj&&s&&(n=e.leaveObject(i)),null===r.key||null===n&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,n),n},d.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},d.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},d.prototype._decodeChoice=function(e,t){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some((function(o){var s=e.save(),a=r.choice[o];try{var l=a._decode(e,t);if(e.isError(l))return!1;i={type:o,value:l},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?i:e.error("Choice not matched")},d.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},d.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){var n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},d.prototype._encodeValue=function(e,t,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new i);var o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}var s=null,a=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,r)._encode(e,t),a=!0;else if(n.children)s=n.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var l=this.clone();l._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)}),l))}else null!==n.use?o=this._getUse(n.use,r)._encode(e,t):(s=this._encodePrimitive(n.tag,e),a=!0);if(!n.any&&null===n.choice){var d=null!==n.implicit?n.implicit:n.tag,c=null===n.implicit?"universal":"context";null===d?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(d,a,c,s))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},d.prototype._encodeChoice=function(e,t){var r=this._baseState,i=r.choice[e.type];return i||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},d.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},d.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},d.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},89220:(e,t,r)=>{var i=r(56698);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.a=n,n.prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t,r=this._reporterState,i=e instanceof o;if(t=i?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return i||r.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74598:(e,t,r)=>{var i=r(22153);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=i._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=i._reverse(t.tag)},22153:(e,t,r)=>{var i=t;i._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var i=e[r];t[i]=r})),t},i.der=r(74598)},62010:(e,t,r)=>{var i=r(56698),n=r(87568),o=n.base,s=n.bignum,a=n.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){o.Node.call(this,"der",e)}function c(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=a.tagClass[r>>6],n=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}return{cls:i,primitive:n,tag:r,tagStr:a.tag[r]}}function u(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(!(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var o=0;o<n;o++){i<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;i|=s}return i}e.exports=l,l.prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},i(d,o.Node),d.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=c(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},d.prototype._decodeTag=function(e,t,r){var i=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=u(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(i.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+t+'"'))},d.prototype._skipUntilEnd=function(e,t){for(;;){var r=c(e,t);if(e.isError(r))return r;var i,n=u(e,r.primitive,t);if(e.isError(n))return n;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},d.prototype._decodeList=function(e,t,r,i){for(var n=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var s=r.decode(e,"der",i);if(e.isError(s)&&o)break;n.push(s)}return n},d.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",o=0;o<i.length/2;o++)n+=String.fromCharCode(i.readUInt16BE(2*o));return n}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var a=e.raw().toString("ascii");return this._isPrintstr(a)?a:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},d.prototype._decodeObjid=function(e,t,r){for(var i,n=[],o=0;!e.isEmpty();){var s=e.readUInt8();o<<=7,o|=127&s,128&s||(n.push(o),o=0)}128&s&&n.push(o);var a=n[0]/40|0,l=n[0]%40;if(i=r?n:[a,l].concat(n.slice(1)),t){var d=t[i.join(" ")];void 0===d&&(d=t[i.join(".")]),void 0!==d&&(i=d)}return i},d.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var i=0|r.slice(0,4),n=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),l=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),l=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,o,s,a,l,0)},d.prototype._decodeNull=function(e){return null},d.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},d.prototype._decodeInt=function(e,t){var r=e.raw(),i=new s(r);return t&&(i=t[i.toString(10)]||i),i},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},22853:(e,t,r)=>{var i=t;i.der=r(62010),i.pem=r(58903)},58903:(e,t,r)=>{var i=r(56698),n=r(48287).Buffer,o=r(62010);function s(e){o.call(this,e),this.enc="pem"}i(s,o),e.exports=s,s.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,l=-1,d=0;d<r.length;d++){var c=r[d].match(s);if(null!==c&&c[2]===i){if(-1!==a){if("END"!==c[1])break;l=d;break}if("BEGIN"!==c[1])break;a=d}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+i);var u=r.slice(a+1,l).join("");u.replace(/[^a-z0-9\+\/=]+/gi,"");var p=new n(u,"base64");return o.prototype.decode.call(this,p,t)}},70082:(e,t,r)=>{var i=r(56698),n=r(48287).Buffer,o=r(87568),s=o.base,a=o.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=l,l.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(d,s.Node),d.prototype._encodeComposite=function(e,t,r,i){var o,s=function(e,t,r,i){var n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))n=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}if(n>=31)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=a.tagClassByName[r||"universal"]<<6,n}(e,t,r,this.reporter);if(i.length<128)return(o=new n(2))[0]=s,o[1]=i.length,this._createEncoderBuffer([o,i]);for(var l=1,d=i.length;d>=256;d>>=8)l++;(o=new n(2+l))[0]=s,o[1]=128|l;d=1+l;for(var c=i.length;c>0;d--,c>>=8)o[d]=255&c;return this._createEncoderBuffer([o,i])},d.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new n(2*e.length),i=0;i<e.length;i++)r.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},d.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(i=0;i<e.length;i++){var s=e[i];for(o++;s>=128;s>>=7)o++}var a=new n(o),l=a.length-1;for(i=e.length-1;i>=0;i--){s=e[i];for(a[l--]=127&s;(s>>=7)>0;)a[l--]=128|127&s}return this._createEncoderBuffer(a)},d.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[c(i.getFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(i.getFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},d.prototype._encodeNull=function(){return this._createEncoderBuffer("")},d.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!n.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new n(r)}if(n.isBuffer(e)){var i=e.length;0===e.length&&i++;var o=new n(i);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);i=1;for(var s=e;s>=256;s>>=8)i++;for(s=(o=new Array(i)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new n(o))},d.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},d.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},24669:(e,t,r)=>{var i=t;i.der=r(70082),i.pem=r(90735)},90735:(e,t,r)=>{var i=r(56698),n=r(70082);function o(e){n.call(this,e),this.enc="pem"}i(o,n),e.exports=o,o.prototype.encode=function(e,t){for(var r=n.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)i.push(r.slice(o,o+64));return i.push("-----END "+t.label+"-----"),i.join("\n")}},72344:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(78982).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},67526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],d=new n(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,u=l>0?s-4:s;for(r=0;r<u;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],d[c++]=t>>16&255,d[c++]=t>>8&255,d[c++]=255&t;2===l&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,d[c++]=255&t);1===l&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,d[c++]=t>>8&255,d[c++]=255&t);return d},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,o=[],s=16383,a=0,d=i-n;a<d;a+=s)o.push(l(e,a,a+s>d?d:a+s));1===n?(t=e[i-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,i){for(var n,o,s=[],a=t;a<i;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=n)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},39404:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(47790).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,n){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l<a;l++){var d=e.charCodeAt(l)-48;o*=n,s=d>=49?d-49+10:d>=17?d-17+10:d,i(d>=0&&s<n,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?p[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],c=f[e];r="";var u=this.clone();for(u.negative=0;!u.isZero();){var m=u.modrn(c).toString(e);r=(u=u.idivn(c)).isZero()?m+r:p[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r>=0)for(e[r--]=i;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function v(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?y(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},b.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},b.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},b.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},b.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),v(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),i("number"==typeof e),i(e<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=e.words[i]>>>n&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this._strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new T(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function B(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},n(x,_),x.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,_),n(k,_),n(E,_),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new S;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},T.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new B(e)},n(B,T),B.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},B.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},B.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},B.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},B.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},46880:function(e){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,i){void 0===i&&(i=!1);var n=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(n,o),a=0,l=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),i=t+new Array(r+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(a=s-Math.min(n,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]<l[1][s])return-1}},e.map=function(e,t){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)i.push(t(e[r]));return i},e.find=function(e,t){var r,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,i=e.length;r<i;r+=1){var n=e[r];if(t(n,r))return n}},e.assign=function(e){for(var t,r,i=e,n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=n,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(91))&&i.__esModule?i:{default:i},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,r,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new n.default(e,t)},e.parse=function(e){return new n.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(r=null)&&s(t.prototype,r),i&&s(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=l(r(92)),n=l(r(93)),o=l(r(94)),s=l(r(95)),a=l(r(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},i=0,n={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(n[t]=s,o+=1):"object"==typeof s&&(r[t]=s,i+=1)})),i>0){var s=Object.keys(r),l=a.default.find(s,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(r[l]);if(void 0!==d)return d}var c=a.default.find(s,(function(e){return t.isPlatform(e)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}}if(o>0){var p=Object.keys(n),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(n[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),n=a.default.getBrowserTypeByAlias(i);return t&&n&&(i=n.toLowerCase()),i===r},t.compareVersion=function(e){var t=[0],r=e,i=!1,n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(i=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(i=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(n,r,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:n.default.getFirstMatch(t,e),version:n.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=n.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=n.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return r&&(i.versionName=r),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=n.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return r&&(i.versionName=r),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||n.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=n.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=n.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},72322:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BoxDeveloperTokenAuth=void 0;const n=r(31210),o=r(72631),s=r(30893),a=r(46067);t.BoxDeveloperTokenAuth=class{constructor(e){this.config={},e.token&&(this.token=e.token),e.config&&(this.config=e.config),this.tokenStorage=new s.InMemoryTokenStorage({token:{accessToken:this.token}})}retrieveToken(e){return i(this,void 0,void 0,(function*(){const e=yield this.tokenStorage.get();if(null==e)throw new o.BoxSdkError({message:"No access token is available."});return e}))}refreshToken(e){return i(this,void 0,void 0,(function*(){throw new o.BoxSdkError({message:"Developer token has expired. Please provide a new one."})}))}retrieveAuthorizationHeader(e){return i(this,void 0,void 0,(function*(){const t=yield this.retrieveToken(e);return"".concat("Bearer ",t.accessToken)}))}revokeToken(e){return i(this,void 0,void 0,(function*(){const t=yield this.tokenStorage.get();if(null==t)return;const r=new a.AuthorizationManager({networkSession:null!=e?e:new n.NetworkSession({})});yield r.revokeAccessToken({clientId:this.config.clientId,clientSecret:this.config.clientSecret,token:t.accessToken}),yield this.tokenStorage.clear()}))}downscopeToken(e,t,r,s){return i(this,void 0,void 0,(function*(){const i=yield this.tokenStorage.get();if(null==i||null==i.accessToken)throw new o.BoxSdkError({message:"No access token is available."});const l=new a.AuthorizationManager({networkSession:null!=s?s:new n.NetworkSession({})});return yield l.requestAccessToken({grantType:"urn:ietf:params:oauth:grant-type:token-exchange",subjectToken:i.accessToken,subjectTokenType:"urn:ietf:params:oauth:token-type:access_token",scope:e.join(" "),resource:t,boxSharedLink:r})}))}}},72631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxApiError=t.BoxSdkError=void 0;class r extends Error{constructor(e){super(e.message),this.name="BoxSDKError",Object.assign(this,e),this.message=JSON.stringify(e,void 0,2)}}t.BoxSdkError=r;t.BoxApiError=class extends r{constructor(e){super(e)}}},80070:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BoxOAuth=t.OAuthConfig=void 0;const n=r(31210),o=r(46067),s=r(30893),a=r(50793),l=r(93845),d=r(72631);t.OAuthConfig=class{constructor(e){this.tokenStorage=new s.InMemoryTokenStorage({}),e.clientId&&(this.clientId=e.clientId),e.clientSecret&&(this.clientSecret=e.clientSecret),e.tokenStorage&&(this.tokenStorage=e.tokenStorage)}};t.BoxOAuth=class{constructor(e){e.config&&(this.config=e.config),this.tokenStorage=this.config.tokenStorage}getAuthorizeUrl(e={}){const t=(0,l.prepareParams)({client_id:null!=e.clientId?e.clientId:this.config.clientId,response_type:null!=e.responseType?e.responseType:"code",redirect_uri:e.redirectUri,state:e.state,scope:e.scope});return"".concat("https://account.box.com/api/oauth2/authorize?",(0,a.sdToUrlParams)(JSON.stringify(t)))}getTokensAuthorizationCodeGrant(e,t){return i(this,void 0,void 0,(function*(){const r=new o.AuthorizationManager({networkSession:null!=t?t:new n.NetworkSession({})}),i=yield r.requestAccessToken({grantType:"authorization_code",clientId:this.config.clientId,clientSecret:this.config.clientSecret,code:e});return yield this.tokenStorage.store(i),i}))}retrieveToken(e){return i(this,void 0,void 0,(function*(){const e=yield this.tokenStorage.get();if(null==e)throw new d.BoxSdkError({message:"Access and refresh tokens not available. Authenticate before making any API call first."});return e}))}refreshToken(e){return i(this,void 0,void 0,(function*(){const t=yield this.tokenStorage.get(),r=null!=t?t.refreshToken:void 0,i=new o.AuthorizationManager({networkSession:null!=e?e:new n.NetworkSession({})}),s=yield i.requestAccessToken({grantType:"refresh_token",clientId:this.config.clientId,clientSecret:this.config.clientSecret,refreshToken:r});return yield this.tokenStorage.store(s),s}))}retrieveAuthorizationHeader(e){return i(this,void 0,void 0,(function*(){const t=yield this.retrieveToken(e);return"".concat("Bearer ",t.accessToken)}))}revokeToken(e){return i(this,void 0,void 0,(function*(){const t=yield this.tokenStorage.get();if(null==t)return;const r=new o.AuthorizationManager({networkSession:null!=e?e:new n.NetworkSession({})});yield r.revokeAccessToken({clientId:this.config.clientId,clientSecret:this.config.clientSecret,token:t.accessToken})}))}downscopeToken(e,t,r,s){return i(this,void 0,void 0,(function*(){const i=yield this.tokenStorage.get();if(null==i||null==i.accessToken)throw new d.BoxSdkError({message:"No access token is available."});const a=new o.AuthorizationManager({networkSession:null!=s?s:new n.NetworkSession({})});return yield a.requestAccessToken({grantType:"urn:ietf:params:oauth:grant-type:token-exchange",subjectToken:i.accessToken,subjectTokenType:"urn:ietf:params:oauth:token-type:access_token",scope:e.join(" "),resource:t,boxSharedLink:r})}))}}},30893:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryTokenStorage=void 0;t.InMemoryTokenStorage=class{constructor(e){this.token=void 0,e.token&&(this.token=e.token)}store(e){return r(this,void 0,void 0,(function*(){this.token=e}))}get(){return r(this,void 0,void 0,(function*(){return this.token}))}clear(){return r(this,void 0,void 0,(function*(){this.token=void 0}))}}},58686:(e,t,r)=>{"use strict";t.r=void 0;const i=r(46067),n=r(98425),o=r(45244),s=r(34638),a=r(82083),l=r(25052),d=r(17256),c=r(69496),u=r(78812),p=r(13612),h=r(67749),f=r(69085),m=r(96913),g=r(55040),y=r(14703),v=r(25318),b=r(1307),w=r(79434),_=r(53799),x=r(69023),S=r(91475),k=r(90269),E=r(63942),T=r(3670),B=r(40463),C=r(35561),I=r(92102),A=r(54991),F=r(81495),M=r(68567),D=r(59417),R=r(71305),P=r(57634),O=r(82415),z=r(70174),N=r(49888),q=r(80824),U=r(87653),L=r(16822),j=r(19631),H=r(64200),$=r(49534),G=r(40656),W=r(31591),K=r(98355),V=r(31395),J=r(95566),Y=r(30004),Q=r(92536),Z=r(22678),X=r(73859),ee=r(99681),te=r(22195),re=r(99253),ie=r(90072),ne=r(81194),oe=r(85180),se=r(72865),ae=r(61020),le=r(52162),de=r(86008),ce=r(99871),ue=r(59465),pe=r(32537),he=r(54270),fe=r(39797),me=r(16360),ge=r(41014),ye=r(58555),ve=r(27856),be=r(31210),we=r(42575);class _e{constructor(e){this.networkSession=new be.NetworkSession({baseUrls:new we.BaseUrls({})}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession),this.authorization=new i.AuthorizationManager({auth:this.auth,networkSession:this.networkSession}),this.files=new n.FilesManager({auth:this.auth,networkSession:this.networkSession}),this.trashedFiles=new o.TrashedFilesManager({auth:this.auth,networkSession:this.networkSession}),this.appItemAssociations=new s.AppItemAssociationsManager({auth:this.auth,networkSession:this.networkSession}),this.downloads=new a.DownloadsManager({auth:this.auth,networkSession:this.networkSession}),this.uploads=new l.UploadsManager({auth:this.auth,networkSession:this.networkSession}),this.chunkedUploads=new d.ChunkedUploadsManager({auth:this.auth,networkSession:this.networkSession}),this.listCollaborations=new c.ListCollaborationsManager({auth:this.auth,networkSession:this.networkSession}),this.comments=new u.CommentsManager({auth:this.auth,networkSession:this.networkSession}),this.tasks=new p.TasksManager({auth:this.auth,networkSession:this.networkSession}),this.fileVersions=new h.FileVersionsManager({auth:this.auth,networkSession:this.networkSession}),this.fileMetadata=new f.FileMetadataManager({auth:this.auth,networkSession:this.networkSession}),this.fileClassifications=new m.FileClassificationsManager({auth:this.auth,networkSession:this.networkSession}),this.skills=new g.SkillsManager({auth:this.auth,networkSession:this.networkSession}),this.fileWatermarks=new y.FileWatermarksManager({auth:this.auth,networkSession:this.networkSession}),this.fileRequests=new v.FileRequestsManager({auth:this.auth,networkSession:this.networkSession}),this.folders=new b.FoldersManager({auth:this.auth,networkSession:this.networkSession}),this.trashedFolders=new w.TrashedFoldersManager({auth:this.auth,networkSession:this.networkSession}),this.folderMetadata=new _.FolderMetadataManager({auth:this.auth,networkSession:this.networkSession}),this.folderClassifications=new x.FolderClassificationsManager({auth:this.auth,networkSession:this.networkSession}),this.trashedItems=new S.TrashedItemsManager({auth:this.auth,networkSession:this.networkSession}),this.folderWatermarks=new k.FolderWatermarksManager({auth:this.auth,networkSession:this.networkSession}),this.folderLocks=new E.FolderLocksManager({auth:this.auth,networkSession:this.networkSession}),this.metadataTemplates=new T.MetadataTemplatesManager({auth:this.auth,networkSession:this.networkSession}),this.classifications=new B.ClassificationsManager({auth:this.auth,networkSession:this.networkSession}),this.metadataCascadePolicies=new C.MetadataCascadePoliciesManager({auth:this.auth,networkSession:this.networkSession}),this.search=new I.SearchManager({auth:this.auth,networkSession:this.networkSession}),this.userCollaborations=new A.UserCollaborationsManager({auth:this.auth,networkSession:this.networkSession}),this.taskAssignments=new F.TaskAssignmentsManager({auth:this.auth,networkSession:this.networkSession}),this.sharedLinksFiles=new M.SharedLinksFilesManager({auth:this.auth,networkSession:this.networkSession}),this.sharedLinksFolders=new D.SharedLinksFoldersManager({auth:this.auth,networkSession:this.networkSession}),this.webLinks=new R.WebLinksManager({auth:this.auth,networkSession:this.networkSession}),this.trashedWebLinks=new P.TrashedWebLinksManager({auth:this.auth,networkSession:this.networkSession}),this.sharedLinksWebLinks=new O.SharedLinksWebLinksManager({auth:this.auth,networkSession:this.networkSession}),this.users=new z.UsersManager({auth:this.auth,networkSession:this.networkSession}),this.sessionTermination=new N.SessionTerminationManager({auth:this.auth,networkSession:this.networkSession}),this.avatars=new q.AvatarsManager({auth:this.auth,networkSession:this.networkSession}),this.transfer=new U.TransferManager({auth:this.auth,networkSession:this.networkSession}),this.emailAliases=new L.EmailAliasesManager({auth:this.auth,networkSession:this.networkSession}),this.memberships=new j.MembershipsManager({auth:this.auth,networkSession:this.networkSession}),this.invites=new H.InvitesManager({auth:this.auth,networkSession:this.networkSession}),this.groups=new $.GroupsManager({auth:this.auth,networkSession:this.networkSession}),this.webhooks=new G.WebhooksManager({auth:this.auth,networkSession:this.networkSession}),this.events=new W.EventsManager({auth:this.auth,networkSession:this.networkSession}),this.collections=new K.CollectionsManager({auth:this.auth,networkSession:this.networkSession}),this.recentItems=new V.RecentItemsManager({auth:this.auth,networkSession:this.networkSession}),this.retentionPolicies=new J.RetentionPoliciesManager({auth:this.auth,networkSession:this.networkSession}),this.retentionPolicyAssignments=new Y.RetentionPolicyAssignmentsManager({auth:this.auth,networkSession:this.networkSession}),this.legalHoldPolicies=new Q.LegalHoldPoliciesManager({auth:this.auth,networkSession:this.networkSession}),this.legalHoldPolicyAssignments=new Z.LegalHoldPolicyAssignmentsManager({auth:this.auth,networkSession:this.networkSession}),this.fileVersionRetentions=new X.FileVersionRetentionsManager({auth:this.auth,networkSession:this.networkSession}),this.fileVersionLegalHolds=new ee.FileVersionLegalHoldsManager({auth:this.auth,networkSession:this.networkSession}),this.shieldInformationBarriers=new te.ShieldInformationBarriersManager({auth:this.auth,networkSession:this.networkSession}),this.shieldInformationBarrierReports=new re.ShieldInformationBarrierReportsManager({auth:this.auth,networkSession:this.networkSession}),this.shieldInformationBarrierSegments=new ie.ShieldInformationBarrierSegmentsManager({auth:this.auth,networkSession:this.networkSession}),this.shieldInformationBarrierSegmentMembers=new ne.ShieldInformationBarrierSegmentMembersManager({auth:this.auth,networkSession:this.networkSession}),this.shieldInformationBarrierSegmentRestrictions=new oe.ShieldInformationBarrierSegmentRestrictionsManager({auth:this.auth,networkSession:this.networkSession}),this.devicePinners=new se.DevicePinnersManager({auth:this.auth,networkSession:this.networkSession}),this.termsOfServices=new ae.TermsOfServicesManager({auth:this.auth,networkSession:this.networkSession}),this.termsOfServiceUserStatuses=new le.TermsOfServiceUserStatusesManager({auth:this.auth,networkSession:this.networkSession}),this.collaborationAllowlistEntries=new de.CollaborationAllowlistEntriesManager({auth:this.auth,networkSession:this.networkSession}),this.collaborationAllowlistExemptTargets=new ce.CollaborationAllowlistExemptTargetsManager({auth:this.auth,networkSession:this.networkSession}),this.storagePolicies=new ue.StoragePoliciesManager({auth:this.auth,networkSession:this.networkSession}),this.storagePolicyAssignments=new pe.StoragePolicyAssignmentsManager({auth:this.auth,networkSession:this.networkSession}),this.zipDownloads=new he.ZipDownloadsManager({auth:this.auth,networkSession:this.networkSession}),this.signRequests=new fe.SignRequestsManager({auth:this.auth,networkSession:this.networkSession}),this.workflows=new me.WorkflowsManager({auth:this.auth,networkSession:this.networkSession}),this.signTemplates=new ge.SignTemplatesManager({auth:this.auth,networkSession:this.networkSession}),this.integrationMappings=new ye.IntegrationMappingsManager({auth:this.auth,networkSession:this.networkSession}),this.ai=new ve.AiManager({auth:this.auth,networkSession:this.networkSession})}withAsUserHeader(e){return new _e({auth:this.auth,networkSession:this.networkSession.withAdditionalHeaders({"As-User":e})})}withSuppressedNotifications(){return new _e({auth:this.auth,networkSession:this.networkSession.withAdditionalHeaders({"Box-Notifications":"off"})})}withExtraHeaders(e={}){return new _e({auth:this.auth,networkSession:this.networkSession.withAdditionalHeaders(e)})}withCustomBaseUrls(e){const t=new we.BaseUrls({baseUrl:e.baseUrl,uploadUrl:e.uploadUrl,oauth2Url:e.oauth2Url});return new _e({auth:this.auth,networkSession:this.networkSession.withCustomBaseUrls(t)})}withProxy(e){return new _e({auth:this.auth,networkSession:this.networkSession.withProxy(e)})}withCustomAgentOptions(e){return new _e({auth:this.auth,networkSession:this.networkSession.withCustomAgentOptions(e)})}withInterceptors(e){return new _e({auth:this.auth,networkSession:this.networkSession.withInterceptors(e)})}}t.r=_e},93845:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var process=__webpack_require__(65606),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},__asyncValues=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}},__await=this&&this.__await||function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),i[Symbol.asyncIterator]=function(){return this},i;function s(e,t){n[e]&&(i[e]=function(t){return new Promise((function(r,i){o.push([e,t,r,i])>1||a(e,t)}))},t&&(i[e]=t(i[e])))}function a(e,t){try{(r=n[e](t)).value instanceof __await?Promise.resolve(r.value.v).then(l,d):c(o[0][2],r)}catch(e){c(o[0][3],e)}var r}function l(e){a("next",e)}function d(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},_Hash_hash,_Hash_chunks;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Hash=exports.DateTime=exports.Date=exports.Buffer=void 0,exports.isBrowser=isBrowser,exports.getUuid=getUuid,exports.decodeBase64=decodeBase64,exports.hexToBase64=hexToBase64,exports.dateFromString=dateFromString,exports.deserializeDate=dateFromString,exports.dateToString=dateToString,exports.serializeDate=dateToString,exports.dateTimeFromString=dateTimeFromString,exports.deserializeDateTime=dateTimeFromString,exports.dateTimeToString=dateTimeToString,exports.serializeDateTime=dateTimeToString,exports.hexStrToBase64=hexStrToBase64,exports.getEnvVar=getEnvVar,exports.generateByteBuffer=generateByteBuffer,exports.generateByteStreamFromBuffer=generateByteStreamFromBuffer,exports.generateByteStream=generateByteStream,exports.bufferEquals=bufferEquals,exports.bufferLength=bufferLength,exports.decodeBase64ByteStream=decodeBase64ByteStream,exports.stringToByteStream=stringToByteStream,exports.readByteStream=readByteStream,exports.iterateChunks=iterateChunks,exports.reduceIterator=reduceIterator,exports.prepareParams=prepareParams,exports.toString=toString,exports.createTokenAndCancelAfter=createTokenAndCancelAfter,exports.createJwtAssertion=createJwtAssertion,exports.readTextFromFile=readTextFromFile,exports.getEpochTimeInSeconds=getEpochTimeInSeconds,exports.createAgent=createAgent,exports.delayInSeconds=delayInSeconds,exports.getValueFromObjectRawData=getValueFromObjectRawData;const buffer_1=__webpack_require__(48287);Object.defineProperty(exports,"Buffer",{enumerable:!0,get:function(){return buffer_1.Buffer}});const uuid_1=__webpack_require__(16882),jose_1=__webpack_require__(25948);function isBrowser(){return"object"==typeof window&&"object"==typeof document&&window.crypto}function getUuid(){return(0,uuid_1.v4)()}function decodeBase64(e){return buffer_1.Buffer.from(e,"base64").toString("utf8")}function hexToBase64(e){return buffer_1.Buffer.from(e,"hex").toString("base64")}class DateWrapper{constructor(e){this.value=e}}exports.Date=DateWrapper;class DateTimeWrapper{constructor(e){this.value=e}}function dateFromString(e){return new DateWrapper(new Date(e))}function dateToString(e){return e.value.toISOString().match(/^\d{4}-\d{2}-\d{2}/)[0]}function dateTimeFromString(e){return new DateTimeWrapper(new Date(e))}function dateTimeToString(e){return e.value.toISOString().match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)[0]+"+00:00"}function hexStrToBase64(e){const t=e.toString(),r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)r[e/2]=parseInt(t.substr(e,2),16);return btoa(String.fromCharCode.apply(null,Array.from(r)))}exports.DateTime=DateTimeWrapper;class Hash{constructor({algorithm}){_Hash_hash.set(this,void 0),_Hash_chunks.set(this,void 0),this.algorithm=algorithm,__classPrivateFieldSet(this,_Hash_chunks,new Uint8Array,"f"),isBrowser()?__classPrivateFieldSet(this,_Hash_hash,void 0,"f"):__classPrivateFieldSet(this,_Hash_hash,eval("require")("crypto").createHash(algorithm),"f")}updateHash(e){if(isBrowser()){let t="string"==typeof e?(new TextEncoder).encode(e):e,r=new Uint8Array(__classPrivateFieldGet(this,_Hash_chunks,"f").length+t.length);return r.set(__classPrivateFieldGet(this,_Hash_chunks,"f")),r.set(t,__classPrivateFieldGet(this,_Hash_chunks,"f").length),void __classPrivateFieldSet(this,_Hash_chunks,r,"f")}__classPrivateFieldGet(this,_Hash_hash,"f").update(e)}digestHash(e){return __awaiter(this,void 0,void 0,(function*(){if(isBrowser()){__classPrivateFieldSet(this,_Hash_hash,yield window.crypto.subtle.digest(this.algorithm,__classPrivateFieldGet(this,_Hash_chunks,"f")),"f");const t=Array.from(new Uint8Array(__classPrivateFieldGet(this,_Hash_hash,"f"))).map((e=>e.toString(16).padStart(2,"0"))).join("");return"base64"===e?hexStrToBase64(t):t}return __classPrivateFieldGet(this,_Hash_hash,"f").digest(e)}))}}function getEnvVar(e){return process.env[e]||""}function generateByteBuffer(size){if(isBrowser()){const e=new Uint8Array(size);return window.crypto.getRandomValues(e),buffer_1.Buffer.from(e)}const crypto=eval("require")("crypto");return crypto.randomBytes(size)}function generateByteStreamFromBuffer(buffer){return isBrowser()?new ReadableStream({start(e){e.enqueue(new Uint8Array(buffer)),e.close()}}):eval("require")("stream").Readable.from(buffer_1.Buffer.from(buffer))}function generateByteStream(e){return generateByteStreamFromBuffer(generateByteBuffer(e))}function bufferEquals(e,t){return 0===buffer_1.Buffer.compare(e,t)}function bufferLength(e){return e.length}function decodeBase64ByteStream(data){return isBrowser()?new ReadableStream({start(e){const t=atob(data),r=new ArrayBuffer(t.length),i=new Uint8Array(r);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);e.enqueue(i),e.close()}}):eval("require")("stream").Readable.from(buffer_1.Buffer.from(data,"base64"))}function stringToByteStream(data){return isBrowser()?new ReadableStream({start(e){const t=new ArrayBuffer(data.length),r=new Uint8Array(t);for(let e=0;e<data.length;e++)r[e]=data.charCodeAt(e);e.enqueue(r),e.close()}}):eval("require")("stream").Readable.from(buffer_1.Buffer.from(data,"ascii"))}function readByteStream(e){return __awaiter(this,void 0,void 0,(function*(){var t,r,i,n,o,s,a;const l=[];try{for(t=!0,r=__asyncValues(e);!(n=(i=yield r.next()).done);t=!0){a=i.value,t=!1;const e=a;l.push(e)}}catch(e){o={error:e}}finally{try{t||n||!(s=r.return)||(yield s.call(r))}finally{if(o)throw o.error}}return buffer_1.Buffer.concat(l)}))}function iterateChunks(e,t,r){return __asyncGenerator(this,arguments,(function*(){var i,n,o,s;let a=[],l=0,d=0;for(;d<r&&!e.readableEnded;)try{for(var c,u=!0,p=(n=void 0,__asyncValues(e));!(i=(c=yield __await(p.next())).done);u=!0){s=c.value,u=!1;const e=s;if(!buffer_1.Buffer.isBuffer(e))throw new Error("Expecting a chunk of stream to be a Buffer");if(d+=e.length,a.push(e),l+=e.length,l<t)continue;const r=buffer_1.Buffer.concat(a);let i=0;for(;l>=t;)yield yield __await(generateByteStreamFromBuffer(r.subarray(i,i+t))),i+=t,l-=t;a=l>0?[r.subarray(i)]:[]}}catch(e){n={error:e}}finally{try{u||i||!(o=p.return)||(yield __await(o.call(p)))}finally{if(n)throw n.error}}if(d!==r)throw new Error(`Stream size ${d} does not match expected file size ${r}`);l>0&&(yield yield __await(generateByteStreamFromBuffer(buffer_1.Buffer.concat(a))))}))}function reduceIterator(e,t,r){return __awaiter(this,void 0,void 0,(function*(){let i=r,n=yield e.next();for(;!n.done;)i=yield t(i,n.value),n=yield e.next();return i}))}function prepareParams(e){if(!e||"object"!=typeof e)throw new Error("Expecting obj to be an object in prepareParams");return Object.fromEntries(Object.entries(e).filter((e=>"string"==typeof e[1])))}function toString(e){return"string"==typeof e||null==e?e:String(e)}function createTokenAndCancelAfter(e){return AbortSignal.timeout(e)}function createJwtAssertion(claims,key,options){return __awaiter(this,void 0,void 0,(function*(){const crypto=eval("require")("crypto"),privateKey=crypto.createPrivateKey({key:key.key,format:"pem",type:"pkcs8",passphrase:key.passphrase}),pem=privateKey.export({type:"pkcs8",format:"pem"}).toString(),pkcs8=yield(0,jose_1.importPKCS8)(pem,options.algorithm||"RS256");let signer=new jose_1.SignJWT(claims);return signer=options.audience?signer.setAudience(options.audience):signer,signer=options.expiresIn?signer.setExpirationTime(options.expiresIn):signer,signer=options.issuer?signer.setIssuer(options.issuer):signer,signer=options.jwtid?signer.setJti(options.jwtid):signer,signer=options.notBefore?signer.setNotBefore(options.notBefore):signer,signer=options.subject?signer.setSubject(options.subject):signer,signer=options.algorithm?signer.setProtectedHeader({alg:options.algorithm}):signer,signer=signer.setIssuedAt(),yield signer.sign(pkcs8)}))}function readTextFromFile(filepath){return eval("require")("fs").readFileSync(filepath,"utf8")}function getEpochTimeInSeconds(){return Math.floor(Date.now()/1e3)}function createAgent(options,proxyConfig){if(isBrowser())return;const ProxyAgent=eval("require")("proxy-agent").ProxyAgent;let agentOptions=options;if(proxyConfig&&proxyConfig.url){if(!proxyConfig.url.startsWith("http"))throw new Error("Invalid proxy URL");const e=proxyConfig.url.split("//")[1],t=proxyConfig.username&&proxyConfig.password?`${proxyConfig.username}:${proxyConfig.password}@`:"",r=`http://${t}${e}`;agentOptions=Object.assign({getProxyForUrl:e=>r},options||{})}return agentOptions?new ProxyAgent(agentOptions):new ProxyAgent}function delayInSeconds(e){return __awaiter(this,void 0,void 0,(function*(){return yield new Promise((t=>setTimeout(t,1e3*e)))}))}function getValueFromObjectRawData(e,t){if(e&&"object"==typeof e&&e.rawData)return e.rawData[t]}exports.Hash=Hash,_Hash_hash=new WeakMap,_Hash_chunks=new WeakMap},27856:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AiManager=t.CreateAiExtractStructuredHeaders=t.CreateAiExtractHeaders=t.GetAiAgentDefaultConfigHeaders=t.CreateAiTextGenHeaders=t.CreateAiAskHeaders=t.CreateAiExtractStructuredOptionals=t.CreateAiExtractOptionals=t.GetAiAgentDefaultConfigOptionals=t.CreateAiTextGenOptionals=t.CreateAiAskOptionals=void 0,t.serializeGetAiAgentDefaultConfigQueryParamsModeField=function(e){return e},t.deserializeGetAiAgentDefaultConfigQueryParamsModeField=function(e){if("ask"==e)return e;if("text_gen"==e)return e;if("extract"==e)return e;if("extract_structured"==e)return e;throw new g.BoxSdkError({message:"Can't deserialize GetAiAgentDefaultConfigQueryParamsModeField"})};const n=r(89820),o=r(90791),s=r(67713),a=r(82469),l=r(62180),d=r(62519),c=r(84948),u=r(65888),p=r(31210),h=r(93845),f=r(93845),m=r(84143),g=r(72631);class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateAiAskOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateAiTextGenOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetAiAgentDefaultConfigOptionals=b;class w{constructor(e){this.headers=new E({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateAiExtractOptionals=w;class _{constructor(e){this.headers=new T({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateAiExtractStructuredOptionals=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateAiAskHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateAiTextGenHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetAiAgentDefaultConfigHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateAiExtractHeaders=E;class T{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateAiExtractStructuredHeaders=T;t.AiManager=class{constructor(e){this.networkSession=new p.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}createAiAsk(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,s=r.cancellationToken,a=(0,h.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,m.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/ai/ask"),method:"POST",headers:a,data:(0,o.serializeAiAsk)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeAiResponseFull)(l.data)),{rawData:l.data})}))}createAiTextGen(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,h.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,m.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/ai/text_gen"),method:"POST",headers:o,data:(0,a.serializeAiTextGen)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,s.deserializeAiResponse)(l.data)),{rawData:l.data})}))}getAiAgentDefaultConfig(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,h.prepareParams)({mode:(0,f.toString)(e.mode),language:(0,f.toString)(e.language),model:(0,f.toString)(e.model)}),s=(0,h.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,m.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/ai_agent_default"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,l.deserializeAiAgentAskOrAiAgentExtractOrAiAgentExtractStructuredOrAiAgentTextGen)(a.data)),{rawData:a.data})}))}createAiExtract(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,h.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,m.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/ai/extract"),method:"POST",headers:o,data:(0,d.serializeAiExtract)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,s.deserializeAiResponse)(a.data)),{rawData:a.data})}))}createAiExtractStructured(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new _({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,h.prepareParams)(Object.assign({},i.extraHeaders)),s=yield(0,m.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/ai/extract_structured"),method:"POST",headers:o,data:(0,u.serializeAiExtractStructured)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,c.deserializeAiExtractResponse)(s.data)),{rawData:s.data})}))}}},34638:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppItemAssociationsManager=t.GetFolderAppItemAssociationsHeaders=t.GetFileAppItemAssociationsHeaders=t.GetFolderAppItemAssociationsOptionals=t.GetFileAppItemAssociationsOptionals=void 0;const n=r(98292),o=r(31210),s=r(93845),a=r(93845),l=r(84143);class d{constructor(e){this.queryParams={},this.headers=new u({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileAppItemAssociationsOptionals=d;class c{constructor(e){this.queryParams={},this.headers=new p({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderAppItemAssociationsOptionals=c;class u{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileAppItemAssociationsHeaders=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderAppItemAssociationsHeaders=p;t.AppItemAssociationsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileAppItemAssociations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new d({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,c=r.cancellationToken,u=(0,s.prepareParams)({limit:(0,a.toString)(i.limit),marker:(0,a.toString)(i.marker),application_type:(0,a.toString)(i.applicationType)}),p=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),h=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/app_item_associations"),method:"GET",params:u,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,n.deserializeAppItemAssociations)(h.data)),{rawData:h.data})}))}getFolderAppItemAssociations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,u=(0,s.prepareParams)({limit:(0,a.toString)(i.limit),marker:(0,a.toString)(i.marker),application_type:(0,a.toString)(i.applicationType)}),p=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),h=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/app_item_associations"),method:"GET",params:u,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeAppItemAssociations)(h.data)),{rawData:h.data})}))}}},46067:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthorizationManager=t.RevokeAccessTokenHeaders=t.RefreshAccessTokenHeaders=t.RequestAccessTokenHeaders=t.AuthorizeUserHeaders=t.RevokeAccessTokenOptionals=t.RefreshAccessTokenOptionals=t.RequestAccessTokenOptionals=t.AuthorizeUserOptionals=void 0,t.serializeAuthorizeUserQueryParamsResponseTypeField=function(e){return e},t.deserializeAuthorizeUserQueryParamsResponseTypeField=function(e){if("code"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize AuthorizeUserQueryParamsResponseTypeField"})};const n=r(28403),o=r(61734),s=r(67028),a=r(31227),l=r(67028),d=r(31210),c=r(93845),u=r(93845),p=r(84143),h=r(72631);class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AuthorizeUserOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RequestAccessTokenOptionals=m;class g{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RefreshAccessTokenOptionals=g;class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RevokeAccessTokenOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AuthorizeUserHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RequestAccessTokenHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RefreshAccessTokenHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RevokeAccessTokenHeaders=_;t.AuthorizationManager=class{constructor(e){this.networkSession=new d.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}authorizeUser(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,c.prepareParams)({response_type:(0,u.toString)(e.responseType),client_id:(0,u.toString)(e.clientId),redirect_uri:(0,u.toString)(e.redirectUri),state:(0,u.toString)(e.state),scope:(0,u.toString)(e.scope)}),s=(0,c.prepareParams)(Object.assign({},i.extraHeaders));yield(0,p.fetch)({url:"".concat(this.networkSession.baseUrls.oauth2Url,"/authorize"),method:"GET",params:o,headers:s,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}requestAccessToken(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,s=r.cancellationToken,a=(0,c.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,p.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/oauth2/token"),method:"POST",headers:a,data:(0,o.serializePostOAuth2Token)(e),contentType:"application/x-www-form-urlencoded",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeAccessToken)(l.data)),{rawData:l.data})}))}refreshAccessToken(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new l.PostOAuth2TokenRefreshAccessToken({grantType:e.grantType,clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken}),i=new g({headers:t.headers,cancellationToken:t.cancellationToken}),o=i.headers,a=i.cancellationToken,d=(0,c.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,p.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/oauth2/token#refresh"),method:"POST",headers:d,data:(0,s.serializePostOAuth2TokenRefreshAccessToken)(r),contentType:"application/x-www-form-urlencoded",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeAccessToken)(u.data)),{rawData:u.data})}))}revokeAccessToken(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,c.prepareParams)(Object.assign({},i.extraHeaders));yield(0,p.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/oauth2/revoke"),method:"POST",headers:o,data:(0,a.serializePostOAuth2Revoke)(e),contentType:"application/x-www-form-urlencoded",responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},80824:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AvatarsManager=t.DeleteUserAvatarHeaders=t.CreateUserAvatarHeaders=t.GetUserAvatarHeaders=t.DeleteUserAvatarOptionals=t.CreateUserAvatarOptionals=t.GetUserAvatarOptionals=void 0;const n=r(59730),o=r(31210),s=r(93845),a=r(93845),l=r(84143);class d{constructor(e){this.headers=new p({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetUserAvatarOptionals=d;class c{constructor(e){this.headers=new h({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateUserAvatarOptionals=c;class u{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteUserAvatarOptionals=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUserAvatarHeaders=p;class h{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateUserAvatarHeaders=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteUserAvatarHeaders=f;t.AvatarsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getUserAvatar(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new d({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));return(yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,a.toString)(e),"/avatar"),method:"GET",headers:o,responseFormat:"binary",auth:this.auth,networkSession:this.networkSession,cancellationToken:n})).content}))}createUserAvatar(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new c({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,d=i.cancellationToken,u=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,a.toString)(e),"/avatar"),method:"POST",headers:u,multipartData:[{partName:"pic",fileStream:t.pic,fileName:t.picFileName,contentType:t.picContentType}],contentType:"multipart/form-data",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeUserAvatar)(p.data)),{rawData:p.data})}))}deleteUserAvatar(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,a.toString)(e),"/avatar"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},17256:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedUploadsManager=t.CreateFileUploadSessionCommitHeaders=t.CreateFileUploadSessionCommitByUrlHeaders=t.GetFileUploadSessionPartsHeaders=t.GetFileUploadSessionPartsByUrlHeaders=t.DeleteFileUploadSessionByIdHeaders=t.DeleteFileUploadSessionByUrlHeaders=t.UploadFilePartHeaders=t.UploadFilePartByUrlHeaders=t.GetFileUploadSessionByIdHeaders=t.GetFileUploadSessionByUrlHeaders=t.CreateFileUploadSessionForExistingFileHeaders=t.CreateFileUploadSessionHeaders=t.CreateFileUploadSessionCommitOptionals=t.CreateFileUploadSessionCommitByUrlOptionals=t.GetFileUploadSessionPartsOptionals=t.GetFileUploadSessionPartsByUrlOptionals=t.DeleteFileUploadSessionByIdOptionals=t.DeleteFileUploadSessionByUrlOptionals=t.UploadFilePartOptionals=t.UploadFilePartByUrlOptionals=t.GetFileUploadSessionByIdOptionals=t.GetFileUploadSessionByUrlOptionals=t.CreateFileUploadSessionForExistingFileOptionals=t.CreateFileUploadSessionOptionals=void 0,t.serializeCreateFileUploadSessionRequestBody=Y,t.deserializeCreateFileUploadSessionRequestBody=function(e){if(!(0,E.sdIsMap)(e))throw new _.BoxSdkError({message:'Expecting a map for "CreateFileUploadSessionRequestBody"'});if(null==e.folder_id)throw new _.BoxSdkError({message:'Expecting "folder_id" of type "CreateFileUploadSessionRequestBody" to be defined'});if(!(0,S.sdIsString)(e.folder_id))throw new _.BoxSdkError({message:'Expecting string for "folder_id" of type "CreateFileUploadSessionRequestBody"'});const t=e.folder_id;if(null==e.file_size)throw new _.BoxSdkError({message:'Expecting "file_size" of type "CreateFileUploadSessionRequestBody" to be defined'});if(!(0,x.sdIsNumber)(e.file_size))throw new _.BoxSdkError({message:'Expecting number for "file_size" of type "CreateFileUploadSessionRequestBody"'});const r=e.file_size;if(null==e.file_name)throw new _.BoxSdkError({message:'Expecting "file_name" of type "CreateFileUploadSessionRequestBody" to be defined'});if(!(0,S.sdIsString)(e.file_name))throw new _.BoxSdkError({message:'Expecting string for "file_name" of type "CreateFileUploadSessionRequestBody"'});const i=e.file_name;return{folderId:t,fileSize:r,fileName:i}},t.serializeCreateFileUploadSessionForExistingFileRequestBody=Q,t.deserializeCreateFileUploadSessionForExistingFileRequestBody=function(e){if(!(0,E.sdIsMap)(e))throw new _.BoxSdkError({message:'Expecting a map for "CreateFileUploadSessionForExistingFileRequestBody"'});if(null==e.file_size)throw new _.BoxSdkError({message:'Expecting "file_size" of type "CreateFileUploadSessionForExistingFileRequestBody" to be defined'});if(!(0,x.sdIsNumber)(e.file_size))throw new _.BoxSdkError({message:'Expecting number for "file_size" of type "CreateFileUploadSessionForExistingFileRequestBody"'});const t=e.file_size;if(null!=e.file_name&&!(0,S.sdIsString)(e.file_name))throw new _.BoxSdkError({message:'Expecting string for "file_name" of type "CreateFileUploadSessionForExistingFileRequestBody"'});const r=null==e.file_name?void 0:e.file_name;return{fileSize:t,fileName:r}},t.serializeCreateFileUploadSessionCommitByUrlRequestBody=function(e){return{parts:e.parts.map((function(e){return(0,l.serializeUploadPart)(e)}))}},t.deserializeCreateFileUploadSessionCommitByUrlRequestBody=function(e){if(!(0,E.sdIsMap)(e))throw new _.BoxSdkError({message:'Expecting a map for "CreateFileUploadSessionCommitByUrlRequestBody"'});if(null==e.parts)throw new _.BoxSdkError({message:'Expecting "parts" of type "CreateFileUploadSessionCommitByUrlRequestBody" to be defined'});if(!(0,k.sdIsList)(e.parts))throw new _.BoxSdkError({message:'Expecting array for "parts" of type "CreateFileUploadSessionCommitByUrlRequestBody"'});return{parts:(0,k.sdIsList)(e.parts)?e.parts.map((function(e){return(0,d.deserializeUploadPart)(e)})):[]}},t.serializeCreateFileUploadSessionCommitRequestBody=Z,t.deserializeCreateFileUploadSessionCommitRequestBody=function(e){if(!(0,E.sdIsMap)(e))throw new _.BoxSdkError({message:'Expecting a map for "CreateFileUploadSessionCommitRequestBody"'});if(null==e.parts)throw new _.BoxSdkError({message:'Expecting "parts" of type "CreateFileUploadSessionCommitRequestBody" to be defined'});if(!(0,k.sdIsList)(e.parts))throw new _.BoxSdkError({message:'Expecting array for "parts" of type "CreateFileUploadSessionCommitRequestBody"'});return{parts:(0,k.sdIsList)(e.parts)?e.parts.map((function(e){return(0,d.deserializeUploadPart)(e)})):[]}};const n=r(26391),o=r(31621),s=r(2001),a=r(379),l=r(3868),d=r(3868),c=r(31210),u=r(93845),p=r(93845),h=r(84143),f=r(93845),m=r(93845),g=r(93845),y=r(93845),v=r(93845),b=r(93845),w=r(93845),_=r(72631),x=r(50793),S=r(50793),k=r(50793),E=r(50793);class T{constructor(e){this.headers=new N({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileUploadSessionOptionals=T;class B{constructor(e){this.headers=new q({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileUploadSessionForExistingFileOptionals=B;class C{constructor(e){this.headers=new U({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileUploadSessionByUrlOptionals=C;class I{constructor(e){this.headers=new L({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileUploadSessionByIdOptionals=I;class A{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UploadFilePartByUrlOptionals=A;class F{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UploadFilePartOptionals=F;class M{constructor(e){this.headers=new $({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileUploadSessionByUrlOptionals=M;class D{constructor(e){this.headers=new G({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileUploadSessionByIdOptionals=D;class R{constructor(e){this.queryParams={},this.headers=new W({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileUploadSessionPartsByUrlOptionals=R;class P{constructor(e){this.queryParams={},this.headers=new K({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileUploadSessionPartsOptionals=P;class O{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileUploadSessionCommitByUrlOptionals=O;class z{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileUploadSessionCommitOptionals=z;class N{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileUploadSessionHeaders=N;class q{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileUploadSessionForExistingFileHeaders=q;class U{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileUploadSessionByUrlHeaders=U;class L{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileUploadSessionByIdHeaders=L;class j{constructor(e){this.extraHeaders={},e.digest&&(this.digest=e.digest),e.contentRange&&(this.contentRange=e.contentRange),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UploadFilePartByUrlHeaders=j;class H{constructor(e){this.extraHeaders={},e.digest&&(this.digest=e.digest),e.contentRange&&(this.contentRange=e.contentRange),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UploadFilePartHeaders=H;class ${constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileUploadSessionByUrlHeaders=$;class G{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileUploadSessionByIdHeaders=G;class W{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileUploadSessionPartsByUrlHeaders=W;class K{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileUploadSessionPartsHeaders=K;class V{constructor(e){this.extraHeaders={},e.digest&&(this.digest=e.digest),e.ifMatch&&(this.ifMatch=e.ifMatch),e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileUploadSessionCommitByUrlHeaders=V;class J{constructor(e){this.extraHeaders={},e.digest&&(this.digest=e.digest),e.ifMatch&&(this.ifMatch=e.ifMatch),e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileUploadSessionCommitHeaders=J;function Y(e){return{folder_id:e.folderId,file_size:e.fileSize,file_name:e.fileName}}function Q(e){return{file_size:e.fileSize,file_name:null==e.fileName?void 0:e.fileName}}function Z(e){return{parts:e.parts.map((function(e){return(0,l.serializeUploadPart)(e)}))}}t.ChunkedUploadsManager=class{constructor(e){this.networkSession=new c.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}createFileUploadSession(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new T({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions"),method:"POST",headers:s,data:Y(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeUploadSession)(a.data)),{rawData:a.data})}))}createFileUploadSessionForExistingFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new B({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,u.prepareParams)(Object.assign({},o.extraHeaders)),l=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/",(0,p.toString)(e),"/upload_sessions"),method:"POST",headers:a,data:Q(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeUploadSession)(l.data)),{rawData:l.data})}))}getFileUploadSessionByUrl(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new C({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:e,method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeUploadSession)(a.data)),{rawData:a.data})}))}getFileUploadSessionById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new I({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions/",(0,p.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeUploadSession)(a.data)),{rawData:a.data})}))}uploadFilePartByUrl(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new j({digest:r.digest,contentRange:r.contentRange,extraHeaders:r.extraHeaders}),s=new A({cancellationToken:i.cancellationToken}).cancellationToken,a=(0,u.prepareParams)(Object.assign({digest:(0,p.toString)(n.digest),"content-range":(0,p.toString)(n.contentRange)},n.extraHeaders)),l=yield(0,h.fetch)({url:e,method:"PUT",headers:a,fileStream:t,contentType:"application/octet-stream",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeUploadedPart)(l.data)),{rawData:l.data})}))}uploadFilePart(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new H({digest:r.digest,contentRange:r.contentRange,extraHeaders:r.extraHeaders}),s=new F({cancellationToken:i.cancellationToken}).cancellationToken,a=(0,u.prepareParams)(Object.assign({digest:(0,p.toString)(n.digest),"content-range":(0,p.toString)(n.contentRange)},n.extraHeaders)),l=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions/",(0,p.toString)(e)),method:"PUT",headers:a,fileStream:t,contentType:"application/octet-stream",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeUploadedPart)(l.data)),{rawData:l.data})}))}deleteFileUploadSessionByUrl(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new M({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,u.prepareParams)(Object.assign({},i.extraHeaders));yield(0,h.fetch)({url:e,method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}deleteFileUploadSessionById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new D({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,u.prepareParams)(Object.assign({},i.extraHeaders));yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions/",(0,p.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getFileUploadSessionPartsByUrl(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new R({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,a=(0,u.prepareParams)({offset:(0,p.toString)(i.offset),limit:(0,p.toString)(i.limit)}),l=(0,u.prepareParams)(Object.assign({},n.extraHeaders)),d=yield(0,h.fetch)({url:e,method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,s.deserializeUploadParts)(d.data)),{rawData:d.data})}))}getFileUploadSessionParts(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new P({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,a=(0,u.prepareParams)({offset:(0,p.toString)(i.offset),limit:(0,p.toString)(i.limit)}),l=(0,u.prepareParams)(Object.assign({},n.extraHeaders)),d=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions/",(0,p.toString)(e),"/parts"),method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,s.deserializeUploadParts)(d.data)),{rawData:d.data})}))}createFileUploadSessionCommitByUrl(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new V({digest:r.digest,ifMatch:r.ifMatch,ifNoneMatch:r.ifNoneMatch,extraHeaders:r.extraHeaders}),o=new O({cancellationToken:i.cancellationToken}).cancellationToken,s=(0,u.prepareParams)(Object.assign({digest:(0,p.toString)(n.digest),"if-match":(0,p.toString)(n.ifMatch),"if-none-match":(0,p.toString)(n.ifNoneMatch)},n.extraHeaders)),l=yield(0,h.fetch)({url:e,method:"POST",headers:s,data:Z(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,a.deserializeFiles)(l.data)),{rawData:l.data})}))}createFileUploadSessionCommit(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new J({digest:r.digest,ifMatch:r.ifMatch,ifNoneMatch:r.ifNoneMatch,extraHeaders:r.extraHeaders}),o=new z({cancellationToken:i.cancellationToken}).cancellationToken,s=(0,u.prepareParams)(Object.assign({digest:(0,p.toString)(n.digest),"if-match":(0,p.toString)(n.ifMatch),"if-none-match":(0,p.toString)(n.ifNoneMatch)},n.extraHeaders)),l=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/upload_sessions/",(0,p.toString)(e),"/commit"),method:"POST",headers:s,data:Z(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,a.deserializeFiles)(l.data)),{rawData:l.data})}))}reducer(e,t){return i(this,void 0,void 0,(function*(){const r=e.lastIndex,i=e.parts,n=yield(0,y.readByteStream)(t),o=new b.Hash({algorithm:"sha1"});o.updateHash(n);const s=yield o.digestHash("base64"),a="".concat("sha=",s),l=(0,w.bufferLength)(n),d=r+1,c=r+l,u="".concat("bytes ",(0,p.toString)(d),"-",(0,p.toString)(c),"/",(0,p.toString)(e.fileSize)),h=(yield this.uploadFilePartByUrl(e.uploadPartUrl,(0,f.generateByteStreamFromBuffer)(n),{digest:a,contentRange:u})).part;if((0,m.hexToBase64)(h.sha1)!=s)throw new Error("Assertion failed");if(h.size!=l)throw new Error("Assertion failed");if(h.offset!=d)throw new Error("Assertion failed");return e.fileHash.updateHash(n),{lastIndex:c,parts:i.concat([h]),fileSize:e.fileSize,uploadPartUrl:e.uploadPartUrl,fileHash:e.fileHash}}))}uploadBigFile(e,t,r,n,o){return i(this,void 0,void 0,(function*(){const i=yield this.createFileUploadSession({fileName:t,fileSize:r,folderId:n},{headers:new N({}),cancellationToken:o}),s=i.sessionEndpoints.uploadPart,a=i.sessionEndpoints.commit,l=i.sessionEndpoints.listParts,d=i.partSize,c=i.totalParts;if(!(d*c>=r))throw new Error("Assertion failed");if(0!=i.numPartsProcessed)throw new Error("Assertion failed");const u=new b.Hash({algorithm:"sha1"}),p=(0,g.iterateChunks)(e,d,r),h=(yield(0,v.reduceIterator)(p,this.reducer.bind(this),{lastIndex:-1,parts:[],fileSize:r,uploadPartUrl:s,fileHash:u})).parts;if((yield this.getFileUploadSessionPartsByUrl(l,{queryParams:{},headers:new W({}),cancellationToken:o})).totalCount!=c)throw new Error("Assertion failed");const f=yield u.digestHash("base64"),m="".concat("sha=",f);return(yield this.createFileUploadSessionCommitByUrl(a,{parts:h},{digest:m},{cancellationToken:o})).entries[0]}))}}},40463:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClassificationsManager=t.CreateClassificationTemplateHeaders=t.CreateClassificationTemplateRequestBody=t.CreateClassificationTemplateRequestBodyFieldsField=t.UpdateClassificationHeaders=t.UpdateClassificationRequestBody=t.AddClassificationHeaders=t.AddClassificationRequestBody=t.GetClassificationTemplateHeaders=t.CreateClassificationTemplateOptionals=t.UpdateClassificationOptionals=t.AddClassificationOptionals=void 0,t.serializeAddClassificationRequestBodyOpField=x,t.deserializeAddClassificationRequestBodyOpField=S,t.serializeAddClassificationRequestBodyFieldKeyField=k,t.deserializeAddClassificationRequestBodyFieldKeyField=E,t.serializeAddClassificationRequestBodyDataStaticConfigClassificationField=T,t.deserializeAddClassificationRequestBodyDataStaticConfigClassificationField=B,t.serializeAddClassificationRequestBodyDataStaticConfigField=C,t.deserializeAddClassificationRequestBodyDataStaticConfigField=I,t.serializeAddClassificationRequestBodyDataField=A,t.deserializeAddClassificationRequestBodyDataField=F,t.serializeAddClassificationRequestBody=M,t.deserializeAddClassificationRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "AddClassificationRequestBody"'});if(null==e.op)throw new l.BoxSdkError({message:'Expecting "op" of type "AddClassificationRequestBody" to be defined'});const t=S(e.op);if(null==e.fieldKey)throw new l.BoxSdkError({message:'Expecting "fieldKey" of type "AddClassificationRequestBody" to be defined'});const r=E(e.fieldKey);if(null==e.data)throw new l.BoxSdkError({message:'Expecting "data" of type "AddClassificationRequestBody" to be defined'});const i=F(e.data);return{op:t,fieldKey:r,data:i}},t.serializeAddClassificationRequestBodyInput=function(e){return{op:null==e.op?void 0:e.op,fieldKey:null==e.fieldKey?void 0:e.fieldKey,data:A(e.data)}},t.deserializeAddClassificationRequestBodyInput=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "AddClassificationRequestBodyInput"'});const t=null==e.op?void 0:S(e.op),r=null==e.fieldKey?void 0:E(e.fieldKey);if(null==e.data)throw new l.BoxSdkError({message:'Expecting "data" of type "AddClassificationRequestBodyInput" to be defined'});const i=F(e.data);return{op:t,fieldKey:r,data:i}},t.serializeUpdateClassificationRequestBodyOpField=D,t.deserializeUpdateClassificationRequestBodyOpField=R,t.serializeUpdateClassificationRequestBodyFieldKeyField=P,t.deserializeUpdateClassificationRequestBodyFieldKeyField=O,t.serializeUpdateClassificationRequestBodyDataStaticConfigClassificationField=z,t.deserializeUpdateClassificationRequestBodyDataStaticConfigClassificationField=N,t.serializeUpdateClassificationRequestBodyDataStaticConfigField=q,t.deserializeUpdateClassificationRequestBodyDataStaticConfigField=U,t.serializeUpdateClassificationRequestBodyDataField=L,t.deserializeUpdateClassificationRequestBodyDataField=j,t.serializeUpdateClassificationRequestBody=H,t.deserializeUpdateClassificationRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UpdateClassificationRequestBody"'});if(null==e.op)throw new l.BoxSdkError({message:'Expecting "op" of type "UpdateClassificationRequestBody" to be defined'});const t=R(e.op);if(null==e.fieldKey)throw new l.BoxSdkError({message:'Expecting "fieldKey" of type "UpdateClassificationRequestBody" to be defined'});const r=O(e.fieldKey);if(null==e.enumOptionKey)throw new l.BoxSdkError({message:'Expecting "enumOptionKey" of type "UpdateClassificationRequestBody" to be defined'});if(!(0,u.sdIsString)(e.enumOptionKey))throw new l.BoxSdkError({message:'Expecting string for "enumOptionKey" of type "UpdateClassificationRequestBody"'});const i=e.enumOptionKey;if(null==e.data)throw new l.BoxSdkError({message:'Expecting "data" of type "UpdateClassificationRequestBody" to be defined'});const n=j(e.data);return{op:t,fieldKey:r,enumOptionKey:i,data:n}},t.serializeUpdateClassificationRequestBodyInput=function(e){return{op:null==e.op?void 0:e.op,fieldKey:null==e.fieldKey?void 0:e.fieldKey,enumOptionKey:e.enumOptionKey,data:L(e.data)}},t.deserializeUpdateClassificationRequestBodyInput=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UpdateClassificationRequestBodyInput"'});const t=null==e.op?void 0:R(e.op),r=null==e.fieldKey?void 0:O(e.fieldKey);if(null==e.enumOptionKey)throw new l.BoxSdkError({message:'Expecting "enumOptionKey" of type "UpdateClassificationRequestBodyInput" to be defined'});if(!(0,u.sdIsString)(e.enumOptionKey))throw new l.BoxSdkError({message:'Expecting string for "enumOptionKey" of type "UpdateClassificationRequestBodyInput"'});const i=e.enumOptionKey;if(null==e.data)throw new l.BoxSdkError({message:'Expecting "data" of type "UpdateClassificationRequestBodyInput" to be defined'});const n=j(e.data);return{op:t,fieldKey:r,enumOptionKey:i,data:n}},t.serializeCreateClassificationTemplateRequestBodyScopeField=$,t.deserializeCreateClassificationTemplateRequestBodyScopeField=G,t.serializeCreateClassificationTemplateRequestBodyTemplateKeyField=W,t.deserializeCreateClassificationTemplateRequestBodyTemplateKeyField=K,t.serializeCreateClassificationTemplateRequestBodyDisplayNameField=V,t.deserializeCreateClassificationTemplateRequestBodyDisplayNameField=J,t.serializeCreateClassificationTemplateRequestBodyFieldsTypeField=Y,t.deserializeCreateClassificationTemplateRequestBodyFieldsTypeField=Q,t.serializeCreateClassificationTemplateRequestBodyFieldsKeyField=Z,t.deserializeCreateClassificationTemplateRequestBodyFieldsKeyField=X,t.serializeCreateClassificationTemplateRequestBodyFieldsDisplayNameField=ee,t.deserializeCreateClassificationTemplateRequestBodyFieldsDisplayNameField=te,t.serializeCreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigClassificationField=re,t.deserializeCreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigClassificationField=ie,t.serializeCreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigField=ne,t.deserializeCreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigField=oe,t.serializeCreateClassificationTemplateRequestBodyFieldsOptionsField=se,t.deserializeCreateClassificationTemplateRequestBodyFieldsOptionsField=ae,t.serializeCreateClassificationTemplateRequestBodyFieldsField=le,t.deserializeCreateClassificationTemplateRequestBodyFieldsField=de,t.serializeCreateClassificationTemplateRequestBodyFieldsFieldInput=function(e){return{type:null==e.type?void 0:e.type,key:null==e.key?void 0:e.key,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,options:e.options.map((function(e){return se(e)}))}},t.deserializeCreateClassificationTemplateRequestBodyFieldsFieldInput=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyFieldsFieldInput"'});const t=null==e.type?void 0:Q(e.type),r=null==e.key?void 0:X(e.key),i=null==e.displayName?void 0:te(e.displayName);if(null!=e.hidden&&!(0,d.sdIsBoolean)(e.hidden))throw new l.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateClassificationTemplateRequestBodyFieldsFieldInput"'});const n=null==e.hidden?void 0:e.hidden;if(null==e.options)throw new l.BoxSdkError({message:'Expecting "options" of type "CreateClassificationTemplateRequestBodyFieldsFieldInput" to be defined'});if(!(0,p.sdIsList)(e.options))throw new l.BoxSdkError({message:'Expecting array for "options" of type "CreateClassificationTemplateRequestBodyFieldsFieldInput"'});const o=(0,p.sdIsList)(e.options)?e.options.map((function(e){return ae(e)})):[];return{type:t,key:r,displayName:i,hidden:n,options:o}},t.serializeCreateClassificationTemplateRequestBody=ce,t.deserializeCreateClassificationTemplateRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBody"'});if(null==e.scope)throw new l.BoxSdkError({message:'Expecting "scope" of type "CreateClassificationTemplateRequestBody" to be defined'});const t=G(e.scope);if(null==e.templateKey)throw new l.BoxSdkError({message:'Expecting "templateKey" of type "CreateClassificationTemplateRequestBody" to be defined'});const r=K(e.templateKey);if(null==e.displayName)throw new l.BoxSdkError({message:'Expecting "displayName" of type "CreateClassificationTemplateRequestBody" to be defined'});const i=J(e.displayName);if(null!=e.hidden&&!(0,d.sdIsBoolean)(e.hidden))throw new l.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateClassificationTemplateRequestBody"'});const n=null==e.hidden?void 0:e.hidden;if(null!=e.copyInstanceOnItemCopy&&!(0,d.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new l.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "CreateClassificationTemplateRequestBody"'});const o=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;if(null==e.fields)throw new l.BoxSdkError({message:'Expecting "fields" of type "CreateClassificationTemplateRequestBody" to be defined'});if(!(0,p.sdIsList)(e.fields))throw new l.BoxSdkError({message:'Expecting array for "fields" of type "CreateClassificationTemplateRequestBody"'});const s=(0,p.sdIsList)(e.fields)?e.fields.map((function(e){return de(e)})):[];return{scope:t,templateKey:r,displayName:i,hidden:n,copyInstanceOnItemCopy:o,fields:s}},t.serializeCreateClassificationTemplateRequestBodyInput=function(e){return{scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy,fields:e.fields.map((function(e){return le(e)}))}},t.deserializeCreateClassificationTemplateRequestBodyInput=function(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyInput"'});const t=null==e.scope?void 0:G(e.scope),r=null==e.templateKey?void 0:K(e.templateKey),i=null==e.displayName?void 0:J(e.displayName);if(null!=e.hidden&&!(0,d.sdIsBoolean)(e.hidden))throw new l.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateClassificationTemplateRequestBodyInput"'});const n=null==e.hidden?void 0:e.hidden;if(null!=e.copyInstanceOnItemCopy&&!(0,d.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new l.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "CreateClassificationTemplateRequestBodyInput"'});const o=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;if(null==e.fields)throw new l.BoxSdkError({message:'Expecting "fields" of type "CreateClassificationTemplateRequestBodyInput" to be defined'});if(!(0,p.sdIsList)(e.fields))throw new l.BoxSdkError({message:'Expecting array for "fields" of type "CreateClassificationTemplateRequestBodyInput"'});const s=(0,p.sdIsList)(e.fields)?e.fields.map((function(e){return de(e)})):[];return{scope:t,templateKey:r,displayName:i,hidden:n,copyInstanceOnItemCopy:o,fields:s}};const n=r(73146),o=r(31210),s=r(93845),a=r(84143),l=r(72631),d=r(50793),c=r(50793),u=r(50793),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddClassificationOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateClassificationOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateClassificationTemplateOptionals=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetClassificationTemplateHeaders=y;t.AddClassificationRequestBody=class{constructor(e){this.op="addEnumOption",this.fieldKey="Box__Security__Classification__Key",e.op&&(this.op=e.op),e.fieldKey&&(this.fieldKey=e.fieldKey),e.data&&(this.data=e.data),e.rawData&&(this.rawData=e.rawData)}};class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddClassificationHeaders=v;t.UpdateClassificationRequestBody=class{constructor(e){this.op="editEnumOption",this.fieldKey="Box__Security__Classification__Key",e.op&&(this.op=e.op),e.fieldKey&&(this.fieldKey=e.fieldKey),e.enumOptionKey&&(this.enumOptionKey=e.enumOptionKey),e.data&&(this.data=e.data),e.rawData&&(this.rawData=e.rawData)}};class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateClassificationHeaders=b;t.CreateClassificationTemplateRequestBodyFieldsField=class{constructor(e){this.type="enum",this.key="Box__Security__Classification__Key",this.displayName="Classification",e.type&&(this.type=e.type),e.key&&(this.key=e.key),e.displayName&&(this.displayName=e.displayName),e.hidden&&(this.hidden=e.hidden),e.options&&(this.options=e.options),e.rawData&&(this.rawData=e.rawData)}};class w{constructor(e){this.scope="enterprise",this.templateKey="securityClassification-6VMVochwUWo",this.displayName="Classification",e.scope&&(this.scope=e.scope),e.templateKey&&(this.templateKey=e.templateKey),e.displayName&&(this.displayName=e.displayName),e.hidden&&(this.hidden=e.hidden),e.copyInstanceOnItemCopy&&(this.copyInstanceOnItemCopy=e.copyInstanceOnItemCopy),e.fields&&(this.fields=e.fields),e.rawData&&(this.rawData=e.rawData)}}t.CreateClassificationTemplateRequestBody=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateClassificationTemplateHeaders=_;function x(e){return e}function S(e){if("addEnumOption"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize AddClassificationRequestBodyOpField"})}function k(e){return e}function E(e){if("Box__Security__Classification__Key"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize AddClassificationRequestBodyFieldKeyField"})}function T(e){return{classificationDefinition:null==e.classificationDefinition?void 0:e.classificationDefinition,colorID:null==e.colorId?void 0:e.colorId}}function B(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "AddClassificationRequestBodyDataStaticConfigClassificationField"'});if(null!=e.classificationDefinition&&!(0,u.sdIsString)(e.classificationDefinition))throw new l.BoxSdkError({message:'Expecting string for "classificationDefinition" of type "AddClassificationRequestBodyDataStaticConfigClassificationField"'});const t=null==e.classificationDefinition?void 0:e.classificationDefinition;if(null!=e.colorID&&!(0,c.sdIsNumber)(e.colorID))throw new l.BoxSdkError({message:'Expecting number for "colorID" of type "AddClassificationRequestBodyDataStaticConfigClassificationField"'});return{classificationDefinition:t,colorId:null==e.colorID?void 0:e.colorID}}function C(e){return{classification:null==e.classification?void 0:T(e.classification)}}function I(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "AddClassificationRequestBodyDataStaticConfigField"'});return{classification:null==e.classification?void 0:B(e.classification)}}function A(e){return{key:e.key,staticConfig:null==e.staticConfig?void 0:C(e.staticConfig)}}function F(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "AddClassificationRequestBodyDataField"'});if(null==e.key)throw new l.BoxSdkError({message:'Expecting "key" of type "AddClassificationRequestBodyDataField" to be defined'});if(!(0,u.sdIsString)(e.key))throw new l.BoxSdkError({message:'Expecting string for "key" of type "AddClassificationRequestBodyDataField"'});return{key:e.key,staticConfig:null==e.staticConfig?void 0:I(e.staticConfig)}}function M(e){return{op:e.op,fieldKey:e.fieldKey,data:A(e.data)}}function D(e){return e}function R(e){if("editEnumOption"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize UpdateClassificationRequestBodyOpField"})}function P(e){return e}function O(e){if("Box__Security__Classification__Key"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize UpdateClassificationRequestBodyFieldKeyField"})}function z(e){return{classificationDefinition:null==e.classificationDefinition?void 0:e.classificationDefinition,colorID:null==e.colorId?void 0:e.colorId}}function N(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UpdateClassificationRequestBodyDataStaticConfigClassificationField"'});if(null!=e.classificationDefinition&&!(0,u.sdIsString)(e.classificationDefinition))throw new l.BoxSdkError({message:'Expecting string for "classificationDefinition" of type "UpdateClassificationRequestBodyDataStaticConfigClassificationField"'});const t=null==e.classificationDefinition?void 0:e.classificationDefinition;if(null!=e.colorID&&!(0,c.sdIsNumber)(e.colorID))throw new l.BoxSdkError({message:'Expecting number for "colorID" of type "UpdateClassificationRequestBodyDataStaticConfigClassificationField"'});return{classificationDefinition:t,colorId:null==e.colorID?void 0:e.colorID}}function q(e){return{classification:null==e.classification?void 0:z(e.classification)}}function U(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UpdateClassificationRequestBodyDataStaticConfigField"'});return{classification:null==e.classification?void 0:N(e.classification)}}function L(e){return{key:e.key,staticConfig:null==e.staticConfig?void 0:q(e.staticConfig)}}function j(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UpdateClassificationRequestBodyDataField"'});if(null==e.key)throw new l.BoxSdkError({message:'Expecting "key" of type "UpdateClassificationRequestBodyDataField" to be defined'});if(!(0,u.sdIsString)(e.key))throw new l.BoxSdkError({message:'Expecting string for "key" of type "UpdateClassificationRequestBodyDataField"'});return{key:e.key,staticConfig:null==e.staticConfig?void 0:U(e.staticConfig)}}function H(e){return{op:e.op,fieldKey:e.fieldKey,enumOptionKey:e.enumOptionKey,data:L(e.data)}}function $(e){return e}function G(e){if("enterprise"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyScopeField"})}function W(e){return e}function K(e){if("securityClassification-6VMVochwUWo"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyTemplateKeyField"})}function V(e){return e}function J(e){if("Classification"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyDisplayNameField"})}function Y(e){return e}function Q(e){if("enum"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyFieldsTypeField"})}function Z(e){return e}function X(e){if("Box__Security__Classification__Key"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyFieldsKeyField"})}function ee(e){return e}function te(e){if("Classification"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize CreateClassificationTemplateRequestBodyFieldsDisplayNameField"})}function re(e){return{classificationDefinition:null==e.classificationDefinition?void 0:e.classificationDefinition,colorID:null==e.colorId?void 0:e.colorId}}function ie(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigClassificationField"'});if(null!=e.classificationDefinition&&!(0,u.sdIsString)(e.classificationDefinition))throw new l.BoxSdkError({message:'Expecting string for "classificationDefinition" of type "CreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigClassificationField"'});const t=null==e.classificationDefinition?void 0:e.classificationDefinition;if(null!=e.colorID&&!(0,c.sdIsNumber)(e.colorID))throw new l.BoxSdkError({message:'Expecting number for "colorID" of type "CreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigClassificationField"'});return{classificationDefinition:t,colorId:null==e.colorID?void 0:e.colorID}}function ne(e){return{classification:null==e.classification?void 0:re(e.classification)}}function oe(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyFieldsOptionsStaticConfigField"'});return{classification:null==e.classification?void 0:ie(e.classification)}}function se(e){return{key:e.key,staticConfig:null==e.staticConfig?void 0:ne(e.staticConfig)}}function ae(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyFieldsOptionsField"'});if(null==e.key)throw new l.BoxSdkError({message:'Expecting "key" of type "CreateClassificationTemplateRequestBodyFieldsOptionsField" to be defined'});if(!(0,u.sdIsString)(e.key))throw new l.BoxSdkError({message:'Expecting string for "key" of type "CreateClassificationTemplateRequestBodyFieldsOptionsField"'});return{key:e.key,staticConfig:null==e.staticConfig?void 0:oe(e.staticConfig)}}function le(e){return{type:e.type,key:e.key,displayName:e.displayName,hidden:null==e.hidden?void 0:e.hidden,options:e.options.map((function(e){return se(e)}))}}function de(e){if(!(0,h.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CreateClassificationTemplateRequestBodyFieldsField"'});if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "CreateClassificationTemplateRequestBodyFieldsField" to be defined'});const t=Q(e.type);if(null==e.key)throw new l.BoxSdkError({message:'Expecting "key" of type "CreateClassificationTemplateRequestBodyFieldsField" to be defined'});const r=X(e.key);if(null==e.displayName)throw new l.BoxSdkError({message:'Expecting "displayName" of type "CreateClassificationTemplateRequestBodyFieldsField" to be defined'});const i=te(e.displayName);if(null!=e.hidden&&!(0,d.sdIsBoolean)(e.hidden))throw new l.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateClassificationTemplateRequestBodyFieldsField"'});const n=null==e.hidden?void 0:e.hidden;if(null==e.options)throw new l.BoxSdkError({message:'Expecting "options" of type "CreateClassificationTemplateRequestBodyFieldsField" to be defined'});if(!(0,p.sdIsList)(e.options))throw new l.BoxSdkError({message:'Expecting array for "options" of type "CreateClassificationTemplateRequestBodyFieldsField"'});return{type:t,key:r,displayName:i,hidden:n,options:(0,p.sdIsList)(e.options)?e.options.map((function(e){return ae(e)})):[]}}function ce(e){return{scope:e.scope,templateKey:e.templateKey,displayName:e.displayName,hidden:null==e.hidden?void 0:e.hidden,copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy,fields:e.fields.map((function(e){return le(e)}))}}t.ClassificationsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getClassificationTemplate(){return i(this,arguments,void 0,(function*(e=new y({}),t){const r=new y({extraHeaders:e.extraHeaders}),i=(0,s.prepareParams)(Object.assign({},r.extraHeaders)),o=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema"),method:"GET",headers:i,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:t});return Object.assign(Object.assign({},(0,n.deserializeClassificationTemplate)(o.data)),{rawData:o.data})}))}addClassification(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,l=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema#add"),method:"PUT",headers:l,data:e.map(M),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeClassificationTemplate)(d.data)),{rawData:d.data})}))}updateClassification(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,l=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema#update"),method:"PUT",headers:l,data:e.map(H),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeClassificationTemplate)(d.data)),{rawData:d.data})}))}createClassificationTemplate(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({scope:e.scope,templateKey:e.templateKey,displayName:e.displayName,hidden:e.hidden,copyInstanceOnItemCopy:e.copyInstanceOnItemCopy,fields:e.fields}),i=new g({headers:t.headers,cancellationToken:t.cancellationToken}),o=i.headers,l=i.cancellationToken,d=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),c=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/schema#classifications"),method:"POST",headers:d,data:ce(r),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:l});return Object.assign(Object.assign({},(0,n.deserializeClassificationTemplate)(c.data)),{rawData:c.data})}))}}},86008:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollaborationAllowlistEntriesManager=t.DeleteCollaborationWhitelistEntryByIdHeaders=t.GetCollaborationWhitelistEntryByIdHeaders=t.CreateCollaborationWhitelistEntryHeaders=t.GetCollaborationWhitelistEntriesHeaders=t.DeleteCollaborationWhitelistEntryByIdOptionals=t.GetCollaborationWhitelistEntryByIdOptionals=t.CreateCollaborationWhitelistEntryOptionals=void 0,t.serializeCreateCollaborationWhitelistEntryRequestBodyDirectionField=w,t.deserializeCreateCollaborationWhitelistEntryRequestBodyDirectionField=_,t.serializeCreateCollaborationWhitelistEntryRequestBody=x,t.deserializeCreateCollaborationWhitelistEntryRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateCollaborationWhitelistEntryRequestBody"'});if(null==e.domain)throw new c.BoxSdkError({message:'Expecting "domain" of type "CreateCollaborationWhitelistEntryRequestBody" to be defined'});if(!(0,u.sdIsString)(e.domain))throw new c.BoxSdkError({message:'Expecting string for "domain" of type "CreateCollaborationWhitelistEntryRequestBody"'});const t=e.domain;if(null==e.direction)throw new c.BoxSdkError({message:'Expecting "direction" of type "CreateCollaborationWhitelistEntryRequestBody" to be defined'});const r=_(e.direction);return{domain:t,direction:r}};const n=r(36958),o=r(66774),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateCollaborationWhitelistEntryOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCollaborationWhitelistEntryByIdOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteCollaborationWhitelistEntryByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationWhitelistEntriesHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateCollaborationWhitelistEntryHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationWhitelistEntryByIdHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteCollaborationWhitelistEntryByIdHeaders=b;function w(e){return e}function _(e){if("inbound"==e)return e;if("outbound"==e)return e;if("both"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateCollaborationWhitelistEntryRequestBodyDirectionField"})}function x(e){return{domain:e.domain,direction:e.direction}}t.CollaborationAllowlistEntriesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getCollaborationWhitelistEntries(){return i(this,arguments,void 0,(function*(e={},t=new g({}),r){const i=new g({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_entries"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeCollaborationAllowlistEntries)(c.data)),{rawData:c.data})}))}createCollaborationWhitelistEntry(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_entries"),method:"POST",headers:s,data:x(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeCollaborationAllowlistEntry)(l.data)),{rawData:l.data})}))}getCollaborationWhitelistEntryById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_entries/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeCollaborationAllowlistEntry)(c.data)),{rawData:c.data})}))}deleteCollaborationWhitelistEntryById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_entries/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},99871:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollaborationAllowlistExemptTargetsManager=t.DeleteCollaborationWhitelistExemptTargetByIdHeaders=t.GetCollaborationWhitelistExemptTargetByIdHeaders=t.CreateCollaborationWhitelistExemptTargetHeaders=t.GetCollaborationWhitelistExemptTargetsHeaders=t.DeleteCollaborationWhitelistExemptTargetByIdOptionals=t.GetCollaborationWhitelistExemptTargetByIdOptionals=t.CreateCollaborationWhitelistExemptTargetOptionals=void 0,t.serializeCreateCollaborationWhitelistExemptTargetRequestBodyUserField=w,t.deserializeCreateCollaborationWhitelistExemptTargetRequestBodyUserField=_,t.serializeCreateCollaborationWhitelistExemptTargetRequestBody=x,t.deserializeCreateCollaborationWhitelistExemptTargetRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateCollaborationWhitelistExemptTargetRequestBody"'});if(null==e.user)throw new c.BoxSdkError({message:'Expecting "user" of type "CreateCollaborationWhitelistExemptTargetRequestBody" to be defined'});return{user:_(e.user)}};const n=r(38333),o=r(92720),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateCollaborationWhitelistExemptTargetOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCollaborationWhitelistExemptTargetByIdOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteCollaborationWhitelistExemptTargetByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationWhitelistExemptTargetsHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateCollaborationWhitelistExemptTargetHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationWhitelistExemptTargetByIdHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteCollaborationWhitelistExemptTargetByIdHeaders=b;function w(e){return{id:e.id}}function _(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateCollaborationWhitelistExemptTargetRequestBodyUserField"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateCollaborationWhitelistExemptTargetRequestBodyUserField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateCollaborationWhitelistExemptTargetRequestBodyUserField"'});return{id:e.id}}function x(e){return{user:w(e.user)}}t.CollaborationAllowlistExemptTargetsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getCollaborationWhitelistExemptTargets(){return i(this,arguments,void 0,(function*(e={},t=new g({}),r){const i=new g({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_exempt_targets"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeCollaborationAllowlistExemptTargets)(c.data)),{rawData:c.data})}))}createCollaborationWhitelistExemptTarget(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_exempt_targets"),method:"POST",headers:s,data:x(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeCollaborationAllowlistExemptTarget)(l.data)),{rawData:l.data})}))}getCollaborationWhitelistExemptTargetById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_exempt_targets/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeCollaborationAllowlistExemptTarget)(c.data)),{rawData:c.data})}))}deleteCollaborationWhitelistExemptTargetById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaboration_whitelist_exempt_targets/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},98355:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsManager=t.GetCollectionItemsHeaders=t.GetCollectionsHeaders=t.GetCollectionItemsOptionals=void 0;const n=r(6421),o=r(61664),s=r(31210),a=r(93845),l=r(93845),d=r(84143);class c{constructor(e){this.queryParams={},this.headers=new p({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCollectionItemsOptionals=c;class u{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollectionsHeaders=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollectionItemsHeaders=p;t.CollectionsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getCollections(){return i(this,arguments,void 0,(function*(e={},t=new u({}),r){const i=new u({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({fields:e.fields?e.fields.map(l.toString).join(","):void 0,offset:(0,l.toString)(e.offset),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collections"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeCollections)(c.data)),{rawData:c.data})}))}getCollectionItems(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,u=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0,offset:(0,l.toString)(i.offset),limit:(0,l.toString)(i.limit)}),p=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collections/",(0,l.toString)(e),"/items"),method:"GET",params:u,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeItems)(h.data)),{rawData:h.data})}))}}},78812:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsManager=t.CreateCommentHeaders=t.DeleteCommentByIdHeaders=t.UpdateCommentByIdHeaders=t.GetCommentByIdHeaders=t.GetFileCommentsHeaders=t.CreateCommentOptionals=t.DeleteCommentByIdOptionals=t.UpdateCommentByIdOptionals=t.GetCommentByIdOptionals=t.GetFileCommentsOptionals=void 0,t.serializeUpdateCommentByIdRequestBody=S,t.deserializeUpdateCommentByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateCommentByIdRequestBody"'});if(null!=e.message&&!(0,u.sdIsString)(e.message))throw new c.BoxSdkError({message:'Expecting string for "message" of type "UpdateCommentByIdRequestBody"'});return{message:null==e.message?void 0:e.message}},t.serializeCreateCommentRequestBodyItemTypeField=k,t.deserializeCreateCommentRequestBodyItemTypeField=E,t.serializeCreateCommentRequestBodyItemField=T,t.deserializeCreateCommentRequestBodyItemField=B,t.serializeCreateCommentRequestBody=C,t.deserializeCreateCommentRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateCommentRequestBody"'});if(null==e.message)throw new c.BoxSdkError({message:'Expecting "message" of type "CreateCommentRequestBody" to be defined'});if(!(0,u.sdIsString)(e.message))throw new c.BoxSdkError({message:'Expecting string for "message" of type "CreateCommentRequestBody"'});const t=e.message;if(null!=e.tagged_message&&!(0,u.sdIsString)(e.tagged_message))throw new c.BoxSdkError({message:'Expecting string for "tagged_message" of type "CreateCommentRequestBody"'});const r=null==e.tagged_message?void 0:e.tagged_message;if(null==e.item)throw new c.BoxSdkError({message:'Expecting "item" of type "CreateCommentRequestBody" to be defined'});const i=B(e.item);return{message:t,taggedMessage:r,item:i}};const n=r(2346),o=r(83496),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.queryParams={},this.headers=new v({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileCommentsOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new b({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCommentByIdOptionals=f;class m{constructor(e){this.requestBody={},this.queryParams={},this.headers=new w({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateCommentByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteCommentByIdOptionals=g;class y{constructor(e){this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateCommentOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileCommentsHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCommentByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateCommentByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteCommentByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateCommentHeaders=x;function S(e){return{message:null==e.message?void 0:e.message}}function k(e){return e}function E(e){if("file"==e)return e;if("comment"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateCommentRequestBodyItemTypeField"})}function T(e){return{id:e.id,type:e.type}}function B(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateCommentRequestBodyItemField"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateCommentRequestBodyItemField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateCommentRequestBodyItemField"'});const t=e.id;if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateCommentRequestBodyItemField" to be defined'});return{id:t,type:E(e.type)}}function C(e){return{message:e.message,tagged_message:null==e.taggedMessage?void 0:e.taggedMessage,item:T(e.item)}}t.CommentsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileComments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0,limit:(0,l.toString)(i.limit),offset:(0,l.toString)(i.offset)}),u=(0,a.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/comments"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeComments)(p.data)),{rawData:p.data})}))}getCommentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/comments/",(0,l.toString)(e)),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeCommentFull)(p.data)),{rawData:p.data})}))}updateCommentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:n.fields?n.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/comments/",(0,l.toString)(e)),method:"PUT",params:u,headers:p,data:S(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeCommentFull)(h.data)),{rawData:h.data})}))}deleteCommentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/comments/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}createComment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/comments"),method:"POST",params:c,headers:u,data:C(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeCommentFull)(p.data)),{rawData:p.data})}))}}},72865:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicePinnersManager=t.GetEnterpriseDevicePinnersHeaders=t.DeleteDevicePinnerByIdHeaders=t.GetDevicePinnerByIdHeaders=t.GetEnterpriseDevicePinnersOptionals=t.DeleteDevicePinnerByIdOptionals=t.GetDevicePinnerByIdOptionals=void 0,t.serializeGetEnterpriseDevicePinnersQueryParamsDirectionField=function(e){return e},t.deserializeGetEnterpriseDevicePinnersQueryParamsDirectionField=function(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetEnterpriseDevicePinnersQueryParamsDirectionField"})};const n=r(1294),o=r(10931),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631);class u{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetDevicePinnerByIdOptionals=u;class p{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteDevicePinnerByIdOptionals=p;class h{constructor(e){this.queryParams={},this.headers=new g({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetEnterpriseDevicePinnersOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetDevicePinnerByIdHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteDevicePinnerByIdHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetEnterpriseDevicePinnersHeaders=g;t.DevicePinnersManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getDevicePinnerById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/device_pinners/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeDevicePinner)(c.data)),{rawData:c.data})}))}deleteDevicePinnerById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/device_pinners/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getEnterpriseDevicePinners(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({marker:(0,l.toString)(i.marker),limit:(0,l.toString)(i.limit),direction:(0,l.toString)(i.direction)}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/enterprises/",(0,l.toString)(e),"/device_pinners"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeDevicePinners)(p.data)),{rawData:p.data})}))}}},82083:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadsManager=t.DownloadFileHeaders=t.DownloadFileOptionals=void 0;const n=r(31210),o=r(93845),s=r(93845),a=r(84143);class l{constructor(e){this.queryParams={},this.headers=new d({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DownloadFileOptionals=l;class d{constructor(e){this.extraHeaders={},e.range&&(this.range=e.range),e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DownloadFileHeaders=d;t.DownloadsManager=class{constructor(e){this.networkSession=new n.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}downloadFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new l({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,d=r.cancellationToken,c=(0,o.prepareParams)({version:(0,s.toString)(i.version),access_token:(0,s.toString)(i.accessToken)}),u=(0,o.prepareParams)(Object.assign({range:(0,s.toString)(n.range),boxapi:(0,s.toString)(n.boxapi)},n.extraHeaders));return(yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,s.toString)(e),"/content"),method:"GET",params:c,headers:u,responseFormat:"binary",auth:this.auth,networkSession:this.networkSession,cancellationToken:d})).content}))}}},16822:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailAliasesManager=t.DeleteUserEmailAliasByIdHeaders=t.CreateUserEmailAliasHeaders=t.GetUserEmailAliasesHeaders=t.DeleteUserEmailAliasByIdOptionals=t.CreateUserEmailAliasOptionals=t.GetUserEmailAliasesOptionals=void 0,t.serializeCreateUserEmailAliasRequestBody=b,t.deserializeCreateUserEmailAliasRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateUserEmailAliasRequestBody"'});if(null==e.email)throw new c.BoxSdkError({message:'Expecting "email" of type "CreateUserEmailAliasRequestBody" to be defined'});if(!(0,u.sdIsString)(e.email))throw new c.BoxSdkError({message:'Expecting string for "email" of type "CreateUserEmailAliasRequestBody"'});return{email:e.email}};const n=r(50756),o=r(99152),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetUserEmailAliasesOptionals=h;class f{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateUserEmailAliasOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteUserEmailAliasByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUserEmailAliasesHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateUserEmailAliasHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteUserEmailAliasByIdHeaders=v;function b(e){return{email:e.email}}t.EmailAliasesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getUserEmailAliases(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,l.toString)(e),"/email_aliases"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeEmailAliases)(c.data)),{rawData:c.data})}))}createUserEmailAlias(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new f({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,s=i.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,l.toString)(e),"/email_aliases"),method:"POST",headers:c,data:b(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeEmailAlias)(u.data)),{rawData:u.data})}))}deleteUserEmailAliasById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new m({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,a.prepareParams)(Object.assign({},n.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,l.toString)(e),"/email_aliases/",(0,l.toString)(t)),method:"DELETE",headers:s,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}}},31591:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=t.GetEventsHeaders=t.GetEventsWithLongPollingHeaders=void 0,t.serializeGetEventsQueryParamsStreamTypeField=function(e){return e},t.deserializeGetEventsQueryParamsStreamTypeField=function(e){if("all"==e)return e;if("changes"==e)return e;if("sync"==e)return e;if("admin_logs"==e)return e;if("admin_logs_streaming"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize GetEventsQueryParamsStreamTypeField"})},t.serializeGetEventsQueryParamsEventTypeField=function(e){return e},t.deserializeGetEventsQueryParamsEventTypeField=function(e){if("ACCESS_GRANTED"==e)return e;if("ACCESS_REVOKED"==e)return e;if("ADD_DEVICE_ASSOCIATION"==e)return e;if("ADD_LOGIN_ACTIVITY_DEVICE"==e)return e;if("ADMIN_LOGIN"==e)return e;if("APPLICATION_CREATED"==e)return e;if("APPLICATION_PUBLIC_KEY_ADDED"==e)return e;if("APPLICATION_PUBLIC_KEY_DELETED"==e)return e;if("CHANGE_ADMIN_ROLE"==e)return e;if("CHANGE_FOLDER_PERMISSION"==e)return e;if("COLLABORATION_ACCEPT"==e)return e;if("COLLABORATION_EXPIRATION"==e)return e;if("COLLABORATION_INVITE"==e)return e;if("COLLABORATION_REMOVE"==e)return e;if("COLLABORATION_ROLE_CHANGE"==e)return e;if("COMMENT_CREATE"==e)return e;if("COMMENT_DELETE"==e)return e;if("CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY"==e)return e;if("CONTENT_WORKFLOW_AUTOMATION_ADD"==e)return e;if("CONTENT_WORKFLOW_AUTOMATION_DELETE"==e)return e;if("CONTENT_WORKFLOW_POLICY_ADD"==e)return e;if("CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION"==e)return e;if("CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION"==e)return e;if("COPY"==e)return e;if("DATA_RETENTION_CREATE_RETENTION"==e)return e;if("DATA_RETENTION_REMOVE_RETENTION"==e)return e;if("DELETE"==e)return e;if("DELETE_USER"==e)return e;if("DEVICE_TRUST_CHECK_FAILED"==e)return e;if("DOWNLOAD"==e)return e;if("EDIT"==e)return e;if("EDIT_USER"==e)return e;if("EMAIL_ALIAS_CONFIRM"==e)return e;if("EMAIL_ALIAS_REMOVE"==e)return e;if("ENTERPRISE_APP_AUTHORIZATION_UPDATE"==e)return e;if("EXTERNAL_COLLAB_SECURITY_SETTINGS"==e)return e;if("FAILED_LOGIN"==e)return e;if("FILE_MARKED_MALICIOUS"==e)return e;if("FILE_WATERMARKED_DOWNLOAD"==e)return e;if("GROUP_ADD_ITEM"==e)return e;if("GROUP_ADD_USER"==e)return e;if("GROUP_CREATION"==e)return e;if("GROUP_DELETION"==e)return e;if("GROUP_EDITED"==e)return e;if("GROUP_REMOVE_ITEM"==e)return e;if("GROUP_REMOVE_USER"==e)return e;if("ITEM_EMAIL_SEND"==e)return e;if("ITEM_MODIFY"==e)return e;if("ITEM_OPEN"==e)return e;if("ITEM_SHARED_UPDATE"==e)return e;if("ITEM_SYNC"==e)return e;if("ITEM_UNSYNC"==e)return e;if("LEGAL_HOLD_ASSIGNMENT_CREATE"==e)return e;if("LEGAL_HOLD_ASSIGNMENT_DELETE"==e)return e;if("LEGAL_HOLD_POLICY_CREATE"==e)return e;if("LEGAL_HOLD_POLICY_DELETE"==e)return e;if("LEGAL_HOLD_POLICY_UPDATE"==e)return e;if("LOCK"==e)return e;if("LOGIN"==e)return e;if("METADATA_INSTANCE_CREATE"==e)return e;if("METADATA_INSTANCE_DELETE"==e)return e;if("METADATA_INSTANCE_UPDATE"==e)return e;if("METADATA_TEMPLATE_CREATE"==e)return e;if("METADATA_TEMPLATE_DELETE"==e)return e;if("METADATA_TEMPLATE_UPDATE"==e)return e;if("MOVE"==e)return e;if("NEW_USER"==e)return e;if("OAUTH2_ACCESS_TOKEN_REVOKE"==e)return e;if("PREVIEW"==e)return e;if("REMOVE_DEVICE_ASSOCIATION"==e)return e;if("REMOVE_LOGIN_ACTIVITY_DEVICE"==e)return e;if("RENAME"==e)return e;if("RETENTION_POLICY_ASSIGNMENT_ADD"==e)return e;if("SHARE"==e)return e;if("SHARED_LINK_SEND"==e)return e;if("SHARE_EXPIRATION"==e)return e;if("SHIELD_ALERT"==e)return e;if("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED"==e)return e;if("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION"==e)return e;if("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED"==e)return e;if("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION"==e)return e;if("SHIELD_JUSTIFICATION_APPROVAL"==e)return e;if("SHIELD_SHARED_LINK_ACCESS_BLOCKED"==e)return e;if("SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE"==e)return e;if("SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE"==e)return e;if("SIGN_DOCUMENT_ASSIGNED"==e)return e;if("SIGN_DOCUMENT_CANCELLED"==e)return e;if("SIGN_DOCUMENT_COMPLETED"==e)return e;if("SIGN_DOCUMENT_CONVERTED"==e)return e;if("SIGN_DOCUMENT_CREATED"==e)return e;if("SIGN_DOCUMENT_DECLINED"==e)return e;if("SIGN_DOCUMENT_EXPIRED"==e)return e;if("SIGN_DOCUMENT_SIGNED"==e)return e;if("SIGN_DOCUMENT_VIEWED_BY_SIGNED"==e)return e;if("SIGNER_DOWNLOADED"==e)return e;if("SIGNER_FORWARDED"==e)return e;if("STORAGE_EXPIRATION"==e)return e;if("TASK_ASSIGNMENT_CREATE"==e)return e;if("TASK_ASSIGNMENT_DELETE"==e)return e;if("TASK_ASSIGNMENT_UPDATE"==e)return e;if("TASK_CREATE"==e)return e;if("TASK_UPDATE"==e)return e;if("TERMS_OF_SERVICE_ACCEPT"==e)return e;if("TERMS_OF_SERVICE_REJECT"==e)return e;if("UNDELETE"==e)return e;if("UNLOCK"==e)return e;if("UNSHARE"==e)return e;if("UPDATE_COLLABORATION_EXPIRATION"==e)return e;if("UPDATE_SHARE_EXPIRATION"==e)return e;if("UPLOAD"==e)return e;if("USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE"==e)return e;if("WATERMARK_LABEL_CREATE"==e)return e;if("WATERMARK_LABEL_DELETE"==e)return e;if((0,p.sdIsString)(e))return e;throw new u.BoxSdkError({message:"Can't deserialize GetEventsQueryParamsEventTypeField"})};const n=r(15135),o=r(3025),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793);class h{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetEventsWithLongPollingHeaders=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetEventsHeaders=f;t.EventsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getEventsWithLongPolling(){return i(this,arguments,void 0,(function*(e=new h({}),t){const r=new h({extraHeaders:e.extraHeaders}),i=(0,l.prepareParams)(Object.assign({},r.extraHeaders)),o=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/events"),method:"OPTIONS",headers:i,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:t});return Object.assign(Object.assign({},(0,n.deserializeRealtimeServers)(o.data)),{rawData:o.data})}))}getEvents(){return i(this,arguments,void 0,(function*(e={},t=new f({}),r){const i=new f({extraHeaders:t.extraHeaders}),n=(0,l.prepareParams)({stream_type:(0,d.toString)(e.streamType),stream_position:(0,d.toString)(e.streamPosition),limit:(0,d.toString)(e.limit),event_type:e.eventType?e.eventType.map(d.toString).join(","):void 0,created_after:e.createdAfter?(0,s.serializeDateTime)(e.createdAfter):void 0,created_before:e.createdBefore?(0,s.serializeDateTime)(e.createdBefore):void 0}),a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/events"),method:"GET",params:n,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,o.deserializeEvents)(u.data)),{rawData:u.data})}))}}},96913:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileClassificationsManager=t.DeleteClassificationFromFileHeaders=t.UpdateClassificationOnFileHeaders=t.UpdateClassificationOnFileRequestBody=t.AddClassificationToFileHeaders=t.GetClassificationOnFileHeaders=t.DeleteClassificationFromFileOptionals=t.UpdateClassificationOnFileOptionals=t.AddClassificationToFileOptionals=t.GetClassificationOnFileOptionals=void 0,t.serializeAddClassificationToFileRequestBody=w,t.deserializeAddClassificationToFileRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "AddClassificationToFileRequestBody"'});if(null!=e.Box__Security__Classification__Key&&!(0,c.sdIsString)(e.Box__Security__Classification__Key))throw new d.BoxSdkError({message:'Expecting string for "Box__Security__Classification__Key" of type "AddClassificationToFileRequestBody"'});return{boxSecurityClassificationKey:null==e.Box__Security__Classification__Key?void 0:e.Box__Security__Classification__Key}},t.serializeUpdateClassificationOnFileRequestBodyOpField=_,t.deserializeUpdateClassificationOnFileRequestBodyOpField=x,t.serializeUpdateClassificationOnFileRequestBodyPathField=S,t.deserializeUpdateClassificationOnFileRequestBodyPathField=k,t.serializeUpdateClassificationOnFileRequestBody=E,t.deserializeUpdateClassificationOnFileRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateClassificationOnFileRequestBody"'});if(null==e.op)throw new d.BoxSdkError({message:'Expecting "op" of type "UpdateClassificationOnFileRequestBody" to be defined'});const t=x(e.op);if(null==e.path)throw new d.BoxSdkError({message:'Expecting "path" of type "UpdateClassificationOnFileRequestBody" to be defined'});const r=k(e.path);if(null==e.value)throw new d.BoxSdkError({message:'Expecting "value" of type "UpdateClassificationOnFileRequestBody" to be defined'});if(!(0,c.sdIsString)(e.value))throw new d.BoxSdkError({message:'Expecting string for "value" of type "UpdateClassificationOnFileRequestBody"'});const i=e.value;return{op:t,path:r,value:i}},t.serializeUpdateClassificationOnFileRequestBodyInput=function(e){return{op:null==e.op?void 0:e.op,path:null==e.path?void 0:e.path,value:e.value}},t.deserializeUpdateClassificationOnFileRequestBodyInput=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateClassificationOnFileRequestBodyInput"'});const t=null==e.op?void 0:x(e.op),r=null==e.path?void 0:k(e.path);if(null==e.value)throw new d.BoxSdkError({message:'Expecting "value" of type "UpdateClassificationOnFileRequestBodyInput" to be defined'});if(!(0,c.sdIsString)(e.value))throw new d.BoxSdkError({message:'Expecting string for "value" of type "UpdateClassificationOnFileRequestBodyInput"'});const i=e.value;return{op:t,path:r,value:i}};const n=r(78748),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793),u=r(50793);class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetClassificationOnFileOptionals=p;class h{constructor(e){this.requestBody={},this.headers=new y({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddClassificationToFileOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateClassificationOnFileOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteClassificationFromFileOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetClassificationOnFileHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddClassificationToFileHeaders=y;t.UpdateClassificationOnFileRequestBody=class{constructor(e){this.op="replace",this.path="/Box__Security__Classification__Key",e.op&&(this.op=e.op),e.path&&(this.path=e.path),e.value&&(this.value=e.value),e.rawData&&(this.rawData=e.rawData)}};class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateClassificationOnFileHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteClassificationFromFileHeaders=b;function w(e){return{Box__Security__Classification__Key:null==e.boxSecurityClassificationKey?void 0:e.boxSecurityClassificationKey}}function _(e){return e}function x(e){if("replace"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateClassificationOnFileRequestBodyOpField"})}function S(e){return e}function k(e){if("/Box__Security__Classification__Key"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateClassificationOnFileRequestBodyPathField"})}function E(e){return{op:e.op,path:e.path,value:e.value}}t.FileClassificationsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getClassificationOnFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,d=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"GET",headers:d,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeClassification)(c.data)),{rawData:c.data})}))}addClassificationToFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"POST",headers:c,data:w(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeClassification)(u.data)),{rawData:u.data})}))}updateClassificationOnFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new f({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,d=i.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"PUT",headers:c,data:t.map(E),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeClassification)(u.data)),{rawData:u.data})}))}deleteClassificationFromFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},69085:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileMetadataManager=t.DeleteFileMetadataByIdHeaders=t.UpdateFileMetadataByIdHeaders=t.CreateFileMetadataByIdHeaders=t.GetFileMetadataByIdHeaders=t.GetFileMetadataHeaders=t.DeleteFileMetadataByIdOptionals=t.UpdateFileMetadataByIdOptionals=t.CreateFileMetadataByIdOptionals=t.GetFileMetadataByIdOptionals=t.GetFileMetadataOptionals=void 0,t.serializeGetFileMetadataByIdScope=function(e){return e},t.deserializeGetFileMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetFileMetadataByIdScope"})},t.serializeCreateFileMetadataByIdScope=function(e){return e},t.deserializeCreateFileMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateFileMetadataByIdScope"})},t.serializeCreateFileMetadataByIdRequestBody=S,t.deserializeCreateFileMetadataByIdRequestBody=function(e){return(0,p.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t]))):{}},t.serializeUpdateFileMetadataByIdScope=function(e){return e},t.deserializeUpdateFileMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateFileMetadataByIdScope"})},t.serializeUpdateFileMetadataByIdRequestBodyOpField=k,t.deserializeUpdateFileMetadataByIdRequestBodyOpField=E,t.serializeUpdateFileMetadataByIdRequestBody=T,t.deserializeUpdateFileMetadataByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateFileMetadataByIdRequestBody"'});const t=null==e.op?void 0:E(e.op);if(null!=e.path&&!(0,u.sdIsString)(e.path))throw new c.BoxSdkError({message:'Expecting string for "path" of type "UpdateFileMetadataByIdRequestBody"'});const r=null==e.path?void 0:e.path;if(null!=e.value&&!(0,u.sdIsString)(e.value))throw new c.BoxSdkError({message:'Expecting string for "value" of type "UpdateFileMetadataByIdRequestBody"'});const i=null==e.value?void 0:e.value;if(null!=e.from&&!(0,u.sdIsString)(e.from))throw new c.BoxSdkError({message:'Expecting string for "from" of type "UpdateFileMetadataByIdRequestBody"'});const n=null==e.from?void 0:e.from;return{op:t,path:r,value:i,from:n}},t.serializeDeleteFileMetadataByIdScope=function(e){return e},t.deserializeDeleteFileMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize DeleteFileMetadataByIdScope"})};const n=r(37418),o=r(70376),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileMetadataOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileMetadataByIdOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileMetadataByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFileMetadataByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileMetadataByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileMetadataHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileMetadataByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileMetadataByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFileMetadataByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileMetadataByIdHeaders=x;function S(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t])))}function k(e){return e}function E(e){if("add"==e)return e;if("replace"==e)return e;if("remove"==e)return e;if("test"==e)return e;if("move"==e)return e;if("copy"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateFileMetadataByIdRequestBodyOpField"})}function T(e){return{op:null==e.op?void 0:e.op,path:null==e.path?void 0:e.path,value:null==e.value?void 0:e.value,from:null==e.from?void 0:e.from}}t.FileMetadataManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileMetadata(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/metadata"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeMetadatas)(c.data)),{rawData:c.data})}))}getFileMetadataById(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new f({headers:i.headers,cancellationToken:i.cancellationToken}),s=n.headers,c=n.cancellationToken,u=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"GET",headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(p.data)),{rawData:p.data})}))}createFileMetadataById(e,t,r,n){return i(this,arguments,void 0,(function*(e,t,r,i,n={}){const s=new m({headers:n.headers,cancellationToken:n.cancellationToken}),c=s.headers,u=s.cancellationToken,p=(0,a.prepareParams)(Object.assign({},c.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"POST",headers:p,data:S(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:u});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(h.data)),{rawData:h.data})}))}updateFileMetadataById(e,t,r,n){return i(this,arguments,void 0,(function*(e,t,r,i,n={}){const s=new g({headers:n.headers,cancellationToken:n.cancellationToken}),c=s.headers,u=s.cancellationToken,p=(0,a.prepareParams)(Object.assign({},c.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"PUT",headers:p,data:i.map(T),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:u});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(h.data)),{rawData:h.data})}))}deleteFileMetadataById(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new y({headers:i.headers,cancellationToken:i.cancellationToken}),o=n.headers,s=n.cancellationToken,c=(0,a.prepareParams)(Object.assign({},o.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"DELETE",headers:c,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:s})}))}}},25318:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileRequestsManager=t.CreateFileRequestCopyHeaders=t.DeleteFileRequestByIdHeaders=t.UpdateFileRequestByIdHeaders=t.GetFileRequestByIdHeaders=t.CreateFileRequestCopyOptionals=t.DeleteFileRequestByIdOptionals=t.UpdateFileRequestByIdOptionals=t.GetFileRequestByIdOptionals=void 0;const n=r(58575),o=r(24387),s=r(31419),a=r(31210),l=r(93845),d=r(93845),c=r(84143);class u{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileRequestByIdOptionals=u;class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFileRequestByIdOptionals=p;class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileRequestByIdOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFileRequestCopyOptionals=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileRequestByIdHeaders=m;class g{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFileRequestByIdHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileRequestByIdHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFileRequestCopyHeaders=v;t.FileRequestsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileRequestById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_requests/",(0,d.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeFileRequest)(a.data)),{rawData:a.data})}))}updateFileRequestById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new p({headers:r.headers,cancellationToken:r.cancellationToken}),s=i.headers,a=i.cancellationToken,u=(0,l.prepareParams)(Object.assign({"if-match":(0,d.toString)(s.ifMatch)},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_requests/",(0,d.toString)(e)),method:"PUT",headers:u,data:(0,o.serializeFileRequestUpdateRequest)(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileRequest)(h.data)),{rawData:h.data})}))}deleteFileRequestById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_requests/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}createFileRequestCopy(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new f({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,a=i.cancellationToken,u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_requests/",(0,d.toString)(e),"/copy"),method:"POST",headers:u,data:(0,s.serializeFileRequestCopyRequest)(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileRequest)(p.data)),{rawData:p.data})}))}}},99681:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionLegalHoldsManager=t.GetFileVersionLegalHoldsHeaders=t.GetFileVersionLegalHoldByIdHeaders=t.GetFileVersionLegalHoldsOptionals=t.GetFileVersionLegalHoldByIdOptionals=void 0;const n=r(16754),o=r(2031),s=r(31210),a=r(93845),l=r(93845),d=r(84143);class c{constructor(e){this.headers=new p({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileVersionLegalHoldByIdOptionals=c;class u{constructor(e){this.headers=new h({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileVersionLegalHoldsOptionals=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionLegalHoldByIdHeaders=p;class h{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionLegalHoldsHeaders=h;t.FileVersionLegalHoldsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileVersionLegalHoldById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_version_legal_holds/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeFileVersionLegalHold)(u.data)),{rawData:u.data})}))}getFileVersionLegalHolds(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)({policy_id:(0,l.toString)(e.policyId),marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_version_legal_holds"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeFileVersionLegalHolds)(p.data)),{rawData:p.data})}))}}},73859:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionRetentionsManager=t.GetFileVersionRetentionByIdHeaders=t.GetFileVersionRetentionsHeaders=t.GetFileVersionRetentionByIdOptionals=void 0,t.serializeGetFileVersionRetentionsQueryParamsDispositionActionField=function(e){return e},t.deserializeGetFileVersionRetentionsQueryParamsDispositionActionField=function(e){if("permanently_delete"==e)return e;if("remove_retention"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetFileVersionRetentionsQueryParamsDispositionActionField"})};const n=r(1801),o=r(76804),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631);class u{constructor(e){this.headers=new h({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileVersionRetentionByIdOptionals=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionRetentionsHeaders=p;class h{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionRetentionByIdHeaders=h;t.FileVersionRetentionsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileVersionRetentions(){return i(this,arguments,void 0,(function*(e={},t=new p({}),r){const i=new p({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({file_id:(0,l.toString)(e.fileId),file_version_id:(0,l.toString)(e.fileVersionId),policy_id:(0,l.toString)(e.policyId),disposition_action:(0,l.toString)(e.dispositionAction),disposition_before:(0,l.toString)(e.dispositionBefore),disposition_after:(0,l.toString)(e.dispositionAfter),limit:(0,l.toString)(e.limit),marker:(0,l.toString)(e.marker)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_version_retentions"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeFileVersionRetentions)(c.data)),{rawData:c.data})}))}getFileVersionRetentionById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/file_version_retentions/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeFileVersionRetention)(c.data)),{rawData:c.data})}))}}},67749:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionsManager=t.PromoteFileVersionHeaders=t.UpdateFileVersionByIdHeaders=t.DeleteFileVersionByIdHeaders=t.GetFileVersionByIdHeaders=t.GetFileVersionsHeaders=t.PromoteFileVersionOptionals=t.UpdateFileVersionByIdOptionals=t.DeleteFileVersionByIdOptionals=t.GetFileVersionByIdOptionals=t.GetFileVersionsOptionals=void 0,t.serializeUpdateFileVersionByIdRequestBody=S,t.deserializeUpdateFileVersionByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateFileVersionByIdRequestBody"'});if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new c.BoxSdkError({message:'Expecting string for "trashed_at" of type "UpdateFileVersionByIdRequestBody"'});return{trashedAt:null==e.trashed_at?void 0:e.trashed_at}},t.serializePromoteFileVersionRequestBodyTypeField=k,t.deserializePromoteFileVersionRequestBodyTypeField=E,t.serializePromoteFileVersionRequestBody=T,t.deserializePromoteFileVersionRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "PromoteFileVersionRequestBody"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "PromoteFileVersionRequestBody"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:E(e.type);return{id:t,type:r}};const n=r(13919),o=r(44215),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.queryParams={},this.headers=new v({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileVersionsOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new b({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileVersionByIdOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileVersionByIdOptionals=m;class g{constructor(e){this.requestBody={},this.headers=new _({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFileVersionByIdOptionals=g;class y{constructor(e){this.requestBody={},this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.PromoteFileVersionOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionsHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileVersionByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileVersionByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFileVersionByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.PromoteFileVersionHeaders=x;function S(e){return{trashed_at:null==e.trashedAt?void 0:e.trashedAt}}function k(e){return e}function E(e){if("file_version"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize PromoteFileVersionRequestBodyTypeField"})}function T(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}t.FileVersionsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileVersions(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0,limit:(0,l.toString)(i.limit),offset:(0,l.toString)(i.offset)}),u=(0,a.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/versions"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFileVersions)(p.data)),{rawData:p.data})}))}getFileVersionById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new f({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),n=i.queryParams,s=i.headers,c=i.cancellationToken,u=(0,a.prepareParams)({fields:n.fields?n.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/versions/",(0,l.toString)(t)),method:"GET",params:u,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeFileVersionFull)(h.data)),{rawData:h.data})}))}deleteFileVersionById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new m({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,a.prepareParams)(Object.assign({"if-match":(0,l.toString)(n.ifMatch)},n.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/versions/",(0,l.toString)(t)),method:"DELETE",headers:s,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}updateFileVersionById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({requestBody:r.requestBody,headers:r.headers,cancellationToken:r.cancellationToken}),n=i.requestBody,s=i.headers,c=i.cancellationToken,u=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/versions/",(0,l.toString)(t)),method:"PUT",headers:u,data:S(n),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeFileVersionFull)(p.data)),{rawData:p.data})}))}promoteFileVersion(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:n.fields?n.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/versions/current"),method:"POST",params:u,headers:p,data:T(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeFileVersionFull)(h.data)),{rawData:h.data})}))}}},14703:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileWatermarksManager=t.DeleteFileWatermarkHeaders=t.UpdateFileWatermarkHeaders=t.UpdateFileWatermarkRequestBodyWatermarkField=t.GetFileWatermarkHeaders=t.DeleteFileWatermarkOptionals=t.UpdateFileWatermarkOptionals=t.GetFileWatermarkOptionals=void 0,t.serializeUpdateFileWatermarkRequestBodyWatermarkImprintField=y,t.deserializeUpdateFileWatermarkRequestBodyWatermarkImprintField=v,t.serializeUpdateFileWatermarkRequestBodyWatermarkField=b,t.deserializeUpdateFileWatermarkRequestBodyWatermarkField=w,t.serializeUpdateFileWatermarkRequestBodyWatermarkFieldInput=function(e){return{imprint:null==e.imprint?void 0:e.imprint}},t.deserializeUpdateFileWatermarkRequestBodyWatermarkFieldInput=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFileWatermarkRequestBodyWatermarkFieldInput"'});return{imprint:null==e.imprint?void 0:v(e.imprint)}},t.serializeUpdateFileWatermarkRequestBody=_,t.deserializeUpdateFileWatermarkRequestBody=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFileWatermarkRequestBody"'});if(null==e.watermark)throw new d.BoxSdkError({message:'Expecting "watermark" of type "UpdateFileWatermarkRequestBody" to be defined'});return{watermark:w(e.watermark)}};const n=r(99698),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793);class u{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileWatermarkOptionals=u;class p{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFileWatermarkOptionals=p;class h{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileWatermarkOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileWatermarkHeaders=f;t.UpdateFileWatermarkRequestBodyWatermarkField=class{constructor(e){this.imprint="default",e.imprint&&(this.imprint=e.imprint),e.rawData&&(this.rawData=e.rawData)}};class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFileWatermarkHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileWatermarkHeaders=g;function y(e){return e}function v(e){if("default"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateFileWatermarkRequestBodyWatermarkImprintField"})}function b(e){return{imprint:e.imprint}}function w(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFileWatermarkRequestBodyWatermarkField"'});if(null==e.imprint)throw new d.BoxSdkError({message:'Expecting "imprint" of type "UpdateFileWatermarkRequestBodyWatermarkField" to be defined'});return{imprint:v(e.imprint)}}function _(e){return{watermark:b(e.watermark)}}t.FileWatermarksManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileWatermark(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,d=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/watermark"),method:"GET",headers:d,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWatermark)(c.data)),{rawData:c.data})}))}updateFileWatermark(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new p({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,d=i.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/watermark"),method:"PUT",headers:c,data:_(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeWatermark)(u.data)),{rawData:u.data})}))}deleteFileWatermark(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/watermark"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},98425:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesManager=t.GetFileThumbnailByIdHeaders=t.CopyFileHeaders=t.DeleteFileByIdHeaders=t.UpdateFileByIdHeaders=t.GetFileByIdHeaders=t.GetFileThumbnailByIdOptionals=t.CopyFileOptionals=t.DeleteFileByIdOptionals=t.UpdateFileByIdOptionals=t.GetFileByIdOptionals=void 0,t.serializeUpdateFileByIdRequestBodyParentField=T,t.deserializeUpdateFileByIdRequestBodyParentField=B,t.serializeUpdateFileByIdRequestBodySharedLinkAccessField=C,t.deserializeUpdateFileByIdRequestBodySharedLinkAccessField=I,t.serializeUpdateFileByIdRequestBodySharedLinkPermissionsField=A,t.deserializeUpdateFileByIdRequestBodySharedLinkPermissionsField=F,t.serializeUpdateFileByIdRequestBodySharedLinkField=M,t.deserializeUpdateFileByIdRequestBodySharedLinkField=D,t.serializeUpdateFileByIdRequestBodyLockAccessField=R,t.deserializeUpdateFileByIdRequestBodyLockAccessField=P,t.serializeUpdateFileByIdRequestBodyLockField=O,t.deserializeUpdateFileByIdRequestBodyLockField=z,t.serializeUpdateFileByIdRequestBodyPermissionsCanDownloadField=N,t.deserializeUpdateFileByIdRequestBodyPermissionsCanDownloadField=q,t.serializeUpdateFileByIdRequestBodyPermissionsField=U,t.deserializeUpdateFileByIdRequestBodyPermissionsField=L,t.serializeUpdateFileByIdRequestBodyCollectionsField=j,t.deserializeUpdateFileByIdRequestBodyCollectionsField=H,t.serializeUpdateFileByIdRequestBody=$,t.deserializeUpdateFileByIdRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBody"'});if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "UpdateFileByIdRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.description&&!(0,h.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "UpdateFileByIdRequestBody"'});const r=null==e.description?void 0:e.description,i=null==e.parent?void 0:B(e.parent),n=null==e.shared_link?void 0:D(e.shared_link),o=null==e.lock?void 0:z(e.lock);if(null!=e.disposition_at&&!(0,h.sdIsString)(e.disposition_at))throw new u.BoxSdkError({message:'Expecting string for "disposition_at" of type "UpdateFileByIdRequestBody"'});const a=null==e.disposition_at?void 0:(0,s.deserializeDateTime)(e.disposition_at),l=null==e.permissions?void 0:L(e.permissions);if(null!=e.collections&&!(0,f.sdIsList)(e.collections))throw new u.BoxSdkError({message:'Expecting array for "collections" of type "UpdateFileByIdRequestBody"'});const d=null==e.collections?void 0:(0,f.sdIsList)(e.collections)?e.collections.map((function(e){return H(e)})):[];if(null!=e.tags&&!(0,f.sdIsList)(e.tags))throw new u.BoxSdkError({message:'Expecting array for "tags" of type "UpdateFileByIdRequestBody"'});const c=null==e.tags?void 0:(0,f.sdIsList)(e.tags)?e.tags.map((function(e){if(!(0,h.sdIsString)(e))throw new u.BoxSdkError({message:'Expecting string for "UpdateFileByIdRequestBody"'});return e})):[];return{name:t,description:r,parent:i,sharedLink:n,lock:o,dispositionAt:a,permissions:l,collections:d,tags:c}},t.serializeCopyFileRequestBodyParentField=G,t.deserializeCopyFileRequestBodyParentField=W,t.serializeCopyFileRequestBody=K,t.deserializeCopyFileRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CopyFileRequestBody"'});if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "CopyFileRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.version&&!(0,h.sdIsString)(e.version))throw new u.BoxSdkError({message:'Expecting string for "version" of type "CopyFileRequestBody"'});const r=null==e.version?void 0:e.version;if(null==e.parent)throw new u.BoxSdkError({message:'Expecting "parent" of type "CopyFileRequestBody" to be defined'});const i=W(e.parent);return{name:t,version:r,parent:i}},t.serializeGetFileThumbnailByIdExtension=function(e){return e},t.deserializeGetFileThumbnailByIdExtension=function(e){if("png"==e)return e;if("jpg"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize GetFileThumbnailByIdExtension"})};const n=r(49579),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793);class g{constructor(e){this.queryParams={},this.headers=new _({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileByIdOptionals=g;class y{constructor(e){this.requestBody={},this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFileByIdOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFileByIdOptionals=v;class b{constructor(e){this.queryParams={},this.headers=new k({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CopyFileOptionals=b;class w{constructor(e){this.queryParams={},this.headers=new E({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileThumbnailByIdOptionals=w;class _{constructor(e){this.extraHeaders={},e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.boxapi&&(this.boxapi=e.boxapi),e.xRepHints&&(this.xRepHints=e.xRepHints),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFileByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFileByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CopyFileHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileThumbnailByIdHeaders=E;function T(e){return{id:null==e.id?void 0:e.id}}function B(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodyParentField"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UpdateFileByIdRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function C(e){return e}function I(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateFileByIdRequestBodySharedLinkAccessField"})}function A(e){return{can_download:null==e.canDownload?void 0:e.canDownload}}function F(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "UpdateFileByIdRequestBodySharedLinkPermissionsField"'});return{canDownload:null==e.can_download?void 0:e.can_download}}function M(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:A(e.permissions)}}function D(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodySharedLinkField"'});const t=null==e.access?void 0:I(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "UpdateFileByIdRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateFileByIdRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateFileByIdRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:F(e.permissions)}}function R(e){return e}function P(e){if("lock"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateFileByIdRequestBodyLockAccessField"})}function O(e){return{access:null==e.access?void 0:e.access,expires_at:null==e.expiresAt?void 0:(0,o.serializeDateTime)(e.expiresAt),is_download_prevented:null==e.isDownloadPrevented?void 0:e.isDownloadPrevented}}function z(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodyLockField"'});const t=null==e.access?void 0:P(e.access);if(null!=e.expires_at&&!(0,h.sdIsString)(e.expires_at))throw new u.BoxSdkError({message:'Expecting string for "expires_at" of type "UpdateFileByIdRequestBodyLockField"'});const r=null==e.expires_at?void 0:(0,s.deserializeDateTime)(e.expires_at);if(null!=e.is_download_prevented&&!(0,p.sdIsBoolean)(e.is_download_prevented))throw new u.BoxSdkError({message:'Expecting boolean for "is_download_prevented" of type "UpdateFileByIdRequestBodyLockField"'});return{access:t,expiresAt:r,isDownloadPrevented:null==e.is_download_prevented?void 0:e.is_download_prevented}}function N(e){return e}function q(e){if("open"==e)return e;if("company"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateFileByIdRequestBodyPermissionsCanDownloadField"})}function U(e){return{can_download:null==e.canDownload?void 0:e.canDownload}}function L(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodyPermissionsField"'});return{canDownload:null==e.can_download?void 0:q(e.can_download)}}function j(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function H(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateFileByIdRequestBodyCollectionsField"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UpdateFileByIdRequestBodyCollectionsField"'});const t=null==e.id?void 0:e.id;if(null!=e.type&&!(0,h.sdIsString)(e.type))throw new u.BoxSdkError({message:'Expecting string for "type" of type "UpdateFileByIdRequestBodyCollectionsField"'});return{id:t,type:null==e.type?void 0:e.type}}function $(e){return{name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description,parent:null==e.parent?void 0:T(e.parent),shared_link:null==e.sharedLink?void 0:M(e.sharedLink),lock:null==e.lock?void 0:O(e.lock),disposition_at:null==e.dispositionAt?void 0:(0,o.serializeDateTime)(e.dispositionAt),permissions:null==e.permissions?void 0:U(e.permissions),collections:null==e.collections?void 0:e.collections.map((function(e){return j(e)})),tags:null==e.tags?void 0:e.tags.map((function(e){return e}))}}function G(e){return{id:e.id}}function W(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CopyFileRequestBodyParentField"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "CopyFileRequestBodyParentField" to be defined'});if(!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CopyFileRequestBodyParentField"'});return{id:e.id}}function K(e){return{name:null==e.name?void 0:e.name,version:null==e.version?void 0:e.version,parent:G(e.parent)}}t.FilesManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)({fields:i.fields?i.fields.map(d.toString).join(","):void 0}),u=(0,l.prepareParams)(Object.assign({"if-none-match":(0,d.toString)(o.ifNoneMatch),boxapi:(0,d.toString)(o.boxapi),"x-rep-hints":(0,d.toString)(o.xRepHints)},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e)),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(p.data)),{rawData:p.data})}))}updateFileById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.queryParams,s=r.headers,a=r.cancellationToken,u=(0,l.prepareParams)({fields:o.fields?o.fields.map(d.toString).join(","):void 0}),p=(0,l.prepareParams)(Object.assign({"if-match":(0,d.toString)(s.ifMatch)},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e)),method:"PUT",params:u,headers:p,data:$(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(h.data)),{rawData:h.data})}))}deleteFileById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({"if-match":(0,d.toString)(i.ifMatch)},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}copyFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new b({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),o=i.queryParams,s=i.headers,a=i.cancellationToken,u=(0,l.prepareParams)({fields:o.fields?o.fields.map(d.toString).join(","):void 0}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/copy"),method:"POST",params:u,headers:p,data:K(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(h.data)),{rawData:h.data})}))}getFileThumbnailById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new w({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),n=i.queryParams,o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)({min_height:(0,d.toString)(n.minHeight),min_width:(0,d.toString)(n.minWidth),max_height:(0,d.toString)(n.maxHeight),max_width:(0,d.toString)(n.maxWidth)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders));return(yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/thumbnail.",(0,d.toString)(t)),method:"GET",params:a,headers:u,responseFormat:"binary",auth:this.auth,networkSession:this.networkSession,cancellationToken:s})).content}))}}},69023:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderClassificationsManager=t.DeleteClassificationFromFolderHeaders=t.UpdateClassificationOnFolderHeaders=t.UpdateClassificationOnFolderRequestBody=t.AddClassificationToFolderHeaders=t.GetClassificationOnFolderHeaders=t.DeleteClassificationFromFolderOptionals=t.UpdateClassificationOnFolderOptionals=t.AddClassificationToFolderOptionals=t.GetClassificationOnFolderOptionals=void 0,t.serializeAddClassificationToFolderRequestBody=w,t.deserializeAddClassificationToFolderRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "AddClassificationToFolderRequestBody"'});if(null!=e.Box__Security__Classification__Key&&!(0,c.sdIsString)(e.Box__Security__Classification__Key))throw new d.BoxSdkError({message:'Expecting string for "Box__Security__Classification__Key" of type "AddClassificationToFolderRequestBody"'});return{boxSecurityClassificationKey:null==e.Box__Security__Classification__Key?void 0:e.Box__Security__Classification__Key}},t.serializeUpdateClassificationOnFolderRequestBodyOpField=_,t.deserializeUpdateClassificationOnFolderRequestBodyOpField=x,t.serializeUpdateClassificationOnFolderRequestBodyPathField=S,t.deserializeUpdateClassificationOnFolderRequestBodyPathField=k,t.serializeUpdateClassificationOnFolderRequestBody=E,t.deserializeUpdateClassificationOnFolderRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateClassificationOnFolderRequestBody"'});if(null==e.op)throw new d.BoxSdkError({message:'Expecting "op" of type "UpdateClassificationOnFolderRequestBody" to be defined'});const t=x(e.op);if(null==e.path)throw new d.BoxSdkError({message:'Expecting "path" of type "UpdateClassificationOnFolderRequestBody" to be defined'});const r=k(e.path);if(null==e.value)throw new d.BoxSdkError({message:'Expecting "value" of type "UpdateClassificationOnFolderRequestBody" to be defined'});if(!(0,c.sdIsString)(e.value))throw new d.BoxSdkError({message:'Expecting string for "value" of type "UpdateClassificationOnFolderRequestBody"'});const i=e.value;return{op:t,path:r,value:i}},t.serializeUpdateClassificationOnFolderRequestBodyInput=function(e){return{op:null==e.op?void 0:e.op,path:null==e.path?void 0:e.path,value:e.value}},t.deserializeUpdateClassificationOnFolderRequestBodyInput=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateClassificationOnFolderRequestBodyInput"'});const t=null==e.op?void 0:x(e.op),r=null==e.path?void 0:k(e.path);if(null==e.value)throw new d.BoxSdkError({message:'Expecting "value" of type "UpdateClassificationOnFolderRequestBodyInput" to be defined'});if(!(0,c.sdIsString)(e.value))throw new d.BoxSdkError({message:'Expecting string for "value" of type "UpdateClassificationOnFolderRequestBodyInput"'});const i=e.value;return{op:t,path:r,value:i}};const n=r(78748),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793),u=r(50793);class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetClassificationOnFolderOptionals=p;class h{constructor(e){this.requestBody={},this.headers=new y({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddClassificationToFolderOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateClassificationOnFolderOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteClassificationFromFolderOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetClassificationOnFolderHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddClassificationToFolderHeaders=y;t.UpdateClassificationOnFolderRequestBody=class{constructor(e){this.op="replace",this.path="/Box__Security__Classification__Key",e.op&&(this.op=e.op),e.path&&(this.path=e.path),e.value&&(this.value=e.value),e.rawData&&(this.rawData=e.rawData)}};class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateClassificationOnFolderHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteClassificationFromFolderHeaders=b;function w(e){return{Box__Security__Classification__Key:null==e.boxSecurityClassificationKey?void 0:e.boxSecurityClassificationKey}}function _(e){return e}function x(e){if("replace"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateClassificationOnFolderRequestBodyOpField"})}function S(e){return e}function k(e){if("/Box__Security__Classification__Key"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateClassificationOnFolderRequestBodyPathField"})}function E(e){return{op:e.op,path:e.path,value:e.value}}t.FolderClassificationsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getClassificationOnFolder(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,d=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"GET",headers:d,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeClassification)(c.data)),{rawData:c.data})}))}addClassificationToFolder(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"POST",headers:c,data:w(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeClassification)(u.data)),{rawData:u.data})}))}updateClassificationOnFolder(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new f({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,d=i.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"PUT",headers:c,data:t.map(E),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeClassification)(u.data)),{rawData:u.data})}))}deleteClassificationFromFolder(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/metadata/enterprise/securityClassification-6VMVochwUWo"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},63942:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderLocksManager=t.DeleteFolderLockByIdHeaders=t.CreateFolderLockHeaders=t.GetFolderLocksHeaders=t.DeleteFolderLockByIdOptionals=t.CreateFolderLockOptionals=t.GetFolderLocksOptionals=void 0,t.serializeCreateFolderLockRequestBodyLockedOperationsField=w,t.deserializeCreateFolderLockRequestBodyLockedOperationsField=_,t.serializeCreateFolderLockRequestBodyFolderField=x,t.deserializeCreateFolderLockRequestBodyFolderField=S,t.serializeCreateFolderLockRequestBody=k,t.deserializeCreateFolderLockRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateFolderLockRequestBody"'});const t=null==e.locked_operations?void 0:_(e.locked_operations);if(null==e.folder)throw new c.BoxSdkError({message:'Expecting "folder" of type "CreateFolderLockRequestBody" to be defined'});const r=S(e.folder);return{lockedOperations:t,folder:r}};const n=r(90716),o=r(10687),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderLocksOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFolderLockOptionals=m;class g{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFolderLockByIdOptionals=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderLocksHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFolderLockHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFolderLockByIdHeaders=b;function w(e){return{move:e.move,delete:e.delete}}function _(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateFolderLockRequestBodyLockedOperationsField"'});if(null==e.move)throw new c.BoxSdkError({message:'Expecting "move" of type "CreateFolderLockRequestBodyLockedOperationsField" to be defined'});if(!(0,u.sdIsBoolean)(e.move))throw new c.BoxSdkError({message:'Expecting boolean for "move" of type "CreateFolderLockRequestBodyLockedOperationsField"'});const t=e.move;if(null==e.delete)throw new c.BoxSdkError({message:'Expecting "delete" of type "CreateFolderLockRequestBodyLockedOperationsField" to be defined'});if(!(0,u.sdIsBoolean)(e.delete))throw new c.BoxSdkError({message:'Expecting boolean for "delete" of type "CreateFolderLockRequestBodyLockedOperationsField"'});return{move:t,delete:e.delete}}function x(e){return{type:e.type,id:e.id}}function S(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateFolderLockRequestBodyFolderField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateFolderLockRequestBodyFolderField" to be defined'});if(!(0,p.sdIsString)(e.type))throw new c.BoxSdkError({message:'Expecting string for "type" of type "CreateFolderLockRequestBodyFolderField"'});const t=e.type;if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateFolderLockRequestBodyFolderField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateFolderLockRequestBodyFolderField"'});return{type:t,id:e.id}}function k(e){return{locked_operations:null==e.lockedOperations?void 0:w(e.lockedOperations),folder:x(e.folder)}}t.FolderLocksManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFolderLocks(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)({folder_id:(0,l.toString)(e.folderId)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folder_locks"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeFolderLocks)(u.data)),{rawData:u.data})}))}createFolderLock(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folder_locks"),method:"POST",headers:s,data:k(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeFolderLock)(l.data)),{rawData:l.data})}))}deleteFolderLockById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folder_locks/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},53799:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderMetadataManager=t.DeleteFolderMetadataByIdHeaders=t.UpdateFolderMetadataByIdHeaders=t.CreateFolderMetadataByIdHeaders=t.GetFolderMetadataByIdHeaders=t.GetFolderMetadataHeaders=t.DeleteFolderMetadataByIdOptionals=t.UpdateFolderMetadataByIdOptionals=t.CreateFolderMetadataByIdOptionals=t.GetFolderMetadataByIdOptionals=t.GetFolderMetadataOptionals=void 0,t.serializeGetFolderMetadataByIdScope=function(e){return e},t.deserializeGetFolderMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetFolderMetadataByIdScope"})},t.serializeCreateFolderMetadataByIdScope=function(e){return e},t.deserializeCreateFolderMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateFolderMetadataByIdScope"})},t.serializeCreateFolderMetadataByIdRequestBody=S,t.deserializeCreateFolderMetadataByIdRequestBody=function(e){return(0,p.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t]))):{}},t.serializeUpdateFolderMetadataByIdScope=function(e){return e},t.deserializeUpdateFolderMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateFolderMetadataByIdScope"})},t.serializeUpdateFolderMetadataByIdRequestBodyOpField=k,t.deserializeUpdateFolderMetadataByIdRequestBodyOpField=E,t.serializeUpdateFolderMetadataByIdRequestBody=T,t.deserializeUpdateFolderMetadataByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateFolderMetadataByIdRequestBody"'});const t=null==e.op?void 0:E(e.op);if(null!=e.path&&!(0,u.sdIsString)(e.path))throw new c.BoxSdkError({message:'Expecting string for "path" of type "UpdateFolderMetadataByIdRequestBody"'});const r=null==e.path?void 0:e.path;if(null!=e.value&&!(0,u.sdIsString)(e.value))throw new c.BoxSdkError({message:'Expecting string for "value" of type "UpdateFolderMetadataByIdRequestBody"'});const i=null==e.value?void 0:e.value;if(null!=e.from&&!(0,u.sdIsString)(e.from))throw new c.BoxSdkError({message:'Expecting string for "from" of type "UpdateFolderMetadataByIdRequestBody"'});const n=null==e.from?void 0:e.from;return{op:t,path:r,value:i,from:n}},t.serializeDeleteFolderMetadataByIdScope=function(e){return e},t.deserializeDeleteFolderMetadataByIdScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize DeleteFolderMetadataByIdScope"})};const n=r(37418),o=r(70376),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderMetadataOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderMetadataByIdOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFolderMetadataByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFolderMetadataByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFolderMetadataByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderMetadataHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderMetadataByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFolderMetadataByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFolderMetadataByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFolderMetadataByIdHeaders=x;function S(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t])))}function k(e){return e}function E(e){if("add"==e)return e;if("replace"==e)return e;if("remove"==e)return e;if("test"==e)return e;if("move"==e)return e;if("copy"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateFolderMetadataByIdRequestBodyOpField"})}function T(e){return{op:null==e.op?void 0:e.op,path:null==e.path?void 0:e.path,value:null==e.value?void 0:e.value,from:null==e.from?void 0:e.from}}t.FolderMetadataManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFolderMetadata(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/metadata"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeMetadatas)(c.data)),{rawData:c.data})}))}getFolderMetadataById(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new f({headers:i.headers,cancellationToken:i.cancellationToken}),s=n.headers,c=n.cancellationToken,u=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"GET",headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(p.data)),{rawData:p.data})}))}createFolderMetadataById(e,t,r,n){return i(this,arguments,void 0,(function*(e,t,r,i,n={}){const s=new m({headers:n.headers,cancellationToken:n.cancellationToken}),c=s.headers,u=s.cancellationToken,p=(0,a.prepareParams)(Object.assign({},c.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"POST",headers:p,data:S(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:u});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(h.data)),{rawData:h.data})}))}updateFolderMetadataById(e,t,r,n){return i(this,arguments,void 0,(function*(e,t,r,i,n={}){const s=new g({headers:n.headers,cancellationToken:n.cancellationToken}),c=s.headers,u=s.cancellationToken,p=(0,a.prepareParams)(Object.assign({},c.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"PUT",headers:p,data:i.map(T),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:u});return Object.assign(Object.assign({},(0,o.deserializeMetadataFull)(h.data)),{rawData:h.data})}))}deleteFolderMetadataById(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new y({headers:i.headers,cancellationToken:i.cancellationToken}),o=n.headers,s=n.cancellationToken,c=(0,a.prepareParams)(Object.assign({},o.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/metadata/",(0,l.toString)(t),"/",(0,l.toString)(r)),method:"DELETE",headers:c,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:s})}))}}},90269:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWatermarksManager=t.DeleteFolderWatermarkHeaders=t.UpdateFolderWatermarkHeaders=t.UpdateFolderWatermarkRequestBodyWatermarkField=t.GetFolderWatermarkHeaders=t.DeleteFolderWatermarkOptionals=t.UpdateFolderWatermarkOptionals=t.GetFolderWatermarkOptionals=void 0,t.serializeUpdateFolderWatermarkRequestBodyWatermarkImprintField=y,t.deserializeUpdateFolderWatermarkRequestBodyWatermarkImprintField=v,t.serializeUpdateFolderWatermarkRequestBodyWatermarkField=b,t.deserializeUpdateFolderWatermarkRequestBodyWatermarkField=w,t.serializeUpdateFolderWatermarkRequestBodyWatermarkFieldInput=function(e){return{imprint:null==e.imprint?void 0:e.imprint}},t.deserializeUpdateFolderWatermarkRequestBodyWatermarkFieldInput=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFolderWatermarkRequestBodyWatermarkFieldInput"'});return{imprint:null==e.imprint?void 0:v(e.imprint)}},t.serializeUpdateFolderWatermarkRequestBody=_,t.deserializeUpdateFolderWatermarkRequestBody=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFolderWatermarkRequestBody"'});if(null==e.watermark)throw new d.BoxSdkError({message:'Expecting "watermark" of type "UpdateFolderWatermarkRequestBody" to be defined'});return{watermark:w(e.watermark)}};const n=r(99698),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793);class u{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderWatermarkOptionals=u;class p{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFolderWatermarkOptionals=p;class h{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFolderWatermarkOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderWatermarkHeaders=f;t.UpdateFolderWatermarkRequestBodyWatermarkField=class{constructor(e){this.imprint="default",e.imprint&&(this.imprint=e.imprint),e.rawData&&(this.rawData=e.rawData)}};class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFolderWatermarkHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFolderWatermarkHeaders=g;function y(e){return e}function v(e){if("default"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize UpdateFolderWatermarkRequestBodyWatermarkImprintField"})}function b(e){return{imprint:e.imprint}}function w(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "UpdateFolderWatermarkRequestBodyWatermarkField"'});if(null==e.imprint)throw new d.BoxSdkError({message:'Expecting "imprint" of type "UpdateFolderWatermarkRequestBodyWatermarkField" to be defined'});return{imprint:v(e.imprint)}}function _(e){return{watermark:b(e.watermark)}}t.FolderWatermarksManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFolderWatermark(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,d=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/watermark"),method:"GET",headers:d,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWatermark)(c.data)),{rawData:c.data})}))}updateFolderWatermark(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new p({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,d=i.cancellationToken,c=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/watermark"),method:"PUT",headers:c,data:_(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeWatermark)(u.data)),{rawData:u.data})}))}deleteFolderWatermark(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,s.prepareParams)(Object.assign({},i.extraHeaders));yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/watermark"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},1307:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FoldersManager=t.CopyFolderHeaders=t.CreateFolderHeaders=t.GetFolderItemsHeaders=t.DeleteFolderByIdHeaders=t.UpdateFolderByIdHeaders=t.GetFolderByIdHeaders=t.CopyFolderOptionals=t.CreateFolderOptionals=t.GetFolderItemsOptionals=t.DeleteFolderByIdOptionals=t.UpdateFolderByIdOptionals=t.GetFolderByIdOptionals=void 0,t.serializeGetFolderByIdQueryParamsSortField=function(e){return e},t.deserializeGetFolderByIdQueryParamsSortField=function(e){if("id"==e)return e;if("name"==e)return e;if("date"==e)return e;if("size"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize GetFolderByIdQueryParamsSortField"})},t.serializeGetFolderByIdQueryParamsDirectionField=function(e){return e},t.deserializeGetFolderByIdQueryParamsDirectionField=function(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize GetFolderByIdQueryParamsDirectionField"})},t.serializeUpdateFolderByIdRequestBodySyncStateField=I,t.deserializeUpdateFolderByIdRequestBodySyncStateField=A,t.serializeUpdateFolderByIdRequestBodyParentField=F,t.deserializeUpdateFolderByIdRequestBodyParentField=M,t.serializeUpdateFolderByIdRequestBodySharedLinkAccessField=D,t.deserializeUpdateFolderByIdRequestBodySharedLinkAccessField=R,t.serializeUpdateFolderByIdRequestBodySharedLinkPermissionsField=P,t.deserializeUpdateFolderByIdRequestBodySharedLinkPermissionsField=O,t.serializeUpdateFolderByIdRequestBodySharedLinkField=z,t.deserializeUpdateFolderByIdRequestBodySharedLinkField=N,t.serializeUpdateFolderByIdRequestBodyFolderUploadEmailAccessField=q,t.deserializeUpdateFolderByIdRequestBodyFolderUploadEmailAccessField=U,t.serializeUpdateFolderByIdRequestBodyFolderUploadEmailField=L,t.deserializeUpdateFolderByIdRequestBodyFolderUploadEmailField=j,t.serializeUpdateFolderByIdRequestBodyCollectionsField=H,t.deserializeUpdateFolderByIdRequestBodyCollectionsField=$,t.serializeUpdateFolderByIdRequestBody=G,t.deserializeUpdateFolderByIdRequestBody=function(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBody"'});if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "UpdateFolderByIdRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.description&&!(0,f.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "UpdateFolderByIdRequestBody"'});const r=null==e.description?void 0:e.description,i=null==e.sync_state?void 0:A(e.sync_state);if(null!=e.can_non_owners_invite&&!(0,h.sdIsBoolean)(e.can_non_owners_invite))throw new p.BoxSdkError({message:'Expecting boolean for "can_non_owners_invite" of type "UpdateFolderByIdRequestBody"'});const n=null==e.can_non_owners_invite?void 0:e.can_non_owners_invite,o=null==e.parent?void 0:M(e.parent),s=null==e.shared_link?void 0:N(e.shared_link),a=null==e.folder_upload_email?void 0:j(e.folder_upload_email);if(null!=e.tags&&!(0,m.sdIsList)(e.tags))throw new p.BoxSdkError({message:'Expecting array for "tags" of type "UpdateFolderByIdRequestBody"'});const l=null==e.tags?void 0:(0,m.sdIsList)(e.tags)?e.tags.map((function(e){if(!(0,f.sdIsString)(e))throw new p.BoxSdkError({message:'Expecting string for "UpdateFolderByIdRequestBody"'});return e})):[];if(null!=e.is_collaboration_restricted_to_enterprise&&!(0,h.sdIsBoolean)(e.is_collaboration_restricted_to_enterprise))throw new p.BoxSdkError({message:'Expecting boolean for "is_collaboration_restricted_to_enterprise" of type "UpdateFolderByIdRequestBody"'});const d=null==e.is_collaboration_restricted_to_enterprise?void 0:e.is_collaboration_restricted_to_enterprise;if(null!=e.collections&&!(0,m.sdIsList)(e.collections))throw new p.BoxSdkError({message:'Expecting array for "collections" of type "UpdateFolderByIdRequestBody"'});const c=null==e.collections?void 0:(0,m.sdIsList)(e.collections)?e.collections.map((function(e){return $(e)})):[];if(null!=e.can_non_owners_view_collaborators&&!(0,h.sdIsBoolean)(e.can_non_owners_view_collaborators))throw new p.BoxSdkError({message:'Expecting boolean for "can_non_owners_view_collaborators" of type "UpdateFolderByIdRequestBody"'});const u=null==e.can_non_owners_view_collaborators?void 0:e.can_non_owners_view_collaborators;return{name:t,description:r,syncState:i,canNonOwnersInvite:n,parent:o,sharedLink:s,folderUploadEmail:a,tags:l,isCollaborationRestrictedToEnterprise:d,collections:c,canNonOwnersViewCollaborators:u}},t.serializeGetFolderItemsQueryParamsSortField=function(e){return e},t.deserializeGetFolderItemsQueryParamsSortField=function(e){if("id"==e)return e;if("name"==e)return e;if("date"==e)return e;if("size"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize GetFolderItemsQueryParamsSortField"})},t.serializeGetFolderItemsQueryParamsDirectionField=function(e){return e},t.deserializeGetFolderItemsQueryParamsDirectionField=function(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize GetFolderItemsQueryParamsDirectionField"})},t.serializeCreateFolderRequestBodyParentField=W,t.deserializeCreateFolderRequestBodyParentField=K,t.serializeCreateFolderRequestBodyFolderUploadEmailAccessField=V,t.deserializeCreateFolderRequestBodyFolderUploadEmailAccessField=J,t.serializeCreateFolderRequestBodyFolderUploadEmailField=Y,t.deserializeCreateFolderRequestBodyFolderUploadEmailField=Q,t.serializeCreateFolderRequestBodySyncStateField=Z,t.deserializeCreateFolderRequestBodySyncStateField=X,t.serializeCreateFolderRequestBody=ee,t.deserializeCreateFolderRequestBody=function(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateFolderRequestBody"'});if(null==e.name)throw new p.BoxSdkError({message:'Expecting "name" of type "CreateFolderRequestBody" to be defined'});if(!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "CreateFolderRequestBody"'});const t=e.name;if(null==e.parent)throw new p.BoxSdkError({message:'Expecting "parent" of type "CreateFolderRequestBody" to be defined'});const r=K(e.parent),i=null==e.folder_upload_email?void 0:Q(e.folder_upload_email),n=null==e.sync_state?void 0:X(e.sync_state);return{name:t,parent:r,folderUploadEmail:i,syncState:n}},t.serializeCopyFolderRequestBodyParentField=te,t.deserializeCopyFolderRequestBodyParentField=re,t.serializeCopyFolderRequestBody=ie,t.deserializeCopyFolderRequestBody=function(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CopyFolderRequestBody"'});if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "CopyFolderRequestBody"'});const t=null==e.name?void 0:e.name;if(null==e.parent)throw new p.BoxSdkError({message:'Expecting "parent" of type "CopyFolderRequestBody" to be defined'});const r=re(e.parent);return{name:t,parent:r}};const n=r(34537),o=r(61664),s=r(93845),a=r(93845),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793),m=r(50793),g=r(50793);class y{constructor(e){this.queryParams={},this.headers=new S({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderByIdOptionals=y;class v{constructor(e){this.requestBody={},this.queryParams={},this.headers=new k({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateFolderByIdOptionals=v;class b{constructor(e){this.queryParams={},this.headers=new E({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteFolderByIdOptionals=b;class w{constructor(e){this.queryParams={},this.headers=new T({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderItemsOptionals=w;class _{constructor(e){this.queryParams={},this.headers=new B({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateFolderOptionals=_;class x{constructor(e){this.queryParams={},this.headers=new C({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CopyFolderOptionals=x;class S{constructor(e){this.extraHeaders={},e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateFolderByIdHeaders=k;class E{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteFolderByIdHeaders=E;class T{constructor(e){this.extraHeaders={},e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderItemsHeaders=T;class B{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateFolderHeaders=B;class C{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CopyFolderHeaders=C;function I(e){return e}function A(e){if("synced"==e)return e;if("not_synced"==e)return e;if("partially_synced"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateFolderByIdRequestBodySyncStateField"})}function F(e){return{id:null==e.id?void 0:e.id}}function M(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBodyParentField"'});if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "UpdateFolderByIdRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function D(e){return e}function R(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateFolderByIdRequestBodySharedLinkAccessField"})}function P(e){return{can_download:null==e.canDownload?void 0:e.canDownload}}function O(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,h.sdIsBoolean)(e.can_download))throw new p.BoxSdkError({message:'Expecting boolean for "can_download" of type "UpdateFolderByIdRequestBodySharedLinkPermissionsField"'});return{canDownload:null==e.can_download?void 0:e.can_download}}function z(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,s.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:P(e.permissions)}}function N(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBodySharedLinkField"'});const t=null==e.access?void 0:R(e.access);if(null!=e.password&&!(0,f.sdIsString)(e.password))throw new p.BoxSdkError({message:'Expecting string for "password" of type "UpdateFolderByIdRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,f.sdIsString)(e.vanity_name))throw new p.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateFolderByIdRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,f.sdIsString)(e.unshared_at))throw new p.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateFolderByIdRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,a.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:O(e.permissions)}}function q(e){return e}function U(e){if("open"==e)return e;if("collaborators"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateFolderByIdRequestBodyFolderUploadEmailAccessField"})}function L(e){return{access:null==e.access?void 0:e.access}}function j(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBodyFolderUploadEmailField"'});return{access:null==e.access?void 0:U(e.access)}}function H(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function $(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateFolderByIdRequestBodyCollectionsField"'});if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "UpdateFolderByIdRequestBodyCollectionsField"'});const t=null==e.id?void 0:e.id;if(null!=e.type&&!(0,f.sdIsString)(e.type))throw new p.BoxSdkError({message:'Expecting string for "type" of type "UpdateFolderByIdRequestBodyCollectionsField"'});return{id:t,type:null==e.type?void 0:e.type}}function G(e){return{name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description,sync_state:null==e.syncState?void 0:e.syncState,can_non_owners_invite:null==e.canNonOwnersInvite?void 0:e.canNonOwnersInvite,parent:null==e.parent?void 0:F(e.parent),shared_link:null==e.sharedLink?void 0:z(e.sharedLink),folder_upload_email:null==e.folderUploadEmail?void 0:L(e.folderUploadEmail),tags:null==e.tags?void 0:e.tags.map((function(e){return e})),is_collaboration_restricted_to_enterprise:null==e.isCollaborationRestrictedToEnterprise?void 0:e.isCollaborationRestrictedToEnterprise,collections:null==e.collections?void 0:e.collections.map((function(e){return H(e)})),can_non_owners_view_collaborators:null==e.canNonOwnersViewCollaborators?void 0:e.canNonOwnersViewCollaborators}}function W(e){return{id:e.id}}function K(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateFolderRequestBodyParentField"'});if(null==e.id)throw new p.BoxSdkError({message:'Expecting "id" of type "CreateFolderRequestBodyParentField" to be defined'});if(!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "CreateFolderRequestBodyParentField"'});return{id:e.id}}function V(e){return e}function J(e){if("open"==e)return e;if("collaborators"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateFolderRequestBodyFolderUploadEmailAccessField"})}function Y(e){return{access:null==e.access?void 0:e.access}}function Q(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateFolderRequestBodyFolderUploadEmailField"'});return{access:null==e.access?void 0:J(e.access)}}function Z(e){return e}function X(e){if("synced"==e)return e;if("not_synced"==e)return e;if("partially_synced"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateFolderRequestBodySyncStateField"})}function ee(e){return{name:e.name,parent:W(e.parent),folder_upload_email:null==e.folderUploadEmail?void 0:Y(e.folderUploadEmail),sync_state:null==e.syncState?void 0:e.syncState}}function te(e){return{id:e.id}}function re(e){if(!(0,g.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CopyFolderRequestBodyParentField"'});if(null==e.id)throw new p.BoxSdkError({message:'Expecting "id" of type "CopyFolderRequestBodyParentField" to be defined'});if(!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "CopyFolderRequestBodyParentField"'});return{id:e.id}}function ie(e){return{name:null==e.name?void 0:e.name,parent:te(e.parent)}}t.FoldersManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFolderById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0,sort:(0,c.toString)(i.sort),direction:(0,c.toString)(i.direction),offset:(0,c.toString)(i.offset),limit:(0,c.toString)(i.limit)}),l=(0,d.prepareParams)(Object.assign({"if-none-match":(0,c.toString)(o.ifNoneMatch),boxapi:(0,c.toString)(o.boxapi)},o.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,c.toString)(e)),method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(p.data)),{rawData:p.data})}))}updateFolderById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.queryParams,s=r.headers,a=r.cancellationToken,l=(0,d.prepareParams)({fields:o.fields?o.fields.map(c.toString).join(","):void 0}),p=(0,d.prepareParams)(Object.assign({"if-match":(0,c.toString)(s.ifMatch)},s.extraHeaders)),h=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,c.toString)(e)),method:"PUT",params:l,headers:p,data:G(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(h.data)),{rawData:h.data})}))}deleteFolderById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)({recursive:(0,c.toString)(i.recursive)}),a=(0,d.prepareParams)(Object.assign({"if-match":(0,c.toString)(n.ifMatch)},n.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,c.toString)(e)),method:"DELETE",params:s,headers:a,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}getFolderItems(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0,usemarker:(0,c.toString)(i.usemarker),marker:(0,c.toString)(i.marker),offset:(0,c.toString)(i.offset),limit:(0,c.toString)(i.limit),sort:(0,c.toString)(i.sort),direction:(0,c.toString)(i.direction)}),l=(0,d.prepareParams)(Object.assign({boxapi:(0,c.toString)(n.boxapi)},n.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,c.toString)(e),"/items"),method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeItems)(p.data)),{rawData:p.data})}))}createFolder(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new _({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0}),l=(0,d.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders"),method:"POST",params:a,headers:l,data:ee(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(p.data)),{rawData:p.data})}))}copyFolder(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new x({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),o=i.queryParams,s=i.headers,a=i.cancellationToken,l=(0,d.prepareParams)({fields:o.fields?o.fields.map(c.toString).join(","):void 0}),p=(0,d.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,c.toString)(e),"/copy"),method:"POST",params:l,headers:p,data:ie(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(h.data)),{rawData:h.data})}))}}},49534:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsManager=t.DeleteGroupByIdHeaders=t.UpdateGroupByIdHeaders=t.GetGroupByIdHeaders=t.CreateGroupHeaders=t.GetGroupsHeaders=t.DeleteGroupByIdOptionals=t.UpdateGroupByIdOptionals=t.GetGroupByIdOptionals=t.CreateGroupOptionals=void 0,t.serializeCreateGroupRequestBodyInvitabilityLevelField=x,t.deserializeCreateGroupRequestBodyInvitabilityLevelField=S,t.serializeCreateGroupRequestBodyMemberViewabilityLevelField=k,t.deserializeCreateGroupRequestBodyMemberViewabilityLevelField=E,t.serializeCreateGroupRequestBody=T,t.deserializeCreateGroupRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateGroupRequestBody"'});if(null==e.name)throw new c.BoxSdkError({message:'Expecting "name" of type "CreateGroupRequestBody" to be defined'});if(!(0,u.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "CreateGroupRequestBody"'});const t=e.name;if(null!=e.provenance&&!(0,u.sdIsString)(e.provenance))throw new c.BoxSdkError({message:'Expecting string for "provenance" of type "CreateGroupRequestBody"'});const r=null==e.provenance?void 0:e.provenance;if(null!=e.external_sync_identifier&&!(0,u.sdIsString)(e.external_sync_identifier))throw new c.BoxSdkError({message:'Expecting string for "external_sync_identifier" of type "CreateGroupRequestBody"'});const i=null==e.external_sync_identifier?void 0:e.external_sync_identifier;if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new c.BoxSdkError({message:'Expecting string for "description" of type "CreateGroupRequestBody"'});const n=null==e.description?void 0:e.description,o=null==e.invitability_level?void 0:S(e.invitability_level),s=null==e.member_viewability_level?void 0:E(e.member_viewability_level);return{name:t,provenance:r,externalSyncIdentifier:i,description:n,invitabilityLevel:o,memberViewabilityLevel:s}},t.serializeUpdateGroupByIdRequestBodyInvitabilityLevelField=B,t.deserializeUpdateGroupByIdRequestBodyInvitabilityLevelField=C,t.serializeUpdateGroupByIdRequestBodyMemberViewabilityLevelField=I,t.deserializeUpdateGroupByIdRequestBodyMemberViewabilityLevelField=A,t.serializeUpdateGroupByIdRequestBody=F,t.deserializeUpdateGroupByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateGroupByIdRequestBody"'});if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "UpdateGroupByIdRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.provenance&&!(0,u.sdIsString)(e.provenance))throw new c.BoxSdkError({message:'Expecting string for "provenance" of type "UpdateGroupByIdRequestBody"'});const r=null==e.provenance?void 0:e.provenance;if(null!=e.external_sync_identifier&&!(0,u.sdIsString)(e.external_sync_identifier))throw new c.BoxSdkError({message:'Expecting string for "external_sync_identifier" of type "UpdateGroupByIdRequestBody"'});const i=null==e.external_sync_identifier?void 0:e.external_sync_identifier;if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new c.BoxSdkError({message:'Expecting string for "description" of type "UpdateGroupByIdRequestBody"'});const n=null==e.description?void 0:e.description,o=null==e.invitability_level?void 0:C(e.invitability_level),s=null==e.member_viewability_level?void 0:A(e.member_viewability_level);return{name:t,provenance:r,externalSyncIdentifier:i,description:n,invitabilityLevel:o,memberViewabilityLevel:s}};const n=r(55604),o=r(26718),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.queryParams={},this.headers=new v({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateGroupOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new b({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetGroupByIdOptionals=f;class m{constructor(e){this.requestBody={},this.queryParams={},this.headers=new w({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateGroupByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteGroupByIdOptionals=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGroupsHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateGroupHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGroupByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateGroupByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteGroupByIdHeaders=_;function x(e){return e}function S(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateGroupRequestBodyInvitabilityLevelField"})}function k(e){return e}function E(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateGroupRequestBodyMemberViewabilityLevelField"})}function T(e){return{name:e.name,provenance:null==e.provenance?void 0:e.provenance,external_sync_identifier:null==e.externalSyncIdentifier?void 0:e.externalSyncIdentifier,description:null==e.description?void 0:e.description,invitability_level:null==e.invitabilityLevel?void 0:e.invitabilityLevel,member_viewability_level:null==e.memberViewabilityLevel?void 0:e.memberViewabilityLevel}}function B(e){return e}function C(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateGroupByIdRequestBodyInvitabilityLevelField"})}function I(e){return e}function A(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateGroupByIdRequestBodyMemberViewabilityLevelField"})}function F(e){return{name:null==e.name?void 0:e.name,provenance:null==e.provenance?void 0:e.provenance,external_sync_identifier:null==e.externalSyncIdentifier?void 0:e.externalSyncIdentifier,description:null==e.description?void 0:e.description,invitability_level:null==e.invitabilityLevel?void 0:e.invitabilityLevel,member_viewability_level:null==e.memberViewabilityLevel?void 0:e.memberViewabilityLevel}}t.GroupsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getGroups(){return i(this,arguments,void 0,(function*(e={},t=new y({}),r){const i=new y({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({filter_term:(0,l.toString)(e.filterTerm),fields:e.fields?e.fields.map(l.toString).join(","):void 0,limit:(0,l.toString)(e.limit),offset:(0,l.toString)(e.offset)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeGroups)(c.data)),{rawData:c.data})}))}createGroup(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups"),method:"POST",params:c,headers:u,data:T(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeGroupFull)(p.data)),{rawData:p.data})}))}getGroupById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/",(0,l.toString)(e)),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeGroupFull)(p.data)),{rawData:p.data})}))}updateGroupById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:n.fields?n.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/",(0,l.toString)(e)),method:"PUT",params:u,headers:p,data:F(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeGroupFull)(h.data)),{rawData:h.data})}))}deleteGroupById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},58555:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationMappingsManager=t.DeleteSlackIntegrationMappingByIdHeaders=t.UpdateSlackIntegrationMappingByIdHeaders=t.CreateSlackIntegrationMappingHeaders=t.GetSlackIntegrationMappingHeaders=t.DeleteSlackIntegrationMappingByIdOptionals=t.UpdateSlackIntegrationMappingByIdOptionals=t.CreateSlackIntegrationMappingOptionals=void 0,t.serializeGetSlackIntegrationMappingQueryParamsPartnerItemTypeField=function(e){return e},t.deserializeGetSlackIntegrationMappingQueryParamsPartnerItemTypeField=function(e){if("channel"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize GetSlackIntegrationMappingQueryParamsPartnerItemTypeField"})},t.serializeGetSlackIntegrationMappingQueryParamsBoxItemTypeField=function(e){return e},t.deserializeGetSlackIntegrationMappingQueryParamsBoxItemTypeField=function(e){if("folder"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize GetSlackIntegrationMappingQueryParamsBoxItemTypeField"})},t.serializeUpdateSlackIntegrationMappingByIdRequestBody=k,t.deserializeUpdateSlackIntegrationMappingByIdRequestBody=function(e){if(!(0,g.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "UpdateSlackIntegrationMappingByIdRequestBody"'});const t=null==e.box_item?void 0:(0,l.deserializeIntegrationMappingBoxItemSlack)(e.box_item),r=null==e.options?void 0:(0,c.deserializeIntegrationMappingSlackOptions)(e.options);return{boxItem:t,options:r}};const n=r(17213),o=r(7152),s=r(95665),a=r(88838),l=r(88838),d=r(77954),c=r(77954),u=r(31210),p=r(93845),h=r(93845),f=r(84143),m=r(72631),g=r(50793);class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateSlackIntegrationMappingOptionals=y;class v{constructor(e){this.requestBody={},this.headers=new x({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateSlackIntegrationMappingByIdOptionals=v;class b{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteSlackIntegrationMappingByIdOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSlackIntegrationMappingHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateSlackIntegrationMappingHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateSlackIntegrationMappingByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteSlackIntegrationMappingByIdHeaders=S;function k(e){return{box_item:null==e.boxItem?void 0:(0,a.serializeIntegrationMappingBoxItemSlack)(e.boxItem),options:null==e.options?void 0:(0,d.serializeIntegrationMappingSlackOptions)(e.options)}}t.IntegrationMappingsManager=class{constructor(e){this.networkSession=new u.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getSlackIntegrationMapping(){return i(this,arguments,void 0,(function*(e={},t=new w({}),r){const i=new w({extraHeaders:t.extraHeaders}),o=(0,p.prepareParams)({marker:(0,h.toString)(e.marker),limit:(0,h.toString)(e.limit),partner_item_type:(0,h.toString)(e.partnerItemType),partner_item_id:(0,h.toString)(e.partnerItemId),box_item_id:(0,h.toString)(e.boxItemId),box_item_type:(0,h.toString)(e.boxItemType),is_manually_created:(0,h.toString)(e.isManuallyCreated)}),s=(0,p.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,f.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/integration_mappings/slack"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeIntegrationMappings)(a.data)),{rawData:a.data})}))}createSlackIntegrationMapping(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,a=(0,p.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,f.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/integration_mappings/slack"),method:"POST",headers:a,data:(0,s.serializeIntegrationMappingSlackCreateRequest)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeIntegrationMapping)(l.data)),{rawData:l.data})}))}updateSlackIntegrationMappingById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,a=(0,p.prepareParams)(Object.assign({},n.extraHeaders)),l=yield(0,f.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/integration_mappings/slack/",(0,h.toString)(e)),method:"PUT",headers:a,data:k(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeIntegrationMapping)(l.data)),{rawData:l.data})}))}deleteSlackIntegrationMappingById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,p.prepareParams)(Object.assign({},i.extraHeaders));yield(0,f.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/integration_mappings/slack/",(0,h.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},64200:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InvitesManager=t.GetInviteByIdHeaders=t.CreateInviteHeaders=t.GetInviteByIdOptionals=t.CreateInviteOptionals=void 0,t.serializeCreateInviteRequestBodyEnterpriseField=g,t.deserializeCreateInviteRequestBodyEnterpriseField=y,t.serializeCreateInviteRequestBodyActionableByField=v,t.deserializeCreateInviteRequestBodyActionableByField=b,t.serializeCreateInviteRequestBody=w,t.deserializeCreateInviteRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "CreateInviteRequestBody"'});if(null==e.enterprise)throw new d.BoxSdkError({message:'Expecting "enterprise" of type "CreateInviteRequestBody" to be defined'});const t=y(e.enterprise);if(null==e.actionable_by)throw new d.BoxSdkError({message:'Expecting "actionable_by" of type "CreateInviteRequestBody" to be defined'});const r=b(e.actionable_by);return{enterprise:t,actionableBy:r}};const n=r(6265),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793),u=r(50793);class p{constructor(e){this.queryParams={},this.headers=new f({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateInviteOptionals=p;class h{constructor(e){this.queryParams={},this.headers=new m({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetInviteByIdOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateInviteHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetInviteByIdHeaders=m;function g(e){return{id:e.id}}function y(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "CreateInviteRequestBodyEnterpriseField"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "CreateInviteRequestBodyEnterpriseField" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "CreateInviteRequestBodyEnterpriseField"'});return{id:e.id}}function v(e){return{login:null==e.login?void 0:e.login}}function b(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "CreateInviteRequestBodyActionableByField"'});if(null!=e.login&&!(0,c.sdIsString)(e.login))throw new d.BoxSdkError({message:'Expecting string for "login" of type "CreateInviteRequestBodyActionableByField"'});return{login:null==e.login?void 0:e.login}}function w(e){return{enterprise:g(e.enterprise),actionable_by:v(e.actionableBy)}}t.InvitesManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}createInvite(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)({fields:i.fields?i.fields.map(a.toString).join(","):void 0}),u=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),h=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/invites"),method:"POST",params:c,headers:u,data:w(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeInvite)(h.data)),{rawData:h.data})}))}getInviteById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)({fields:i.fields?i.fields.map(a.toString).join(","):void 0}),u=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/invites/",(0,a.toString)(e)),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeInvite)(p.data)),{rawData:p.data})}))}}},92536:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LegalHoldPoliciesManager=t.DeleteLegalHoldPolicyByIdHeaders=t.UpdateLegalHoldPolicyByIdHeaders=t.GetLegalHoldPolicyByIdHeaders=t.CreateLegalHoldPolicyHeaders=t.GetLegalHoldPoliciesHeaders=t.DeleteLegalHoldPolicyByIdOptionals=t.UpdateLegalHoldPolicyByIdOptionals=t.GetLegalHoldPolicyByIdOptionals=t.CreateLegalHoldPolicyOptionals=void 0,t.serializeCreateLegalHoldPolicyRequestBody=E,t.deserializeCreateLegalHoldPolicyRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateLegalHoldPolicyRequestBody"'});if(null==e.policy_name)throw new p.BoxSdkError({message:'Expecting "policy_name" of type "CreateLegalHoldPolicyRequestBody" to be defined'});if(!(0,f.sdIsString)(e.policy_name))throw new p.BoxSdkError({message:'Expecting string for "policy_name" of type "CreateLegalHoldPolicyRequestBody"'});const t=e.policy_name;if(null!=e.description&&!(0,f.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "CreateLegalHoldPolicyRequestBody"'});const r=null==e.description?void 0:e.description;if(null!=e.filter_started_at&&!(0,f.sdIsString)(e.filter_started_at))throw new p.BoxSdkError({message:'Expecting string for "filter_started_at" of type "CreateLegalHoldPolicyRequestBody"'});const i=null==e.filter_started_at?void 0:(0,a.deserializeDateTime)(e.filter_started_at);if(null!=e.filter_ended_at&&!(0,f.sdIsString)(e.filter_ended_at))throw new p.BoxSdkError({message:'Expecting string for "filter_ended_at" of type "CreateLegalHoldPolicyRequestBody"'});const n=null==e.filter_ended_at?void 0:(0,a.deserializeDateTime)(e.filter_ended_at);if(null!=e.is_ongoing&&!(0,h.sdIsBoolean)(e.is_ongoing))throw new p.BoxSdkError({message:'Expecting boolean for "is_ongoing" of type "CreateLegalHoldPolicyRequestBody"'});const o=null==e.is_ongoing?void 0:e.is_ongoing;return{policyName:t,description:r,filterStartedAt:i,filterEndedAt:n,isOngoing:o}},t.serializeUpdateLegalHoldPolicyByIdRequestBody=T,t.deserializeUpdateLegalHoldPolicyByIdRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateLegalHoldPolicyByIdRequestBody"'});if(null!=e.policy_name&&!(0,f.sdIsString)(e.policy_name))throw new p.BoxSdkError({message:'Expecting string for "policy_name" of type "UpdateLegalHoldPolicyByIdRequestBody"'});const t=null==e.policy_name?void 0:e.policy_name;if(null!=e.description&&!(0,f.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "UpdateLegalHoldPolicyByIdRequestBody"'});const r=null==e.description?void 0:e.description;if(null!=e.release_notes&&!(0,f.sdIsString)(e.release_notes))throw new p.BoxSdkError({message:'Expecting string for "release_notes" of type "UpdateLegalHoldPolicyByIdRequestBody"'});const i=null==e.release_notes?void 0:e.release_notes;return{policyName:t,description:r,releaseNotes:i}};const n=r(48910),o=r(83750),s=r(93845),a=r(93845),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793),m=r(50793);class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateLegalHoldPolicyOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetLegalHoldPolicyByIdOptionals=y;class v{constructor(e){this.requestBody={},this.headers=new S({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateLegalHoldPolicyByIdOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteLegalHoldPolicyByIdOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetLegalHoldPoliciesHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateLegalHoldPolicyHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetLegalHoldPolicyByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateLegalHoldPolicyByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteLegalHoldPolicyByIdHeaders=k;function E(e){return{policy_name:e.policyName,description:null==e.description?void 0:e.description,filter_started_at:null==e.filterStartedAt?void 0:(0,s.serializeDateTime)(e.filterStartedAt),filter_ended_at:null==e.filterEndedAt?void 0:(0,s.serializeDateTime)(e.filterEndedAt),is_ongoing:null==e.isOngoing?void 0:e.isOngoing}}function T(e){return{policy_name:null==e.policyName?void 0:e.policyName,description:null==e.description?void 0:e.description,release_notes:null==e.releaseNotes?void 0:e.releaseNotes}}t.LegalHoldPoliciesManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getLegalHoldPolicies(){return i(this,arguments,void 0,(function*(e={},t=new w({}),r){const i=new w({extraHeaders:t.extraHeaders}),o=(0,d.prepareParams)({policy_name:(0,c.toString)(e.policyName),fields:e.fields?e.fields.map(c.toString).join(","):void 0,marker:(0,c.toString)(e.marker),limit:(0,c.toString)(e.limit)}),s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policies"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeLegalHoldPolicies)(a.data)),{rawData:a.data})}))}createLegalHoldPolicy(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policies"),method:"POST",headers:s,data:E(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeLegalHoldPolicy)(a.data)),{rawData:a.data})}))}getLegalHoldPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policies/",(0,c.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeLegalHoldPolicy)(a.data)),{rawData:a.data})}))}updateLegalHoldPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)(Object.assign({},n.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policies/",(0,c.toString)(e)),method:"PUT",headers:a,data:T(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeLegalHoldPolicy)(l.data)),{rawData:l.data})}))}deleteLegalHoldPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,d.prepareParams)(Object.assign({},i.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policies/",(0,c.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},22678:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LegalHoldPolicyAssignmentsManager=t.GetLegalHoldPolicyAssignmentFileOnHoldHeaders=t.DeleteLegalHoldPolicyAssignmentByIdHeaders=t.GetLegalHoldPolicyAssignmentByIdHeaders=t.CreateLegalHoldPolicyAssignmentHeaders=t.GetLegalHoldPolicyAssignmentsHeaders=t.GetLegalHoldPolicyAssignmentFileOnHoldOptionals=t.DeleteLegalHoldPolicyAssignmentByIdOptionals=t.GetLegalHoldPolicyAssignmentByIdOptionals=t.CreateLegalHoldPolicyAssignmentOptionals=t.GetLegalHoldPolicyAssignmentsOptionals=void 0,t.serializeGetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField=function(e){return e},t.deserializeGetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField=function(e){if("file"==e)return e;if("file_version"==e)return e;if("folder"==e)return e;if("user"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField"})},t.serializeCreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField=k,t.deserializeCreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField=E,t.serializeCreateLegalHoldPolicyAssignmentRequestBodyAssignToField=T,t.deserializeCreateLegalHoldPolicyAssignmentRequestBodyAssignToField=B,t.serializeCreateLegalHoldPolicyAssignmentRequestBody=C,t.deserializeCreateLegalHoldPolicyAssignmentRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateLegalHoldPolicyAssignmentRequestBody"'});if(null==e.policy_id)throw new u.BoxSdkError({message:'Expecting "policy_id" of type "CreateLegalHoldPolicyAssignmentRequestBody" to be defined'});if(!(0,p.sdIsString)(e.policy_id))throw new u.BoxSdkError({message:'Expecting string for "policy_id" of type "CreateLegalHoldPolicyAssignmentRequestBody"'});const t=e.policy_id;if(null==e.assign_to)throw new u.BoxSdkError({message:'Expecting "assign_to" of type "CreateLegalHoldPolicyAssignmentRequestBody" to be defined'});const r=B(e.assign_to);return{policyId:t,assignTo:r}};const n=r(44212),o=r(55047),s=r(94983),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetLegalHoldPolicyAssignmentsOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateLegalHoldPolicyAssignmentOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetLegalHoldPolicyAssignmentByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteLegalHoldPolicyAssignmentByIdOptionals=y;class v{constructor(e){this.queryParams={},this.headers=new S({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetLegalHoldPolicyAssignmentFileOnHoldOptionals=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetLegalHoldPolicyAssignmentsHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateLegalHoldPolicyAssignmentHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetLegalHoldPolicyAssignmentByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteLegalHoldPolicyAssignmentByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetLegalHoldPolicyAssignmentFileOnHoldHeaders=S;function k(e){return e}function E(e){if("file"==e)return e;if("file_version"==e)return e;if("folder"==e)return e;if("user"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField"})}function T(e){return{type:e.type,id:e.id}}function B(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateLegalHoldPolicyAssignmentRequestBodyAssignToField"'});if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "CreateLegalHoldPolicyAssignmentRequestBodyAssignToField" to be defined'});const t=E(e.type);if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "CreateLegalHoldPolicyAssignmentRequestBodyAssignToField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CreateLegalHoldPolicyAssignmentRequestBodyAssignToField"'});return{type:t,id:e.id}}function C(e){return{policy_id:e.policyId,assign_to:T(e.assignTo)}}t.LegalHoldPolicyAssignmentsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getLegalHoldPolicyAssignments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)({policy_id:(0,d.toString)(e.policyId),assign_to_type:(0,d.toString)(e.assignToType),assign_to_id:(0,d.toString)(e.assignToId),marker:(0,d.toString)(e.marker),limit:(0,d.toString)(e.limit),fields:e.fields?e.fields.map(d.toString).join(","):void 0}),a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policy_assignments"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeLegalHoldPolicyAssignments)(u.data)),{rawData:u.data})}))}createLegalHoldPolicyAssignment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policy_assignments"),method:"POST",headers:s,data:C(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeLegalHoldPolicyAssignment)(a.data)),{rawData:a.data})}))}getLegalHoldPolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policy_assignments/",(0,d.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeLegalHoldPolicyAssignment)(a.data)),{rawData:a.data})}))}deleteLegalHoldPolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policy_assignments/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getLegalHoldPolicyAssignmentFileOnHold(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,a=(0,l.prepareParams)({marker:(0,d.toString)(i.marker),limit:(0,d.toString)(i.limit),fields:i.fields?i.fields.map(d.toString).join(","):void 0}),u=(0,l.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/legal_hold_policy_assignments/",(0,d.toString)(e),"/files_on_hold"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,s.deserializeFilesOnHold)(p.data)),{rawData:p.data})}))}}},69496:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ListCollaborationsManager=t.GetGroupCollaborationsHeaders=t.GetCollaborationsHeaders=t.GetFolderCollaborationsHeaders=t.GetFileCollaborationsHeaders=t.GetGroupCollaborationsOptionals=t.GetCollaborationsOptionals=t.GetFolderCollaborationsOptionals=t.GetFileCollaborationsOptionals=void 0,t.serializeGetCollaborationsQueryParamsStatusField=function(e){return e},t.deserializeGetCollaborationsQueryParamsStatusField=function(e){if("pending"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize GetCollaborationsQueryParamsStatusField"})};const n=r(7546),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631);class c{constructor(e){this.queryParams={},this.headers=new f({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileCollaborationsOptionals=c;class u{constructor(e){this.queryParams={},this.headers=new m({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFolderCollaborationsOptionals=u;class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCollaborationsOptionals=p;class h{constructor(e){this.queryParams={},this.headers=new y({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetGroupCollaborationsOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileCollaborationsHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFolderCollaborationsHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationsHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGroupCollaborationsHeaders=y;t.ListCollaborationsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileCollaborations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,u=(0,s.prepareParams)({fields:i.fields?i.fields.map(a.toString).join(","):void 0,limit:(0,a.toString)(i.limit),marker:(0,a.toString)(i.marker)}),p=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),h=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,a.toString)(e),"/collaborations"),method:"GET",params:u,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeCollaborations)(h.data)),{rawData:h.data})}))}getFolderCollaborations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)({fields:i.fields?i.fields.map(a.toString).join(","):void 0}),p=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),h=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,a.toString)(e),"/collaborations"),method:"GET",params:c,headers:p,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeCollaborations)(h.data)),{rawData:h.data})}))}getCollaborations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,d=(0,s.prepareParams)({status:(0,a.toString)(e.status),fields:e.fields?e.fields.map(a.toString).join(","):void 0,offset:(0,a.toString)(e.offset),limit:(0,a.toString)(e.limit)}),c=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaborations"),method:"GET",params:d,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeCollaborations)(u.data)),{rawData:u.data})}))}getGroupCollaborations(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,d=r.cancellationToken,c=(0,s.prepareParams)({limit:(0,a.toString)(i.limit),offset:(0,a.toString)(i.offset)}),u=(0,s.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/",(0,a.toString)(e),"/collaborations"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:d});return Object.assign(Object.assign({},(0,n.deserializeCollaborations)(p.data)),{rawData:p.data})}))}}},19631:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MembershipsManager=t.DeleteGroupMembershipByIdHeaders=t.UpdateGroupMembershipByIdHeaders=t.GetGroupMembershipByIdHeaders=t.CreateGroupMembershipHeaders=t.GetGroupMembershipsHeaders=t.GetUserMembershipsHeaders=t.DeleteGroupMembershipByIdOptionals=t.UpdateGroupMembershipByIdOptionals=t.GetGroupMembershipByIdOptionals=t.CreateGroupMembershipOptionals=t.GetGroupMembershipsOptionals=t.GetUserMembershipsOptionals=void 0,t.serializeCreateGroupMembershipRequestBodyUserField=T,t.deserializeCreateGroupMembershipRequestBodyUserField=B,t.serializeCreateGroupMembershipRequestBodyGroupField=C,t.deserializeCreateGroupMembershipRequestBodyGroupField=I,t.serializeCreateGroupMembershipRequestBodyRoleField=A,t.deserializeCreateGroupMembershipRequestBodyRoleField=F,t.serializeCreateGroupMembershipRequestBody=M,t.deserializeCreateGroupMembershipRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateGroupMembershipRequestBody"'});if(null==e.user)throw new c.BoxSdkError({message:'Expecting "user" of type "CreateGroupMembershipRequestBody" to be defined'});const t=B(e.user);if(null==e.group)throw new c.BoxSdkError({message:'Expecting "group" of type "CreateGroupMembershipRequestBody" to be defined'});const r=I(e.group),i=null==e.role?void 0:F(e.role);if(null!=e.configurable_permissions&&!(0,h.sdIsMap)(e.configurable_permissions))throw new c.BoxSdkError({message:'Expecting object for "configurable_permissions" of type "CreateGroupMembershipRequestBody"'});const n=null==e.configurable_permissions?void 0:(0,h.sdIsMap)(e.configurable_permissions)?Object.fromEntries(Object.entries(e.configurable_permissions).map((([e,t])=>[e,function(e){if(!(0,u.sdIsBoolean)(e))throw new c.BoxSdkError({message:'Expecting boolean for "CreateGroupMembershipRequestBody"'});return e}(t)]))):{};return{user:t,group:r,role:i,configurablePermissions:n}},t.serializeUpdateGroupMembershipByIdRequestBodyRoleField=D,t.deserializeUpdateGroupMembershipByIdRequestBodyRoleField=R,t.serializeUpdateGroupMembershipByIdRequestBody=P,t.deserializeUpdateGroupMembershipByIdRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateGroupMembershipByIdRequestBody"'});const t=null==e.role?void 0:R(e.role);if(null!=e.configurable_permissions&&!(0,h.sdIsMap)(e.configurable_permissions))throw new c.BoxSdkError({message:'Expecting object for "configurable_permissions" of type "UpdateGroupMembershipByIdRequestBody"'});const r=null==e.configurable_permissions?void 0:(0,h.sdIsMap)(e.configurable_permissions)?Object.fromEntries(Object.entries(e.configurable_permissions).map((([e,t])=>[e,function(e){if(!(0,u.sdIsBoolean)(e))throw new c.BoxSdkError({message:'Expecting boolean for "UpdateGroupMembershipByIdRequestBody"'});return e}(t)]))):{};return{role:t,configurablePermissions:r}};const n=r(34812),o=r(93695),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f{constructor(e){this.queryParams={},this.headers=new w({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetUserMembershipsOptionals=f;class m{constructor(e){this.queryParams={},this.headers=new _({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetGroupMembershipsOptionals=m;class g{constructor(e){this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateGroupMembershipOptionals=g;class y{constructor(e){this.queryParams={},this.headers=new S({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetGroupMembershipByIdOptionals=y;class v{constructor(e){this.requestBody={},this.queryParams={},this.headers=new k({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateGroupMembershipByIdOptionals=v;class b{constructor(e){this.headers=new E({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteGroupMembershipByIdOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUserMembershipsHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGroupMembershipsHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateGroupMembershipHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGroupMembershipByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateGroupMembershipByIdHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteGroupMembershipByIdHeaders=E;function T(e){return{id:e.id}}function B(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateGroupMembershipRequestBodyUserField"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateGroupMembershipRequestBodyUserField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateGroupMembershipRequestBodyUserField"'});return{id:e.id}}function C(e){return{id:e.id}}function I(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateGroupMembershipRequestBodyGroupField"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateGroupMembershipRequestBodyGroupField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateGroupMembershipRequestBodyGroupField"'});return{id:e.id}}function A(e){return e}function F(e){if("member"==e)return e;if("admin"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateGroupMembershipRequestBodyRoleField"})}function M(e){return{user:T(e.user),group:C(e.group),role:null==e.role?void 0:e.role,configurable_permissions:null==e.configurablePermissions?void 0:e.configurablePermissions}}function D(e){return e}function R(e){if("member"==e)return e;if("admin"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateGroupMembershipByIdRequestBodyRoleField"})}function P(e){return{role:null==e.role?void 0:e.role,configurable_permissions:null==e.configurablePermissions?void 0:e.configurablePermissions}}t.MembershipsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getUserMemberships(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({limit:(0,l.toString)(i.limit),offset:(0,l.toString)(i.offset)}),u=(0,a.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,l.toString)(e),"/memberships"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeGroupMemberships)(p.data)),{rawData:p.data})}))}getGroupMemberships(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({limit:(0,l.toString)(i.limit),offset:(0,l.toString)(i.offset)}),u=(0,a.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/",(0,l.toString)(e),"/memberships"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeGroupMemberships)(p.data)),{rawData:p.data})}))}createGroupMembership(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/group_memberships"),method:"POST",params:c,headers:u,data:M(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeGroupMembership)(p.data)),{rawData:p.data})}))}getGroupMembershipById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/group_memberships/",(0,l.toString)(e)),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeGroupMembership)(p.data)),{rawData:p.data})}))}updateGroupMembershipById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:n.fields?n.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/group_memberships/",(0,l.toString)(e)),method:"PUT",params:u,headers:p,data:P(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeGroupMembership)(h.data)),{rawData:h.data})}))}deleteGroupMembershipById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/group_memberships/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},35561:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataCascadePoliciesManager=t.ApplyMetadataCascadePolicyHeaders=t.DeleteMetadataCascadePolicyByIdHeaders=t.GetMetadataCascadePolicyByIdHeaders=t.CreateMetadataCascadePolicyHeaders=t.GetMetadataCascadePoliciesHeaders=t.ApplyMetadataCascadePolicyOptionals=t.DeleteMetadataCascadePolicyByIdOptionals=t.GetMetadataCascadePolicyByIdOptionals=t.CreateMetadataCascadePolicyOptionals=t.GetMetadataCascadePoliciesOptionals=void 0,t.serializeCreateMetadataCascadePolicyRequestBodyScopeField=S,t.deserializeCreateMetadataCascadePolicyRequestBodyScopeField=k,t.serializeCreateMetadataCascadePolicyRequestBody=E,t.deserializeCreateMetadataCascadePolicyRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateMetadataCascadePolicyRequestBody"'});if(null==e.folder_id)throw new c.BoxSdkError({message:'Expecting "folder_id" of type "CreateMetadataCascadePolicyRequestBody" to be defined'});if(!(0,u.sdIsString)(e.folder_id))throw new c.BoxSdkError({message:'Expecting string for "folder_id" of type "CreateMetadataCascadePolicyRequestBody"'});const t=e.folder_id;if(null==e.scope)throw new c.BoxSdkError({message:'Expecting "scope" of type "CreateMetadataCascadePolicyRequestBody" to be defined'});const r=k(e.scope);if(null==e.templateKey)throw new c.BoxSdkError({message:'Expecting "templateKey" of type "CreateMetadataCascadePolicyRequestBody" to be defined'});if(!(0,u.sdIsString)(e.templateKey))throw new c.BoxSdkError({message:'Expecting string for "templateKey" of type "CreateMetadataCascadePolicyRequestBody"'});const i=e.templateKey;return{folderId:t,scope:r,templateKey:i}},t.serializeApplyMetadataCascadePolicyRequestBodyConflictResolutionField=T,t.deserializeApplyMetadataCascadePolicyRequestBodyConflictResolutionField=B,t.serializeApplyMetadataCascadePolicyRequestBody=C,t.deserializeApplyMetadataCascadePolicyRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "ApplyMetadataCascadePolicyRequestBody"'});if(null==e.conflict_resolution)throw new c.BoxSdkError({message:'Expecting "conflict_resolution" of type "ApplyMetadataCascadePolicyRequestBody" to be defined'});return{conflictResolution:B(e.conflict_resolution)}};const n=r(93267),o=r(45243),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetMetadataCascadePoliciesOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateMetadataCascadePolicyOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetMetadataCascadePolicyByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteMetadataCascadePolicyByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.ApplyMetadataCascadePolicyOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetMetadataCascadePoliciesHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateMetadataCascadePolicyHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetMetadataCascadePolicyByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteMetadataCascadePolicyByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.ApplyMetadataCascadePolicyHeaders=x;function S(e){return e}function k(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateMetadataCascadePolicyRequestBodyScopeField"})}function E(e){return{folder_id:e.folderId,scope:e.scope,templateKey:e.templateKey}}function T(e){return e}function B(e){if("none"==e)return e;if("overwrite"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize ApplyMetadataCascadePolicyRequestBodyConflictResolutionField"})}function C(e){return{conflict_resolution:e.conflictResolution}}t.MetadataCascadePoliciesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getMetadataCascadePolicies(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)({folder_id:(0,l.toString)(e.folderId),owner_enterprise_id:(0,l.toString)(e.ownerEnterpriseId),marker:(0,l.toString)(e.marker),offset:(0,l.toString)(e.offset)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_cascade_policies"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeMetadataCascadePolicies)(u.data)),{rawData:u.data})}))}createMetadataCascadePolicy(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_cascade_policies"),method:"POST",headers:s,data:E(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeMetadataCascadePolicy)(l.data)),{rawData:l.data})}))}getMetadataCascadePolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_cascade_policies/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeMetadataCascadePolicy)(c.data)),{rawData:c.data})}))}deleteMetadataCascadePolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_cascade_policies/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}applyMetadataCascadePolicy(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new y({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,a.prepareParams)(Object.assign({},n.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_cascade_policies/",(0,l.toString)(e),"/apply"),method:"POST",headers:s,data:C(t),contentType:"application/json",responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}}},3670:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataTemplatesManager=t.CreateMetadataTemplateHeaders=t.GetEnterpriseMetadataTemplatesHeaders=t.GetGlobalMetadataTemplatesHeaders=t.GetMetadataTemplateByIdHeaders=t.DeleteMetadataTemplateHeaders=t.UpdateMetadataTemplateHeaders=t.GetMetadataTemplateHeaders=t.GetMetadataTemplatesByInstanceIdHeaders=t.CreateMetadataTemplateOptionals=t.GetMetadataTemplateByIdOptionals=t.DeleteMetadataTemplateOptionals=t.UpdateMetadataTemplateOptionals=t.GetMetadataTemplateOptionals=t.GetMetadataTemplatesByInstanceIdOptionals=void 0,t.serializeGetMetadataTemplateScope=function(e){return e},t.deserializeGetMetadataTemplateScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetMetadataTemplateScope"})},t.serializeUpdateMetadataTemplateScope=function(e){return e},t.deserializeUpdateMetadataTemplateScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateMetadataTemplateScope"})},t.serializeUpdateMetadataTemplateRequestBodyOpField=I,t.deserializeUpdateMetadataTemplateRequestBodyOpField=A,t.serializeUpdateMetadataTemplateRequestBody=F,t.deserializeUpdateMetadataTemplateRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateMetadataTemplateRequestBody"'});if(null==e.op)throw new c.BoxSdkError({message:'Expecting "op" of type "UpdateMetadataTemplateRequestBody" to be defined'});const t=A(e.op);if(null!=e.data&&!(0,f.sdIsMap)(e.data))throw new c.BoxSdkError({message:'Expecting object for "data" of type "UpdateMetadataTemplateRequestBody"'});const r=null==e.data?void 0:(0,f.sdIsMap)(e.data)?Object.fromEntries(Object.entries(e.data).map((([e,t])=>[e,t]))):{};if(null!=e.fieldKey&&!(0,p.sdIsString)(e.fieldKey))throw new c.BoxSdkError({message:'Expecting string for "fieldKey" of type "UpdateMetadataTemplateRequestBody"'});const i=null==e.fieldKey?void 0:e.fieldKey;if(null!=e.fieldKeys&&!(0,h.sdIsList)(e.fieldKeys))throw new c.BoxSdkError({message:'Expecting array for "fieldKeys" of type "UpdateMetadataTemplateRequestBody"'});const n=null==e.fieldKeys?void 0:(0,h.sdIsList)(e.fieldKeys)?e.fieldKeys.map((function(e){if(!(0,p.sdIsString)(e))throw new c.BoxSdkError({message:'Expecting string for "UpdateMetadataTemplateRequestBody"'});return e})):[];if(null!=e.enumOptionKey&&!(0,p.sdIsString)(e.enumOptionKey))throw new c.BoxSdkError({message:'Expecting string for "enumOptionKey" of type "UpdateMetadataTemplateRequestBody"'});const o=null==e.enumOptionKey?void 0:e.enumOptionKey;if(null!=e.enumOptionKeys&&!(0,h.sdIsList)(e.enumOptionKeys))throw new c.BoxSdkError({message:'Expecting array for "enumOptionKeys" of type "UpdateMetadataTemplateRequestBody"'});const s=null==e.enumOptionKeys?void 0:(0,h.sdIsList)(e.enumOptionKeys)?e.enumOptionKeys.map((function(e){if(!(0,p.sdIsString)(e))throw new c.BoxSdkError({message:'Expecting string for "UpdateMetadataTemplateRequestBody"'});return e})):[];if(null!=e.multiSelectOptionKey&&!(0,p.sdIsString)(e.multiSelectOptionKey))throw new c.BoxSdkError({message:'Expecting string for "multiSelectOptionKey" of type "UpdateMetadataTemplateRequestBody"'});const a=null==e.multiSelectOptionKey?void 0:e.multiSelectOptionKey;if(null!=e.multiSelectOptionKeys&&!(0,h.sdIsList)(e.multiSelectOptionKeys))throw new c.BoxSdkError({message:'Expecting array for "multiSelectOptionKeys" of type "UpdateMetadataTemplateRequestBody"'});const l=null==e.multiSelectOptionKeys?void 0:(0,h.sdIsList)(e.multiSelectOptionKeys)?e.multiSelectOptionKeys.map((function(e){if(!(0,p.sdIsString)(e))throw new c.BoxSdkError({message:'Expecting string for "UpdateMetadataTemplateRequestBody"'});return e})):[];return{op:t,data:r,fieldKey:i,fieldKeys:n,enumOptionKey:o,enumOptionKeys:s,multiSelectOptionKey:a,multiSelectOptionKeys:l}},t.serializeDeleteMetadataTemplateScope=function(e){return e},t.deserializeDeleteMetadataTemplateScope=function(e){if("global"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize DeleteMetadataTemplateScope"})},t.serializeCreateMetadataTemplateRequestBodyFieldsTypeField=M,t.deserializeCreateMetadataTemplateRequestBodyFieldsTypeField=D,t.serializeCreateMetadataTemplateRequestBodyFieldsOptionsField=R,t.deserializeCreateMetadataTemplateRequestBodyFieldsOptionsField=P,t.serializeCreateMetadataTemplateRequestBodyFieldsField=O,t.deserializeCreateMetadataTemplateRequestBodyFieldsField=z,t.serializeCreateMetadataTemplateRequestBody=N,t.deserializeCreateMetadataTemplateRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateMetadataTemplateRequestBody"'});if(null==e.scope)throw new c.BoxSdkError({message:'Expecting "scope" of type "CreateMetadataTemplateRequestBody" to be defined'});if(!(0,p.sdIsString)(e.scope))throw new c.BoxSdkError({message:'Expecting string for "scope" of type "CreateMetadataTemplateRequestBody"'});const t=e.scope;if(null!=e.templateKey&&!(0,p.sdIsString)(e.templateKey))throw new c.BoxSdkError({message:'Expecting string for "templateKey" of type "CreateMetadataTemplateRequestBody"'});const r=null==e.templateKey?void 0:e.templateKey;if(null==e.displayName)throw new c.BoxSdkError({message:'Expecting "displayName" of type "CreateMetadataTemplateRequestBody" to be defined'});if(!(0,p.sdIsString)(e.displayName))throw new c.BoxSdkError({message:'Expecting string for "displayName" of type "CreateMetadataTemplateRequestBody"'});const i=e.displayName;if(null!=e.hidden&&!(0,u.sdIsBoolean)(e.hidden))throw new c.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateMetadataTemplateRequestBody"'});const n=null==e.hidden?void 0:e.hidden;if(null!=e.fields&&!(0,h.sdIsList)(e.fields))throw new c.BoxSdkError({message:'Expecting array for "fields" of type "CreateMetadataTemplateRequestBody"'});const o=null==e.fields?void 0:(0,h.sdIsList)(e.fields)?e.fields.map((function(e){return z(e)})):[];if(null!=e.copyInstanceOnItemCopy&&!(0,u.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new c.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "CreateMetadataTemplateRequestBody"'});const s=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;return{scope:t,templateKey:r,displayName:i,hidden:n,fields:o,copyInstanceOnItemCopy:s}};const n=r(12444),o=r(81631),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetMetadataTemplatesByInstanceIdOptionals=m;class g{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetMetadataTemplateOptionals=g;class y{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateMetadataTemplateOptionals=y;class v{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteMetadataTemplateOptionals=v;class b{constructor(e){this.headers=new E({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetMetadataTemplateByIdOptionals=b;class w{constructor(e){this.headers=new C({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateMetadataTemplateOptionals=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetMetadataTemplatesByInstanceIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetMetadataTemplateHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateMetadataTemplateHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteMetadataTemplateHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetMetadataTemplateByIdHeaders=E;class T{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetGlobalMetadataTemplatesHeaders=T;class B{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetEnterpriseMetadataTemplatesHeaders=B;class C{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateMetadataTemplateHeaders=C;function I(e){return e}function A(e){if("editTemplate"==e)return e;if("addField"==e)return e;if("reorderFields"==e)return e;if("addEnumOption"==e)return e;if("reorderEnumOptions"==e)return e;if("reorderMultiSelectOptions"==e)return e;if("addMultiSelectOption"==e)return e;if("editField"==e)return e;if("removeField"==e)return e;if("editEnumOption"==e)return e;if("removeEnumOption"==e)return e;if("editMultiSelectOption"==e)return e;if("removeMultiSelectOption"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateMetadataTemplateRequestBodyOpField"})}function F(e){return{op:e.op,data:null==e.data?void 0:Object.fromEntries(Object.entries(e.data).map((([e,t])=>[e,t]))),fieldKey:null==e.fieldKey?void 0:e.fieldKey,fieldKeys:null==e.fieldKeys?void 0:e.fieldKeys.map((function(e){return e})),enumOptionKey:null==e.enumOptionKey?void 0:e.enumOptionKey,enumOptionKeys:null==e.enumOptionKeys?void 0:e.enumOptionKeys.map((function(e){return e})),multiSelectOptionKey:null==e.multiSelectOptionKey?void 0:e.multiSelectOptionKey,multiSelectOptionKeys:null==e.multiSelectOptionKeys?void 0:e.multiSelectOptionKeys.map((function(e){return e}))}}function M(e){return e}function D(e){if("string"==e)return e;if("float"==e)return e;if("date"==e)return e;if("enum"==e)return e;if("multiSelect"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateMetadataTemplateRequestBodyFieldsTypeField"})}function R(e){return{key:e.key}}function P(e){if(!(0,f.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateMetadataTemplateRequestBodyFieldsOptionsField"'});if(null==e.key)throw new c.BoxSdkError({message:'Expecting "key" of type "CreateMetadataTemplateRequestBodyFieldsOptionsField" to be defined'});if(!(0,p.sdIsString)(e.key))throw new c.BoxSdkError({message:'Expecting string for "key" of type "CreateMetadataTemplateRequestBodyFieldsOptionsField"'});return{key:e.key}}function O(e){return{type:e.type,key:e.key,displayName:e.displayName,description:null==e.description?void 0:e.description,hidden:null==e.hidden?void 0:e.hidden,options:null==e.options?void 0:e.options.map((function(e){return R(e)}))}}function z(e){if(!(0,f.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateMetadataTemplateRequestBodyFieldsField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateMetadataTemplateRequestBodyFieldsField" to be defined'});const t=D(e.type);if(null==e.key)throw new c.BoxSdkError({message:'Expecting "key" of type "CreateMetadataTemplateRequestBodyFieldsField" to be defined'});if(!(0,p.sdIsString)(e.key))throw new c.BoxSdkError({message:'Expecting string for "key" of type "CreateMetadataTemplateRequestBodyFieldsField"'});const r=e.key;if(null==e.displayName)throw new c.BoxSdkError({message:'Expecting "displayName" of type "CreateMetadataTemplateRequestBodyFieldsField" to be defined'});if(!(0,p.sdIsString)(e.displayName))throw new c.BoxSdkError({message:'Expecting string for "displayName" of type "CreateMetadataTemplateRequestBodyFieldsField"'});const i=e.displayName;if(null!=e.description&&!(0,p.sdIsString)(e.description))throw new c.BoxSdkError({message:'Expecting string for "description" of type "CreateMetadataTemplateRequestBodyFieldsField"'});const n=null==e.description?void 0:e.description;if(null!=e.hidden&&!(0,u.sdIsBoolean)(e.hidden))throw new c.BoxSdkError({message:'Expecting boolean for "hidden" of type "CreateMetadataTemplateRequestBodyFieldsField"'});const o=null==e.hidden?void 0:e.hidden;if(null!=e.options&&!(0,h.sdIsList)(e.options))throw new c.BoxSdkError({message:'Expecting array for "options" of type "CreateMetadataTemplateRequestBodyFieldsField"'});return{type:t,key:r,displayName:i,description:n,hidden:o,options:null==e.options?void 0:(0,h.sdIsList)(e.options)?e.options.map((function(e){return P(e)})):[]}}function N(e){return{scope:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,displayName:e.displayName,hidden:null==e.hidden?void 0:e.hidden,fields:null==e.fields?void 0:e.fields.map((function(e){return O(e)})),copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy}}t.MetadataTemplatesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getMetadataTemplatesByInstanceId(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)({metadata_instance_id:(0,l.toString)(e.metadataInstanceId)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeMetadataTemplates)(u.data)),{rawData:u.data})}))}getMetadataTemplate(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,s=i.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/",(0,l.toString)(e),"/",(0,l.toString)(t),"/schema"),method:"GET",headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeMetadataTemplate)(u.data)),{rawData:u.data})}))}updateMetadataTemplate(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,i={}){const n=new y({headers:i.headers,cancellationToken:i.cancellationToken}),s=n.headers,c=n.cancellationToken,u=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/",(0,l.toString)(e),"/",(0,l.toString)(t),"/schema"),method:"PUT",headers:u,data:r.map(F),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,o.deserializeMetadataTemplate)(p.data)),{rawData:p.data})}))}deleteMetadataTemplate(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new v({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,a.prepareParams)(Object.assign({},n.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/",(0,l.toString)(e),"/",(0,l.toString)(t),"/schema"),method:"DELETE",headers:s,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}getMetadataTemplateById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeMetadataTemplate)(c.data)),{rawData:c.data})}))}getGlobalMetadataTemplates(){return i(this,arguments,void 0,(function*(e={},t=new T({}),r){const i=new T({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/global"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeMetadataTemplates)(c.data)),{rawData:c.data})}))}getEnterpriseMetadataTemplates(){return i(this,arguments,void 0,(function*(e={},t=new B({}),r){const i=new B({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/enterprise"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeMetadataTemplates)(c.data)),{rawData:c.data})}))}createMetadataTemplate(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_templates/schema"),method:"POST",headers:s,data:N(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeMetadataTemplate)(l.data)),{rawData:l.data})}))}}},31395:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RecentItemsManager=t.GetRecentItemsHeaders=void 0;const n=r(62325),o=r(31210),s=r(93845),a=r(93845),l=r(84143);class d{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetRecentItemsHeaders=d;t.RecentItemsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getRecentItems(){return i(this,arguments,void 0,(function*(e={},t=new d({}),r){const i=new d({extraHeaders:t.extraHeaders}),o=(0,s.prepareParams)({fields:e.fields?e.fields.map(a.toString).join(","):void 0,limit:(0,a.toString)(e.limit),marker:(0,a.toString)(e.marker)}),c=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/recent_items"),method:"GET",params:o,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeRecentItems)(u.data)),{rawData:u.data})}))}}},95566:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPoliciesManager=t.DeleteRetentionPolicyByIdHeaders=t.UpdateRetentionPolicyByIdHeaders=t.GetRetentionPolicyByIdHeaders=t.CreateRetentionPolicyHeaders=t.GetRetentionPoliciesHeaders=t.DeleteRetentionPolicyByIdOptionals=t.UpdateRetentionPolicyByIdOptionals=t.GetRetentionPolicyByIdOptionals=t.CreateRetentionPolicyOptionals=void 0,t.serializeGetRetentionPoliciesQueryParamsPolicyTypeField=function(e){return e},t.deserializeGetRetentionPoliciesQueryParamsPolicyTypeField=function(e){if("finite"==e)return e;if("indefinite"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize GetRetentionPoliciesQueryParamsPolicyTypeField"})},t.serializeCreateRetentionPolicyRequestBodyPolicyTypeField=C,t.deserializeCreateRetentionPolicyRequestBodyPolicyTypeField=I,t.serializeCreateRetentionPolicyRequestBodyDispositionActionField=A,t.deserializeCreateRetentionPolicyRequestBodyDispositionActionField=F,t.serializeCreateRetentionPolicyRequestBodyRetentionTypeField=M,t.deserializeCreateRetentionPolicyRequestBodyRetentionTypeField=D,t.serializeCreateRetentionPolicyRequestBody=R,t.deserializeCreateRetentionPolicyRequestBody=function(e){if(!(0,v.sdIsMap)(e))throw new f.BoxSdkError({message:'Expecting a map for "CreateRetentionPolicyRequestBody"'});if(null==e.policy_name)throw new f.BoxSdkError({message:'Expecting "policy_name" of type "CreateRetentionPolicyRequestBody" to be defined'});if(!(0,g.sdIsString)(e.policy_name))throw new f.BoxSdkError({message:'Expecting string for "policy_name" of type "CreateRetentionPolicyRequestBody"'});const t=e.policy_name;if(null!=e.description&&!(0,g.sdIsString)(e.description))throw new f.BoxSdkError({message:'Expecting string for "description" of type "CreateRetentionPolicyRequestBody"'});const r=null==e.description?void 0:e.description;if(null==e.policy_type)throw new f.BoxSdkError({message:'Expecting "policy_type" of type "CreateRetentionPolicyRequestBody" to be defined'});const i=I(e.policy_type);if(null==e.disposition_action)throw new f.BoxSdkError({message:'Expecting "disposition_action" of type "CreateRetentionPolicyRequestBody" to be defined'});const n=F(e.disposition_action);if(null!=e.retention_length&&!(0,g.sdIsString)(e.retention_length))throw new f.BoxSdkError({message:'Expecting string for "retention_length" of type "CreateRetentionPolicyRequestBody"'});const o=null==e.retention_length?void 0:e.retention_length,s=null==e.retention_type?void 0:D(e.retention_type);if(null!=e.can_owner_extend_retention&&!(0,m.sdIsBoolean)(e.can_owner_extend_retention))throw new f.BoxSdkError({message:'Expecting boolean for "can_owner_extend_retention" of type "CreateRetentionPolicyRequestBody"'});const l=null==e.can_owner_extend_retention?void 0:e.can_owner_extend_retention;if(null!=e.are_owners_notified&&!(0,m.sdIsBoolean)(e.are_owners_notified))throw new f.BoxSdkError({message:'Expecting boolean for "are_owners_notified" of type "CreateRetentionPolicyRequestBody"'});const d=null==e.are_owners_notified?void 0:e.are_owners_notified;if(null!=e.custom_notification_recipients&&!(0,y.sdIsList)(e.custom_notification_recipients))throw new f.BoxSdkError({message:'Expecting array for "custom_notification_recipients" of type "CreateRetentionPolicyRequestBody"'});const c=null==e.custom_notification_recipients?void 0:(0,y.sdIsList)(e.custom_notification_recipients)?e.custom_notification_recipients.map((function(e){return(0,a.deserializeUserMini)(e)})):[];return{policyName:t,description:r,policyType:i,dispositionAction:n,retentionLength:o,retentionType:s,canOwnerExtendRetention:l,areOwnersNotified:d,customNotificationRecipients:c}},t.serializeUpdateRetentionPolicyByIdRequestBody=P,t.deserializeUpdateRetentionPolicyByIdRequestBody=function(e){if(!(0,v.sdIsMap)(e))throw new f.BoxSdkError({message:'Expecting a map for "UpdateRetentionPolicyByIdRequestBody"'});if(null!=e.policy_name&&!(0,g.sdIsString)(e.policy_name))throw new f.BoxSdkError({message:'Expecting string for "policy_name" of type "UpdateRetentionPolicyByIdRequestBody"'});const t=null==e.policy_name?void 0:e.policy_name;if(null!=e.description&&!(0,g.sdIsString)(e.description))throw new f.BoxSdkError({message:'Expecting string for "description" of type "UpdateRetentionPolicyByIdRequestBody"'});const r=null==e.description?void 0:e.description;if(null!=e.disposition_action&&!(0,g.sdIsString)(e.disposition_action))throw new f.BoxSdkError({message:'Expecting string for "disposition_action" of type "UpdateRetentionPolicyByIdRequestBody"'});const i=null==e.disposition_action?void 0:e.disposition_action;if(null!=e.retention_type&&!(0,g.sdIsString)(e.retention_type))throw new f.BoxSdkError({message:'Expecting string for "retention_type" of type "UpdateRetentionPolicyByIdRequestBody"'});const n=null==e.retention_type?void 0:e.retention_type;if(null!=e.retention_length&&!(0,g.sdIsString)(e.retention_length))throw new f.BoxSdkError({message:'Expecting string for "retention_length" of type "UpdateRetentionPolicyByIdRequestBody"'});const o=null==e.retention_length?void 0:e.retention_length;if(null!=e.status&&!(0,g.sdIsString)(e.status))throw new f.BoxSdkError({message:'Expecting string for "status" of type "UpdateRetentionPolicyByIdRequestBody"'});const s=null==e.status?void 0:e.status;if(null!=e.can_owner_extend_retention&&!(0,m.sdIsBoolean)(e.can_owner_extend_retention))throw new f.BoxSdkError({message:'Expecting boolean for "can_owner_extend_retention" of type "UpdateRetentionPolicyByIdRequestBody"'});const a=null==e.can_owner_extend_retention?void 0:e.can_owner_extend_retention;if(null!=e.are_owners_notified&&!(0,m.sdIsBoolean)(e.are_owners_notified))throw new f.BoxSdkError({message:'Expecting boolean for "are_owners_notified" of type "UpdateRetentionPolicyByIdRequestBody"'});const l=null==e.are_owners_notified?void 0:e.are_owners_notified;if(null!=e.custom_notification_recipients&&!(0,y.sdIsList)(e.custom_notification_recipients))throw new f.BoxSdkError({message:'Expecting array for "custom_notification_recipients" of type "UpdateRetentionPolicyByIdRequestBody"'});const c=null==e.custom_notification_recipients?void 0:(0,y.sdIsList)(e.custom_notification_recipients)?e.custom_notification_recipients.map((function(e){return(0,d.deserializeUserBase)(e)})):[];return{policyName:t,description:r,dispositionAction:i,retentionType:n,retentionLength:o,status:s,canOwnerExtendRetention:a,areOwnersNotified:l,customNotificationRecipients:c}};const n=r(6756),o=r(60960),s=r(95408),a=r(95408),l=r(78366),d=r(78366),c=r(31210),u=r(93845),p=r(93845),h=r(84143),f=r(72631),m=r(50793),g=r(50793),y=r(50793),v=r(50793);class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateRetentionPolicyOptionals=b;class w{constructor(e){this.queryParams={},this.headers=new E({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetRetentionPolicyByIdOptionals=w;class _{constructor(e){this.requestBody={},this.headers=new T({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateRetentionPolicyByIdOptionals=_;class x{constructor(e){this.headers=new B({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteRetentionPolicyByIdOptionals=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetRetentionPoliciesHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateRetentionPolicyHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetRetentionPolicyByIdHeaders=E;class T{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateRetentionPolicyByIdHeaders=T;class B{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteRetentionPolicyByIdHeaders=B;function C(e){return e}function I(e){if("finite"==e)return e;if("indefinite"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize CreateRetentionPolicyRequestBodyPolicyTypeField"})}function A(e){return e}function F(e){if("permanently_delete"==e)return e;if("remove_retention"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize CreateRetentionPolicyRequestBodyDispositionActionField"})}function M(e){return e}function D(e){if("modifiable"==e)return e;if("non_modifiable"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize CreateRetentionPolicyRequestBodyRetentionTypeField"})}function R(e){return{policy_name:e.policyName,description:null==e.description?void 0:e.description,policy_type:e.policyType,disposition_action:e.dispositionAction,retention_length:null==e.retentionLength?void 0:e.retentionLength,retention_type:null==e.retentionType?void 0:e.retentionType,can_owner_extend_retention:null==e.canOwnerExtendRetention?void 0:e.canOwnerExtendRetention,are_owners_notified:null==e.areOwnersNotified?void 0:e.areOwnersNotified,custom_notification_recipients:null==e.customNotificationRecipients?void 0:e.customNotificationRecipients.map((function(e){return(0,s.serializeUserMini)(e)}))}}function P(e){return{policy_name:null==e.policyName?void 0:e.policyName,description:null==e.description?void 0:e.description,disposition_action:null==e.dispositionAction?void 0:e.dispositionAction,retention_type:null==e.retentionType?void 0:e.retentionType,retention_length:null==e.retentionLength?void 0:e.retentionLength,status:null==e.status?void 0:e.status,can_owner_extend_retention:null==e.canOwnerExtendRetention?void 0:e.canOwnerExtendRetention,are_owners_notified:null==e.areOwnersNotified?void 0:e.areOwnersNotified,custom_notification_recipients:null==e.customNotificationRecipients?void 0:e.customNotificationRecipients.map((function(e){return(0,l.serializeUserBase)(e)}))}}t.RetentionPoliciesManager=class{constructor(e){this.networkSession=new c.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getRetentionPolicies(){return i(this,arguments,void 0,(function*(e={},t=new S({}),r){const i=new S({extraHeaders:t.extraHeaders}),o=(0,u.prepareParams)({policy_name:(0,p.toString)(e.policyName),policy_type:(0,p.toString)(e.policyType),created_by_user_id:(0,p.toString)(e.createdByUserId),fields:e.fields?e.fields.map(p.toString).join(","):void 0,limit:(0,p.toString)(e.limit),marker:(0,p.toString)(e.marker)}),s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeRetentionPolicies)(a.data)),{rawData:a.data})}))}createRetentionPolicy(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies"),method:"POST",headers:s,data:R(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeRetentionPolicy)(a.data)),{rawData:a.data})}))}getRetentionPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,a=(0,u.prepareParams)({fields:i.fields?i.fields.map(p.toString).join(","):void 0}),l=(0,u.prepareParams)(Object.assign({},n.extraHeaders)),d=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies/",(0,p.toString)(e)),method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeRetentionPolicy)(d.data)),{rawData:d.data})}))}updateRetentionPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new _({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,a=(0,u.prepareParams)(Object.assign({},n.extraHeaders)),l=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies/",(0,p.toString)(e)),method:"PUT",headers:a,data:P(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeRetentionPolicy)(l.data)),{rawData:l.data})}))}deleteRetentionPolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new x({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,u.prepareParams)(Object.assign({},i.extraHeaders));yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies/",(0,p.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},30004:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPolicyAssignmentsManager=t.GetFilesUnderRetentionPolicyAssignmentHeaders=t.DeleteRetentionPolicyAssignmentByIdHeaders=t.GetRetentionPolicyAssignmentByIdHeaders=t.CreateRetentionPolicyAssignmentHeaders=t.GetRetentionPolicyAssignmentsHeaders=t.GetFilesUnderRetentionPolicyAssignmentOptionals=t.DeleteRetentionPolicyAssignmentByIdOptionals=t.GetRetentionPolicyAssignmentByIdOptionals=t.CreateRetentionPolicyAssignmentOptionals=t.GetRetentionPolicyAssignmentsOptionals=void 0,t.serializeGetRetentionPolicyAssignmentsQueryParamsTypeField=function(e){return e},t.deserializeGetRetentionPolicyAssignmentsQueryParamsTypeField=function(e){if("folder"==e)return e;if("enterprise"==e)return e;if("metadata_template"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize GetRetentionPolicyAssignmentsQueryParamsTypeField"})},t.serializeCreateRetentionPolicyAssignmentRequestBodyAssignToTypeField=E,t.deserializeCreateRetentionPolicyAssignmentRequestBodyAssignToTypeField=T,t.serializeCreateRetentionPolicyAssignmentRequestBodyAssignToField=B,t.deserializeCreateRetentionPolicyAssignmentRequestBodyAssignToField=C,t.serializeCreateRetentionPolicyAssignmentRequestBodyFilterFieldsField=I,t.deserializeCreateRetentionPolicyAssignmentRequestBodyFilterFieldsField=A,t.serializeCreateRetentionPolicyAssignmentRequestBody=F,t.deserializeCreateRetentionPolicyAssignmentRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateRetentionPolicyAssignmentRequestBody"'});if(null==e.policy_id)throw new u.BoxSdkError({message:'Expecting "policy_id" of type "CreateRetentionPolicyAssignmentRequestBody" to be defined'});if(!(0,p.sdIsString)(e.policy_id))throw new u.BoxSdkError({message:'Expecting string for "policy_id" of type "CreateRetentionPolicyAssignmentRequestBody"'});const t=e.policy_id;if(null==e.assign_to)throw new u.BoxSdkError({message:'Expecting "assign_to" of type "CreateRetentionPolicyAssignmentRequestBody" to be defined'});const r=C(e.assign_to);if(null!=e.filter_fields&&!(0,h.sdIsList)(e.filter_fields))throw new u.BoxSdkError({message:'Expecting array for "filter_fields" of type "CreateRetentionPolicyAssignmentRequestBody"'});const i=null==e.filter_fields?void 0:(0,h.sdIsList)(e.filter_fields)?e.filter_fields.map((function(e){return A(e)})):[];if(null!=e.start_date_field&&!(0,p.sdIsString)(e.start_date_field))throw new u.BoxSdkError({message:'Expecting string for "start_date_field" of type "CreateRetentionPolicyAssignmentRequestBody"'});const n=null==e.start_date_field?void 0:e.start_date_field;return{policyId:t,assignTo:r,filterFields:i,startDateField:n}};const n=r(86162),o=r(62261),s=r(8391),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.queryParams={},this.headers=new w({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetRetentionPolicyAssignmentsOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateRetentionPolicyAssignmentOptionals=g;class y{constructor(e){this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetRetentionPolicyAssignmentByIdOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteRetentionPolicyAssignmentByIdOptionals=v;class b{constructor(e){this.queryParams={},this.headers=new k({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFilesUnderRetentionPolicyAssignmentOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetRetentionPolicyAssignmentsHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateRetentionPolicyAssignmentHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetRetentionPolicyAssignmentByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteRetentionPolicyAssignmentByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFilesUnderRetentionPolicyAssignmentHeaders=k;function E(e){return e}function T(e){if("enterprise"==e)return e;if("folder"==e)return e;if("metadata_template"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize CreateRetentionPolicyAssignmentRequestBodyAssignToTypeField"})}function B(e){return{type:e.type,id:null==e.id?void 0:e.id}}function C(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateRetentionPolicyAssignmentRequestBodyAssignToField"'});if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "CreateRetentionPolicyAssignmentRequestBodyAssignToField" to be defined'});const t=T(e.type);if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CreateRetentionPolicyAssignmentRequestBodyAssignToField"'});return{type:t,id:null==e.id?void 0:e.id}}function I(e){return{field:null==e.field?void 0:e.field,value:null==e.value?void 0:e.value}}function A(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateRetentionPolicyAssignmentRequestBodyFilterFieldsField"'});if(null!=e.field&&!(0,p.sdIsString)(e.field))throw new u.BoxSdkError({message:'Expecting string for "field" of type "CreateRetentionPolicyAssignmentRequestBodyFilterFieldsField"'});const t=null==e.field?void 0:e.field;if(null!=e.value&&!(0,p.sdIsString)(e.value))throw new u.BoxSdkError({message:'Expecting string for "value" of type "CreateRetentionPolicyAssignmentRequestBodyFilterFieldsField"'});return{field:t,value:null==e.value?void 0:e.value}}function F(e){return{policy_id:e.policyId,assign_to:B(e.assignTo),filter_fields:null==e.filterFields?void 0:e.filterFields.map((function(e){return I(e)})),start_date_field:null==e.startDateField?void 0:e.startDateField}}t.RetentionPolicyAssignmentsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getRetentionPolicyAssignments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)({type:(0,d.toString)(i.type),fields:i.fields?i.fields.map(d.toString).join(","):void 0,marker:(0,d.toString)(i.marker),limit:(0,d.toString)(i.limit)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policies/",(0,d.toString)(e),"/assignments"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeRetentionPolicyAssignments)(p.data)),{rawData:p.data})}))}createRetentionPolicyAssignment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policy_assignments"),method:"POST",headers:s,data:F(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeRetentionPolicyAssignment)(a.data)),{rawData:a.data})}))}getRetentionPolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)({fields:i.fields?i.fields.map(d.toString).join(","):void 0}),u=(0,l.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policy_assignments/",(0,d.toString)(e)),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeRetentionPolicyAssignment)(p.data)),{rawData:p.data})}))}deleteRetentionPolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policy_assignments/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getFilesUnderRetentionPolicyAssignment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,a=(0,l.prepareParams)({marker:(0,d.toString)(i.marker),limit:(0,d.toString)(i.limit)}),u=(0,l.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/retention_policy_assignments/",(0,d.toString)(e),"/files_under_retention"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,s.deserializeFilesUnderRetention)(p.data)),{rawData:p.data})}))}}},92102:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchManager=t.SearchForContentHeaders=t.SearchByMetadataQueryHeaders=t.SearchByMetadataQueryOptionals=void 0,t.serializeSearchForContentQueryParamsScopeField=function(e){return e},t.deserializeSearchForContentQueryParamsScopeField=function(e){if("user_content"==e)return e;if("enterprise_content"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsScopeField"})},t.serializeSearchForContentQueryParamsContentTypesField=function(e){return e},t.deserializeSearchForContentQueryParamsContentTypesField=function(e){if("name"==e)return e;if("description"==e)return e;if("file_content"==e)return e;if("comments"==e)return e;if("tag"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsContentTypesField"})},t.serializeSearchForContentQueryParamsTypeField=function(e){return e},t.deserializeSearchForContentQueryParamsTypeField=function(e){if("file"==e)return e;if("folder"==e)return e;if("web_link"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsTypeField"})},t.serializeSearchForContentQueryParamsTrashContentField=function(e){return e},t.deserializeSearchForContentQueryParamsTrashContentField=function(e){if("non_trashed_only"==e)return e;if("trashed_only"==e)return e;if("all_items"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsTrashContentField"})},t.serializeSearchForContentQueryParamsSortField=function(e){return e},t.deserializeSearchForContentQueryParamsSortField=function(e){if("modified_at"==e)return e;if("relevance"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsSortField"})},t.serializeSearchForContentQueryParamsDirectionField=function(e){return e},t.deserializeSearchForContentQueryParamsDirectionField=function(e){if("DESC"==e)return e;if("ASC"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize SearchForContentQueryParamsDirectionField"})};const n=r(90863),o=r(26775),s=r(76427),a=r(56211),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(50793),h=r(72631);class f{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.SearchByMetadataQueryOptionals=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.SearchByMetadataQueryHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.SearchForContentHeaders=g;t.SearchManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}searchByMetadataQuery(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/metadata_queries/execute_read"),method:"POST",headers:a,data:(0,o.serializeMetadataQuery)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeMetadataQueryResults)(l.data)),{rawData:l.data})}))}searchForContent(){return i(this,arguments,void 0,(function*(e={},t=new g({}),r){const i=new g({extraHeaders:t.extraHeaders}),n=(0,d.prepareParams)({query:(0,c.toString)(e.query),scope:(0,c.toString)(e.scope),file_extensions:e.fileExtensions?e.fileExtensions.map(c.toString).join(","):void 0,created_at_range:e.createdAtRange?e.createdAtRange.map(c.toString).join(","):void 0,updated_at_range:e.updatedAtRange?e.updatedAtRange.map(c.toString).join(","):void 0,size_range:e.sizeRange?e.sizeRange.map(c.toString).join(","):void 0,owner_user_ids:e.ownerUserIds?e.ownerUserIds.map(c.toString).join(","):void 0,recent_updater_user_ids:e.recentUpdaterUserIds?e.recentUpdaterUserIds.map(c.toString).join(","):void 0,ancestor_folder_ids:e.ancestorFolderIds?e.ancestorFolderIds.map(c.toString).join(","):void 0,content_types:e.contentTypes?e.contentTypes.map(c.toString).join(","):void 0,type:(0,c.toString)(e.type),trash_content:(0,c.toString)(e.trashContent),mdfilters:e.mdfilters?(0,p.sdToJson)(e.mdfilters.map(a.serializeMetadataFilter)):void 0,sort:(0,c.toString)(e.sort),direction:(0,c.toString)(e.direction),limit:(0,c.toString)(e.limit),include_recent_shared_links:(0,c.toString)(e.includeRecentSharedLinks),fields:e.fields?e.fields.map(c.toString).join(","):void 0,offset:(0,c.toString)(e.offset),deleted_user_ids:e.deletedUserIds?e.deletedUserIds.map(c.toString).join(","):void 0,deleted_at_range:e.deletedAtRange?e.deletedAtRange.map(c.toString).join(","):void 0}),o=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/search"),method:"GET",params:n,headers:o,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,s.deserializeSearchResultsOrSearchResultsWithSharedLinks)(l.data)),{rawData:l.data})}))}}},49888:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SessionTerminationManager=t.TerminateGroupsSessionsHeaders=t.TerminateUsersSessionsHeaders=t.TerminateGroupsSessionsOptionals=t.TerminateUsersSessionsOptionals=void 0,t.serializeTerminateUsersSessionsRequestBody=g,t.deserializeTerminateUsersSessionsRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "TerminateUsersSessionsRequestBody"'});if(null==e.user_ids)throw new l.BoxSdkError({message:'Expecting "user_ids" of type "TerminateUsersSessionsRequestBody" to be defined'});if(!(0,c.sdIsList)(e.user_ids))throw new l.BoxSdkError({message:'Expecting array for "user_ids" of type "TerminateUsersSessionsRequestBody"'});const t=(0,c.sdIsList)(e.user_ids)?e.user_ids.map((function(e){if(!(0,d.sdIsString)(e))throw new l.BoxSdkError({message:'Expecting string for "TerminateUsersSessionsRequestBody"'});return e})):[];if(null==e.user_logins)throw new l.BoxSdkError({message:'Expecting "user_logins" of type "TerminateUsersSessionsRequestBody" to be defined'});if(!(0,c.sdIsList)(e.user_logins))throw new l.BoxSdkError({message:'Expecting array for "user_logins" of type "TerminateUsersSessionsRequestBody"'});const r=(0,c.sdIsList)(e.user_logins)?e.user_logins.map((function(e){if(!(0,d.sdIsString)(e))throw new l.BoxSdkError({message:'Expecting string for "TerminateUsersSessionsRequestBody"'});return e})):[];return{userIds:t,userLogins:r}},t.serializeTerminateGroupsSessionsRequestBody=y,t.deserializeTerminateGroupsSessionsRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "TerminateGroupsSessionsRequestBody"'});if(null==e.group_ids)throw new l.BoxSdkError({message:'Expecting "group_ids" of type "TerminateGroupsSessionsRequestBody" to be defined'});if(!(0,c.sdIsList)(e.group_ids))throw new l.BoxSdkError({message:'Expecting array for "group_ids" of type "TerminateGroupsSessionsRequestBody"'});return{groupIds:(0,c.sdIsList)(e.group_ids)?e.group_ids.map((function(e){if(!(0,d.sdIsString)(e))throw new l.BoxSdkError({message:'Expecting string for "TerminateGroupsSessionsRequestBody"'});return e})):[]}};const n=r(19801),o=r(31210),s=r(93845),a=r(84143),l=r(72631),d=r(50793),c=r(50793),u=r(50793);class p{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.TerminateUsersSessionsOptionals=p;class h{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.TerminateGroupsSessionsOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.TerminateUsersSessionsHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.TerminateGroupsSessionsHeaders=m;function g(e){return{user_ids:e.userIds.map((function(e){return e})),user_logins:e.userLogins.map((function(e){return e}))}}function y(e){return{group_ids:e.groupIds.map((function(e){return e}))}}t.SessionTerminationManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}terminateUsersSessions(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,l=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/terminate_sessions"),method:"POST",headers:l,data:g(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSessionTerminationMessage)(d.data)),{rawData:d.data})}))}terminateGroupsSessions(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,l=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,a.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/groups/terminate_sessions"),method:"POST",headers:l,data:y(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSessionTerminationMessage)(d.data)),{rawData:d.data})}))}}},68567:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedLinksFilesManager=t.RemoveSharedLinkFromFileHeaders=t.UpdateSharedLinkOnFileHeaders=t.AddShareLinkToFileHeaders=t.GetSharedLinkForFileHeaders=t.FindFileForSharedLinkHeaders=t.RemoveSharedLinkFromFileOptionals=t.UpdateSharedLinkOnFileOptionals=t.AddShareLinkToFileOptionals=t.GetSharedLinkForFileOptionals=t.FindFileForSharedLinkOptionals=void 0,t.serializeAddShareLinkToFileRequestBodySharedLinkAccessField=E,t.deserializeAddShareLinkToFileRequestBodySharedLinkAccessField=T,t.serializeAddShareLinkToFileRequestBodySharedLinkPermissionsField=B,t.deserializeAddShareLinkToFileRequestBodySharedLinkPermissionsField=C,t.serializeAddShareLinkToFileRequestBodySharedLinkField=I,t.deserializeAddShareLinkToFileRequestBodySharedLinkField=A,t.serializeAddShareLinkToFileRequestBody=F,t.deserializeAddShareLinkToFileRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFileRequestBody"'});return{sharedLink:null==e.shared_link?void 0:A(e.shared_link)}},t.serializeUpdateSharedLinkOnFileRequestBodySharedLinkAccessField=M,t.deserializeUpdateSharedLinkOnFileRequestBodySharedLinkAccessField=D,t.serializeUpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField=R,t.deserializeUpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField=P,t.serializeUpdateSharedLinkOnFileRequestBodySharedLinkField=O,t.deserializeUpdateSharedLinkOnFileRequestBodySharedLinkField=z,t.serializeUpdateSharedLinkOnFileRequestBody=N,t.deserializeUpdateSharedLinkOnFileRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFileRequestBody"'});return{sharedLink:null==e.shared_link?void 0:z(e.shared_link)}},t.serializeRemoveSharedLinkFromFileRequestBodySharedLinkField=q,t.deserializeRemoveSharedLinkFromFileRequestBodySharedLinkField=U,t.serializeRemoveSharedLinkFromFileRequestBody=L,t.deserializeRemoveSharedLinkFromFileRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromFileRequestBody"'});return{sharedLink:null==e.shared_link?void 0:U(e.shared_link)}};const n=r(49579),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.FindFileForSharedLinkOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetSharedLinkForFileOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddShareLinkToFileOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateSharedLinkOnFileOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RemoveSharedLinkFromFileOptionals=b;class w{constructor(e){this.extraHeaders={},e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.FindFileForSharedLinkHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSharedLinkForFileHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddShareLinkToFileHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateSharedLinkOnFileHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RemoveSharedLinkFromFileHeaders=k;function E(e){return e}function T(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize AddShareLinkToFileRequestBodySharedLinkAccessField"})}function B(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function C(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFileRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "AddShareLinkToFileRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "AddShareLinkToFileRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "AddShareLinkToFileRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function I(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:B(e.permissions)}}function A(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFileRequestBodySharedLinkField"'});const t=null==e.access?void 0:T(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "AddShareLinkToFileRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "AddShareLinkToFileRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "AddShareLinkToFileRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:C(e.permissions)}}function F(e){return{shared_link:null==e.sharedLink?void 0:I(e.sharedLink)}}function M(e){return e}function D(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateSharedLinkOnFileRequestBodySharedLinkAccessField"})}function R(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function P(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "UpdateSharedLinkOnFileRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function O(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:R(e.permissions)}}function z(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFileRequestBodySharedLinkField"'});const t=null==e.access?void 0:D(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "UpdateSharedLinkOnFileRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateSharedLinkOnFileRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateSharedLinkOnFileRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:P(e.permissions)}}function N(e){return{shared_link:null==e.sharedLink?void 0:O(e.sharedLink)}}function q(e){return{}}function U(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromFileRequestBodySharedLinkField"'});return{}}function L(e){return{shared_link:null==e.sharedLink?void 0:(e.sharedLink,{})}}t.SharedLinksFilesManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}findFileForSharedLink(){return i(this,arguments,void 0,(function*(e={},t,r={}){const i=new w({ifNoneMatch:t.ifNoneMatch,boxapi:t.boxapi,extraHeaders:t.extraHeaders}),o=new m({cancellationToken:r.cancellationToken}).cancellationToken,s=(0,l.prepareParams)({fields:e.fields?e.fields.map(d.toString).join(","):void 0}),a=(0,l.prepareParams)(Object.assign({"if-none-match":(0,d.toString)(i.ifNoneMatch),boxapi:(0,d.toString)(i.boxapi)},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shared_items"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(u.data)),{rawData:u.data})}))}getSharedLinkForFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)({fields:(0,d.toString)(t.fields)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"#get_shared_link"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(p.data)),{rawData:p.data})}))}addShareLinkToFile(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new y({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"#add_shared_link"),method:"PUT",params:u,headers:p,data:F(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(h.data)),{rawData:h.data})}))}updateSharedLinkOnFile(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new v({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"#update_shared_link"),method:"PUT",params:u,headers:p,data:N(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(h.data)),{rawData:h.data})}))}removeSharedLinkFromFile(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new b({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"#remove_shared_link"),method:"PUT",params:u,headers:p,data:L(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFileFull)(h.data)),{rawData:h.data})}))}}},59417:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedLinksFoldersManager=t.RemoveSharedLinkFromFolderHeaders=t.UpdateSharedLinkOnFolderHeaders=t.AddShareLinkToFolderHeaders=t.GetSharedLinkForFolderHeaders=t.FindFolderForSharedLinkHeaders=t.RemoveSharedLinkFromFolderOptionals=t.UpdateSharedLinkOnFolderOptionals=t.AddShareLinkToFolderOptionals=t.GetSharedLinkForFolderOptionals=t.FindFolderForSharedLinkOptionals=void 0,t.serializeAddShareLinkToFolderRequestBodySharedLinkAccessField=E,t.deserializeAddShareLinkToFolderRequestBodySharedLinkAccessField=T,t.serializeAddShareLinkToFolderRequestBodySharedLinkPermissionsField=B,t.deserializeAddShareLinkToFolderRequestBodySharedLinkPermissionsField=C,t.serializeAddShareLinkToFolderRequestBodySharedLinkField=I,t.deserializeAddShareLinkToFolderRequestBodySharedLinkField=A,t.serializeAddShareLinkToFolderRequestBody=F,t.deserializeAddShareLinkToFolderRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFolderRequestBody"'});return{sharedLink:null==e.shared_link?void 0:A(e.shared_link)}},t.serializeUpdateSharedLinkOnFolderRequestBodySharedLinkAccessField=M,t.deserializeUpdateSharedLinkOnFolderRequestBodySharedLinkAccessField=D,t.serializeUpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField=R,t.deserializeUpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField=P,t.serializeUpdateSharedLinkOnFolderRequestBodySharedLinkField=O,t.deserializeUpdateSharedLinkOnFolderRequestBodySharedLinkField=z,t.serializeUpdateSharedLinkOnFolderRequestBody=N,t.deserializeUpdateSharedLinkOnFolderRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFolderRequestBody"'});return{sharedLink:null==e.shared_link?void 0:z(e.shared_link)}},t.serializeRemoveSharedLinkFromFolderRequestBodySharedLinkField=q,t.deserializeRemoveSharedLinkFromFolderRequestBodySharedLinkField=U,t.serializeRemoveSharedLinkFromFolderRequestBody=L,t.deserializeRemoveSharedLinkFromFolderRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromFolderRequestBody"'});return{sharedLink:null==e.shared_link?void 0:U(e.shared_link)}};const n=r(34537),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.FindFolderForSharedLinkOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetSharedLinkForFolderOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddShareLinkToFolderOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateSharedLinkOnFolderOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RemoveSharedLinkFromFolderOptionals=b;class w{constructor(e){this.extraHeaders={},e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.FindFolderForSharedLinkHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSharedLinkForFolderHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddShareLinkToFolderHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateSharedLinkOnFolderHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RemoveSharedLinkFromFolderHeaders=k;function E(e){return e}function T(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize AddShareLinkToFolderRequestBodySharedLinkAccessField"})}function B(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function C(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFolderRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "AddShareLinkToFolderRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "AddShareLinkToFolderRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "AddShareLinkToFolderRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function I(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:B(e.permissions)}}function A(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToFolderRequestBodySharedLinkField"'});const t=null==e.access?void 0:T(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "AddShareLinkToFolderRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "AddShareLinkToFolderRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "AddShareLinkToFolderRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:C(e.permissions)}}function F(e){return{shared_link:null==e.sharedLink?void 0:I(e.sharedLink)}}function M(e){return e}function D(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateSharedLinkOnFolderRequestBodySharedLinkAccessField"})}function R(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function P(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function O(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:R(e.permissions)}}function z(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnFolderRequestBodySharedLinkField"'});const t=null==e.access?void 0:D(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateSharedLinkOnFolderRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:P(e.permissions)}}function N(e){return{shared_link:null==e.sharedLink?void 0:O(e.sharedLink)}}function q(e){return{}}function U(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromFolderRequestBodySharedLinkField"'});return{}}function L(e){return{shared_link:null==e.sharedLink?void 0:(e.sharedLink,{})}}t.SharedLinksFoldersManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}findFolderForSharedLink(){return i(this,arguments,void 0,(function*(e={},t,r={}){const i=new w({ifNoneMatch:t.ifNoneMatch,boxapi:t.boxapi,extraHeaders:t.extraHeaders}),o=new m({cancellationToken:r.cancellationToken}).cancellationToken,s=(0,l.prepareParams)({fields:e.fields?e.fields.map(d.toString).join(","):void 0}),a=(0,l.prepareParams)(Object.assign({"if-none-match":(0,d.toString)(i.ifNoneMatch),boxapi:(0,d.toString)(i.boxapi)},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shared_items#folders"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(u.data)),{rawData:u.data})}))}getSharedLinkForFolder(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)({fields:(0,d.toString)(t.fields)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,d.toString)(e),"#get_shared_link"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(p.data)),{rawData:p.data})}))}addShareLinkToFolder(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new y({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,d.toString)(e),"#add_shared_link"),method:"PUT",params:u,headers:p,data:F(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(h.data)),{rawData:h.data})}))}updateSharedLinkOnFolder(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new v({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,d.toString)(e),"#update_shared_link"),method:"PUT",params:u,headers:p,data:N(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(h.data)),{rawData:h.data})}))}removeSharedLinkFromFolder(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new b({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,d.toString)(e),"#remove_shared_link"),method:"PUT",params:u,headers:p,data:L(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(h.data)),{rawData:h.data})}))}}},82415:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedLinksWebLinksManager=t.RemoveSharedLinkFromWebLinkHeaders=t.UpdateSharedLinkOnWebLinkHeaders=t.AddShareLinkToWebLinkHeaders=t.GetSharedLinkForWebLinkHeaders=t.FindWebLinkForSharedLinkHeaders=t.RemoveSharedLinkFromWebLinkOptionals=t.UpdateSharedLinkOnWebLinkOptionals=t.AddShareLinkToWebLinkOptionals=t.GetSharedLinkForWebLinkOptionals=t.FindWebLinkForSharedLinkOptionals=void 0,t.serializeAddShareLinkToWebLinkRequestBodySharedLinkAccessField=E,t.deserializeAddShareLinkToWebLinkRequestBodySharedLinkAccessField=T,t.serializeAddShareLinkToWebLinkRequestBodySharedLinkPermissionsField=B,t.deserializeAddShareLinkToWebLinkRequestBodySharedLinkPermissionsField=C,t.serializeAddShareLinkToWebLinkRequestBodySharedLinkField=I,t.deserializeAddShareLinkToWebLinkRequestBodySharedLinkField=A,t.serializeAddShareLinkToWebLinkRequestBody=F,t.deserializeAddShareLinkToWebLinkRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToWebLinkRequestBody"'});return{sharedLink:null==e.shared_link?void 0:A(e.shared_link)}},t.serializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkAccessField=M,t.deserializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkAccessField=D,t.serializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField=R,t.deserializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField=P,t.serializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkField=O,t.deserializeUpdateSharedLinkOnWebLinkRequestBodySharedLinkField=z,t.serializeUpdateSharedLinkOnWebLinkRequestBody=N,t.deserializeUpdateSharedLinkOnWebLinkRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnWebLinkRequestBody"'});return{sharedLink:null==e.shared_link?void 0:z(e.shared_link)}},t.serializeRemoveSharedLinkFromWebLinkRequestBodySharedLinkField=q,t.deserializeRemoveSharedLinkFromWebLinkRequestBodySharedLinkField=U,t.serializeRemoveSharedLinkFromWebLinkRequestBody=L,t.deserializeRemoveSharedLinkFromWebLinkRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromWebLinkRequestBody"'});return{sharedLink:null==e.shared_link?void 0:U(e.shared_link)}};const n=r(60238),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.cancellationToken=void 0,e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.FindWebLinkForSharedLinkOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetSharedLinkForWebLinkOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.AddShareLinkToWebLinkOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateSharedLinkOnWebLinkOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RemoveSharedLinkFromWebLinkOptionals=b;class w{constructor(e){this.extraHeaders={},e.ifNoneMatch&&(this.ifNoneMatch=e.ifNoneMatch),e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.FindWebLinkForSharedLinkHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSharedLinkForWebLinkHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.AddShareLinkToWebLinkHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateSharedLinkOnWebLinkHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RemoveSharedLinkFromWebLinkHeaders=k;function E(e){return e}function T(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize AddShareLinkToWebLinkRequestBodySharedLinkAccessField"})}function B(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function C(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "AddShareLinkToWebLinkRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function I(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:B(e.permissions)}}function A(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AddShareLinkToWebLinkRequestBodySharedLinkField"'});const t=null==e.access?void 0:T(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "AddShareLinkToWebLinkRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "AddShareLinkToWebLinkRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "AddShareLinkToWebLinkRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:C(e.permissions)}}function F(e){return{shared_link:null==e.sharedLink?void 0:I(e.sharedLink)}}function M(e){return e}function D(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateSharedLinkOnWebLinkRequestBodySharedLinkAccessField"})}function R(e){return{can_download:null==e.canDownload?void 0:e.canDownload,can_preview:null==e.canPreview?void 0:e.canPreview,can_edit:null==e.canEdit?void 0:e.canEdit}}function P(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField"'});if(null!=e.can_download&&!(0,p.sdIsBoolean)(e.can_download))throw new u.BoxSdkError({message:'Expecting boolean for "can_download" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField"'});const t=null==e.can_download?void 0:e.can_download;if(null!=e.can_preview&&!(0,p.sdIsBoolean)(e.can_preview))throw new u.BoxSdkError({message:'Expecting boolean for "can_preview" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField"'});const r=null==e.can_preview?void 0:e.can_preview;if(null!=e.can_edit&&!(0,p.sdIsBoolean)(e.can_edit))throw new u.BoxSdkError({message:'Expecting boolean for "can_edit" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:null==e.can_edit?void 0:e.can_edit}}function O(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt),permissions:null==e.permissions?void 0:R(e.permissions)}}function z(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateSharedLinkOnWebLinkRequestBodySharedLinkField"'});const t=null==e.access?void 0:D(e.access);if(null!=e.password&&!(0,h.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,h.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,h.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateSharedLinkOnWebLinkRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at),permissions:null==e.permissions?void 0:P(e.permissions)}}function N(e){return{shared_link:null==e.sharedLink?void 0:O(e.sharedLink)}}function q(e){return{}}function U(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RemoveSharedLinkFromWebLinkRequestBodySharedLinkField"'});return{}}function L(e){return{shared_link:null==e.sharedLink?void 0:(e.sharedLink,{})}}t.SharedLinksWebLinksManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}findWebLinkForSharedLink(){return i(this,arguments,void 0,(function*(e={},t,r={}){const i=new w({ifNoneMatch:t.ifNoneMatch,boxapi:t.boxapi,extraHeaders:t.extraHeaders}),o=new m({cancellationToken:r.cancellationToken}).cancellationToken,s=(0,l.prepareParams)({fields:e.fields?e.fields.map(d.toString).join(","):void 0}),a=(0,l.prepareParams)(Object.assign({"if-none-match":(0,d.toString)(i.ifNoneMatch),boxapi:(0,d.toString)(i.boxapi)},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shared_items#web_links"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(u.data)),{rawData:u.data})}))}getSharedLinkForWebLink(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)({fields:(0,d.toString)(t.fields)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e),"#get_shared_link"),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(p.data)),{rawData:p.data})}))}addShareLinkToWebLink(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new y({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e),"#add_shared_link"),method:"PUT",params:u,headers:p,data:F(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(h.data)),{rawData:h.data})}))}updateSharedLinkOnWebLink(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new v({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e),"#update_shared_link"),method:"PUT",params:u,headers:p,data:N(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(h.data)),{rawData:h.data})}))}removeSharedLinkFromWebLink(e){return i(this,arguments,void 0,(function*(e,t={},r,i={}){const o=new b({headers:i.headers,cancellationToken:i.cancellationToken}),s=o.headers,a=o.cancellationToken,u=(0,l.prepareParams)({fields:(0,d.toString)(r.fields)}),p=(0,l.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e),"#remove_shared_link"),method:"PUT",params:u,headers:p,data:L(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(h.data)),{rawData:h.data})}))}}},99253:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShieldInformationBarrierReportsManager=t.GetShieldInformationBarrierReportByIdHeaders=t.CreateShieldInformationBarrierReportHeaders=t.GetShieldInformationBarrierReportsHeaders=t.GetShieldInformationBarrierReportByIdOptionals=t.CreateShieldInformationBarrierReportOptionals=t.GetShieldInformationBarrierReportsOptionals=void 0;const n=r(89275),o=r(65382),s=r(44345),a=r(31210),l=r(93845),d=r(93845),c=r(84143);class u{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierReportsOptionals=u;class p{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateShieldInformationBarrierReportOptionals=p;class h{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierReportByIdOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierReportsHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateShieldInformationBarrierReportHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierReportByIdHeaders=g;t.ShieldInformationBarrierReportsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getShieldInformationBarrierReports(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)({shield_information_barrier_id:(0,d.toString)(e.shieldInformationBarrierId),marker:(0,d.toString)(e.marker),limit:(0,d.toString)(e.limit)}),a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_reports"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierReports)(p.data)),{rawData:p.data})}))}createShieldInformationBarrierReport(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_reports"),method:"POST",headers:a,data:(0,s.serializeShieldInformationBarrierReference)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarrierReport)(d.data)),{rawData:d.data})}))}getShieldInformationBarrierReportById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_reports/",(0,d.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarrierReport)(a.data)),{rawData:a.data})}))}}},81194:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShieldInformationBarrierSegmentMembersManager=t.CreateShieldInformationBarrierSegmentMemberHeaders=t.GetShieldInformationBarrierSegmentMembersHeaders=t.DeleteShieldInformationBarrierSegmentMemberByIdHeaders=t.GetShieldInformationBarrierSegmentMemberByIdHeaders=t.CreateShieldInformationBarrierSegmentMemberOptionals=t.GetShieldInformationBarrierSegmentMembersOptionals=t.DeleteShieldInformationBarrierSegmentMemberByIdOptionals=t.GetShieldInformationBarrierSegmentMemberByIdOptionals=void 0,t.serializeCreateShieldInformationBarrierSegmentMemberRequestBodyTypeField=E,t.deserializeCreateShieldInformationBarrierSegmentMemberRequestBodyTypeField=T,t.serializeCreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField=B,t.deserializeCreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField=C,t.serializeCreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField=I,t.deserializeCreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField=A,t.serializeCreateShieldInformationBarrierSegmentMemberRequestBody=F,t.deserializeCreateShieldInformationBarrierSegmentMemberRequestBody=function(e){if(!(0,g.sdIsMap)(e))throw new f.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentMemberRequestBody"'});const t=null==e.type?void 0:T(e.type),r=null==e.shield_information_barrier?void 0:(0,a.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null==e.shield_information_barrier_segment)throw new f.BoxSdkError({message:'Expecting "shield_information_barrier_segment" of type "CreateShieldInformationBarrierSegmentMemberRequestBody" to be defined'});const i=A(e.shield_information_barrier_segment);if(null==e.user)throw new f.BoxSdkError({message:'Expecting "user" of type "CreateShieldInformationBarrierSegmentMemberRequestBody" to be defined'});const n=(0,d.deserializeUserBase)(e.user);return{type:t,shieldInformationBarrier:r,shieldInformationBarrierSegment:i,user:n}};const n=r(17935),o=r(48620),s=r(945),a=r(945),l=r(78366),d=r(78366),c=r(31210),u=r(93845),p=r(93845),h=r(84143),f=r(72631),m=r(50793),g=r(50793);class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentMemberByIdOptionals=y;class v{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteShieldInformationBarrierSegmentMemberByIdOptionals=v;class b{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentMembersOptionals=b;class w{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateShieldInformationBarrierSegmentMemberOptionals=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentMemberByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteShieldInformationBarrierSegmentMemberByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentMembersHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateShieldInformationBarrierSegmentMemberHeaders=k;function E(e){return e}function T(e){if("shield_information_barrier_segment_member"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize CreateShieldInformationBarrierSegmentMemberRequestBodyTypeField"})}function B(e){return e}function C(e){if("shield_information_barrier_segment"==e)return e;throw new f.BoxSdkError({message:"Can't deserialize CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField"})}function I(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function A(e){if(!(0,g.sdIsMap)(e))throw new f.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField"'});if(null!=e.id&&!(0,m.sdIsString)(e.id))throw new f.BoxSdkError({message:'Expecting string for "id" of type "CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:C(e.type)}}function F(e){return{type:null==e.type?void 0:e.type,shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,s.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),shield_information_barrier_segment:I(e.shieldInformationBarrierSegment),user:(0,l.serializeUserBase)(e.user)}}t.ShieldInformationBarrierSegmentMembersManager=class{constructor(e){this.networkSession=new c.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getShieldInformationBarrierSegmentMemberById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_members/",(0,p.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegmentMember)(a.data)),{rawData:a.data})}))}deleteShieldInformationBarrierSegmentMemberById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,u.prepareParams)(Object.assign({},i.extraHeaders));yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_members/",(0,p.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getShieldInformationBarrierSegmentMembers(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,u.prepareParams)({shield_information_barrier_segment_id:(0,p.toString)(e.shieldInformationBarrierSegmentId),marker:(0,p.toString)(e.marker),limit:(0,p.toString)(e.limit)}),a=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_members"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarrierSegmentMembers)(l.data)),{rawData:l.data})}))}createShieldInformationBarrierSegmentMember(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,u.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,h.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_members"),method:"POST",headers:s,data:F(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegmentMember)(a.data)),{rawData:a.data})}))}}},85180:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShieldInformationBarrierSegmentRestrictionsManager=t.CreateShieldInformationBarrierSegmentRestrictionHeaders=t.CreateShieldInformationBarrierSegmentRestrictionRequestBody=t.GetShieldInformationBarrierSegmentRestrictionsHeaders=t.DeleteShieldInformationBarrierSegmentRestrictionByIdHeaders=t.GetShieldInformationBarrierSegmentRestrictionByIdHeaders=t.CreateShieldInformationBarrierSegmentRestrictionOptionals=t.GetShieldInformationBarrierSegmentRestrictionsOptionals=t.DeleteShieldInformationBarrierSegmentRestrictionByIdOptionals=t.GetShieldInformationBarrierSegmentRestrictionByIdOptionals=void 0,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField=k,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField=E,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField=T,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField=B,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField=C,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField=I,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField=A,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField=F,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField=M,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField=D,t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBody=R,t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentRestrictionRequestBody"'});if(null==e.type)throw new p.BoxSdkError({message:'Expecting "type" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBody" to be defined'});const t=E(e.type),r=null==e.shield_information_barrier?void 0:(0,a.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null==e.shield_information_barrier_segment)throw new p.BoxSdkError({message:'Expecting "shield_information_barrier_segment" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBody" to be defined'});const i=I(e.shield_information_barrier_segment);if(null==e.restricted_segment)throw new p.BoxSdkError({message:'Expecting "restricted_segment" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBody" to be defined'});const n=D(e.restricted_segment);return{type:t,shieldInformationBarrier:r,shieldInformationBarrierSegment:i,restrictedSegment:n}},t.serializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyInput=function(e){return{type:null==e.type?void 0:e.type,shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,s.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),shield_information_barrier_segment:C(e.shieldInformationBarrierSegment),restricted_segment:M(e.restrictedSegment)}},t.deserializeCreateShieldInformationBarrierSegmentRestrictionRequestBodyInput=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentRestrictionRequestBodyInput"'});const t=null==e.type?void 0:E(e.type),r=null==e.shield_information_barrier?void 0:(0,a.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null==e.shield_information_barrier_segment)throw new p.BoxSdkError({message:'Expecting "shield_information_barrier_segment" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBodyInput" to be defined'});const i=I(e.shield_information_barrier_segment);if(null==e.restricted_segment)throw new p.BoxSdkError({message:'Expecting "restricted_segment" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBodyInput" to be defined'});const n=D(e.restricted_segment);return{type:t,shieldInformationBarrier:r,shieldInformationBarrierSegment:i,restrictedSegment:n}};const n=r(51325),o=r(10),s=r(945),a=r(945),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentRestrictionByIdOptionals=m;class g{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteShieldInformationBarrierSegmentRestrictionByIdOptionals=g;class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentRestrictionsOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateShieldInformationBarrierSegmentRestrictionOptionals=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentRestrictionByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteShieldInformationBarrierSegmentRestrictionByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentRestrictionsHeaders=_;class x{constructor(e){this.type="shield_information_barrier_segment_restriction",e.type&&(this.type=e.type),e.shieldInformationBarrier&&(this.shieldInformationBarrier=e.shieldInformationBarrier),e.shieldInformationBarrierSegment&&(this.shieldInformationBarrierSegment=e.shieldInformationBarrierSegment),e.restrictedSegment&&(this.restrictedSegment=e.restrictedSegment),e.rawData&&(this.rawData=e.rawData)}}t.CreateShieldInformationBarrierSegmentRestrictionRequestBody=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateShieldInformationBarrierSegmentRestrictionHeaders=S;function k(e){return e}function E(e){if("shield_information_barrier_segment_restriction"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField"})}function T(e){return e}function B(e){if("shield_information_barrier_segment"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField"})}function C(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function I(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:B(e.type)}}function A(e){return e}function F(e){if("shield_information_barrier_segment"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField"})}function M(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function D(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:F(e.type)}}function R(e){return{type:e.type,shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,s.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),shield_information_barrier_segment:C(e.shieldInformationBarrierSegment),restricted_segment:M(e.restrictedSegment)}}t.ShieldInformationBarrierSegmentRestrictionsManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getShieldInformationBarrierSegmentRestrictionById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_restrictions/",(0,c.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegmentRestriction)(a.data)),{rawData:a.data})}))}deleteShieldInformationBarrierSegmentRestrictionById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,d.prepareParams)(Object.assign({},i.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_restrictions/",(0,c.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getShieldInformationBarrierSegmentRestrictions(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)({shield_information_barrier_segment_id:(0,c.toString)(e.shieldInformationBarrierSegmentId),marker:(0,c.toString)(e.marker),limit:(0,c.toString)(e.limit)}),a=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_restrictions"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarrierSegmentRestrictions)(l.data)),{rawData:l.data})}))}createShieldInformationBarrierSegmentRestriction(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new x({type:e.type,shieldInformationBarrier:e.shieldInformationBarrier,shieldInformationBarrierSegment:e.shieldInformationBarrierSegment,restrictedSegment:e.restrictedSegment}),i=new v({headers:t.headers,cancellationToken:t.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,d.prepareParams)(Object.assign({},o.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segment_restrictions"),method:"POST",headers:a,data:R(r),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegmentRestriction)(l.data)),{rawData:l.data})}))}}},90072:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShieldInformationBarrierSegmentsManager=t.CreateShieldInformationBarrierSegmentHeaders=t.GetShieldInformationBarrierSegmentsHeaders=t.UpdateShieldInformationBarrierSegmentByIdHeaders=t.DeleteShieldInformationBarrierSegmentByIdHeaders=t.GetShieldInformationBarrierSegmentByIdHeaders=t.CreateShieldInformationBarrierSegmentOptionals=t.GetShieldInformationBarrierSegmentsOptionals=t.UpdateShieldInformationBarrierSegmentByIdOptionals=t.DeleteShieldInformationBarrierSegmentByIdOptionals=t.GetShieldInformationBarrierSegmentByIdOptionals=void 0,t.serializeUpdateShieldInformationBarrierSegmentByIdRequestBody=E,t.deserializeUpdateShieldInformationBarrierSegmentByIdRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateShieldInformationBarrierSegmentByIdRequestBody"'});if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "UpdateShieldInformationBarrierSegmentByIdRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.description&&!(0,h.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "UpdateShieldInformationBarrierSegmentByIdRequestBody"'});const r=null==e.description?void 0:e.description;return{name:t,description:r}},t.serializeCreateShieldInformationBarrierSegmentRequestBody=T,t.deserializeCreateShieldInformationBarrierSegmentRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierSegmentRequestBody"'});if(null==e.shield_information_barrier)throw new p.BoxSdkError({message:'Expecting "shield_information_barrier" of type "CreateShieldInformationBarrierSegmentRequestBody" to be defined'});const t=(0,a.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null==e.name)throw new p.BoxSdkError({message:'Expecting "name" of type "CreateShieldInformationBarrierSegmentRequestBody" to be defined'});if(!(0,h.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "CreateShieldInformationBarrierSegmentRequestBody"'});const r=e.name;if(null!=e.description&&!(0,h.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "CreateShieldInformationBarrierSegmentRequestBody"'});const i=null==e.description?void 0:e.description;return{shieldInformationBarrier:t,name:r,description:i}};const n=r(77749),o=r(59410),s=r(945),a=r(945),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteShieldInformationBarrierSegmentByIdOptionals=g;class y{constructor(e){this.requestBody={},this.headers=new x({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateShieldInformationBarrierSegmentByIdOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierSegmentsOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateShieldInformationBarrierSegmentOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteShieldInformationBarrierSegmentByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateShieldInformationBarrierSegmentByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierSegmentsHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateShieldInformationBarrierSegmentHeaders=k;function E(e){return{name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description}}function T(e){return{shield_information_barrier:(0,s.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),name:e.name,description:null==e.description?void 0:e.description}}t.ShieldInformationBarrierSegmentsManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getShieldInformationBarrierSegmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segments/",(0,c.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegment)(a.data)),{rawData:a.data})}))}deleteShieldInformationBarrierSegmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,d.prepareParams)(Object.assign({},i.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segments/",(0,c.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}updateShieldInformationBarrierSegmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)(Object.assign({},o.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segments/",(0,c.toString)(e)),method:"PUT",headers:a,data:E(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegment)(l.data)),{rawData:l.data})}))}getShieldInformationBarrierSegments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)({shield_information_barrier_id:(0,c.toString)(e.shieldInformationBarrierId),marker:(0,c.toString)(e.marker),limit:(0,c.toString)(e.limit)}),a=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segments"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarrierSegments)(l.data)),{rawData:l.data})}))}createShieldInformationBarrierSegment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barrier_segments"),method:"POST",headers:s,data:T(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrierSegment)(a.data)),{rawData:a.data})}))}}},22195:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShieldInformationBarriersManager=t.CreateShieldInformationBarrierHeaders=t.GetShieldInformationBarriersHeaders=t.UpdateShieldInformationBarrierStatusHeaders=t.GetShieldInformationBarrierByIdHeaders=t.CreateShieldInformationBarrierOptionals=t.UpdateShieldInformationBarrierStatusOptionals=t.GetShieldInformationBarrierByIdOptionals=void 0,t.serializeUpdateShieldInformationBarrierStatusRequestBodyStatusField=x,t.deserializeUpdateShieldInformationBarrierStatusRequestBodyStatusField=S,t.serializeUpdateShieldInformationBarrierStatusRequestBody=k,t.deserializeUpdateShieldInformationBarrierStatusRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateShieldInformationBarrierStatusRequestBody"'});if(null==e.id)throw new p.BoxSdkError({message:'Expecting "id" of type "UpdateShieldInformationBarrierStatusRequestBody" to be defined'});if(!(0,h.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "UpdateShieldInformationBarrierStatusRequestBody"'});const t=e.id;if(null==e.status)throw new p.BoxSdkError({message:'Expecting "status" of type "UpdateShieldInformationBarrierStatusRequestBody" to be defined'});const r=S(e.status);return{id:t,status:r}},t.serializeCreateShieldInformationBarrierRequestBody=E,t.deserializeCreateShieldInformationBarrierRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateShieldInformationBarrierRequestBody"'});if(null==e.enterprise)throw new p.BoxSdkError({message:'Expecting "enterprise" of type "CreateShieldInformationBarrierRequestBody" to be defined'});return{enterprise:(0,a.deserializeEnterpriseBase)(e.enterprise)}};const n=r(91616),o=r(38317),s=r(75762),a=r(75762),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetShieldInformationBarrierByIdOptionals=m;class g{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateShieldInformationBarrierStatusOptionals=g;class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateShieldInformationBarrierOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarrierByIdHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateShieldInformationBarrierStatusHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetShieldInformationBarriersHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateShieldInformationBarrierHeaders=_;function x(e){return e}function S(e){if("pending"==e)return e;if("disabled"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateShieldInformationBarrierStatusRequestBodyStatusField"})}function k(e){return{id:e.id,status:e.status}}function E(e){return{enterprise:(0,s.serializeEnterpriseBase)(e.enterprise)}}t.ShieldInformationBarriersManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getShieldInformationBarrierById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barriers/",(0,c.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrier)(a.data)),{rawData:a.data})}))}updateShieldInformationBarrierStatus(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barriers/change_status"),method:"POST",headers:s,data:k(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrier)(a.data)),{rawData:a.data})}))}getShieldInformationBarriers(){return i(this,arguments,void 0,(function*(e={},t=new w({}),r){const i=new w({extraHeaders:t.extraHeaders}),n=(0,d.prepareParams)({marker:(0,c.toString)(e.marker),limit:(0,c.toString)(e.limit)}),s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barriers"),method:"GET",params:n,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,o.deserializeShieldInformationBarriers)(a.data)),{rawData:a.data})}))}createShieldInformationBarrier(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/shield_information_barriers"),method:"POST",headers:s,data:E(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeShieldInformationBarrier)(a.data)),{rawData:a.data})}))}}},39797:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SignRequestsManager=t.CreateSignRequestHeaders=t.GetSignRequestsHeaders=t.GetSignRequestByIdHeaders=t.ResendSignRequestHeaders=t.CancelSignRequestHeaders=t.CreateSignRequestOptionals=t.GetSignRequestByIdOptionals=t.ResendSignRequestOptionals=t.CancelSignRequestOptionals=void 0;const n=r(86982),o=r(58267),s=r(32571),a=r(31210),l=r(93845),d=r(93845),c=r(84143);class u{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CancelSignRequestOptionals=u;class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.ResendSignRequestOptionals=p;class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetSignRequestByIdOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateSignRequestOptionals=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CancelSignRequestHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.ResendSignRequestHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSignRequestByIdHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSignRequestsHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateSignRequestHeaders=b;t.SignRequestsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}cancelSignRequest(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_requests/",(0,d.toString)(e),"/cancel"),method:"POST",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSignRequest)(a.data)),{rawData:a.data})}))}resendSignRequest(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_requests/",(0,d.toString)(e),"/resend"),method:"POST",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}getSignRequestById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_requests/",(0,d.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSignRequest)(a.data)),{rawData:a.data})}))}getSignRequests(){return i(this,arguments,void 0,(function*(e={},t=new v({}),r){const i=new v({extraHeaders:t.extraHeaders}),n=(0,l.prepareParams)({marker:(0,d.toString)(e.marker),limit:(0,d.toString)(e.limit)}),s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_requests"),method:"GET",params:n,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,o.deserializeSignRequests)(a.data)),{rawData:a.data})}))}createSignRequest(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),d=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_requests"),method:"POST",headers:a,data:(0,s.serializeSignRequestCreateRequest)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSignRequest)(d.data)),{rawData:d.data})}))}}},41014:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SignTemplatesManager=t.GetSignTemplateByIdHeaders=t.GetSignTemplatesHeaders=t.GetSignTemplateByIdOptionals=void 0;const n=r(55064),o=r(15139),s=r(31210),a=r(93845),l=r(93845),d=r(84143);class c{constructor(e){this.headers=new p({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetSignTemplateByIdOptionals=c;class u{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSignTemplatesHeaders=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetSignTemplateByIdHeaders=p;t.SignTemplatesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getSignTemplates(){return i(this,arguments,void 0,(function*(e={},t=new u({}),r){const i=new u({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_templates"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeSignTemplates)(c.data)),{rawData:c.data})}))}getSignTemplateById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/sign_templates/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeSignTemplate)(u.data)),{rawData:u.data})}))}}},55040:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillsManager=t.UpdateAllSkillCardsOnFileHeaders=t.DeleteBoxSkillCardsFromFileHeaders=t.UpdateBoxSkillCardsOnFileHeaders=t.CreateBoxSkillCardsOnFileHeaders=t.GetBoxSkillCardsOnFileHeaders=t.UpdateAllSkillCardsOnFileOptionals=t.DeleteBoxSkillCardsFromFileOptionals=t.UpdateBoxSkillCardsOnFileOptionals=t.CreateBoxSkillCardsOnFileOptionals=t.GetBoxSkillCardsOnFileOptionals=void 0,t.serializeCreateBoxSkillCardsOnFileRequestBody=T,t.deserializeCreateBoxSkillCardsOnFileRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateBoxSkillCardsOnFileRequestBody"'});if(null==e.cards)throw new u.BoxSdkError({message:'Expecting "cards" of type "CreateBoxSkillCardsOnFileRequestBody" to be defined'});if(!(0,f.sdIsList)(e.cards))throw new u.BoxSdkError({message:'Expecting array for "cards" of type "CreateBoxSkillCardsOnFileRequestBody"'});return{cards:(0,f.sdIsList)(e.cards)?e.cards.map((function(e){return(0,s.deserializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)})):[]}},t.serializeUpdateBoxSkillCardsOnFileRequestBodyOpField=B,t.deserializeUpdateBoxSkillCardsOnFileRequestBodyOpField=C,t.serializeUpdateBoxSkillCardsOnFileRequestBody=I,t.deserializeUpdateBoxSkillCardsOnFileRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateBoxSkillCardsOnFileRequestBody"'});const t=null==e.op?void 0:C(e.op);if(null!=e.path&&!(0,h.sdIsString)(e.path))throw new u.BoxSdkError({message:'Expecting string for "path" of type "UpdateBoxSkillCardsOnFileRequestBody"'});const r=null==e.path?void 0:e.path,i=null==e.value?void 0:(0,s.deserializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e.value);return{op:t,path:r,value:i}},t.serializeUpdateAllSkillCardsOnFileRequestBodyStatusField=A,t.deserializeUpdateAllSkillCardsOnFileRequestBodyStatusField=F,t.serializeUpdateAllSkillCardsOnFileRequestBodyMetadataField=M,t.deserializeUpdateAllSkillCardsOnFileRequestBodyMetadataField=D,t.serializeUpdateAllSkillCardsOnFileRequestBodyFileTypeField=R,t.deserializeUpdateAllSkillCardsOnFileRequestBodyFileTypeField=P,t.serializeUpdateAllSkillCardsOnFileRequestBodyFileField=O,t.deserializeUpdateAllSkillCardsOnFileRequestBodyFileField=z,t.serializeUpdateAllSkillCardsOnFileRequestBodyFileVersionTypeField=N,t.deserializeUpdateAllSkillCardsOnFileRequestBodyFileVersionTypeField=q,t.serializeUpdateAllSkillCardsOnFileRequestBodyFileVersionField=U,t.deserializeUpdateAllSkillCardsOnFileRequestBodyFileVersionField=L,t.serializeUpdateAllSkillCardsOnFileRequestBodyUsageField=j,t.deserializeUpdateAllSkillCardsOnFileRequestBodyUsageField=H,t.serializeUpdateAllSkillCardsOnFileRequestBody=$,t.deserializeUpdateAllSkillCardsOnFileRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateAllSkillCardsOnFileRequestBody"'});if(null==e.status)throw new u.BoxSdkError({message:'Expecting "status" of type "UpdateAllSkillCardsOnFileRequestBody" to be defined'});const t=F(e.status);if(null==e.metadata)throw new u.BoxSdkError({message:'Expecting "metadata" of type "UpdateAllSkillCardsOnFileRequestBody" to be defined'});const r=D(e.metadata);if(null==e.file)throw new u.BoxSdkError({message:'Expecting "file" of type "UpdateAllSkillCardsOnFileRequestBody" to be defined'});const i=z(e.file),n=null==e.file_version?void 0:L(e.file_version),o=null==e.usage?void 0:H(e.usage);return{status:t,metadata:r,file:i,fileVersion:n,usage:o}};const n=r(75897),o=r(20633),s=r(20633),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793);class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetBoxSkillCardsOnFileOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateBoxSkillCardsOnFileOptionals=y;class v{constructor(e){this.headers=new S({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateBoxSkillCardsOnFileOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteBoxSkillCardsFromFileOptionals=b;class w{constructor(e){this.headers=new E({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateAllSkillCardsOnFileOptionals=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetBoxSkillCardsOnFileHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateBoxSkillCardsOnFileHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateBoxSkillCardsOnFileHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteBoxSkillCardsFromFileHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateAllSkillCardsOnFileHeaders=E;function T(e){return{cards:e.cards.map((function(e){return(0,o.serializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)}))}}function B(e){return e}function C(e){if("replace"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateBoxSkillCardsOnFileRequestBodyOpField"})}function I(e){return{op:null==e.op?void 0:e.op,path:null==e.path?void 0:e.path,value:null==e.value?void 0:(0,o.serializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e.value)}}function A(e){return e}function F(e){if("invoked"==e)return e;if("processing"==e)return e;if("success"==e)return e;if("transient_failure"==e)return e;if("permanent_failure"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateAllSkillCardsOnFileRequestBodyStatusField"})}function M(e){return{cards:null==e.cards?void 0:e.cards.map((function(e){return(0,o.serializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)}))}}function D(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateAllSkillCardsOnFileRequestBodyMetadataField"'});if(null!=e.cards&&!(0,f.sdIsList)(e.cards))throw new u.BoxSdkError({message:'Expecting array for "cards" of type "UpdateAllSkillCardsOnFileRequestBodyMetadataField"'});return{cards:null==e.cards?void 0:(0,f.sdIsList)(e.cards)?e.cards.map((function(e){return(0,s.deserializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)})):[]}}function R(e){return e}function P(e){if("file"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateAllSkillCardsOnFileRequestBodyFileTypeField"})}function O(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function z(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateAllSkillCardsOnFileRequestBodyFileField"'});const t=null==e.type?void 0:P(e.type);if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UpdateAllSkillCardsOnFileRequestBodyFileField"'});return{type:t,id:null==e.id?void 0:e.id}}function N(e){return e}function q(e){if("file_version"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateAllSkillCardsOnFileRequestBodyFileVersionTypeField"})}function U(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function L(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateAllSkillCardsOnFileRequestBodyFileVersionField"'});const t=null==e.type?void 0:q(e.type);if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UpdateAllSkillCardsOnFileRequestBodyFileVersionField"'});return{type:t,id:null==e.id?void 0:e.id}}function j(e){return{unit:null==e.unit?void 0:e.unit,value:null==e.value?void 0:e.value}}function H(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateAllSkillCardsOnFileRequestBodyUsageField"'});if(null!=e.unit&&!(0,h.sdIsString)(e.unit))throw new u.BoxSdkError({message:'Expecting string for "unit" of type "UpdateAllSkillCardsOnFileRequestBodyUsageField"'});const t=null==e.unit?void 0:e.unit;if(null!=e.value&&!(0,p.sdIsNumber)(e.value))throw new u.BoxSdkError({message:'Expecting number for "value" of type "UpdateAllSkillCardsOnFileRequestBodyUsageField"'});return{unit:t,value:null==e.value?void 0:e.value}}function $(e){return{status:e.status,metadata:M(e.metadata),file:O(e.file),file_version:null==e.fileVersion?void 0:U(e.fileVersion),usage:null==e.usage?void 0:j(e.usage)}}t.SkillsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getBoxSkillCardsOnFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/metadata/global/boxSkillsCards"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeSkillCardsMetadata)(a.data)),{rawData:a.data})}))}createBoxSkillCardsOnFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new y({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/metadata/global/boxSkillsCards"),method:"POST",headers:a,data:T(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeSkillCardsMetadata)(u.data)),{rawData:u.data})}))}updateBoxSkillCardsOnFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new v({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/metadata/global/boxSkillsCards"),method:"PUT",headers:a,data:t.map(I),contentType:"application/json-patch+json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeSkillCardsMetadata)(u.data)),{rawData:u.data})}))}deleteBoxSkillCardsFromFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,d.toString)(e),"/metadata/global/boxSkillsCards"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}updateAllSkillCardsOnFile(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new w({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,l.prepareParams)(Object.assign({},n.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/skill_invocations/",(0,d.toString)(e)),method:"PUT",headers:s,data:$(t),contentType:"application/json",responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}}},59465:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePoliciesManager=t.GetStoragePolicyByIdHeaders=t.GetStoragePoliciesHeaders=t.GetStoragePolicyByIdOptionals=void 0;const n=r(95199),o=r(32735),s=r(31210),a=r(93845),l=r(93845),d=r(84143);class c{constructor(e){this.headers=new p({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetStoragePolicyByIdOptionals=c;class u{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetStoragePoliciesHeaders=u;class p{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetStoragePolicyByIdHeaders=p;t.StoragePoliciesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getStoragePolicies(){return i(this,arguments,void 0,(function*(e={},t=new u({}),r){const i=new u({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({fields:e.fields?e.fields.map(l.toString).join(","):void 0,marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policies"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeStoragePolicies)(c.data)),{rawData:c.data})}))}getStoragePolicyById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policies/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeStoragePolicy)(u.data)),{rawData:u.data})}))}}},32537:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePolicyAssignmentsManager=t.DeleteStoragePolicyAssignmentByIdHeaders=t.UpdateStoragePolicyAssignmentByIdHeaders=t.UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField=t.GetStoragePolicyAssignmentByIdHeaders=t.CreateStoragePolicyAssignmentHeaders=t.CreateStoragePolicyAssignmentRequestBodyStoragePolicyField=t.GetStoragePolicyAssignmentsHeaders=t.DeleteStoragePolicyAssignmentByIdOptionals=t.UpdateStoragePolicyAssignmentByIdOptionals=t.GetStoragePolicyAssignmentByIdOptionals=t.CreateStoragePolicyAssignmentOptionals=t.GetStoragePolicyAssignmentsOptionals=void 0,t.serializeGetStoragePolicyAssignmentsQueryParamsResolvedForTypeField=function(e){return e},t.deserializeGetStoragePolicyAssignmentsQueryParamsResolvedForTypeField=function(e){if("user"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetStoragePolicyAssignmentsQueryParamsResolvedForTypeField"})},t.serializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyTypeField=S,t.deserializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyTypeField=k,t.serializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyField=E,t.deserializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyField=T,t.serializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeCreateStoragePolicyAssignmentRequestBodyStoragePolicyFieldInput=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateStoragePolicyAssignmentRequestBodyStoragePolicyFieldInput"'});const t=null==e.type?void 0:k(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateStoragePolicyAssignmentRequestBodyStoragePolicyFieldInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateStoragePolicyAssignmentRequestBodyStoragePolicyFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeCreateStoragePolicyAssignmentRequestBodyAssignedToTypeField=B,t.deserializeCreateStoragePolicyAssignmentRequestBodyAssignedToTypeField=C,t.serializeCreateStoragePolicyAssignmentRequestBodyAssignedToField=I,t.deserializeCreateStoragePolicyAssignmentRequestBodyAssignedToField=A,t.serializeCreateStoragePolicyAssignmentRequestBody=F,t.deserializeCreateStoragePolicyAssignmentRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateStoragePolicyAssignmentRequestBody"'});if(null==e.storage_policy)throw new c.BoxSdkError({message:'Expecting "storage_policy" of type "CreateStoragePolicyAssignmentRequestBody" to be defined'});const t=T(e.storage_policy);if(null==e.assigned_to)throw new c.BoxSdkError({message:'Expecting "assigned_to" of type "CreateStoragePolicyAssignmentRequestBody" to be defined'});const r=A(e.assigned_to);return{storagePolicy:t,assignedTo:r}},t.serializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyTypeField=M,t.deserializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyTypeField=D,t.serializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField=R,t.deserializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField=P,t.serializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeUpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyFieldInput=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyFieldInput"'});const t=null==e.type?void 0:D(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyFieldInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeUpdateStoragePolicyAssignmentByIdRequestBody=O,t.deserializeUpdateStoragePolicyAssignmentByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateStoragePolicyAssignmentByIdRequestBody"'});if(null==e.storage_policy)throw new c.BoxSdkError({message:'Expecting "storage_policy" of type "UpdateStoragePolicyAssignmentByIdRequestBody" to be defined'});return{storagePolicy:P(e.storage_policy)}};const n=r(87335),o=r(66778),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetStoragePolicyAssignmentsOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateStoragePolicyAssignmentOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetStoragePolicyAssignmentByIdOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateStoragePolicyAssignmentByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteStoragePolicyAssignmentByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetStoragePolicyAssignmentsHeaders=v;t.CreateStoragePolicyAssignmentRequestBodyStoragePolicyField=class{constructor(e){this.type="storage_policy",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateStoragePolicyAssignmentHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetStoragePolicyAssignmentByIdHeaders=w;t.UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField=class{constructor(e){this.type="storage_policy",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateStoragePolicyAssignmentByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteStoragePolicyAssignmentByIdHeaders=x;function S(e){return e}function k(e){if("storage_policy"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateStoragePolicyAssignmentRequestBodyStoragePolicyTypeField"})}function E(e){return{type:e.type,id:e.id}}function T(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateStoragePolicyAssignmentRequestBodyStoragePolicyField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateStoragePolicyAssignmentRequestBodyStoragePolicyField" to be defined'});const t=k(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateStoragePolicyAssignmentRequestBodyStoragePolicyField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateStoragePolicyAssignmentRequestBodyStoragePolicyField"'});return{type:t,id:e.id}}function B(e){return e}function C(e){if("user"==e)return e;if("enterprise"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateStoragePolicyAssignmentRequestBodyAssignedToTypeField"})}function I(e){return{type:e.type,id:e.id}}function A(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateStoragePolicyAssignmentRequestBodyAssignedToField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateStoragePolicyAssignmentRequestBodyAssignedToField" to be defined'});const t=C(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateStoragePolicyAssignmentRequestBodyAssignedToField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateStoragePolicyAssignmentRequestBodyAssignedToField"'});return{type:t,id:e.id}}function F(e){return{storage_policy:E(e.storagePolicy),assigned_to:I(e.assignedTo)}}function M(e){return e}function D(e){if("storage_policy"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyTypeField"})}function R(e){return{type:e.type,id:e.id}}function P(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField" to be defined'});const t=D(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField"'});return{type:t,id:e.id}}function O(e){return{storage_policy:R(e.storagePolicy)}}t.StoragePolicyAssignmentsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getStoragePolicyAssignments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),resolved_for_type:(0,l.toString)(e.resolvedForType),resolved_for_id:(0,l.toString)(e.resolvedForId)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policy_assignments"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeStoragePolicyAssignments)(u.data)),{rawData:u.data})}))}createStoragePolicyAssignment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policy_assignments"),method:"POST",headers:s,data:F(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeStoragePolicyAssignment)(l.data)),{rawData:l.data})}))}getStoragePolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policy_assignments/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeStoragePolicyAssignment)(c.data)),{rawData:c.data})}))}updateStoragePolicyAssignmentById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,s=i.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policy_assignments/",(0,l.toString)(e)),method:"PUT",headers:c,data:O(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeStoragePolicyAssignment)(u.data)),{rawData:u.data})}))}deleteStoragePolicyAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/storage_policy_assignments/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},81495:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAssignmentsManager=t.DeleteTaskAssignmentByIdHeaders=t.UpdateTaskAssignmentByIdHeaders=t.GetTaskAssignmentByIdHeaders=t.CreateTaskAssignmentHeaders=t.CreateTaskAssignmentRequestBodyTaskField=t.GetTaskAssignmentsHeaders=t.DeleteTaskAssignmentByIdOptionals=t.UpdateTaskAssignmentByIdOptionals=t.GetTaskAssignmentByIdOptionals=t.CreateTaskAssignmentOptionals=t.GetTaskAssignmentsOptionals=void 0,t.serializeCreateTaskAssignmentRequestBodyTaskTypeField=S,t.deserializeCreateTaskAssignmentRequestBodyTaskTypeField=k,t.serializeCreateTaskAssignmentRequestBodyTaskField=E,t.deserializeCreateTaskAssignmentRequestBodyTaskField=T,t.serializeCreateTaskAssignmentRequestBodyTaskFieldInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeCreateTaskAssignmentRequestBodyTaskFieldInput=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTaskAssignmentRequestBodyTaskFieldInput"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTaskAssignmentRequestBodyTaskFieldInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTaskAssignmentRequestBodyTaskFieldInput"'});const t=e.id,r=null==e.type?void 0:k(e.type);return{id:t,type:r}},t.serializeCreateTaskAssignmentRequestBodyAssignToField=B,t.deserializeCreateTaskAssignmentRequestBodyAssignToField=C,t.serializeCreateTaskAssignmentRequestBody=I,t.deserializeCreateTaskAssignmentRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTaskAssignmentRequestBody"'});if(null==e.task)throw new c.BoxSdkError({message:'Expecting "task" of type "CreateTaskAssignmentRequestBody" to be defined'});const t=T(e.task);if(null==e.assign_to)throw new c.BoxSdkError({message:'Expecting "assign_to" of type "CreateTaskAssignmentRequestBody" to be defined'});const r=C(e.assign_to);return{task:t,assignTo:r}},t.serializeUpdateTaskAssignmentByIdRequestBodyResolutionStateField=A,t.deserializeUpdateTaskAssignmentByIdRequestBodyResolutionStateField=F,t.serializeUpdateTaskAssignmentByIdRequestBody=M,t.deserializeUpdateTaskAssignmentByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateTaskAssignmentByIdRequestBody"'});if(null!=e.message&&!(0,u.sdIsString)(e.message))throw new c.BoxSdkError({message:'Expecting string for "message" of type "UpdateTaskAssignmentByIdRequestBody"'});const t=null==e.message?void 0:e.message,r=null==e.resolution_state?void 0:F(e.resolution_state);return{message:t,resolutionState:r}};const n=r(85065),o=r(6884),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTaskAssignmentsOptionals=h;class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateTaskAssignmentOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTaskAssignmentByIdOptionals=m;class g{constructor(e){this.requestBody={},this.headers=new _({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateTaskAssignmentByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteTaskAssignmentByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTaskAssignmentsHeaders=v;t.CreateTaskAssignmentRequestBodyTaskField=class{constructor(e){this.type="task",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}};class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateTaskAssignmentHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTaskAssignmentByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateTaskAssignmentByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteTaskAssignmentByIdHeaders=x;function S(e){return e}function k(e){if("task"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateTaskAssignmentRequestBodyTaskTypeField"})}function E(e){return{id:e.id,type:e.type}}function T(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTaskAssignmentRequestBodyTaskField"'});if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTaskAssignmentRequestBodyTaskField" to be defined'});if(!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTaskAssignmentRequestBodyTaskField"'});const t=e.id;if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateTaskAssignmentRequestBodyTaskField" to be defined'});return{id:t,type:k(e.type)}}function B(e){return{id:null==e.id?void 0:e.id,login:null==e.login?void 0:e.login}}function C(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTaskAssignmentRequestBodyAssignToField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTaskAssignmentRequestBodyAssignToField"'});const t=null==e.id?void 0:e.id;if(null!=e.login&&!(0,u.sdIsString)(e.login))throw new c.BoxSdkError({message:'Expecting string for "login" of type "CreateTaskAssignmentRequestBodyAssignToField"'});return{id:t,login:null==e.login?void 0:e.login}}function I(e){return{task:E(e.task),assign_to:B(e.assignTo)}}function A(e){return e}function F(e){if("completed"==e)return e;if("incomplete"==e)return e;if("approved"==e)return e;if("rejected"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateTaskAssignmentByIdRequestBodyResolutionStateField"})}function M(e){return{message:null==e.message?void 0:e.message,resolution_state:null==e.resolutionState?void 0:e.resolutionState}}t.TaskAssignmentsManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getTaskAssignments(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/tasks/",(0,l.toString)(e),"/assignments"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeTaskAssignments)(c.data)),{rawData:c.data})}))}createTaskAssignment(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/task_assignments"),method:"POST",headers:s,data:I(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTaskAssignment)(l.data)),{rawData:l.data})}))}getTaskAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/task_assignments/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTaskAssignment)(c.data)),{rawData:c.data})}))}updateTaskAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/task_assignments/",(0,l.toString)(e)),method:"PUT",headers:c,data:M(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTaskAssignment)(u.data)),{rawData:u.data})}))}deleteTaskAssignmentById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/task_assignments/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},13612:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TasksManager=t.DeleteTaskByIdHeaders=t.UpdateTaskByIdHeaders=t.GetTaskByIdHeaders=t.CreateTaskHeaders=t.GetFileTasksHeaders=t.DeleteTaskByIdOptionals=t.UpdateTaskByIdOptionals=t.GetTaskByIdOptionals=t.CreateTaskOptionals=t.GetFileTasksOptionals=void 0,t.serializeCreateTaskRequestBodyItemTypeField=E,t.deserializeCreateTaskRequestBodyItemTypeField=T,t.serializeCreateTaskRequestBodyItemField=B,t.deserializeCreateTaskRequestBodyItemField=C,t.serializeCreateTaskRequestBodyActionField=I,t.deserializeCreateTaskRequestBodyActionField=A,t.serializeCreateTaskRequestBodyCompletionRuleField=F,t.deserializeCreateTaskRequestBodyCompletionRuleField=M,t.serializeCreateTaskRequestBody=D,t.deserializeCreateTaskRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateTaskRequestBody"'});if(null==e.item)throw new p.BoxSdkError({message:'Expecting "item" of type "CreateTaskRequestBody" to be defined'});const t=C(e.item),r=null==e.action?void 0:A(e.action);if(null!=e.message&&!(0,h.sdIsString)(e.message))throw new p.BoxSdkError({message:'Expecting string for "message" of type "CreateTaskRequestBody"'});const i=null==e.message?void 0:e.message;if(null!=e.due_at&&!(0,h.sdIsString)(e.due_at))throw new p.BoxSdkError({message:'Expecting string for "due_at" of type "CreateTaskRequestBody"'});const n=null==e.due_at?void 0:(0,a.deserializeDateTime)(e.due_at),o=null==e.completion_rule?void 0:M(e.completion_rule);return{item:t,action:r,message:i,dueAt:n,completionRule:o}},t.serializeUpdateTaskByIdRequestBodyActionField=R,t.deserializeUpdateTaskByIdRequestBodyActionField=P,t.serializeUpdateTaskByIdRequestBodyCompletionRuleField=O,t.deserializeUpdateTaskByIdRequestBodyCompletionRuleField=z,t.serializeUpdateTaskByIdRequestBody=N,t.deserializeUpdateTaskByIdRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateTaskByIdRequestBody"'});const t=null==e.action?void 0:P(e.action);if(null!=e.message&&!(0,h.sdIsString)(e.message))throw new p.BoxSdkError({message:'Expecting string for "message" of type "UpdateTaskByIdRequestBody"'});const r=null==e.message?void 0:e.message;if(null!=e.due_at&&!(0,h.sdIsString)(e.due_at))throw new p.BoxSdkError({message:'Expecting string for "due_at" of type "UpdateTaskByIdRequestBody"'});const i=null==e.due_at?void 0:(0,a.deserializeDateTime)(e.due_at),n=null==e.completion_rule?void 0:z(e.completion_rule);return{action:t,message:r,dueAt:i,completionRule:n}};const n=r(46682),o=r(62125),s=r(93845),a=r(93845),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetFileTasksOptionals=m;class g{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateTaskOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTaskByIdOptionals=y;class v{constructor(e){this.requestBody={},this.headers=new S({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateTaskByIdOptionals=v;class b{constructor(e){this.headers=new k({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteTaskByIdOptionals=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetFileTasksHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateTaskHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTaskByIdHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateTaskByIdHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteTaskByIdHeaders=k;function E(e){return e}function T(e){if("file"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateTaskRequestBodyItemTypeField"})}function B(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function C(e){if(!(0,f.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateTaskRequestBodyItemField"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "CreateTaskRequestBodyItemField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:T(e.type)}}function I(e){return e}function A(e){if("review"==e)return e;if("complete"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateTaskRequestBodyActionField"})}function F(e){return e}function M(e){if("all_assignees"==e)return e;if("any_assignee"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateTaskRequestBodyCompletionRuleField"})}function D(e){return{item:B(e.item),action:null==e.action?void 0:e.action,message:null==e.message?void 0:e.message,due_at:null==e.dueAt?void 0:(0,s.serializeDateTime)(e.dueAt),completion_rule:null==e.completionRule?void 0:e.completionRule}}function R(e){return e}function P(e){if("review"==e)return e;if("complete"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateTaskByIdRequestBodyActionField"})}function O(e){return e}function z(e){if("all_assignees"==e)return e;if("any_assignee"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateTaskByIdRequestBodyCompletionRuleField"})}function N(e){return{action:null==e.action?void 0:e.action,message:null==e.message?void 0:e.message,due_at:null==e.dueAt?void 0:(0,s.serializeDateTime)(e.dueAt),completion_rule:null==e.completionRule?void 0:e.completionRule}}t.TasksManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getFileTasks(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,c.toString)(e),"/tasks"),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeTasks)(a.data)),{rawData:a.data})}))}createTask(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/tasks"),method:"POST",headers:s,data:D(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTask)(a.data)),{rawData:a.data})}))}getTaskById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/tasks/",(0,c.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTask)(a.data)),{rawData:a.data})}))}updateTaskById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)(Object.assign({},n.extraHeaders)),l=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/tasks/",(0,c.toString)(e)),method:"PUT",headers:a,data:N(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTask)(l.data)),{rawData:l.data})}))}deleteTaskById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,d.prepareParams)(Object.assign({},i.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/tasks/",(0,c.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},52162:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TermsOfServiceUserStatusesManager=t.UpdateTermsOfServiceStatusForUserByIdHeaders=t.CreateTermsOfServiceStatusForUserHeaders=t.CreateTermsOfServiceStatusForUserRequestBodyUserField=t.CreateTermsOfServiceStatusForUserRequestBodyTosField=t.GetTermsOfServiceUserStatusesHeaders=t.UpdateTermsOfServiceStatusForUserByIdOptionals=t.CreateTermsOfServiceStatusForUserOptionals=t.GetTermsOfServiceUserStatusesOptionals=void 0,t.serializeCreateTermsOfServiceStatusForUserRequestBodyTosTypeField=w,t.deserializeCreateTermsOfServiceStatusForUserRequestBodyTosTypeField=_,t.serializeCreateTermsOfServiceStatusForUserRequestBodyTosField=x,t.deserializeCreateTermsOfServiceStatusForUserRequestBodyTosField=S,t.serializeCreateTermsOfServiceStatusForUserRequestBodyTosFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeCreateTermsOfServiceStatusForUserRequestBodyTosFieldInput=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceStatusForUserRequestBodyTosFieldInput"'});const t=null==e.type?void 0:_(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTermsOfServiceStatusForUserRequestBodyTosFieldInput" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTermsOfServiceStatusForUserRequestBodyTosFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeCreateTermsOfServiceStatusForUserRequestBodyUserTypeField=k,t.deserializeCreateTermsOfServiceStatusForUserRequestBodyUserTypeField=E,t.serializeCreateTermsOfServiceStatusForUserRequestBodyUserField=T,t.deserializeCreateTermsOfServiceStatusForUserRequestBodyUserField=B,t.serializeCreateTermsOfServiceStatusForUserRequestBodyUserFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeCreateTermsOfServiceStatusForUserRequestBodyUserFieldInput=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceStatusForUserRequestBodyUserFieldInput"'});const t=null==e.type?void 0:E(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTermsOfServiceStatusForUserRequestBodyUserFieldInput" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTermsOfServiceStatusForUserRequestBodyUserFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeCreateTermsOfServiceStatusForUserRequestBody=C,t.deserializeCreateTermsOfServiceStatusForUserRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceStatusForUserRequestBody"'});if(null==e.tos)throw new c.BoxSdkError({message:'Expecting "tos" of type "CreateTermsOfServiceStatusForUserRequestBody" to be defined'});const t=S(e.tos);if(null==e.user)throw new c.BoxSdkError({message:'Expecting "user" of type "CreateTermsOfServiceStatusForUserRequestBody" to be defined'});const r=B(e.user);if(null==e.is_accepted)throw new c.BoxSdkError({message:'Expecting "is_accepted" of type "CreateTermsOfServiceStatusForUserRequestBody" to be defined'});if(!(0,u.sdIsBoolean)(e.is_accepted))throw new c.BoxSdkError({message:'Expecting boolean for "is_accepted" of type "CreateTermsOfServiceStatusForUserRequestBody"'});const i=e.is_accepted;return{tos:t,user:r,isAccepted:i}},t.serializeUpdateTermsOfServiceStatusForUserByIdRequestBody=I,t.deserializeUpdateTermsOfServiceStatusForUserByIdRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateTermsOfServiceStatusForUserByIdRequestBody"'});if(null==e.is_accepted)throw new c.BoxSdkError({message:'Expecting "is_accepted" of type "UpdateTermsOfServiceStatusForUserByIdRequestBody" to be defined'});if(!(0,u.sdIsBoolean)(e.is_accepted))throw new c.BoxSdkError({message:'Expecting boolean for "is_accepted" of type "UpdateTermsOfServiceStatusForUserByIdRequestBody"'});return{isAccepted:e.is_accepted}};const n=r(32228),o=r(60848),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTermsOfServiceUserStatusesOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateTermsOfServiceStatusForUserOptionals=m;class g{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateTermsOfServiceStatusForUserByIdOptionals=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTermsOfServiceUserStatusesHeaders=y;t.CreateTermsOfServiceStatusForUserRequestBodyTosField=class{constructor(e){this.type="terms_of_service",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};t.CreateTermsOfServiceStatusForUserRequestBodyUserField=class{constructor(e){this.type="user",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateTermsOfServiceStatusForUserHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateTermsOfServiceStatusForUserByIdHeaders=b;function w(e){return e}function _(e){if("terms_of_service"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateTermsOfServiceStatusForUserRequestBodyTosTypeField"})}function x(e){return{type:e.type,id:e.id}}function S(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceStatusForUserRequestBodyTosField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateTermsOfServiceStatusForUserRequestBodyTosField" to be defined'});const t=_(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTermsOfServiceStatusForUserRequestBodyTosField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTermsOfServiceStatusForUserRequestBodyTosField"'});return{type:t,id:e.id}}function k(e){return e}function E(e){if("user"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateTermsOfServiceStatusForUserRequestBodyUserTypeField"})}function T(e){return{type:e.type,id:e.id}}function B(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceStatusForUserRequestBodyUserField"'});if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "CreateTermsOfServiceStatusForUserRequestBodyUserField" to be defined'});const t=E(e.type);if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "CreateTermsOfServiceStatusForUserRequestBodyUserField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateTermsOfServiceStatusForUserRequestBodyUserField"'});return{type:t,id:e.id}}function C(e){return{tos:x(e.tos),user:T(e.user),is_accepted:e.isAccepted}}function I(e){return{is_accepted:e.isAccepted}}t.TermsOfServiceUserStatusesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getTermsOfServiceUserStatuses(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,a.prepareParams)({tos_id:(0,l.toString)(e.tosId),user_id:(0,l.toString)(e.userId)}),c=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_service_user_statuses"),method:"GET",params:s,headers:c,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeTermsOfServiceUserStatuses)(u.data)),{rawData:u.data})}))}createTermsOfServiceStatusForUser(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_service_user_statuses"),method:"POST",headers:s,data:C(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTermsOfServiceUserStatus)(l.data)),{rawData:l.data})}))}updateTermsOfServiceStatusForUserById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,s=i.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_service_user_statuses/",(0,l.toString)(e)),method:"PUT",headers:c,data:I(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTermsOfServiceUserStatus)(u.data)),{rawData:u.data})}))}}},61020:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TermsOfServicesManager=t.UpdateTermsOfServiceByIdHeaders=t.GetTermsOfServiceByIdHeaders=t.CreateTermsOfServiceHeaders=t.GetTermsOfServiceHeaders=t.UpdateTermsOfServiceByIdOptionals=t.GetTermsOfServiceByIdOptionals=t.CreateTermsOfServiceOptionals=void 0,t.serializeGetTermsOfServiceQueryParamsTosTypeField=function(e){return e},t.deserializeGetTermsOfServiceQueryParamsTosTypeField=function(e){if("external"==e)return e;if("managed"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize GetTermsOfServiceQueryParamsTosTypeField"})},t.serializeCreateTermsOfServiceRequestBodyStatusField=w,t.deserializeCreateTermsOfServiceRequestBodyStatusField=_,t.serializeCreateTermsOfServiceRequestBodyTosTypeField=x,t.deserializeCreateTermsOfServiceRequestBodyTosTypeField=S,t.serializeCreateTermsOfServiceRequestBody=k,t.deserializeCreateTermsOfServiceRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateTermsOfServiceRequestBody"'});if(null==e.status)throw new c.BoxSdkError({message:'Expecting "status" of type "CreateTermsOfServiceRequestBody" to be defined'});const t=_(e.status),r=null==e.tos_type?void 0:S(e.tos_type);if(null==e.text)throw new c.BoxSdkError({message:'Expecting "text" of type "CreateTermsOfServiceRequestBody" to be defined'});if(!(0,u.sdIsString)(e.text))throw new c.BoxSdkError({message:'Expecting string for "text" of type "CreateTermsOfServiceRequestBody"'});const i=e.text;return{status:t,tosType:r,text:i}},t.serializeUpdateTermsOfServiceByIdRequestBodyStatusField=E,t.deserializeUpdateTermsOfServiceByIdRequestBodyStatusField=T,t.serializeUpdateTermsOfServiceByIdRequestBody=B,t.deserializeUpdateTermsOfServiceByIdRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateTermsOfServiceByIdRequestBody"'});if(null==e.status)throw new c.BoxSdkError({message:'Expecting "status" of type "UpdateTermsOfServiceByIdRequestBody" to be defined'});const t=T(e.status);if(null==e.text)throw new c.BoxSdkError({message:'Expecting "text" of type "UpdateTermsOfServiceByIdRequestBody" to be defined'});if(!(0,u.sdIsString)(e.text))throw new c.BoxSdkError({message:'Expecting string for "text" of type "UpdateTermsOfServiceByIdRequestBody"'});const r=e.text;return{status:t,text:r}};const n=r(67426),o=r(13669),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateTermsOfServiceOptionals=h;class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTermsOfServiceByIdOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateTermsOfServiceByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTermsOfServiceHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateTermsOfServiceHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTermsOfServiceByIdHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateTermsOfServiceByIdHeaders=b;function w(e){return e}function _(e){if("enabled"==e)return e;if("disabled"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateTermsOfServiceRequestBodyStatusField"})}function x(e){return e}function S(e){if("external"==e)return e;if("managed"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateTermsOfServiceRequestBodyTosTypeField"})}function k(e){return{status:e.status,tos_type:null==e.tosType?void 0:e.tosType,text:e.text}}function E(e){return e}function T(e){if("enabled"==e)return e;if("disabled"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateTermsOfServiceByIdRequestBodyStatusField"})}function B(e){return{status:e.status,text:e.text}}t.TermsOfServicesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getTermsOfService(){return i(this,arguments,void 0,(function*(e={},t=new g({}),r){const i=new g({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({tos_type:(0,l.toString)(e.tosType)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_services"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeTermsOfServices)(c.data)),{rawData:c.data})}))}createTermsOfService(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_services"),method:"POST",headers:s,data:k(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTermsOfService)(l.data)),{rawData:l.data})}))}getTermsOfServiceById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_services/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeTermsOfService)(c.data)),{rawData:c.data})}))}updateTermsOfServiceById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new m({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,s=i.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/terms_of_services/",(0,l.toString)(e)),method:"PUT",headers:c,data:B(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTermsOfService)(u.data)),{rawData:u.data})}))}}},87653:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TransferManager=t.TransferOwnedFolderHeaders=t.TransferOwnedFolderOptionals=void 0,t.serializeTransferOwnedFolderRequestBodyOwnedByField=f,t.deserializeTransferOwnedFolderRequestBodyOwnedByField=m,t.serializeTransferOwnedFolderRequestBody=g,t.deserializeTransferOwnedFolderRequestBody=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TransferOwnedFolderRequestBody"'});if(null==e.owned_by)throw new d.BoxSdkError({message:'Expecting "owned_by" of type "TransferOwnedFolderRequestBody" to be defined'});return{ownedBy:m(e.owned_by)}};const n=r(34537),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631),c=r(50793),u=r(50793);class p{constructor(e){this.queryParams={},this.headers=new h({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.TransferOwnedFolderOptionals=p;class h{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.TransferOwnedFolderHeaders=h;function f(e){return{id:e.id}}function m(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TransferOwnedFolderRequestBodyOwnedByField"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "TransferOwnedFolderRequestBodyOwnedByField" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TransferOwnedFolderRequestBodyOwnedByField"'});return{id:e.id}}function g(e){return{owned_by:f(e.ownedBy)}}t.TransferManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}transferOwnedFolder(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new p({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),o=i.queryParams,d=i.headers,c=i.cancellationToken,u=(0,s.prepareParams)({fields:o.fields?o.fields.map(a.toString).join(","):void 0,notify:(0,a.toString)(o.notify)}),h=(0,s.prepareParams)(Object.assign({},d.extraHeaders)),f=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,a.toString)(e),"/folders/0"),method:"PUT",params:u,headers:h,data:g(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,n.deserializeFolderFull)(f.data)),{rawData:f.data})}))}}},45244:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TrashedFilesManager=t.DeleteTrashedFileByIdHeaders=t.GetTrashedFileByIdHeaders=t.RestoreFileFromTrashHeaders=t.DeleteTrashedFileByIdOptionals=t.GetTrashedFileByIdOptionals=t.RestoreFileFromTrashOptionals=void 0,t.serializeRestoreFileFromTrashRequestBodyParentField=b,t.deserializeRestoreFileFromTrashRequestBodyParentField=w,t.serializeRestoreFileFromTrashRequestBody=_,t.deserializeRestoreFileFromTrashRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreFileFromTrashRequestBody"'});if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "RestoreFileFromTrashRequestBody"'});const t=null==e.name?void 0:e.name,r=null==e.parent?void 0:w(e.parent);return{name:t,parent:r}};const n=r(40950),o=r(37416),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.requestBody={},this.queryParams={},this.headers=new g({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RestoreFileFromTrashOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new y({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTrashedFileByIdOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteTrashedFileByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RestoreFileFromTrashHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTrashedFileByIdHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteTrashedFileByIdHeaders=v;function b(e){return{id:null==e.id?void 0:e.id}}function w(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreFileFromTrashRequestBodyParentField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "RestoreFileFromTrashRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function _(e){return{name:null==e.name?void 0:e.name,parent:null==e.parent?void 0:b(e.parent)}}t.TrashedFilesManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}restoreFileFromTrash(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:o.fields?o.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),f=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e)),method:"POST",params:u,headers:p,data:_(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,n.deserializeTrashFileRestored)(f.data)),{rawData:f.data})}))}getTrashedFileById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/trash"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTrashFile)(p.data)),{rawData:p.data})}))}deleteTrashedFileById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/",(0,l.toString)(e),"/trash"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},79434:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TrashedFoldersManager=t.DeleteTrashedFolderByIdHeaders=t.GetTrashedFolderByIdHeaders=t.RestoreFolderFromTrashHeaders=t.DeleteTrashedFolderByIdOptionals=t.GetTrashedFolderByIdOptionals=t.RestoreFolderFromTrashOptionals=void 0,t.serializeRestoreFolderFromTrashRequestBodyParentField=b,t.deserializeRestoreFolderFromTrashRequestBodyParentField=w,t.serializeRestoreFolderFromTrashRequestBody=_,t.deserializeRestoreFolderFromTrashRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreFolderFromTrashRequestBody"'});if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "RestoreFolderFromTrashRequestBody"'});const t=null==e.name?void 0:e.name,r=null==e.parent?void 0:w(e.parent);return{name:t,parent:r}};const n=r(84064),o=r(4346),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.requestBody={},this.queryParams={},this.headers=new g({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RestoreFolderFromTrashOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new y({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTrashedFolderByIdOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteTrashedFolderByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RestoreFolderFromTrashHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTrashedFolderByIdHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteTrashedFolderByIdHeaders=v;function b(e){return{id:null==e.id?void 0:e.id}}function w(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreFolderFromTrashRequestBodyParentField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "RestoreFolderFromTrashRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function _(e){return{name:null==e.name?void 0:e.name,parent:null==e.parent?void 0:b(e.parent)}}t.TrashedFoldersManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}restoreFolderFromTrash(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:o.fields?o.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),f=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e)),method:"POST",params:u,headers:p,data:_(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,n.deserializeTrashFolderRestored)(f.data)),{rawData:f.data})}))}getTrashedFolderById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/trash"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTrashFolder)(p.data)),{rawData:p.data})}))}deleteTrashedFolderById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/",(0,l.toString)(e),"/trash"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},91475:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TrashedItemsManager=t.GetTrashedItemsHeaders=void 0,t.serializeGetTrashedItemsQueryParamsDirectionField=function(e){return e},t.deserializeGetTrashedItemsQueryParamsDirectionField=function(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize GetTrashedItemsQueryParamsDirectionField"})},t.serializeGetTrashedItemsQueryParamsSortField=function(e){return e},t.deserializeGetTrashedItemsQueryParamsSortField=function(e){if("name"==e)return e;if("date"==e)return e;if("size"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize GetTrashedItemsQueryParamsSortField"})};const n=r(61664),o=r(31210),s=r(93845),a=r(93845),l=r(84143),d=r(72631);class c{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTrashedItemsHeaders=c;t.TrashedItemsManager=class{constructor(e){this.networkSession=new o.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getTrashedItems(){return i(this,arguments,void 0,(function*(e={},t=new c({}),r){const i=new c({extraHeaders:t.extraHeaders}),o=(0,s.prepareParams)({fields:e.fields?e.fields.map(a.toString).join(","):void 0,limit:(0,a.toString)(e.limit),offset:(0,a.toString)(e.offset),usemarker:(0,a.toString)(e.usemarker),marker:(0,a.toString)(e.marker),direction:(0,a.toString)(e.direction),sort:(0,a.toString)(e.sort)}),d=(0,s.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,l.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/folders/trash/items"),method:"GET",params:o,headers:d,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeItems)(u.data)),{rawData:u.data})}))}}},57634:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TrashedWebLinksManager=t.DeleteTrashedWebLinkByIdHeaders=t.GetTrashedWebLinkByIdHeaders=t.RestoreWeblinkFromTrashHeaders=t.DeleteTrashedWebLinkByIdOptionals=t.GetTrashedWebLinkByIdOptionals=t.RestoreWeblinkFromTrashOptionals=void 0,t.serializeRestoreWeblinkFromTrashRequestBodyParentField=b,t.deserializeRestoreWeblinkFromTrashRequestBodyParentField=w,t.serializeRestoreWeblinkFromTrashRequestBody=_,t.deserializeRestoreWeblinkFromTrashRequestBody=function(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreWeblinkFromTrashRequestBody"'});if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "RestoreWeblinkFromTrashRequestBody"'});const t=null==e.name?void 0:e.name,r=null==e.parent?void 0:w(e.parent);return{name:t,parent:r}};const n=r(49238),o=r(13640),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793);class h{constructor(e){this.requestBody={},this.queryParams={},this.headers=new g({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.RestoreWeblinkFromTrashOptionals=h;class f{constructor(e){this.queryParams={},this.headers=new y({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetTrashedWebLinkByIdOptionals=f;class m{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteTrashedWebLinkByIdOptionals=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.RestoreWeblinkFromTrashHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetTrashedWebLinkByIdHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteTrashedWebLinkByIdHeaders=v;function b(e){return{id:null==e.id?void 0:e.id}}function w(e){if(!(0,p.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "RestoreWeblinkFromTrashRequestBodyParentField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "RestoreWeblinkFromTrashRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function _(e){return{name:null==e.name?void 0:e.name,parent:null==e.parent?void 0:b(e.parent)}}t.TrashedWebLinksManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}restoreWeblinkFromTrash(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.queryParams,s=r.headers,c=r.cancellationToken,u=(0,a.prepareParams)({fields:o.fields?o.fields.map(l.toString).join(","):void 0}),p=(0,a.prepareParams)(Object.assign({},s.extraHeaders)),f=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,l.toString)(e)),method:"POST",params:u,headers:p,data:_(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:c});return Object.assign(Object.assign({},(0,n.deserializeTrashWebLinkRestored)(f.data)),{rawData:f.data})}))}getTrashedWebLinkById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)({fields:i.fields?i.fields.map(l.toString).join(","):void 0}),u=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,l.toString)(e),"/trash"),method:"GET",params:c,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeTrashWebLink)(p.data)),{rawData:p.data})}))}deleteTrashedWebLinkById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,l.toString)(e),"/trash"),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},25052:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadsManager=t.UploadFileHeaders=t.PreflightFileUploadCheckHeaders=t.UploadFileVersionHeaders=t.UploadFileOptionals=t.UploadFileVersionOptionals=void 0,t.serializeUploadFileVersionRequestBodyAttributesField=_,t.deserializeUploadFileVersionRequestBodyAttributesField=function(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UploadFileVersionRequestBodyAttributesField"'});if(null==e.name)throw new p.BoxSdkError({message:'Expecting "name" of type "UploadFileVersionRequestBodyAttributesField" to be defined'});if(!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "UploadFileVersionRequestBodyAttributesField"'});const t=e.name;if(null!=e.content_modified_at&&!(0,f.sdIsString)(e.content_modified_at))throw new p.BoxSdkError({message:'Expecting string for "content_modified_at" of type "UploadFileVersionRequestBodyAttributesField"'});const r=null==e.content_modified_at?void 0:(0,a.deserializeDateTime)(e.content_modified_at);return{name:t,contentModifiedAt:r}},t.serializePreflightFileUploadCheckRequestBodyParentField=x,t.deserializePreflightFileUploadCheckRequestBodyParentField=S,t.serializePreflightFileUploadCheckRequestBody=k,t.deserializePreflightFileUploadCheckRequestBody=function(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "PreflightFileUploadCheckRequestBody"'});if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "PreflightFileUploadCheckRequestBody"'});const t=null==e.name?void 0:e.name;if(null!=e.size&&!(0,h.sdIsNumber)(e.size))throw new p.BoxSdkError({message:'Expecting number for "size" of type "PreflightFileUploadCheckRequestBody"'});const r=null==e.size?void 0:e.size,i=null==e.parent?void 0:S(e.parent);return{name:t,size:r,parent:i}},t.serializeUploadFileRequestBodyAttributesParentField=E,t.deserializeUploadFileRequestBodyAttributesParentField=T,t.serializeUploadFileRequestBodyAttributesField=B,t.deserializeUploadFileRequestBodyAttributesField=function(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UploadFileRequestBodyAttributesField"'});if(null==e.name)throw new p.BoxSdkError({message:'Expecting "name" of type "UploadFileRequestBodyAttributesField" to be defined'});if(!(0,f.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "UploadFileRequestBodyAttributesField"'});const t=e.name;if(null==e.parent)throw new p.BoxSdkError({message:'Expecting "parent" of type "UploadFileRequestBodyAttributesField" to be defined'});const r=T(e.parent);if(null!=e.content_created_at&&!(0,f.sdIsString)(e.content_created_at))throw new p.BoxSdkError({message:'Expecting string for "content_created_at" of type "UploadFileRequestBodyAttributesField"'});const i=null==e.content_created_at?void 0:(0,a.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,f.sdIsString)(e.content_modified_at))throw new p.BoxSdkError({message:'Expecting string for "content_modified_at" of type "UploadFileRequestBodyAttributesField"'});const n=null==e.content_modified_at?void 0:(0,a.deserializeDateTime)(e.content_modified_at);return{name:t,parent:r,contentCreatedAt:i,contentModifiedAt:n}};const n=r(379),o=r(2090),s=r(93845),a=r(93845),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793),m=r(50793);class g{constructor(e){this.queryParams={},this.headers=new v({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UploadFileVersionOptionals=g;class y{constructor(e){this.queryParams={},this.headers=new w({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UploadFileOptionals=y;class v{constructor(e){this.extraHeaders={},e.ifMatch&&(this.ifMatch=e.ifMatch),e.contentMd5&&(this.contentMd5=e.contentMd5),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UploadFileVersionHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.PreflightFileUploadCheckHeaders=b;class w{constructor(e){this.extraHeaders={},e.contentMd5&&(this.contentMd5=e.contentMd5),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UploadFileHeaders=w;function _(e){return{name:e.name,content_modified_at:null==e.contentModifiedAt?void 0:(0,s.serializeDateTime)(e.contentModifiedAt)}}function x(e){return{id:null==e.id?void 0:e.id}}function S(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "PreflightFileUploadCheckRequestBodyParentField"'});if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "PreflightFileUploadCheckRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function k(e){return{name:null==e.name?void 0:e.name,size:null==e.size?void 0:e.size,parent:null==e.parent?void 0:x(e.parent)}}function E(e){return{id:e.id}}function T(e){if(!(0,m.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UploadFileRequestBodyAttributesParentField"'});if(null==e.id)throw new p.BoxSdkError({message:'Expecting "id" of type "UploadFileRequestBodyAttributesParentField" to be defined'});if(!(0,f.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "UploadFileRequestBodyAttributesParentField"'});return{id:e.id}}function B(e){return{name:e.name,parent:E(e.parent),content_created_at:null==e.contentCreatedAt?void 0:(0,s.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,s.serializeDateTime)(e.contentModifiedAt)}}t.UploadsManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}uploadFileVersion(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({queryParams:r.queryParams,headers:r.headers,cancellationToken:r.cancellationToken}),o=i.queryParams,s=i.headers,a=i.cancellationToken,l=(0,d.prepareParams)({fields:o.fields?o.fields.map(c.toString).join(","):void 0}),p=(0,d.prepareParams)(Object.assign({"if-match":(0,c.toString)(s.ifMatch),"content-md5":(0,c.toString)(s.contentMd5)},s.extraHeaders)),h=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/",(0,c.toString)(e),"/content"),method:"POST",params:l,headers:p,multipartData:[{partName:"attributes",data:_(t.attributes)},{partName:"file",fileStream:t.file,fileName:t.fileFileName,contentType:t.fileContentType}],contentType:"multipart/form-data",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,n.deserializeFiles)(h.data)),{rawData:h.data})}))}preflightFileUploadCheck(){return i(this,arguments,void 0,(function*(e={},t=new b({}),r){const i=new b({extraHeaders:t.extraHeaders}),n=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),s=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/files/content"),method:"OPTIONS",headers:n,data:k(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,o.deserializeUploadUrl)(s.data)),{rawData:s.data})}))}uploadFile(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0}),l=(0,d.prepareParams)(Object.assign({"content-md5":(0,c.toString)(o.contentMd5)},o.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.uploadUrl,"/2.0/files/content"),method:"POST",params:a,headers:l,multipartData:[{partName:"attributes",data:B(e.attributes)},{partName:"file",fileStream:e.file,fileName:e.fileFileName,contentType:e.fileContentType}],contentType:"multipart/form-data",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeFiles)(p.data)),{rawData:p.data})}))}}},54991:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserCollaborationsManager=t.CreateCollaborationHeaders=t.DeleteCollaborationByIdHeaders=t.UpdateCollaborationByIdHeaders=t.GetCollaborationByIdHeaders=t.CreateCollaborationOptionals=t.DeleteCollaborationByIdOptionals=t.UpdateCollaborationByIdOptionals=t.GetCollaborationByIdOptionals=void 0,t.serializeUpdateCollaborationByIdRequestBodyRoleField=S,t.deserializeUpdateCollaborationByIdRequestBodyRoleField=k,t.serializeUpdateCollaborationByIdRequestBodyStatusField=E,t.deserializeUpdateCollaborationByIdRequestBodyStatusField=T,t.serializeUpdateCollaborationByIdRequestBody=B,t.deserializeUpdateCollaborationByIdRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateCollaborationByIdRequestBody"'});if(null==e.role)throw new u.BoxSdkError({message:'Expecting "role" of type "UpdateCollaborationByIdRequestBody" to be defined'});const t=k(e.role),r=null==e.status?void 0:T(e.status);if(null!=e.expires_at&&!(0,h.sdIsString)(e.expires_at))throw new u.BoxSdkError({message:'Expecting string for "expires_at" of type "UpdateCollaborationByIdRequestBody"'});const i=null==e.expires_at?void 0:(0,s.deserializeDateTime)(e.expires_at);if(null!=e.can_view_path&&!(0,p.sdIsBoolean)(e.can_view_path))throw new u.BoxSdkError({message:'Expecting boolean for "can_view_path" of type "UpdateCollaborationByIdRequestBody"'});const n=null==e.can_view_path?void 0:e.can_view_path;return{role:t,status:r,expiresAt:i,canViewPath:n}},t.serializeCreateCollaborationRequestBodyItemTypeField=C,t.deserializeCreateCollaborationRequestBodyItemTypeField=I,t.serializeCreateCollaborationRequestBodyItemField=A,t.deserializeCreateCollaborationRequestBodyItemField=F,t.serializeCreateCollaborationRequestBodyAccessibleByTypeField=M,t.deserializeCreateCollaborationRequestBodyAccessibleByTypeField=D,t.serializeCreateCollaborationRequestBodyAccessibleByField=R,t.deserializeCreateCollaborationRequestBodyAccessibleByField=P,t.serializeCreateCollaborationRequestBodyRoleField=O,t.deserializeCreateCollaborationRequestBodyRoleField=z,t.serializeCreateCollaborationRequestBody=N,t.deserializeCreateCollaborationRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateCollaborationRequestBody"'});if(null==e.item)throw new u.BoxSdkError({message:'Expecting "item" of type "CreateCollaborationRequestBody" to be defined'});const t=F(e.item);if(null==e.accessible_by)throw new u.BoxSdkError({message:'Expecting "accessible_by" of type "CreateCollaborationRequestBody" to be defined'});const r=P(e.accessible_by);if(null==e.role)throw new u.BoxSdkError({message:'Expecting "role" of type "CreateCollaborationRequestBody" to be defined'});const i=z(e.role);if(null!=e.is_access_only&&!(0,p.sdIsBoolean)(e.is_access_only))throw new u.BoxSdkError({message:'Expecting boolean for "is_access_only" of type "CreateCollaborationRequestBody"'});const n=null==e.is_access_only?void 0:e.is_access_only;if(null!=e.can_view_path&&!(0,p.sdIsBoolean)(e.can_view_path))throw new u.BoxSdkError({message:'Expecting boolean for "can_view_path" of type "CreateCollaborationRequestBody"'});const o=null==e.can_view_path?void 0:e.can_view_path;if(null!=e.expires_at&&!(0,h.sdIsString)(e.expires_at))throw new u.BoxSdkError({message:'Expecting string for "expires_at" of type "CreateCollaborationRequestBody"'});const a=null==e.expires_at?void 0:(0,s.deserializeDateTime)(e.expires_at);return{item:t,accessibleBy:r,role:i,isAccessOnly:n,canViewPath:o,expiresAt:a}};const n=r(10189),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.queryParams={},this.headers=new b({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetCollaborationByIdOptionals=m;class g{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateCollaborationByIdOptionals=g;class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteCollaborationByIdOptionals=y;class v{constructor(e){this.queryParams={},this.headers=new x({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateCollaborationOptionals=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetCollaborationByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateCollaborationByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteCollaborationByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateCollaborationHeaders=x;function S(e){return e}function k(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;if("owner"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateCollaborationByIdRequestBodyRoleField"})}function E(e){return e}function T(e){if("pending"==e)return e;if("accepted"==e)return e;if("rejected"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateCollaborationByIdRequestBodyStatusField"})}function B(e){return{role:e.role,status:null==e.status?void 0:e.status,expires_at:null==e.expiresAt?void 0:(0,o.serializeDateTime)(e.expiresAt),can_view_path:null==e.canViewPath?void 0:e.canViewPath}}function C(e){return e}function I(e){if("file"==e)return e;if("folder"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize CreateCollaborationRequestBodyItemTypeField"})}function A(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function F(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateCollaborationRequestBodyItemField"'});const t=null==e.type?void 0:I(e.type);if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CreateCollaborationRequestBodyItemField"'});return{type:t,id:null==e.id?void 0:e.id}}function M(e){return e}function D(e){if("user"==e)return e;if("group"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize CreateCollaborationRequestBodyAccessibleByTypeField"})}function R(e){return{type:e.type,id:null==e.id?void 0:e.id,login:null==e.login?void 0:e.login}}function P(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateCollaborationRequestBodyAccessibleByField"'});if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "CreateCollaborationRequestBodyAccessibleByField" to be defined'});const t=D(e.type);if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CreateCollaborationRequestBodyAccessibleByField"'});const r=null==e.id?void 0:e.id;if(null!=e.login&&!(0,h.sdIsString)(e.login))throw new u.BoxSdkError({message:'Expecting string for "login" of type "CreateCollaborationRequestBodyAccessibleByField"'});return{type:t,id:r,login:null==e.login?void 0:e.login}}function O(e){return e}function z(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize CreateCollaborationRequestBodyRoleField"})}function N(e){return{item:A(e.item),accessible_by:R(e.accessibleBy),role:e.role,is_access_only:null==e.isAccessOnly?void 0:e.isAccessOnly,can_view_path:null==e.canViewPath?void 0:e.canViewPath,expires_at:null==e.expiresAt?void 0:(0,o.serializeDateTime)(e.expiresAt)}}t.UserCollaborationsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getCollaborationById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)({fields:i.fields?i.fields.map(d.toString).join(","):void 0}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaborations/",(0,d.toString)(e)),method:"GET",params:a,headers:u,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeCollaboration)(p.data)),{rawData:p.data})}))}updateCollaborationById(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),o=i.headers,s=i.cancellationToken,a=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaborations/",(0,d.toString)(e)),method:"PUT",headers:a,data:B(t),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeCollaboration)(u.data)),{rawData:u.data})}))}deleteCollaborationById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaborations/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}createCollaboration(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,o=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)({fields:i.fields?i.fields.map(d.toString).join(","):void 0,notify:(0,d.toString)(i.notify)}),u=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),p=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/collaborations"),method:"POST",params:a,headers:u,data:N(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeCollaboration)(p.data)),{rawData:p.data})}))}}},70174:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UsersManager=t.DeleteUserByIdHeaders=t.UpdateUserByIdHeaders=t.GetUserByIdHeaders=t.GetUserMeHeaders=t.CreateUserHeaders=t.GetUsersHeaders=t.DeleteUserByIdOptionals=t.UpdateUserByIdOptionals=t.GetUserByIdOptionals=t.CreateUserOptionals=void 0,t.serializeGetUsersQueryParamsUserTypeField=function(e){return e},t.deserializeGetUsersQueryParamsUserTypeField=function(e){if("all"==e)return e;if("managed"==e)return e;if("external"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize GetUsersQueryParamsUserTypeField"})},t.serializeCreateUserRequestBodyRoleField=C,t.deserializeCreateUserRequestBodyRoleField=I,t.serializeCreateUserRequestBodyStatusField=A,t.deserializeCreateUserRequestBodyStatusField=F,t.serializeCreateUserRequestBody=M,t.deserializeCreateUserRequestBody=function(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "CreateUserRequestBody"'});if(null==e.name)throw new p.BoxSdkError({message:'Expecting "name" of type "CreateUserRequestBody" to be defined'});if(!(0,m.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "CreateUserRequestBody"'});const t=e.name;if(null!=e.login&&!(0,m.sdIsString)(e.login))throw new p.BoxSdkError({message:'Expecting string for "login" of type "CreateUserRequestBody"'});const r=null==e.login?void 0:e.login;if(null!=e.is_platform_access_only&&!(0,h.sdIsBoolean)(e.is_platform_access_only))throw new p.BoxSdkError({message:'Expecting boolean for "is_platform_access_only" of type "CreateUserRequestBody"'});const i=null==e.is_platform_access_only?void 0:e.is_platform_access_only,n=null==e.role?void 0:I(e.role);if(null!=e.language&&!(0,m.sdIsString)(e.language))throw new p.BoxSdkError({message:'Expecting string for "language" of type "CreateUserRequestBody"'});const o=null==e.language?void 0:e.language;if(null!=e.is_sync_enabled&&!(0,h.sdIsBoolean)(e.is_sync_enabled))throw new p.BoxSdkError({message:'Expecting boolean for "is_sync_enabled" of type "CreateUserRequestBody"'});const s=null==e.is_sync_enabled?void 0:e.is_sync_enabled;if(null!=e.job_title&&!(0,m.sdIsString)(e.job_title))throw new p.BoxSdkError({message:'Expecting string for "job_title" of type "CreateUserRequestBody"'});const l=null==e.job_title?void 0:e.job_title;if(null!=e.phone&&!(0,m.sdIsString)(e.phone))throw new p.BoxSdkError({message:'Expecting string for "phone" of type "CreateUserRequestBody"'});const d=null==e.phone?void 0:e.phone;if(null!=e.address&&!(0,m.sdIsString)(e.address))throw new p.BoxSdkError({message:'Expecting string for "address" of type "CreateUserRequestBody"'});const c=null==e.address?void 0:e.address;if(null!=e.space_amount&&!(0,f.sdIsNumber)(e.space_amount))throw new p.BoxSdkError({message:'Expecting number for "space_amount" of type "CreateUserRequestBody"'});const u=null==e.space_amount?void 0:e.space_amount;if(null!=e.tracking_codes&&!(0,g.sdIsList)(e.tracking_codes))throw new p.BoxSdkError({message:'Expecting array for "tracking_codes" of type "CreateUserRequestBody"'});const v=null==e.tracking_codes?void 0:(0,g.sdIsList)(e.tracking_codes)?e.tracking_codes.map((function(e){return(0,a.deserializeTrackingCode)(e)})):[];if(null!=e.can_see_managed_users&&!(0,h.sdIsBoolean)(e.can_see_managed_users))throw new p.BoxSdkError({message:'Expecting boolean for "can_see_managed_users" of type "CreateUserRequestBody"'});const b=null==e.can_see_managed_users?void 0:e.can_see_managed_users;if(null!=e.timezone&&!(0,m.sdIsString)(e.timezone))throw new p.BoxSdkError({message:'Expecting string for "timezone" of type "CreateUserRequestBody"'});const w=null==e.timezone?void 0:e.timezone;if(null!=e.is_external_collab_restricted&&!(0,h.sdIsBoolean)(e.is_external_collab_restricted))throw new p.BoxSdkError({message:'Expecting boolean for "is_external_collab_restricted" of type "CreateUserRequestBody"'});const _=null==e.is_external_collab_restricted?void 0:e.is_external_collab_restricted;if(null!=e.is_exempt_from_device_limits&&!(0,h.sdIsBoolean)(e.is_exempt_from_device_limits))throw new p.BoxSdkError({message:'Expecting boolean for "is_exempt_from_device_limits" of type "CreateUserRequestBody"'});const x=null==e.is_exempt_from_device_limits?void 0:e.is_exempt_from_device_limits;if(null!=e.is_exempt_from_login_verification&&!(0,h.sdIsBoolean)(e.is_exempt_from_login_verification))throw new p.BoxSdkError({message:'Expecting boolean for "is_exempt_from_login_verification" of type "CreateUserRequestBody"'});const S=null==e.is_exempt_from_login_verification?void 0:e.is_exempt_from_login_verification,k=null==e.status?void 0:F(e.status);if(null!=e.external_app_user_id&&!(0,m.sdIsString)(e.external_app_user_id))throw new p.BoxSdkError({message:'Expecting string for "external_app_user_id" of type "CreateUserRequestBody"'});const E=null==e.external_app_user_id?void 0:e.external_app_user_id;return{name:t,login:r,isPlatformAccessOnly:i,role:n,language:o,isSyncEnabled:s,jobTitle:l,phone:d,address:c,spaceAmount:u,trackingCodes:v,canSeeManagedUsers:b,timezone:w,isExternalCollabRestricted:_,isExemptFromDeviceLimits:x,isExemptFromLoginVerification:S,status:k,externalAppUserId:E}},t.serializeUpdateUserByIdRequestBodyRoleField=D,t.deserializeUpdateUserByIdRequestBodyRoleField=R,t.serializeUpdateUserByIdRequestBodyStatusField=P,t.deserializeUpdateUserByIdRequestBodyStatusField=O,t.serializeUpdateUserByIdRequestBodyNotificationEmailField=z,t.deserializeUpdateUserByIdRequestBodyNotificationEmailField=N,t.serializeUpdateUserByIdRequestBody=q,t.deserializeUpdateUserByIdRequestBody=function(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateUserByIdRequestBody"'});if(null!=e.enterprise&&!(0,m.sdIsString)(e.enterprise))throw new p.BoxSdkError({message:'Expecting string for "enterprise" of type "UpdateUserByIdRequestBody"'});const t=null==e.enterprise?void 0:e.enterprise;if(null!=e.notify&&!(0,h.sdIsBoolean)(e.notify))throw new p.BoxSdkError({message:'Expecting boolean for "notify" of type "UpdateUserByIdRequestBody"'});const r=null==e.notify?void 0:e.notify;if(null!=e.name&&!(0,m.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "UpdateUserByIdRequestBody"'});const i=null==e.name?void 0:e.name;if(null!=e.login&&!(0,m.sdIsString)(e.login))throw new p.BoxSdkError({message:'Expecting string for "login" of type "UpdateUserByIdRequestBody"'});const n=null==e.login?void 0:e.login,o=null==e.role?void 0:R(e.role);if(null!=e.language&&!(0,m.sdIsString)(e.language))throw new p.BoxSdkError({message:'Expecting string for "language" of type "UpdateUserByIdRequestBody"'});const s=null==e.language?void 0:e.language;if(null!=e.is_sync_enabled&&!(0,h.sdIsBoolean)(e.is_sync_enabled))throw new p.BoxSdkError({message:'Expecting boolean for "is_sync_enabled" of type "UpdateUserByIdRequestBody"'});const l=null==e.is_sync_enabled?void 0:e.is_sync_enabled;if(null!=e.job_title&&!(0,m.sdIsString)(e.job_title))throw new p.BoxSdkError({message:'Expecting string for "job_title" of type "UpdateUserByIdRequestBody"'});const d=null==e.job_title?void 0:e.job_title;if(null!=e.phone&&!(0,m.sdIsString)(e.phone))throw new p.BoxSdkError({message:'Expecting string for "phone" of type "UpdateUserByIdRequestBody"'});const c=null==e.phone?void 0:e.phone;if(null!=e.address&&!(0,m.sdIsString)(e.address))throw new p.BoxSdkError({message:'Expecting string for "address" of type "UpdateUserByIdRequestBody"'});const u=null==e.address?void 0:e.address;if(null!=e.tracking_codes&&!(0,g.sdIsList)(e.tracking_codes))throw new p.BoxSdkError({message:'Expecting array for "tracking_codes" of type "UpdateUserByIdRequestBody"'});const v=null==e.tracking_codes?void 0:(0,g.sdIsList)(e.tracking_codes)?e.tracking_codes.map((function(e){return(0,a.deserializeTrackingCode)(e)})):[];if(null!=e.can_see_managed_users&&!(0,h.sdIsBoolean)(e.can_see_managed_users))throw new p.BoxSdkError({message:'Expecting boolean for "can_see_managed_users" of type "UpdateUserByIdRequestBody"'});const b=null==e.can_see_managed_users?void 0:e.can_see_managed_users;if(null!=e.timezone&&!(0,m.sdIsString)(e.timezone))throw new p.BoxSdkError({message:'Expecting string for "timezone" of type "UpdateUserByIdRequestBody"'});const w=null==e.timezone?void 0:e.timezone;if(null!=e.is_external_collab_restricted&&!(0,h.sdIsBoolean)(e.is_external_collab_restricted))throw new p.BoxSdkError({message:'Expecting boolean for "is_external_collab_restricted" of type "UpdateUserByIdRequestBody"'});const _=null==e.is_external_collab_restricted?void 0:e.is_external_collab_restricted;if(null!=e.is_exempt_from_device_limits&&!(0,h.sdIsBoolean)(e.is_exempt_from_device_limits))throw new p.BoxSdkError({message:'Expecting boolean for "is_exempt_from_device_limits" of type "UpdateUserByIdRequestBody"'});const x=null==e.is_exempt_from_device_limits?void 0:e.is_exempt_from_device_limits;if(null!=e.is_exempt_from_login_verification&&!(0,h.sdIsBoolean)(e.is_exempt_from_login_verification))throw new p.BoxSdkError({message:'Expecting boolean for "is_exempt_from_login_verification" of type "UpdateUserByIdRequestBody"'});const S=null==e.is_exempt_from_login_verification?void 0:e.is_exempt_from_login_verification;if(null!=e.is_password_reset_required&&!(0,h.sdIsBoolean)(e.is_password_reset_required))throw new p.BoxSdkError({message:'Expecting boolean for "is_password_reset_required" of type "UpdateUserByIdRequestBody"'});const k=null==e.is_password_reset_required?void 0:e.is_password_reset_required,E=null==e.status?void 0:O(e.status);if(null!=e.space_amount&&!(0,f.sdIsNumber)(e.space_amount))throw new p.BoxSdkError({message:'Expecting number for "space_amount" of type "UpdateUserByIdRequestBody"'});const T=null==e.space_amount?void 0:e.space_amount,B=null==e.notification_email?void 0:N(e.notification_email);if(null!=e.external_app_user_id&&!(0,m.sdIsString)(e.external_app_user_id))throw new p.BoxSdkError({message:'Expecting string for "external_app_user_id" of type "UpdateUserByIdRequestBody"'});const C=null==e.external_app_user_id?void 0:e.external_app_user_id;return{enterprise:t,notify:r,name:i,login:n,role:o,language:s,isSyncEnabled:l,jobTitle:d,phone:c,address:u,trackingCodes:v,canSeeManagedUsers:b,timezone:w,isExternalCollabRestricted:_,isExemptFromDeviceLimits:x,isExemptFromLoginVerification:S,isPasswordResetRequired:k,status:E,spaceAmount:T,notificationEmail:B,externalAppUserId:C}};const n=r(57076),o=r(88510),s=r(55852),a=r(55852),l=r(31210),d=r(93845),c=r(93845),u=r(84143),p=r(72631),h=r(50793),f=r(50793),m=r(50793),g=r(50793),y=r(50793);class v{constructor(e){this.queryParams={},this.headers=new S({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateUserOptionals=v;class b{constructor(e){this.queryParams={},this.headers=new E({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetUserByIdOptionals=b;class w{constructor(e){this.requestBody={},this.queryParams={},this.headers=new T({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateUserByIdOptionals=w;class _{constructor(e){this.queryParams={},this.headers=new B({}),this.cancellationToken=void 0,e.queryParams&&(this.queryParams=e.queryParams),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteUserByIdOptionals=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUsersHeaders=x;class S{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateUserHeaders=S;class k{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUserMeHeaders=k;class E{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetUserByIdHeaders=E;class T{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateUserByIdHeaders=T;class B{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteUserByIdHeaders=B;function C(e){return e}function I(e){if("coadmin"==e)return e;if("user"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateUserRequestBodyRoleField"})}function A(e){return e}function F(e){if("active"==e)return e;if("inactive"==e)return e;if("cannot_delete_edit"==e)return e;if("cannot_delete_edit_upload"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize CreateUserRequestBodyStatusField"})}function M(e){return{name:e.name,login:null==e.login?void 0:e.login,is_platform_access_only:null==e.isPlatformAccessOnly?void 0:e.isPlatformAccessOnly,role:null==e.role?void 0:e.role,language:null==e.language?void 0:e.language,is_sync_enabled:null==e.isSyncEnabled?void 0:e.isSyncEnabled,job_title:null==e.jobTitle?void 0:e.jobTitle,phone:null==e.phone?void 0:e.phone,address:null==e.address?void 0:e.address,space_amount:null==e.spaceAmount?void 0:e.spaceAmount,tracking_codes:null==e.trackingCodes?void 0:e.trackingCodes.map((function(e){return(0,s.serializeTrackingCode)(e)})),can_see_managed_users:null==e.canSeeManagedUsers?void 0:e.canSeeManagedUsers,timezone:null==e.timezone?void 0:e.timezone,is_external_collab_restricted:null==e.isExternalCollabRestricted?void 0:e.isExternalCollabRestricted,is_exempt_from_device_limits:null==e.isExemptFromDeviceLimits?void 0:e.isExemptFromDeviceLimits,is_exempt_from_login_verification:null==e.isExemptFromLoginVerification?void 0:e.isExemptFromLoginVerification,status:null==e.status?void 0:e.status,external_app_user_id:null==e.externalAppUserId?void 0:e.externalAppUserId}}function D(e){return e}function R(e){if("coadmin"==e)return e;if("user"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateUserByIdRequestBodyRoleField"})}function P(e){return e}function O(e){if("active"==e)return e;if("inactive"==e)return e;if("cannot_delete_edit"==e)return e;if("cannot_delete_edit_upload"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize UpdateUserByIdRequestBodyStatusField"})}function z(e){return{email:null==e.email?void 0:e.email}}function N(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "UpdateUserByIdRequestBodyNotificationEmailField"'});if(null!=e.email&&!(0,m.sdIsString)(e.email))throw new p.BoxSdkError({message:'Expecting string for "email" of type "UpdateUserByIdRequestBodyNotificationEmailField"'});return{email:null==e.email?void 0:e.email}}function q(e){return{enterprise:null==e.enterprise?void 0:e.enterprise,notify:null==e.notify?void 0:e.notify,name:null==e.name?void 0:e.name,login:null==e.login?void 0:e.login,role:null==e.role?void 0:e.role,language:null==e.language?void 0:e.language,is_sync_enabled:null==e.isSyncEnabled?void 0:e.isSyncEnabled,job_title:null==e.jobTitle?void 0:e.jobTitle,phone:null==e.phone?void 0:e.phone,address:null==e.address?void 0:e.address,tracking_codes:null==e.trackingCodes?void 0:e.trackingCodes.map((function(e){return(0,s.serializeTrackingCode)(e)})),can_see_managed_users:null==e.canSeeManagedUsers?void 0:e.canSeeManagedUsers,timezone:null==e.timezone?void 0:e.timezone,is_external_collab_restricted:null==e.isExternalCollabRestricted?void 0:e.isExternalCollabRestricted,is_exempt_from_device_limits:null==e.isExemptFromDeviceLimits?void 0:e.isExemptFromDeviceLimits,is_exempt_from_login_verification:null==e.isExemptFromLoginVerification?void 0:e.isExemptFromLoginVerification,is_password_reset_required:null==e.isPasswordResetRequired?void 0:e.isPasswordResetRequired,status:null==e.status?void 0:e.status,space_amount:null==e.spaceAmount?void 0:e.spaceAmount,notification_email:null==e.notificationEmail?void 0:z(e.notificationEmail),external_app_user_id:null==e.externalAppUserId?void 0:e.externalAppUserId}}t.UsersManager=class{constructor(e){this.networkSession=new l.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getUsers(){return i(this,arguments,void 0,(function*(e={},t=new x({}),r){const i=new x({extraHeaders:t.extraHeaders}),o=(0,d.prepareParams)({filter_term:(0,c.toString)(e.filterTerm),user_type:(0,c.toString)(e.userType),external_app_user_id:(0,c.toString)(e.externalAppUserId),fields:e.fields?e.fields.map(c.toString).join(","):void 0,offset:(0,c.toString)(e.offset),limit:(0,c.toString)(e.limit),usemarker:(0,c.toString)(e.usemarker),marker:(0,c.toString)(e.marker)}),s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeUsers)(a.data)),{rawData:a.data})}))}createUser(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new v({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0}),l=(0,d.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users"),method:"POST",params:a,headers:l,data:M(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeUserFull)(p.data)),{rawData:p.data})}))}getUserMe(){return i(this,arguments,void 0,(function*(e={},t=new k({}),r){const i=new k({extraHeaders:t.extraHeaders}),n=(0,d.prepareParams)({fields:e.fields?e.fields.map(c.toString).join(","):void 0}),s=(0,d.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/me"),method:"GET",params:n,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,o.deserializeUserFull)(a.data)),{rawData:a.data})}))}getUserById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new b({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,s=r.cancellationToken,a=(0,d.prepareParams)({fields:i.fields?i.fields.map(c.toString).join(","):void 0}),l=(0,d.prepareParams)(Object.assign({},n.extraHeaders)),p=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,c.toString)(e)),method:"GET",params:a,headers:l,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeUserFull)(p.data)),{rawData:p.data})}))}updateUserById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new w({requestBody:t.requestBody,queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.queryParams,s=r.headers,a=r.cancellationToken,l=(0,d.prepareParams)({fields:n.fields?n.fields.map(c.toString).join(","):void 0}),p=(0,d.prepareParams)(Object.assign({},s.extraHeaders)),h=yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,c.toString)(e)),method:"PUT",params:l,headers:p,data:q(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:a});return Object.assign(Object.assign({},(0,o.deserializeUserFull)(h.data)),{rawData:h.data})}))}deleteUserById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new _({queryParams:t.queryParams,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.queryParams,n=r.headers,o=r.cancellationToken,s=(0,d.prepareParams)({notify:(0,c.toString)(i.notify),force:(0,c.toString)(i.force)}),a=(0,d.prepareParams)(Object.assign({},n.extraHeaders));yield(0,u.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/users/",(0,c.toString)(e)),method:"DELETE",params:s,headers:a,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}}},71305:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebLinksManager=t.DeleteWebLinkByIdHeaders=t.UpdateWebLinkByIdHeaders=t.GetWebLinkByIdHeaders=t.CreateWebLinkHeaders=t.DeleteWebLinkByIdOptionals=t.UpdateWebLinkByIdOptionals=t.GetWebLinkByIdOptionals=t.CreateWebLinkOptionals=void 0,t.serializeCreateWebLinkRequestBodyParentField=x,t.deserializeCreateWebLinkRequestBodyParentField=S,t.serializeCreateWebLinkRequestBody=k,t.deserializeCreateWebLinkRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateWebLinkRequestBody"'});if(null==e.url)throw new u.BoxSdkError({message:'Expecting "url" of type "CreateWebLinkRequestBody" to be defined'});if(!(0,p.sdIsString)(e.url))throw new u.BoxSdkError({message:'Expecting string for "url" of type "CreateWebLinkRequestBody"'});const t=e.url;if(null==e.parent)throw new u.BoxSdkError({message:'Expecting "parent" of type "CreateWebLinkRequestBody" to be defined'});const r=S(e.parent);if(null!=e.name&&!(0,p.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "CreateWebLinkRequestBody"'});const i=null==e.name?void 0:e.name;if(null!=e.description&&!(0,p.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "CreateWebLinkRequestBody"'});const n=null==e.description?void 0:e.description;return{url:t,parent:r,name:i,description:n}},t.serializeUpdateWebLinkByIdRequestBodyParentField=E,t.deserializeUpdateWebLinkByIdRequestBodyParentField=T,t.serializeUpdateWebLinkByIdRequestBodySharedLinkAccessField=B,t.deserializeUpdateWebLinkByIdRequestBodySharedLinkAccessField=C,t.serializeUpdateWebLinkByIdRequestBodySharedLinkField=I,t.deserializeUpdateWebLinkByIdRequestBodySharedLinkField=A,t.serializeUpdateWebLinkByIdRequestBody=F,t.deserializeUpdateWebLinkByIdRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateWebLinkByIdRequestBody"'});if(null!=e.url&&!(0,p.sdIsString)(e.url))throw new u.BoxSdkError({message:'Expecting string for "url" of type "UpdateWebLinkByIdRequestBody"'});const t=null==e.url?void 0:e.url,r=null==e.parent?void 0:T(e.parent);if(null!=e.name&&!(0,p.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "UpdateWebLinkByIdRequestBody"'});const i=null==e.name?void 0:e.name;if(null!=e.description&&!(0,p.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "UpdateWebLinkByIdRequestBody"'});const n=null==e.description?void 0:e.description,o=null==e.shared_link?void 0:A(e.shared_link);return{url:t,parent:r,name:i,description:n,sharedLink:o}};const n=r(60238),o=r(93845),s=r(93845),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateWebLinkOptionals=f;class m{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetWebLinkByIdOptionals=m;class g{constructor(e){this.requestBody={},this.headers=new w({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateWebLinkByIdOptionals=g;class y{constructor(e){this.headers=new _({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteWebLinkByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateWebLinkHeaders=v;class b{constructor(e){this.extraHeaders={},e.boxapi&&(this.boxapi=e.boxapi),e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetWebLinkByIdHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateWebLinkByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteWebLinkByIdHeaders=_;function x(e){return{id:e.id}}function S(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "CreateWebLinkRequestBodyParentField"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "CreateWebLinkRequestBodyParentField" to be defined'});if(!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "CreateWebLinkRequestBodyParentField"'});return{id:e.id}}function k(e){return{url:e.url,parent:x(e.parent),name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description}}function E(e){return{id:null==e.id?void 0:e.id}}function T(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateWebLinkByIdRequestBodyParentField"'});if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UpdateWebLinkByIdRequestBodyParentField"'});return{id:null==e.id?void 0:e.id}}function B(e){return e}function C(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UpdateWebLinkByIdRequestBodySharedLinkAccessField"})}function I(e){return{access:null==e.access?void 0:e.access,password:null==e.password?void 0:e.password,vanity_name:null==e.vanityName?void 0:e.vanityName,unshared_at:null==e.unsharedAt?void 0:(0,o.serializeDateTime)(e.unsharedAt)}}function A(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UpdateWebLinkByIdRequestBodySharedLinkField"'});const t=null==e.access?void 0:C(e.access);if(null!=e.password&&!(0,p.sdIsString)(e.password))throw new u.BoxSdkError({message:'Expecting string for "password" of type "UpdateWebLinkByIdRequestBodySharedLinkField"'});const r=null==e.password?void 0:e.password;if(null!=e.vanity_name&&!(0,p.sdIsString)(e.vanity_name))throw new u.BoxSdkError({message:'Expecting string for "vanity_name" of type "UpdateWebLinkByIdRequestBodySharedLinkField"'});const i=null==e.vanity_name?void 0:e.vanity_name;if(null!=e.unshared_at&&!(0,p.sdIsString)(e.unshared_at))throw new u.BoxSdkError({message:'Expecting string for "unshared_at" of type "UpdateWebLinkByIdRequestBodySharedLinkField"'});return{access:t,password:r,vanityName:i,unsharedAt:null==e.unshared_at?void 0:(0,s.deserializeDateTime)(e.unshared_at)}}function F(e){return{url:null==e.url?void 0:e.url,parent:null==e.parent?void 0:E(e.parent),name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description,shared_link:null==e.sharedLink?void 0:I(e.sharedLink)}}t.WebLinksManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}createWebLink(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links"),method:"POST",headers:s,data:k(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(a.data)),{rawData:a.data})}))}getWebLinkById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)(Object.assign({boxapi:(0,d.toString)(i.boxapi)},i.extraHeaders)),a=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(a.data)),{rawData:a.data})}))}updateWebLinkById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,o=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)(Object.assign({},o.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e)),method:"PUT",headers:a,data:F(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeWebLink)(u.data)),{rawData:u.data})}))}deleteWebLinkById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/web_links/",(0,d.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},40656:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebhooksManager=t.DeleteWebhookByIdHeaders=t.UpdateWebhookByIdHeaders=t.GetWebhookByIdHeaders=t.CreateWebhookHeaders=t.GetWebhooksHeaders=t.DeleteWebhookByIdOptionals=t.UpdateWebhookByIdOptionals=t.GetWebhookByIdOptionals=t.CreateWebhookOptionals=void 0,t.serializeCreateWebhookRequestBodyTargetTypeField=S,t.deserializeCreateWebhookRequestBodyTargetTypeField=k,t.serializeCreateWebhookRequestBodyTargetField=E,t.deserializeCreateWebhookRequestBodyTargetField=T,t.serializeCreateWebhookRequestBodyTriggersField=B,t.deserializeCreateWebhookRequestBodyTriggersField=C,t.serializeCreateWebhookRequestBody=I,t.deserializeCreateWebhookRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateWebhookRequestBody"'});if(null==e.target)throw new c.BoxSdkError({message:'Expecting "target" of type "CreateWebhookRequestBody" to be defined'});const t=T(e.target);if(null==e.address)throw new c.BoxSdkError({message:'Expecting "address" of type "CreateWebhookRequestBody" to be defined'});if(!(0,u.sdIsString)(e.address))throw new c.BoxSdkError({message:'Expecting string for "address" of type "CreateWebhookRequestBody"'});const r=e.address;if(null==e.triggers)throw new c.BoxSdkError({message:'Expecting "triggers" of type "CreateWebhookRequestBody" to be defined'});if(!(0,p.sdIsList)(e.triggers))throw new c.BoxSdkError({message:'Expecting array for "triggers" of type "CreateWebhookRequestBody"'});const i=(0,p.sdIsList)(e.triggers)?e.triggers.map((function(e){return C(e)})):[];return{target:t,address:r,triggers:i}},t.serializeUpdateWebhookByIdRequestBodyTargetTypeField=A,t.deserializeUpdateWebhookByIdRequestBodyTargetTypeField=F,t.serializeUpdateWebhookByIdRequestBodyTargetField=M,t.deserializeUpdateWebhookByIdRequestBodyTargetField=D,t.serializeUpdateWebhookByIdRequestBodyTriggersField=R,t.deserializeUpdateWebhookByIdRequestBodyTriggersField=P,t.serializeUpdateWebhookByIdRequestBody=O,t.deserializeUpdateWebhookByIdRequestBody=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateWebhookByIdRequestBody"'});const t=null==e.target?void 0:D(e.target);if(null!=e.address&&!(0,u.sdIsString)(e.address))throw new c.BoxSdkError({message:'Expecting string for "address" of type "UpdateWebhookByIdRequestBody"'});const r=null==e.address?void 0:e.address;if(null!=e.triggers&&!(0,p.sdIsList)(e.triggers))throw new c.BoxSdkError({message:'Expecting array for "triggers" of type "UpdateWebhookByIdRequestBody"'});const i=null==e.triggers?void 0:(0,p.sdIsList)(e.triggers)?e.triggers.map((function(e){return P(e)})):[];return{target:t,address:r,triggers:i}};const n=r(70934),o=r(36257),s=r(31210),a=r(93845),l=r(93845),d=r(84143),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f{constructor(e){this.headers=new b({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateWebhookOptionals=f;class m{constructor(e){this.headers=new w({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetWebhookByIdOptionals=m;class g{constructor(e){this.requestBody={},this.headers=new _({}),this.cancellationToken=void 0,e.requestBody&&(this.requestBody=e.requestBody),e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.UpdateWebhookByIdOptionals=g;class y{constructor(e){this.headers=new x({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DeleteWebhookByIdOptionals=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetWebhooksHeaders=v;class b{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateWebhookHeaders=b;class w{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetWebhookByIdHeaders=w;class _{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.UpdateWebhookByIdHeaders=_;class x{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DeleteWebhookByIdHeaders=x;function S(e){return e}function k(e){if("file"==e)return e;if("folder"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateWebhookRequestBodyTargetTypeField"})}function E(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function T(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "CreateWebhookRequestBodyTargetField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "CreateWebhookRequestBodyTargetField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:k(e.type)}}function B(e){return e}function C(e){if("FILE.UPLOADED"==e)return e;if("FILE.PREVIEWED"==e)return e;if("FILE.DOWNLOADED"==e)return e;if("FILE.TRASHED"==e)return e;if("FILE.DELETED"==e)return e;if("FILE.RESTORED"==e)return e;if("FILE.COPIED"==e)return e;if("FILE.MOVED"==e)return e;if("FILE.LOCKED"==e)return e;if("FILE.UNLOCKED"==e)return e;if("FILE.RENAMED"==e)return e;if("COMMENT.CREATED"==e)return e;if("COMMENT.UPDATED"==e)return e;if("COMMENT.DELETED"==e)return e;if("TASK_ASSIGNMENT.CREATED"==e)return e;if("TASK_ASSIGNMENT.UPDATED"==e)return e;if("METADATA_INSTANCE.CREATED"==e)return e;if("METADATA_INSTANCE.UPDATED"==e)return e;if("METADATA_INSTANCE.DELETED"==e)return e;if("FOLDER.CREATED"==e)return e;if("FOLDER.RENAMED"==e)return e;if("FOLDER.DOWNLOADED"==e)return e;if("FOLDER.RESTORED"==e)return e;if("FOLDER.DELETED"==e)return e;if("FOLDER.COPIED"==e)return e;if("FOLDER.MOVED"==e)return e;if("FOLDER.TRASHED"==e)return e;if("WEBHOOK.DELETED"==e)return e;if("COLLABORATION.CREATED"==e)return e;if("COLLABORATION.ACCEPTED"==e)return e;if("COLLABORATION.REJECTED"==e)return e;if("COLLABORATION.REMOVED"==e)return e;if("COLLABORATION.UPDATED"==e)return e;if("SHARED_LINK.DELETED"==e)return e;if("SHARED_LINK.CREATED"==e)return e;if("SHARED_LINK.UPDATED"==e)return e;if("SIGN_REQUEST.COMPLETED"==e)return e;if("SIGN_REQUEST.DECLINED"==e)return e;if("SIGN_REQUEST.EXPIRED"==e)return e;if("SIGN_REQUEST.SIGNER_EMAIL_BOUNCED"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize CreateWebhookRequestBodyTriggersField"})}function I(e){return{target:E(e.target),address:e.address,triggers:e.triggers.map((function(e){return e}))}}function A(e){return e}function F(e){if("file"==e)return e;if("folder"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateWebhookByIdRequestBodyTargetTypeField"})}function M(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function D(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "UpdateWebhookByIdRequestBodyTargetField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "UpdateWebhookByIdRequestBodyTargetField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:F(e.type)}}function R(e){return e}function P(e){if("FILE.UPLOADED"==e)return e;if("FILE.PREVIEWED"==e)return e;if("FILE.DOWNLOADED"==e)return e;if("FILE.TRASHED"==e)return e;if("FILE.DELETED"==e)return e;if("FILE.RESTORED"==e)return e;if("FILE.COPIED"==e)return e;if("FILE.MOVED"==e)return e;if("FILE.LOCKED"==e)return e;if("FILE.UNLOCKED"==e)return e;if("FILE.RENAMED"==e)return e;if("COMMENT.CREATED"==e)return e;if("COMMENT.UPDATED"==e)return e;if("COMMENT.DELETED"==e)return e;if("TASK_ASSIGNMENT.CREATED"==e)return e;if("TASK_ASSIGNMENT.UPDATED"==e)return e;if("METADATA_INSTANCE.CREATED"==e)return e;if("METADATA_INSTANCE.UPDATED"==e)return e;if("METADATA_INSTANCE.DELETED"==e)return e;if("FOLDER.CREATED"==e)return e;if("FOLDER.RENAMED"==e)return e;if("FOLDER.DOWNLOADED"==e)return e;if("FOLDER.RESTORED"==e)return e;if("FOLDER.DELETED"==e)return e;if("FOLDER.COPIED"==e)return e;if("FOLDER.MOVED"==e)return e;if("FOLDER.TRASHED"==e)return e;if("WEBHOOK.DELETED"==e)return e;if("COLLABORATION.CREATED"==e)return e;if("COLLABORATION.ACCEPTED"==e)return e;if("COLLABORATION.REJECTED"==e)return e;if("COLLABORATION.REMOVED"==e)return e;if("COLLABORATION.UPDATED"==e)return e;if("SHARED_LINK.DELETED"==e)return e;if("SHARED_LINK.CREATED"==e)return e;if("SHARED_LINK.UPDATED"==e)return e;if("SIGN_REQUEST.COMPLETED"==e)return e;if("SIGN_REQUEST.DECLINED"==e)return e;if("SIGN_REQUEST.EXPIRED"==e)return e;if("SIGN_REQUEST.SIGNER_EMAIL_BOUNCED"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize UpdateWebhookByIdRequestBodyTriggersField"})}function O(e){return{target:null==e.target?void 0:M(e.target),address:null==e.address?void 0:e.address,triggers:null==e.triggers?void 0:e.triggers.map((function(e){return e}))}}t.WebhooksManager=class{constructor(e){this.networkSession=new s.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getWebhooks(){return i(this,arguments,void 0,(function*(e={},t=new v({}),r){const i=new v({extraHeaders:t.extraHeaders}),o=(0,a.prepareParams)({marker:(0,l.toString)(e.marker),limit:(0,l.toString)(e.limit)}),s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/webhooks"),method:"GET",params:o,headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:r});return Object.assign(Object.assign({},(0,n.deserializeWebhooks)(c.data)),{rawData:c.data})}))}createWebhook(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new f({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),l=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/webhooks"),method:"POST",headers:s,data:I(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeWebhook)(l.data)),{rawData:l.data})}))}getWebhookById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,s=(0,a.prepareParams)(Object.assign({},i.extraHeaders)),c=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/webhooks/",(0,l.toString)(e)),method:"GET",headers:s,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,o.deserializeWebhook)(c.data)),{rawData:c.data})}))}updateWebhookById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new g({requestBody:t.requestBody,headers:t.headers,cancellationToken:t.cancellationToken}),i=r.requestBody,n=r.headers,s=r.cancellationToken,c=(0,a.prepareParams)(Object.assign({},n.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/webhooks/",(0,l.toString)(e)),method:"PUT",headers:c,data:O(i),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,o.deserializeWebhook)(u.data)),{rawData:u.data})}))}deleteWebhookById(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new y({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,a.prepareParams)(Object.assign({},i.extraHeaders));yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/webhooks/",(0,l.toString)(e)),method:"DELETE",headers:o,responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:n})}))}}},16360:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkflowsManager=t.StartWorkflowHeaders=t.GetWorkflowsHeaders=t.StartWorkflowOptionals=t.GetWorkflowsOptionals=void 0,t.serializeStartWorkflowRequestBodyTypeField=b,t.deserializeStartWorkflowRequestBodyTypeField=w,t.serializeStartWorkflowRequestBodyFlowField=_,t.deserializeStartWorkflowRequestBodyFlowField=x,t.serializeStartWorkflowRequestBodyFilesTypeField=S,t.deserializeStartWorkflowRequestBodyFilesTypeField=k,t.serializeStartWorkflowRequestBodyFilesField=E,t.deserializeStartWorkflowRequestBodyFilesField=T,t.serializeStartWorkflowRequestBodyFolderTypeField=B,t.deserializeStartWorkflowRequestBodyFolderTypeField=C,t.serializeStartWorkflowRequestBodyFolderField=I,t.deserializeStartWorkflowRequestBodyFolderField=A,t.serializeStartWorkflowRequestBody=F,t.deserializeStartWorkflowRequestBody=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "StartWorkflowRequestBody"'});const t=null==e.type?void 0:w(e.type);if(null==e.flow)throw new u.BoxSdkError({message:'Expecting "flow" of type "StartWorkflowRequestBody" to be defined'});const r=x(e.flow);if(null==e.files)throw new u.BoxSdkError({message:'Expecting "files" of type "StartWorkflowRequestBody" to be defined'});if(!(0,h.sdIsList)(e.files))throw new u.BoxSdkError({message:'Expecting array for "files" of type "StartWorkflowRequestBody"'});const i=(0,h.sdIsList)(e.files)?e.files.map((function(e){return T(e)})):[];if(null==e.folder)throw new u.BoxSdkError({message:'Expecting "folder" of type "StartWorkflowRequestBody" to be defined'});const n=A(e.folder);if(null!=e.outcomes&&!(0,h.sdIsList)(e.outcomes))throw new u.BoxSdkError({message:'Expecting array for "outcomes" of type "StartWorkflowRequestBody"'});const o=null==e.outcomes?void 0:(0,h.sdIsList)(e.outcomes)?e.outcomes.map((function(e){return(0,s.deserializeOutcome)(e)})):[];return{type:t,flow:r,files:i,folder:n,outcomes:o}};const n=r(70018),o=r(24704),s=r(24704),a=r(31210),l=r(93845),d=r(93845),c=r(84143),u=r(72631),p=r(50793),h=r(50793),f=r(50793);class m{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetWorkflowsOptionals=m;class g{constructor(e){this.headers=new v({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.StartWorkflowOptionals=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetWorkflowsHeaders=y;class v{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.StartWorkflowHeaders=v;function b(e){return e}function w(e){if("workflow_parameters"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize StartWorkflowRequestBodyTypeField"})}function _(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function x(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "StartWorkflowRequestBodyFlowField"'});if(null!=e.type&&!(0,p.sdIsString)(e.type))throw new u.BoxSdkError({message:'Expecting string for "type" of type "StartWorkflowRequestBodyFlowField"'});const t=null==e.type?void 0:e.type;if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "StartWorkflowRequestBodyFlowField"'});return{type:t,id:null==e.id?void 0:e.id}}function S(e){return e}function k(e){if("file"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize StartWorkflowRequestBodyFilesTypeField"})}function E(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function T(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "StartWorkflowRequestBodyFilesField"'});const t=null==e.type?void 0:k(e.type);if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "StartWorkflowRequestBodyFilesField"'});return{type:t,id:null==e.id?void 0:e.id}}function B(e){return e}function C(e){if("folder"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize StartWorkflowRequestBodyFolderTypeField"})}function I(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function A(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "StartWorkflowRequestBodyFolderField"'});const t=null==e.type?void 0:C(e.type);if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "StartWorkflowRequestBodyFolderField"'});return{type:t,id:null==e.id?void 0:e.id}}function F(e){return{type:null==e.type?void 0:e.type,flow:_(e.flow),files:e.files.map((function(e){return E(e)})),folder:I(e.folder),outcomes:null==e.outcomes?void 0:e.outcomes.map((function(e){return(0,o.serializeOutcome)(e)}))}}t.WorkflowsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}getWorkflows(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new m({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,o=r.cancellationToken,s=(0,l.prepareParams)({folder_id:(0,d.toString)(e.folderId),trigger_type:(0,d.toString)(e.triggerType),limit:(0,d.toString)(e.limit),marker:(0,d.toString)(e.marker)}),a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/workflows"),method:"GET",params:s,headers:a,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:o});return Object.assign(Object.assign({},(0,n.deserializeWorkflows)(u.data)),{rawData:u.data})}))}startWorkflow(e,t){return i(this,arguments,void 0,(function*(e,t,r={}){const i=new g({headers:r.headers,cancellationToken:r.cancellationToken}),n=i.headers,o=i.cancellationToken,s=(0,l.prepareParams)(Object.assign({},n.extraHeaders));yield(0,c.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/workflows/",(0,d.toString)(e),"/start"),method:"POST",headers:s,data:F(t),contentType:"application/json",responseFormat:void 0,auth:this.auth,networkSession:this.networkSession,cancellationToken:o})}))}}},54270:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ZipDownloadsManager=t.DownloadZipHeaders=t.GetZipDownloadStatusHeaders=t.GetZipDownloadContentHeaders=t.CreateZipDownloadHeaders=t.DownloadZipOptionals=t.GetZipDownloadStatusOptionals=t.GetZipDownloadContentOptionals=t.CreateZipDownloadOptionals=void 0;const n=r(63055),o=r(37248),s=r(47237),a=r(31210),l=r(93845),d=r(84143);class c{constructor(e){this.headers=new f({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.CreateZipDownloadOptionals=c;class u{constructor(e){this.headers=new m({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetZipDownloadContentOptionals=u;class p{constructor(e){this.headers=new g({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.GetZipDownloadStatusOptionals=p;class h{constructor(e){this.headers=new y({}),this.cancellationToken=void 0,e.headers&&(this.headers=e.headers),e.cancellationToken&&(this.cancellationToken=e.cancellationToken)}}t.DownloadZipOptionals=h;class f{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.CreateZipDownloadHeaders=f;class m{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetZipDownloadContentHeaders=m;class g{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.GetZipDownloadStatusHeaders=g;class y{constructor(e){this.extraHeaders={},e.extraHeaders&&(this.extraHeaders=e.extraHeaders)}}t.DownloadZipHeaders=y;t.ZipDownloadsManager=class{constructor(e){this.networkSession=new a.NetworkSession({}),e.auth&&(this.auth=e.auth),e.networkSession&&(this.networkSession=e.networkSession)}createZipDownload(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new c({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,s=r.cancellationToken,a=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),u=yield(0,d.fetch)({url:"".concat(this.networkSession.baseUrls.baseUrl,"/2.0/zip_downloads"),method:"POST",headers:a,data:(0,o.serializeZipDownloadRequest)(e),contentType:"application/json",responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:s});return Object.assign(Object.assign({},(0,n.deserializeZipDownload)(u.data)),{rawData:u.data})}))}getZipDownloadContent(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new u({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders));return(yield(0,d.fetch)({url:e,method:"GET",headers:o,responseFormat:"binary",auth:this.auth,networkSession:this.networkSession,cancellationToken:n})).content}))}getZipDownloadStatus(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new p({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=(0,l.prepareParams)(Object.assign({},i.extraHeaders)),a=yield(0,d.fetch)({url:e,method:"GET",headers:o,responseFormat:"json",auth:this.auth,networkSession:this.networkSession,cancellationToken:n});return Object.assign(Object.assign({},(0,s.deserializeZipDownloadStatus)(a.data)),{rawData:a.data})}))}downloadZip(e){return i(this,arguments,void 0,(function*(e,t={}){const r=new h({headers:t.headers,cancellationToken:t.cancellationToken}),i=r.headers,n=r.cancellationToken,o=yield this.createZipDownload({items:e.items,downloadFileName:e.downloadFileName},{headers:new f({extraHeaders:i.extraHeaders}),cancellationToken:n});return yield this.getZipDownloadContent(o.downloadUrl,{headers:new m({extraHeaders:i.extraHeaders}),cancellationToken:n})}))}}},42575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseUrls=void 0,t.serializeBaseUrls=function(e){return{base_url:e.baseUrl,upload_url:e.uploadUrl,oauth2_url:e.oauth2Url}},t.deserializeBaseUrls=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "BaseUrls"'});if(null==e.base_url)throw new i.BoxSdkError({message:'Expecting "base_url" of type "BaseUrls" to be defined'});if(!(0,n.sdIsString)(e.base_url))throw new i.BoxSdkError({message:'Expecting string for "base_url" of type "BaseUrls"'});const t=e.base_url;if(null==e.upload_url)throw new i.BoxSdkError({message:'Expecting "upload_url" of type "BaseUrls" to be defined'});if(!(0,n.sdIsString)(e.upload_url))throw new i.BoxSdkError({message:'Expecting string for "upload_url" of type "BaseUrls"'});const r=e.upload_url;if(null==e.oauth2_url)throw new i.BoxSdkError({message:'Expecting "oauth2_url" of type "BaseUrls" to be defined'});if(!(0,n.sdIsString)(e.oauth2_url))throw new i.BoxSdkError({message:'Expecting string for "oauth2_url" of type "BaseUrls"'});const a=e.oauth2_url;return new s({baseUrl:t,uploadUrl:r,oauth2Url:a})},t.serializeBaseUrlsInput=function(e){return{baseUrl:null==e.baseUrl?void 0:e.baseUrl,uploadUrl:null==e.uploadUrl?void 0:e.uploadUrl,oauth2Url:null==e.oauth2Url?void 0:e.oauth2Url}},t.deserializeBaseUrlsInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "BaseUrlsInput"'});if(null!=e.baseUrl&&!(0,n.sdIsString)(e.baseUrl))throw new i.BoxSdkError({message:'Expecting string for "baseUrl" of type "BaseUrlsInput"'});const t=null==e.baseUrl?void 0:e.baseUrl;if(null!=e.uploadUrl&&!(0,n.sdIsString)(e.uploadUrl))throw new i.BoxSdkError({message:'Expecting string for "uploadUrl" of type "BaseUrlsInput"'});const r=null==e.uploadUrl?void 0:e.uploadUrl;if(null!=e.oauth2Url&&!(0,n.sdIsString)(e.oauth2Url))throw new i.BoxSdkError({message:'Expecting string for "oauth2Url" of type "BaseUrlsInput"'});const s=null==e.oauth2Url?void 0:e.oauth2Url;return{baseUrl:t,uploadUrl:r,oauth2Url:s}};const i=r(72631),n=r(50793),o=r(50793);class s{constructor(e){this.baseUrl="https://api.box.com",this.uploadUrl="https://upload.box.com/api",this.oauth2Url="https://account.box.com/api/oauth2",e.baseUrl&&(this.baseUrl=e.baseUrl),e.uploadUrl&&(this.uploadUrl=e.uploadUrl),e.oauth2Url&&(this.oauth2Url=e.oauth2Url),e.rawData&&(this.rawData=e.rawData)}}t.BaseUrls=s},84143:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var process=__webpack_require__(65606),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.xBoxUaHeader=exports.userAgentHeader=void 0,exports.fetch=fetch;const node_fetch_1=__importDefault(__webpack_require__(43092)),errors_1=__webpack_require__(72631),utils_1=__webpack_require__(93845),version_1=__webpack_require__(57171),json_1=__webpack_require__(50793),getRetryTimeout_1=__webpack_require__(83106);function createRequestInit(options){return __awaiter(this,void 0,void 0,(function*(){var _a,_b;const{method="GET",headers={},contentType:contentTypeInput="application/json",data,fileStream}=options,{contentType,body}=yield(()=>__awaiter(this,void 0,void 0,(function*(){var _a,_b;if(options.multipartData){const FormData=(0,utils_1.isBrowser)()?window.FormData:eval("require")("form-data"),formData=new FormData;for(const e of options.multipartData)if(e.fileStream){const t=yield(0,utils_1.readByteStream)(e.fileStream),r=(0,utils_1.isBrowser)()?new Blob([t]):t;headers["content-md5"]=yield calculateMD5Hash(t),formData.append(e.partName,r,{filename:null!==(_a=e.fileName)&&void 0!==_a?_a:"file",contentType:null!==(_b=e.contentType)&&void 0!==_b?_b:"application/octet-stream"})}else{if(!e.data)throw new errors_1.BoxSdkError({message:"Multipart item must have either body or fileStream"});formData.append(e.partName,(0,json_1.sdToJson)(e.data))}return{contentType:(0,utils_1.isBrowser)()?void 0:`multipart/form-data; boundary=${formData.getBoundary()}`,body:formData}}const contentType=contentTypeInput;switch(contentType){case"application/json":case"application/json-patch+json":return{contentType,body:(0,json_1.sdToJson)(data)};case"application/x-www-form-urlencoded":return{contentType,body:(0,json_1.sdToUrlParams)(data)};case"application/octet-stream":if(!fileStream)throw new errors_1.BoxSdkError({message:"fileStream required for application/octet-stream content type"});return{contentType,body:fileStream};default:throw new errors_1.BoxSdkError({message:`Unsupported content type : ${contentType}`})}})))();return{method,headers:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},contentType&&{"Content-Type":contentType}),headers),options.auth&&{Authorization:yield options.auth.retrieveAuthorizationHeader(options.networkSession)}),{"User-Agent":exports.userAgentHeader,"X-Box-UA":exports.xBoxUaHeader}),null===(_a=options.networkSession)||void 0===_a?void 0:_a.additionalHeaders),body,signal:options.cancellationToken,agent:null===(_b=options.networkSession)||void 0===_b?void 0:_b.agent}}))}exports.userAgentHeader=`Box JavaScript generated SDK v${version_1.sdkVersion} (${(0,utils_1.isBrowser)()?navigator.userAgent:`Node ${process.version}`})`,exports.xBoxUaHeader=constructBoxUAHeader();const DEFAULT_MAX_ATTEMPTS=5,RETRY_BASE_INTERVAL=1,STATUS_CODE_ACCEPTED=202,STATUS_CODE_UNAUTHORIZED=401,STATUS_CODE_TOO_MANY_REQUESTS=429;function fetch(e){return __awaiter(this,void 0,void 0,(function*(){var t,r,i,n,o,s,a,l;const d=(null===(r=null===(t=e.networkSession)||void 0===t?void 0:t.interceptors)||void 0===r?void 0:r.length)?null===(i=e.networkSession)||void 0===i?void 0:i.interceptors.reduce(((e,t)=>t.beforeRequest(e)),e):e,c=d.fileStream?yield(0,utils_1.readByteStream)(d.fileStream):void 0,u=yield createRequestInit(Object.assign(Object.assign({},d),{fileStream:c?(0,utils_1.generateByteStreamFromBuffer)(c):void 0})),{params:p={}}=d,h=yield(0,node_fetch_1.default)("".concat(d.url,0===Object.keys(p).length||d.url.endsWith("?")?"":"?",new URLSearchParams(p).toString()),Object.assign(Object.assign({},u),{redirect:"manual"})),f=null!==(n=h.headers.get("content-type"))&&void 0!==n?n:"",m=yield h.arrayBuffer(),g=(()=>{if(f.includes("application/json")){const e=(new TextDecoder).decode(m);return(0,json_1.jsonToSerializedData)(e)}})(),y=(0,utils_1.generateByteStreamFromBuffer)(m);let v={status:h.status,data:g,content:y,headers:Object.fromEntries(Array.from(h.headers.entries()))};if((null===(s=null===(o=d.networkSession)||void 0===o?void 0:o.interceptors)||void 0===s?void 0:s.length)&&(v=null===(a=d.networkSession)||void 0===a?void 0:a.interceptors.reduce(((e,t)=>t.afterRequest(e)),v)),v.status>=300&&v.status<400){if(!v.headers.location)throw new errors_1.BoxSdkError({message:`Unable to follow redirect for ${d.url}`});return fetch(Object.assign(Object.assign({},e),{url:v.headers.location}))}const b=v.status===STATUS_CODE_ACCEPTED&&v.headers["retry-after"];if(v.status>=400||b){const{numRetries:t=0}=d;if(v.status==STATUS_CODE_UNAUTHORIZED&&d.auth)return yield d.auth.refreshToken(d.networkSession),fetch(Object.assign(Object.assign({},e),{numRetries:t+1,fileStream:c?(0,utils_1.generateByteStreamFromBuffer)(c):void 0}));if("application/x-www-form-urlencoded"!==d.contentType&&(v.status===STATUS_CODE_TOO_MANY_REQUESTS||b||v.status>=500)&&t<DEFAULT_MAX_ATTEMPTS){const r=v.headers["retry-after"]?1e3*parseFloat(v.headers["retry-after"]):(0,getRetryTimeout_1.getRetryTimeout)(t,1e3*RETRY_BASE_INTERVAL);return yield new Promise((e=>setTimeout(e,r))),fetch(Object.assign(Object.assign({},e),{numRetries:t+1}))}const[r,i,n,o]=(0,json_1.sdIsMap)(v.data)?[(0,json_1.sdToJson)(v.data.code),(0,json_1.sdIsMap)(v.data.context_info)?v.data.context_info:void 0,(0,json_1.sdToJson)(v.data.request_id),(0,json_1.sdToJson)(v.data.help_url)]:[];throw new errors_1.BoxApiError({message:`${v.status}`,timestamp:`${Date.now()}`,requestInfo:{method:u.method,url:d.url,queryParams:p,headers:null!==(l=u.headers)&&void 0!==l?l:{},body:"string"==typeof u.body?u.body:void 0},responseInfo:{statusCode:v.status,headers:v.headers,body:v.data,rawBody:(new TextDecoder).decode(m),code:r,contextInfo:i,requestId:n,helpUrl:o},name:"BoxApiError"})}return v}))}function calculateMD5Hash(data){return __awaiter(this,void 0,void 0,(function*(){let createHash;if((0,utils_1.isBrowser)()){let e="string"==typeof data?(new TextEncoder).encode(data):data,t=yield window.crypto.subtle.digest("SHA-1",e),r=Array.from(new Uint8Array(t)),i=r.map((e=>e.toString(16).padStart(2,"0"))).join("");return i}return createHash=eval("require")("crypto").createHash,createHash("sha1").update(data).digest("hex")}))}function constructBoxUAHeader(){const e={agent:`box-javascript-generated-sdk/${version_1.sdkVersion}`,env:(0,utils_1.isBrowser)()?navigator.userAgent:`Node/${process.version.replace("v","")}`};return Object.keys(e).map((t=>`${t}=${e[t]}`)).join("; ")}},83106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRetryTimeout=function(e,t){var i=1-r,n=1+r,o=Math.random()*(n-i)+i,s=Math.pow(2,e-1);return Math.ceil(s*t*o)};const r=.5},31210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkSession=void 0;const i=r(42575),n=r(93845);class o{constructor(e){this.additionalHeaders={},this.baseUrls=new i.BaseUrls({}),this.interceptors=[],this.agent=(0,n.createAgent)(void 0,void 0),e.additionalHeaders&&(this.additionalHeaders=e.additionalHeaders),e.baseUrls&&(this.baseUrls=e.baseUrls),e.interceptors&&(this.interceptors=e.interceptors),e.agent&&(this.agent=e.agent),e.agentOptions&&(this.agentOptions=e.agentOptions),e.proxyConfig&&(this.proxyConfig=e.proxyConfig)}withAdditionalHeaders(e={}){return new o({additionalHeaders:Object.assign(Object.assign({},this.additionalHeaders),e),baseUrls:this.baseUrls,interceptors:this.interceptors,agent:this.agent,agentOptions:this.agentOptions,proxyConfig:this.proxyConfig})}withCustomBaseUrls(e){return new o({additionalHeaders:this.additionalHeaders,baseUrls:e,interceptors:this.interceptors,agent:this.agent,agentOptions:this.agentOptions,proxyConfig:this.proxyConfig})}withCustomAgentOptions(e){return new o({additionalHeaders:this.additionalHeaders,baseUrls:this.baseUrls,interceptors:this.interceptors,agent:(0,n.createAgent)(e,this.proxyConfig),agentOptions:this.agentOptions,proxyConfig:this.proxyConfig})}withInterceptors(e){return new o({additionalHeaders:this.additionalHeaders,baseUrls:this.baseUrls,interceptors:this.interceptors.concat(e),agent:this.agent,agentOptions:this.agentOptions,proxyConfig:this.proxyConfig})}withProxy(e){return new o({additionalHeaders:this.additionalHeaders,baseUrls:this.baseUrls,interceptors:this.interceptors,agent:(0,n.createAgent)(this.agentOptions,e),agentOptions:this.agentOptions,proxyConfig:e})}}t.NetworkSession=o},57171:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sdkVersion=void 0,t.sdkVersion="1.7.0"},28403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAccessTokenTokenTypeField=c,t.deserializeAccessTokenTokenTypeField=u,t.serializeAccessTokenIssuedTokenTypeField=p,t.deserializeAccessTokenIssuedTokenTypeField=h,t.serializeAccessToken=function(e){return{access_token:null==e.accessToken?void 0:e.accessToken,expires_in:null==e.expiresIn?void 0:e.expiresIn,token_type:null==e.tokenType?void 0:e.tokenType,restricted_to:null==e.restrictedTo?void 0:e.restrictedTo.map((function(e){return(0,i.serializeFileOrFolderScope)(e)})),refresh_token:null==e.refreshToken?void 0:e.refreshToken,issued_token_type:null==e.issuedTokenType?void 0:e.issuedTokenType}},t.deserializeAccessToken=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AccessToken"'});if(null!=e.access_token&&!(0,a.sdIsString)(e.access_token))throw new o.BoxSdkError({message:'Expecting string for "access_token" of type "AccessToken"'});const t=null==e.access_token?void 0:e.access_token;if(null!=e.expires_in&&!(0,s.sdIsNumber)(e.expires_in))throw new o.BoxSdkError({message:'Expecting number for "expires_in" of type "AccessToken"'});const r=null==e.expires_in?void 0:e.expires_in,i=null==e.token_type?void 0:u(e.token_type);if(null!=e.restricted_to&&!(0,l.sdIsList)(e.restricted_to))throw new o.BoxSdkError({message:'Expecting array for "restricted_to" of type "AccessToken"'});const c=null==e.restricted_to?void 0:(0,l.sdIsList)(e.restricted_to)?e.restricted_to.map((function(e){return(0,n.deserializeFileOrFolderScope)(e)})):[];if(null!=e.refresh_token&&!(0,a.sdIsString)(e.refresh_token))throw new o.BoxSdkError({message:'Expecting string for "refresh_token" of type "AccessToken"'});const p=null==e.refresh_token?void 0:e.refresh_token,f=null==e.issued_token_type?void 0:h(e.issued_token_type);return{accessToken:t,expiresIn:r,tokenType:i,restrictedTo:c,refreshToken:p,issuedTokenType:f}};const i=r(77733),n=r(77733),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("bearer"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize AccessTokenTokenTypeField"})}function p(e){return e}function h(e){if("urn:ietf:params:oauth:token-type:access_token"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize AccessTokenIssuedTokenTypeField"})}},7440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAgentAsk=void 0,t.serializeAiAgentAskTypeField=d,t.deserializeAiAgentAskTypeField=c,t.serializeAiAgentAsk=function(e){return{type:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText),long_text_multi:null==e.longTextMulti?void 0:(0,i.serializeAiAgentLongTextTool)(e.longTextMulti),basic_text_multi:null==e.basicTextMulti?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicTextMulti)}},t.deserializeAiAgentAsk=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentAsk"'});if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AiAgentAsk" to be defined'});const t=c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text),o=null==e.long_text_multi?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text_multi),d=null==e.basic_text_multi?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text_multi);return{type:t,longText:r,basicText:i,longTextMulti:o,basicTextMulti:d}},t.serializeAiAgentAskInput=function(e){return{type:null==e.type?void 0:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText),long_text_multi:null==e.longTextMulti?void 0:(0,i.serializeAiAgentLongTextTool)(e.longTextMulti),basic_text_multi:null==e.basicTextMulti?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicTextMulti)}},t.deserializeAiAgentAskInput=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentAskInput"'});const t=null==e.type?void 0:c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text),o=null==e.long_text_multi?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text_multi),d=null==e.basic_text_multi?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text_multi);return{type:t,longText:r,basicText:i,longTextMulti:o,basicTextMulti:d}};const i=r(40140),n=r(40140),o=r(89766),s=r(89766),a=r(72631),l=r(50793);function d(e){return e}function c(e){if("ai_agent_ask"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AiAgentAskTypeField"})}t.AiAgentAsk=class{constructor(e){this.type="ai_agent_ask",e.type&&(this.type=e.type),e.longText&&(this.longText=e.longText),e.basicText&&(this.basicText=e.basicText),e.longTextMulti&&(this.longTextMulti=e.longTextMulti),e.basicTextMulti&&(this.basicTextMulti=e.basicTextMulti),e.rawData&&(this.rawData=e.rawData)}}},62180:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentAskOrAiAgentExtractOrAiAgentExtractStructuredOrAiAgentTextGen=function(e){if("ai_agent_ask"==e.type)return(0,i.serializeAiAgentAsk)(e);if("ai_agent_extract"==e.type)return(0,o.serializeAiAgentExtract)(e);if("ai_agent_extract_structured"==e.type)return(0,a.serializeAiAgentExtractStructured)(e);if("ai_agent_text_gen"==e.type)return(0,d.serializeAiAgentTextGen)(e);throw new u.BoxSdkError({message:"unknown type"})},t.deserializeAiAgentAskOrAiAgentExtractOrAiAgentExtractStructuredOrAiAgentTextGen=function(e){if(!(0,p.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "AiAgentAskOrAiAgentExtractOrAiAgentExtractStructuredOrAiAgentTextGen"'});if("ai_agent_ask"==e.type)return(0,n.deserializeAiAgentAsk)(e);if("ai_agent_extract"==e.type)return(0,s.deserializeAiAgentExtract)(e);if("ai_agent_extract_structured"==e.type)return(0,l.deserializeAiAgentExtractStructured)(e);if("ai_agent_text_gen"==e.type)return(0,c.deserializeAiAgentTextGen)(e);throw new u.BoxSdkError({message:"Can't deserialize AiAgentAskOrAiAgentExtractOrAiAgentExtractStructuredOrAiAgentTextGen"})};const i=r(7440),n=r(7440),o=r(26268),s=r(26268),a=r(383),l=r(383),d=r(96390),c=r(96390),u=r(72631),p=r(50793)},59089:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentBasicGenTool=function(e){const t=(0,o.serializeAiAgentLongTextToolTextGen)(e);if(!(0,d.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "AiAgentBasicGenTool"'});return Object.assign(Object.assign({},t),{content_template:null==e.contentTemplate?void 0:e.contentTemplate})},t.deserializeAiAgentBasicGenTool=function(e){if(!(0,d.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "AiAgentBasicGenTool"'});if(null!=e.content_template&&!(0,l.sdIsString)(e.content_template))throw new s.BoxSdkError({message:'Expecting string for "content_template" of type "AiAgentBasicGenTool"'});const t=null==e.content_template?void 0:e.content_template,r=null==e.embeddings?void 0:(0,n.deserializeAiAgentLongTextToolTextGenEmbeddingsField)(e.embeddings);if(null!=e.system_message&&!(0,l.sdIsString)(e.system_message))throw new s.BoxSdkError({message:'Expecting string for "system_message" of type "AiAgentBasicGenTool"'});const o=null==e.system_message?void 0:e.system_message;if(null!=e.prompt_template&&!(0,l.sdIsString)(e.prompt_template))throw new s.BoxSdkError({message:'Expecting string for "prompt_template" of type "AiAgentBasicGenTool"'});const c=null==e.prompt_template?void 0:e.prompt_template;if(null!=e.model&&!(0,l.sdIsString)(e.model))throw new s.BoxSdkError({message:'Expecting string for "model" of type "AiAgentBasicGenTool"'});const u=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,a.sdIsNumber)(e.num_tokens_for_completion))throw new s.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicGenTool"'});const p=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,h=null==e.llm_endpoint_params?void 0:(0,i.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{contentTemplate:t,embeddings:r,systemMessage:o,promptTemplate:c,model:u,numTokensForCompletion:p,llmEndpointParams:h}};const i=r(52852),n=r(97839),o=r(97839),s=r(72631),a=r(50793),l=r(50793),d=r(50793)},89766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentBasicTextTool=function(e){const t=(0,n.serializeAiAgentBasicTextToolBase)(e);if(!(0,l.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentBasicTextTool"'});return Object.assign(Object.assign({},t),{system_message:null==e.systemMessage?void 0:e.systemMessage,prompt_template:null==e.promptTemplate?void 0:e.promptTemplate})},t.deserializeAiAgentBasicTextTool=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentBasicTextTool"'});if(null!=e.system_message&&!(0,a.sdIsString)(e.system_message))throw new o.BoxSdkError({message:'Expecting string for "system_message" of type "AiAgentBasicTextTool"'});const t=null==e.system_message?void 0:e.system_message;if(null!=e.prompt_template&&!(0,a.sdIsString)(e.prompt_template))throw new o.BoxSdkError({message:'Expecting string for "prompt_template" of type "AiAgentBasicTextTool"'});const r=null==e.prompt_template?void 0:e.prompt_template;if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentBasicTextTool"'});const n=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,s.sdIsNumber)(e.num_tokens_for_completion))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicTextTool"'});const d=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,c=null==e.llm_endpoint_params?void 0:(0,i.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{systemMessage:t,promptTemplate:r,model:n,numTokensForCompletion:d,llmEndpointParams:c}};const i=r(52852),n=r(20415),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},20415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentBasicTextToolBase=function(e){return{model:null==e.model?void 0:e.model,num_tokens_for_completion:null==e.numTokensForCompletion?void 0:e.numTokensForCompletion,llm_endpoint_params:null==e.llmEndpointParams?void 0:(0,i.serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llmEndpointParams)}},t.deserializeAiAgentBasicTextToolBase=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentBasicTextToolBase"'});if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentBasicTextToolBase"'});const t=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,s.sdIsNumber)(e.num_tokens_for_completion))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicTextToolBase"'});const r=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,i=null==e.llm_endpoint_params?void 0:(0,n.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{model:t,numTokensForCompletion:r,llmEndpointParams:i}};const i=r(52852),n=r(52852),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},79565:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentBasicTextToolTextGen=function(e){const t=(0,n.serializeAiAgentBasicTextToolBase)(e);if(!(0,l.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentBasicTextToolTextGen"'});return Object.assign(Object.assign({},t),{system_message:null==e.systemMessage?void 0:e.systemMessage,prompt_template:null==e.promptTemplate?void 0:e.promptTemplate})},t.deserializeAiAgentBasicTextToolTextGen=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentBasicTextToolTextGen"'});if(null!=e.system_message&&!(0,a.sdIsString)(e.system_message))throw new o.BoxSdkError({message:'Expecting string for "system_message" of type "AiAgentBasicTextToolTextGen"'});const t=null==e.system_message?void 0:e.system_message;if(null!=e.prompt_template&&!(0,a.sdIsString)(e.prompt_template))throw new o.BoxSdkError({message:'Expecting string for "prompt_template" of type "AiAgentBasicTextToolTextGen"'});const r=null==e.prompt_template?void 0:e.prompt_template;if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentBasicTextToolTextGen"'});const n=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,s.sdIsNumber)(e.num_tokens_for_completion))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicTextToolTextGen"'});const d=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,c=null==e.llm_endpoint_params?void 0:(0,i.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{systemMessage:t,promptTemplate:r,model:n,numTokensForCompletion:d,llmEndpointParams:c}};const i=r(52852),n=r(20415),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},26268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAgentExtract=void 0,t.serializeAiAgentExtractTypeField=d,t.deserializeAiAgentExtractTypeField=c,t.serializeAiAgentExtract=function(e){return{type:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText)}},t.deserializeAiAgentExtract=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentExtract"'});if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AiAgentExtract" to be defined'});const t=c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text);return{type:t,longText:r,basicText:i}},t.serializeAiAgentExtractInput=function(e){return{type:null==e.type?void 0:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText)}},t.deserializeAiAgentExtractInput=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentExtractInput"'});const t=null==e.type?void 0:c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text);return{type:t,longText:r,basicText:i}};const i=r(40140),n=r(40140),o=r(89766),s=r(89766),a=r(72631),l=r(50793);function d(e){return e}function c(e){if("ai_agent_extract"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AiAgentExtractTypeField"})}t.AiAgentExtract=class{constructor(e){this.type="ai_agent_extract",e.type&&(this.type=e.type),e.longText&&(this.longText=e.longText),e.basicText&&(this.basicText=e.basicText),e.rawData&&(this.rawData=e.rawData)}}},383:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAgentExtractStructured=void 0,t.serializeAiAgentExtractStructuredTypeField=d,t.deserializeAiAgentExtractStructuredTypeField=c,t.serializeAiAgentExtractStructured=function(e){return{type:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText)}},t.deserializeAiAgentExtractStructured=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentExtractStructured"'});if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AiAgentExtractStructured" to be defined'});const t=c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text);return{type:t,longText:r,basicText:i}},t.serializeAiAgentExtractStructuredInput=function(e){return{type:null==e.type?void 0:e.type,long_text:null==e.longText?void 0:(0,i.serializeAiAgentLongTextTool)(e.longText),basic_text:null==e.basicText?void 0:(0,o.serializeAiAgentBasicTextTool)(e.basicText)}},t.deserializeAiAgentExtractStructuredInput=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiAgentExtractStructuredInput"'});const t=null==e.type?void 0:c(e.type),r=null==e.long_text?void 0:(0,n.deserializeAiAgentLongTextTool)(e.long_text),i=null==e.basic_text?void 0:(0,s.deserializeAiAgentBasicTextTool)(e.basic_text);return{type:t,longText:r,basicText:i}};const i=r(40140),n=r(40140),o=r(89766),s=r(89766),a=r(72631),l=r(50793);function d(e){return e}function c(e){if("ai_agent_extract_structured"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AiAgentExtractStructuredTypeField"})}t.AiAgentExtractStructured=class{constructor(e){this.type="ai_agent_extract_structured",e.type&&(this.type=e.type),e.longText&&(this.longText=e.longText),e.basicText&&(this.basicText=e.basicText),e.rawData&&(this.rawData=e.rawData)}}},40140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentLongTextToolEmbeddingsStrategyField=d,t.deserializeAiAgentLongTextToolEmbeddingsStrategyField=c,t.serializeAiAgentLongTextToolEmbeddingsField=u,t.deserializeAiAgentLongTextToolEmbeddingsField=p,t.serializeAiAgentLongTextTool=function(e){const t=(0,n.serializeAiAgentBasicTextTool)(e);if(!(0,l.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextTool"'});return Object.assign(Object.assign({},t),{embeddings:null==e.embeddings?void 0:u(e.embeddings)})},t.deserializeAiAgentLongTextTool=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextTool"'});const t=null==e.embeddings?void 0:p(e.embeddings);if(null!=e.system_message&&!(0,a.sdIsString)(e.system_message))throw new o.BoxSdkError({message:'Expecting string for "system_message" of type "AiAgentLongTextTool"'});const r=null==e.system_message?void 0:e.system_message;if(null!=e.prompt_template&&!(0,a.sdIsString)(e.prompt_template))throw new o.BoxSdkError({message:'Expecting string for "prompt_template" of type "AiAgentLongTextTool"'});const n=null==e.prompt_template?void 0:e.prompt_template;if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentLongTextTool"'});const d=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,s.sdIsNumber)(e.num_tokens_for_completion))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentLongTextTool"'});const c=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,u=null==e.llm_endpoint_params?void 0:(0,i.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{embeddings:t,systemMessage:r,promptTemplate:n,model:d,numTokensForCompletion:c,llmEndpointParams:u}};const i=r(52852),n=r(89766),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return{id:null==e.id?void 0:e.id,num_tokens_per_chunk:null==e.numTokensPerChunk?void 0:e.numTokensPerChunk}}function c(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolEmbeddingsStrategyField"'});if(null!=e.id&&!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "AiAgentLongTextToolEmbeddingsStrategyField"'});const t=null==e.id?void 0:e.id;if(null!=e.num_tokens_per_chunk&&!(0,s.sdIsNumber)(e.num_tokens_per_chunk))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_per_chunk" of type "AiAgentLongTextToolEmbeddingsStrategyField"'});return{id:t,numTokensPerChunk:null==e.num_tokens_per_chunk?void 0:e.num_tokens_per_chunk}}function u(e){return{model:null==e.model?void 0:e.model,strategy:null==e.strategy?void 0:d(e.strategy)}}function p(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolEmbeddingsField"'});if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentLongTextToolEmbeddingsField"'});return{model:null==e.model?void 0:e.model,strategy:null==e.strategy?void 0:c(e.strategy)}}},97839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAgentLongTextToolTextGenEmbeddingsStrategyField=d,t.deserializeAiAgentLongTextToolTextGenEmbeddingsStrategyField=c,t.serializeAiAgentLongTextToolTextGenEmbeddingsField=u,t.deserializeAiAgentLongTextToolTextGenEmbeddingsField=p,t.serializeAiAgentLongTextToolTextGen=function(e){const t=(0,n.serializeAiAgentBasicTextToolTextGen)(e);if(!(0,l.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolTextGen"'});return Object.assign(Object.assign({},t),{embeddings:null==e.embeddings?void 0:u(e.embeddings)})},t.deserializeAiAgentLongTextToolTextGen=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolTextGen"'});const t=null==e.embeddings?void 0:p(e.embeddings);if(null!=e.system_message&&!(0,a.sdIsString)(e.system_message))throw new o.BoxSdkError({message:'Expecting string for "system_message" of type "AiAgentLongTextToolTextGen"'});const r=null==e.system_message?void 0:e.system_message;if(null!=e.prompt_template&&!(0,a.sdIsString)(e.prompt_template))throw new o.BoxSdkError({message:'Expecting string for "prompt_template" of type "AiAgentLongTextToolTextGen"'});const n=null==e.prompt_template?void 0:e.prompt_template;if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentLongTextToolTextGen"'});const d=null==e.model?void 0:e.model;if(null!=e.num_tokens_for_completion&&!(0,s.sdIsNumber)(e.num_tokens_for_completion))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_for_completion" of type "AiAgentLongTextToolTextGen"'});const c=null==e.num_tokens_for_completion?void 0:e.num_tokens_for_completion,u=null==e.llm_endpoint_params?void 0:(0,i.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi)(e.llm_endpoint_params);return{embeddings:t,systemMessage:r,promptTemplate:n,model:d,numTokensForCompletion:c,llmEndpointParams:u}};const i=r(52852),n=r(79565),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return{id:null==e.id?void 0:e.id,num_tokens_per_chunk:null==e.numTokensPerChunk?void 0:e.numTokensPerChunk}}function c(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolTextGenEmbeddingsStrategyField"'});if(null!=e.id&&!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "AiAgentLongTextToolTextGenEmbeddingsStrategyField"'});const t=null==e.id?void 0:e.id;if(null!=e.num_tokens_per_chunk&&!(0,s.sdIsNumber)(e.num_tokens_per_chunk))throw new o.BoxSdkError({message:'Expecting number for "num_tokens_per_chunk" of type "AiAgentLongTextToolTextGenEmbeddingsStrategyField"'});return{id:t,numTokensPerChunk:null==e.num_tokens_per_chunk?void 0:e.num_tokens_per_chunk}}function u(e){return{model:null==e.model?void 0:e.model,strategy:null==e.strategy?void 0:d(e.strategy)}}function p(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentLongTextToolTextGenEmbeddingsField"'});if(null!=e.model&&!(0,a.sdIsString)(e.model))throw new o.BoxSdkError({message:'Expecting string for "model" of type "AiAgentLongTextToolTextGenEmbeddingsField"'});return{model:null==e.model?void 0:e.model,strategy:null==e.strategy?void 0:c(e.strategy)}}},96390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiAgentTextGen=void 0,t.serializeAiAgentTextGenTypeField=a,t.deserializeAiAgentTextGenTypeField=l,t.serializeAiAgentTextGen=function(e){return{type:e.type,basic_gen:null==e.basicGen?void 0:(0,i.serializeAiAgentBasicGenTool)(e.basicGen)}},t.deserializeAiAgentTextGen=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentTextGen"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "AiAgentTextGen" to be defined'});const t=l(e.type),r=null==e.basic_gen?void 0:(0,n.deserializeAiAgentBasicGenTool)(e.basic_gen);return{type:t,basicGen:r}},t.serializeAiAgentTextGenInput=function(e){return{type:null==e.type?void 0:e.type,basic_gen:null==e.basicGen?void 0:(0,i.serializeAiAgentBasicGenTool)(e.basicGen)}},t.deserializeAiAgentTextGenInput=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiAgentTextGenInput"'});const t=null==e.type?void 0:l(e.type),r=null==e.basic_gen?void 0:(0,n.deserializeAiAgentBasicGenTool)(e.basic_gen);return{type:t,basicGen:r}};const i=r(59089),n=r(59089),o=r(72631),s=r(50793);function a(e){return e}function l(e){if("ai_agent_text_gen"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize AiAgentTextGenTypeField"})}t.AiAgentTextGen=class{constructor(e){this.type="ai_agent_text_gen",e.type&&(this.type=e.type),e.basicGen&&(this.basicGen=e.basicGen),e.rawData&&(this.rawData=e.rawData)}}},90791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiAskModeField=f,t.deserializeAiAskModeField=m,t.serializeAiAsk=function(e){return{mode:e.mode,prompt:e.prompt,items:e.items.map((function(e){return(0,i.serializeAiItemBase)(e)})),dialogue_history:null==e.dialogueHistory?void 0:e.dialogueHistory.map((function(e){return(0,o.serializeAiDialogueHistory)(e)})),include_citations:null==e.includeCitations?void 0:e.includeCitations,ai_agent:null==e.aiAgent?void 0:(0,a.serializeAiAgentAsk)(e.aiAgent)}},t.deserializeAiAsk=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "AiAsk"'});if(null==e.mode)throw new d.BoxSdkError({message:'Expecting "mode" of type "AiAsk" to be defined'});const t=m(e.mode);if(null==e.prompt)throw new d.BoxSdkError({message:'Expecting "prompt" of type "AiAsk" to be defined'});if(!(0,u.sdIsString)(e.prompt))throw new d.BoxSdkError({message:'Expecting string for "prompt" of type "AiAsk"'});const r=e.prompt;if(null==e.items)throw new d.BoxSdkError({message:'Expecting "items" of type "AiAsk" to be defined'});if(!(0,p.sdIsList)(e.items))throw new d.BoxSdkError({message:'Expecting array for "items" of type "AiAsk"'});const i=(0,p.sdIsList)(e.items)?e.items.map((function(e){return(0,n.deserializeAiItemBase)(e)})):[];if(null!=e.dialogue_history&&!(0,p.sdIsList)(e.dialogue_history))throw new d.BoxSdkError({message:'Expecting array for "dialogue_history" of type "AiAsk"'});const o=null==e.dialogue_history?void 0:(0,p.sdIsList)(e.dialogue_history)?e.dialogue_history.map((function(e){return(0,s.deserializeAiDialogueHistory)(e)})):[];if(null!=e.include_citations&&!(0,c.sdIsBoolean)(e.include_citations))throw new d.BoxSdkError({message:'Expecting boolean for "include_citations" of type "AiAsk"'});const a=null==e.include_citations?void 0:e.include_citations,f=null==e.ai_agent?void 0:(0,l.deserializeAiAgentAsk)(e.ai_agent);return{mode:t,prompt:r,items:i,dialogueHistory:o,includeCitations:a,aiAgent:f}};const i=r(90948),n=r(90948),o=r(70936),s=r(70936),a=r(7440),l=r(7440),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("multiple_item_qa"==e)return e;if("single_item_qa"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize AiAskModeField"})}},28655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiCitationTypeField=s,t.deserializeAiCitationTypeField=a,t.serializeAiCitation=function(e){return{content:null==e.content?void 0:e.content,id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}},t.deserializeAiCitation=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiCitation"'});if(null!=e.content&&!(0,n.sdIsString)(e.content))throw new i.BoxSdkError({message:'Expecting string for "content" of type "AiCitation"'});const t=null==e.content?void 0:e.content;if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "AiCitation"'});const r=null==e.id?void 0:e.id,s=null==e.type?void 0:a(e.type);if(null!=e.name&&!(0,n.sdIsString)(e.name))throw new i.BoxSdkError({message:'Expecting string for "name" of type "AiCitation"'});const l=null==e.name?void 0:e.name;return{content:t,id:r,type:s,name:l}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("file"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize AiCitationTypeField"})}},70936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiDialogueHistory=function(e){return{prompt:null==e.prompt?void 0:e.prompt,answer:null==e.answer?void 0:e.answer,created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt)}},t.deserializeAiDialogueHistory=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiDialogueHistory"'});if(null!=e.prompt&&!(0,s.sdIsString)(e.prompt))throw new o.BoxSdkError({message:'Expecting string for "prompt" of type "AiDialogueHistory"'});const t=null==e.prompt?void 0:e.prompt;if(null!=e.answer&&!(0,s.sdIsString)(e.answer))throw new o.BoxSdkError({message:'Expecting string for "answer" of type "AiDialogueHistory"'});const r=null==e.answer?void 0:e.answer;if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "AiDialogueHistory"'});const i=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);return{prompt:t,answer:r,createdAt:i}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793)},62519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiExtract=function(e){return{prompt:e.prompt,items:e.items.map((function(e){return(0,i.serializeAiItemBase)(e)})),ai_agent:null==e.aiAgent?void 0:(0,o.serializeAiAgentExtract)(e.aiAgent)}},t.deserializeAiExtract=function(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiExtract"'});if(null==e.prompt)throw new a.BoxSdkError({message:'Expecting "prompt" of type "AiExtract" to be defined'});if(!(0,l.sdIsString)(e.prompt))throw new a.BoxSdkError({message:'Expecting string for "prompt" of type "AiExtract"'});const t=e.prompt;if(null==e.items)throw new a.BoxSdkError({message:'Expecting "items" of type "AiExtract" to be defined'});if(!(0,d.sdIsList)(e.items))throw new a.BoxSdkError({message:'Expecting array for "items" of type "AiExtract"'});const r=(0,d.sdIsList)(e.items)?e.items.map((function(e){return(0,n.deserializeAiItemBase)(e)})):[],i=null==e.ai_agent?void 0:(0,s.deserializeAiAgentExtract)(e.ai_agent);return{prompt:t,items:r,aiAgent:i}};const i=r(90948),n=r(90948),o=r(26268),s=r(26268),a=r(72631),l=r(50793),d=r(50793),c=r(50793)},84948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiExtractResponse=function(e){return{}},t.deserializeAiExtractResponse=function(e){if(!(0,n.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiExtractResponse"'});return{}};const i=r(72631),n=r(50793)},65888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiExtractStructuredMetadataTemplateTypeField=u,t.deserializeAiExtractStructuredMetadataTemplateTypeField=p,t.serializeAiExtractStructuredMetadataTemplateField=h,t.deserializeAiExtractStructuredMetadataTemplateField=f,t.serializeAiExtractStructuredFieldsOptionsField=m,t.deserializeAiExtractStructuredFieldsOptionsField=g,t.serializeAiExtractStructuredFieldsField=y,t.deserializeAiExtractStructuredFieldsField=v,t.serializeAiExtractStructured=function(e){return{items:e.items.map((function(e){return(0,i.serializeAiItemBase)(e)})),metadata_template:null==e.metadataTemplate?void 0:h(e.metadataTemplate),fields:null==e.fields?void 0:e.fields.map((function(e){return y(e)})),ai_agent:null==e.aiAgent?void 0:(0,o.serializeAiAgentExtractStructured)(e.aiAgent)}},t.deserializeAiExtractStructured=function(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiExtractStructured"'});if(null==e.items)throw new a.BoxSdkError({message:'Expecting "items" of type "AiExtractStructured" to be defined'});if(!(0,d.sdIsList)(e.items))throw new a.BoxSdkError({message:'Expecting array for "items" of type "AiExtractStructured"'});const t=(0,d.sdIsList)(e.items)?e.items.map((function(e){return(0,n.deserializeAiItemBase)(e)})):[],r=null==e.metadata_template?void 0:f(e.metadata_template);if(null!=e.fields&&!(0,d.sdIsList)(e.fields))throw new a.BoxSdkError({message:'Expecting array for "fields" of type "AiExtractStructured"'});const i=null==e.fields?void 0:(0,d.sdIsList)(e.fields)?e.fields.map((function(e){return v(e)})):[],o=null==e.ai_agent?void 0:(0,s.deserializeAiAgentExtractStructured)(e.ai_agent);return{items:t,metadataTemplate:r,fields:i,aiAgent:o}};const i=r(90948),n=r(90948),o=r(383),s=r(383),a=r(72631),l=r(50793),d=r(50793),c=r(50793);function u(e){return e}function p(e){if("metadata_template"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AiExtractStructuredMetadataTemplateTypeField"})}function h(e){return{template_key:null==e.templateKey?void 0:e.templateKey,type:null==e.type?void 0:e.type,scope:null==e.scope?void 0:e.scope}}function f(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiExtractStructuredMetadataTemplateField"'});if(null!=e.template_key&&!(0,l.sdIsString)(e.template_key))throw new a.BoxSdkError({message:'Expecting string for "template_key" of type "AiExtractStructuredMetadataTemplateField"'});const t=null==e.template_key?void 0:e.template_key,r=null==e.type?void 0:p(e.type);if(null!=e.scope&&!(0,l.sdIsString)(e.scope))throw new a.BoxSdkError({message:'Expecting string for "scope" of type "AiExtractStructuredMetadataTemplateField"'});return{templateKey:t,type:r,scope:null==e.scope?void 0:e.scope}}function m(e){return{key:e.key}}function g(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiExtractStructuredFieldsOptionsField"'});if(null==e.key)throw new a.BoxSdkError({message:'Expecting "key" of type "AiExtractStructuredFieldsOptionsField" to be defined'});if(!(0,l.sdIsString)(e.key))throw new a.BoxSdkError({message:'Expecting string for "key" of type "AiExtractStructuredFieldsOptionsField"'});return{key:e.key}}function y(e){return{key:e.key,description:null==e.description?void 0:e.description,displayName:null==e.displayName?void 0:e.displayName,prompt:null==e.prompt?void 0:e.prompt,type:null==e.type?void 0:e.type,options:null==e.options?void 0:e.options.map((function(e){return m(e)}))}}function v(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiExtractStructuredFieldsField"'});if(null==e.key)throw new a.BoxSdkError({message:'Expecting "key" of type "AiExtractStructuredFieldsField" to be defined'});if(!(0,l.sdIsString)(e.key))throw new a.BoxSdkError({message:'Expecting string for "key" of type "AiExtractStructuredFieldsField"'});const t=e.key;if(null!=e.description&&!(0,l.sdIsString)(e.description))throw new a.BoxSdkError({message:'Expecting string for "description" of type "AiExtractStructuredFieldsField"'});const r=null==e.description?void 0:e.description;if(null!=e.displayName&&!(0,l.sdIsString)(e.displayName))throw new a.BoxSdkError({message:'Expecting string for "displayName" of type "AiExtractStructuredFieldsField"'});const i=null==e.displayName?void 0:e.displayName;if(null!=e.prompt&&!(0,l.sdIsString)(e.prompt))throw new a.BoxSdkError({message:'Expecting string for "prompt" of type "AiExtractStructuredFieldsField"'});const n=null==e.prompt?void 0:e.prompt;if(null!=e.type&&!(0,l.sdIsString)(e.type))throw new a.BoxSdkError({message:'Expecting string for "type" of type "AiExtractStructuredFieldsField"'});const o=null==e.type?void 0:e.type;if(null!=e.options&&!(0,d.sdIsList)(e.options))throw new a.BoxSdkError({message:'Expecting array for "options" of type "AiExtractStructuredFieldsField"'});return{key:t,description:r,displayName:i,prompt:n,type:o,options:null==e.options?void 0:(0,d.sdIsList)(e.options)?e.options.map((function(e){return g(e)})):[]}}},90948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiItemBase=void 0,t.serializeAiItemBaseTypeField=s,t.deserializeAiItemBaseTypeField=a,t.serializeAiItemBase=function(e){return{id:e.id,type:e.type,content:null==e.content?void 0:e.content}},t.deserializeAiItemBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiItemBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "AiItemBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "AiItemBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "AiItemBase" to be defined'});const r=a(e.type);if(null!=e.content&&!(0,n.sdIsString)(e.content))throw new i.BoxSdkError({message:'Expecting string for "content" of type "AiItemBase"'});const s=null==e.content?void 0:e.content;return{id:t,type:r,content:s}},t.serializeAiItemBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,content:null==e.content?void 0:e.content}},t.deserializeAiItemBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiItemBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "AiItemBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "AiItemBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);if(null!=e.content&&!(0,n.sdIsString)(e.content))throw new i.BoxSdkError({message:'Expecting string for "content" of type "AiItemBaseInput"'});const s=null==e.content?void 0:e.content;return{id:t,type:r,content:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("file"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize AiItemBaseTypeField"})}t.AiItemBase=class{constructor(e){this.type="file",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.content&&(this.content=e.content),e.rawData&&(this.rawData=e.rawData)}}},27685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiLlmEndpointParamsGoogle=void 0,t.serializeAiLlmEndpointParamsGoogleTypeField=s,t.deserializeAiLlmEndpointParamsGoogleTypeField=a,t.serializeAiLlmEndpointParamsGoogle=function(e){return{type:e.type,temperature:null==e.temperature?void 0:e.temperature,top_p:null==e.topP?void 0:e.topP,top_k:null==e.topK?void 0:e.topK}},t.deserializeAiLlmEndpointParamsGoogle=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiLlmEndpointParamsGoogle"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "AiLlmEndpointParamsGoogle" to be defined'});const t=a(e.type);if(null!=e.temperature&&!(0,n.sdIsNumber)(e.temperature))throw new i.BoxSdkError({message:'Expecting number for "temperature" of type "AiLlmEndpointParamsGoogle"'});const r=null==e.temperature?void 0:e.temperature;if(null!=e.top_p&&!(0,n.sdIsNumber)(e.top_p))throw new i.BoxSdkError({message:'Expecting number for "top_p" of type "AiLlmEndpointParamsGoogle"'});const s=null==e.top_p?void 0:e.top_p;if(null!=e.top_k&&!(0,n.sdIsNumber)(e.top_k))throw new i.BoxSdkError({message:'Expecting number for "top_k" of type "AiLlmEndpointParamsGoogle"'});const l=null==e.top_k?void 0:e.top_k;return{type:t,temperature:r,topP:s,topK:l}},t.serializeAiLlmEndpointParamsGoogleInput=function(e){return{type:null==e.type?void 0:e.type,temperature:null==e.temperature?void 0:e.temperature,top_p:null==e.topP?void 0:e.topP,top_k:null==e.topK?void 0:e.topK}},t.deserializeAiLlmEndpointParamsGoogleInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiLlmEndpointParamsGoogleInput"'});const t=null==e.type?void 0:a(e.type);if(null!=e.temperature&&!(0,n.sdIsNumber)(e.temperature))throw new i.BoxSdkError({message:'Expecting number for "temperature" of type "AiLlmEndpointParamsGoogleInput"'});const r=null==e.temperature?void 0:e.temperature;if(null!=e.top_p&&!(0,n.sdIsNumber)(e.top_p))throw new i.BoxSdkError({message:'Expecting number for "top_p" of type "AiLlmEndpointParamsGoogleInput"'});const s=null==e.top_p?void 0:e.top_p;if(null!=e.top_k&&!(0,n.sdIsNumber)(e.top_k))throw new i.BoxSdkError({message:'Expecting number for "top_k" of type "AiLlmEndpointParamsGoogleInput"'});const l=null==e.top_k?void 0:e.top_k;return{type:t,temperature:r,topP:s,topK:l}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("google_params"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize AiLlmEndpointParamsGoogleTypeField"})}t.AiLlmEndpointParamsGoogle=class{constructor(e){this.type="google_params",e.type&&(this.type=e.type),e.temperature&&(this.temperature=e.temperature),e.topP&&(this.topP=e.topP),e.topK&&(this.topK=e.topK),e.rawData&&(this.rawData=e.rawData)}}},52852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi=function(e){if("google_params"==e.type)return(0,i.serializeAiLlmEndpointParamsGoogle)(e);if("openai_params"==e.type)return(0,o.serializeAiLlmEndpointParamsOpenAi)(e);throw new a.BoxSdkError({message:"unknown type"})},t.deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi"'});if("google_params"==e.type)return(0,n.deserializeAiLlmEndpointParamsGoogle)(e);if("openai_params"==e.type)return(0,s.deserializeAiLlmEndpointParamsOpenAi)(e);throw new a.BoxSdkError({message:"Can't deserialize AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi"})};const i=r(27685),n=r(27685),o=r(9968),s=r(9968),a=r(72631),l=r(50793)},9968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiLlmEndpointParamsOpenAi=void 0,t.serializeAiLlmEndpointParamsOpenAiTypeField=a,t.deserializeAiLlmEndpointParamsOpenAiTypeField=l,t.serializeAiLlmEndpointParamsOpenAi=function(e){return{type:e.type,temperature:null==e.temperature?void 0:e.temperature,top_p:null==e.topP?void 0:e.topP,frequency_penalty:null==e.frequencyPenalty?void 0:e.frequencyPenalty,presence_penalty:null==e.presencePenalty?void 0:e.presencePenalty,stop:null==e.stop?void 0:e.stop}},t.deserializeAiLlmEndpointParamsOpenAi=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiLlmEndpointParamsOpenAi"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "AiLlmEndpointParamsOpenAi" to be defined'});const t=l(e.type);if(null!=e.temperature&&!(0,n.sdIsNumber)(e.temperature))throw new i.BoxSdkError({message:'Expecting number for "temperature" of type "AiLlmEndpointParamsOpenAi"'});const r=null==e.temperature?void 0:e.temperature;if(null!=e.top_p&&!(0,n.sdIsNumber)(e.top_p))throw new i.BoxSdkError({message:'Expecting number for "top_p" of type "AiLlmEndpointParamsOpenAi"'});const a=null==e.top_p?void 0:e.top_p;if(null!=e.frequency_penalty&&!(0,n.sdIsNumber)(e.frequency_penalty))throw new i.BoxSdkError({message:'Expecting number for "frequency_penalty" of type "AiLlmEndpointParamsOpenAi"'});const d=null==e.frequency_penalty?void 0:e.frequency_penalty;if(null!=e.presence_penalty&&!(0,n.sdIsNumber)(e.presence_penalty))throw new i.BoxSdkError({message:'Expecting number for "presence_penalty" of type "AiLlmEndpointParamsOpenAi"'});const c=null==e.presence_penalty?void 0:e.presence_penalty;if(null!=e.stop&&!(0,o.sdIsString)(e.stop))throw new i.BoxSdkError({message:'Expecting string for "stop" of type "AiLlmEndpointParamsOpenAi"'});const u=null==e.stop?void 0:e.stop;return{type:t,temperature:r,topP:a,frequencyPenalty:d,presencePenalty:c,stop:u}},t.serializeAiLlmEndpointParamsOpenAiInput=function(e){return{type:null==e.type?void 0:e.type,temperature:null==e.temperature?void 0:e.temperature,top_p:null==e.topP?void 0:e.topP,frequency_penalty:null==e.frequencyPenalty?void 0:e.frequencyPenalty,presence_penalty:null==e.presencePenalty?void 0:e.presencePenalty,stop:null==e.stop?void 0:e.stop}},t.deserializeAiLlmEndpointParamsOpenAiInput=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AiLlmEndpointParamsOpenAiInput"'});const t=null==e.type?void 0:l(e.type);if(null!=e.temperature&&!(0,n.sdIsNumber)(e.temperature))throw new i.BoxSdkError({message:'Expecting number for "temperature" of type "AiLlmEndpointParamsOpenAiInput"'});const r=null==e.temperature?void 0:e.temperature;if(null!=e.top_p&&!(0,n.sdIsNumber)(e.top_p))throw new i.BoxSdkError({message:'Expecting number for "top_p" of type "AiLlmEndpointParamsOpenAiInput"'});const a=null==e.top_p?void 0:e.top_p;if(null!=e.frequency_penalty&&!(0,n.sdIsNumber)(e.frequency_penalty))throw new i.BoxSdkError({message:'Expecting number for "frequency_penalty" of type "AiLlmEndpointParamsOpenAiInput"'});const d=null==e.frequency_penalty?void 0:e.frequency_penalty;if(null!=e.presence_penalty&&!(0,n.sdIsNumber)(e.presence_penalty))throw new i.BoxSdkError({message:'Expecting number for "presence_penalty" of type "AiLlmEndpointParamsOpenAiInput"'});const c=null==e.presence_penalty?void 0:e.presence_penalty;if(null!=e.stop&&!(0,o.sdIsString)(e.stop))throw new i.BoxSdkError({message:'Expecting string for "stop" of type "AiLlmEndpointParamsOpenAiInput"'});const u=null==e.stop?void 0:e.stop;return{type:t,temperature:r,topP:a,frequencyPenalty:d,presencePenalty:c,stop:u}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793);function a(e){return e}function l(e){if("openai_params"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize AiLlmEndpointParamsOpenAiTypeField"})}t.AiLlmEndpointParamsOpenAi=class{constructor(e){this.type="openai_params",e.type&&(this.type=e.type),e.temperature&&(this.temperature=e.temperature),e.topP&&(this.topP=e.topP),e.frequencyPenalty&&(this.frequencyPenalty=e.frequencyPenalty),e.presencePenalty&&(this.presencePenalty=e.presencePenalty),e.stop&&(this.stop=e.stop),e.rawData&&(this.rawData=e.rawData)}}},67713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiResponse=function(e){return{answer:e.answer,created_at:(0,i.serializeDateTime)(e.createdAt),completion_reason:null==e.completionReason?void 0:e.completionReason}},t.deserializeAiResponse=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AiResponse"'});if(null==e.answer)throw new o.BoxSdkError({message:'Expecting "answer" of type "AiResponse" to be defined'});if(!(0,s.sdIsString)(e.answer))throw new o.BoxSdkError({message:'Expecting string for "answer" of type "AiResponse"'});const t=e.answer;if(null==e.created_at)throw new o.BoxSdkError({message:'Expecting "created_at" of type "AiResponse" to be defined'});if(!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "AiResponse"'});const r=(0,n.deserializeDateTime)(e.created_at);if(null!=e.completion_reason&&!(0,s.sdIsString)(e.completion_reason))throw new o.BoxSdkError({message:'Expecting string for "completion_reason" of type "AiResponse"'});const i=null==e.completion_reason?void 0:e.completion_reason;return{answer:t,createdAt:r,completionReason:i}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793)},89820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAiResponseFull=function(e){const t=(0,n.serializeAiResponse)(e);if(!(0,c.sdIsMap)(t))throw new a.BoxSdkError({message:'Expecting a map for "AiResponseFull"'});return Object.assign(Object.assign({},t),{citations:null==e.citations?void 0:e.citations.map((function(e){return(0,o.serializeAiCitation)(e)}))})},t.deserializeAiResponseFull=function(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiResponseFull"'});if(null!=e.citations&&!(0,d.sdIsList)(e.citations))throw new a.BoxSdkError({message:'Expecting array for "citations" of type "AiResponseFull"'});const t=null==e.citations?void 0:(0,d.sdIsList)(e.citations)?e.citations.map((function(e){return(0,s.deserializeAiCitation)(e)})):[];if(null==e.answer)throw new a.BoxSdkError({message:'Expecting "answer" of type "AiResponseFull" to be defined'});if(!(0,l.sdIsString)(e.answer))throw new a.BoxSdkError({message:'Expecting string for "answer" of type "AiResponseFull"'});const r=e.answer;if(null==e.created_at)throw new a.BoxSdkError({message:'Expecting "created_at" of type "AiResponseFull" to be defined'});if(!(0,l.sdIsString)(e.created_at))throw new a.BoxSdkError({message:'Expecting string for "created_at" of type "AiResponseFull"'});const n=(0,i.deserializeDateTime)(e.created_at);if(null!=e.completion_reason&&!(0,l.sdIsString)(e.completion_reason))throw new a.BoxSdkError({message:'Expecting string for "completion_reason" of type "AiResponseFull"'});const o=null==e.completion_reason?void 0:e.completion_reason;return{citations:t,answer:r,createdAt:n,completionReason:o}};const i=r(93845),n=r(67713),o=r(28655),s=r(28655),a=r(72631),l=r(50793),d=r(50793),c=r(50793)},82469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AiTextGenItemsField=void 0,t.serializeAiTextGenItemsTypeField=u,t.deserializeAiTextGenItemsTypeField=p,t.serializeAiTextGenItemsField=h,t.deserializeAiTextGenItemsField=f,t.serializeAiTextGenItemsFieldInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,content:null==e.content?void 0:e.content}},t.deserializeAiTextGenItemsFieldInput=function(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiTextGenItemsFieldInput"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AiTextGenItemsFieldInput" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AiTextGenItemsFieldInput"'});const t=e.id,r=null==e.type?void 0:p(e.type);if(null!=e.content&&!(0,l.sdIsString)(e.content))throw new a.BoxSdkError({message:'Expecting string for "content" of type "AiTextGenItemsFieldInput"'});const i=null==e.content?void 0:e.content;return{id:t,type:r,content:i}},t.serializeAiTextGen=function(e){return{prompt:e.prompt,items:e.items.map((function(e){return h(e)})),dialogue_history:null==e.dialogueHistory?void 0:e.dialogueHistory.map((function(e){return(0,i.serializeAiDialogueHistory)(e)})),ai_agent:null==e.aiAgent?void 0:(0,o.serializeAiAgentTextGen)(e.aiAgent)}},t.deserializeAiTextGen=function(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiTextGen"'});if(null==e.prompt)throw new a.BoxSdkError({message:'Expecting "prompt" of type "AiTextGen" to be defined'});if(!(0,l.sdIsString)(e.prompt))throw new a.BoxSdkError({message:'Expecting string for "prompt" of type "AiTextGen"'});const t=e.prompt;if(null==e.items)throw new a.BoxSdkError({message:'Expecting "items" of type "AiTextGen" to be defined'});if(!(0,d.sdIsList)(e.items))throw new a.BoxSdkError({message:'Expecting array for "items" of type "AiTextGen"'});const r=(0,d.sdIsList)(e.items)?e.items.map((function(e){return f(e)})):[];if(null!=e.dialogue_history&&!(0,d.sdIsList)(e.dialogue_history))throw new a.BoxSdkError({message:'Expecting array for "dialogue_history" of type "AiTextGen"'});const i=null==e.dialogue_history?void 0:(0,d.sdIsList)(e.dialogue_history)?e.dialogue_history.map((function(e){return(0,n.deserializeAiDialogueHistory)(e)})):[],o=null==e.ai_agent?void 0:(0,s.deserializeAiAgentTextGen)(e.ai_agent);return{prompt:t,items:r,dialogueHistory:i,aiAgent:o}};const i=r(70936),n=r(70936),o=r(96390),s=r(96390),a=r(72631),l=r(50793),d=r(50793),c=r(50793);function u(e){return e}function p(e){if("file"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AiTextGenItemsTypeField"})}function h(e){return{id:e.id,type:e.type,content:null==e.content?void 0:e.content}}function f(e){if(!(0,c.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AiTextGenItemsField"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AiTextGenItemsField" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AiTextGenItemsField"'});const t=e.id;if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AiTextGenItemsField" to be defined'});const r=p(e.type);if(null!=e.content&&!(0,l.sdIsString)(e.content))throw new a.BoxSdkError({message:'Expecting string for "content" of type "AiTextGenItemsField"'});return{id:t,type:r,content:null==e.content?void 0:e.content}}t.AiTextGenItemsField=class{constructor(e){this.type="file",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.content&&(this.content=e.content),e.rawData&&(this.rawData=e.rawData)}}},28920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppItem=void 0,t.serializeAppItemTypeField=s,t.deserializeAppItemTypeField=a,t.serializeAppItem=function(e){return{id:e.id,type:e.type,application_type:e.applicationType}},t.deserializeAppItem=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AppItem"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "AppItem" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "AppItem"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "AppItem" to be defined'});const r=a(e.type);if(null==e.application_type)throw new i.BoxSdkError({message:'Expecting "application_type" of type "AppItem" to be defined'});if(!(0,n.sdIsString)(e.application_type))throw new i.BoxSdkError({message:'Expecting string for "application_type" of type "AppItem"'});const s=e.application_type;return{id:t,type:r,applicationType:s}},t.serializeAppItemInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,application_type:e.applicationType}},t.deserializeAppItemInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "AppItemInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "AppItemInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "AppItemInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);if(null==e.application_type)throw new i.BoxSdkError({message:'Expecting "application_type" of type "AppItemInput" to be defined'});if(!(0,n.sdIsString)(e.application_type))throw new i.BoxSdkError({message:'Expecting string for "application_type" of type "AppItemInput"'});const s=e.application_type;return{id:t,type:r,applicationType:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("app_item"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize AppItemTypeField"})}t.AppItem=class{constructor(e){this.type="app_item",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.applicationType&&(this.applicationType=e.applicationType),e.rawData&&(this.rawData=e.rawData)}}},64679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppItemAssociation=void 0,t.serializeAppItemAssociationTypeField=c,t.deserializeAppItemAssociationTypeField=u,t.serializeAppItemAssociation=function(e){return{id:e.id,type:e.type,app_item:(0,i.serializeAppItem)(e.appItem),item:(0,o.serializeFileBaseOrFolderBaseOrWebLinkBase)(e.item)}},t.deserializeAppItemAssociation=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AppItemAssociation"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AppItemAssociation" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AppItemAssociation"'});const t=e.id;if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AppItemAssociation" to be defined'});const r=u(e.type);if(null==e.app_item)throw new a.BoxSdkError({message:'Expecting "app_item" of type "AppItemAssociation" to be defined'});const i=(0,n.deserializeAppItem)(e.app_item);if(null==e.item)throw new a.BoxSdkError({message:'Expecting "item" of type "AppItemAssociation" to be defined'});const o=(0,s.deserializeFileBaseOrFolderBaseOrWebLinkBase)(e.item);return{id:t,type:r,appItem:i,item:o}},t.serializeAppItemAssociationInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,app_item:(0,i.serializeAppItem)(e.appItem),item:(0,o.serializeFileBaseOrFolderBaseOrWebLinkBase)(e.item)}},t.deserializeAppItemAssociationInput=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AppItemAssociationInput"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AppItemAssociationInput" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AppItemAssociationInput"'});const t=e.id,r=null==e.type?void 0:u(e.type);if(null==e.app_item)throw new a.BoxSdkError({message:'Expecting "app_item" of type "AppItemAssociationInput" to be defined'});const i=(0,n.deserializeAppItem)(e.app_item);if(null==e.item)throw new a.BoxSdkError({message:'Expecting "item" of type "AppItemAssociationInput" to be defined'});const o=(0,s.deserializeFileBaseOrFolderBaseOrWebLinkBase)(e.item);return{id:t,type:r,appItem:i,item:o}};const i=r(28920),n=r(28920),o=r(1197),s=r(1197),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("app_item_association"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AppItemAssociationTypeField"})}t.AppItemAssociation=class{constructor(e){this.type="app_item_association",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.appItem&&(this.appItem=e.appItem),e.item&&(this.item=e.item),e.rawData&&(this.rawData=e.rawData)}}},98292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAppItemAssociations=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeAppItemAssociation)(e)}))}},t.deserializeAppItemAssociations=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "AppItemAssociations"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "AppItemAssociations"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "AppItemAssociations"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "AppItemAssociations"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "AppItemAssociations"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeAppItemAssociation)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(64679),n=r(64679),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},3457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppItemEventSource=void 0,t.serializeAppItemEventSourceTypeField=c,t.deserializeAppItemEventSourceTypeField=u,t.serializeAppItemEventSource=function(e){return{id:e.id,type:e.type,app_item_type:e.appItemType,user:null==e.user?void 0:(0,i.serializeUserMini)(e.user),group:null==e.group?void 0:(0,o.serializeGroupMini)(e.group)}},t.deserializeAppItemEventSource=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AppItemEventSource"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AppItemEventSource" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AppItemEventSource"'});const t=e.id;if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "AppItemEventSource" to be defined'});const r=u(e.type);if(null==e.app_item_type)throw new a.BoxSdkError({message:'Expecting "app_item_type" of type "AppItemEventSource" to be defined'});if(!(0,l.sdIsString)(e.app_item_type))throw new a.BoxSdkError({message:'Expecting string for "app_item_type" of type "AppItemEventSource"'});const i=e.app_item_type,o=null==e.user?void 0:(0,n.deserializeUserMini)(e.user),c=null==e.group?void 0:(0,s.deserializeGroupMini)(e.group);return{id:t,type:r,appItemType:i,user:o,group:c}},t.serializeAppItemEventSourceInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,app_item_type:e.appItemType,user:null==e.user?void 0:(0,i.serializeUserMini)(e.user),group:null==e.group?void 0:(0,o.serializeGroupMini)(e.group)}},t.deserializeAppItemEventSourceInput=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "AppItemEventSourceInput"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "AppItemEventSourceInput" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "AppItemEventSourceInput"'});const t=e.id,r=null==e.type?void 0:u(e.type);if(null==e.app_item_type)throw new a.BoxSdkError({message:'Expecting "app_item_type" of type "AppItemEventSourceInput" to be defined'});if(!(0,l.sdIsString)(e.app_item_type))throw new a.BoxSdkError({message:'Expecting string for "app_item_type" of type "AppItemEventSourceInput"'});const i=e.app_item_type,o=null==e.user?void 0:(0,n.deserializeUserMini)(e.user),c=null==e.group?void 0:(0,s.deserializeGroupMini)(e.group);return{id:t,type:r,appItemType:i,user:o,group:c}};const i=r(95408),n=r(95408),o=r(99248),s=r(99248),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("app_item"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize AppItemEventSourceTypeField"})}t.AppItemEventSource=class{constructor(e){this.type="app_item",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.appItemType&&(this.appItemType=e.appItemType),e.user&&(this.user=e.user),e.group&&(this.group=e.group),e.rawData&&(this.rawData=e.rawData)}}},93148:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser=function(e){if("app_item"==e.type)return(0,i.serializeAppItemEventSource)(e);if("file"==e.type)return(0,a.serializeFile)(e);if("folder"==e.type)return(0,d.serializeFolder)(e);if("user"==e.type)return(0,h.serializeUser)(e);if("file"==e.itemType)return(0,o.serializeEventSource)(e);if("folder"==e.itemType)return(0,o.serializeEventSource)(e);return(0,u.serializeGenericSource)(e)},t.deserializeAppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser=function(e){if(!(0,g.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser"'});if("app_item"==e.type)return(0,n.deserializeAppItemEventSource)(e);if("file"==e.type)return(0,l.deserializeFile)(e);if("folder"==e.type)return(0,c.deserializeFolder)(e);if("user"==e.type)return(0,f.deserializeUser)(e);if(!(0,g.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser"'});if("file"==e.item_type)return(0,s.deserializeEventSource)(e);if("folder"==e.item_type)return(0,s.deserializeEventSource)(e);try{return(0,p.deserializeGenericSource)(e)}catch(e){}throw new m.BoxSdkError({message:"Can't deserialize AppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser"})};const i=r(3457),n=r(3457),o=r(37973),s=r(37973),a=r(46022),l=r(46022),d=r(18272),c=r(18272),u=r(65284),p=r(65284),h=r(1543),f=r(1543),m=r(72631),g=r(50793)},78748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeClassificationTemplateField=l,t.deserializeClassificationTemplateField=d,t.serializeClassification=function(e){return{Box__Security__Classification__Key:null==e.boxSecurityClassificationKey?void 0:e.boxSecurityClassificationKey,$parent:null==e.parent?void 0:e.parent,$template:null==e.template?void 0:e.template,$scope:null==e.scope?void 0:e.scope,$version:null==e.version?void 0:e.version,$type:null==e.type?void 0:e.type,$typeVersion:null==e.typeVersion?void 0:e.typeVersion,$canEdit:null==e.canEdit?void 0:e.canEdit}},t.deserializeClassification=function(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "Classification"'});if(null!=e.Box__Security__Classification__Key&&!(0,s.sdIsString)(e.Box__Security__Classification__Key))throw new i.BoxSdkError({message:'Expecting string for "Box__Security__Classification__Key" of type "Classification"'});const t=null==e.Box__Security__Classification__Key?void 0:e.Box__Security__Classification__Key;if(null!=e.$parent&&!(0,s.sdIsString)(e.$parent))throw new i.BoxSdkError({message:'Expecting string for "$parent" of type "Classification"'});const r=null==e.$parent?void 0:e.$parent,l=null==e.$template?void 0:d(e.$template);if(null!=e.$scope&&!(0,s.sdIsString)(e.$scope))throw new i.BoxSdkError({message:'Expecting string for "$scope" of type "Classification"'});const c=null==e.$scope?void 0:e.$scope;if(null!=e.$version&&!(0,o.sdIsNumber)(e.$version))throw new i.BoxSdkError({message:'Expecting number for "$version" of type "Classification"'});const u=null==e.$version?void 0:e.$version;if(null!=e.$type&&!(0,s.sdIsString)(e.$type))throw new i.BoxSdkError({message:'Expecting string for "$type" of type "Classification"'});const p=null==e.$type?void 0:e.$type;if(null!=e.$typeVersion&&!(0,o.sdIsNumber)(e.$typeVersion))throw new i.BoxSdkError({message:'Expecting number for "$typeVersion" of type "Classification"'});const h=null==e.$typeVersion?void 0:e.$typeVersion;if(null!=e.$canEdit&&!(0,n.sdIsBoolean)(e.$canEdit))throw new i.BoxSdkError({message:'Expecting boolean for "$canEdit" of type "Classification"'});const f=null==e.$canEdit?void 0:e.$canEdit;return{boxSecurityClassificationKey:t,parent:r,template:l,scope:c,version:u,type:p,typeVersion:h,canEdit:f}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("securityClassification-6VMVochwUWo"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateField"})}},73146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClassificationTemplate=t.ClassificationTemplateFieldsField=void 0,t.serializeClassificationTemplateTypeField=d,t.deserializeClassificationTemplateTypeField=c,t.serializeClassificationTemplateTemplateKeyField=u,t.deserializeClassificationTemplateTemplateKeyField=p,t.serializeClassificationTemplateDisplayNameField=h,t.deserializeClassificationTemplateDisplayNameField=f,t.serializeClassificationTemplateFieldsTypeField=m,t.deserializeClassificationTemplateFieldsTypeField=g,t.serializeClassificationTemplateFieldsKeyField=y,t.deserializeClassificationTemplateFieldsKeyField=v,t.serializeClassificationTemplateFieldsDisplayNameField=b,t.deserializeClassificationTemplateFieldsDisplayNameField=w,t.serializeClassificationTemplateFieldsOptionsStaticConfigClassificationField=_,t.deserializeClassificationTemplateFieldsOptionsStaticConfigClassificationField=x,t.serializeClassificationTemplateFieldsOptionsStaticConfigField=S,t.deserializeClassificationTemplateFieldsOptionsStaticConfigField=k,t.serializeClassificationTemplateFieldsOptionsField=E,t.deserializeClassificationTemplateFieldsOptionsField=T,t.serializeClassificationTemplateFieldsField=B,t.deserializeClassificationTemplateFieldsField=C,t.serializeClassificationTemplateFieldsFieldInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,key:null==e.key?void 0:e.key,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,options:e.options.map((function(e){return E(e)}))}},t.deserializeClassificationTemplateFieldsFieldInput=function(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateFieldsFieldInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ClassificationTemplateFieldsFieldInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ClassificationTemplateFieldsFieldInput"'});const t=e.id,r=null==e.type?void 0:g(e.type),o=null==e.key?void 0:v(e.key),d=null==e.displayName?void 0:w(e.displayName);if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "ClassificationTemplateFieldsFieldInput"'});const c=null==e.hidden?void 0:e.hidden;if(null==e.options)throw new i.BoxSdkError({message:'Expecting "options" of type "ClassificationTemplateFieldsFieldInput" to be defined'});if(!(0,a.sdIsList)(e.options))throw new i.BoxSdkError({message:'Expecting array for "options" of type "ClassificationTemplateFieldsFieldInput"'});const u=(0,a.sdIsList)(e.options)?e.options.map((function(e){return T(e)})):[];return{id:t,type:r,key:o,displayName:d,hidden:c,options:u}},t.serializeClassificationTemplate=function(e){return{id:e.id,type:e.type,scope:e.scope,templateKey:e.templateKey,displayName:e.displayName,hidden:null==e.hidden?void 0:e.hidden,copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy,fields:e.fields.map((function(e){return B(e)}))}},t.deserializeClassificationTemplate=function(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplate"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ClassificationTemplate" to be defined'});if(!(0,s.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ClassificationTemplate"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "ClassificationTemplate" to be defined'});const r=c(e.type);if(null==e.scope)throw new i.BoxSdkError({message:'Expecting "scope" of type "ClassificationTemplate" to be defined'});if(!(0,s.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "ClassificationTemplate"'});const o=e.scope;if(null==e.templateKey)throw new i.BoxSdkError({message:'Expecting "templateKey" of type "ClassificationTemplate" to be defined'});const d=p(e.templateKey);if(null==e.displayName)throw new i.BoxSdkError({message:'Expecting "displayName" of type "ClassificationTemplate" to be defined'});const u=f(e.displayName);if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "ClassificationTemplate"'});const h=null==e.hidden?void 0:e.hidden;if(null!=e.copyInstanceOnItemCopy&&!(0,n.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new i.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "ClassificationTemplate"'});const m=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;if(null==e.fields)throw new i.BoxSdkError({message:'Expecting "fields" of type "ClassificationTemplate" to be defined'});if(!(0,a.sdIsList)(e.fields))throw new i.BoxSdkError({message:'Expecting array for "fields" of type "ClassificationTemplate"'});const g=(0,a.sdIsList)(e.fields)?e.fields.map((function(e){return C(e)})):[];return{id:t,type:r,scope:o,templateKey:d,displayName:u,hidden:h,copyInstanceOnItemCopy:m,fields:g}},t.serializeClassificationTemplateInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,scope:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy,fields:e.fields.map((function(e){return B(e)}))}},t.deserializeClassificationTemplateInput=function(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ClassificationTemplateInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ClassificationTemplateInput"'});const t=e.id,r=null==e.type?void 0:c(e.type);if(null==e.scope)throw new i.BoxSdkError({message:'Expecting "scope" of type "ClassificationTemplateInput" to be defined'});if(!(0,s.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "ClassificationTemplateInput"'});const o=e.scope,d=null==e.templateKey?void 0:p(e.templateKey),u=null==e.displayName?void 0:f(e.displayName);if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "ClassificationTemplateInput"'});const h=null==e.hidden?void 0:e.hidden;if(null!=e.copyInstanceOnItemCopy&&!(0,n.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new i.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "ClassificationTemplateInput"'});const m=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;if(null==e.fields)throw new i.BoxSdkError({message:'Expecting "fields" of type "ClassificationTemplateInput" to be defined'});if(!(0,a.sdIsList)(e.fields))throw new i.BoxSdkError({message:'Expecting array for "fields" of type "ClassificationTemplateInput"'});const g=(0,a.sdIsList)(e.fields)?e.fields.map((function(e){return C(e)})):[];return{id:t,type:r,scope:o,templateKey:d,displayName:u,hidden:h,copyInstanceOnItemCopy:m,fields:g}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793),a=r(50793),l=r(50793);t.ClassificationTemplateFieldsField=class{constructor(e){this.type="enum",this.key="Box__Security__Classification__Key",this.displayName="Classification",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.key&&(this.key=e.key),e.displayName&&(this.displayName=e.displayName),e.hidden&&(this.hidden=e.hidden),e.options&&(this.options=e.options),e.rawData&&(this.rawData=e.rawData)}};function d(e){return e}function c(e){if("metadata_template"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateTypeField"})}function u(e){return e}function p(e){if("securityClassification-6VMVochwUWo"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateTemplateKeyField"})}function h(e){return e}function f(e){if("Classification"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateDisplayNameField"})}function m(e){return e}function g(e){if("enum"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateFieldsTypeField"})}function y(e){return e}function v(e){if("Box__Security__Classification__Key"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateFieldsKeyField"})}function b(e){return e}function w(e){if("Classification"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ClassificationTemplateFieldsDisplayNameField"})}function _(e){return{classificationDefinition:null==e.classificationDefinition?void 0:e.classificationDefinition,colorID:null==e.colorId?void 0:e.colorId}}function x(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateFieldsOptionsStaticConfigClassificationField"'});if(null!=e.classificationDefinition&&!(0,s.sdIsString)(e.classificationDefinition))throw new i.BoxSdkError({message:'Expecting string for "classificationDefinition" of type "ClassificationTemplateFieldsOptionsStaticConfigClassificationField"'});const t=null==e.classificationDefinition?void 0:e.classificationDefinition;if(null!=e.colorID&&!(0,o.sdIsNumber)(e.colorID))throw new i.BoxSdkError({message:'Expecting number for "colorID" of type "ClassificationTemplateFieldsOptionsStaticConfigClassificationField"'});return{classificationDefinition:t,colorId:null==e.colorID?void 0:e.colorID}}function S(e){return{classification:null==e.classification?void 0:_(e.classification)}}function k(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateFieldsOptionsStaticConfigField"'});return{classification:null==e.classification?void 0:x(e.classification)}}function E(e){return{id:e.id,key:e.key,staticConfig:null==e.staticConfig?void 0:S(e.staticConfig)}}function T(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateFieldsOptionsField"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ClassificationTemplateFieldsOptionsField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ClassificationTemplateFieldsOptionsField"'});const t=e.id;if(null==e.key)throw new i.BoxSdkError({message:'Expecting "key" of type "ClassificationTemplateFieldsOptionsField" to be defined'});if(!(0,s.sdIsString)(e.key))throw new i.BoxSdkError({message:'Expecting string for "key" of type "ClassificationTemplateFieldsOptionsField"'});return{id:t,key:e.key,staticConfig:null==e.staticConfig?void 0:k(e.staticConfig)}}function B(e){return{id:e.id,type:e.type,key:e.key,displayName:e.displayName,hidden:null==e.hidden?void 0:e.hidden,options:e.options.map((function(e){return E(e)}))}}function C(e){if(!(0,l.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ClassificationTemplateFieldsField"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ClassificationTemplateFieldsField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ClassificationTemplateFieldsField"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "ClassificationTemplateFieldsField" to be defined'});const r=g(e.type);if(null==e.key)throw new i.BoxSdkError({message:'Expecting "key" of type "ClassificationTemplateFieldsField" to be defined'});const o=v(e.key);if(null==e.displayName)throw new i.BoxSdkError({message:'Expecting "displayName" of type "ClassificationTemplateFieldsField" to be defined'});const d=w(e.displayName);if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "ClassificationTemplateFieldsField"'});const c=null==e.hidden?void 0:e.hidden;if(null==e.options)throw new i.BoxSdkError({message:'Expecting "options" of type "ClassificationTemplateFieldsField" to be defined'});if(!(0,a.sdIsList)(e.options))throw new i.BoxSdkError({message:'Expecting array for "options" of type "ClassificationTemplateFieldsField"'});return{id:t,type:r,key:o,displayName:d,hidden:c,options:(0,a.sdIsList)(e.options)?e.options.map((function(e){return T(e)})):[]}}t.ClassificationTemplate=class{constructor(e){this.type="metadata_template",this.templateKey="securityClassification-6VMVochwUWo",this.displayName="Classification",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.scope&&(this.scope=e.scope),e.templateKey&&(this.templateKey=e.templateKey),e.displayName&&(this.displayName=e.displayName),e.hidden&&(this.hidden=e.hidden),e.copyInstanceOnItemCopy&&(this.copyInstanceOnItemCopy=e.copyInstanceOnItemCopy),e.fields&&(this.fields=e.fields),e.rawData&&(this.rawData=e.rawData)}}},10189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collaboration=void 0,t.serializeCollaborationTypeField=b,t.deserializeCollaborationTypeField=w,t.serializeCollaborationRoleField=_,t.deserializeCollaborationRoleField=x,t.serializeCollaborationStatusField=S,t.deserializeCollaborationStatusField=k,t.serializeCollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField=E,t.deserializeCollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField=T,t.serializeCollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField=B,t.deserializeCollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField=C,t.serializeCollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField=I,t.deserializeCollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField=A,t.serializeCollaborationAcceptanceRequirementsStatusField=F,t.deserializeCollaborationAcceptanceRequirementsStatusField=M,t.serializeCollaboration=function(e){return{id:e.id,type:e.type,item:null==e.item?void 0:(0,i.serializeFileOrFolderOrWebLink)(e.item),app_item:null==e.appItem?void 0:(0,o.serializeAppItem)(e.appItem),accessible_by:null==e.accessibleBy?void 0:(0,a.serializeGroupMiniOrUserCollaborations)(e.accessibleBy),invite_email:null==e.inviteEmail?void 0:e.inviteEmail,role:null==e.role?void 0:e.role,expires_at:null==e.expiresAt?void 0:(0,h.serializeDateTime)(e.expiresAt),is_access_only:null==e.isAccessOnly?void 0:e.isAccessOnly,status:null==e.status?void 0:e.status,acknowledged_at:null==e.acknowledgedAt?void 0:(0,h.serializeDateTime)(e.acknowledgedAt),created_by:null==e.createdBy?void 0:(0,d.serializeUserCollaborations)(e.createdBy),created_at:null==e.createdAt?void 0:(0,h.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,h.serializeDateTime)(e.modifiedAt),acceptance_requirements_status:null==e.acceptanceRequirementsStatus?void 0:F(e.acceptanceRequirementsStatus)}},t.deserializeCollaboration=function(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "Collaboration"'});if(null==e.id)throw new m.BoxSdkError({message:'Expecting "id" of type "Collaboration" to be defined'});if(!(0,y.sdIsString)(e.id))throw new m.BoxSdkError({message:'Expecting string for "id" of type "Collaboration"'});const t=e.id;if(null==e.type)throw new m.BoxSdkError({message:'Expecting "type" of type "Collaboration" to be defined'});const r=w(e.type),i=null==e.item?void 0:(0,n.deserializeFileOrFolderOrWebLink)(e.item),o=null==e.app_item?void 0:(0,s.deserializeAppItem)(e.app_item),a=null==e.accessible_by?void 0:(0,l.deserializeGroupMiniOrUserCollaborations)(e.accessible_by);if(null!=e.invite_email&&!(0,y.sdIsString)(e.invite_email))throw new m.BoxSdkError({message:'Expecting string for "invite_email" of type "Collaboration"'});const d=null==e.invite_email?void 0:e.invite_email,u=null==e.role?void 0:x(e.role);if(null!=e.expires_at&&!(0,y.sdIsString)(e.expires_at))throw new m.BoxSdkError({message:'Expecting string for "expires_at" of type "Collaboration"'});const p=null==e.expires_at?void 0:(0,f.deserializeDateTime)(e.expires_at);if(null!=e.is_access_only&&!(0,g.sdIsBoolean)(e.is_access_only))throw new m.BoxSdkError({message:'Expecting boolean for "is_access_only" of type "Collaboration"'});const h=null==e.is_access_only?void 0:e.is_access_only,b=null==e.status?void 0:k(e.status);if(null!=e.acknowledged_at&&!(0,y.sdIsString)(e.acknowledged_at))throw new m.BoxSdkError({message:'Expecting string for "acknowledged_at" of type "Collaboration"'});const _=null==e.acknowledged_at?void 0:(0,f.deserializeDateTime)(e.acknowledged_at),S=null==e.created_by?void 0:(0,c.deserializeUserCollaborations)(e.created_by);if(null!=e.created_at&&!(0,y.sdIsString)(e.created_at))throw new m.BoxSdkError({message:'Expecting string for "created_at" of type "Collaboration"'});const E=null==e.created_at?void 0:(0,f.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,y.sdIsString)(e.modified_at))throw new m.BoxSdkError({message:'Expecting string for "modified_at" of type "Collaboration"'});const T=null==e.modified_at?void 0:(0,f.deserializeDateTime)(e.modified_at),B=null==e.acceptance_requirements_status?void 0:M(e.acceptance_requirements_status);return{id:t,type:r,item:i,appItem:o,accessibleBy:a,inviteEmail:d,role:u,expiresAt:p,isAccessOnly:h,status:b,acknowledgedAt:_,createdBy:S,createdAt:E,modifiedAt:T,acceptanceRequirementsStatus:B}},t.serializeCollaborationInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,item:null==e.item?void 0:(0,i.serializeFileOrFolderOrWebLink)(e.item),app_item:null==e.appItem?void 0:(0,o.serializeAppItem)(e.appItem),accessible_by:null==e.accessibleBy?void 0:(0,a.serializeGroupMiniOrUserCollaborations)(e.accessibleBy),invite_email:null==e.inviteEmail?void 0:e.inviteEmail,role:null==e.role?void 0:e.role,expires_at:null==e.expiresAt?void 0:(0,h.serializeDateTime)(e.expiresAt),is_access_only:null==e.isAccessOnly?void 0:e.isAccessOnly,status:null==e.status?void 0:e.status,acknowledged_at:null==e.acknowledgedAt?void 0:(0,h.serializeDateTime)(e.acknowledgedAt),created_by:null==e.createdBy?void 0:(0,d.serializeUserCollaborations)(e.createdBy),created_at:null==e.createdAt?void 0:(0,h.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,h.serializeDateTime)(e.modifiedAt),acceptance_requirements_status:null==e.acceptanceRequirementsStatus?void 0:F(e.acceptanceRequirementsStatus)}},t.deserializeCollaborationInput=function(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "CollaborationInput"'});if(null==e.id)throw new m.BoxSdkError({message:'Expecting "id" of type "CollaborationInput" to be defined'});if(!(0,y.sdIsString)(e.id))throw new m.BoxSdkError({message:'Expecting string for "id" of type "CollaborationInput"'});const t=e.id,r=null==e.type?void 0:w(e.type),i=null==e.item?void 0:(0,n.deserializeFileOrFolderOrWebLink)(e.item),o=null==e.app_item?void 0:(0,s.deserializeAppItem)(e.app_item),a=null==e.accessible_by?void 0:(0,l.deserializeGroupMiniOrUserCollaborations)(e.accessible_by);if(null!=e.invite_email&&!(0,y.sdIsString)(e.invite_email))throw new m.BoxSdkError({message:'Expecting string for "invite_email" of type "CollaborationInput"'});const d=null==e.invite_email?void 0:e.invite_email,u=null==e.role?void 0:x(e.role);if(null!=e.expires_at&&!(0,y.sdIsString)(e.expires_at))throw new m.BoxSdkError({message:'Expecting string for "expires_at" of type "CollaborationInput"'});const p=null==e.expires_at?void 0:(0,f.deserializeDateTime)(e.expires_at);if(null!=e.is_access_only&&!(0,g.sdIsBoolean)(e.is_access_only))throw new m.BoxSdkError({message:'Expecting boolean for "is_access_only" of type "CollaborationInput"'});const h=null==e.is_access_only?void 0:e.is_access_only,b=null==e.status?void 0:k(e.status);if(null!=e.acknowledged_at&&!(0,y.sdIsString)(e.acknowledged_at))throw new m.BoxSdkError({message:'Expecting string for "acknowledged_at" of type "CollaborationInput"'});const _=null==e.acknowledged_at?void 0:(0,f.deserializeDateTime)(e.acknowledged_at),S=null==e.created_by?void 0:(0,c.deserializeUserCollaborations)(e.created_by);if(null!=e.created_at&&!(0,y.sdIsString)(e.created_at))throw new m.BoxSdkError({message:'Expecting string for "created_at" of type "CollaborationInput"'});const E=null==e.created_at?void 0:(0,f.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,y.sdIsString)(e.modified_at))throw new m.BoxSdkError({message:'Expecting string for "modified_at" of type "CollaborationInput"'});const T=null==e.modified_at?void 0:(0,f.deserializeDateTime)(e.modified_at),B=null==e.acceptance_requirements_status?void 0:M(e.acceptance_requirements_status);return{id:t,type:r,item:i,appItem:o,accessibleBy:a,inviteEmail:d,role:u,expiresAt:p,isAccessOnly:h,status:b,acknowledgedAt:_,createdBy:S,createdAt:E,modifiedAt:T,acceptanceRequirementsStatus:B}};const i=r(94132),n=r(94132),o=r(28920),s=r(28920),a=r(48716),l=r(48716),d=r(21517),c=r(21517),u=r(10308),p=r(10308),h=r(93845),f=r(93845),m=r(72631),g=r(50793),y=r(50793),v=r(50793);function b(e){return e}function w(e){if("collaboration"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize CollaborationTypeField"})}function _(e){return e}function x(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;if("owner"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize CollaborationRoleField"})}function S(e){return e}function k(e){if("accepted"==e)return e;if("pending"==e)return e;if("rejected"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize CollaborationStatusField"})}function E(e){return{is_accepted:null==e.isAccepted?void 0:e.isAccepted,terms_of_service:null==e.termsOfService?void 0:(0,u.serializeTermsOfServiceBase)(e.termsOfService)}}function T(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField"'});if(null!=e.is_accepted&&!(0,g.sdIsBoolean)(e.is_accepted))throw new m.BoxSdkError({message:'Expecting boolean for "is_accepted" of type "CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField"'});return{isAccepted:null==e.is_accepted?void 0:e.is_accepted,termsOfService:null==e.terms_of_service?void 0:(0,p.deserializeTermsOfServiceBase)(e.terms_of_service)}}function B(e){return{enterprise_has_strong_password_required_for_external_users:null==e.enterpriseHasStrongPasswordRequiredForExternalUsers?void 0:e.enterpriseHasStrongPasswordRequiredForExternalUsers,user_has_strong_password:null==e.userHasStrongPassword?void 0:e.userHasStrongPassword}}function C(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField"'});if(null!=e.enterprise_has_strong_password_required_for_external_users&&!(0,g.sdIsBoolean)(e.enterprise_has_strong_password_required_for_external_users))throw new m.BoxSdkError({message:'Expecting boolean for "enterprise_has_strong_password_required_for_external_users" of type "CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField"'});const t=null==e.enterprise_has_strong_password_required_for_external_users?void 0:e.enterprise_has_strong_password_required_for_external_users;if(null!=e.user_has_strong_password&&!(0,g.sdIsBoolean)(e.user_has_strong_password))throw new m.BoxSdkError({message:'Expecting boolean for "user_has_strong_password" of type "CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField"'});return{enterpriseHasStrongPasswordRequiredForExternalUsers:t,userHasStrongPassword:null==e.user_has_strong_password?void 0:e.user_has_strong_password}}function I(e){return{enterprise_has_two_factor_auth_enabled:null==e.enterpriseHasTwoFactorAuthEnabled?void 0:e.enterpriseHasTwoFactorAuthEnabled,user_has_two_factor_authentication_enabled:null==e.userHasTwoFactorAuthenticationEnabled?void 0:e.userHasTwoFactorAuthenticationEnabled}}function A(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField"'});if(null!=e.enterprise_has_two_factor_auth_enabled&&!(0,g.sdIsBoolean)(e.enterprise_has_two_factor_auth_enabled))throw new m.BoxSdkError({message:'Expecting boolean for "enterprise_has_two_factor_auth_enabled" of type "CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField"'});const t=null==e.enterprise_has_two_factor_auth_enabled?void 0:e.enterprise_has_two_factor_auth_enabled;if(null!=e.user_has_two_factor_authentication_enabled&&!(0,g.sdIsBoolean)(e.user_has_two_factor_authentication_enabled))throw new m.BoxSdkError({message:'Expecting boolean for "user_has_two_factor_authentication_enabled" of type "CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField"'});return{enterpriseHasTwoFactorAuthEnabled:t,userHasTwoFactorAuthenticationEnabled:null==e.user_has_two_factor_authentication_enabled?void 0:e.user_has_two_factor_authentication_enabled}}function F(e){return{terms_of_service_requirement:null==e.termsOfServiceRequirement?void 0:E(e.termsOfServiceRequirement),strong_password_requirement:null==e.strongPasswordRequirement?void 0:B(e.strongPasswordRequirement),two_factor_authentication_requirement:null==e.twoFactorAuthenticationRequirement?void 0:I(e.twoFactorAuthenticationRequirement)}}function M(e){if(!(0,v.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "CollaborationAcceptanceRequirementsStatusField"'});return{termsOfServiceRequirement:null==e.terms_of_service_requirement?void 0:T(e.terms_of_service_requirement),strongPasswordRequirement:null==e.strong_password_requirement?void 0:C(e.strong_password_requirement),twoFactorAuthenticationRequirement:null==e.two_factor_authentication_requirement?void 0:A(e.two_factor_authentication_requirement)}}t.Collaboration=class{constructor(e){this.type="collaboration",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.item&&(this.item=e.item),e.appItem&&(this.appItem=e.appItem),e.accessibleBy&&(this.accessibleBy=e.accessibleBy),e.inviteEmail&&(this.inviteEmail=e.inviteEmail),e.role&&(this.role=e.role),e.expiresAt&&(this.expiresAt=e.expiresAt),e.isAccessOnly&&(this.isAccessOnly=e.isAccessOnly),e.status&&(this.status=e.status),e.acknowledgedAt&&(this.acknowledgedAt=e.acknowledgedAt),e.createdBy&&(this.createdBy=e.createdBy),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.acceptanceRequirementsStatus&&(this.acceptanceRequirementsStatus=e.acceptanceRequirementsStatus),e.rawData&&(this.rawData=e.rawData)}}},36958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollaborationAllowlistEntries=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeCollaborationAllowlistEntry)(e)}))}},t.deserializeCollaborationAllowlistEntries=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistEntries"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "CollaborationAllowlistEntries"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "CollaborationAllowlistEntries"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "CollaborationAllowlistEntries"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "CollaborationAllowlistEntries"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeCollaborationAllowlistEntry)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(66774),n=r(66774),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},66774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollaborationAllowlistEntryTypeField=l,t.deserializeCollaborationAllowlistEntryTypeField=d,t.serializeCollaborationAllowlistEntryDirectionField=c,t.deserializeCollaborationAllowlistEntryDirectionField=u,t.serializeCollaborationAllowlistEntryEnterpriseTypeField=p,t.deserializeCollaborationAllowlistEntryEnterpriseTypeField=h,t.serializeCollaborationAllowlistEntryEnterpriseField=f,t.deserializeCollaborationAllowlistEntryEnterpriseField=m,t.serializeCollaborationAllowlistEntry=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,domain:null==e.domain?void 0:e.domain,direction:null==e.direction?void 0:e.direction,enterprise:null==e.enterprise?void 0:f(e.enterprise),created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt)}},t.deserializeCollaborationAllowlistEntry=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistEntry"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "CollaborationAllowlistEntry"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:d(e.type);if(null!=e.domain&&!(0,s.sdIsString)(e.domain))throw new o.BoxSdkError({message:'Expecting string for "domain" of type "CollaborationAllowlistEntry"'});const i=null==e.domain?void 0:e.domain,l=null==e.direction?void 0:u(e.direction),c=null==e.enterprise?void 0:m(e.enterprise);if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "CollaborationAllowlistEntry"'});const p=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);return{id:t,type:r,domain:i,direction:l,enterprise:c,createdAt:p}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("collaboration_whitelist_entry"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CollaborationAllowlistEntryTypeField"})}function c(e){return e}function u(e){if("inbound"==e)return e;if("outbound"==e)return e;if("both"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CollaborationAllowlistEntryDirectionField"})}function p(e){return e}function h(e){if("enterprise"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CollaborationAllowlistEntryEnterpriseTypeField"})}function f(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}}function m(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistEntryEnterpriseField"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "CollaborationAllowlistEntryEnterpriseField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type);if(null!=e.name&&!(0,s.sdIsString)(e.name))throw new o.BoxSdkError({message:'Expecting string for "name" of type "CollaborationAllowlistEntryEnterpriseField"'});return{id:t,type:r,name:null==e.name?void 0:e.name}}},92720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollaborationAllowlistExemptTargetTypeField=c,t.deserializeCollaborationAllowlistExemptTargetTypeField=u,t.serializeCollaborationAllowlistExemptTargetEnterpriseTypeField=p,t.deserializeCollaborationAllowlistExemptTargetEnterpriseTypeField=h,t.serializeCollaborationAllowlistExemptTargetEnterpriseField=f,t.deserializeCollaborationAllowlistExemptTargetEnterpriseField=m,t.serializeCollaborationAllowlistExemptTarget=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,enterprise:null==e.enterprise?void 0:f(e.enterprise),user:null==e.user?void 0:(0,i.serializeUserMini)(e.user),created_at:null==e.createdAt?void 0:(0,o.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,o.serializeDateTime)(e.modifiedAt)}},t.deserializeCollaborationAllowlistExemptTarget=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistExemptTarget"'});if(null!=e.id&&!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "CollaborationAllowlistExemptTarget"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:u(e.type),i=null==e.enterprise?void 0:m(e.enterprise),o=null==e.user?void 0:(0,n.deserializeUserMini)(e.user);if(null!=e.created_at&&!(0,l.sdIsString)(e.created_at))throw new a.BoxSdkError({message:'Expecting string for "created_at" of type "CollaborationAllowlistExemptTarget"'});const c=null==e.created_at?void 0:(0,s.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,l.sdIsString)(e.modified_at))throw new a.BoxSdkError({message:'Expecting string for "modified_at" of type "CollaborationAllowlistExemptTarget"'});const p=null==e.modified_at?void 0:(0,s.deserializeDateTime)(e.modified_at);return{id:t,type:r,enterprise:i,user:o,createdAt:c,modifiedAt:p}};const i=r(95408),n=r(95408),o=r(93845),s=r(93845),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("collaboration_whitelist_exempt_target"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize CollaborationAllowlistExemptTargetTypeField"})}function p(e){return e}function h(e){if("enterprise"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize CollaborationAllowlistExemptTargetEnterpriseTypeField"})}function f(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}}function m(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistExemptTargetEnterpriseField"'});if(null!=e.id&&!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "CollaborationAllowlistExemptTargetEnterpriseField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type);if(null!=e.name&&!(0,l.sdIsString)(e.name))throw new a.BoxSdkError({message:'Expecting string for "name" of type "CollaborationAllowlistExemptTargetEnterpriseField"'});return{id:t,type:r,name:null==e.name?void 0:e.name}}},38333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollaborationAllowlistExemptTargets=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeCollaborationAllowlistExemptTarget)(e)}))}},t.deserializeCollaborationAllowlistExemptTargets=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollaborationAllowlistExemptTargets"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "CollaborationAllowlistExemptTargets"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "CollaborationAllowlistExemptTargets"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "CollaborationAllowlistExemptTargets"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "CollaborationAllowlistExemptTargets"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeCollaborationAllowlistExemptTarget)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(92720),n=r(92720),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},7546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollaborationsOrderDirectionField=c,t.deserializeCollaborationsOrderDirectionField=u,t.serializeCollaborationsOrderField=p,t.deserializeCollaborationsOrderField=h,t.serializeCollaborations=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,total_count:null==e.totalCount?void 0:e.totalCount,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeCollaboration)(e)}))}},t.deserializeCollaborations=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Collaborations"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Collaborations"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "Collaborations"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "Collaborations"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Collaborations"'});const c=null==e.total_count?void 0:e.total_count;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Collaborations"'});const u=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Collaborations"'});const p=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Collaborations"'});const f=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeCollaboration)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,totalCount:c,offset:u,order:p,entries:f}};const i=r(10189),n=r(10189),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CollaborationsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollaborationsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "CollaborationsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},44432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollaboratorVariable=t.CollaboratorVariableVariableValueField=void 0,t.serializeCollaboratorVariableTypeField=a,t.deserializeCollaboratorVariableTypeField=l,t.serializeCollaboratorVariableVariableTypeField=d,t.deserializeCollaboratorVariableVariableTypeField=c,t.serializeCollaboratorVariableVariableValueTypeField=u,t.deserializeCollaboratorVariableVariableValueTypeField=p,t.serializeCollaboratorVariableVariableValueField=h,t.deserializeCollaboratorVariableVariableValueField=f,t.serializeCollaboratorVariableVariableValueFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeCollaboratorVariableVariableValueFieldInput=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CollaboratorVariableVariableValueFieldInput"'});const t=null==e.type?void 0:p(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "CollaboratorVariableVariableValueFieldInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "CollaboratorVariableVariableValueFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeCollaboratorVariable=function(e){return{type:e.type,variable_type:e.variableType,variable_value:e.variableValue.map((function(e){return h(e)}))}},t.deserializeCollaboratorVariable=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CollaboratorVariable"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "CollaboratorVariable" to be defined'});const t=l(e.type);if(null==e.variable_type)throw new i.BoxSdkError({message:'Expecting "variable_type" of type "CollaboratorVariable" to be defined'});const r=c(e.variable_type);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "CollaboratorVariable" to be defined'});if(!(0,o.sdIsList)(e.variable_value))throw new i.BoxSdkError({message:'Expecting array for "variable_value" of type "CollaboratorVariable"'});const n=(0,o.sdIsList)(e.variable_value)?e.variable_value.map((function(e){return f(e)})):[];return{type:t,variableType:r,variableValue:n}},t.serializeCollaboratorVariableInput=function(e){return{type:null==e.type?void 0:e.type,variableType:null==e.variableType?void 0:e.variableType,variable_value:e.variableValue.map((function(e){return h(e)}))}},t.deserializeCollaboratorVariableInput=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CollaboratorVariableInput"'});const t=null==e.type?void 0:l(e.type),r=null==e.variableType?void 0:c(e.variableType);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "CollaboratorVariableInput" to be defined'});if(!(0,o.sdIsList)(e.variable_value))throw new i.BoxSdkError({message:'Expecting array for "variable_value" of type "CollaboratorVariableInput"'});const n=(0,o.sdIsList)(e.variable_value)?e.variable_value.map((function(e){return f(e)})):[];return{type:t,variableType:r,variableValue:n}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793);t.CollaboratorVariableVariableValueField=class{constructor(e){this.type="user",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};function a(e){return e}function l(e){if("variable"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollaboratorVariableTypeField"})}function d(e){return e}function c(e){if("user_list"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollaboratorVariableVariableTypeField"})}function u(e){return e}function p(e){if("user"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollaboratorVariableVariableValueTypeField"})}function h(e){return{type:e.type,id:e.id}}function f(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CollaboratorVariableVariableValueField"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "CollaboratorVariableVariableValueField" to be defined'});const t=p(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "CollaboratorVariableVariableValueField" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "CollaboratorVariableVariableValueField"'});return{type:t,id:e.id}}t.CollaboratorVariable=class{constructor(e){this.type="variable",this.variableType="user_list",e.type&&(this.type=e.type),e.variableType&&(this.variableType=e.variableType),e.variableValue&&(this.variableValue=e.variableValue),e.rawData&&(this.rawData=e.rawData)}}},21048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollectionTypeField=s,t.deserializeCollectionTypeField=a,t.serializeCollectionNameField=l,t.deserializeCollectionNameField=d,t.serializeCollectionCollectionTypeField=c,t.deserializeCollectionCollectionTypeField=u,t.serializeCollection=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name,collection_type:null==e.collectionType?void 0:e.collectionType}},t.deserializeCollection=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "Collection"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "Collection"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type),s=null==e.name?void 0:d(e.name),l=null==e.collection_type?void 0:u(e.collection_type);return{id:t,type:r,name:s,collectionType:l}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("collection"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollectionTypeField"})}function l(e){return e}function d(e){if("Favorites"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollectionNameField"})}function c(e){return e}function u(e){if("favorites"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CollectionCollectionTypeField"})}},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCollectionsOrderDirectionField=c,t.deserializeCollectionsOrderDirectionField=u,t.serializeCollectionsOrderField=p,t.deserializeCollectionsOrderField=h,t.serializeCollections=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeCollection)(e)}))}},t.deserializeCollections=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Collections"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Collections"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Collections"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Collections"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Collections"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Collections"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeCollection)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(21048),n=r(21048),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CollectionsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CollectionsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "CollectionsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},87325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCommentItemField=h,t.deserializeCommentItemField=f,t.serializeComment=function(e){const t=(0,n.serializeCommentBase)(e);if(!(0,p.sdIsMap)(t))throw new d.BoxSdkError({message:'Expecting a map for "Comment"'});return Object.assign(Object.assign({},t),{is_reply_comment:null==e.isReplyComment?void 0:e.isReplyComment,message:null==e.message?void 0:e.message,created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),item:null==e.item?void 0:h(e.item)})},t.deserializeComment=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "Comment"'});if(null!=e.is_reply_comment&&!(0,c.sdIsBoolean)(e.is_reply_comment))throw new d.BoxSdkError({message:'Expecting boolean for "is_reply_comment" of type "Comment"'});const t=null==e.is_reply_comment?void 0:e.is_reply_comment;if(null!=e.message&&!(0,u.sdIsString)(e.message))throw new d.BoxSdkError({message:'Expecting string for "message" of type "Comment"'});const r=null==e.message?void 0:e.message,n=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "Comment"'});const o=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "Comment"'});const a=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at),h=null==e.item?void 0:f(e.item);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "Comment"'});const m=null==e.id?void 0:e.id,g=null==e.type?void 0:(0,i.deserializeCommentBaseTypeField)(e.type);return{isReplyComment:t,message:r,createdBy:n,createdAt:o,modifiedAt:a,item:h,id:m,type:g}};const i=r(81564),n=r(81564),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793);function h(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function f(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "CommentItemField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "CommentItemField"'});const t=null==e.id?void 0:e.id;if(null!=e.type&&!(0,u.sdIsString)(e.type))throw new d.BoxSdkError({message:'Expecting string for "type" of type "CommentItemField"'});return{id:t,type:null==e.type?void 0:e.type}}},81564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCommentBaseTypeField=s,t.deserializeCommentBaseTypeField=a,t.serializeCommentBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeCommentBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CommentBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "CommentBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("comment"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CommentBaseTypeField"})}},83496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCommentFull=function(e){const t=(0,a.serializeComment)(e);if(!(0,u.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "CommentFull"'});return Object.assign(Object.assign({},t),{tagged_message:null==e.taggedMessage?void 0:e.taggedMessage})},t.deserializeCommentFull=function(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "CommentFull"'});if(null!=e.tagged_message&&!(0,c.sdIsString)(e.tagged_message))throw new l.BoxSdkError({message:'Expecting string for "tagged_message" of type "CommentFull"'});const t=null==e.tagged_message?void 0:e.tagged_message;if(null!=e.is_reply_comment&&!(0,d.sdIsBoolean)(e.is_reply_comment))throw new l.BoxSdkError({message:'Expecting boolean for "is_reply_comment" of type "CommentFull"'});const r=null==e.is_reply_comment?void 0:e.is_reply_comment;if(null!=e.message&&!(0,c.sdIsString)(e.message))throw new l.BoxSdkError({message:'Expecting string for "message" of type "CommentFull"'});const a=null==e.message?void 0:e.message,p=null==e.created_by?void 0:(0,n.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new l.BoxSdkError({message:'Expecting string for "created_at" of type "CommentFull"'});const h=null==e.created_at?void 0:(0,o.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,c.sdIsString)(e.modified_at))throw new l.BoxSdkError({message:'Expecting string for "modified_at" of type "CommentFull"'});const f=null==e.modified_at?void 0:(0,o.deserializeDateTime)(e.modified_at),m=null==e.item?void 0:(0,s.deserializeCommentItemField)(e.item);if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "CommentFull"'});const g=null==e.id?void 0:e.id,y=null==e.type?void 0:(0,i.deserializeCommentBaseTypeField)(e.type);return{taggedMessage:t,isReplyComment:r,message:a,createdBy:p,createdAt:h,modifiedAt:f,item:m,id:g,type:y}};const i=r(81564),n=r(95408),o=r(93845),s=r(87325),a=r(87325),l=r(72631),d=r(50793),c=r(50793),u=r(50793)},2346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCommentsOrderDirectionField=c,t.deserializeCommentsOrderDirectionField=u,t.serializeCommentsOrderField=p,t.deserializeCommentsOrderField=h,t.serializeComments=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeCommentFull)(e)}))}},t.deserializeComments=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Comments"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Comments"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Comments"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Comments"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Comments"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Comments"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeCommentFull)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(83496),n=r(83496),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize CommentsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "CommentsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "CommentsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},58524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionRuleVariable=void 0,t.serializeCompletionRuleVariableTypeField=o,t.deserializeCompletionRuleVariableTypeField=s,t.serializeCompletionRuleVariableVariableTypeField=a,t.deserializeCompletionRuleVariableVariableTypeField=l,t.serializeCompletionRuleVariableVariableValueField=d,t.deserializeCompletionRuleVariableVariableValueField=c,t.serializeCompletionRuleVariable=function(e){return{type:e.type,variable_type:e.variableType,variable_value:e.variableValue}},t.deserializeCompletionRuleVariable=function(e){if(!(0,n.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CompletionRuleVariable"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "CompletionRuleVariable" to be defined'});const t=s(e.type);if(null==e.variable_type)throw new i.BoxSdkError({message:'Expecting "variable_type" of type "CompletionRuleVariable" to be defined'});const r=l(e.variable_type);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "CompletionRuleVariable" to be defined'});const o=c(e.variable_value);return{type:t,variableType:r,variableValue:o}},t.serializeCompletionRuleVariableInput=function(e){return{type:null==e.type?void 0:e.type,variableType:null==e.variableType?void 0:e.variableType,variable_value:e.variableValue}},t.deserializeCompletionRuleVariableInput=function(e){if(!(0,n.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "CompletionRuleVariableInput"'});const t=null==e.type?void 0:s(e.type),r=null==e.variableType?void 0:l(e.variableType);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "CompletionRuleVariableInput" to be defined'});const o=c(e.variable_value);return{type:t,variableType:r,variableValue:o}};const i=r(72631),n=r(50793);function o(e){return e}function s(e){if("variable"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CompletionRuleVariableTypeField"})}function a(e){return e}function l(e){if("task_completion_rule"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CompletionRuleVariableVariableTypeField"})}function d(e){return e}function c(e){if("all_assignees"==e)return e;if("any_assignees"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize CompletionRuleVariableVariableValueField"})}t.CompletionRuleVariable=class{constructor(e){this.type="variable",this.variableType="task_completion_rule",e.type&&(this.type=e.type),e.variableType&&(this.variableType=e.variableType),e.variableValue&&(this.variableValue=e.variableValue),e.rawData&&(this.rawData=e.rawData)}}},1294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDevicePinnerTypeField=l,t.deserializeDevicePinnerTypeField=d,t.serializeDevicePinner=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,owned_by:null==e.ownedBy?void 0:(0,i.serializeUserMini)(e.ownedBy),product_name:null==e.productName?void 0:e.productName}},t.deserializeDevicePinner=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "DevicePinner"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "DevicePinner"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:d(e.type),i=null==e.owned_by?void 0:(0,n.deserializeUserMini)(e.owned_by);if(null!=e.product_name&&!(0,s.sdIsString)(e.product_name))throw new o.BoxSdkError({message:'Expecting string for "product_name" of type "DevicePinner"'});const l=null==e.product_name?void 0:e.product_name;return{id:t,type:r,ownedBy:i,productName:l}};const i=r(95408),n=r(95408),o=r(72631),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("device_pinner"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize DevicePinnerTypeField"})}},10931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDevicePinnersOrderByField=d,t.deserializeDevicePinnersOrderByField=c,t.serializeDevicePinnersOrderDirectionField=u,t.deserializeDevicePinnersOrderDirectionField=p,t.serializeDevicePinnersOrderField=h,t.deserializeDevicePinnersOrderField=f,t.serializeDevicePinners=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeDevicePinner)(e)})),limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,order:null==e.order?void 0:e.order.map((function(e){return h(e)}))}},t.deserializeDevicePinners=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "DevicePinners"'});if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "DevicePinners"'});const t=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeDevicePinner)(e)})):[];if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "DevicePinners"'});const r=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,s.sdIsNumber)(e.next_marker))throw new o.BoxSdkError({message:'Expecting number for "next_marker" of type "DevicePinners"'});const i=null==e.next_marker?void 0:e.next_marker;if(null!=e.order&&!(0,a.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "DevicePinners"'});const d=null==e.order?void 0:(0,a.sdIsList)(e.order)?e.order.map((function(e){return f(e)})):[];return{entries:t,limit:r,nextMarker:i,order:d}};const i=r(1294),n=r(1294),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("id"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize DevicePinnersOrderByField"})}function u(e){return e}function p(e){if("asc"==e)return e;if("desc"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize DevicePinnersOrderDirectionField"})}function h(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function f(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "DevicePinnersOrderField"'});return{by:null==e.by?void 0:c(e.by),direction:null==e.direction?void 0:p(e.direction)}}},99152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEmailAliasTypeField=a,t.deserializeEmailAliasTypeField=l,t.serializeEmailAlias=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,email:null==e.email?void 0:e.email,is_confirmed:null==e.isConfirmed?void 0:e.isConfirmed}},t.deserializeEmailAlias=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "EmailAlias"'});if(null!=e.id&&!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "EmailAlias"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:l(e.type);if(null!=e.email&&!(0,o.sdIsString)(e.email))throw new i.BoxSdkError({message:'Expecting string for "email" of type "EmailAlias"'});const a=null==e.email?void 0:e.email;if(null!=e.is_confirmed&&!(0,n.sdIsBoolean)(e.is_confirmed))throw new i.BoxSdkError({message:'Expecting boolean for "is_confirmed" of type "EmailAlias"'});const d=null==e.is_confirmed?void 0:e.is_confirmed;return{id:t,type:r,email:a,isConfirmed:d}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793);function a(e){return e}function l(e){if("email_alias"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize EmailAliasTypeField"})}},50756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEmailAliases=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeEmailAlias)(e)}))}},t.deserializeEmailAliases=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "EmailAliases"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "EmailAliases"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "EmailAliases"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeEmailAlias)(e)})):[];return{totalCount:t,entries:r}};const i=r(99152),n=r(99152),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},75762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEnterpriseBaseTypeField=s,t.deserializeEnterpriseBaseTypeField=a,t.serializeEnterpriseBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeEnterpriseBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "EnterpriseBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "EnterpriseBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("enterprise"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize EnterpriseBaseTypeField"})}},93212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEventEventTypeField=p,t.deserializeEventEventTypeField=h,t.serializeEventAdditionalDetailsField=f,t.deserializeEventAdditionalDetailsField=m,t.serializeEvent=function(e){return{type:null==e.type?void 0:e.type,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),recorded_at:null==e.recordedAt?void 0:(0,a.serializeDateTime)(e.recordedAt),event_id:null==e.eventId?void 0:e.eventId,created_by:null==e.createdBy?void 0:(0,i.serializeUserMini)(e.createdBy),event_type:null==e.eventType?void 0:e.eventType,session_id:null==e.sessionId?void 0:e.sessionId,source:null==e.source?void 0:(0,o.serializeAppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser)(e.source),additional_details:null==e.additionalDetails?void 0:(e.additionalDetails,{})}},t.deserializeEvent=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "Event"'});if(null!=e.type&&!(0,c.sdIsString)(e.type))throw new d.BoxSdkError({message:'Expecting string for "type" of type "Event"'});const t=null==e.type?void 0:e.type;if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "Event"'});const r=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.recorded_at&&!(0,c.sdIsString)(e.recorded_at))throw new d.BoxSdkError({message:'Expecting string for "recorded_at" of type "Event"'});const i=null==e.recorded_at?void 0:(0,l.deserializeDateTime)(e.recorded_at);if(null!=e.event_id&&!(0,c.sdIsString)(e.event_id))throw new d.BoxSdkError({message:'Expecting string for "event_id" of type "Event"'});const o=null==e.event_id?void 0:e.event_id,a=null==e.created_by?void 0:(0,n.deserializeUserMini)(e.created_by),p=null==e.event_type?void 0:h(e.event_type);if(null!=e.session_id&&!(0,c.sdIsString)(e.session_id))throw new d.BoxSdkError({message:'Expecting string for "session_id" of type "Event"'});const f=null==e.session_id?void 0:e.session_id,g=null==e.source?void 0:(0,s.deserializeAppItemEventSourceOrEventSourceOrFileOrFolderOrGenericSourceOrUser)(e.source),y=null==e.additional_details?void 0:m(e.additional_details);return{type:t,createdAt:r,recordedAt:i,eventId:o,createdBy:a,eventType:p,sessionId:f,source:g,additionalDetails:y}};const i=r(95408),n=r(95408),o=r(93148),s=r(93148),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793);function p(e){return e}function h(e){if("ACCESS_GRANTED"==e)return e;if("ACCESS_REVOKED"==e)return e;if("ADD_DEVICE_ASSOCIATION"==e)return e;if("ADD_LOGIN_ACTIVITY_DEVICE"==e)return e;if("ADMIN_LOGIN"==e)return e;if("APPLICATION_CREATED"==e)return e;if("APPLICATION_PUBLIC_KEY_ADDED"==e)return e;if("APPLICATION_PUBLIC_KEY_DELETED"==e)return e;if("CHANGE_ADMIN_ROLE"==e)return e;if("CHANGE_FOLDER_PERMISSION"==e)return e;if("COLLABORATION_ACCEPT"==e)return e;if("COLLABORATION_EXPIRATION"==e)return e;if("COLLABORATION_INVITE"==e)return e;if("COLLABORATION_REMOVE"==e)return e;if("COLLABORATION_ROLE_CHANGE"==e)return e;if("COLLAB_ADD_COLLABORATOR"==e)return e;if("COLLAB_INVITE_COLLABORATOR"==e)return e;if("COLLAB_REMOVE_COLLABORATOR"==e)return e;if("COLLAB_ROLE_CHANGE"==e)return e;if("COMMENT_CREATE"==e)return e;if("COMMENT_DELETE"==e)return e;if("CONTENT_ACCESS"==e)return e;if("CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY"==e)return e;if("CONTENT_WORKFLOW_AUTOMATION_ADD"==e)return e;if("CONTENT_WORKFLOW_AUTOMATION_DELETE"==e)return e;if("CONTENT_WORKFLOW_POLICY_ADD"==e)return e;if("CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION"==e)return e;if("CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION"==e)return e;if("COPY"==e)return e;if("DATA_RETENTION_CREATE_RETENTION"==e)return e;if("DATA_RETENTION_REMOVE_RETENTION"==e)return e;if("DELETE"==e)return e;if("DELETE_USER"==e)return e;if("DEVICE_TRUST_CHECK_FAILED"==e)return e;if("DOWNLOAD"==e)return e;if("EDIT"==e)return e;if("EDIT_USER"==e)return e;if("EMAIL_ALIAS_CONFIRM"==e)return e;if("EMAIL_ALIAS_REMOVE"==e)return e;if("ENABLE_TWO_FACTOR_AUTH"==e)return e;if("ENTERPRISE_APP_AUTHORIZATION_UPDATE"==e)return e;if("FAILED_LOGIN"==e)return e;if("FILE_MARKED_MALICIOUS"==e)return e;if("FILE_WATERMARKED_DOWNLOAD"==e)return e;if("GROUP_ADD_ITEM"==e)return e;if("GROUP_ADD_USER"==e)return e;if("GROUP_CREATION"==e)return e;if("GROUP_DELETION"==e)return e;if("GROUP_EDITED"==e)return e;if("GROUP_REMOVE_ITEM"==e)return e;if("GROUP_REMOVE_USER"==e)return e;if("ITEM_COPY"==e)return e;if("ITEM_CREATE"==e)return e;if("ITEM_DOWNLOAD"==e)return e;if("ITEM_EMAIL_SEND"==e)return e;if("ITEM_MAKE_CURRENT_VERSION"==e)return e;if("ITEM_MODIFY"==e)return e;if("ITEM_MOVE"==e)return e;if("ITEM_OPEN"==e)return e;if("ITEM_PREVIEW"==e)return e;if("ITEM_RENAME"==e)return e;if("ITEM_SHARED"==e)return e;if("ITEM_SHARED_CREATE"==e)return e;if("ITEM_SHARED_UNSHARE"==e)return e;if("ITEM_SHARED_UPDATE"==e)return e;if("ITEM_SYNC"==e)return e;if("ITEM_TRASH"==e)return e;if("ITEM_UNDELETE_VIA_TRASH"==e)return e;if("ITEM_UNSYNC"==e)return e;if("ITEM_UPLOAD"==e)return e;if("LEGAL_HOLD_ASSIGNMENT_CREATE"==e)return e;if("LEGAL_HOLD_ASSIGNMENT_DELETE"==e)return e;if("LEGAL_HOLD_POLICY_CREATE"==e)return e;if("LEGAL_HOLD_POLICY_DELETE"==e)return e;if("LEGAL_HOLD_POLICY_UPDATE"==e)return e;if("LOCK"==e)return e;if("LOCK_CREATE"==e)return e;if("LOCK_DESTROY"==e)return e;if("LOGIN"==e)return e;if("MASTER_INVITE_ACCEPT"==e)return e;if("MASTER_INVITE_REJECT"==e)return e;if("METADATA_INSTANCE_CREATE"==e)return e;if("METADATA_INSTANCE_DELETE"==e)return e;if("METADATA_INSTANCE_UPDATE"==e)return e;if("METADATA_TEMPLATE_CREATE"==e)return e;if("METADATA_TEMPLATE_DELETE"==e)return e;if("METADATA_TEMPLATE_UPDATE"==e)return e;if("MOVE"==e)return e;if("NEW_USER"==e)return e;if("PREVIEW"==e)return e;if("REMOVE_DEVICE_ASSOCIATION"==e)return e;if("REMOVE_LOGIN_ACTIVITY_DEVICE"==e)return e;if("RENAME"==e)return e;if("RETENTION_POLICY_ASSIGNMENT_ADD"==e)return e;if("SHARE"==e)return e;if("SHARED_LINK_SEND"==e)return e;if("SHARE_EXPIRATION"==e)return e;if("SHIELD_ALERT"==e)return e;if("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED"==e)return e;if("SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION"==e)return e;if("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED"==e)return e;if("SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION"==e)return e;if("SHIELD_JUSTIFICATION_APPROVAL"==e)return e;if("SHIELD_SHARED_LINK_ACCESS_BLOCKED"==e)return e;if("SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE"==e)return e;if("SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE"==e)return e;if("SIGN_DOCUMENT_ASSIGNED"==e)return e;if("SIGN_DOCUMENT_CANCELLED"==e)return e;if("SIGN_DOCUMENT_COMPLETED"==e)return e;if("SIGN_DOCUMENT_CONVERTED"==e)return e;if("SIGN_DOCUMENT_CREATED"==e)return e;if("SIGN_DOCUMENT_DECLINED"==e)return e;if("SIGN_DOCUMENT_EXPIRED"==e)return e;if("SIGN_DOCUMENT_SIGNED"==e)return e;if("SIGN_DOCUMENT_VIEWED_BY_SIGNED"==e)return e;if("SIGNER_DOWNLOADED"==e)return e;if("SIGNER_FORWARDED"==e)return e;if("STORAGE_EXPIRATION"==e)return e;if("TAG_ITEM_CREATE"==e)return e;if("TASK_ASSIGNMENT_CREATE"==e)return e;if("TASK_ASSIGNMENT_DELETE"==e)return e;if("TASK_ASSIGNMENT_UPDATE"==e)return e;if("TASK_CREATE"==e)return e;if("TASK_UPDATE"==e)return e;if("TERMS_OF_SERVICE_ACCEPT"==e)return e;if("TERMS_OF_SERVICE_REJECT"==e)return e;if("UNDELETE"==e)return e;if("UNLOCK"==e)return e;if("UNSHARE"==e)return e;if("UPDATE_COLLABORATION_EXPIRATION"==e)return e;if("UPDATE_SHARE_EXPIRATION"==e)return e;if("UPLOAD"==e)return e;if("USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE"==e)return e;if("WATERMARK_LABEL_CREATE"==e)return e;if("WATERMARK_LABEL_DELETE"==e)return e;if((0,c.sdIsString)(e))return e;throw new d.BoxSdkError({message:"Can't deserialize EventEventTypeField"})}function f(e){return{}}function m(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "EventAdditionalDetailsField"'});return{}}},37973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEventSourceItemTypeField=c,t.deserializeEventSourceItemTypeField=u,t.serializeEventSourceClassificationField=p,t.deserializeEventSourceClassificationField=h,t.serializeEventSource=function(e){return{item_type:e.itemType,item_id:e.itemId,item_name:e.itemName,classification:null==e.classification?void 0:p(e.classification),parent:null==e.parent?void 0:(0,i.serializeFolderMini)(e.parent),owned_by:null==e.ownedBy?void 0:(0,o.serializeUserMini)(e.ownedBy)}},t.deserializeEventSource=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "EventSource"'});if(null==e.item_type)throw new a.BoxSdkError({message:'Expecting "item_type" of type "EventSource" to be defined'});const t=u(e.item_type);if(null==e.item_id)throw new a.BoxSdkError({message:'Expecting "item_id" of type "EventSource" to be defined'});if(!(0,l.sdIsString)(e.item_id))throw new a.BoxSdkError({message:'Expecting string for "item_id" of type "EventSource"'});const r=e.item_id;if(null==e.item_name)throw new a.BoxSdkError({message:'Expecting "item_name" of type "EventSource" to be defined'});if(!(0,l.sdIsString)(e.item_name))throw new a.BoxSdkError({message:'Expecting string for "item_name" of type "EventSource"'});const i=e.item_name,o=null==e.classification?void 0:h(e.classification),c=null==e.parent?void 0:(0,n.deserializeFolderMini)(e.parent),p=null==e.owned_by?void 0:(0,s.deserializeUserMini)(e.owned_by);return{itemType:t,itemId:r,itemName:i,classification:o,parent:c,ownedBy:p}};const i=r(70343),n=r(70343),o=r(95408),s=r(95408),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("file"==e)return e;if("folder"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize EventSourceItemTypeField"})}function p(e){return{name:null==e.name?void 0:e.name}}function h(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "EventSourceClassificationField"'});if(null!=e.name&&!(0,l.sdIsString)(e.name))throw new a.BoxSdkError({message:'Expecting string for "name" of type "EventSourceClassificationField"'});return{name:null==e.name?void 0:e.name}}},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeEventsNextStreamPositionField=c,t.deserializeEventsNextStreamPositionField=u,t.serializeEvents=function(e){return{chunk_size:null==e.chunkSize?void 0:e.chunkSize,next_stream_position:null==e.nextStreamPosition?void 0:e.nextStreamPosition,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeEvent)(e)}))}},t.deserializeEvents=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Events"'});if(null!=e.chunk_size&&!(0,s.sdIsNumber)(e.chunk_size))throw new o.BoxSdkError({message:'Expecting number for "chunk_size" of type "Events"'});const t=null==e.chunk_size?void 0:e.chunk_size,r=null==e.next_stream_position?void 0:u(e.next_stream_position);if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Events"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeEvent)(e)})):[];return{chunkSize:t,nextStreamPosition:r,entries:i}};const i=r(93212),n=r(93212),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if((0,a.sdIsString)(e))return e;if((0,s.sdIsNumber)(e))return e;throw new o.BoxSdkError({message:"Can't deserialize EventsNextStreamPositionField"})}},46022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.File=void 0,t.serializeFilePathCollectionField=w,t.deserializeFilePathCollectionField=_,t.serializeFileSharedLinkAccessField=x,t.deserializeFileSharedLinkAccessField=S,t.serializeFileSharedLinkEffectiveAccessField=k,t.deserializeFileSharedLinkEffectiveAccessField=E,t.serializeFileSharedLinkEffectivePermissionField=T,t.deserializeFileSharedLinkEffectivePermissionField=B,t.serializeFileSharedLinkPermissionsField=C,t.deserializeFileSharedLinkPermissionsField=I,t.serializeFileSharedLinkField=A,t.deserializeFileSharedLinkField=F,t.serializeFileItemStatusField=M,t.deserializeFileItemStatusField=D,t.serializeFile=function(e){const t=(0,o.serializeFileMini)(e);if(!(0,v.sdIsMap)(t))throw new h.BoxSdkError({message:'Expecting a map for "File"'});return Object.assign(Object.assign({},t),{description:null==e.description?void 0:e.description,size:null==e.size?void 0:e.size,path_collection:null==e.pathCollection?void 0:w(e.pathCollection),created_at:null==e.createdAt?void 0:(0,c.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,c.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:(0,c.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,c.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,c.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,c.serializeDateTime)(e.contentModifiedAt),created_by:null==e.createdBy?void 0:(0,l.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,l.serializeUserMini)(e.modifiedBy),owned_by:null==e.ownedBy?void 0:(0,l.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:A(e.sharedLink),parent:null==e.parent?void 0:(0,s.serializeFolderMini)(e.parent),item_status:null==e.itemStatus?void 0:e.itemStatus})},t.deserializeFile=function(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "File"'});if(null!=e.description&&!(0,g.sdIsString)(e.description))throw new h.BoxSdkError({message:'Expecting string for "description" of type "File"'});const t=null==e.description?void 0:e.description;if(null!=e.size&&!(0,m.sdIsNumber)(e.size))throw new h.BoxSdkError({message:'Expecting number for "size" of type "File"'});const r=null==e.size?void 0:e.size,o=null==e.path_collection?void 0:_(e.path_collection);if(null!=e.created_at&&!(0,g.sdIsString)(e.created_at))throw new h.BoxSdkError({message:'Expecting string for "created_at" of type "File"'});const s=null==e.created_at?void 0:(0,u.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,g.sdIsString)(e.modified_at))throw new h.BoxSdkError({message:'Expecting string for "modified_at" of type "File"'});const l=null==e.modified_at?void 0:(0,u.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,g.sdIsString)(e.trashed_at))throw new h.BoxSdkError({message:'Expecting string for "trashed_at" of type "File"'});const c=null==e.trashed_at?void 0:(0,u.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,g.sdIsString)(e.purged_at))throw new h.BoxSdkError({message:'Expecting string for "purged_at" of type "File"'});const p=null==e.purged_at?void 0:(0,u.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,g.sdIsString)(e.content_created_at))throw new h.BoxSdkError({message:'Expecting string for "content_created_at" of type "File"'});const f=null==e.content_created_at?void 0:(0,u.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,g.sdIsString)(e.content_modified_at))throw new h.BoxSdkError({message:'Expecting string for "content_modified_at" of type "File"'});const y=null==e.content_modified_at?void 0:(0,u.deserializeDateTime)(e.content_modified_at),b=null==e.created_by?void 0:(0,d.deserializeUserMini)(e.created_by),w=null==e.modified_by?void 0:(0,d.deserializeUserMini)(e.modified_by),x=null==e.owned_by?void 0:(0,d.deserializeUserMini)(e.owned_by),S=null==e.shared_link?void 0:F(e.shared_link),k=null==e.parent?void 0:(0,a.deserializeFolderMini)(e.parent),E=null==e.item_status?void 0:D(e.item_status);if(null!=e.sequence_id&&!(0,g.sdIsString)(e.sequence_id))throw new h.BoxSdkError({message:'Expecting string for "sequence_id" of type "File"'});const T=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,g.sdIsString)(e.name))throw new h.BoxSdkError({message:'Expecting string for "name" of type "File"'});const B=null==e.name?void 0:e.name;if(null!=e.sha1&&!(0,g.sdIsString)(e.sha1))throw new h.BoxSdkError({message:'Expecting string for "sha1" of type "File"'});const C=null==e.sha1?void 0:e.sha1,I=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.id)throw new h.BoxSdkError({message:'Expecting "id" of type "File" to be defined'});if(!(0,g.sdIsString)(e.id))throw new h.BoxSdkError({message:'Expecting string for "id" of type "File"'});const A=e.id;if(null!=e.etag&&!(0,g.sdIsString)(e.etag))throw new h.BoxSdkError({message:'Expecting string for "etag" of type "File"'});const M=null==e.etag?void 0:e.etag;if(null==e.type)throw new h.BoxSdkError({message:'Expecting "type" of type "File" to be defined'});const R=(0,i.deserializeFileBaseTypeField)(e.type);return{description:t,size:r,pathCollection:o,createdAt:s,modifiedAt:l,trashedAt:c,purgedAt:p,contentCreatedAt:f,contentModifiedAt:y,createdBy:b,modifiedBy:w,ownedBy:x,sharedLink:S,parent:k,itemStatus:E,sequenceId:T,name:B,sha1:C,fileVersion:I,id:A,etag:M,type:R}};const i=r(39455),n=r(95053),o=r(62929),s=r(70343),a=r(70343),l=r(95408),d=r(95408),c=r(93845),u=r(93845),p=r(62929),h=r(72631),f=r(50793),m=r(50793),g=r(50793),y=r(50793),v=r(50793);class b extends p.FileMini{constructor(e){super(e)}}function w(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,s.serializeFolderMini)(e)}))}}function _(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FilePathCollectionField"'});if(null==e.total_count)throw new h.BoxSdkError({message:'Expecting "total_count" of type "FilePathCollectionField" to be defined'});if(!(0,m.sdIsNumber)(e.total_count))throw new h.BoxSdkError({message:'Expecting number for "total_count" of type "FilePathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new h.BoxSdkError({message:'Expecting "entries" of type "FilePathCollectionField" to be defined'});if(!(0,y.sdIsList)(e.entries))throw new h.BoxSdkError({message:'Expecting array for "entries" of type "FilePathCollectionField"'});return{totalCount:t,entries:(0,y.sdIsList)(e.entries)?e.entries.map((function(e){return(0,a.deserializeFolderMini)(e)})):[]}}function x(e){return e}function S(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FileSharedLinkAccessField"})}function k(e){return e}function E(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FileSharedLinkEffectiveAccessField"})}function T(e){return e}function B(e){if("can_edit"==e)return e;if("can_download"==e)return e;if("can_preview"==e)return e;if("no_access"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FileSharedLinkEffectivePermissionField"})}function C(e){return{can_download:e.canDownload,can_preview:e.canPreview,can_edit:e.canEdit}}function I(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FileSharedLinkPermissionsField"'});if(null==e.can_download)throw new h.BoxSdkError({message:'Expecting "can_download" of type "FileSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_download))throw new h.BoxSdkError({message:'Expecting boolean for "can_download" of type "FileSharedLinkPermissionsField"'});const t=e.can_download;if(null==e.can_preview)throw new h.BoxSdkError({message:'Expecting "can_preview" of type "FileSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_preview))throw new h.BoxSdkError({message:'Expecting boolean for "can_preview" of type "FileSharedLinkPermissionsField"'});const r=e.can_preview;if(null==e.can_edit)throw new h.BoxSdkError({message:'Expecting "can_edit" of type "FileSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_edit))throw new h.BoxSdkError({message:'Expecting boolean for "can_edit" of type "FileSharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:e.can_edit}}function A(e){return{url:e.url,download_url:null==e.downloadUrl?void 0:e.downloadUrl,vanity_url:null==e.vanityUrl?void 0:e.vanityUrl,vanity_name:null==e.vanityName?void 0:e.vanityName,access:null==e.access?void 0:e.access,effective_access:e.effectiveAccess,effective_permission:e.effectivePermission,unshared_at:null==e.unsharedAt?void 0:(0,c.serializeDateTime)(e.unsharedAt),is_password_enabled:e.isPasswordEnabled,permissions:null==e.permissions?void 0:C(e.permissions),download_count:e.downloadCount,preview_count:e.previewCount}}function F(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FileSharedLinkField"'});if(null==e.url)throw new h.BoxSdkError({message:'Expecting "url" of type "FileSharedLinkField" to be defined'});if(!(0,g.sdIsString)(e.url))throw new h.BoxSdkError({message:'Expecting string for "url" of type "FileSharedLinkField"'});const t=e.url;if(null!=e.download_url&&!(0,g.sdIsString)(e.download_url))throw new h.BoxSdkError({message:'Expecting string for "download_url" of type "FileSharedLinkField"'});const r=null==e.download_url?void 0:e.download_url;if(null!=e.vanity_url&&!(0,g.sdIsString)(e.vanity_url))throw new h.BoxSdkError({message:'Expecting string for "vanity_url" of type "FileSharedLinkField"'});const i=null==e.vanity_url?void 0:e.vanity_url;if(null!=e.vanity_name&&!(0,g.sdIsString)(e.vanity_name))throw new h.BoxSdkError({message:'Expecting string for "vanity_name" of type "FileSharedLinkField"'});const n=null==e.vanity_name?void 0:e.vanity_name,o=null==e.access?void 0:S(e.access);if(null==e.effective_access)throw new h.BoxSdkError({message:'Expecting "effective_access" of type "FileSharedLinkField" to be defined'});const s=E(e.effective_access);if(null==e.effective_permission)throw new h.BoxSdkError({message:'Expecting "effective_permission" of type "FileSharedLinkField" to be defined'});const a=B(e.effective_permission);if(null!=e.unshared_at&&!(0,g.sdIsString)(e.unshared_at))throw new h.BoxSdkError({message:'Expecting string for "unshared_at" of type "FileSharedLinkField"'});const l=null==e.unshared_at?void 0:(0,u.deserializeDateTime)(e.unshared_at);if(null==e.is_password_enabled)throw new h.BoxSdkError({message:'Expecting "is_password_enabled" of type "FileSharedLinkField" to be defined'});if(!(0,f.sdIsBoolean)(e.is_password_enabled))throw new h.BoxSdkError({message:'Expecting boolean for "is_password_enabled" of type "FileSharedLinkField"'});const d=e.is_password_enabled,c=null==e.permissions?void 0:I(e.permissions);if(null==e.download_count)throw new h.BoxSdkError({message:'Expecting "download_count" of type "FileSharedLinkField" to be defined'});if(!(0,m.sdIsNumber)(e.download_count))throw new h.BoxSdkError({message:'Expecting number for "download_count" of type "FileSharedLinkField"'});const p=e.download_count;if(null==e.preview_count)throw new h.BoxSdkError({message:'Expecting "preview_count" of type "FileSharedLinkField" to be defined'});if(!(0,m.sdIsNumber)(e.preview_count))throw new h.BoxSdkError({message:'Expecting number for "preview_count" of type "FileSharedLinkField"'});return{url:t,downloadUrl:r,vanityUrl:i,vanityName:n,access:o,effectiveAccess:s,effectivePermission:a,unsharedAt:l,isPasswordEnabled:d,permissions:c,downloadCount:p,previewCount:e.preview_count}}function M(e){return e}function D(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FileItemStatusField"})}t.File=b},39455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBase=void 0,t.serializeFileBaseTypeField=s,t.deserializeFileBaseTypeField=a,t.serializeFileBase=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:e.type}},t.deserializeFileBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FileBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FileBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FileBase"'});const t=e.id;if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "FileBase"'});const r=null==e.etag?void 0:e.etag;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "FileBase" to be defined'});const s=a(e.type);return{id:t,etag:r,type:s}},t.serializeFileBaseInput=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type}},t.deserializeFileBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FileBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FileBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FileBaseInput"'});const t=e.id;if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "FileBaseInput"'});const r=null==e.etag?void 0:e.etag,s=null==e.type?void 0:a(e.type);return{id:t,etag:r,type:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("file"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize FileBaseTypeField"})}t.FileBase=class{constructor(e){this.type="file",e.id&&(this.id=e.id),e.etag&&(this.etag=e.etag),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},1197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileBaseOrFolderBaseOrWebLinkBase=function(e){if("file"==e.type)return(0,i.serializeFileBase)(e);if("folder"==e.type)return(0,o.serializeFolderBase)(e);if("web_link"==e.type)return(0,a.serializeWebLinkBase)(e);throw new d.BoxSdkError({message:"unknown type"})},t.deserializeFileBaseOrFolderBaseOrWebLinkBase=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileBaseOrFolderBaseOrWebLinkBase"'});if("file"==e.type)return(0,n.deserializeFileBase)(e);if("folder"==e.type)return(0,s.deserializeFolderBase)(e);if("web_link"==e.type)return(0,l.deserializeWebLinkBase)(e);throw new d.BoxSdkError({message:"Can't deserialize FileBaseOrFolderBaseOrWebLinkBase"})};const i=r(39455),n=r(39455),o=r(64145),s=r(64145),a=r(3719),l=r(3719),d=r(72631),c=r(50793)},49579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileFull=void 0,t.serializeFileFullPermissionsField=E,t.deserializeFileFullPermissionsField=T,t.serializeFileFullLockTypeField=B,t.deserializeFileFullLockTypeField=C,t.serializeFileFullLockAppTypeField=I,t.deserializeFileFullLockAppTypeField=A,t.serializeFileFullLockField=F,t.deserializeFileFullLockField=M,t.serializeFileFullExpiringEmbedLinkTokenTypeField=D,t.deserializeFileFullExpiringEmbedLinkTokenTypeField=R,t.serializeFileFullExpiringEmbedLinkField=P,t.deserializeFileFullExpiringEmbedLinkField=O,t.serializeFileFullWatermarkInfoField=z,t.deserializeFileFullWatermarkInfoField=N,t.serializeFileFullAllowedInviteeRolesField=q,t.deserializeFileFullAllowedInviteeRolesField=U,t.serializeFileFullMetadataField=L,t.deserializeFileFullMetadataField=j,t.serializeFileFullRepresentationsEntriesContentField=H,t.deserializeFileFullRepresentationsEntriesContentField=$,t.serializeFileFullRepresentationsEntriesInfoField=G,t.deserializeFileFullRepresentationsEntriesInfoField=W,t.serializeFileFullRepresentationsEntriesPropertiesField=K,t.deserializeFileFullRepresentationsEntriesPropertiesField=V,t.serializeFileFullRepresentationsEntriesStatusStateField=J,t.deserializeFileFullRepresentationsEntriesStatusStateField=Y,t.serializeFileFullRepresentationsEntriesStatusField=Q,t.deserializeFileFullRepresentationsEntriesStatusField=Z,t.serializeFileFullRepresentationsEntriesField=X,t.deserializeFileFullRepresentationsEntriesField=ee,t.serializeFileFullRepresentationsField=te,t.deserializeFileFullRepresentationsField=re,t.serializeFileFullClassificationField=ie,t.deserializeFileFullClassificationField=ne,t.serializeFileFullSharedLinkPermissionOptionsField=oe,t.deserializeFileFullSharedLinkPermissionOptionsField=se,t.serializeFileFull=function(e){const t=(0,d.serializeFile)(e);if(!(0,S.sdIsMap)(t))throw new v.BoxSdkError({message:'Expecting a map for "FileFull"'});return Object.assign(Object.assign({},t),{version_number:null==e.versionNumber?void 0:e.versionNumber,comment_count:null==e.commentCount?void 0:e.commentCount,permissions:null==e.permissions?void 0:E(e.permissions),tags:null==e.tags?void 0:e.tags.map((function(e){return e})),lock:null==e.lock?void 0:F(e.lock),extension:null==e.extension?void 0:e.extension,is_package:null==e.isPackage?void 0:e.isPackage,expiring_embed_link:null==e.expiringEmbedLink?void 0:P(e.expiringEmbedLink),watermark_info:null==e.watermarkInfo?void 0:z(e.watermarkInfo),is_accessible_via_shared_link:null==e.isAccessibleViaSharedLink?void 0:e.isAccessibleViaSharedLink,allowed_invitee_roles:null==e.allowedInviteeRoles?void 0:e.allowedInviteeRoles.map((function(e){return e})),is_externally_owned:null==e.isExternallyOwned?void 0:e.isExternallyOwned,has_collaborations:null==e.hasCollaborations?void 0:e.hasCollaborations,metadata:null==e.metadata?void 0:L(e.metadata),expires_at:null==e.expiresAt?void 0:(0,m.serializeDateTime)(e.expiresAt),representations:null==e.representations?void 0:te(e.representations),classification:null==e.classification?void 0:ie(e.classification),uploader_display_name:null==e.uploaderDisplayName?void 0:e.uploaderDisplayName,disposition_at:null==e.dispositionAt?void 0:(0,m.serializeDateTime)(e.dispositionAt),shared_link_permission_options:null==e.sharedLinkPermissionOptions?void 0:e.sharedLinkPermissionOptions.map((function(e){return e})),is_associated_with_app_item:null==e.isAssociatedWithAppItem?void 0:e.isAssociatedWithAppItem})},t.deserializeFileFull=function(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFull"'});if(null!=e.version_number&&!(0,_.sdIsString)(e.version_number))throw new v.BoxSdkError({message:'Expecting string for "version_number" of type "FileFull"'});const t=null==e.version_number?void 0:e.version_number;if(null!=e.comment_count&&!(0,w.sdIsNumber)(e.comment_count))throw new v.BoxSdkError({message:'Expecting number for "comment_count" of type "FileFull"'});const r=null==e.comment_count?void 0:e.comment_count,d=null==e.permissions?void 0:T(e.permissions);if(null!=e.tags&&!(0,x.sdIsList)(e.tags))throw new v.BoxSdkError({message:'Expecting array for "tags" of type "FileFull"'});const c=null==e.tags?void 0:(0,x.sdIsList)(e.tags)?e.tags.map((function(e){if(!(0,_.sdIsString)(e))throw new v.BoxSdkError({message:'Expecting string for "FileFull"'});return e})):[],p=null==e.lock?void 0:M(e.lock);if(null!=e.extension&&!(0,_.sdIsString)(e.extension))throw new v.BoxSdkError({message:'Expecting string for "extension" of type "FileFull"'});const h=null==e.extension?void 0:e.extension;if(null!=e.is_package&&!(0,b.sdIsBoolean)(e.is_package))throw new v.BoxSdkError({message:'Expecting boolean for "is_package" of type "FileFull"'});const f=null==e.is_package?void 0:e.is_package,m=null==e.expiring_embed_link?void 0:O(e.expiring_embed_link),y=null==e.watermark_info?void 0:N(e.watermark_info);if(null!=e.is_accessible_via_shared_link&&!(0,b.sdIsBoolean)(e.is_accessible_via_shared_link))throw new v.BoxSdkError({message:'Expecting boolean for "is_accessible_via_shared_link" of type "FileFull"'});const k=null==e.is_accessible_via_shared_link?void 0:e.is_accessible_via_shared_link;if(null!=e.allowed_invitee_roles&&!(0,x.sdIsList)(e.allowed_invitee_roles))throw new v.BoxSdkError({message:'Expecting array for "allowed_invitee_roles" of type "FileFull"'});const E=null==e.allowed_invitee_roles?void 0:(0,x.sdIsList)(e.allowed_invitee_roles)?e.allowed_invitee_roles.map((function(e){return U(e)})):[];if(null!=e.is_externally_owned&&!(0,b.sdIsBoolean)(e.is_externally_owned))throw new v.BoxSdkError({message:'Expecting boolean for "is_externally_owned" of type "FileFull"'});const B=null==e.is_externally_owned?void 0:e.is_externally_owned;if(null!=e.has_collaborations&&!(0,b.sdIsBoolean)(e.has_collaborations))throw new v.BoxSdkError({message:'Expecting boolean for "has_collaborations" of type "FileFull"'});const C=null==e.has_collaborations?void 0:e.has_collaborations,I=null==e.metadata?void 0:j(e.metadata);if(null!=e.expires_at&&!(0,_.sdIsString)(e.expires_at))throw new v.BoxSdkError({message:'Expecting string for "expires_at" of type "FileFull"'});const A=null==e.expires_at?void 0:(0,g.deserializeDateTime)(e.expires_at),F=null==e.representations?void 0:re(e.representations),D=null==e.classification?void 0:ne(e.classification);if(null!=e.uploader_display_name&&!(0,_.sdIsString)(e.uploader_display_name))throw new v.BoxSdkError({message:'Expecting string for "uploader_display_name" of type "FileFull"'});const R=null==e.uploader_display_name?void 0:e.uploader_display_name;if(null!=e.disposition_at&&!(0,_.sdIsString)(e.disposition_at))throw new v.BoxSdkError({message:'Expecting string for "disposition_at" of type "FileFull"'});const P=null==e.disposition_at?void 0:(0,g.deserializeDateTime)(e.disposition_at);if(null!=e.shared_link_permission_options&&!(0,x.sdIsList)(e.shared_link_permission_options))throw new v.BoxSdkError({message:'Expecting array for "shared_link_permission_options" of type "FileFull"'});const z=null==e.shared_link_permission_options?void 0:(0,x.sdIsList)(e.shared_link_permission_options)?e.shared_link_permission_options.map((function(e){return se(e)})):[];if(null!=e.is_associated_with_app_item&&!(0,b.sdIsBoolean)(e.is_associated_with_app_item))throw new v.BoxSdkError({message:'Expecting boolean for "is_associated_with_app_item" of type "FileFull"'});const q=null==e.is_associated_with_app_item?void 0:e.is_associated_with_app_item;if(null!=e.description&&!(0,_.sdIsString)(e.description))throw new v.BoxSdkError({message:'Expecting string for "description" of type "FileFull"'});const L=null==e.description?void 0:e.description;if(null!=e.size&&!(0,w.sdIsNumber)(e.size))throw new v.BoxSdkError({message:'Expecting number for "size" of type "FileFull"'});const H=null==e.size?void 0:e.size,$=null==e.path_collection?void 0:(0,o.deserializeFilePathCollectionField)(e.path_collection);if(null!=e.created_at&&!(0,_.sdIsString)(e.created_at))throw new v.BoxSdkError({message:'Expecting string for "created_at" of type "FileFull"'});const G=null==e.created_at?void 0:(0,g.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,_.sdIsString)(e.modified_at))throw new v.BoxSdkError({message:'Expecting string for "modified_at" of type "FileFull"'});const W=null==e.modified_at?void 0:(0,g.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,_.sdIsString)(e.trashed_at))throw new v.BoxSdkError({message:'Expecting string for "trashed_at" of type "FileFull"'});const K=null==e.trashed_at?void 0:(0,g.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,_.sdIsString)(e.purged_at))throw new v.BoxSdkError({message:'Expecting string for "purged_at" of type "FileFull"'});const V=null==e.purged_at?void 0:(0,g.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,_.sdIsString)(e.content_created_at))throw new v.BoxSdkError({message:'Expecting string for "content_created_at" of type "FileFull"'});const J=null==e.content_created_at?void 0:(0,g.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,_.sdIsString)(e.content_modified_at))throw new v.BoxSdkError({message:'Expecting string for "content_modified_at" of type "FileFull"'});const Y=null==e.content_modified_at?void 0:(0,g.deserializeDateTime)(e.content_modified_at),Q=null==e.created_by?void 0:(0,u.deserializeUserMini)(e.created_by),Z=null==e.modified_by?void 0:(0,u.deserializeUserMini)(e.modified_by),X=null==e.owned_by?void 0:(0,u.deserializeUserMini)(e.owned_by),ee=null==e.shared_link?void 0:(0,s.deserializeFileSharedLinkField)(e.shared_link),te=null==e.parent?void 0:(0,a.deserializeFolderMini)(e.parent),ie=null==e.item_status?void 0:(0,l.deserializeFileItemStatusField)(e.item_status);if(null!=e.sequence_id&&!(0,_.sdIsString)(e.sequence_id))throw new v.BoxSdkError({message:'Expecting string for "sequence_id" of type "FileFull"'});const oe=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,_.sdIsString)(e.name))throw new v.BoxSdkError({message:'Expecting string for "name" of type "FileFull"'});const ae=null==e.name?void 0:e.name;if(null!=e.sha1&&!(0,_.sdIsString)(e.sha1))throw new v.BoxSdkError({message:'Expecting string for "sha1" of type "FileFull"'});const le=null==e.sha1?void 0:e.sha1,de=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.id)throw new v.BoxSdkError({message:'Expecting "id" of type "FileFull" to be defined'});if(!(0,_.sdIsString)(e.id))throw new v.BoxSdkError({message:'Expecting string for "id" of type "FileFull"'});const ce=e.id;if(null!=e.etag&&!(0,_.sdIsString)(e.etag))throw new v.BoxSdkError({message:'Expecting string for "etag" of type "FileFull"'});const ue=null==e.etag?void 0:e.etag;if(null==e.type)throw new v.BoxSdkError({message:'Expecting "type" of type "FileFull" to be defined'});const pe=(0,i.deserializeFileBaseTypeField)(e.type);return{versionNumber:t,commentCount:r,permissions:d,tags:c,lock:p,extension:h,isPackage:f,expiringEmbedLink:m,watermarkInfo:y,isAccessibleViaSharedLink:k,allowedInviteeRoles:E,isExternallyOwned:B,hasCollaborations:C,metadata:I,expiresAt:A,representations:F,classification:D,uploaderDisplayName:R,dispositionAt:P,sharedLinkPermissionOptions:z,isAssociatedWithAppItem:q,description:L,size:H,pathCollection:$,createdAt:G,modifiedAt:W,trashedAt:K,purgedAt:V,contentCreatedAt:J,contentModifiedAt:Y,createdBy:Q,modifiedBy:Z,ownedBy:X,sharedLink:ee,parent:te,itemStatus:ie,sequenceId:oe,name:ae,sha1:le,fileVersion:de,id:ce,etag:ue,type:pe}};const i=r(39455),n=r(95053),o=r(46022),s=r(46022),a=r(70343),l=r(46022),d=r(46022),c=r(95408),u=r(95408),p=r(77733),h=r(77733),f=r(70376),m=r(93845),g=r(93845),y=r(46022),v=r(72631),b=r(50793),w=r(50793),_=r(50793),x=r(50793),S=r(50793);class k extends y.File{constructor(e){super(e)}}function E(e){return{can_delete:e.canDelete,can_download:e.canDownload,can_invite_collaborator:e.canInviteCollaborator,can_rename:e.canRename,can_set_share_access:e.canSetShareAccess,can_share:e.canShare,can_annotate:e.canAnnotate,can_comment:e.canComment,can_preview:e.canPreview,can_upload:e.canUpload,can_view_annotations_all:e.canViewAnnotationsAll,can_view_annotations_self:e.canViewAnnotationsSelf}}function T(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullPermissionsField"'});if(null==e.can_delete)throw new v.BoxSdkError({message:'Expecting "can_delete" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_delete))throw new v.BoxSdkError({message:'Expecting boolean for "can_delete" of type "FileFullPermissionsField"'});const t=e.can_delete;if(null==e.can_download)throw new v.BoxSdkError({message:'Expecting "can_download" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_download))throw new v.BoxSdkError({message:'Expecting boolean for "can_download" of type "FileFullPermissionsField"'});const r=e.can_download;if(null==e.can_invite_collaborator)throw new v.BoxSdkError({message:'Expecting "can_invite_collaborator" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_invite_collaborator))throw new v.BoxSdkError({message:'Expecting boolean for "can_invite_collaborator" of type "FileFullPermissionsField"'});const i=e.can_invite_collaborator;if(null==e.can_rename)throw new v.BoxSdkError({message:'Expecting "can_rename" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_rename))throw new v.BoxSdkError({message:'Expecting boolean for "can_rename" of type "FileFullPermissionsField"'});const n=e.can_rename;if(null==e.can_set_share_access)throw new v.BoxSdkError({message:'Expecting "can_set_share_access" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_set_share_access))throw new v.BoxSdkError({message:'Expecting boolean for "can_set_share_access" of type "FileFullPermissionsField"'});const o=e.can_set_share_access;if(null==e.can_share)throw new v.BoxSdkError({message:'Expecting "can_share" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_share))throw new v.BoxSdkError({message:'Expecting boolean for "can_share" of type "FileFullPermissionsField"'});const s=e.can_share;if(null==e.can_annotate)throw new v.BoxSdkError({message:'Expecting "can_annotate" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_annotate))throw new v.BoxSdkError({message:'Expecting boolean for "can_annotate" of type "FileFullPermissionsField"'});const a=e.can_annotate;if(null==e.can_comment)throw new v.BoxSdkError({message:'Expecting "can_comment" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_comment))throw new v.BoxSdkError({message:'Expecting boolean for "can_comment" of type "FileFullPermissionsField"'});const l=e.can_comment;if(null==e.can_preview)throw new v.BoxSdkError({message:'Expecting "can_preview" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_preview))throw new v.BoxSdkError({message:'Expecting boolean for "can_preview" of type "FileFullPermissionsField"'});const d=e.can_preview;if(null==e.can_upload)throw new v.BoxSdkError({message:'Expecting "can_upload" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_upload))throw new v.BoxSdkError({message:'Expecting boolean for "can_upload" of type "FileFullPermissionsField"'});const c=e.can_upload;if(null==e.can_view_annotations_all)throw new v.BoxSdkError({message:'Expecting "can_view_annotations_all" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_view_annotations_all))throw new v.BoxSdkError({message:'Expecting boolean for "can_view_annotations_all" of type "FileFullPermissionsField"'});const u=e.can_view_annotations_all;if(null==e.can_view_annotations_self)throw new v.BoxSdkError({message:'Expecting "can_view_annotations_self" of type "FileFullPermissionsField" to be defined'});if(!(0,b.sdIsBoolean)(e.can_view_annotations_self))throw new v.BoxSdkError({message:'Expecting boolean for "can_view_annotations_self" of type "FileFullPermissionsField"'});return{canDelete:t,canDownload:r,canInviteCollaborator:i,canRename:n,canSetShareAccess:o,canShare:s,canAnnotate:a,canComment:l,canPreview:d,canUpload:c,canViewAnnotationsAll:u,canViewAnnotationsSelf:e.can_view_annotations_self}}function B(e){return e}function C(e){if("lock"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullLockTypeField"})}function I(e){return e}function A(e){if("gsuite"==e)return e;if("office_wopi"==e)return e;if("office_wopiplus"==e)return e;if("other"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullLockAppTypeField"})}function F(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,created_by:null==e.createdBy?void 0:(0,c.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,m.serializeDateTime)(e.createdAt),expired_at:null==e.expiredAt?void 0:(0,m.serializeDateTime)(e.expiredAt),is_download_prevented:null==e.isDownloadPrevented?void 0:e.isDownloadPrevented,app_type:null==e.appType?void 0:e.appType}}function M(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullLockField"'});if(null!=e.id&&!(0,_.sdIsString)(e.id))throw new v.BoxSdkError({message:'Expecting string for "id" of type "FileFullLockField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:C(e.type),i=null==e.created_by?void 0:(0,u.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,_.sdIsString)(e.created_at))throw new v.BoxSdkError({message:'Expecting string for "created_at" of type "FileFullLockField"'});const n=null==e.created_at?void 0:(0,g.deserializeDateTime)(e.created_at);if(null!=e.expired_at&&!(0,_.sdIsString)(e.expired_at))throw new v.BoxSdkError({message:'Expecting string for "expired_at" of type "FileFullLockField"'});const o=null==e.expired_at?void 0:(0,g.deserializeDateTime)(e.expired_at);if(null!=e.is_download_prevented&&!(0,b.sdIsBoolean)(e.is_download_prevented))throw new v.BoxSdkError({message:'Expecting boolean for "is_download_prevented" of type "FileFullLockField"'});return{id:t,type:r,createdBy:i,createdAt:n,expiredAt:o,isDownloadPrevented:null==e.is_download_prevented?void 0:e.is_download_prevented,appType:null==e.app_type?void 0:A(e.app_type)}}function D(e){return e}function R(e){if("bearer"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullExpiringEmbedLinkTokenTypeField"})}function P(e){return{access_token:null==e.accessToken?void 0:e.accessToken,expires_in:null==e.expiresIn?void 0:e.expiresIn,token_type:null==e.tokenType?void 0:e.tokenType,restricted_to:null==e.restrictedTo?void 0:e.restrictedTo.map((function(e){return(0,p.serializeFileOrFolderScope)(e)})),url:null==e.url?void 0:e.url}}function O(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullExpiringEmbedLinkField"'});if(null!=e.access_token&&!(0,_.sdIsString)(e.access_token))throw new v.BoxSdkError({message:'Expecting string for "access_token" of type "FileFullExpiringEmbedLinkField"'});const t=null==e.access_token?void 0:e.access_token;if(null!=e.expires_in&&!(0,w.sdIsNumber)(e.expires_in))throw new v.BoxSdkError({message:'Expecting number for "expires_in" of type "FileFullExpiringEmbedLinkField"'});const r=null==e.expires_in?void 0:e.expires_in,i=null==e.token_type?void 0:R(e.token_type);if(null!=e.restricted_to&&!(0,x.sdIsList)(e.restricted_to))throw new v.BoxSdkError({message:'Expecting array for "restricted_to" of type "FileFullExpiringEmbedLinkField"'});const n=null==e.restricted_to?void 0:(0,x.sdIsList)(e.restricted_to)?e.restricted_to.map((function(e){return(0,h.deserializeFileOrFolderScope)(e)})):[];if(null!=e.url&&!(0,_.sdIsString)(e.url))throw new v.BoxSdkError({message:'Expecting string for "url" of type "FileFullExpiringEmbedLinkField"'});return{accessToken:t,expiresIn:r,tokenType:i,restrictedTo:n,url:null==e.url?void 0:e.url}}function z(e){return{is_watermarked:null==e.isWatermarked?void 0:e.isWatermarked}}function N(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullWatermarkInfoField"'});if(null!=e.is_watermarked&&!(0,b.sdIsBoolean)(e.is_watermarked))throw new v.BoxSdkError({message:'Expecting boolean for "is_watermarked" of type "FileFullWatermarkInfoField"'});return{isWatermarked:null==e.is_watermarked?void 0:e.is_watermarked}}function q(e){return e}function U(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullAllowedInviteeRolesField"})}function L(e){return Object.assign({},e.extraData)}function j(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullMetadataField"'});if(null!=e&&!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting object for "extraData" of type "FileFullMetadataField"'});return{extraData:null==e?void 0:(0,S.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,function(e){return(0,S.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,f.deserializeMetadataFull)(t)]))):{}}(t)]))):{}}}function H(e){return{url_template:null==e.urlTemplate?void 0:e.urlTemplate}}function $(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsEntriesContentField"'});if(null!=e.url_template&&!(0,_.sdIsString)(e.url_template))throw new v.BoxSdkError({message:'Expecting string for "url_template" of type "FileFullRepresentationsEntriesContentField"'});return{urlTemplate:null==e.url_template?void 0:e.url_template}}function G(e){return{url:null==e.url?void 0:e.url}}function W(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsEntriesInfoField"'});if(null!=e.url&&!(0,_.sdIsString)(e.url))throw new v.BoxSdkError({message:'Expecting string for "url" of type "FileFullRepresentationsEntriesInfoField"'});return{url:null==e.url?void 0:e.url}}function K(e){return{dimensions:null==e.dimensions?void 0:e.dimensions,paged:null==e.paged?void 0:e.paged,thumb:null==e.thumb?void 0:e.thumb}}function V(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsEntriesPropertiesField"'});if(null!=e.dimensions&&!(0,_.sdIsString)(e.dimensions))throw new v.BoxSdkError({message:'Expecting string for "dimensions" of type "FileFullRepresentationsEntriesPropertiesField"'});const t=null==e.dimensions?void 0:e.dimensions;if(null!=e.paged&&!(0,b.sdIsBoolean)(e.paged))throw new v.BoxSdkError({message:'Expecting boolean for "paged" of type "FileFullRepresentationsEntriesPropertiesField"'});const r=null==e.paged?void 0:e.paged;if(null!=e.thumb&&!(0,b.sdIsBoolean)(e.thumb))throw new v.BoxSdkError({message:'Expecting boolean for "thumb" of type "FileFullRepresentationsEntriesPropertiesField"'});return{dimensions:t,paged:r,thumb:null==e.thumb?void 0:e.thumb}}function J(e){return e}function Y(e){if("success"==e)return e;if("viewable"==e)return e;if("pending"==e)return e;if("none"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullRepresentationsEntriesStatusStateField"})}function Q(e){return{state:null==e.state?void 0:e.state}}function Z(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsEntriesStatusField"'});return{state:null==e.state?void 0:Y(e.state)}}function X(e){return{content:null==e.content?void 0:H(e.content),info:null==e.info?void 0:G(e.info),properties:null==e.properties?void 0:K(e.properties),representation:null==e.representation?void 0:e.representation,status:null==e.status?void 0:Q(e.status)}}function ee(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsEntriesField"'});const t=null==e.content?void 0:$(e.content),r=null==e.info?void 0:W(e.info),i=null==e.properties?void 0:V(e.properties);if(null!=e.representation&&!(0,_.sdIsString)(e.representation))throw new v.BoxSdkError({message:'Expecting string for "representation" of type "FileFullRepresentationsEntriesField"'});return{content:t,info:r,properties:i,representation:null==e.representation?void 0:e.representation,status:null==e.status?void 0:Z(e.status)}}function te(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return X(e)}))}}function re(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullRepresentationsField"'});if(null!=e.entries&&!(0,x.sdIsList)(e.entries))throw new v.BoxSdkError({message:'Expecting array for "entries" of type "FileFullRepresentationsField"'});return{entries:null==e.entries?void 0:(0,x.sdIsList)(e.entries)?e.entries.map((function(e){return ee(e)})):[]}}function ie(e){return{name:null==e.name?void 0:e.name,definition:null==e.definition?void 0:e.definition,color:null==e.color?void 0:e.color}}function ne(e){if(!(0,S.sdIsMap)(e))throw new v.BoxSdkError({message:'Expecting a map for "FileFullClassificationField"'});if(null!=e.name&&!(0,_.sdIsString)(e.name))throw new v.BoxSdkError({message:'Expecting string for "name" of type "FileFullClassificationField"'});const t=null==e.name?void 0:e.name;if(null!=e.definition&&!(0,_.sdIsString)(e.definition))throw new v.BoxSdkError({message:'Expecting string for "definition" of type "FileFullClassificationField"'});const r=null==e.definition?void 0:e.definition;if(null!=e.color&&!(0,_.sdIsString)(e.color))throw new v.BoxSdkError({message:'Expecting string for "color" of type "FileFullClassificationField"'});return{name:t,definition:r,color:null==e.color?void 0:e.color}}function oe(e){return e}function se(e){if("can_preview"==e)return e;if("can_download"==e)return e;if("can_edit"==e)return e;throw new v.BoxSdkError({message:"Can't deserialize FileFullSharedLinkPermissionOptionsField"})}t.FileFull=k},19291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileFullOrFolderFull=function(e){if("file"==e.type)return(0,i.serializeFileFull)(e);if("folder"==e.type)return(0,o.serializeFolderFull)(e);throw new a.BoxSdkError({message:"unknown type"})},t.deserializeFileFullOrFolderFull=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "FileFullOrFolderFull"'});if("file"==e.type)return(0,n.deserializeFileFull)(e);if("folder"==e.type)return(0,s.deserializeFolderFull)(e);throw new a.BoxSdkError({message:"Can't deserialize FileFullOrFolderFull"})};const i=r(49579),n=r(49579),o=r(34537),s=r(34537),a=r(72631),l=r(50793)},58820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileFullOrFolderFullOrWebLink=function(e){if("file"==e.type)return(0,i.serializeFileFull)(e);if("folder"==e.type)return(0,o.serializeFolderFull)(e);if("web_link"==e.type)return(0,a.serializeWebLink)(e);throw new d.BoxSdkError({message:"unknown type"})},t.deserializeFileFullOrFolderFullOrWebLink=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileFullOrFolderFullOrWebLink"'});if("file"==e.type)return(0,n.deserializeFileFull)(e);if("folder"==e.type)return(0,s.deserializeFolderFull)(e);if("web_link"==e.type)return(0,l.deserializeWebLink)(e);throw new d.BoxSdkError({message:"Can't deserialize FileFullOrFolderFullOrWebLink"})};const i=r(49579),n=r(49579),o=r(34537),s=r(34537),a=r(60238),l=r(60238),d=r(72631),c=r(50793)},36374:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileFullOrFolderMiniOrWebLink=function(e){if("file"==e.type)return(0,i.serializeFileFull)(e);if("folder"==e.type)return(0,o.serializeFolderMini)(e);if("web_link"==e.type)return(0,a.serializeWebLink)(e);throw new d.BoxSdkError({message:"unknown type"})},t.deserializeFileFullOrFolderMiniOrWebLink=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileFullOrFolderMiniOrWebLink"'});if("file"==e.type)return(0,n.deserializeFileFull)(e);if("folder"==e.type)return(0,s.deserializeFolderMini)(e);if("web_link"==e.type)return(0,l.deserializeWebLink)(e);throw new d.BoxSdkError({message:"Can't deserialize FileFullOrFolderMiniOrWebLink"})};const i=r(49579),n=r(49579),o=r(70343),s=r(70343),a=r(60238),l=r(60238),d=r(72631),c=r(50793)},62929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMini=void 0,t.serializeFileMini=function(e){const t=(0,n.serializeFileBase)(e);if(!(0,c.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "FileMini"'});return Object.assign(Object.assign({},t),{sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:null==e.name?void 0:e.name,sha1:null==e.sha1?void 0:e.sha1,file_version:null==e.fileVersion?void 0:(0,o.serializeFileVersionMini)(e.fileVersion)})},t.deserializeFileMini=function(e){if(!(0,c.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "FileMini"'});if(null!=e.sequence_id&&!(0,d.sdIsString)(e.sequence_id))throw new l.BoxSdkError({message:'Expecting string for "sequence_id" of type "FileMini"'});const t=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,d.sdIsString)(e.name))throw new l.BoxSdkError({message:'Expecting string for "name" of type "FileMini"'});const r=null==e.name?void 0:e.name;if(null!=e.sha1&&!(0,d.sdIsString)(e.sha1))throw new l.BoxSdkError({message:'Expecting string for "sha1" of type "FileMini"'});const n=null==e.sha1?void 0:e.sha1,o=null==e.file_version?void 0:(0,s.deserializeFileVersionMini)(e.file_version);if(null==e.id)throw new l.BoxSdkError({message:'Expecting "id" of type "FileMini" to be defined'});if(!(0,d.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "FileMini"'});const a=e.id;if(null!=e.etag&&!(0,d.sdIsString)(e.etag))throw new l.BoxSdkError({message:'Expecting string for "etag" of type "FileMini"'});const u=null==e.etag?void 0:e.etag;if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "FileMini" to be defined'});const p=(0,i.deserializeFileBaseTypeField)(e.type);return{sequenceId:t,name:r,sha1:n,fileVersion:o,id:a,etag:u,type:p}};const i=r(39455),n=r(39455),o=r(95053),s=r(95053),a=r(39455),l=r(72631),d=r(50793),c=r(50793);class u extends a.FileBase{constructor(e){super(e)}}t.FileMini=u},71503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileMiniOrFolderMini=function(e){if("file"==e.type)return(0,i.serializeFileMini)(e);if("folder"==e.type)return(0,o.serializeFolderMini)(e);throw new a.BoxSdkError({message:"unknown type"})},t.deserializeFileMiniOrFolderMini=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "FileMiniOrFolderMini"'});if("file"==e.type)return(0,n.deserializeFileMini)(e);if("folder"==e.type)return(0,s.deserializeFolderMini)(e);throw new a.BoxSdkError({message:"Can't deserialize FileMiniOrFolderMini"})};const i=r(62929),n=r(62929),o=r(70343),s=r(70343),a=r(72631),l=r(50793)},94132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileOrFolderOrWebLink=function(e){if("file"==e.type)return(0,i.serializeFile)(e);if("folder"==e.type)return(0,o.serializeFolder)(e);if("web_link"==e.type)return(0,a.serializeWebLink)(e);throw new d.BoxSdkError({message:"unknown type"})},t.deserializeFileOrFolderOrWebLink=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileOrFolderOrWebLink"'});if("file"==e.type)return(0,n.deserializeFile)(e);if("folder"==e.type)return(0,s.deserializeFolder)(e);if("web_link"==e.type)return(0,l.deserializeWebLink)(e);throw new d.BoxSdkError({message:"Can't deserialize FileOrFolderOrWebLink"})};const i=r(46022),n=r(46022),o=r(18272),s=r(18272),a=r(60238),l=r(60238),d=r(72631),c=r(50793)},77733:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileOrFolderScopeScopeField=a,t.deserializeFileOrFolderScopeScopeField=l,t.serializeFileOrFolderScope=function(e){return{scope:null==e.scope?void 0:e.scope,object:null==e.object?void 0:(0,i.serializeFileMiniOrFolderMini)(e.object)}},t.deserializeFileOrFolderScope=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileOrFolderScope"'});const t=null==e.scope?void 0:l(e.scope),r=null==e.object?void 0:(0,n.deserializeFileMiniOrFolderMini)(e.object);return{scope:t,object:r}};const i=r(71503),n=r(71503),o=r(72631),s=r(50793);function a(e){return e}function l(e){if("annotation_edit"==e)return e;if("annotation_view_all"==e)return e;if("annotation_view_self"==e)return e;if("base_explorer"==e)return e;if("base_picker"==e)return e;if("base_preview"==e)return e;if("base_upload"==e)return e;if("item_delete"==e)return e;if("item_download"==e)return e;if("item_preview"==e)return e;if("item_rename"==e)return e;if("item_share"==e)return e;if("item_upload"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize FileOrFolderScopeScopeField"})}},58575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileRequest=void 0,t.serializeFileRequestTypeField=h,t.deserializeFileRequestTypeField=f,t.serializeFileRequestStatusField=m,t.deserializeFileRequestStatusField=g,t.serializeFileRequest=function(e){return{id:e.id,type:e.type,title:null==e.title?void 0:e.title,description:null==e.description?void 0:e.description,status:null==e.status?void 0:e.status,is_email_required:null==e.isEmailRequired?void 0:e.isEmailRequired,is_description_required:null==e.isDescriptionRequired?void 0:e.isDescriptionRequired,expires_at:null==e.expiresAt?void 0:(0,a.serializeDateTime)(e.expiresAt),folder:(0,i.serializeFolderMini)(e.folder),url:null==e.url?void 0:e.url,etag:null==e.etag?void 0:e.etag,created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),created_at:(0,a.serializeDateTime)(e.createdAt),updated_by:null==e.updatedBy?void 0:(0,o.serializeUserMini)(e.updatedBy),updated_at:(0,a.serializeDateTime)(e.updatedAt)}},t.deserializeFileRequest=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileRequest"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "FileRequest" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "FileRequest"'});const t=e.id;if(null==e.type)throw new d.BoxSdkError({message:'Expecting "type" of type "FileRequest" to be defined'});const r=f(e.type);if(null!=e.title&&!(0,u.sdIsString)(e.title))throw new d.BoxSdkError({message:'Expecting string for "title" of type "FileRequest"'});const i=null==e.title?void 0:e.title;if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "FileRequest"'});const o=null==e.description?void 0:e.description,a=null==e.status?void 0:g(e.status);if(null!=e.is_email_required&&!(0,c.sdIsBoolean)(e.is_email_required))throw new d.BoxSdkError({message:'Expecting boolean for "is_email_required" of type "FileRequest"'});const h=null==e.is_email_required?void 0:e.is_email_required;if(null!=e.is_description_required&&!(0,c.sdIsBoolean)(e.is_description_required))throw new d.BoxSdkError({message:'Expecting boolean for "is_description_required" of type "FileRequest"'});const m=null==e.is_description_required?void 0:e.is_description_required;if(null!=e.expires_at&&!(0,u.sdIsString)(e.expires_at))throw new d.BoxSdkError({message:'Expecting string for "expires_at" of type "FileRequest"'});const y=null==e.expires_at?void 0:(0,l.deserializeDateTime)(e.expires_at);if(null==e.folder)throw new d.BoxSdkError({message:'Expecting "folder" of type "FileRequest" to be defined'});const v=(0,n.deserializeFolderMini)(e.folder);if(null!=e.url&&!(0,u.sdIsString)(e.url))throw new d.BoxSdkError({message:'Expecting string for "url" of type "FileRequest"'});const b=null==e.url?void 0:e.url;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "FileRequest"'});const w=null==e.etag?void 0:e.etag,_=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null==e.created_at)throw new d.BoxSdkError({message:'Expecting "created_at" of type "FileRequest" to be defined'});if(!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "FileRequest"'});const x=(0,l.deserializeDateTime)(e.created_at),S=null==e.updated_by?void 0:(0,s.deserializeUserMini)(e.updated_by);if(null==e.updated_at)throw new d.BoxSdkError({message:'Expecting "updated_at" of type "FileRequest" to be defined'});if(!(0,u.sdIsString)(e.updated_at))throw new d.BoxSdkError({message:'Expecting string for "updated_at" of type "FileRequest"'});const k=(0,l.deserializeDateTime)(e.updated_at);return{id:t,type:r,title:i,description:o,status:a,isEmailRequired:h,isDescriptionRequired:m,expiresAt:y,folder:v,url:b,etag:w,createdBy:_,createdAt:x,updatedBy:S,updatedAt:k}},t.serializeFileRequestInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,title:null==e.title?void 0:e.title,description:null==e.description?void 0:e.description,status:null==e.status?void 0:e.status,is_email_required:null==e.isEmailRequired?void 0:e.isEmailRequired,is_description_required:null==e.isDescriptionRequired?void 0:e.isDescriptionRequired,expires_at:null==e.expiresAt?void 0:(0,a.serializeDateTime)(e.expiresAt),folder:(0,i.serializeFolderMini)(e.folder),url:null==e.url?void 0:e.url,etag:null==e.etag?void 0:e.etag,created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),created_at:(0,a.serializeDateTime)(e.createdAt),updated_by:null==e.updatedBy?void 0:(0,o.serializeUserMini)(e.updatedBy),updated_at:(0,a.serializeDateTime)(e.updatedAt)}},t.deserializeFileRequestInput=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FileRequestInput"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "FileRequestInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "FileRequestInput"'});const t=e.id,r=null==e.type?void 0:f(e.type);if(null!=e.title&&!(0,u.sdIsString)(e.title))throw new d.BoxSdkError({message:'Expecting string for "title" of type "FileRequestInput"'});const i=null==e.title?void 0:e.title;if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "FileRequestInput"'});const o=null==e.description?void 0:e.description,a=null==e.status?void 0:g(e.status);if(null!=e.is_email_required&&!(0,c.sdIsBoolean)(e.is_email_required))throw new d.BoxSdkError({message:'Expecting boolean for "is_email_required" of type "FileRequestInput"'});const h=null==e.is_email_required?void 0:e.is_email_required;if(null!=e.is_description_required&&!(0,c.sdIsBoolean)(e.is_description_required))throw new d.BoxSdkError({message:'Expecting boolean for "is_description_required" of type "FileRequestInput"'});const m=null==e.is_description_required?void 0:e.is_description_required;if(null!=e.expires_at&&!(0,u.sdIsString)(e.expires_at))throw new d.BoxSdkError({message:'Expecting string for "expires_at" of type "FileRequestInput"'});const y=null==e.expires_at?void 0:(0,l.deserializeDateTime)(e.expires_at);if(null==e.folder)throw new d.BoxSdkError({message:'Expecting "folder" of type "FileRequestInput" to be defined'});const v=(0,n.deserializeFolderMini)(e.folder);if(null!=e.url&&!(0,u.sdIsString)(e.url))throw new d.BoxSdkError({message:'Expecting string for "url" of type "FileRequestInput"'});const b=null==e.url?void 0:e.url;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "FileRequestInput"'});const w=null==e.etag?void 0:e.etag,_=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null==e.created_at)throw new d.BoxSdkError({message:'Expecting "created_at" of type "FileRequestInput" to be defined'});if(!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "FileRequestInput"'});const x=(0,l.deserializeDateTime)(e.created_at),S=null==e.updated_by?void 0:(0,s.deserializeUserMini)(e.updated_by);if(null==e.updated_at)throw new d.BoxSdkError({message:'Expecting "updated_at" of type "FileRequestInput" to be defined'});if(!(0,u.sdIsString)(e.updated_at))throw new d.BoxSdkError({message:'Expecting string for "updated_at" of type "FileRequestInput"'});const k=(0,l.deserializeDateTime)(e.updated_at);return{id:t,type:r,title:i,description:o,status:a,isEmailRequired:h,isDescriptionRequired:m,expiresAt:y,folder:v,url:b,etag:w,createdBy:_,createdAt:x,updatedBy:S,updatedAt:k}};const i=r(70343),n=r(70343),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793);function h(e){return e}function f(e){if("file_request"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize FileRequestTypeField"})}function m(e){return e}function g(e){if("active"==e)return e;if("inactive"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize FileRequestStatusField"})}t.FileRequest=class{constructor(e){this.type="file_request",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.title&&(this.title=e.title),e.description&&(this.description=e.description),e.status&&(this.status=e.status),e.isEmailRequired&&(this.isEmailRequired=e.isEmailRequired),e.isDescriptionRequired&&(this.isDescriptionRequired=e.isDescriptionRequired),e.expiresAt&&(this.expiresAt=e.expiresAt),e.folder&&(this.folder=e.folder),e.url&&(this.url=e.url),e.etag&&(this.etag=e.etag),e.createdBy&&(this.createdBy=e.createdBy),e.createdAt&&(this.createdAt=e.createdAt),e.updatedBy&&(this.updatedBy=e.updatedBy),e.updatedAt&&(this.updatedAt=e.updatedAt),e.rawData&&(this.rawData=e.rawData)}}},31419:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileRequestCopyRequestFolderTypeField=c,t.deserializeFileRequestCopyRequestFolderTypeField=u,t.serializeFileRequestCopyRequestFolderField=p,t.deserializeFileRequestCopyRequestFolderField=h,t.serializeFileRequestCopyRequest=function(e){const t=(0,o.serializeFileRequestUpdateRequest)(e);if(!(0,d.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "FileRequestCopyRequest"'});return Object.assign(Object.assign({},t),{folder:p(e.folder)})},t.deserializeFileRequestCopyRequest=function(e){if(!(0,d.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "FileRequestCopyRequest"'});if(null==e.folder)throw new s.BoxSdkError({message:'Expecting "folder" of type "FileRequestCopyRequest" to be defined'});const t=h(e.folder);if(null!=e.title&&!(0,l.sdIsString)(e.title))throw new s.BoxSdkError({message:'Expecting string for "title" of type "FileRequestCopyRequest"'});const r=null==e.title?void 0:e.title;if(null!=e.description&&!(0,l.sdIsString)(e.description))throw new s.BoxSdkError({message:'Expecting string for "description" of type "FileRequestCopyRequest"'});const o=null==e.description?void 0:e.description,c=null==e.status?void 0:(0,i.deserializeFileRequestUpdateRequestStatusField)(e.status);if(null!=e.is_email_required&&!(0,a.sdIsBoolean)(e.is_email_required))throw new s.BoxSdkError({message:'Expecting boolean for "is_email_required" of type "FileRequestCopyRequest"'});const u=null==e.is_email_required?void 0:e.is_email_required;if(null!=e.is_description_required&&!(0,a.sdIsBoolean)(e.is_description_required))throw new s.BoxSdkError({message:'Expecting boolean for "is_description_required" of type "FileRequestCopyRequest"'});const p=null==e.is_description_required?void 0:e.is_description_required;if(null!=e.expires_at&&!(0,l.sdIsString)(e.expires_at))throw new s.BoxSdkError({message:'Expecting string for "expires_at" of type "FileRequestCopyRequest"'});const f=null==e.expires_at?void 0:(0,n.deserializeDateTime)(e.expires_at);return{folder:t,title:r,description:o,status:c,isEmailRequired:u,isDescriptionRequired:p,expiresAt:f}};const i=r(24387),n=r(93845),o=r(24387),s=r(72631),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("folder"==e)return e;throw new s.BoxSdkError({message:"Can't deserialize FileRequestCopyRequestFolderTypeField"})}function p(e){return{type:null==e.type?void 0:e.type,id:e.id}}function h(e){if(!(0,d.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "FileRequestCopyRequestFolderField"'});const t=null==e.type?void 0:u(e.type);if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "FileRequestCopyRequestFolderField" to be defined'});if(!(0,l.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "FileRequestCopyRequestFolderField"'});return{type:t,id:e.id}}},24387:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileRequestUpdateRequestStatusField=d,t.deserializeFileRequestUpdateRequestStatusField=c,t.serializeFileRequestUpdateRequest=function(e){return{title:null==e.title?void 0:e.title,description:null==e.description?void 0:e.description,status:null==e.status?void 0:e.status,is_email_required:null==e.isEmailRequired?void 0:e.isEmailRequired,is_description_required:null==e.isDescriptionRequired?void 0:e.isDescriptionRequired,expires_at:null==e.expiresAt?void 0:(0,i.serializeDateTime)(e.expiresAt)}},t.deserializeFileRequestUpdateRequest=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileRequestUpdateRequest"'});if(null!=e.title&&!(0,a.sdIsString)(e.title))throw new o.BoxSdkError({message:'Expecting string for "title" of type "FileRequestUpdateRequest"'});const t=null==e.title?void 0:e.title;if(null!=e.description&&!(0,a.sdIsString)(e.description))throw new o.BoxSdkError({message:'Expecting string for "description" of type "FileRequestUpdateRequest"'});const r=null==e.description?void 0:e.description,i=null==e.status?void 0:c(e.status);if(null!=e.is_email_required&&!(0,s.sdIsBoolean)(e.is_email_required))throw new o.BoxSdkError({message:'Expecting boolean for "is_email_required" of type "FileRequestUpdateRequest"'});const d=null==e.is_email_required?void 0:e.is_email_required;if(null!=e.is_description_required&&!(0,s.sdIsBoolean)(e.is_description_required))throw new o.BoxSdkError({message:'Expecting boolean for "is_description_required" of type "FileRequestUpdateRequest"'});const u=null==e.is_description_required?void 0:e.is_description_required;if(null!=e.expires_at&&!(0,a.sdIsString)(e.expires_at))throw new o.BoxSdkError({message:'Expecting string for "expires_at" of type "FileRequestUpdateRequest"'});const p=null==e.expires_at?void 0:(0,n.deserializeDateTime)(e.expires_at);return{title:t,description:r,status:i,isEmailRequired:d,isDescriptionRequired:u,expiresAt:p}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("active"==e)return e;if("inactive"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize FileRequestUpdateRequestStatusField"})}},40354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersion=void 0,t.serializeFileVersion=function(e){const t=(0,n.serializeFileVersionMini)(e);if(!(0,h.sdIsMap)(t))throw new c.BoxSdkError({message:'Expecting a map for "FileVersion"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name,size:null==e.size?void 0:e.size,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),modified_by:null==e.modifiedBy?void 0:(0,o.serializeUserMini)(e.modifiedBy),trashed_at:null==e.trashedAt?void 0:(0,a.serializeDateTime)(e.trashedAt),trashed_by:null==e.trashedBy?void 0:(0,o.serializeUserMini)(e.trashedBy),restored_at:null==e.restoredAt?void 0:(0,a.serializeDateTime)(e.restoredAt),restored_by:null==e.restoredBy?void 0:(0,o.serializeUserMini)(e.restoredBy),purged_at:null==e.purgedAt?void 0:(0,a.serializeDateTime)(e.purgedAt),uploader_display_name:null==e.uploaderDisplayName?void 0:e.uploaderDisplayName})},t.deserializeFileVersion=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "FileVersion"'});if(null!=e.name&&!(0,p.sdIsString)(e.name))throw new c.BoxSdkError({message:'Expecting string for "name" of type "FileVersion"'});const t=null==e.name?void 0:e.name;if(null!=e.size&&!(0,u.sdIsNumber)(e.size))throw new c.BoxSdkError({message:'Expecting number for "size" of type "FileVersion"'});const r=null==e.size?void 0:e.size;if(null!=e.created_at&&!(0,p.sdIsString)(e.created_at))throw new c.BoxSdkError({message:'Expecting string for "created_at" of type "FileVersion"'});const n=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,p.sdIsString)(e.modified_at))throw new c.BoxSdkError({message:'Expecting string for "modified_at" of type "FileVersion"'});const o=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at),a=null==e.modified_by?void 0:(0,s.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,p.sdIsString)(e.trashed_at))throw new c.BoxSdkError({message:'Expecting string for "trashed_at" of type "FileVersion"'});const d=null==e.trashed_at?void 0:(0,l.deserializeDateTime)(e.trashed_at),f=null==e.trashed_by?void 0:(0,s.deserializeUserMini)(e.trashed_by);if(null!=e.restored_at&&!(0,p.sdIsString)(e.restored_at))throw new c.BoxSdkError({message:'Expecting string for "restored_at" of type "FileVersion"'});const m=null==e.restored_at?void 0:(0,l.deserializeDateTime)(e.restored_at),g=null==e.restored_by?void 0:(0,s.deserializeUserMini)(e.restored_by);if(null!=e.purged_at&&!(0,p.sdIsString)(e.purged_at))throw new c.BoxSdkError({message:'Expecting string for "purged_at" of type "FileVersion"'});const y=null==e.purged_at?void 0:(0,l.deserializeDateTime)(e.purged_at);if(null!=e.uploader_display_name&&!(0,p.sdIsString)(e.uploader_display_name))throw new c.BoxSdkError({message:'Expecting string for "uploader_display_name" of type "FileVersion"'});const v=null==e.uploader_display_name?void 0:e.uploader_display_name;if(null!=e.sha1&&!(0,p.sdIsString)(e.sha1))throw new c.BoxSdkError({message:'Expecting string for "sha1" of type "FileVersion"'});const b=null==e.sha1?void 0:e.sha1;if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "FileVersion" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "FileVersion"'});const w=e.id;if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "FileVersion" to be defined'});const _=(0,i.deserializeFileVersionBaseTypeField)(e.type);return{name:t,size:r,createdAt:n,modifiedAt:o,modifiedBy:a,trashedAt:d,trashedBy:f,restoredAt:m,restoredBy:g,purgedAt:y,uploaderDisplayName:v,sha1:b,id:w,type:_}};const i=r(28899),n=r(95053),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(95053),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f extends d.FileVersionMini{constructor(e){super(e)}}t.FileVersion=f},28899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionBase=void 0,t.serializeFileVersionBaseTypeField=s,t.deserializeFileVersionBaseTypeField=a,t.serializeFileVersionBase=function(e){return{id:e.id,type:e.type}},t.deserializeFileVersionBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FileVersionBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FileVersionBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FileVersionBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "FileVersionBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeFileVersionBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeFileVersionBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FileVersionBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FileVersionBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FileVersionBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("file_version"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize FileVersionBaseTypeField"})}t.FileVersionBase=class{constructor(e){this.type="file_version",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},44215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionFull=void 0,t.serializeFileVersionFull=function(e){const t=(0,s.serializeFileVersion)(e);if(!(0,u.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "FileVersionFull"'});return Object.assign(Object.assign({},t),{version_number:null==e.versionNumber?void 0:e.versionNumber})},t.deserializeFileVersionFull=function(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "FileVersionFull"'});if(null!=e.version_number&&!(0,c.sdIsString)(e.version_number))throw new l.BoxSdkError({message:'Expecting string for "version_number" of type "FileVersionFull"'});const t=null==e.version_number?void 0:e.version_number;if(null!=e.name&&!(0,c.sdIsString)(e.name))throw new l.BoxSdkError({message:'Expecting string for "name" of type "FileVersionFull"'});const r=null==e.name?void 0:e.name;if(null!=e.size&&!(0,d.sdIsNumber)(e.size))throw new l.BoxSdkError({message:'Expecting number for "size" of type "FileVersionFull"'});const s=null==e.size?void 0:e.size;if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new l.BoxSdkError({message:'Expecting string for "created_at" of type "FileVersionFull"'});const a=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,c.sdIsString)(e.modified_at))throw new l.BoxSdkError({message:'Expecting string for "modified_at" of type "FileVersionFull"'});const p=null==e.modified_at?void 0:(0,n.deserializeDateTime)(e.modified_at),h=null==e.modified_by?void 0:(0,o.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,c.sdIsString)(e.trashed_at))throw new l.BoxSdkError({message:'Expecting string for "trashed_at" of type "FileVersionFull"'});const f=null==e.trashed_at?void 0:(0,n.deserializeDateTime)(e.trashed_at),m=null==e.trashed_by?void 0:(0,o.deserializeUserMini)(e.trashed_by);if(null!=e.restored_at&&!(0,c.sdIsString)(e.restored_at))throw new l.BoxSdkError({message:'Expecting string for "restored_at" of type "FileVersionFull"'});const g=null==e.restored_at?void 0:(0,n.deserializeDateTime)(e.restored_at),y=null==e.restored_by?void 0:(0,o.deserializeUserMini)(e.restored_by);if(null!=e.purged_at&&!(0,c.sdIsString)(e.purged_at))throw new l.BoxSdkError({message:'Expecting string for "purged_at" of type "FileVersionFull"'});const v=null==e.purged_at?void 0:(0,n.deserializeDateTime)(e.purged_at);if(null!=e.uploader_display_name&&!(0,c.sdIsString)(e.uploader_display_name))throw new l.BoxSdkError({message:'Expecting string for "uploader_display_name" of type "FileVersionFull"'});const b=null==e.uploader_display_name?void 0:e.uploader_display_name;if(null!=e.sha1&&!(0,c.sdIsString)(e.sha1))throw new l.BoxSdkError({message:'Expecting string for "sha1" of type "FileVersionFull"'});const w=null==e.sha1?void 0:e.sha1;if(null==e.id)throw new l.BoxSdkError({message:'Expecting "id" of type "FileVersionFull" to be defined'});if(!(0,c.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "FileVersionFull"'});const _=e.id;if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "FileVersionFull" to be defined'});const x=(0,i.deserializeFileVersionBaseTypeField)(e.type);return{versionNumber:t,name:r,size:s,createdAt:a,modifiedAt:p,modifiedBy:h,trashedAt:f,trashedBy:m,restoredAt:g,restoredBy:y,purgedAt:v,uploaderDisplayName:b,sha1:w,id:_,type:x}};const i=r(28899),n=r(93845),o=r(95408),s=r(40354),a=r(40354),l=r(72631),d=r(50793),c=r(50793),u=r(50793);class p extends a.FileVersion{constructor(e){super(e)}}t.FileVersionFull=p},16754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileVersionLegalHoldTypeField=m,t.deserializeFileVersionLegalHoldTypeField=g,t.serializeFileVersionLegalHold=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),file:null==e.file?void 0:(0,o.serializeFileMini)(e.file),legal_hold_policy_assignments:null==e.legalHoldPolicyAssignments?void 0:e.legalHoldPolicyAssignments.map((function(e){return(0,a.serializeLegalHoldPolicyAssignment)(e)})),deleted_at:null==e.deletedAt?void 0:(0,d.serializeDateTime)(e.deletedAt)}},t.deserializeFileVersionLegalHold=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "FileVersionLegalHold"'});if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "FileVersionLegalHold"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:g(e.type),i=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version),o=null==e.file?void 0:(0,s.deserializeFileMini)(e.file);if(null!=e.legal_hold_policy_assignments&&!(0,h.sdIsList)(e.legal_hold_policy_assignments))throw new u.BoxSdkError({message:'Expecting array for "legal_hold_policy_assignments" of type "FileVersionLegalHold"'});const a=null==e.legal_hold_policy_assignments?void 0:(0,h.sdIsList)(e.legal_hold_policy_assignments)?e.legal_hold_policy_assignments.map((function(e){return(0,l.deserializeLegalHoldPolicyAssignment)(e)})):[];if(null!=e.deleted_at&&!(0,p.sdIsString)(e.deleted_at))throw new u.BoxSdkError({message:'Expecting string for "deleted_at" of type "FileVersionLegalHold"'});const d=null==e.deleted_at?void 0:(0,c.deserializeDateTime)(e.deleted_at);return{id:t,type:r,fileVersion:i,file:o,legalHoldPolicyAssignments:a,deletedAt:d}};const i=r(95053),n=r(95053),o=r(62929),s=r(62929),a=r(55047),l=r(55047),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793),f=r(50793);function m(e){return e}function g(e){if("file_version_legal_hold"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize FileVersionLegalHoldTypeField"})}},2031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileVersionLegalHolds=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileVersionLegalHold)(e)}))}},t.deserializeFileVersionLegalHolds=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileVersionLegalHolds"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "FileVersionLegalHolds"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "FileVersionLegalHolds"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "FileVersionLegalHolds"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FileVersionLegalHolds"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileVersionLegalHold)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(16754),n=r(16754),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},95053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileVersionMini=void 0,t.serializeFileVersionMini=function(e){const t=(0,n.serializeFileVersionBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "FileVersionMini"'});return Object.assign(Object.assign({},t),{sha1:null==e.sha1?void 0:e.sha1})},t.deserializeFileVersionMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "FileVersionMini"'});if(null!=e.sha1&&!(0,a.sdIsString)(e.sha1))throw new s.BoxSdkError({message:'Expecting string for "sha1" of type "FileVersionMini"'});const t=null==e.sha1?void 0:e.sha1;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "FileVersionMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "FileVersionMini"'});const r=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "FileVersionMini" to be defined'});const n=(0,i.deserializeFileVersionBaseTypeField)(e.type);return{sha1:t,id:r,type:n}};const i=r(28899),n=r(28899),o=r(28899),s=r(72631),a=r(50793),l=r(50793);class d extends o.FileVersionBase{constructor(e){super(e)}}t.FileVersionMini=d},76804:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileVersionRetentionTypeField=f,t.deserializeFileVersionRetentionTypeField=m,t.serializeFileVersionRetention=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),file:null==e.file?void 0:(0,o.serializeFileMini)(e.file),applied_at:null==e.appliedAt?void 0:(0,d.serializeDateTime)(e.appliedAt),disposition_at:null==e.dispositionAt?void 0:(0,d.serializeDateTime)(e.dispositionAt),winning_retention_policy:null==e.winningRetentionPolicy?void 0:(0,a.serializeRetentionPolicyMini)(e.winningRetentionPolicy)}},t.deserializeFileVersionRetention=function(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "FileVersionRetention"'});if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "FileVersionRetention"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:m(e.type),i=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version),o=null==e.file?void 0:(0,s.deserializeFileMini)(e.file);if(null!=e.applied_at&&!(0,p.sdIsString)(e.applied_at))throw new u.BoxSdkError({message:'Expecting string for "applied_at" of type "FileVersionRetention"'});const a=null==e.applied_at?void 0:(0,c.deserializeDateTime)(e.applied_at);if(null!=e.disposition_at&&!(0,p.sdIsString)(e.disposition_at))throw new u.BoxSdkError({message:'Expecting string for "disposition_at" of type "FileVersionRetention"'});const d=null==e.disposition_at?void 0:(0,c.deserializeDateTime)(e.disposition_at),f=null==e.winning_retention_policy?void 0:(0,l.deserializeRetentionPolicyMini)(e.winning_retention_policy);return{id:t,type:r,fileVersion:i,file:o,appliedAt:a,dispositionAt:d,winningRetentionPolicy:f}};const i=r(95053),n=r(95053),o=r(62929),s=r(62929),a=r(46855),l=r(46855),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("file_version_retention"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize FileVersionRetentionTypeField"})}},1801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileVersionRetentions=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileVersionRetention)(e)}))}},t.deserializeFileVersionRetentions=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileVersionRetentions"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "FileVersionRetentions"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "FileVersionRetentions"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "FileVersionRetentions"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FileVersionRetentions"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileVersionRetention)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(76804),n=r(76804),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},13919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFileVersionsOrderDirectionField=c,t.deserializeFileVersionsOrderDirectionField=u,t.serializeFileVersionsOrderField=p,t.deserializeFileVersionsOrderField=h,t.serializeFileVersions=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileVersionFull)(e)}))}},t.deserializeFileVersions=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileVersions"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "FileVersions"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "FileVersions"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "FileVersions"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "FileVersions"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FileVersions"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileVersionFull)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(44215),n=r(44215),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize FileVersionsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FileVersionsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "FileVersionsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFiles=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileFull)(e)}))}},t.deserializeFiles=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Files"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Files"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Files"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileFull)(e)})):[];return{totalCount:t,entries:r}};const i=r(49579),n=r(49579),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},94983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFilesOnHold=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileMini)(e)}))}},t.deserializeFilesOnHold=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FilesOnHold"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "FilesOnHold"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "FilesOnHold"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "FilesOnHold"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FilesOnHold"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileMini)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(62929),n=r(62929),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},8391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFilesUnderRetention=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileMini)(e)}))}},t.deserializeFilesUnderRetention=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FilesUnderRetention"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "FilesUnderRetention"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "FilesUnderRetention"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "FilesUnderRetention"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FilesUnderRetention"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileMini)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(62929),n=r(62929),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},18272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0,t.serializeFolderPathCollectionField=w,t.deserializeFolderPathCollectionField=_,t.serializeFolderSharedLinkAccessField=x,t.deserializeFolderSharedLinkAccessField=S,t.serializeFolderSharedLinkEffectiveAccessField=k,t.deserializeFolderSharedLinkEffectiveAccessField=E,t.serializeFolderSharedLinkEffectivePermissionField=T,t.deserializeFolderSharedLinkEffectivePermissionField=B,t.serializeFolderSharedLinkPermissionsField=C,t.deserializeFolderSharedLinkPermissionsField=I,t.serializeFolderSharedLinkField=A,t.deserializeFolderSharedLinkField=F,t.serializeFolderFolderUploadEmailAccessField=M,t.deserializeFolderFolderUploadEmailAccessField=D,t.serializeFolderFolderUploadEmailField=R,t.deserializeFolderFolderUploadEmailField=P,t.serializeFolderItemStatusField=O,t.deserializeFolderItemStatusField=z,t.serializeFolder=function(e){const t=(0,n.serializeFolderMini)(e);if(!(0,v.sdIsMap)(t))throw new h.BoxSdkError({message:'Expecting a map for "Folder"'});return Object.assign(Object.assign({},t),{created_at:null==e.createdAt?void 0:(0,c.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,c.serializeDateTime)(e.modifiedAt),description:null==e.description?void 0:e.description,size:null==e.size?void 0:e.size,path_collection:null==e.pathCollection?void 0:w(e.pathCollection),created_by:null==e.createdBy?void 0:(0,s.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,s.serializeUserMini)(e.modifiedBy),trashed_at:null==e.trashedAt?void 0:(0,c.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,c.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,c.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,c.serializeDateTime)(e.contentModifiedAt),owned_by:null==e.ownedBy?void 0:(0,s.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:A(e.sharedLink),folder_upload_email:null==e.folderUploadEmail?void 0:R(e.folderUploadEmail),parent:null==e.parent?void 0:(0,n.serializeFolderMini)(e.parent),item_status:null==e.itemStatus?void 0:e.itemStatus,item_collection:null==e.itemCollection?void 0:(0,l.serializeItems)(e.itemCollection)})},t.deserializeFolder=function(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "Folder"'});if(null!=e.created_at&&!(0,g.sdIsString)(e.created_at))throw new h.BoxSdkError({message:'Expecting string for "created_at" of type "Folder"'});const t=null==e.created_at?void 0:(0,u.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,g.sdIsString)(e.modified_at))throw new h.BoxSdkError({message:'Expecting string for "modified_at" of type "Folder"'});const r=null==e.modified_at?void 0:(0,u.deserializeDateTime)(e.modified_at);if(null!=e.description&&!(0,g.sdIsString)(e.description))throw new h.BoxSdkError({message:'Expecting string for "description" of type "Folder"'});const n=null==e.description?void 0:e.description;if(null!=e.size&&!(0,m.sdIsNumber)(e.size))throw new h.BoxSdkError({message:'Expecting number for "size" of type "Folder"'});const s=null==e.size?void 0:e.size,l=null==e.path_collection?void 0:_(e.path_collection),c=null==e.created_by?void 0:(0,a.deserializeUserMini)(e.created_by),p=null==e.modified_by?void 0:(0,a.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,g.sdIsString)(e.trashed_at))throw new h.BoxSdkError({message:'Expecting string for "trashed_at" of type "Folder"'});const f=null==e.trashed_at?void 0:(0,u.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,g.sdIsString)(e.purged_at))throw new h.BoxSdkError({message:'Expecting string for "purged_at" of type "Folder"'});const y=null==e.purged_at?void 0:(0,u.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,g.sdIsString)(e.content_created_at))throw new h.BoxSdkError({message:'Expecting string for "content_created_at" of type "Folder"'});const b=null==e.content_created_at?void 0:(0,u.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,g.sdIsString)(e.content_modified_at))throw new h.BoxSdkError({message:'Expecting string for "content_modified_at" of type "Folder"'});const w=null==e.content_modified_at?void 0:(0,u.deserializeDateTime)(e.content_modified_at),x=null==e.owned_by?void 0:(0,a.deserializeUserMini)(e.owned_by),S=null==e.shared_link?void 0:F(e.shared_link),k=null==e.folder_upload_email?void 0:P(e.folder_upload_email),E=null==e.parent?void 0:(0,o.deserializeFolderMini)(e.parent),T=null==e.item_status?void 0:z(e.item_status),B=null==e.item_collection?void 0:(0,d.deserializeItems)(e.item_collection);if(null!=e.sequence_id&&!(0,g.sdIsString)(e.sequence_id))throw new h.BoxSdkError({message:'Expecting string for "sequence_id" of type "Folder"'});const C=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,g.sdIsString)(e.name))throw new h.BoxSdkError({message:'Expecting string for "name" of type "Folder"'});const I=null==e.name?void 0:e.name;if(null==e.id)throw new h.BoxSdkError({message:'Expecting "id" of type "Folder" to be defined'});if(!(0,g.sdIsString)(e.id))throw new h.BoxSdkError({message:'Expecting string for "id" of type "Folder"'});const A=e.id;if(null!=e.etag&&!(0,g.sdIsString)(e.etag))throw new h.BoxSdkError({message:'Expecting string for "etag" of type "Folder"'});const M=null==e.etag?void 0:e.etag;if(null==e.type)throw new h.BoxSdkError({message:'Expecting "type" of type "Folder" to be defined'});const D=(0,i.deserializeFolderBaseTypeField)(e.type);return{createdAt:t,modifiedAt:r,description:n,size:s,pathCollection:l,createdBy:c,modifiedBy:p,trashedAt:f,purgedAt:y,contentCreatedAt:b,contentModifiedAt:w,ownedBy:x,sharedLink:S,folderUploadEmail:k,parent:E,itemStatus:T,itemCollection:B,sequenceId:C,name:I,id:A,etag:M,type:D}};const i=r(64145),n=r(70343),o=r(70343),s=r(95408),a=r(95408),l=r(61664),d=r(61664),c=r(93845),u=r(93845),p=r(70343),h=r(72631),f=r(50793),m=r(50793),g=r(50793),y=r(50793),v=r(50793);class b extends p.FolderMini{constructor(e){super(e)}}function w(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,n.serializeFolderMini)(e)}))}}function _(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FolderPathCollectionField"'});if(null==e.total_count)throw new h.BoxSdkError({message:'Expecting "total_count" of type "FolderPathCollectionField" to be defined'});if(!(0,m.sdIsNumber)(e.total_count))throw new h.BoxSdkError({message:'Expecting number for "total_count" of type "FolderPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new h.BoxSdkError({message:'Expecting "entries" of type "FolderPathCollectionField" to be defined'});if(!(0,y.sdIsList)(e.entries))throw new h.BoxSdkError({message:'Expecting array for "entries" of type "FolderPathCollectionField"'});return{totalCount:t,entries:(0,y.sdIsList)(e.entries)?e.entries.map((function(e){return(0,o.deserializeFolderMini)(e)})):[]}}function x(e){return e}function S(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FolderSharedLinkAccessField"})}function k(e){return e}function E(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FolderSharedLinkEffectiveAccessField"})}function T(e){return e}function B(e){if("can_edit"==e)return e;if("can_download"==e)return e;if("can_preview"==e)return e;if("no_access"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FolderSharedLinkEffectivePermissionField"})}function C(e){return{can_download:e.canDownload,can_preview:e.canPreview,can_edit:e.canEdit}}function I(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FolderSharedLinkPermissionsField"'});if(null==e.can_download)throw new h.BoxSdkError({message:'Expecting "can_download" of type "FolderSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_download))throw new h.BoxSdkError({message:'Expecting boolean for "can_download" of type "FolderSharedLinkPermissionsField"'});const t=e.can_download;if(null==e.can_preview)throw new h.BoxSdkError({message:'Expecting "can_preview" of type "FolderSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_preview))throw new h.BoxSdkError({message:'Expecting boolean for "can_preview" of type "FolderSharedLinkPermissionsField"'});const r=e.can_preview;if(null==e.can_edit)throw new h.BoxSdkError({message:'Expecting "can_edit" of type "FolderSharedLinkPermissionsField" to be defined'});if(!(0,f.sdIsBoolean)(e.can_edit))throw new h.BoxSdkError({message:'Expecting boolean for "can_edit" of type "FolderSharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:e.can_edit}}function A(e){return{url:e.url,download_url:null==e.downloadUrl?void 0:e.downloadUrl,vanity_url:null==e.vanityUrl?void 0:e.vanityUrl,vanity_name:null==e.vanityName?void 0:e.vanityName,access:null==e.access?void 0:e.access,effective_access:e.effectiveAccess,effective_permission:e.effectivePermission,unshared_at:null==e.unsharedAt?void 0:(0,c.serializeDateTime)(e.unsharedAt),is_password_enabled:e.isPasswordEnabled,permissions:null==e.permissions?void 0:C(e.permissions),download_count:e.downloadCount,preview_count:e.previewCount}}function F(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FolderSharedLinkField"'});if(null==e.url)throw new h.BoxSdkError({message:'Expecting "url" of type "FolderSharedLinkField" to be defined'});if(!(0,g.sdIsString)(e.url))throw new h.BoxSdkError({message:'Expecting string for "url" of type "FolderSharedLinkField"'});const t=e.url;if(null!=e.download_url&&!(0,g.sdIsString)(e.download_url))throw new h.BoxSdkError({message:'Expecting string for "download_url" of type "FolderSharedLinkField"'});const r=null==e.download_url?void 0:e.download_url;if(null!=e.vanity_url&&!(0,g.sdIsString)(e.vanity_url))throw new h.BoxSdkError({message:'Expecting string for "vanity_url" of type "FolderSharedLinkField"'});const i=null==e.vanity_url?void 0:e.vanity_url;if(null!=e.vanity_name&&!(0,g.sdIsString)(e.vanity_name))throw new h.BoxSdkError({message:'Expecting string for "vanity_name" of type "FolderSharedLinkField"'});const n=null==e.vanity_name?void 0:e.vanity_name,o=null==e.access?void 0:S(e.access);if(null==e.effective_access)throw new h.BoxSdkError({message:'Expecting "effective_access" of type "FolderSharedLinkField" to be defined'});const s=E(e.effective_access);if(null==e.effective_permission)throw new h.BoxSdkError({message:'Expecting "effective_permission" of type "FolderSharedLinkField" to be defined'});const a=B(e.effective_permission);if(null!=e.unshared_at&&!(0,g.sdIsString)(e.unshared_at))throw new h.BoxSdkError({message:'Expecting string for "unshared_at" of type "FolderSharedLinkField"'});const l=null==e.unshared_at?void 0:(0,u.deserializeDateTime)(e.unshared_at);if(null==e.is_password_enabled)throw new h.BoxSdkError({message:'Expecting "is_password_enabled" of type "FolderSharedLinkField" to be defined'});if(!(0,f.sdIsBoolean)(e.is_password_enabled))throw new h.BoxSdkError({message:'Expecting boolean for "is_password_enabled" of type "FolderSharedLinkField"'});const d=e.is_password_enabled,c=null==e.permissions?void 0:I(e.permissions);if(null==e.download_count)throw new h.BoxSdkError({message:'Expecting "download_count" of type "FolderSharedLinkField" to be defined'});if(!(0,m.sdIsNumber)(e.download_count))throw new h.BoxSdkError({message:'Expecting number for "download_count" of type "FolderSharedLinkField"'});const p=e.download_count;if(null==e.preview_count)throw new h.BoxSdkError({message:'Expecting "preview_count" of type "FolderSharedLinkField" to be defined'});if(!(0,m.sdIsNumber)(e.preview_count))throw new h.BoxSdkError({message:'Expecting number for "preview_count" of type "FolderSharedLinkField"'});return{url:t,downloadUrl:r,vanityUrl:i,vanityName:n,access:o,effectiveAccess:s,effectivePermission:a,unsharedAt:l,isPasswordEnabled:d,permissions:c,downloadCount:p,previewCount:e.preview_count}}function M(e){return e}function D(e){if("open"==e)return e;if("collaborators"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FolderFolderUploadEmailAccessField"})}function R(e){return{access:null==e.access?void 0:e.access,email:null==e.email?void 0:e.email}}function P(e){if(!(0,v.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "FolderFolderUploadEmailField"'});const t=null==e.access?void 0:D(e.access);if(null!=e.email&&!(0,g.sdIsString)(e.email))throw new h.BoxSdkError({message:'Expecting string for "email" of type "FolderFolderUploadEmailField"'});return{access:t,email:null==e.email?void 0:e.email}}function O(e){return e}function z(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize FolderItemStatusField"})}t.Folder=b},64145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderBase=void 0,t.serializeFolderBaseTypeField=s,t.deserializeFolderBaseTypeField=a,t.serializeFolderBase=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:e.type}},t.deserializeFolderBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FolderBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FolderBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FolderBase"'});const t=e.id;if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "FolderBase"'});const r=null==e.etag?void 0:e.etag;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "FolderBase" to be defined'});const s=a(e.type);return{id:t,etag:r,type:s}},t.serializeFolderBaseInput=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type}},t.deserializeFolderBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "FolderBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "FolderBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "FolderBaseInput"'});const t=e.id;if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "FolderBaseInput"'});const r=null==e.etag?void 0:e.etag,s=null==e.type?void 0:a(e.type);return{id:t,etag:r,type:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("folder"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize FolderBaseTypeField"})}t.FolderBase=class{constructor(e){this.type="folder",e.id&&(this.id=e.id),e.etag&&(this.etag=e.etag),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},34537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderFull=void 0,t.serializeFolderFullSyncStateField=x,t.deserializeFolderFullSyncStateField=S,t.serializeFolderFullPermissionsField=k,t.deserializeFolderFullPermissionsField=E,t.serializeFolderFullMetadataField=T,t.deserializeFolderFullMetadataField=B,t.serializeFolderFullAllowedSharedLinkAccessLevelsField=C,t.deserializeFolderFullAllowedSharedLinkAccessLevelsField=I,t.serializeFolderFullAllowedInviteeRolesField=A,t.deserializeFolderFullAllowedInviteeRolesField=F,t.serializeFolderFullWatermarkInfoField=M,t.deserializeFolderFullWatermarkInfoField=D,t.serializeFolderFullClassificationField=R,t.deserializeFolderFullClassificationField=P,t.serializeFolderFull=function(e){const t=(0,p.serializeFolder)(e);if(!(0,w.sdIsMap)(t))throw new m.BoxSdkError({message:'Expecting a map for "FolderFull"'});return Object.assign(Object.assign({},t),{sync_state:null==e.syncState?void 0:e.syncState,has_collaborations:null==e.hasCollaborations?void 0:e.hasCollaborations,permissions:null==e.permissions?void 0:k(e.permissions),tags:null==e.tags?void 0:e.tags.map((function(e){return e})),can_non_owners_invite:null==e.canNonOwnersInvite?void 0:e.canNonOwnersInvite,is_externally_owned:null==e.isExternallyOwned?void 0:e.isExternallyOwned,metadata:null==e.metadata?void 0:T(e.metadata),is_collaboration_restricted_to_enterprise:null==e.isCollaborationRestrictedToEnterprise?void 0:e.isCollaborationRestrictedToEnterprise,allowed_shared_link_access_levels:null==e.allowedSharedLinkAccessLevels?void 0:e.allowedSharedLinkAccessLevels.map((function(e){return e})),allowed_invitee_roles:null==e.allowedInviteeRoles?void 0:e.allowedInviteeRoles.map((function(e){return e})),watermark_info:null==e.watermarkInfo?void 0:M(e.watermarkInfo),is_accessible_via_shared_link:null==e.isAccessibleViaSharedLink?void 0:e.isAccessibleViaSharedLink,can_non_owners_view_collaborators:null==e.canNonOwnersViewCollaborators?void 0:e.canNonOwnersViewCollaborators,classification:null==e.classification?void 0:R(e.classification),is_associated_with_app_item:null==e.isAssociatedWithAppItem?void 0:e.isAssociatedWithAppItem})},t.deserializeFolderFull=function(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "FolderFull"'});const t=null==e.sync_state?void 0:S(e.sync_state);if(null!=e.has_collaborations&&!(0,g.sdIsBoolean)(e.has_collaborations))throw new m.BoxSdkError({message:'Expecting boolean for "has_collaborations" of type "FolderFull"'});const r=null==e.has_collaborations?void 0:e.has_collaborations,p=null==e.permissions?void 0:E(e.permissions);if(null!=e.tags&&!(0,b.sdIsList)(e.tags))throw new m.BoxSdkError({message:'Expecting array for "tags" of type "FolderFull"'});const h=null==e.tags?void 0:(0,b.sdIsList)(e.tags)?e.tags.map((function(e){if(!(0,v.sdIsString)(e))throw new m.BoxSdkError({message:'Expecting string for "FolderFull"'});return e})):[];if(null!=e.can_non_owners_invite&&!(0,g.sdIsBoolean)(e.can_non_owners_invite))throw new m.BoxSdkError({message:'Expecting boolean for "can_non_owners_invite" of type "FolderFull"'});const f=null==e.can_non_owners_invite?void 0:e.can_non_owners_invite;if(null!=e.is_externally_owned&&!(0,g.sdIsBoolean)(e.is_externally_owned))throw new m.BoxSdkError({message:'Expecting boolean for "is_externally_owned" of type "FolderFull"'});const _=null==e.is_externally_owned?void 0:e.is_externally_owned,x=null==e.metadata?void 0:B(e.metadata);if(null!=e.is_collaboration_restricted_to_enterprise&&!(0,g.sdIsBoolean)(e.is_collaboration_restricted_to_enterprise))throw new m.BoxSdkError({message:'Expecting boolean for "is_collaboration_restricted_to_enterprise" of type "FolderFull"'});const k=null==e.is_collaboration_restricted_to_enterprise?void 0:e.is_collaboration_restricted_to_enterprise;if(null!=e.allowed_shared_link_access_levels&&!(0,b.sdIsList)(e.allowed_shared_link_access_levels))throw new m.BoxSdkError({message:'Expecting array for "allowed_shared_link_access_levels" of type "FolderFull"'});const T=null==e.allowed_shared_link_access_levels?void 0:(0,b.sdIsList)(e.allowed_shared_link_access_levels)?e.allowed_shared_link_access_levels.map((function(e){return I(e)})):[];if(null!=e.allowed_invitee_roles&&!(0,b.sdIsList)(e.allowed_invitee_roles))throw new m.BoxSdkError({message:'Expecting array for "allowed_invitee_roles" of type "FolderFull"'});const C=null==e.allowed_invitee_roles?void 0:(0,b.sdIsList)(e.allowed_invitee_roles)?e.allowed_invitee_roles.map((function(e){return F(e)})):[],A=null==e.watermark_info?void 0:D(e.watermark_info);if(null!=e.is_accessible_via_shared_link&&!(0,g.sdIsBoolean)(e.is_accessible_via_shared_link))throw new m.BoxSdkError({message:'Expecting boolean for "is_accessible_via_shared_link" of type "FolderFull"'});const M=null==e.is_accessible_via_shared_link?void 0:e.is_accessible_via_shared_link;if(null!=e.can_non_owners_view_collaborators&&!(0,g.sdIsBoolean)(e.can_non_owners_view_collaborators))throw new m.BoxSdkError({message:'Expecting boolean for "can_non_owners_view_collaborators" of type "FolderFull"'});const R=null==e.can_non_owners_view_collaborators?void 0:e.can_non_owners_view_collaborators,O=null==e.classification?void 0:P(e.classification);if(null!=e.is_associated_with_app_item&&!(0,g.sdIsBoolean)(e.is_associated_with_app_item))throw new m.BoxSdkError({message:'Expecting boolean for "is_associated_with_app_item" of type "FolderFull"'});const z=null==e.is_associated_with_app_item?void 0:e.is_associated_with_app_item;if(null!=e.created_at&&!(0,v.sdIsString)(e.created_at))throw new m.BoxSdkError({message:'Expecting string for "created_at" of type "FolderFull"'});const N=null==e.created_at?void 0:(0,o.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,v.sdIsString)(e.modified_at))throw new m.BoxSdkError({message:'Expecting string for "modified_at" of type "FolderFull"'});const q=null==e.modified_at?void 0:(0,o.deserializeDateTime)(e.modified_at);if(null!=e.description&&!(0,v.sdIsString)(e.description))throw new m.BoxSdkError({message:'Expecting string for "description" of type "FolderFull"'});const U=null==e.description?void 0:e.description;if(null!=e.size&&!(0,y.sdIsNumber)(e.size))throw new m.BoxSdkError({message:'Expecting number for "size" of type "FolderFull"'});const L=null==e.size?void 0:e.size,j=null==e.path_collection?void 0:(0,s.deserializeFolderPathCollectionField)(e.path_collection),H=null==e.created_by?void 0:(0,a.deserializeUserMini)(e.created_by),$=null==e.modified_by?void 0:(0,a.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,v.sdIsString)(e.trashed_at))throw new m.BoxSdkError({message:'Expecting string for "trashed_at" of type "FolderFull"'});const G=null==e.trashed_at?void 0:(0,o.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,v.sdIsString)(e.purged_at))throw new m.BoxSdkError({message:'Expecting string for "purged_at" of type "FolderFull"'});const W=null==e.purged_at?void 0:(0,o.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,v.sdIsString)(e.content_created_at))throw new m.BoxSdkError({message:'Expecting string for "content_created_at" of type "FolderFull"'});const K=null==e.content_created_at?void 0:(0,o.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,v.sdIsString)(e.content_modified_at))throw new m.BoxSdkError({message:'Expecting string for "content_modified_at" of type "FolderFull"'});const V=null==e.content_modified_at?void 0:(0,o.deserializeDateTime)(e.content_modified_at),J=null==e.owned_by?void 0:(0,a.deserializeUserMini)(e.owned_by),Y=null==e.shared_link?void 0:(0,l.deserializeFolderSharedLinkField)(e.shared_link),Q=null==e.folder_upload_email?void 0:(0,d.deserializeFolderFolderUploadEmailField)(e.folder_upload_email),Z=null==e.parent?void 0:(0,n.deserializeFolderMini)(e.parent),X=null==e.item_status?void 0:(0,c.deserializeFolderItemStatusField)(e.item_status),ee=null==e.item_collection?void 0:(0,u.deserializeItems)(e.item_collection);if(null!=e.sequence_id&&!(0,v.sdIsString)(e.sequence_id))throw new m.BoxSdkError({message:'Expecting string for "sequence_id" of type "FolderFull"'});const te=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,v.sdIsString)(e.name))throw new m.BoxSdkError({message:'Expecting string for "name" of type "FolderFull"'});const re=null==e.name?void 0:e.name;if(null==e.id)throw new m.BoxSdkError({message:'Expecting "id" of type "FolderFull" to be defined'});if(!(0,v.sdIsString)(e.id))throw new m.BoxSdkError({message:'Expecting string for "id" of type "FolderFull"'});const ie=e.id;if(null!=e.etag&&!(0,v.sdIsString)(e.etag))throw new m.BoxSdkError({message:'Expecting string for "etag" of type "FolderFull"'});const ne=null==e.etag?void 0:e.etag;if(null==e.type)throw new m.BoxSdkError({message:'Expecting "type" of type "FolderFull" to be defined'});const oe=(0,i.deserializeFolderBaseTypeField)(e.type);return{syncState:t,hasCollaborations:r,permissions:p,tags:h,canNonOwnersInvite:f,isExternallyOwned:_,metadata:x,isCollaborationRestrictedToEnterprise:k,allowedSharedLinkAccessLevels:T,allowedInviteeRoles:C,watermarkInfo:A,isAccessibleViaSharedLink:M,canNonOwnersViewCollaborators:R,classification:O,isAssociatedWithAppItem:z,createdAt:N,modifiedAt:q,description:U,size:L,pathCollection:j,createdBy:H,modifiedBy:$,trashedAt:G,purgedAt:W,contentCreatedAt:K,contentModifiedAt:V,ownedBy:J,sharedLink:Y,folderUploadEmail:Q,parent:Z,itemStatus:X,itemCollection:ee,sequenceId:te,name:re,id:ie,etag:ne,type:oe}};const i=r(64145),n=r(70343),o=r(93845),s=r(18272),a=r(95408),l=r(18272),d=r(18272),c=r(18272),u=r(61664),p=r(18272),h=r(70376),f=r(18272),m=r(72631),g=r(50793),y=r(50793),v=r(50793),b=r(50793),w=r(50793);class _ extends f.Folder{constructor(e){super(e)}}function x(e){return e}function S(e){if("synced"==e)return e;if("not_synced"==e)return e;if("partially_synced"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize FolderFullSyncStateField"})}function k(e){return{can_delete:e.canDelete,can_download:e.canDownload,can_invite_collaborator:e.canInviteCollaborator,can_rename:e.canRename,can_set_share_access:e.canSetShareAccess,can_share:e.canShare,can_upload:e.canUpload}}function E(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "FolderFullPermissionsField"'});if(null==e.can_delete)throw new m.BoxSdkError({message:'Expecting "can_delete" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_delete))throw new m.BoxSdkError({message:'Expecting boolean for "can_delete" of type "FolderFullPermissionsField"'});const t=e.can_delete;if(null==e.can_download)throw new m.BoxSdkError({message:'Expecting "can_download" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_download))throw new m.BoxSdkError({message:'Expecting boolean for "can_download" of type "FolderFullPermissionsField"'});const r=e.can_download;if(null==e.can_invite_collaborator)throw new m.BoxSdkError({message:'Expecting "can_invite_collaborator" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_invite_collaborator))throw new m.BoxSdkError({message:'Expecting boolean for "can_invite_collaborator" of type "FolderFullPermissionsField"'});const i=e.can_invite_collaborator;if(null==e.can_rename)throw new m.BoxSdkError({message:'Expecting "can_rename" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_rename))throw new m.BoxSdkError({message:'Expecting boolean for "can_rename" of type "FolderFullPermissionsField"'});const n=e.can_rename;if(null==e.can_set_share_access)throw new m.BoxSdkError({message:'Expecting "can_set_share_access" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_set_share_access))throw new m.BoxSdkError({message:'Expecting boolean for "can_set_share_access" of type "FolderFullPermissionsField"'});const o=e.can_set_share_access;if(null==e.can_share)throw new m.BoxSdkError({message:'Expecting "can_share" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_share))throw new m.BoxSdkError({message:'Expecting boolean for "can_share" of type "FolderFullPermissionsField"'});const s=e.can_share;if(null==e.can_upload)throw new m.BoxSdkError({message:'Expecting "can_upload" of type "FolderFullPermissionsField" to be defined'});if(!(0,g.sdIsBoolean)(e.can_upload))throw new m.BoxSdkError({message:'Expecting boolean for "can_upload" of type "FolderFullPermissionsField"'});return{canDelete:t,canDownload:r,canInviteCollaborator:i,canRename:n,canSetShareAccess:o,canShare:s,canUpload:e.can_upload}}function T(e){return Object.assign({},e.extraData)}function B(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "FolderFullMetadataField"'});if(null!=e&&!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting object for "extraData" of type "FolderFullMetadataField"'});return{extraData:null==e?void 0:(0,w.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,function(e){return(0,w.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,h.deserializeMetadataFull)(t)]))):{}}(t)]))):{}}}function C(e){return e}function I(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize FolderFullAllowedSharedLinkAccessLevelsField"})}function A(e){return e}function F(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize FolderFullAllowedInviteeRolesField"})}function M(e){return{is_watermarked:null==e.isWatermarked?void 0:e.isWatermarked}}function D(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "FolderFullWatermarkInfoField"'});if(null!=e.is_watermarked&&!(0,g.sdIsBoolean)(e.is_watermarked))throw new m.BoxSdkError({message:'Expecting boolean for "is_watermarked" of type "FolderFullWatermarkInfoField"'});return{isWatermarked:null==e.is_watermarked?void 0:e.is_watermarked}}function R(e){return{name:null==e.name?void 0:e.name,definition:null==e.definition?void 0:e.definition,color:null==e.color?void 0:e.color}}function P(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "FolderFullClassificationField"'});if(null!=e.name&&!(0,v.sdIsString)(e.name))throw new m.BoxSdkError({message:'Expecting string for "name" of type "FolderFullClassificationField"'});const t=null==e.name?void 0:e.name;if(null!=e.definition&&!(0,v.sdIsString)(e.definition))throw new m.BoxSdkError({message:'Expecting string for "definition" of type "FolderFullClassificationField"'});const r=null==e.definition?void 0:e.definition;if(null!=e.color&&!(0,v.sdIsString)(e.color))throw new m.BoxSdkError({message:'Expecting string for "color" of type "FolderFullClassificationField"'});return{name:t,definition:r,color:null==e.color?void 0:e.color}}t.FolderFull=_},10687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFolderLockLockedOperationsField=h,t.deserializeFolderLockLockedOperationsField=f,t.serializeFolderLock=function(e){return{folder:null==e.folder?void 0:(0,i.serializeFolderMini)(e.folder),id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,created_by:null==e.createdBy?void 0:(0,o.serializeUserBase)(e.createdBy),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),locked_operations:null==e.lockedOperations?void 0:h(e.lockedOperations),lock_type:null==e.lockType?void 0:e.lockType}},t.deserializeFolderLock=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FolderLock"'});const t=null==e.folder?void 0:(0,n.deserializeFolderMini)(e.folder);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "FolderLock"'});const r=null==e.id?void 0:e.id;if(null!=e.type&&!(0,u.sdIsString)(e.type))throw new d.BoxSdkError({message:'Expecting string for "type" of type "FolderLock"'});const i=null==e.type?void 0:e.type,o=null==e.created_by?void 0:(0,s.deserializeUserBase)(e.created_by);if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "FolderLock"'});const a=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at),c=null==e.locked_operations?void 0:f(e.locked_operations);if(null!=e.lock_type&&!(0,u.sdIsString)(e.lock_type))throw new d.BoxSdkError({message:'Expecting string for "lock_type" of type "FolderLock"'});const h=null==e.lock_type?void 0:e.lock_type;return{folder:t,id:r,type:i,createdBy:o,createdAt:a,lockedOperations:c,lockType:h}};const i=r(70343),n=r(70343),o=r(78366),s=r(78366),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793);function h(e){return{move:e.move,delete:e.delete}}function f(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "FolderLockLockedOperationsField"'});if(null==e.move)throw new d.BoxSdkError({message:'Expecting "move" of type "FolderLockLockedOperationsField" to be defined'});if(!(0,c.sdIsBoolean)(e.move))throw new d.BoxSdkError({message:'Expecting boolean for "move" of type "FolderLockLockedOperationsField"'});const t=e.move;if(null==e.delete)throw new d.BoxSdkError({message:'Expecting "delete" of type "FolderLockLockedOperationsField" to be defined'});if(!(0,c.sdIsBoolean)(e.delete))throw new d.BoxSdkError({message:'Expecting boolean for "delete" of type "FolderLockLockedOperationsField"'});return{move:t,delete:e.delete}}},90716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeFolderLocks=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFolderLock)(e)})),limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker}},t.deserializeFolderLocks=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "FolderLocks"'});if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "FolderLocks"'});const t=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFolderLock)(e)})):[];if(null!=e.limit&&!(0,s.sdIsString)(e.limit))throw new o.BoxSdkError({message:'Expecting string for "limit" of type "FolderLocks"'});const r=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,s.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "FolderLocks"'});const i=null==e.next_marker?void 0:e.next_marker;return{entries:t,limit:r,nextMarker:i}};const i=r(10687),n=r(10687),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},70343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderMini=void 0,t.serializeFolderMini=function(e){const t=(0,n.serializeFolderBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "FolderMini"'});return Object.assign(Object.assign({},t),{sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:null==e.name?void 0:e.name})},t.deserializeFolderMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "FolderMini"'});if(null!=e.sequence_id&&!(0,a.sdIsString)(e.sequence_id))throw new s.BoxSdkError({message:'Expecting string for "sequence_id" of type "FolderMini"'});const t=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "FolderMini"'});const r=null==e.name?void 0:e.name;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "FolderMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "FolderMini"'});const n=e.id;if(null!=e.etag&&!(0,a.sdIsString)(e.etag))throw new s.BoxSdkError({message:'Expecting string for "etag" of type "FolderMini"'});const o=null==e.etag?void 0:e.etag;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "FolderMini" to be defined'});const d=(0,i.deserializeFolderBaseTypeField)(e.type);return{sequenceId:t,name:r,id:n,etag:o,type:d}};const i=r(64145),n=r(64145),o=r(64145),s=r(72631),a=r(50793),l=r(50793);class d extends o.FolderBase{constructor(e){super(e)}}t.FolderMini=d},65284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeGenericSource=function(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t])))},t.deserializeGenericSource=function(e){return(0,i.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t]))):{}};const i=r(50793)},75943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0,t.serializeGroup=function(e){const t=(0,o.serializeGroupMini)(e);if(!(0,u.sdIsMap)(t))throw new d.BoxSdkError({message:'Expecting a map for "Group"'});return Object.assign(Object.assign({},t),{created_at:null==e.createdAt?void 0:(0,s.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,s.serializeDateTime)(e.modifiedAt)})},t.deserializeGroup=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "Group"'});if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "Group"'});const t=null==e.created_at?void 0:(0,a.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,c.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "Group"'});const r=null==e.modified_at?void 0:(0,a.deserializeDateTime)(e.modified_at);if(null!=e.name&&!(0,c.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "Group"'});const o=null==e.name?void 0:e.name,s=null==e.group_type?void 0:(0,n.deserializeGroupMiniGroupTypeField)(e.group_type);if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "Group" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "Group"'});const l=e.id;if(null==e.type)throw new d.BoxSdkError({message:'Expecting "type" of type "Group" to be defined'});const p=(0,i.deserializeGroupBaseTypeField)(e.type);return{createdAt:t,modifiedAt:r,name:o,groupType:s,id:l,type:p}};const i=r(27870),n=r(99248),o=r(99248),s=r(93845),a=r(93845),l=r(99248),d=r(72631),c=r(50793),u=r(50793);class p extends l.GroupMini{constructor(e){super(e)}}t.Group=p},27870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupBase=void 0,t.serializeGroupBaseTypeField=s,t.deserializeGroupBaseTypeField=a,t.serializeGroupBase=function(e){return{id:e.id,type:e.type}},t.deserializeGroupBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "GroupBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "GroupBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "GroupBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "GroupBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeGroupBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeGroupBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "GroupBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "GroupBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "GroupBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("group"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize GroupBaseTypeField"})}t.GroupBase=class{constructor(e){this.type="group",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},26718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupFull=void 0,t.serializeGroupFullInvitabilityLevelField=h,t.deserializeGroupFullInvitabilityLevelField=f,t.serializeGroupFullMemberViewabilityLevelField=m,t.deserializeGroupFullMemberViewabilityLevelField=g,t.serializeGroupFullPermissionsField=y,t.deserializeGroupFullPermissionsField=v,t.serializeGroupFull=function(e){const t=(0,s.serializeGroup)(e);if(!(0,u.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "GroupFull"'});return Object.assign(Object.assign({},t),{provenance:null==e.provenance?void 0:e.provenance,external_sync_identifier:null==e.externalSyncIdentifier?void 0:e.externalSyncIdentifier,description:null==e.description?void 0:e.description,invitability_level:null==e.invitabilityLevel?void 0:e.invitabilityLevel,member_viewability_level:null==e.memberViewabilityLevel?void 0:e.memberViewabilityLevel,permissions:null==e.permissions?void 0:y(e.permissions)})},t.deserializeGroupFull=function(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "GroupFull"'});if(null!=e.provenance&&!(0,c.sdIsString)(e.provenance))throw new l.BoxSdkError({message:'Expecting string for "provenance" of type "GroupFull"'});const t=null==e.provenance?void 0:e.provenance;if(null!=e.external_sync_identifier&&!(0,c.sdIsString)(e.external_sync_identifier))throw new l.BoxSdkError({message:'Expecting string for "external_sync_identifier" of type "GroupFull"'});const r=null==e.external_sync_identifier?void 0:e.external_sync_identifier;if(null!=e.description&&!(0,c.sdIsString)(e.description))throw new l.BoxSdkError({message:'Expecting string for "description" of type "GroupFull"'});const s=null==e.description?void 0:e.description,a=null==e.invitability_level?void 0:f(e.invitability_level),d=null==e.member_viewability_level?void 0:g(e.member_viewability_level),p=null==e.permissions?void 0:v(e.permissions);if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new l.BoxSdkError({message:'Expecting string for "created_at" of type "GroupFull"'});const h=null==e.created_at?void 0:(0,o.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,c.sdIsString)(e.modified_at))throw new l.BoxSdkError({message:'Expecting string for "modified_at" of type "GroupFull"'});const m=null==e.modified_at?void 0:(0,o.deserializeDateTime)(e.modified_at);if(null!=e.name&&!(0,c.sdIsString)(e.name))throw new l.BoxSdkError({message:'Expecting string for "name" of type "GroupFull"'});const y=null==e.name?void 0:e.name,b=null==e.group_type?void 0:(0,n.deserializeGroupMiniGroupTypeField)(e.group_type);if(null==e.id)throw new l.BoxSdkError({message:'Expecting "id" of type "GroupFull" to be defined'});if(!(0,c.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "GroupFull"'});const w=e.id;if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "GroupFull" to be defined'});const _=(0,i.deserializeGroupBaseTypeField)(e.type);return{provenance:t,externalSyncIdentifier:r,description:s,invitabilityLevel:a,memberViewabilityLevel:d,permissions:p,createdAt:h,modifiedAt:m,name:y,groupType:b,id:w,type:_}};const i=r(27870),n=r(99248),o=r(93845),s=r(75943),a=r(75943),l=r(72631),d=r(50793),c=r(50793),u=r(50793);class p extends a.Group{constructor(e){super(e)}}function h(e){return e}function f(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize GroupFullInvitabilityLevelField"})}function m(e){return e}function g(e){if("admins_only"==e)return e;if("admins_and_members"==e)return e;if("all_managed_users"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize GroupFullMemberViewabilityLevelField"})}function y(e){return{can_invite_as_collaborator:null==e.canInviteAsCollaborator?void 0:e.canInviteAsCollaborator}}function v(e){if(!(0,u.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "GroupFullPermissionsField"'});if(null!=e.can_invite_as_collaborator&&!(0,d.sdIsBoolean)(e.can_invite_as_collaborator))throw new l.BoxSdkError({message:'Expecting boolean for "can_invite_as_collaborator" of type "GroupFullPermissionsField"'});return{canInviteAsCollaborator:null==e.can_invite_as_collaborator?void 0:e.can_invite_as_collaborator}}t.GroupFull=p},93695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeGroupMembershipTypeField=p,t.deserializeGroupMembershipTypeField=h,t.serializeGroupMembershipRoleField=f,t.deserializeGroupMembershipRoleField=m,t.serializeGroupMembership=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,user:null==e.user?void 0:(0,i.serializeUserMini)(e.user),group:null==e.group?void 0:(0,o.serializeGroupMini)(e.group),role:null==e.role?void 0:e.role,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt)}},t.deserializeGroupMembership=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "GroupMembership"'});if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "GroupMembership"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type),i=null==e.user?void 0:(0,n.deserializeUserMini)(e.user),o=null==e.group?void 0:(0,s.deserializeGroupMini)(e.group),a=null==e.role?void 0:m(e.role);if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "GroupMembership"'});const p=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,c.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "GroupMembership"'});const f=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);return{id:t,type:r,user:i,group:o,role:a,createdAt:p,modifiedAt:f}};const i=r(95408),n=r(95408),o=r(99248),s=r(99248),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793);function p(e){return e}function h(e){if("group_membership"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize GroupMembershipTypeField"})}function f(e){return e}function m(e){if("member"==e)return e;if("admin"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize GroupMembershipRoleField"})}},34812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeGroupMembershipsOrderDirectionField=c,t.deserializeGroupMembershipsOrderDirectionField=u,t.serializeGroupMembershipsOrderField=p,t.deserializeGroupMembershipsOrderField=h,t.serializeGroupMemberships=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeGroupMembership)(e)}))}},t.deserializeGroupMemberships=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "GroupMemberships"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "GroupMemberships"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "GroupMemberships"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "GroupMemberships"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "GroupMemberships"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "GroupMemberships"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeGroupMembership)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(93695),n=r(93695),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize GroupMembershipsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "GroupMembershipsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "GroupMembershipsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},99248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupMini=void 0,t.serializeGroupMiniGroupTypeField=c,t.deserializeGroupMiniGroupTypeField=u,t.serializeGroupMini=function(e){const t=(0,n.serializeGroupBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "GroupMini"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name,group_type:null==e.groupType?void 0:e.groupType})},t.deserializeGroupMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "GroupMini"'});if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "GroupMini"'});const t=null==e.name?void 0:e.name,r=null==e.group_type?void 0:u(e.group_type);if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "GroupMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "GroupMini"'});const n=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "GroupMini" to be defined'});const o=(0,i.deserializeGroupBaseTypeField)(e.type);return{name:t,groupType:r,id:n,type:o}};const i=r(27870),n=r(27870),o=r(27870),s=r(72631),a=r(50793),l=r(50793);class d extends o.GroupBase{constructor(e){super(e)}}function c(e){return e}function u(e){if("managed_group"==e)return e;if("all_users_group"==e)return e;throw new s.BoxSdkError({message:"Can't deserialize GroupMiniGroupTypeField"})}t.GroupMini=d},48716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeGroupMiniOrUserCollaborations=function(e){if("group"==e.type)return(0,i.serializeGroupMini)(e);if("user"==e.type)return(0,o.serializeUserCollaborations)(e);throw new a.BoxSdkError({message:"unknown type"})},t.deserializeGroupMiniOrUserCollaborations=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "GroupMiniOrUserCollaborations"'});if("group"==e.type)return(0,n.deserializeGroupMini)(e);if("user"==e.type)return(0,s.deserializeUserCollaborations)(e);throw new a.BoxSdkError({message:"Can't deserialize GroupMiniOrUserCollaborations"})};const i=r(99248),n=r(99248),o=r(21517),s=r(21517),a=r(72631),l=r(50793)},55604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeGroupsOrderDirectionField=c,t.deserializeGroupsOrderDirectionField=u,t.serializeGroupsOrderField=p,t.deserializeGroupsOrderField=h,t.serializeGroups=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeGroupFull)(e)}))}},t.deserializeGroups=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Groups"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Groups"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Groups"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Groups"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Groups"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Groups"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeGroupFull)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(26718),n=r(26718),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize GroupsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "GroupsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "GroupsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},7152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationMapping=void 0,t.serializeIntegrationMappingIntegrationTypeField=_,t.deserializeIntegrationMappingIntegrationTypeField=x,t.serializeIntegrationMapping=function(e){const t=(0,n.serializeIntegrationMappingBase)(e);if(!(0,b.sdIsMap)(t))throw new g.BoxSdkError({message:'Expecting a map for "IntegrationMapping"'});return Object.assign(Object.assign({},t),{integration_type:null==e.integrationType?void 0:e.integrationType,partner_item:(0,o.serializeIntegrationMappingPartnerItemSlackUnion)(e.partnerItem),box_item:(0,a.serializeFolderMini)(e.boxItem),is_manually_created:null==e.isManuallyCreated?void 0:e.isManuallyCreated,options:null==e.options?void 0:(0,d.serializeIntegrationMappingSlackOptions)(e.options),created_by:null==e.createdBy?void 0:(0,u.serializeUserIntegrationMappings)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,u.serializeUserIntegrationMappings)(e.modifiedBy),created_at:null==e.createdAt?void 0:(0,h.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,h.serializeDateTime)(e.modifiedAt)})},t.deserializeIntegrationMapping=function(e){if(!(0,b.sdIsMap)(e))throw new g.BoxSdkError({message:'Expecting a map for "IntegrationMapping"'});const t=null==e.integration_type?void 0:x(e.integration_type);if(null==e.partner_item)throw new g.BoxSdkError({message:'Expecting "partner_item" of type "IntegrationMapping" to be defined'});const r=(0,s.deserializeIntegrationMappingPartnerItemSlackUnion)(e.partner_item);if(null==e.box_item)throw new g.BoxSdkError({message:'Expecting "box_item" of type "IntegrationMapping" to be defined'});const n=(0,l.deserializeFolderMini)(e.box_item);if(null!=e.is_manually_created&&!(0,y.sdIsBoolean)(e.is_manually_created))throw new g.BoxSdkError({message:'Expecting boolean for "is_manually_created" of type "IntegrationMapping"'});const o=null==e.is_manually_created?void 0:e.is_manually_created,a=null==e.options?void 0:(0,c.deserializeIntegrationMappingSlackOptions)(e.options),d=null==e.created_by?void 0:(0,p.deserializeUserIntegrationMappings)(e.created_by),u=null==e.modified_by?void 0:(0,p.deserializeUserIntegrationMappings)(e.modified_by);if(null!=e.created_at&&!(0,v.sdIsString)(e.created_at))throw new g.BoxSdkError({message:'Expecting string for "created_at" of type "IntegrationMapping"'});const h=null==e.created_at?void 0:(0,f.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,v.sdIsString)(e.modified_at))throw new g.BoxSdkError({message:'Expecting string for "modified_at" of type "IntegrationMapping"'});const m=null==e.modified_at?void 0:(0,f.deserializeDateTime)(e.modified_at);if(null==e.id)throw new g.BoxSdkError({message:'Expecting "id" of type "IntegrationMapping" to be defined'});if(!(0,v.sdIsString)(e.id))throw new g.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMapping"'});const w=e.id;if(null==e.type)throw new g.BoxSdkError({message:'Expecting "type" of type "IntegrationMapping" to be defined'});const _=(0,i.deserializeIntegrationMappingBaseTypeField)(e.type);return{integrationType:t,partnerItem:r,boxItem:n,isManuallyCreated:o,options:a,createdBy:d,modifiedBy:u,createdAt:h,modifiedAt:m,id:w,type:_}};const i=r(91393),n=r(91393),o=r(5206),s=r(5206),a=r(70343),l=r(70343),d=r(77954),c=r(77954),u=r(80632),p=r(80632),h=r(93845),f=r(93845),m=r(91393),g=r(72631),y=r(50793),v=r(50793),b=r(50793);class w extends m.IntegrationMappingBase{constructor(e){super(e)}}function _(e){return e}function x(e){if("slack"==e)return e;throw new g.BoxSdkError({message:"Can't deserialize IntegrationMappingIntegrationTypeField"})}t.IntegrationMapping=w},91393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationMappingBase=void 0,t.serializeIntegrationMappingBaseTypeField=s,t.deserializeIntegrationMappingBaseTypeField=a,t.serializeIntegrationMappingBase=function(e){return{id:e.id,type:e.type}},t.deserializeIntegrationMappingBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "IntegrationMappingBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeIntegrationMappingBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeIntegrationMappingBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("integration_mapping"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize IntegrationMappingBaseTypeField"})}t.IntegrationMappingBase=class{constructor(e){this.type="integration_mapping",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},88838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationMappingBoxItemSlack=void 0,t.serializeIntegrationMappingBoxItemSlackTypeField=s,t.deserializeIntegrationMappingBoxItemSlackTypeField=a,t.serializeIntegrationMappingBoxItemSlack=function(e){return{type:e.type,id:e.id}},t.deserializeIntegrationMappingBoxItemSlack=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingBoxItemSlack"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "IntegrationMappingBoxItemSlack" to be defined'});const t=a(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingBoxItemSlack" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingBoxItemSlack"'});const r=e.id;return{type:t,id:r}},t.serializeIntegrationMappingBoxItemSlackInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeIntegrationMappingBoxItemSlackInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingBoxItemSlackInput"'});const t=null==e.type?void 0:a(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingBoxItemSlackInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingBoxItemSlackInput"'});const r=e.id;return{type:t,id:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("folder"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize IntegrationMappingBoxItemSlackTypeField"})}t.IntegrationMappingBoxItemSlack=class{constructor(e){this.type="folder",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}}},67019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationMappingPartnerItemSlack=void 0,t.serializeIntegrationMappingPartnerItemSlackTypeField=s,t.deserializeIntegrationMappingPartnerItemSlackTypeField=a,t.serializeIntegrationMappingPartnerItemSlack=function(e){return{type:e.type,id:e.id,slack_workspace_id:null==e.slackWorkspaceId?void 0:e.slackWorkspaceId,slack_org_id:null==e.slackOrgId?void 0:e.slackOrgId}},t.deserializeIntegrationMappingPartnerItemSlack=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingPartnerItemSlack"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "IntegrationMappingPartnerItemSlack" to be defined'});const t=a(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingPartnerItemSlack" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingPartnerItemSlack"'});const r=e.id;if(null!=e.slack_workspace_id&&!(0,n.sdIsString)(e.slack_workspace_id))throw new i.BoxSdkError({message:'Expecting string for "slack_workspace_id" of type "IntegrationMappingPartnerItemSlack"'});const s=null==e.slack_workspace_id?void 0:e.slack_workspace_id;if(null!=e.slack_org_id&&!(0,n.sdIsString)(e.slack_org_id))throw new i.BoxSdkError({message:'Expecting string for "slack_org_id" of type "IntegrationMappingPartnerItemSlack"'});const l=null==e.slack_org_id?void 0:e.slack_org_id;return{type:t,id:r,slackWorkspaceId:s,slackOrgId:l}},t.serializeIntegrationMappingPartnerItemSlackInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id,slack_workspace_id:null==e.slackWorkspaceId?void 0:e.slackWorkspaceId,slack_org_id:null==e.slackOrgId?void 0:e.slackOrgId}},t.deserializeIntegrationMappingPartnerItemSlackInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingPartnerItemSlackInput"'});const t=null==e.type?void 0:a(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "IntegrationMappingPartnerItemSlackInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "IntegrationMappingPartnerItemSlackInput"'});const r=e.id;if(null!=e.slack_workspace_id&&!(0,n.sdIsString)(e.slack_workspace_id))throw new i.BoxSdkError({message:'Expecting string for "slack_workspace_id" of type "IntegrationMappingPartnerItemSlackInput"'});const s=null==e.slack_workspace_id?void 0:e.slack_workspace_id;if(null!=e.slack_org_id&&!(0,n.sdIsString)(e.slack_org_id))throw new i.BoxSdkError({message:'Expecting string for "slack_org_id" of type "IntegrationMappingPartnerItemSlackInput"'});const l=null==e.slack_org_id?void 0:e.slack_org_id;return{type:t,id:r,slackWorkspaceId:s,slackOrgId:l}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("channel"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize IntegrationMappingPartnerItemSlackTypeField"})}t.IntegrationMappingPartnerItemSlack=class{constructor(e){this.type="channel",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.slackWorkspaceId&&(this.slackWorkspaceId=e.slackWorkspaceId),e.slackOrgId&&(this.slackOrgId=e.slackOrgId),e.rawData&&(this.rawData=e.rawData)}}},5206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeIntegrationMappingPartnerItemSlackUnion=function(e){if("channel"==e.type)return(0,i.serializeIntegrationMappingPartnerItemSlack)(e);throw new o.BoxSdkError({message:"unknown type"})},t.deserializeIntegrationMappingPartnerItemSlackUnion=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "IntegrationMappingPartnerItemSlackUnion"'});if("channel"==e.type)return(0,n.deserializeIntegrationMappingPartnerItemSlack)(e);throw new o.BoxSdkError({message:"Can't deserialize IntegrationMappingPartnerItemSlackUnion"})};const i=r(67019),n=r(67019),o=r(72631),s=r(50793)},95665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeIntegrationMappingSlackCreateRequest=function(e){return{partner_item:(0,i.serializeIntegrationMappingPartnerItemSlack)(e.partnerItem),box_item:(0,o.serializeIntegrationMappingBoxItemSlack)(e.boxItem),options:null==e.options?void 0:(0,a.serializeIntegrationMappingSlackOptions)(e.options)}},t.deserializeIntegrationMappingSlackCreateRequest=function(e){if(!(0,c.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "IntegrationMappingSlackCreateRequest"'});if(null==e.partner_item)throw new d.BoxSdkError({message:'Expecting "partner_item" of type "IntegrationMappingSlackCreateRequest" to be defined'});const t=(0,n.deserializeIntegrationMappingPartnerItemSlack)(e.partner_item);if(null==e.box_item)throw new d.BoxSdkError({message:'Expecting "box_item" of type "IntegrationMappingSlackCreateRequest" to be defined'});const r=(0,s.deserializeIntegrationMappingBoxItemSlack)(e.box_item),i=null==e.options?void 0:(0,l.deserializeIntegrationMappingSlackOptions)(e.options);return{partnerItem:t,boxItem:r,options:i}};const i=r(67019),n=r(67019),o=r(88838),s=r(88838),a=r(77954),l=r(77954),d=r(72631),c=r(50793)},77954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeIntegrationMappingSlackOptions=function(e){return{is_access_management_disabled:null==e.isAccessManagementDisabled?void 0:e.isAccessManagementDisabled}},t.deserializeIntegrationMappingSlackOptions=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "IntegrationMappingSlackOptions"'});if(null!=e.is_access_management_disabled&&!(0,n.sdIsBoolean)(e.is_access_management_disabled))throw new i.BoxSdkError({message:'Expecting boolean for "is_access_management_disabled" of type "IntegrationMappingSlackOptions"'});return{isAccessManagementDisabled:null==e.is_access_management_disabled?void 0:e.is_access_management_disabled}};const i=r(72631),n=r(50793),o=r(50793)},17213:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeIntegrationMappings=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeIntegrationMapping)(e)}))}},t.deserializeIntegrationMappings=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "IntegrationMappings"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "IntegrationMappings"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "IntegrationMappings"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "IntegrationMappings"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeIntegrationMapping)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(7152),n=r(7152),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},6265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Invite=void 0,t.serializeInviteTypeField=c,t.deserializeInviteTypeField=u,t.serializeInviteInvitedToTypeField=p,t.deserializeInviteInvitedToTypeField=h,t.serializeInviteInvitedToField=f,t.deserializeInviteInvitedToField=m,t.serializeInvite=function(e){return{id:e.id,type:e.type,invited_to:null==e.invitedTo?void 0:f(e.invitedTo),actionable_by:null==e.actionableBy?void 0:(0,i.serializeUserMini)(e.actionableBy),invited_by:null==e.invitedBy?void 0:(0,i.serializeUserMini)(e.invitedBy),status:null==e.status?void 0:e.status,created_at:null==e.createdAt?void 0:(0,o.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,o.serializeDateTime)(e.modifiedAt)}},t.deserializeInvite=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "Invite"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "Invite" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "Invite"'});const t=e.id;if(null==e.type)throw new a.BoxSdkError({message:'Expecting "type" of type "Invite" to be defined'});const r=u(e.type),i=null==e.invited_to?void 0:m(e.invited_to),o=null==e.actionable_by?void 0:(0,n.deserializeUserMini)(e.actionable_by),c=null==e.invited_by?void 0:(0,n.deserializeUserMini)(e.invited_by);if(null!=e.status&&!(0,l.sdIsString)(e.status))throw new a.BoxSdkError({message:'Expecting string for "status" of type "Invite"'});const p=null==e.status?void 0:e.status;if(null!=e.created_at&&!(0,l.sdIsString)(e.created_at))throw new a.BoxSdkError({message:'Expecting string for "created_at" of type "Invite"'});const h=null==e.created_at?void 0:(0,s.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,l.sdIsString)(e.modified_at))throw new a.BoxSdkError({message:'Expecting string for "modified_at" of type "Invite"'});const f=null==e.modified_at?void 0:(0,s.deserializeDateTime)(e.modified_at);return{id:t,type:r,invitedTo:i,actionableBy:o,invitedBy:c,status:p,createdAt:h,modifiedAt:f}},t.serializeInviteInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,invited_to:null==e.invitedTo?void 0:f(e.invitedTo),actionable_by:null==e.actionableBy?void 0:(0,i.serializeUserMini)(e.actionableBy),invited_by:null==e.invitedBy?void 0:(0,i.serializeUserMini)(e.invitedBy),status:null==e.status?void 0:e.status,created_at:null==e.createdAt?void 0:(0,o.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,o.serializeDateTime)(e.modifiedAt)}},t.deserializeInviteInput=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "InviteInput"'});if(null==e.id)throw new a.BoxSdkError({message:'Expecting "id" of type "InviteInput" to be defined'});if(!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "InviteInput"'});const t=e.id,r=null==e.type?void 0:u(e.type),i=null==e.invited_to?void 0:m(e.invited_to),o=null==e.actionable_by?void 0:(0,n.deserializeUserMini)(e.actionable_by),c=null==e.invited_by?void 0:(0,n.deserializeUserMini)(e.invited_by);if(null!=e.status&&!(0,l.sdIsString)(e.status))throw new a.BoxSdkError({message:'Expecting string for "status" of type "InviteInput"'});const p=null==e.status?void 0:e.status;if(null!=e.created_at&&!(0,l.sdIsString)(e.created_at))throw new a.BoxSdkError({message:'Expecting string for "created_at" of type "InviteInput"'});const h=null==e.created_at?void 0:(0,s.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,l.sdIsString)(e.modified_at))throw new a.BoxSdkError({message:'Expecting string for "modified_at" of type "InviteInput"'});const f=null==e.modified_at?void 0:(0,s.deserializeDateTime)(e.modified_at);return{id:t,type:r,invitedTo:i,actionableBy:o,invitedBy:c,status:p,createdAt:h,modifiedAt:f}};const i=r(95408),n=r(95408),o=r(93845),s=r(93845),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("invite"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize InviteTypeField"})}function p(e){return e}function h(e){if("enterprise"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize InviteInvitedToTypeField"})}function f(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}}function m(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "InviteInvitedToField"'});if(null!=e.id&&!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "InviteInvitedToField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type);if(null!=e.name&&!(0,l.sdIsString)(e.name))throw new a.BoxSdkError({message:'Expecting string for "name" of type "InviteInvitedToField"'});return{id:t,type:r,name:null==e.name?void 0:e.name}}t.Invite=class{constructor(e){this.type="invite",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.invitedTo&&(this.invitedTo=e.invitedTo),e.actionableBy&&(this.actionableBy=e.actionableBy),e.invitedBy&&(this.invitedBy=e.invitedBy),e.status&&(this.status=e.status),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.rawData&&(this.rawData=e.rawData)}}},61664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeItemsOrderDirectionField=c,t.deserializeItemsOrderDirectionField=u,t.serializeItemsOrderField=p,t.deserializeItemsOrderField=h,t.serializeItems=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,total_count:null==e.totalCount?void 0:e.totalCount,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileFullOrFolderMiniOrWebLink)(e)}))}},t.deserializeItems=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Items"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Items"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "Items"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "Items"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Items"'});const c=null==e.total_count?void 0:e.total_count;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Items"'});const u=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Items"'});const p=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Items"'});const f=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileFullOrFolderMiniOrWebLink)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,totalCount:c,offset:u,order:p,entries:f}};const i=r(36374),n=r(36374),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize ItemsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ItemsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "ItemsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},64350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeywordSkillCard=t.KeywordSkillCardInvocationField=t.KeywordSkillCardSkillField=void 0,t.serializeKeywordSkillCardTypeField=d,t.deserializeKeywordSkillCardTypeField=c,t.serializeKeywordSkillCardSkillCardTypeField=u,t.deserializeKeywordSkillCardSkillCardTypeField=p,t.serializeKeywordSkillCardSkillCardTitleField=h,t.deserializeKeywordSkillCardSkillCardTitleField=f,t.serializeKeywordSkillCardSkillTypeField=m,t.deserializeKeywordSkillCardSkillTypeField=g,t.serializeKeywordSkillCardSkillField=y,t.deserializeKeywordSkillCardSkillField=v,t.serializeKeywordSkillCardSkillFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeKeywordSkillCardSkillFieldInput=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardSkillFieldInput"'});const t=null==e.type?void 0:g(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "KeywordSkillCardSkillFieldInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "KeywordSkillCardSkillFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeKeywordSkillCardInvocationTypeField=b,t.deserializeKeywordSkillCardInvocationTypeField=w,t.serializeKeywordSkillCardInvocationField=_,t.deserializeKeywordSkillCardInvocationField=x,t.serializeKeywordSkillCardInvocationFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeKeywordSkillCardInvocationFieldInput=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardInvocationFieldInput"'});const t=null==e.type?void 0:w(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "KeywordSkillCardInvocationFieldInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "KeywordSkillCardInvocationFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeKeywordSkillCardEntriesField=S,t.deserializeKeywordSkillCardEntriesField=k,t.serializeKeywordSkillCard=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:e.type,skill_card_type:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:h(e.skillCardTitle),skill:y(e.skill),invocation:_(e.invocation),entries:e.entries.map((function(e){return S(e)}))}},t.deserializeKeywordSkillCard=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCard"'});if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "KeywordSkillCard"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "KeywordSkillCard" to be defined'});const r=c(e.type);if(null==e.skill_card_type)throw new o.BoxSdkError({message:'Expecting "skill_card_type" of type "KeywordSkillCard" to be defined'});const i=p(e.skill_card_type),d=null==e.skill_card_title?void 0:f(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "KeywordSkillCard" to be defined'});const u=v(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "KeywordSkillCard" to be defined'});const h=x(e.invocation);if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "KeywordSkillCard" to be defined'});if(!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "KeywordSkillCard"'});const m=(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return k(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:d,skill:u,invocation:h,entries:m}},t.serializeKeywordSkillCardInput=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:null==e.type?void 0:e.type,skillCardType:null==e.skillCardType?void 0:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:h(e.skillCardTitle),skill:y(e.skill),invocation:_(e.invocation),entries:e.entries.map((function(e){return S(e)}))}},t.deserializeKeywordSkillCardInput=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardInput"'});if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "KeywordSkillCardInput"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at),r=null==e.type?void 0:c(e.type),i=null==e.skillCardType?void 0:p(e.skillCardType),d=null==e.skill_card_title?void 0:f(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "KeywordSkillCardInput" to be defined'});const u=v(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "KeywordSkillCardInput" to be defined'});const h=x(e.invocation);if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "KeywordSkillCardInput" to be defined'});if(!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "KeywordSkillCardInput"'});const m=(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return k(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:d,skill:u,invocation:h,entries:m}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793);t.KeywordSkillCardSkillField=class{constructor(e){this.type="service",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};t.KeywordSkillCardInvocationField=class{constructor(e){this.type="skill_invocation",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};function d(e){return e}function c(e){if("skill_card"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize KeywordSkillCardTypeField"})}function u(e){return e}function p(e){if("keyword"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize KeywordSkillCardSkillCardTypeField"})}function h(e){return{code:null==e.code?void 0:e.code,message:e.message}}function f(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardSkillCardTitleField"'});if(null!=e.code&&!(0,s.sdIsString)(e.code))throw new o.BoxSdkError({message:'Expecting string for "code" of type "KeywordSkillCardSkillCardTitleField"'});const t=null==e.code?void 0:e.code;if(null==e.message)throw new o.BoxSdkError({message:'Expecting "message" of type "KeywordSkillCardSkillCardTitleField" to be defined'});if(!(0,s.sdIsString)(e.message))throw new o.BoxSdkError({message:'Expecting string for "message" of type "KeywordSkillCardSkillCardTitleField"'});return{code:t,message:e.message}}function m(e){return e}function g(e){if("service"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize KeywordSkillCardSkillTypeField"})}function y(e){return{type:e.type,id:e.id}}function v(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardSkillField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "KeywordSkillCardSkillField" to be defined'});const t=g(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "KeywordSkillCardSkillField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "KeywordSkillCardSkillField"'});return{type:t,id:e.id}}function b(e){return e}function w(e){if("skill_invocation"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize KeywordSkillCardInvocationTypeField"})}function _(e){return{type:e.type,id:e.id}}function x(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardInvocationField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "KeywordSkillCardInvocationField" to be defined'});const t=w(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "KeywordSkillCardInvocationField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "KeywordSkillCardInvocationField"'});return{type:t,id:e.id}}function S(e){return{text:null==e.text?void 0:e.text}}function k(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "KeywordSkillCardEntriesField"'});if(null!=e.text&&!(0,s.sdIsString)(e.text))throw new o.BoxSdkError({message:'Expecting string for "text" of type "KeywordSkillCardEntriesField"'});return{text:null==e.text?void 0:e.text}}t.KeywordSkillCard=class{constructor(e){this.type="skill_card",this.skillCardType="keyword",e.createdAt&&(this.createdAt=e.createdAt),e.type&&(this.type=e.type),e.skillCardType&&(this.skillCardType=e.skillCardType),e.skillCardTitle&&(this.skillCardTitle=e.skillCardTitle),e.skill&&(this.skill=e.skill),e.invocation&&(this.invocation=e.invocation),e.entries&&(this.entries=e.entries),e.rawData&&(this.rawData=e.rawData)}}},20633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard=function(e){if("keyword"==e.skillCardType)return(0,i.serializeKeywordSkillCard)(e);if("status"==e.skillCardType)return(0,o.serializeStatusSkillCard)(e);if("timeline"==e.skillCardType)return(0,a.serializeTimelineSkillCard)(e);if("transcript"==e.skillCardType)return(0,d.serializeTranscriptSkillCard)(e);throw new u.BoxSdkError({message:"unknown type"})},t.deserializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard=function(e){if(!(0,p.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "KeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard"'});if("keyword"==e.skill_card_type)return(0,n.deserializeKeywordSkillCard)(e);if("status"==e.skill_card_type)return(0,s.deserializeStatusSkillCard)(e);if("timeline"==e.skill_card_type)return(0,l.deserializeTimelineSkillCard)(e);if("transcript"==e.skill_card_type)return(0,c.deserializeTranscriptSkillCard)(e);throw new u.BoxSdkError({message:"Can't deserialize KeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard"})};const i=r(64350),n=r(64350),o=r(77421),s=r(77421),a=r(37086),l=r(37086),d=r(20749),c=r(20749),u=r(72631),p=r(50793)},48910:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeLegalHoldPolicies=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeLegalHoldPolicy)(e)}))}},t.deserializeLegalHoldPolicies=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "LegalHoldPolicies"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "LegalHoldPolicies"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "LegalHoldPolicies"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "LegalHoldPolicies"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "LegalHoldPolicies"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeLegalHoldPolicy)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(83750),n=r(83750),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},83750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegalHoldPolicy=void 0,t.serializeLegalHoldPolicyStatusField=m,t.deserializeLegalHoldPolicyStatusField=g,t.serializeLegalHoldPolicyAssignmentCountsField=y,t.deserializeLegalHoldPolicyAssignmentCountsField=v,t.serializeLegalHoldPolicy=function(e){const t=(0,n.serializeLegalHoldPolicyMini)(e);if(!(0,h.sdIsMap)(t))throw new c.BoxSdkError({message:'Expecting a map for "LegalHoldPolicy"'});return Object.assign(Object.assign({},t),{policy_name:null==e.policyName?void 0:e.policyName,description:null==e.description?void 0:e.description,status:null==e.status?void 0:e.status,assignment_counts:null==e.assignmentCounts?void 0:y(e.assignmentCounts),created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),deleted_at:null==e.deletedAt?void 0:(0,a.serializeDateTime)(e.deletedAt),filter_started_at:null==e.filterStartedAt?void 0:(0,a.serializeDateTime)(e.filterStartedAt),filter_ended_at:null==e.filterEndedAt?void 0:(0,a.serializeDateTime)(e.filterEndedAt),release_notes:null==e.releaseNotes?void 0:e.releaseNotes})},t.deserializeLegalHoldPolicy=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "LegalHoldPolicy"'});if(null!=e.policy_name&&!(0,p.sdIsString)(e.policy_name))throw new c.BoxSdkError({message:'Expecting string for "policy_name" of type "LegalHoldPolicy"'});const t=null==e.policy_name?void 0:e.policy_name;if(null!=e.description&&!(0,p.sdIsString)(e.description))throw new c.BoxSdkError({message:'Expecting string for "description" of type "LegalHoldPolicy"'});const r=null==e.description?void 0:e.description,n=null==e.status?void 0:g(e.status),o=null==e.assignment_counts?void 0:v(e.assignment_counts),a=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,p.sdIsString)(e.created_at))throw new c.BoxSdkError({message:'Expecting string for "created_at" of type "LegalHoldPolicy"'});const d=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,p.sdIsString)(e.modified_at))throw new c.BoxSdkError({message:'Expecting string for "modified_at" of type "LegalHoldPolicy"'});const u=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null!=e.deleted_at&&!(0,p.sdIsString)(e.deleted_at))throw new c.BoxSdkError({message:'Expecting string for "deleted_at" of type "LegalHoldPolicy"'});const f=null==e.deleted_at?void 0:(0,l.deserializeDateTime)(e.deleted_at);if(null!=e.filter_started_at&&!(0,p.sdIsString)(e.filter_started_at))throw new c.BoxSdkError({message:'Expecting string for "filter_started_at" of type "LegalHoldPolicy"'});const m=null==e.filter_started_at?void 0:(0,l.deserializeDateTime)(e.filter_started_at);if(null!=e.filter_ended_at&&!(0,p.sdIsString)(e.filter_ended_at))throw new c.BoxSdkError({message:'Expecting string for "filter_ended_at" of type "LegalHoldPolicy"'});const y=null==e.filter_ended_at?void 0:(0,l.deserializeDateTime)(e.filter_ended_at);if(null!=e.release_notes&&!(0,p.sdIsString)(e.release_notes))throw new c.BoxSdkError({message:'Expecting string for "release_notes" of type "LegalHoldPolicy"'});const b=null==e.release_notes?void 0:e.release_notes;if(null==e.id)throw new c.BoxSdkError({message:'Expecting "id" of type "LegalHoldPolicy" to be defined'});if(!(0,p.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "LegalHoldPolicy"'});const w=e.id;if(null==e.type)throw new c.BoxSdkError({message:'Expecting "type" of type "LegalHoldPolicy" to be defined'});const _=(0,i.deserializeLegalHoldPolicyMiniTypeField)(e.type);return{policyName:t,description:r,status:n,assignmentCounts:o,createdBy:a,createdAt:d,modifiedAt:u,deletedAt:f,filterStartedAt:m,filterEndedAt:y,releaseNotes:b,id:w,type:_}};const i=r(53681),n=r(53681),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(53681),c=r(72631),u=r(50793),p=r(50793),h=r(50793);class f extends d.LegalHoldPolicyMini{constructor(e){super(e)}}function m(e){return e}function g(e){if("active"==e)return e;if("applying"==e)return e;if("releasing"==e)return e;if("released"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize LegalHoldPolicyStatusField"})}function y(e){return{user:null==e.user?void 0:e.user,folder:null==e.folder?void 0:e.folder,file:null==e.file?void 0:e.file,file_version:null==e.fileVersion?void 0:e.fileVersion}}function v(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyAssignmentCountsField"'});if(null!=e.user&&!(0,u.sdIsNumber)(e.user))throw new c.BoxSdkError({message:'Expecting number for "user" of type "LegalHoldPolicyAssignmentCountsField"'});const t=null==e.user?void 0:e.user;if(null!=e.folder&&!(0,u.sdIsNumber)(e.folder))throw new c.BoxSdkError({message:'Expecting number for "folder" of type "LegalHoldPolicyAssignmentCountsField"'});const r=null==e.folder?void 0:e.folder;if(null!=e.file&&!(0,u.sdIsNumber)(e.file))throw new c.BoxSdkError({message:'Expecting number for "file" of type "LegalHoldPolicyAssignmentCountsField"'});const i=null==e.file?void 0:e.file;if(null!=e.file_version&&!(0,u.sdIsNumber)(e.file_version))throw new c.BoxSdkError({message:'Expecting number for "file_version" of type "LegalHoldPolicyAssignmentCountsField"'});return{user:t,folder:r,file:i,fileVersion:null==e.file_version?void 0:e.file_version}}t.LegalHoldPolicy=f},55047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeLegalHoldPolicyAssignment=function(e){const t=(0,n.serializeLegalHoldPolicyAssignmentBase)(e);if(!(0,m.sdIsMap)(t))throw new h.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyAssignment"'});return Object.assign(Object.assign({},t),{legal_hold_policy:null==e.legalHoldPolicy?void 0:(0,o.serializeLegalHoldPolicyMini)(e.legalHoldPolicy),assigned_to:null==e.assignedTo?void 0:(0,a.serializeFileOrFolderOrWebLink)(e.assignedTo),assigned_by:null==e.assignedBy?void 0:(0,d.serializeUserMini)(e.assignedBy),assigned_at:null==e.assignedAt?void 0:(0,u.serializeDateTime)(e.assignedAt),deleted_at:null==e.deletedAt?void 0:(0,u.serializeDateTime)(e.deletedAt)})},t.deserializeLegalHoldPolicyAssignment=function(e){if(!(0,m.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyAssignment"'});const t=null==e.legal_hold_policy?void 0:(0,s.deserializeLegalHoldPolicyMini)(e.legal_hold_policy),r=null==e.assigned_to?void 0:(0,l.deserializeFileOrFolderOrWebLink)(e.assigned_to),n=null==e.assigned_by?void 0:(0,c.deserializeUserMini)(e.assigned_by);if(null!=e.assigned_at&&!(0,f.sdIsString)(e.assigned_at))throw new h.BoxSdkError({message:'Expecting string for "assigned_at" of type "LegalHoldPolicyAssignment"'});const o=null==e.assigned_at?void 0:(0,p.deserializeDateTime)(e.assigned_at);if(null!=e.deleted_at&&!(0,f.sdIsString)(e.deleted_at))throw new h.BoxSdkError({message:'Expecting string for "deleted_at" of type "LegalHoldPolicyAssignment"'});const a=null==e.deleted_at?void 0:(0,p.deserializeDateTime)(e.deleted_at);if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new h.BoxSdkError({message:'Expecting string for "id" of type "LegalHoldPolicyAssignment"'});const d=null==e.id?void 0:e.id,u=null==e.type?void 0:(0,i.deserializeLegalHoldPolicyAssignmentBaseTypeField)(e.type);return{legalHoldPolicy:t,assignedTo:r,assignedBy:n,assignedAt:o,deletedAt:a,id:d,type:u}};const i=r(16510),n=r(16510),o=r(53681),s=r(53681),a=r(94132),l=r(94132),d=r(95408),c=r(95408),u=r(93845),p=r(93845),h=r(72631),f=r(50793),m=r(50793)},16510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeLegalHoldPolicyAssignmentBaseTypeField=s,t.deserializeLegalHoldPolicyAssignmentBaseTypeField=a,t.serializeLegalHoldPolicyAssignmentBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeLegalHoldPolicyAssignmentBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyAssignmentBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "LegalHoldPolicyAssignmentBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("legal_hold_policy_assignment"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize LegalHoldPolicyAssignmentBaseTypeField"})}},44212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeLegalHoldPolicyAssignments=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeLegalHoldPolicyAssignment)(e)}))}},t.deserializeLegalHoldPolicyAssignments=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyAssignments"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "LegalHoldPolicyAssignments"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "LegalHoldPolicyAssignments"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "LegalHoldPolicyAssignments"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "LegalHoldPolicyAssignments"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeLegalHoldPolicyAssignment)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(55047),n=r(55047),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},53681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegalHoldPolicyMini=void 0,t.serializeLegalHoldPolicyMiniTypeField=s,t.deserializeLegalHoldPolicyMiniTypeField=a,t.serializeLegalHoldPolicyMini=function(e){return{id:e.id,type:e.type}},t.deserializeLegalHoldPolicyMini=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyMini"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "LegalHoldPolicyMini" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "LegalHoldPolicyMini"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "LegalHoldPolicyMini" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeLegalHoldPolicyMiniInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeLegalHoldPolicyMiniInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "LegalHoldPolicyMiniInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "LegalHoldPolicyMiniInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "LegalHoldPolicyMiniInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("legal_hold_policy"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize LegalHoldPolicyMiniTypeField"})}t.LegalHoldPolicyMini=class{constructor(e){this.type="legal_hold_policy",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},59997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadata=function(e){return(0,i.serializeMetadataBase)(e)},t.deserializeMetadata=function(e){return(0,n.deserializeMetadataBase)(e)};const i=r(17404),n=r(17404)},17404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataBase=function(e){return{$parent:null==e.parent?void 0:e.parent,$template:null==e.template?void 0:e.template,$scope:null==e.scope?void 0:e.scope,$version:null==e.version?void 0:e.version}},t.deserializeMetadataBase=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataBase"'});if(null!=e.$parent&&!(0,o.sdIsString)(e.$parent))throw new i.BoxSdkError({message:'Expecting string for "$parent" of type "MetadataBase"'});const t=null==e.$parent?void 0:e.$parent;if(null!=e.$template&&!(0,o.sdIsString)(e.$template))throw new i.BoxSdkError({message:'Expecting string for "$template" of type "MetadataBase"'});const r=null==e.$template?void 0:e.$template;if(null!=e.$scope&&!(0,o.sdIsString)(e.$scope))throw new i.BoxSdkError({message:'Expecting string for "$scope" of type "MetadataBase"'});const a=null==e.$scope?void 0:e.$scope;if(null!=e.$version&&!(0,n.sdIsNumber)(e.$version))throw new i.BoxSdkError({message:'Expecting number for "$version" of type "MetadataBase"'});const l=null==e.$version?void 0:e.$version;return{parent:t,template:r,scope:a,version:l}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793)},93267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataCascadePolicies=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeMetadataCascadePolicy)(e)}))}},t.deserializeMetadataCascadePolicies=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "MetadataCascadePolicies"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "MetadataCascadePolicies"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "MetadataCascadePolicies"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "MetadataCascadePolicies"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "MetadataCascadePolicies"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeMetadataCascadePolicy)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(45243),n=r(45243),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},45243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataCascadePolicy=void 0,t.serializeMetadataCascadePolicyTypeField=s,t.deserializeMetadataCascadePolicyTypeField=a,t.serializeMetadataCascadePolicyOwnerEnterpriseTypeField=l,t.deserializeMetadataCascadePolicyOwnerEnterpriseTypeField=d,t.serializeMetadataCascadePolicyOwnerEnterpriseField=c,t.deserializeMetadataCascadePolicyOwnerEnterpriseField=u,t.serializeMetadataCascadePolicyParentTypeField=p,t.deserializeMetadataCascadePolicyParentTypeField=h,t.serializeMetadataCascadePolicyParentField=f,t.deserializeMetadataCascadePolicyParentField=m,t.serializeMetadataCascadePolicy=function(e){return{id:e.id,type:e.type,owner_enterprise:null==e.ownerEnterprise?void 0:c(e.ownerEnterprise),parent:null==e.parent?void 0:f(e.parent),scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey}},t.deserializeMetadataCascadePolicy=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataCascadePolicy"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "MetadataCascadePolicy" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataCascadePolicy"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "MetadataCascadePolicy" to be defined'});const r=a(e.type),s=null==e.owner_enterprise?void 0:u(e.owner_enterprise),l=null==e.parent?void 0:m(e.parent);if(null!=e.scope&&!(0,n.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "MetadataCascadePolicy"'});const d=null==e.scope?void 0:e.scope;if(null!=e.templateKey&&!(0,n.sdIsString)(e.templateKey))throw new i.BoxSdkError({message:'Expecting string for "templateKey" of type "MetadataCascadePolicy"'});const c=null==e.templateKey?void 0:e.templateKey;return{id:t,type:r,ownerEnterprise:s,parent:l,scope:d,templateKey:c}},t.serializeMetadataCascadePolicyInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,owner_enterprise:null==e.ownerEnterprise?void 0:c(e.ownerEnterprise),parent:null==e.parent?void 0:f(e.parent),scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey}},t.deserializeMetadataCascadePolicyInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataCascadePolicyInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "MetadataCascadePolicyInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataCascadePolicyInput"'});const t=e.id,r=null==e.type?void 0:a(e.type),s=null==e.owner_enterprise?void 0:u(e.owner_enterprise),l=null==e.parent?void 0:m(e.parent);if(null!=e.scope&&!(0,n.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "MetadataCascadePolicyInput"'});const d=null==e.scope?void 0:e.scope;if(null!=e.templateKey&&!(0,n.sdIsString)(e.templateKey))throw new i.BoxSdkError({message:'Expecting string for "templateKey" of type "MetadataCascadePolicyInput"'});const c=null==e.templateKey?void 0:e.templateKey;return{id:t,type:r,ownerEnterprise:s,parent:l,scope:d,templateKey:c}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("metadata_cascade_policy"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataCascadePolicyTypeField"})}function l(e){return e}function d(e){if("enterprise"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataCascadePolicyOwnerEnterpriseTypeField"})}function c(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function u(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataCascadePolicyOwnerEnterpriseField"'});const t=null==e.type?void 0:d(e.type);if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataCascadePolicyOwnerEnterpriseField"'});return{type:t,id:null==e.id?void 0:e.id}}function p(e){return e}function h(e){if("folder"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataCascadePolicyParentTypeField"})}function f(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function m(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataCascadePolicyParentField"'});const t=null==e.type?void 0:h(e.type);if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataCascadePolicyParentField"'});return{type:t,id:null==e.id?void 0:e.id}}t.MetadataCascadePolicy=class{constructor(e){this.type="metadata_cascade_policy",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.ownerEnterprise&&(this.ownerEnterprise=e.ownerEnterprise),e.parent&&(this.parent=e.parent),e.scope&&(this.scope=e.scope),e.templateKey&&(this.templateKey=e.templateKey),e.rawData&&(this.rawData=e.rawData)}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataFieldFilterDateRange=function(e){return{lt:null==e.lt?void 0:(0,i.serializeDateTime)(e.lt),gt:null==e.gt?void 0:(0,i.serializeDateTime)(e.gt)}},t.deserializeMetadataFieldFilterDateRange=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "MetadataFieldFilterDateRange"'});if(null!=e.lt&&!(0,s.sdIsString)(e.lt))throw new o.BoxSdkError({message:'Expecting string for "lt" of type "MetadataFieldFilterDateRange"'});const t=null==e.lt?void 0:(0,n.deserializeDateTime)(e.lt);if(null!=e.gt&&!(0,s.sdIsString)(e.gt))throw new o.BoxSdkError({message:'Expecting string for "gt" of type "MetadataFieldFilterDateRange"'});const r=null==e.gt?void 0:(0,n.deserializeDateTime)(e.gt);return{lt:t,gt:r}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793)},74955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString=function(e){if((0,d.sdIsString)(e))return e;if((0,l.sdIsNumber)(e))return e;if((0,c.sdIsList)(e))return e;try{return(0,i.serializeMetadataFieldFilterDateRange)(e)}catch(e){}try{return(0,o.serializeMetadataFieldFilterFloatRange)(e)}catch(e){}throw new a.BoxSdkError({message:"Can't serialize MetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString"})},t.deserializeMetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString=function(e){if((0,d.sdIsString)(e))return e;if((0,l.sdIsNumber)(e))return e;try{return(0,n.deserializeMetadataFieldFilterDateRange)(e)}catch(e){}try{return(0,s.deserializeMetadataFieldFilterFloatRange)(e)}catch(e){}throw new a.BoxSdkError({message:"Can't deserialize MetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString"})};const i=r(9010),n=r(9010),o=r(74854),s=r(74854),a=r(72631),l=r(50793),d=r(50793),c=r(50793)},74854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataFieldFilterFloatRange=function(e){return{lt:null==e.lt?void 0:e.lt,gt:null==e.gt?void 0:e.gt}},t.deserializeMetadataFieldFilterFloatRange=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataFieldFilterFloatRange"'});if(null!=e.lt&&!(0,n.sdIsNumber)(e.lt))throw new i.BoxSdkError({message:'Expecting number for "lt" of type "MetadataFieldFilterFloatRange"'});const t=null==e.lt?void 0:e.lt;if(null!=e.gt&&!(0,n.sdIsNumber)(e.gt))throw new i.BoxSdkError({message:'Expecting number for "gt" of type "MetadataFieldFilterFloatRange"'});const r=null==e.gt?void 0:e.gt;return{lt:t,gt:r}};const i=r(72631),n=r(50793),o=r(50793)},56211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataFilterScopeField=l,t.deserializeMetadataFilterScopeField=d,t.serializeMetadataFilter=function(e){return{scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,filters:null==e.filters?void 0:Object.fromEntries(Object.entries(e.filters).map((([e,t])=>[e,(0,i.serializeMetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString)(t)])))}},t.deserializeMetadataFilter=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "MetadataFilter"'});const t=null==e.scope?void 0:d(e.scope);if(null!=e.templateKey&&!(0,s.sdIsString)(e.templateKey))throw new o.BoxSdkError({message:'Expecting string for "templateKey" of type "MetadataFilter"'});const r=null==e.templateKey?void 0:e.templateKey;if(null!=e.filters&&!(0,a.sdIsMap)(e.filters))throw new o.BoxSdkError({message:'Expecting object for "filters" of type "MetadataFilter"'});const i=null==e.filters?void 0:(0,a.sdIsMap)(e.filters)?Object.fromEntries(Object.entries(e.filters).map((([e,t])=>[e,(0,n.deserializeMetadataFieldFilterDateRangeOrMetadataFieldFilterFloatRangeOrArrayOfStringOrNumberOrString)(t)]))):{};return{scope:t,templateKey:r,filters:i}};const i=r(74955),n=r(74955),o=r(72631),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("global"==e)return e;if("enterprise"==e)return e;if("enterprise_{enterprise_id}"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize MetadataFilterScopeField"})}},70376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataFull=function(e){const t=(0,i.serializeMetadata)(e);if(!(0,l.sdIsMap)(t))throw new n.BoxSdkError({message:'Expecting a map for "MetadataFull"'});return Object.assign(Object.assign({},t),Object.assign({$canEdit:null==e.canEdit?void 0:e.canEdit,$id:null==e.id?void 0:e.id,$type:null==e.type?void 0:e.type,$typeVersion:null==e.typeVersion?void 0:e.typeVersion},e.extraData))},t.deserializeMetadataFull=function(e){if(!(0,l.sdIsMap)(e))throw new n.BoxSdkError({message:'Expecting a map for "MetadataFull"'});if(null!=e.$canEdit&&!(0,o.sdIsBoolean)(e.$canEdit))throw new n.BoxSdkError({message:'Expecting boolean for "$canEdit" of type "MetadataFull"'});const t=null==e.$canEdit?void 0:e.$canEdit;if(null!=e.$id&&!(0,a.sdIsString)(e.$id))throw new n.BoxSdkError({message:'Expecting string for "$id" of type "MetadataFull"'});const r=null==e.$id?void 0:e.$id;if(null!=e.$type&&!(0,a.sdIsString)(e.$type))throw new n.BoxSdkError({message:'Expecting string for "$type" of type "MetadataFull"'});const i=null==e.$type?void 0:e.$type;if(null!=e.$typeVersion&&!(0,s.sdIsNumber)(e.$typeVersion))throw new n.BoxSdkError({message:'Expecting number for "$typeVersion" of type "MetadataFull"'});const d=null==e.$typeVersion?void 0:e.$typeVersion;if(null!=e&&!(0,l.sdIsMap)(e))throw new n.BoxSdkError({message:'Expecting object for "extraData" of type "MetadataFull"'});const c=null==e?void 0:(0,l.sdIsMap)(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t]))):{};if(null!=e.$parent&&!(0,a.sdIsString)(e.$parent))throw new n.BoxSdkError({message:'Expecting string for "$parent" of type "MetadataFull"'});const u=null==e.$parent?void 0:e.$parent;if(null!=e.$template&&!(0,a.sdIsString)(e.$template))throw new n.BoxSdkError({message:'Expecting string for "$template" of type "MetadataFull"'});const p=null==e.$template?void 0:e.$template;if(null!=e.$scope&&!(0,a.sdIsString)(e.$scope))throw new n.BoxSdkError({message:'Expecting string for "$scope" of type "MetadataFull"'});const h=null==e.$scope?void 0:e.$scope;if(null!=e.$version&&!(0,s.sdIsNumber)(e.$version))throw new n.BoxSdkError({message:'Expecting number for "$version" of type "MetadataFull"'});const f=null==e.$version?void 0:e.$version;return{canEdit:t,id:r,type:i,typeVersion:d,extraData:c,parent:u,template:p,scope:h,version:f}};const i=r(59997),n=r(72631),o=r(50793),s=r(50793),a=r(50793),l=r(50793)},26775:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataQueryOrderByDirectionField=l,t.deserializeMetadataQueryOrderByDirectionField=d,t.serializeMetadataQueryOrderByField=c,t.deserializeMetadataQueryOrderByField=u,t.serializeMetadataQuery=function(e){return{from:e.from,query:null==e.query?void 0:e.query,query_params:null==e.queryParams?void 0:e.queryParams,ancestor_folder_id:e.ancestorFolderId,order_by:null==e.orderBy?void 0:e.orderBy.map((function(e){return c(e)})),limit:null==e.limit?void 0:e.limit,marker:null==e.marker?void 0:e.marker,fields:null==e.fields?void 0:e.fields.map((function(e){return e}))}},t.deserializeMetadataQuery=function(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataQuery"'});if(null==e.from)throw new i.BoxSdkError({message:'Expecting "from" of type "MetadataQuery" to be defined'});if(!(0,o.sdIsString)(e.from))throw new i.BoxSdkError({message:'Expecting string for "from" of type "MetadataQuery"'});const t=e.from;if(null!=e.query&&!(0,o.sdIsString)(e.query))throw new i.BoxSdkError({message:'Expecting string for "query" of type "MetadataQuery"'});const r=null==e.query?void 0:e.query;if(null!=e.query_params&&!(0,a.sdIsMap)(e.query_params))throw new i.BoxSdkError({message:'Expecting object for "query_params" of type "MetadataQuery"'});const l=null==e.query_params?void 0:(0,a.sdIsMap)(e.query_params)?Object.fromEntries(Object.entries(e.query_params).map((([e,t])=>[e,function(e){if(!(0,o.sdIsString)(e))throw new i.BoxSdkError({message:'Expecting string for "MetadataQuery"'});return e}(t)]))):{};if(null==e.ancestor_folder_id)throw new i.BoxSdkError({message:'Expecting "ancestor_folder_id" of type "MetadataQuery" to be defined'});if(!(0,o.sdIsString)(e.ancestor_folder_id))throw new i.BoxSdkError({message:'Expecting string for "ancestor_folder_id" of type "MetadataQuery"'});const d=e.ancestor_folder_id;if(null!=e.order_by&&!(0,s.sdIsList)(e.order_by))throw new i.BoxSdkError({message:'Expecting array for "order_by" of type "MetadataQuery"'});const c=null==e.order_by?void 0:(0,s.sdIsList)(e.order_by)?e.order_by.map((function(e){return u(e)})):[];if(null!=e.limit&&!(0,n.sdIsNumber)(e.limit))throw new i.BoxSdkError({message:'Expecting number for "limit" of type "MetadataQuery"'});const p=null==e.limit?void 0:e.limit;if(null!=e.marker&&!(0,o.sdIsString)(e.marker))throw new i.BoxSdkError({message:'Expecting string for "marker" of type "MetadataQuery"'});const h=null==e.marker?void 0:e.marker;if(null!=e.fields&&!(0,s.sdIsList)(e.fields))throw new i.BoxSdkError({message:'Expecting array for "fields" of type "MetadataQuery"'});const f=null==e.fields?void 0:(0,s.sdIsList)(e.fields)?e.fields.map((function(e){if(!(0,o.sdIsString)(e))throw new i.BoxSdkError({message:'Expecting string for "MetadataQuery"'});return e})):[];return{from:t,query:r,queryParams:l,ancestorFolderId:d,orderBy:c,limit:p,marker:h,fields:f}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataQueryOrderByDirectionField"})}function c(e){return{field_key:null==e.fieldKey?void 0:e.fieldKey,direction:null==e.direction?void 0:e.direction}}function u(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataQueryOrderByField"'});if(null!=e.field_key&&!(0,o.sdIsString)(e.field_key))throw new i.BoxSdkError({message:'Expecting string for "field_key" of type "MetadataQueryOrderByField"'});return{fieldKey:null==e.field_key?void 0:e.field_key,direction:null==e.direction?void 0:d(e.direction)}}},90863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataQueryResults=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileFullOrFolderFull)(e)})),limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker}},t.deserializeMetadataQueryResults=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "MetadataQueryResults"'});if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "MetadataQueryResults"'});const t=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileFullOrFolderFull)(e)})):[];if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "MetadataQueryResults"'});const r=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "MetadataQueryResults"'});const i=null==e.next_marker?void 0:e.next_marker;return{entries:t,limit:r,nextMarker:i}};const i=r(19291),n=r(19291),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},81631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataTemplate=void 0,t.serializeMetadataTemplateTypeField=l,t.deserializeMetadataTemplateTypeField=d,t.serializeMetadataTemplateFieldsTypeField=c,t.deserializeMetadataTemplateFieldsTypeField=u,t.serializeMetadataTemplateFieldsOptionsField=p,t.deserializeMetadataTemplateFieldsOptionsField=h,t.serializeMetadataTemplateFieldsField=f,t.deserializeMetadataTemplateFieldsField=m,t.serializeMetadataTemplate=function(e){return{id:e.id,type:e.type,scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,fields:null==e.fields?void 0:e.fields.map((function(e){return f(e)})),copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy}},t.deserializeMetadataTemplate=function(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataTemplate"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "MetadataTemplate" to be defined'});if(!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataTemplate"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "MetadataTemplate" to be defined'});const r=d(e.type);if(null!=e.scope&&!(0,o.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "MetadataTemplate"'});const l=null==e.scope?void 0:e.scope;if(null!=e.templateKey&&!(0,o.sdIsString)(e.templateKey))throw new i.BoxSdkError({message:'Expecting string for "templateKey" of type "MetadataTemplate"'});const c=null==e.templateKey?void 0:e.templateKey;if(null!=e.displayName&&!(0,o.sdIsString)(e.displayName))throw new i.BoxSdkError({message:'Expecting string for "displayName" of type "MetadataTemplate"'});const u=null==e.displayName?void 0:e.displayName;if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "MetadataTemplate"'});const p=null==e.hidden?void 0:e.hidden;if(null!=e.fields&&!(0,s.sdIsList)(e.fields))throw new i.BoxSdkError({message:'Expecting array for "fields" of type "MetadataTemplate"'});const h=null==e.fields?void 0:(0,s.sdIsList)(e.fields)?e.fields.map((function(e){return m(e)})):[];if(null!=e.copyInstanceOnItemCopy&&!(0,n.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new i.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "MetadataTemplate"'});const f=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;return{id:t,type:r,scope:l,templateKey:c,displayName:u,hidden:p,fields:h,copyInstanceOnItemCopy:f}},t.serializeMetadataTemplateInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,scope:null==e.scope?void 0:e.scope,templateKey:null==e.templateKey?void 0:e.templateKey,displayName:null==e.displayName?void 0:e.displayName,hidden:null==e.hidden?void 0:e.hidden,fields:null==e.fields?void 0:e.fields.map((function(e){return f(e)})),copyInstanceOnItemCopy:null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy}},t.deserializeMetadataTemplateInput=function(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataTemplateInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "MetadataTemplateInput" to be defined'});if(!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataTemplateInput"'});const t=e.id,r=null==e.type?void 0:d(e.type);if(null!=e.scope&&!(0,o.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "MetadataTemplateInput"'});const l=null==e.scope?void 0:e.scope;if(null!=e.templateKey&&!(0,o.sdIsString)(e.templateKey))throw new i.BoxSdkError({message:'Expecting string for "templateKey" of type "MetadataTemplateInput"'});const c=null==e.templateKey?void 0:e.templateKey;if(null!=e.displayName&&!(0,o.sdIsString)(e.displayName))throw new i.BoxSdkError({message:'Expecting string for "displayName" of type "MetadataTemplateInput"'});const u=null==e.displayName?void 0:e.displayName;if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "MetadataTemplateInput"'});const p=null==e.hidden?void 0:e.hidden;if(null!=e.fields&&!(0,s.sdIsList)(e.fields))throw new i.BoxSdkError({message:'Expecting array for "fields" of type "MetadataTemplateInput"'});const h=null==e.fields?void 0:(0,s.sdIsList)(e.fields)?e.fields.map((function(e){return m(e)})):[];if(null!=e.copyInstanceOnItemCopy&&!(0,n.sdIsBoolean)(e.copyInstanceOnItemCopy))throw new i.BoxSdkError({message:'Expecting boolean for "copyInstanceOnItemCopy" of type "MetadataTemplateInput"'});const f=null==e.copyInstanceOnItemCopy?void 0:e.copyInstanceOnItemCopy;return{id:t,type:r,scope:l,templateKey:c,displayName:u,hidden:p,fields:h,copyInstanceOnItemCopy:f}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("metadata_template"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataTemplateTypeField"})}function c(e){return e}function u(e){if("string"==e)return e;if("float"==e)return e;if("date"==e)return e;if("enum"==e)return e;if("multiSelect"==e)return e;if("integer"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize MetadataTemplateFieldsTypeField"})}function p(e){return{key:e.key,id:null==e.id?void 0:e.id}}function h(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataTemplateFieldsOptionsField"'});if(null==e.key)throw new i.BoxSdkError({message:'Expecting "key" of type "MetadataTemplateFieldsOptionsField" to be defined'});if(!(0,o.sdIsString)(e.key))throw new i.BoxSdkError({message:'Expecting string for "key" of type "MetadataTemplateFieldsOptionsField"'});const t=e.key;if(null!=e.id&&!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataTemplateFieldsOptionsField"'});return{key:t,id:null==e.id?void 0:e.id}}function f(e){return{type:e.type,key:e.key,displayName:e.displayName,description:null==e.description?void 0:e.description,hidden:null==e.hidden?void 0:e.hidden,options:null==e.options?void 0:e.options.map((function(e){return p(e)})),id:null==e.id?void 0:e.id}}function m(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "MetadataTemplateFieldsField"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "MetadataTemplateFieldsField" to be defined'});const t=u(e.type);if(null==e.key)throw new i.BoxSdkError({message:'Expecting "key" of type "MetadataTemplateFieldsField" to be defined'});if(!(0,o.sdIsString)(e.key))throw new i.BoxSdkError({message:'Expecting string for "key" of type "MetadataTemplateFieldsField"'});const r=e.key;if(null==e.displayName)throw new i.BoxSdkError({message:'Expecting "displayName" of type "MetadataTemplateFieldsField" to be defined'});if(!(0,o.sdIsString)(e.displayName))throw new i.BoxSdkError({message:'Expecting string for "displayName" of type "MetadataTemplateFieldsField"'});const l=e.displayName;if(null!=e.description&&!(0,o.sdIsString)(e.description))throw new i.BoxSdkError({message:'Expecting string for "description" of type "MetadataTemplateFieldsField"'});const d=null==e.description?void 0:e.description;if(null!=e.hidden&&!(0,n.sdIsBoolean)(e.hidden))throw new i.BoxSdkError({message:'Expecting boolean for "hidden" of type "MetadataTemplateFieldsField"'});const c=null==e.hidden?void 0:e.hidden;if(null!=e.options&&!(0,s.sdIsList)(e.options))throw new i.BoxSdkError({message:'Expecting array for "options" of type "MetadataTemplateFieldsField"'});const p=null==e.options?void 0:(0,s.sdIsList)(e.options)?e.options.map((function(e){return h(e)})):[];if(null!=e.id&&!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "MetadataTemplateFieldsField"'});return{type:t,key:r,displayName:l,description:d,hidden:c,options:p,id:null==e.id?void 0:e.id}}t.MetadataTemplate=class{constructor(e){this.type="metadata_template",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.scope&&(this.scope=e.scope),e.templateKey&&(this.templateKey=e.templateKey),e.displayName&&(this.displayName=e.displayName),e.hidden&&(this.hidden=e.hidden),e.fields&&(this.fields=e.fields),e.copyInstanceOnItemCopy&&(this.copyInstanceOnItemCopy=e.copyInstanceOnItemCopy),e.rawData&&(this.rawData=e.rawData)}}},12444:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadataTemplates=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeMetadataTemplate)(e)}))}},t.deserializeMetadataTemplates=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "MetadataTemplates"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "MetadataTemplates"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "MetadataTemplates"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "MetadataTemplates"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "MetadataTemplates"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeMetadataTemplate)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(81631),n=r(81631),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},37418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeMetadatas=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeMetadata)(e)})),limit:null==e.limit?void 0:e.limit}},t.deserializeMetadatas=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Metadatas"'});if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Metadatas"'});const t=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeMetadata)(e)})):[];if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Metadatas"'});const r=null==e.limit?void 0:e.limit;return{entries:t,limit:r}};const i=r(59997),n=r(59997),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},24704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeOutcome=function(e){return{id:e.id,collaborators:null==e.collaborators?void 0:(0,i.serializeCollaboratorVariable)(e.collaborators),completion_rule:null==e.completionRule?void 0:(0,o.serializeCompletionRuleVariable)(e.completionRule),file_collaborator_role:null==e.fileCollaboratorRole?void 0:(0,a.serializeRoleVariable)(e.fileCollaboratorRole),task_collaborators:null==e.taskCollaborators?void 0:(0,i.serializeCollaboratorVariable)(e.taskCollaborators),role:null==e.role?void 0:(0,a.serializeRoleVariable)(e.role)}},t.deserializeOutcome=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "Outcome"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "Outcome" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "Outcome"'});const t=e.id,r=null==e.collaborators?void 0:(0,n.deserializeCollaboratorVariable)(e.collaborators),i=null==e.completion_rule?void 0:(0,s.deserializeCompletionRuleVariable)(e.completion_rule),o=null==e.file_collaborator_role?void 0:(0,l.deserializeRoleVariable)(e.file_collaborator_role),a=null==e.task_collaborators?void 0:(0,n.deserializeCollaboratorVariable)(e.task_collaborators),p=null==e.role?void 0:(0,l.deserializeRoleVariable)(e.role);return{id:t,collaborators:r,completionRule:i,fileCollaboratorRole:o,taskCollaborators:a,role:p}};const i=r(44432),n=r(44432),o=r(58524),s=r(58524),a=r(91236),l=r(91236),d=r(72631),c=r(50793),u=r(50793)},31227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializePostOAuth2Revoke=function(e){return{client_id:null==e.clientId?void 0:e.clientId,client_secret:null==e.clientSecret?void 0:e.clientSecret,token:null==e.token?void 0:e.token}},t.deserializePostOAuth2Revoke=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "PostOAuth2Revoke"'});if(null!=e.client_id&&!(0,n.sdIsString)(e.client_id))throw new i.BoxSdkError({message:'Expecting string for "client_id" of type "PostOAuth2Revoke"'});const t=null==e.client_id?void 0:e.client_id;if(null!=e.client_secret&&!(0,n.sdIsString)(e.client_secret))throw new i.BoxSdkError({message:'Expecting string for "client_secret" of type "PostOAuth2Revoke"'});const r=null==e.client_secret?void 0:e.client_secret;if(null!=e.token&&!(0,n.sdIsString)(e.token))throw new i.BoxSdkError({message:'Expecting string for "token" of type "PostOAuth2Revoke"'});const s=null==e.token?void 0:e.token;return{clientId:t,clientSecret:r,token:s}};const i=r(72631),n=r(50793),o=r(50793)},61734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializePostOAuth2TokenGrantTypeField=s,t.deserializePostOAuth2TokenGrantTypeField=a,t.serializePostOAuth2TokenSubjectTokenTypeField=l,t.deserializePostOAuth2TokenSubjectTokenTypeField=d,t.serializePostOAuth2TokenActorTokenTypeField=c,t.deserializePostOAuth2TokenActorTokenTypeField=u,t.serializePostOAuth2TokenBoxSubjectTypeField=p,t.deserializePostOAuth2TokenBoxSubjectTypeField=h,t.serializePostOAuth2Token=function(e){return{grant_type:e.grantType,client_id:null==e.clientId?void 0:e.clientId,client_secret:null==e.clientSecret?void 0:e.clientSecret,code:null==e.code?void 0:e.code,refresh_token:null==e.refreshToken?void 0:e.refreshToken,assertion:null==e.assertion?void 0:e.assertion,subject_token:null==e.subjectToken?void 0:e.subjectToken,subject_token_type:null==e.subjectTokenType?void 0:e.subjectTokenType,actor_token:null==e.actorToken?void 0:e.actorToken,actor_token_type:null==e.actorTokenType?void 0:e.actorTokenType,scope:null==e.scope?void 0:e.scope,resource:null==e.resource?void 0:e.resource,box_subject_type:null==e.boxSubjectType?void 0:e.boxSubjectType,box_subject_id:null==e.boxSubjectId?void 0:e.boxSubjectId,box_shared_link:null==e.boxSharedLink?void 0:e.boxSharedLink}},t.deserializePostOAuth2Token=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "PostOAuth2Token"'});if(null==e.grant_type)throw new i.BoxSdkError({message:'Expecting "grant_type" of type "PostOAuth2Token" to be defined'});const t=a(e.grant_type);if(null!=e.client_id&&!(0,n.sdIsString)(e.client_id))throw new i.BoxSdkError({message:'Expecting string for "client_id" of type "PostOAuth2Token"'});const r=null==e.client_id?void 0:e.client_id;if(null!=e.client_secret&&!(0,n.sdIsString)(e.client_secret))throw new i.BoxSdkError({message:'Expecting string for "client_secret" of type "PostOAuth2Token"'});const s=null==e.client_secret?void 0:e.client_secret;if(null!=e.code&&!(0,n.sdIsString)(e.code))throw new i.BoxSdkError({message:'Expecting string for "code" of type "PostOAuth2Token"'});const l=null==e.code?void 0:e.code;if(null!=e.refresh_token&&!(0,n.sdIsString)(e.refresh_token))throw new i.BoxSdkError({message:'Expecting string for "refresh_token" of type "PostOAuth2Token"'});const c=null==e.refresh_token?void 0:e.refresh_token;if(null!=e.assertion&&!(0,n.sdIsString)(e.assertion))throw new i.BoxSdkError({message:'Expecting string for "assertion" of type "PostOAuth2Token"'});const p=null==e.assertion?void 0:e.assertion;if(null!=e.subject_token&&!(0,n.sdIsString)(e.subject_token))throw new i.BoxSdkError({message:'Expecting string for "subject_token" of type "PostOAuth2Token"'});const f=null==e.subject_token?void 0:e.subject_token,m=null==e.subject_token_type?void 0:d(e.subject_token_type);if(null!=e.actor_token&&!(0,n.sdIsString)(e.actor_token))throw new i.BoxSdkError({message:'Expecting string for "actor_token" of type "PostOAuth2Token"'});const g=null==e.actor_token?void 0:e.actor_token,y=null==e.actor_token_type?void 0:u(e.actor_token_type);if(null!=e.scope&&!(0,n.sdIsString)(e.scope))throw new i.BoxSdkError({message:'Expecting string for "scope" of type "PostOAuth2Token"'});const v=null==e.scope?void 0:e.scope;if(null!=e.resource&&!(0,n.sdIsString)(e.resource))throw new i.BoxSdkError({message:'Expecting string for "resource" of type "PostOAuth2Token"'});const b=null==e.resource?void 0:e.resource,w=null==e.box_subject_type?void 0:h(e.box_subject_type);if(null!=e.box_subject_id&&!(0,n.sdIsString)(e.box_subject_id))throw new i.BoxSdkError({message:'Expecting string for "box_subject_id" of type "PostOAuth2Token"'});const _=null==e.box_subject_id?void 0:e.box_subject_id;if(null!=e.box_shared_link&&!(0,n.sdIsString)(e.box_shared_link))throw new i.BoxSdkError({message:'Expecting string for "box_shared_link" of type "PostOAuth2Token"'});const x=null==e.box_shared_link?void 0:e.box_shared_link;return{grantType:t,clientId:r,clientSecret:s,code:l,refreshToken:c,assertion:p,subjectToken:f,subjectTokenType:m,actorToken:g,actorTokenType:y,scope:v,resource:b,boxSubjectType:w,boxSubjectId:_,boxSharedLink:x}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("authorization_code"==e)return e;if("refresh_token"==e)return e;if("client_credentials"==e)return e;if("urn:ietf:params:oauth:grant-type:jwt-bearer"==e)return e;if("urn:ietf:params:oauth:grant-type:token-exchange"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize PostOAuth2TokenGrantTypeField"})}function l(e){return e}function d(e){if("urn:ietf:params:oauth:token-type:access_token"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize PostOAuth2TokenSubjectTokenTypeField"})}function c(e){return e}function u(e){if("urn:ietf:params:oauth:token-type:id_token"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize PostOAuth2TokenActorTokenTypeField"})}function p(e){return e}function h(e){if("enterprise"==e)return e;if("user"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize PostOAuth2TokenBoxSubjectTypeField"})}},67028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostOAuth2TokenRefreshAccessToken=void 0,t.serializePostOAuth2TokenRefreshAccessTokenGrantTypeField=s,t.deserializePostOAuth2TokenRefreshAccessTokenGrantTypeField=a,t.serializePostOAuth2TokenRefreshAccessToken=function(e){return{grant_type:e.grantType,client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken}},t.deserializePostOAuth2TokenRefreshAccessToken=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "PostOAuth2TokenRefreshAccessToken"'});if(null==e.grant_type)throw new i.BoxSdkError({message:'Expecting "grant_type" of type "PostOAuth2TokenRefreshAccessToken" to be defined'});const t=a(e.grant_type);if(null==e.client_id)throw new i.BoxSdkError({message:'Expecting "client_id" of type "PostOAuth2TokenRefreshAccessToken" to be defined'});if(!(0,n.sdIsString)(e.client_id))throw new i.BoxSdkError({message:'Expecting string for "client_id" of type "PostOAuth2TokenRefreshAccessToken"'});const r=e.client_id;if(null==e.client_secret)throw new i.BoxSdkError({message:'Expecting "client_secret" of type "PostOAuth2TokenRefreshAccessToken" to be defined'});if(!(0,n.sdIsString)(e.client_secret))throw new i.BoxSdkError({message:'Expecting string for "client_secret" of type "PostOAuth2TokenRefreshAccessToken"'});const s=e.client_secret;if(null==e.refresh_token)throw new i.BoxSdkError({message:'Expecting "refresh_token" of type "PostOAuth2TokenRefreshAccessToken" to be defined'});if(!(0,n.sdIsString)(e.refresh_token))throw new i.BoxSdkError({message:'Expecting string for "refresh_token" of type "PostOAuth2TokenRefreshAccessToken"'});const l=e.refresh_token;return{grantType:t,clientId:r,clientSecret:s,refreshToken:l}},t.serializePostOAuth2TokenRefreshAccessTokenInput=function(e){return{grantType:null==e.grantType?void 0:e.grantType,client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken}},t.deserializePostOAuth2TokenRefreshAccessTokenInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "PostOAuth2TokenRefreshAccessTokenInput"'});const t=null==e.grantType?void 0:a(e.grantType);if(null==e.client_id)throw new i.BoxSdkError({message:'Expecting "client_id" of type "PostOAuth2TokenRefreshAccessTokenInput" to be defined'});if(!(0,n.sdIsString)(e.client_id))throw new i.BoxSdkError({message:'Expecting string for "client_id" of type "PostOAuth2TokenRefreshAccessTokenInput"'});const r=e.client_id;if(null==e.client_secret)throw new i.BoxSdkError({message:'Expecting "client_secret" of type "PostOAuth2TokenRefreshAccessTokenInput" to be defined'});if(!(0,n.sdIsString)(e.client_secret))throw new i.BoxSdkError({message:'Expecting string for "client_secret" of type "PostOAuth2TokenRefreshAccessTokenInput"'});const s=e.client_secret;if(null==e.refresh_token)throw new i.BoxSdkError({message:'Expecting "refresh_token" of type "PostOAuth2TokenRefreshAccessTokenInput" to be defined'});if(!(0,n.sdIsString)(e.refresh_token))throw new i.BoxSdkError({message:'Expecting string for "refresh_token" of type "PostOAuth2TokenRefreshAccessTokenInput"'});const l=e.refresh_token;return{grantType:t,clientId:r,clientSecret:s,refreshToken:l}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("refresh_token"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize PostOAuth2TokenRefreshAccessTokenGrantTypeField"})}t.PostOAuth2TokenRefreshAccessToken=class{constructor(e){this.grantType="refresh_token",e.grantType&&(this.grantType=e.grantType),e.clientId&&(this.clientId=e.clientId),e.clientSecret&&(this.clientSecret=e.clientSecret),e.refreshToken&&(this.refreshToken=e.refreshToken),e.rawData&&(this.rawData=e.rawData)}}},25826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRealtimeServer=function(e){return{type:null==e.type?void 0:e.type,url:null==e.url?void 0:e.url,ttl:null==e.ttl?void 0:e.ttl,max_retries:null==e.maxRetries?void 0:e.maxRetries,retry_timeout:null==e.retryTimeout?void 0:e.retryTimeout}},t.deserializeRealtimeServer=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "RealtimeServer"'});if(null!=e.type&&!(0,o.sdIsString)(e.type))throw new i.BoxSdkError({message:'Expecting string for "type" of type "RealtimeServer"'});const t=null==e.type?void 0:e.type;if(null!=e.url&&!(0,o.sdIsString)(e.url))throw new i.BoxSdkError({message:'Expecting string for "url" of type "RealtimeServer"'});const r=null==e.url?void 0:e.url;if(null!=e.ttl&&!(0,o.sdIsString)(e.ttl))throw new i.BoxSdkError({message:'Expecting string for "ttl" of type "RealtimeServer"'});const a=null==e.ttl?void 0:e.ttl;if(null!=e.max_retries&&!(0,o.sdIsString)(e.max_retries))throw new i.BoxSdkError({message:'Expecting string for "max_retries" of type "RealtimeServer"'});const l=null==e.max_retries?void 0:e.max_retries;if(null!=e.retry_timeout&&!(0,n.sdIsNumber)(e.retry_timeout))throw new i.BoxSdkError({message:'Expecting number for "retry_timeout" of type "RealtimeServer"'});const d=null==e.retry_timeout?void 0:e.retry_timeout;return{type:t,url:r,ttl:a,maxRetries:l,retryTimeout:d}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793)},15135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRealtimeServers=function(e){return{chunk_size:null==e.chunkSize?void 0:e.chunkSize,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeRealtimeServer)(e)}))}},t.deserializeRealtimeServers=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "RealtimeServers"'});if(null!=e.chunk_size&&!(0,s.sdIsNumber)(e.chunk_size))throw new o.BoxSdkError({message:'Expecting number for "chunk_size" of type "RealtimeServers"'});const t=null==e.chunk_size?void 0:e.chunk_size;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "RealtimeServers"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeRealtimeServer)(e)})):[];return{chunkSize:t,entries:r}};const i=r(25826),n=r(25826),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},65176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRecentItemInteractionTypeField=c,t.deserializeRecentItemInteractionTypeField=u,t.serializeRecentItem=function(e){return{type:null==e.type?void 0:e.type,item:null==e.item?void 0:(0,i.serializeFileFullOrFolderFullOrWebLink)(e.item),interaction_type:null==e.interactionType?void 0:e.interactionType,interacted_at:null==e.interactedAt?void 0:(0,o.serializeDateTime)(e.interactedAt),interaction_shared_link:null==e.interactionSharedLink?void 0:e.interactionSharedLink}},t.deserializeRecentItem=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "RecentItem"'});if(null!=e.type&&!(0,l.sdIsString)(e.type))throw new a.BoxSdkError({message:'Expecting string for "type" of type "RecentItem"'});const t=null==e.type?void 0:e.type,r=null==e.item?void 0:(0,n.deserializeFileFullOrFolderFullOrWebLink)(e.item),i=null==e.interaction_type?void 0:u(e.interaction_type);if(null!=e.interacted_at&&!(0,l.sdIsString)(e.interacted_at))throw new a.BoxSdkError({message:'Expecting string for "interacted_at" of type "RecentItem"'});const o=null==e.interacted_at?void 0:(0,s.deserializeDateTime)(e.interacted_at);if(null!=e.interaction_shared_link&&!(0,l.sdIsString)(e.interaction_shared_link))throw new a.BoxSdkError({message:'Expecting string for "interaction_shared_link" of type "RecentItem"'});const c=null==e.interaction_shared_link?void 0:e.interaction_shared_link;return{type:t,item:r,interactionType:i,interactedAt:o,interactionSharedLink:c}};const i=r(58820),n=r(58820),o=r(93845),s=r(93845),a=r(72631),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("item_preview"==e)return e;if("item_upload"==e)return e;if("item_comment"==e)return e;if("item_open"==e)return e;if("item_modify"==e)return e;throw new a.BoxSdkError({message:"Can't deserialize RecentItemInteractionTypeField"})}},62325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRecentItems=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeRecentItem)(e)}))}},t.deserializeRecentItems=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "RecentItems"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "RecentItems"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "RecentItems"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "RecentItems"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "RecentItems"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeRecentItem)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(65176),n=r(65176),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},6756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRetentionPolicies=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeRetentionPolicy)(e)})),limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker}},t.deserializeRetentionPolicies=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "RetentionPolicies"'});if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "RetentionPolicies"'});const t=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeRetentionPolicy)(e)})):[];if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "RetentionPolicies"'});const r=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "RetentionPolicies"'});const i=null==e.next_marker?void 0:e.next_marker;return{entries:t,limit:r,nextMarker:i}};const i=r(60960),n=r(60960),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},60960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPolicy=void 0,t.serializeRetentionPolicyPolicyTypeField=v,t.deserializeRetentionPolicyPolicyTypeField=b,t.serializeRetentionPolicyRetentionTypeField=w,t.deserializeRetentionPolicyRetentionTypeField=_,t.serializeRetentionPolicyStatusField=x,t.deserializeRetentionPolicyStatusField=S,t.serializeRetentionPolicyAssignmentCountsField=k,t.deserializeRetentionPolicyAssignmentCountsField=E,t.serializeRetentionPolicy=function(e){const t=(0,o.serializeRetentionPolicyMini)(e);if(!(0,g.sdIsMap)(t))throw new u.BoxSdkError({message:'Expecting a map for "RetentionPolicy"'});return Object.assign(Object.assign({},t),{description:null==e.description?void 0:e.description,policy_type:null==e.policyType?void 0:e.policyType,retention_type:null==e.retentionType?void 0:e.retentionType,status:null==e.status?void 0:e.status,created_by:null==e.createdBy?void 0:(0,s.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,l.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,l.serializeDateTime)(e.modifiedAt),can_owner_extend_retention:null==e.canOwnerExtendRetention?void 0:e.canOwnerExtendRetention,are_owners_notified:null==e.areOwnersNotified?void 0:e.areOwnersNotified,custom_notification_recipients:null==e.customNotificationRecipients?void 0:e.customNotificationRecipients.map((function(e){return(0,s.serializeUserMini)(e)})),assignment_counts:null==e.assignmentCounts?void 0:k(e.assignmentCounts)})},t.deserializeRetentionPolicy=function(e){if(!(0,g.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RetentionPolicy"'});if(null!=e.description&&!(0,f.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "RetentionPolicy"'});const t=null==e.description?void 0:e.description,r=null==e.policy_type?void 0:b(e.policy_type),o=null==e.retention_type?void 0:_(e.retention_type),s=null==e.status?void 0:S(e.status),l=null==e.created_by?void 0:(0,a.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,f.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "RetentionPolicy"'});const c=null==e.created_at?void 0:(0,d.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,f.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "RetentionPolicy"'});const h=null==e.modified_at?void 0:(0,d.deserializeDateTime)(e.modified_at);if(null!=e.can_owner_extend_retention&&!(0,p.sdIsBoolean)(e.can_owner_extend_retention))throw new u.BoxSdkError({message:'Expecting boolean for "can_owner_extend_retention" of type "RetentionPolicy"'});const y=null==e.can_owner_extend_retention?void 0:e.can_owner_extend_retention;if(null!=e.are_owners_notified&&!(0,p.sdIsBoolean)(e.are_owners_notified))throw new u.BoxSdkError({message:'Expecting boolean for "are_owners_notified" of type "RetentionPolicy"'});const v=null==e.are_owners_notified?void 0:e.are_owners_notified;if(null!=e.custom_notification_recipients&&!(0,m.sdIsList)(e.custom_notification_recipients))throw new u.BoxSdkError({message:'Expecting array for "custom_notification_recipients" of type "RetentionPolicy"'});const w=null==e.custom_notification_recipients?void 0:(0,m.sdIsList)(e.custom_notification_recipients)?e.custom_notification_recipients.map((function(e){return(0,a.deserializeUserMini)(e)})):[],x=null==e.assignment_counts?void 0:E(e.assignment_counts);if(null!=e.policy_name&&!(0,f.sdIsString)(e.policy_name))throw new u.BoxSdkError({message:'Expecting string for "policy_name" of type "RetentionPolicy"'});const k=null==e.policy_name?void 0:e.policy_name;if(null!=e.retention_length&&!(0,f.sdIsString)(e.retention_length))throw new u.BoxSdkError({message:'Expecting string for "retention_length" of type "RetentionPolicy"'});const T=null==e.retention_length?void 0:e.retention_length,B=null==e.disposition_action?void 0:(0,n.deserializeRetentionPolicyMiniDispositionActionField)(e.disposition_action);if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "RetentionPolicy" to be defined'});if(!(0,f.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicy"'});const C=e.id;if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "RetentionPolicy" to be defined'});const I=(0,i.deserializeRetentionPolicyBaseTypeField)(e.type);return{description:t,policyType:r,retentionType:o,status:s,createdBy:l,createdAt:c,modifiedAt:h,canOwnerExtendRetention:y,areOwnersNotified:v,customNotificationRecipients:w,assignmentCounts:x,policyName:k,retentionLength:T,dispositionAction:B,id:C,type:I}};const i=r(63025),n=r(46855),o=r(46855),s=r(95408),a=r(95408),l=r(93845),d=r(93845),c=r(46855),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793),g=r(50793);class y extends c.RetentionPolicyMini{constructor(e){super(e)}}function v(e){return e}function b(e){if("finite"==e)return e;if("indefinite"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize RetentionPolicyPolicyTypeField"})}function w(e){return e}function _(e){if("modifiable"==e)return e;if("non_modifiable"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize RetentionPolicyRetentionTypeField"})}function x(e){return e}function S(e){if("active"==e)return e;if("retired"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize RetentionPolicyStatusField"})}function k(e){return{enterprise:null==e.enterprise?void 0:e.enterprise,folder:null==e.folder?void 0:e.folder,metadata_template:null==e.metadataTemplate?void 0:e.metadataTemplate}}function E(e){if(!(0,g.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignmentCountsField"'});if(null!=e.enterprise&&!(0,h.sdIsNumber)(e.enterprise))throw new u.BoxSdkError({message:'Expecting number for "enterprise" of type "RetentionPolicyAssignmentCountsField"'});const t=null==e.enterprise?void 0:e.enterprise;if(null!=e.folder&&!(0,h.sdIsNumber)(e.folder))throw new u.BoxSdkError({message:'Expecting number for "folder" of type "RetentionPolicyAssignmentCountsField"'});const r=null==e.folder?void 0:e.folder;if(null!=e.metadata_template&&!(0,h.sdIsNumber)(e.metadata_template))throw new u.BoxSdkError({message:'Expecting number for "metadata_template" of type "RetentionPolicyAssignmentCountsField"'});return{enterprise:t,folder:r,metadataTemplate:null==e.metadata_template?void 0:e.metadata_template}}t.RetentionPolicy=y},62261:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPolicyAssignment=void 0,t.serializeRetentionPolicyAssignmentTypeField=h,t.deserializeRetentionPolicyAssignmentTypeField=f,t.serializeRetentionPolicyAssignmentAssignedToTypeField=m,t.deserializeRetentionPolicyAssignmentAssignedToTypeField=g,t.serializeRetentionPolicyAssignmentAssignedToField=y,t.deserializeRetentionPolicyAssignmentAssignedToField=v,t.serializeRetentionPolicyAssignmentFilterFieldsField=b,t.deserializeRetentionPolicyAssignmentFilterFieldsField=w,t.serializeRetentionPolicyAssignment=function(e){return{id:e.id,type:e.type,retention_policy:null==e.retentionPolicy?void 0:(0,i.serializeRetentionPolicyMini)(e.retentionPolicy),assigned_to:null==e.assignedTo?void 0:y(e.assignedTo),filter_fields:null==e.filterFields?void 0:e.filterFields.map((function(e){return b(e)})),assigned_by:null==e.assignedBy?void 0:(0,o.serializeUserMini)(e.assignedBy),assigned_at:null==e.assignedAt?void 0:(0,a.serializeDateTime)(e.assignedAt),start_date_field:null==e.startDateField?void 0:e.startDateField}},t.deserializeRetentionPolicyAssignment=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignment"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "RetentionPolicyAssignment" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyAssignment"'});const t=e.id;if(null==e.type)throw new d.BoxSdkError({message:'Expecting "type" of type "RetentionPolicyAssignment" to be defined'});const r=f(e.type),i=null==e.retention_policy?void 0:(0,n.deserializeRetentionPolicyMini)(e.retention_policy),o=null==e.assigned_to?void 0:v(e.assigned_to);if(null!=e.filter_fields&&!(0,u.sdIsList)(e.filter_fields))throw new d.BoxSdkError({message:'Expecting array for "filter_fields" of type "RetentionPolicyAssignment"'});const a=null==e.filter_fields?void 0:(0,u.sdIsList)(e.filter_fields)?e.filter_fields.map((function(e){return w(e)})):[],h=null==e.assigned_by?void 0:(0,s.deserializeUserMini)(e.assigned_by);if(null!=e.assigned_at&&!(0,c.sdIsString)(e.assigned_at))throw new d.BoxSdkError({message:'Expecting string for "assigned_at" of type "RetentionPolicyAssignment"'});const m=null==e.assigned_at?void 0:(0,l.deserializeDateTime)(e.assigned_at);if(null!=e.start_date_field&&!(0,c.sdIsString)(e.start_date_field))throw new d.BoxSdkError({message:'Expecting string for "start_date_field" of type "RetentionPolicyAssignment"'});const g=null==e.start_date_field?void 0:e.start_date_field;return{id:t,type:r,retentionPolicy:i,assignedTo:o,filterFields:a,assignedBy:h,assignedAt:m,startDateField:g}},t.serializeRetentionPolicyAssignmentInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,retention_policy:null==e.retentionPolicy?void 0:(0,i.serializeRetentionPolicyMini)(e.retentionPolicy),assigned_to:null==e.assignedTo?void 0:y(e.assignedTo),filter_fields:null==e.filterFields?void 0:e.filterFields.map((function(e){return b(e)})),assigned_by:null==e.assignedBy?void 0:(0,o.serializeUserMini)(e.assignedBy),assigned_at:null==e.assignedAt?void 0:(0,a.serializeDateTime)(e.assignedAt),start_date_field:null==e.startDateField?void 0:e.startDateField}},t.deserializeRetentionPolicyAssignmentInput=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignmentInput"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "RetentionPolicyAssignmentInput" to be defined'});if(!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyAssignmentInput"'});const t=e.id,r=null==e.type?void 0:f(e.type),i=null==e.retention_policy?void 0:(0,n.deserializeRetentionPolicyMini)(e.retention_policy),o=null==e.assigned_to?void 0:v(e.assigned_to);if(null!=e.filter_fields&&!(0,u.sdIsList)(e.filter_fields))throw new d.BoxSdkError({message:'Expecting array for "filter_fields" of type "RetentionPolicyAssignmentInput"'});const a=null==e.filter_fields?void 0:(0,u.sdIsList)(e.filter_fields)?e.filter_fields.map((function(e){return w(e)})):[],h=null==e.assigned_by?void 0:(0,s.deserializeUserMini)(e.assigned_by);if(null!=e.assigned_at&&!(0,c.sdIsString)(e.assigned_at))throw new d.BoxSdkError({message:'Expecting string for "assigned_at" of type "RetentionPolicyAssignmentInput"'});const m=null==e.assigned_at?void 0:(0,l.deserializeDateTime)(e.assigned_at);if(null!=e.start_date_field&&!(0,c.sdIsString)(e.start_date_field))throw new d.BoxSdkError({message:'Expecting string for "start_date_field" of type "RetentionPolicyAssignmentInput"'});const g=null==e.start_date_field?void 0:e.start_date_field;return{id:t,type:r,retentionPolicy:i,assignedTo:o,filterFields:a,assignedBy:h,assignedAt:m,startDateField:g}};const i=r(46855),n=r(46855),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793);function h(e){return e}function f(e){if("retention_policy_assignment"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize RetentionPolicyAssignmentTypeField"})}function m(e){return e}function g(e){if("folder"==e)return e;if("enterprise"==e)return e;if("metadata_template"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize RetentionPolicyAssignmentAssignedToTypeField"})}function y(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function v(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignmentAssignedToField"'});if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyAssignmentAssignedToField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:g(e.type)}}function b(e){return{field:null==e.field?void 0:e.field,value:null==e.value?void 0:e.value}}function w(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignmentFilterFieldsField"'});if(null!=e.field&&!(0,c.sdIsString)(e.field))throw new d.BoxSdkError({message:'Expecting string for "field" of type "RetentionPolicyAssignmentFilterFieldsField"'});const t=null==e.field?void 0:e.field;if(null!=e.value&&!(0,c.sdIsString)(e.value))throw new d.BoxSdkError({message:'Expecting string for "value" of type "RetentionPolicyAssignmentFilterFieldsField"'});return{field:t,value:null==e.value?void 0:e.value}}t.RetentionPolicyAssignment=class{constructor(e){this.type="retention_policy_assignment",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.retentionPolicy&&(this.retentionPolicy=e.retentionPolicy),e.assignedTo&&(this.assignedTo=e.assignedTo),e.filterFields&&(this.filterFields=e.filterFields),e.assignedBy&&(this.assignedBy=e.assignedBy),e.assignedAt&&(this.assignedAt=e.assignedAt),e.startDateField&&(this.startDateField=e.startDateField),e.rawData&&(this.rawData=e.rawData)}}},86162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeRetentionPolicyAssignments=function(e){return{entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeRetentionPolicyAssignment)(e)})),limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker}},t.deserializeRetentionPolicyAssignments=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "RetentionPolicyAssignments"'});if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "RetentionPolicyAssignments"'});const t=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeRetentionPolicyAssignment)(e)})):[];if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "RetentionPolicyAssignments"'});const r=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "RetentionPolicyAssignments"'});const i=null==e.next_marker?void 0:e.next_marker;return{entries:t,limit:r,nextMarker:i}};const i=r(62261),n=r(62261),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},63025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPolicyBase=void 0,t.serializeRetentionPolicyBaseTypeField=s,t.deserializeRetentionPolicyBaseTypeField=a,t.serializeRetentionPolicyBase=function(e){return{id:e.id,type:e.type}},t.deserializeRetentionPolicyBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "RetentionPolicyBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "RetentionPolicyBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "RetentionPolicyBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeRetentionPolicyBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeRetentionPolicyBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "RetentionPolicyBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "RetentionPolicyBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("retention_policy"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize RetentionPolicyBaseTypeField"})}t.RetentionPolicyBase=class{constructor(e){this.type="retention_policy",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},46855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RetentionPolicyMini=void 0,t.serializeRetentionPolicyMiniDispositionActionField=c,t.deserializeRetentionPolicyMiniDispositionActionField=u,t.serializeRetentionPolicyMini=function(e){const t=(0,n.serializeRetentionPolicyBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "RetentionPolicyMini"'});return Object.assign(Object.assign({},t),{policy_name:null==e.policyName?void 0:e.policyName,retention_length:null==e.retentionLength?void 0:e.retentionLength,disposition_action:null==e.dispositionAction?void 0:e.dispositionAction})},t.deserializeRetentionPolicyMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "RetentionPolicyMini"'});if(null!=e.policy_name&&!(0,a.sdIsString)(e.policy_name))throw new s.BoxSdkError({message:'Expecting string for "policy_name" of type "RetentionPolicyMini"'});const t=null==e.policy_name?void 0:e.policy_name;if(null!=e.retention_length&&!(0,a.sdIsString)(e.retention_length))throw new s.BoxSdkError({message:'Expecting string for "retention_length" of type "RetentionPolicyMini"'});const r=null==e.retention_length?void 0:e.retention_length,n=null==e.disposition_action?void 0:u(e.disposition_action);if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "RetentionPolicyMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "RetentionPolicyMini"'});const o=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "RetentionPolicyMini" to be defined'});const d=(0,i.deserializeRetentionPolicyBaseTypeField)(e.type);return{policyName:t,retentionLength:r,dispositionAction:n,id:o,type:d}};const i=r(63025),n=r(63025),o=r(63025),s=r(72631),a=r(50793),l=r(50793);class d extends o.RetentionPolicyBase{constructor(e){super(e)}}function c(e){return e}function u(e){if("permanently_delete"==e)return e;if("remove_retention"==e)return e;throw new s.BoxSdkError({message:"Can't deserialize RetentionPolicyMiniDispositionActionField"})}t.RetentionPolicyMini=d},91236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RoleVariable=void 0,t.serializeRoleVariableTypeField=o,t.deserializeRoleVariableTypeField=s,t.serializeRoleVariableVariableTypeField=a,t.deserializeRoleVariableVariableTypeField=l,t.serializeRoleVariableVariableValueField=d,t.deserializeRoleVariableVariableValueField=c,t.serializeRoleVariable=function(e){return{type:e.type,variable_type:e.variableType,variable_value:e.variableValue}},t.deserializeRoleVariable=function(e){if(!(0,n.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "RoleVariable"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "RoleVariable" to be defined'});const t=s(e.type);if(null==e.variable_type)throw new i.BoxSdkError({message:'Expecting "variable_type" of type "RoleVariable" to be defined'});const r=l(e.variable_type);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "RoleVariable" to be defined'});const o=c(e.variable_value);return{type:t,variableType:r,variableValue:o}},t.serializeRoleVariableInput=function(e){return{type:null==e.type?void 0:e.type,variableType:null==e.variableType?void 0:e.variableType,variable_value:e.variableValue}},t.deserializeRoleVariableInput=function(e){if(!(0,n.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "RoleVariableInput"'});const t=null==e.type?void 0:s(e.type),r=null==e.variableType?void 0:l(e.variableType);if(null==e.variable_value)throw new i.BoxSdkError({message:'Expecting "variable_value" of type "RoleVariableInput" to be defined'});const o=c(e.variable_value);return{type:t,variableType:r,variableValue:o}};const i=r(72631),n=r(50793);function o(e){return e}function s(e){if("variable"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize RoleVariableTypeField"})}function a(e){return e}function l(e){if("collaborator_role"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize RoleVariableVariableTypeField"})}function d(e){return e}function c(e){if("editor"==e)return e;if("viewer"==e)return e;if("previewer"==e)return e;if("uploader"==e)return e;if("previewer uploader"==e)return e;if("viewer uploader"==e)return e;if("co-owner"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize RoleVariableVariableValueField"})}t.RoleVariable=class{constructor(e){this.type="variable",this.variableType="collaborator_role",e.type&&(this.type=e.type),e.variableType&&(this.variableType=e.variableType),e.variableValue&&(this.variableValue=e.variableValue),e.rawData&&(this.rawData=e.rawData)}}},27212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSearchResultWithSharedLink=function(e){return{accessible_via_shared_link:null==e.accessibleViaSharedLink?void 0:e.accessibleViaSharedLink,item:null==e.item?void 0:(0,i.serializeFileFullOrFolderFullOrWebLink)(e.item),type:null==e.type?void 0:e.type}},t.deserializeSearchResultWithSharedLink=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SearchResultWithSharedLink"'});if(null!=e.accessible_via_shared_link&&!(0,s.sdIsString)(e.accessible_via_shared_link))throw new o.BoxSdkError({message:'Expecting string for "accessible_via_shared_link" of type "SearchResultWithSharedLink"'});const t=null==e.accessible_via_shared_link?void 0:e.accessible_via_shared_link,r=null==e.item?void 0:(0,n.deserializeFileFullOrFolderFullOrWebLink)(e.item);if(null!=e.type&&!(0,s.sdIsString)(e.type))throw new o.BoxSdkError({message:'Expecting string for "type" of type "SearchResultWithSharedLink"'});const i=null==e.type?void 0:e.type;return{accessibleViaSharedLink:t,item:r,type:i}};const i=r(58820),n=r(58820),o=r(72631),s=r(50793),a=r(50793)},70618:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchResults=void 0,t.serializeSearchResultsTypeField=d,t.deserializeSearchResultsTypeField=c,t.serializeSearchResults=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,type:e.type,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileFullOrFolderFullOrWebLink)(e)}))}},t.deserializeSearchResults=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SearchResults"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "SearchResults"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SearchResults"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "SearchResults"'});const i=null==e.offset?void 0:e.offset;if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "SearchResults" to be defined'});const d=c(e.type);if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SearchResults"'});const u=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileFullOrFolderFullOrWebLink)(e)})):[];return{totalCount:t,limit:r,offset:i,type:d,entries:u}},t.serializeSearchResultsInput=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,type:null==e.type?void 0:e.type,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeFileFullOrFolderFullOrWebLink)(e)}))}},t.deserializeSearchResultsInput=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SearchResultsInput"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "SearchResultsInput"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SearchResultsInput"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "SearchResultsInput"'});const i=null==e.offset?void 0:e.offset,d=null==e.type?void 0:c(e.type);if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SearchResultsInput"'});const u=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFileFullOrFolderFullOrWebLink)(e)})):[];return{totalCount:t,limit:r,offset:i,type:d,entries:u}};const i=r(58820),n=r(58820),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("search_results_items"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize SearchResultsTypeField"})}t.SearchResults=class{constructor(e){this.type="search_results_items",e.totalCount&&(this.totalCount=e.totalCount),e.limit&&(this.limit=e.limit),e.offset&&(this.offset=e.offset),e.type&&(this.type=e.type),e.entries&&(this.entries=e.entries),e.rawData&&(this.rawData=e.rawData)}}},76427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSearchResultsOrSearchResultsWithSharedLinks=function(e){if("search_results_items"==e.type)return(0,i.serializeSearchResults)(e);if("search_results_with_shared_links"==e.type)return(0,o.serializeSearchResultsWithSharedLinks)(e);throw new a.BoxSdkError({message:"unknown type"})},t.deserializeSearchResultsOrSearchResultsWithSharedLinks=function(e){if(!(0,l.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "SearchResultsOrSearchResultsWithSharedLinks"'});if("search_results_items"==e.type)return(0,n.deserializeSearchResults)(e);if("search_results_with_shared_links"==e.type)return(0,s.deserializeSearchResultsWithSharedLinks)(e);throw new a.BoxSdkError({message:"Can't deserialize SearchResultsOrSearchResultsWithSharedLinks"})};const i=r(70618),n=r(70618),o=r(42984),s=r(42984),a=r(72631),l=r(50793)},42984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchResultsWithSharedLinks=void 0,t.serializeSearchResultsWithSharedLinksTypeField=d,t.deserializeSearchResultsWithSharedLinksTypeField=c,t.serializeSearchResultsWithSharedLinks=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,type:e.type,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeSearchResultWithSharedLink)(e)}))}},t.deserializeSearchResultsWithSharedLinks=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SearchResultsWithSharedLinks"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "SearchResultsWithSharedLinks"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SearchResultsWithSharedLinks"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "SearchResultsWithSharedLinks"'});const i=null==e.offset?void 0:e.offset;if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "SearchResultsWithSharedLinks" to be defined'});const d=c(e.type);if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SearchResultsWithSharedLinks"'});const u=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeSearchResultWithSharedLink)(e)})):[];return{totalCount:t,limit:r,offset:i,type:d,entries:u}},t.serializeSearchResultsWithSharedLinksInput=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,type:null==e.type?void 0:e.type,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeSearchResultWithSharedLink)(e)}))}},t.deserializeSearchResultsWithSharedLinksInput=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SearchResultsWithSharedLinksInput"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "SearchResultsWithSharedLinksInput"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SearchResultsWithSharedLinksInput"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "SearchResultsWithSharedLinksInput"'});const i=null==e.offset?void 0:e.offset,d=null==e.type?void 0:c(e.type);if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SearchResultsWithSharedLinksInput"'});const u=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeSearchResultWithSharedLink)(e)})):[];return{totalCount:t,limit:r,offset:i,type:d,entries:u}};const i=r(27212),n=r(27212),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("search_results_with_shared_links"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize SearchResultsWithSharedLinksTypeField"})}t.SearchResultsWithSharedLinks=class{constructor(e){this.type="search_results_with_shared_links",e.totalCount&&(this.totalCount=e.totalCount),e.limit&&(this.limit=e.limit),e.offset&&(this.offset=e.offset),e.type&&(this.type=e.type),e.entries&&(this.entries=e.entries),e.rawData&&(this.rawData=e.rawData)}}},19801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSessionTerminationMessage=function(e){return{message:null==e.message?void 0:e.message}},t.deserializeSessionTerminationMessage=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "SessionTerminationMessage"'});if(null!=e.message&&!(0,n.sdIsString)(e.message))throw new i.BoxSdkError({message:'Expecting string for "message" of type "SessionTerminationMessage"'});return{message:null==e.message?void 0:e.message}};const i=r(72631),n=r(50793),o=r(50793)},91616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierTypeField=p,t.deserializeShieldInformationBarrierTypeField=h,t.serializeShieldInformationBarrierStatusField=f,t.deserializeShieldInformationBarrierStatusField=m,t.serializeShieldInformationBarrier=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,enterprise:null==e.enterprise?void 0:(0,i.serializeEnterpriseBase)(e.enterprise),status:null==e.status?void 0:e.status,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserBase)(e.createdBy),updated_at:null==e.updatedAt?void 0:(0,a.serializeDateTime)(e.updatedAt),updated_by:null==e.updatedBy?void 0:(0,o.serializeUserBase)(e.updatedBy),enabled_at:null==e.enabledAt?void 0:(0,a.serializeDateTime)(e.enabledAt),enabled_by:null==e.enabledBy?void 0:(0,o.serializeUserBase)(e.enabledBy)}},t.deserializeShieldInformationBarrier=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrier"'});if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrier"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type),i=null==e.enterprise?void 0:(0,n.deserializeEnterpriseBase)(e.enterprise),o=null==e.status?void 0:m(e.status);if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "ShieldInformationBarrier"'});const a=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at),p=null==e.created_by?void 0:(0,s.deserializeUserBase)(e.created_by);if(null!=e.updated_at&&!(0,c.sdIsString)(e.updated_at))throw new d.BoxSdkError({message:'Expecting string for "updated_at" of type "ShieldInformationBarrier"'});const f=null==e.updated_at?void 0:(0,l.deserializeDateTime)(e.updated_at),g=null==e.updated_by?void 0:(0,s.deserializeUserBase)(e.updated_by);if(null!=e.enabled_at&&!(0,c.sdIsString)(e.enabled_at))throw new d.BoxSdkError({message:'Expecting string for "enabled_at" of type "ShieldInformationBarrier"'});const y=null==e.enabled_at?void 0:(0,l.deserializeDateTime)(e.enabled_at),v=null==e.enabled_by?void 0:(0,s.deserializeUserBase)(e.enabled_by);return{id:t,type:r,enterprise:i,status:o,createdAt:a,createdBy:p,updatedAt:f,updatedBy:g,enabledAt:y,enabledBy:v}};const i=r(75762),n=r(75762),o=r(78366),s=r(78366),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793);function p(e){return e}function h(e){if("shield_information_barrier"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierTypeField"})}function f(e){return e}function m(e){if("draft"==e)return e;if("pending"==e)return e;if("disabled"==e)return e;if("enabled"==e)return e;if("invalid"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierStatusField"})}},945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierBaseTypeField=s,t.deserializeShieldInformationBarrierBaseTypeField=a,t.serializeShieldInformationBarrierBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeShieldInformationBarrierBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("shield_information_barrier"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierBaseTypeField"})}},44345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierReference=function(e){return{shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,i.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier)}},t.deserializeShieldInformationBarrierReference=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReference"'});return{shieldInformationBarrier:null==e.shield_information_barrier?void 0:(0,n.deserializeShieldInformationBarrierBase)(e.shield_information_barrier)}};const i=r(945),n=r(945),o=r(72631),s=r(50793)},65382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierReportStatusField=g,t.deserializeShieldInformationBarrierReportStatusField=y,t.serializeShieldInformationBarrierReport=function(e){const t=(0,n.serializeShieldInformationBarrierReportBase)(e);if(!(0,m.sdIsMap)(t))throw new h.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReport"'});return Object.assign(Object.assign({},t),{shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,o.serializeShieldInformationBarrierReference)(e.shieldInformationBarrier),status:null==e.status?void 0:e.status,details:null==e.details?void 0:(0,a.serializeShieldInformationBarrierReportDetails)(e.details),created_at:null==e.createdAt?void 0:(0,u.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,d.serializeUserBase)(e.createdBy),updated_at:null==e.updatedAt?void 0:(0,u.serializeDateTime)(e.updatedAt)})},t.deserializeShieldInformationBarrierReport=function(e){if(!(0,m.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReport"'});const t=null==e.shield_information_barrier?void 0:(0,s.deserializeShieldInformationBarrierReference)(e.shield_information_barrier),r=null==e.status?void 0:y(e.status),n=null==e.details?void 0:(0,l.deserializeShieldInformationBarrierReportDetails)(e.details);if(null!=e.created_at&&!(0,f.sdIsString)(e.created_at))throw new h.BoxSdkError({message:'Expecting string for "created_at" of type "ShieldInformationBarrierReport"'});const o=null==e.created_at?void 0:(0,p.deserializeDateTime)(e.created_at),a=null==e.created_by?void 0:(0,c.deserializeUserBase)(e.created_by);if(null!=e.updated_at&&!(0,f.sdIsString)(e.updated_at))throw new h.BoxSdkError({message:'Expecting string for "updated_at" of type "ShieldInformationBarrierReport"'});const d=null==e.updated_at?void 0:(0,p.deserializeDateTime)(e.updated_at);if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new h.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierReport"'});const u=null==e.id?void 0:e.id,g=null==e.type?void 0:(0,i.deserializeShieldInformationBarrierReportBaseTypeField)(e.type);return{shieldInformationBarrier:t,status:r,details:n,createdAt:o,createdBy:a,updatedAt:d,id:u,type:g}};const i=r(66655),n=r(66655),o=r(44345),s=r(44345),a=r(83288),l=r(83288),d=r(78366),c=r(78366),u=r(93845),p=r(93845),h=r(72631),f=r(50793),m=r(50793);function g(e){return e}function y(e){if("pending"==e)return e;if("error"==e)return e;if("done"==e)return e;if("cancelled"==e)return e;throw new h.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierReportStatusField"})}},66655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierReportBaseTypeField=s,t.deserializeShieldInformationBarrierReportBaseTypeField=a,t.serializeShieldInformationBarrierReportBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeShieldInformationBarrierReportBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReportBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierReportBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("shield_information_barrier_report"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierReportBaseTypeField"})}},83288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierReportDetailsDetailsField=s,t.deserializeShieldInformationBarrierReportDetailsDetailsField=a,t.serializeShieldInformationBarrierReportDetails=function(e){return{details:null==e.details?void 0:s(e.details)}},t.deserializeShieldInformationBarrierReportDetails=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReportDetails"'});return{details:null==e.details?void 0:a(e.details)}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return{folder_id:null==e.folderId?void 0:e.folderId}}function a(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReportDetailsDetailsField"'});if(null!=e.folder_id&&!(0,n.sdIsString)(e.folder_id))throw new i.BoxSdkError({message:'Expecting string for "folder_id" of type "ShieldInformationBarrierReportDetailsDetailsField"'});return{folderId:null==e.folder_id?void 0:e.folder_id}}},89275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierReports=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeShieldInformationBarrierReport)(e)}))}},t.deserializeShieldInformationBarrierReports=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierReports"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "ShieldInformationBarrierReports"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "ShieldInformationBarrierReports"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "ShieldInformationBarrierReports"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeShieldInformationBarrierReport)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(65382),n=r(65382),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},77749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentTypeField=p,t.deserializeShieldInformationBarrierSegmentTypeField=h,t.serializeShieldInformationBarrierSegment=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,i.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserBase)(e.createdBy),updated_at:null==e.updatedAt?void 0:(0,a.serializeDateTime)(e.updatedAt),updated_by:null==e.updatedBy?void 0:(0,o.serializeUserBase)(e.updatedBy)}},t.deserializeShieldInformationBarrierSegment=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegment"'});if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegment"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type),i=null==e.shield_information_barrier?void 0:(0,n.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null!=e.name&&!(0,c.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "ShieldInformationBarrierSegment"'});const o=null==e.name?void 0:e.name;if(null!=e.description&&!(0,c.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "ShieldInformationBarrierSegment"'});const a=null==e.description?void 0:e.description;if(null!=e.created_at&&!(0,c.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "ShieldInformationBarrierSegment"'});const p=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at),f=null==e.created_by?void 0:(0,s.deserializeUserBase)(e.created_by);if(null!=e.updated_at&&!(0,c.sdIsString)(e.updated_at))throw new d.BoxSdkError({message:'Expecting string for "updated_at" of type "ShieldInformationBarrierSegment"'});const m=null==e.updated_at?void 0:(0,l.deserializeDateTime)(e.updated_at),g=null==e.updated_by?void 0:(0,s.deserializeUserBase)(e.updated_by);return{id:t,type:r,shieldInformationBarrier:i,name:o,description:a,createdAt:p,createdBy:f,updatedAt:m,updatedBy:g}};const i=r(945),n=r(945),o=r(78366),s=r(78366),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793);function p(e){return e}function h(e){if("shield_information_barrier_segment"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentTypeField"})}},17935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField=f,t.deserializeShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField=m,t.serializeShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField=g,t.deserializeShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField=y,t.serializeShieldInformationBarrierSegmentMember=function(e){const t=(0,n.serializeShieldInformationBarrierSegmentMemberMini)(e);if(!(0,h.sdIsMap)(t))throw new u.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMember"'});return Object.assign(Object.assign({},t),{shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,o.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),shield_information_barrier_segment:null==e.shieldInformationBarrierSegment?void 0:g(e.shieldInformationBarrierSegment),created_at:null==e.createdAt?void 0:(0,d.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,a.serializeUserBase)(e.createdBy),updated_at:null==e.updatedAt?void 0:(0,d.serializeDateTime)(e.updatedAt),updated_by:null==e.updatedBy?void 0:(0,a.serializeUserBase)(e.updatedBy)})},t.deserializeShieldInformationBarrierSegmentMember=function(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMember"'});const t=null==e.shield_information_barrier?void 0:(0,s.deserializeShieldInformationBarrierBase)(e.shield_information_barrier),r=null==e.shield_information_barrier_segment?void 0:y(e.shield_information_barrier_segment);if(null!=e.created_at&&!(0,p.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "ShieldInformationBarrierSegmentMember"'});const n=null==e.created_at?void 0:(0,c.deserializeDateTime)(e.created_at),o=null==e.created_by?void 0:(0,l.deserializeUserBase)(e.created_by);if(null!=e.updated_at&&!(0,p.sdIsString)(e.updated_at))throw new u.BoxSdkError({message:'Expecting string for "updated_at" of type "ShieldInformationBarrierSegmentMember"'});const a=null==e.updated_at?void 0:(0,c.deserializeDateTime)(e.updated_at),d=null==e.updated_by?void 0:(0,l.deserializeUserBase)(e.updated_by),f=null==e.user?void 0:(0,l.deserializeUserBase)(e.user);if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentMember"'});const m=null==e.id?void 0:e.id,g=null==e.type?void 0:(0,i.deserializeShieldInformationBarrierSegmentMemberBaseTypeField)(e.type);return{shieldInformationBarrier:t,shieldInformationBarrierSegment:r,createdAt:n,createdBy:o,updatedAt:a,updatedBy:d,user:f,id:m,type:g}};const i=r(27014),n=r(28760),o=r(945),s=r(945),a=r(78366),l=r(78366),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("shield_information_barrier_segment"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField"})}function g(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function y(e){if(!(0,h.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField"'});if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:m(e.type)}}},27014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentMemberBaseTypeField=s,t.deserializeShieldInformationBarrierSegmentMemberBaseTypeField=a,t.serializeShieldInformationBarrierSegmentMemberBase=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}},t.deserializeShieldInformationBarrierSegmentMemberBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMemberBase"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentMemberBase"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("shield_information_barrier_segment_member"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentMemberBaseTypeField"})}},28760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentMemberMini=function(e){const t=(0,n.serializeShieldInformationBarrierSegmentMemberBase)(e);if(!(0,d.sdIsMap)(t))throw new a.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMemberMini"'});return Object.assign(Object.assign({},t),{user:null==e.user?void 0:(0,o.serializeUserBase)(e.user)})},t.deserializeShieldInformationBarrierSegmentMemberMini=function(e){if(!(0,d.sdIsMap)(e))throw new a.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMemberMini"'});const t=null==e.user?void 0:(0,s.deserializeUserBase)(e.user);if(null!=e.id&&!(0,l.sdIsString)(e.id))throw new a.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentMemberMini"'});const r=null==e.id?void 0:e.id,n=null==e.type?void 0:(0,i.deserializeShieldInformationBarrierSegmentMemberBaseTypeField)(e.type);return{user:t,id:r,type:n}};const i=r(27014),n=r(27014),o=r(78366),s=r(78366),a=r(72631),l=r(50793),d=r(50793)},48620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentMembers=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeShieldInformationBarrierSegmentMember)(e)}))}},t.deserializeShieldInformationBarrierSegmentMembers=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentMembers"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "ShieldInformationBarrierSegmentMembers"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "ShieldInformationBarrierSegmentMembers"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "ShieldInformationBarrierSegmentMembers"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeShieldInformationBarrierSegmentMember)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(17935),n=r(17935),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},51325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentRestriction=function(e){const t=(0,s.serializeShieldInformationBarrierSegmentRestrictionMini)(e);if(!(0,m.sdIsMap)(t))throw new h.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestriction"'});return Object.assign(Object.assign({},t),{shield_information_barrier:null==e.shieldInformationBarrier?void 0:(0,a.serializeShieldInformationBarrierBase)(e.shieldInformationBarrier),created_at:null==e.createdAt?void 0:(0,u.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,d.serializeUserBase)(e.createdBy),updated_at:null==e.updatedAt?void 0:(0,u.serializeDateTime)(e.updatedAt),updated_by:null==e.updatedBy?void 0:(0,d.serializeUserBase)(e.updatedBy)})},t.deserializeShieldInformationBarrierSegmentRestriction=function(e){if(!(0,m.sdIsMap)(e))throw new h.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestriction"'});const t=null==e.shield_information_barrier?void 0:(0,l.deserializeShieldInformationBarrierBase)(e.shield_information_barrier);if(null!=e.created_at&&!(0,f.sdIsString)(e.created_at))throw new h.BoxSdkError({message:'Expecting string for "created_at" of type "ShieldInformationBarrierSegmentRestriction"'});const r=null==e.created_at?void 0:(0,p.deserializeDateTime)(e.created_at),s=null==e.created_by?void 0:(0,c.deserializeUserBase)(e.created_by);if(null!=e.updated_at&&!(0,f.sdIsString)(e.updated_at))throw new h.BoxSdkError({message:'Expecting string for "updated_at" of type "ShieldInformationBarrierSegmentRestriction"'});const a=null==e.updated_at?void 0:(0,p.deserializeDateTime)(e.updated_at),d=null==e.updated_by?void 0:(0,c.deserializeUserBase)(e.updated_by);if(null==e.shield_information_barrier_segment)throw new h.BoxSdkError({message:'Expecting "shield_information_barrier_segment" of type "ShieldInformationBarrierSegmentRestriction" to be defined'});const u=(0,n.deserializeShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField)(e.shield_information_barrier_segment);if(null==e.restricted_segment)throw new h.BoxSdkError({message:'Expecting "restricted_segment" of type "ShieldInformationBarrierSegmentRestriction" to be defined'});const g=(0,o.deserializeShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField)(e.restricted_segment),y=null==e.type?void 0:(0,i.deserializeShieldInformationBarrierSegmentRestrictionBaseTypeField)(e.type);if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new h.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentRestriction"'});const v=null==e.id?void 0:e.id;return{shieldInformationBarrier:t,createdAt:r,createdBy:s,updatedAt:a,updatedBy:d,shieldInformationBarrierSegment:u,restrictedSegment:g,type:y,id:v}};const i=r(95420),n=r(63346),o=r(63346),s=r(63346),a=r(945),l=r(945),d=r(78366),c=r(78366),u=r(93845),p=r(93845),h=r(72631),f=r(50793),m=r(50793)},95420:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentRestrictionBaseTypeField=s,t.deserializeShieldInformationBarrierSegmentRestrictionBaseTypeField=a,t.serializeShieldInformationBarrierSegmentRestrictionBase=function(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}},t.deserializeShieldInformationBarrierSegmentRestrictionBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictionBase"'});const t=null==e.type?void 0:a(e.type);if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentRestrictionBase"'});const r=null==e.id?void 0:e.id;return{type:t,id:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("shield_information_barrier_segment_restriction"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentRestrictionBaseTypeField"})}},63346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField=l,t.deserializeShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField=d,t.serializeShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField=c,t.deserializeShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField=u,t.serializeShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField=p,t.deserializeShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField=h,t.serializeShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField=f,t.deserializeShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField=m,t.serializeShieldInformationBarrierSegmentRestrictionMini=function(e){const t=(0,n.serializeShieldInformationBarrierSegmentRestrictionBase)(e);if(!(0,a.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictionMini"'});return Object.assign(Object.assign({},t),{shield_information_barrier_segment:c(e.shieldInformationBarrierSegment),restricted_segment:f(e.restrictedSegment)})},t.deserializeShieldInformationBarrierSegmentRestrictionMini=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictionMini"'});if(null==e.shield_information_barrier_segment)throw new o.BoxSdkError({message:'Expecting "shield_information_barrier_segment" of type "ShieldInformationBarrierSegmentRestrictionMini" to be defined'});const t=u(e.shield_information_barrier_segment);if(null==e.restricted_segment)throw new o.BoxSdkError({message:'Expecting "restricted_segment" of type "ShieldInformationBarrierSegmentRestrictionMini" to be defined'});const r=m(e.restricted_segment),n=null==e.type?void 0:(0,i.deserializeShieldInformationBarrierSegmentRestrictionBaseTypeField)(e.type);if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentRestrictionMini"'});const l=null==e.id?void 0:e.id;return{shieldInformationBarrierSegment:t,restrictedSegment:r,type:n,id:l}};const i=r(95420),n=r(95420),o=r(72631),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("shield_information_barrier_segment"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField"})}function c(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function u(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:d(e.type)}}function p(e){return e}function h(e){if("shield_information_barrier_segment"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField"})}function f(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function m(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:h(e.type)}}},10:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegmentRestrictions=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeShieldInformationBarrierSegmentRestriction)(e)}))}},t.deserializeShieldInformationBarrierSegmentRestrictions=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegmentRestrictions"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "ShieldInformationBarrierSegmentRestrictions"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "ShieldInformationBarrierSegmentRestrictions"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "ShieldInformationBarrierSegmentRestrictions"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeShieldInformationBarrierSegmentRestriction)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(51325),n=r(51325),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},59410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarrierSegments=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeShieldInformationBarrierSegment)(e)}))}},t.deserializeShieldInformationBarrierSegments=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarrierSegments"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "ShieldInformationBarrierSegments"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "ShieldInformationBarrierSegments"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "ShieldInformationBarrierSegments"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeShieldInformationBarrierSegment)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(77749),n=r(77749),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},38317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShieldInformationBarriers=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeShieldInformationBarrier)(e)}))}},t.deserializeShieldInformationBarriers=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ShieldInformationBarriers"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "ShieldInformationBarriers"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "ShieldInformationBarriers"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "ShieldInformationBarriers"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeShieldInformationBarrier)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(91616),n=r(91616),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},86982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestTypeField=_,t.deserializeSignRequestTypeField=x,t.serializeSignRequestStatusField=S,t.deserializeSignRequestStatusField=k,t.serializeSignRequestSignFilesField=E,t.deserializeSignRequestSignFilesField=T,t.serializeSignRequest=function(e){const t=(0,n.serializeSignRequestBase)(e);if(!(0,w.sdIsMap)(t))throw new m.BoxSdkError({message:'Expecting a map for "SignRequest"'});return Object.assign(Object.assign({},t),{type:null==e.type?void 0:e.type,source_files:null==e.sourceFiles?void 0:e.sourceFiles.map((function(e){return(0,o.serializeFileBase)(e)})),signers:null==e.signers?void 0:e.signers.map((function(e){return(0,a.serializeSignRequestSigner)(e)})),signature_color:null==e.signatureColor?void 0:e.signatureColor,id:null==e.id?void 0:e.id,prepare_url:null==e.prepareUrl?void 0:e.prepareUrl,signing_log:null==e.signingLog?void 0:(0,d.serializeFileMini)(e.signingLog),status:null==e.status?void 0:e.status,sign_files:null==e.signFiles?void 0:E(e.signFiles),auto_expire_at:null==e.autoExpireAt?void 0:(0,h.serializeDateTime)(e.autoExpireAt),parent_folder:null==e.parentFolder?void 0:(0,u.serializeFolderMini)(e.parentFolder)})},t.deserializeSignRequest=function(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "SignRequest"'});const t=null==e.type?void 0:x(e.type);if(null!=e.source_files&&!(0,b.sdIsList)(e.source_files))throw new m.BoxSdkError({message:'Expecting array for "source_files" of type "SignRequest"'});const r=null==e.source_files?void 0:(0,b.sdIsList)(e.source_files)?e.source_files.map((function(e){return(0,s.deserializeFileBase)(e)})):[];if(null!=e.signers&&!(0,b.sdIsList)(e.signers))throw new m.BoxSdkError({message:'Expecting array for "signers" of type "SignRequest"'});const n=null==e.signers?void 0:(0,b.sdIsList)(e.signers)?e.signers.map((function(e){return(0,l.deserializeSignRequestSigner)(e)})):[];if(null!=e.signature_color&&!(0,v.sdIsString)(e.signature_color))throw new m.BoxSdkError({message:'Expecting string for "signature_color" of type "SignRequest"'});const o=null==e.signature_color?void 0:e.signature_color;if(null!=e.id&&!(0,v.sdIsString)(e.id))throw new m.BoxSdkError({message:'Expecting string for "id" of type "SignRequest"'});const a=null==e.id?void 0:e.id;if(null!=e.prepare_url&&!(0,v.sdIsString)(e.prepare_url))throw new m.BoxSdkError({message:'Expecting string for "prepare_url" of type "SignRequest"'});const d=null==e.prepare_url?void 0:e.prepare_url,u=null==e.signing_log?void 0:(0,c.deserializeFileMini)(e.signing_log),h=null==e.status?void 0:k(e.status),_=null==e.sign_files?void 0:T(e.sign_files);if(null!=e.auto_expire_at&&!(0,v.sdIsString)(e.auto_expire_at))throw new m.BoxSdkError({message:'Expecting string for "auto_expire_at" of type "SignRequest"'});const S=null==e.auto_expire_at?void 0:(0,f.deserializeDateTime)(e.auto_expire_at),E=null==e.parent_folder?void 0:(0,p.deserializeFolderMini)(e.parent_folder);if(null!=e.is_document_preparation_needed&&!(0,g.sdIsBoolean)(e.is_document_preparation_needed))throw new m.BoxSdkError({message:'Expecting boolean for "is_document_preparation_needed" of type "SignRequest"'});const B=null==e.is_document_preparation_needed?void 0:e.is_document_preparation_needed;if(null!=e.redirect_url&&!(0,v.sdIsString)(e.redirect_url))throw new m.BoxSdkError({message:'Expecting string for "redirect_url" of type "SignRequest"'});const C=null==e.redirect_url?void 0:e.redirect_url;if(null!=e.declined_redirect_url&&!(0,v.sdIsString)(e.declined_redirect_url))throw new m.BoxSdkError({message:'Expecting string for "declined_redirect_url" of type "SignRequest"'});const I=null==e.declined_redirect_url?void 0:e.declined_redirect_url;if(null!=e.are_text_signatures_enabled&&!(0,g.sdIsBoolean)(e.are_text_signatures_enabled))throw new m.BoxSdkError({message:'Expecting boolean for "are_text_signatures_enabled" of type "SignRequest"'});const A=null==e.are_text_signatures_enabled?void 0:e.are_text_signatures_enabled;if(null!=e.email_subject&&!(0,v.sdIsString)(e.email_subject))throw new m.BoxSdkError({message:'Expecting string for "email_subject" of type "SignRequest"'});const F=null==e.email_subject?void 0:e.email_subject;if(null!=e.email_message&&!(0,v.sdIsString)(e.email_message))throw new m.BoxSdkError({message:'Expecting string for "email_message" of type "SignRequest"'});const M=null==e.email_message?void 0:e.email_message;if(null!=e.are_reminders_enabled&&!(0,g.sdIsBoolean)(e.are_reminders_enabled))throw new m.BoxSdkError({message:'Expecting boolean for "are_reminders_enabled" of type "SignRequest"'});const D=null==e.are_reminders_enabled?void 0:e.are_reminders_enabled;if(null!=e.name&&!(0,v.sdIsString)(e.name))throw new m.BoxSdkError({message:'Expecting string for "name" of type "SignRequest"'});const R=null==e.name?void 0:e.name;if(null!=e.prefill_tags&&!(0,b.sdIsList)(e.prefill_tags))throw new m.BoxSdkError({message:'Expecting array for "prefill_tags" of type "SignRequest"'});const P=null==e.prefill_tags?void 0:(0,b.sdIsList)(e.prefill_tags)?e.prefill_tags.map((function(e){return(0,i.deserializeSignRequestPrefillTag)(e)})):[];if(null!=e.days_valid&&!(0,y.sdIsNumber)(e.days_valid))throw new m.BoxSdkError({message:'Expecting number for "days_valid" of type "SignRequest"'});const O=null==e.days_valid?void 0:e.days_valid;if(null!=e.external_id&&!(0,v.sdIsString)(e.external_id))throw new m.BoxSdkError({message:'Expecting string for "external_id" of type "SignRequest"'});const z=null==e.external_id?void 0:e.external_id;if(null!=e.is_phone_verification_required_to_view&&!(0,g.sdIsBoolean)(e.is_phone_verification_required_to_view))throw new m.BoxSdkError({message:'Expecting boolean for "is_phone_verification_required_to_view" of type "SignRequest"'});const N=null==e.is_phone_verification_required_to_view?void 0:e.is_phone_verification_required_to_view;if(null!=e.template_id&&!(0,v.sdIsString)(e.template_id))throw new m.BoxSdkError({message:'Expecting string for "template_id" of type "SignRequest"'});const q=null==e.template_id?void 0:e.template_id;if(null!=e.external_system_name&&!(0,v.sdIsString)(e.external_system_name))throw new m.BoxSdkError({message:'Expecting string for "external_system_name" of type "SignRequest"'});const U=null==e.external_system_name?void 0:e.external_system_name;return{type:t,sourceFiles:r,signers:n,signatureColor:o,id:a,prepareUrl:d,signingLog:u,status:h,signFiles:_,autoExpireAt:S,parentFolder:E,isDocumentPreparationNeeded:B,redirectUrl:C,declinedRedirectUrl:I,areTextSignaturesEnabled:A,emailSubject:F,emailMessage:M,areRemindersEnabled:D,name:R,prefillTags:P,daysValid:O,externalId:z,isPhoneVerificationRequiredToView:N,templateId:q,externalSystemName:U}};const i=r(3798),n=r(32991),o=r(39455),s=r(39455),a=r(47636),l=r(47636),d=r(62929),c=r(62929),u=r(70343),p=r(70343),h=r(93845),f=r(93845),m=r(72631),g=r(50793),y=r(50793),v=r(50793),b=r(50793),w=r(50793);function _(e){return e}function x(e){if("sign-request"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize SignRequestTypeField"})}function S(e){return e}function k(e){if("converting"==e)return e;if("created"==e)return e;if("sent"==e)return e;if("viewed"==e)return e;if("signed"==e)return e;if("cancelled"==e)return e;if("declined"==e)return e;if("error_converting"==e)return e;if("error_sending"==e)return e;if("expired"==e)return e;if("finalizing"==e)return e;if("error_finalizing"==e)return e;throw new m.BoxSdkError({message:"Can't deserialize SignRequestStatusField"})}function E(e){return{files:null==e.files?void 0:e.files.map((function(e){return(0,d.serializeFileMini)(e)})),is_ready_for_download:null==e.isReadyForDownload?void 0:e.isReadyForDownload}}function T(e){if(!(0,w.sdIsMap)(e))throw new m.BoxSdkError({message:'Expecting a map for "SignRequestSignFilesField"'});if(null!=e.files&&!(0,b.sdIsList)(e.files))throw new m.BoxSdkError({message:'Expecting array for "files" of type "SignRequestSignFilesField"'});const t=null==e.files?void 0:(0,b.sdIsList)(e.files)?e.files.map((function(e){return(0,c.deserializeFileMini)(e)})):[];if(null!=e.is_ready_for_download&&!(0,g.sdIsBoolean)(e.is_ready_for_download))throw new m.BoxSdkError({message:'Expecting boolean for "is_ready_for_download" of type "SignRequestSignFilesField"'});return{files:t,isReadyForDownload:null==e.is_ready_for_download?void 0:e.is_ready_for_download}}},32991:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestBase=function(e){return{is_document_preparation_needed:null==e.isDocumentPreparationNeeded?void 0:e.isDocumentPreparationNeeded,redirect_url:null==e.redirectUrl?void 0:e.redirectUrl,declined_redirect_url:null==e.declinedRedirectUrl?void 0:e.declinedRedirectUrl,are_text_signatures_enabled:null==e.areTextSignaturesEnabled?void 0:e.areTextSignaturesEnabled,email_subject:null==e.emailSubject?void 0:e.emailSubject,email_message:null==e.emailMessage?void 0:e.emailMessage,are_reminders_enabled:null==e.areRemindersEnabled?void 0:e.areRemindersEnabled,name:null==e.name?void 0:e.name,prefill_tags:null==e.prefillTags?void 0:e.prefillTags.map((function(e){return(0,i.serializeSignRequestPrefillTag)(e)})),days_valid:null==e.daysValid?void 0:e.daysValid,external_id:null==e.externalId?void 0:e.externalId,is_phone_verification_required_to_view:null==e.isPhoneVerificationRequiredToView?void 0:e.isPhoneVerificationRequiredToView,template_id:null==e.templateId?void 0:e.templateId,external_system_name:null==e.externalSystemName?void 0:e.externalSystemName}},t.deserializeSignRequestBase=function(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SignRequestBase"'});if(null!=e.is_document_preparation_needed&&!(0,s.sdIsBoolean)(e.is_document_preparation_needed))throw new o.BoxSdkError({message:'Expecting boolean for "is_document_preparation_needed" of type "SignRequestBase"'});const t=null==e.is_document_preparation_needed?void 0:e.is_document_preparation_needed;if(null!=e.redirect_url&&!(0,l.sdIsString)(e.redirect_url))throw new o.BoxSdkError({message:'Expecting string for "redirect_url" of type "SignRequestBase"'});const r=null==e.redirect_url?void 0:e.redirect_url;if(null!=e.declined_redirect_url&&!(0,l.sdIsString)(e.declined_redirect_url))throw new o.BoxSdkError({message:'Expecting string for "declined_redirect_url" of type "SignRequestBase"'});const i=null==e.declined_redirect_url?void 0:e.declined_redirect_url;if(null!=e.are_text_signatures_enabled&&!(0,s.sdIsBoolean)(e.are_text_signatures_enabled))throw new o.BoxSdkError({message:'Expecting boolean for "are_text_signatures_enabled" of type "SignRequestBase"'});const u=null==e.are_text_signatures_enabled?void 0:e.are_text_signatures_enabled;if(null!=e.email_subject&&!(0,l.sdIsString)(e.email_subject))throw new o.BoxSdkError({message:'Expecting string for "email_subject" of type "SignRequestBase"'});const p=null==e.email_subject?void 0:e.email_subject;if(null!=e.email_message&&!(0,l.sdIsString)(e.email_message))throw new o.BoxSdkError({message:'Expecting string for "email_message" of type "SignRequestBase"'});const h=null==e.email_message?void 0:e.email_message;if(null!=e.are_reminders_enabled&&!(0,s.sdIsBoolean)(e.are_reminders_enabled))throw new o.BoxSdkError({message:'Expecting boolean for "are_reminders_enabled" of type "SignRequestBase"'});const f=null==e.are_reminders_enabled?void 0:e.are_reminders_enabled;if(null!=e.name&&!(0,l.sdIsString)(e.name))throw new o.BoxSdkError({message:'Expecting string for "name" of type "SignRequestBase"'});const m=null==e.name?void 0:e.name;if(null!=e.prefill_tags&&!(0,d.sdIsList)(e.prefill_tags))throw new o.BoxSdkError({message:'Expecting array for "prefill_tags" of type "SignRequestBase"'});const g=null==e.prefill_tags?void 0:(0,d.sdIsList)(e.prefill_tags)?e.prefill_tags.map((function(e){return(0,n.deserializeSignRequestPrefillTag)(e)})):[];if(null!=e.days_valid&&!(0,a.sdIsNumber)(e.days_valid))throw new o.BoxSdkError({message:'Expecting number for "days_valid" of type "SignRequestBase"'});const y=null==e.days_valid?void 0:e.days_valid;if(null!=e.external_id&&!(0,l.sdIsString)(e.external_id))throw new o.BoxSdkError({message:'Expecting string for "external_id" of type "SignRequestBase"'});const v=null==e.external_id?void 0:e.external_id;if(null!=e.is_phone_verification_required_to_view&&!(0,s.sdIsBoolean)(e.is_phone_verification_required_to_view))throw new o.BoxSdkError({message:'Expecting boolean for "is_phone_verification_required_to_view" of type "SignRequestBase"'});const b=null==e.is_phone_verification_required_to_view?void 0:e.is_phone_verification_required_to_view;if(null!=e.template_id&&!(0,l.sdIsString)(e.template_id))throw new o.BoxSdkError({message:'Expecting string for "template_id" of type "SignRequestBase"'});const w=null==e.template_id?void 0:e.template_id;if(null!=e.external_system_name&&!(0,l.sdIsString)(e.external_system_name))throw new o.BoxSdkError({message:'Expecting string for "external_system_name" of type "SignRequestBase"'});const _=null==e.external_system_name?void 0:e.external_system_name;return{isDocumentPreparationNeeded:t,redirectUrl:r,declinedRedirectUrl:i,areTextSignaturesEnabled:u,emailSubject:p,emailMessage:h,areRemindersEnabled:f,name:m,prefillTags:g,daysValid:y,externalId:v,isPhoneVerificationRequiredToView:b,templateId:w,externalSystemName:_}};const i=r(3798),n=r(3798),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793),c=r(50793)},32571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestCreateRequestSignatureColorField=y,t.deserializeSignRequestCreateRequestSignatureColorField=v,t.serializeSignRequestCreateRequest=function(e){const t=(0,n.serializeSignRequestBase)(e);if(!(0,g.sdIsMap)(t))throw new u.BoxSdkError({message:'Expecting a map for "SignRequestCreateRequest"'});return Object.assign(Object.assign({},t),{source_files:null==e.sourceFiles?void 0:e.sourceFiles.map((function(e){return(0,o.serializeFileBase)(e)})),signature_color:null==e.signatureColor?void 0:e.signatureColor,signers:e.signers.map((function(e){return(0,a.serializeSignRequestCreateSigner)(e)})),parent_folder:null==e.parentFolder?void 0:(0,d.serializeFolderMini)(e.parentFolder)})},t.deserializeSignRequestCreateRequest=function(e){if(!(0,g.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "SignRequestCreateRequest"'});if(null!=e.source_files&&!(0,m.sdIsList)(e.source_files))throw new u.BoxSdkError({message:'Expecting array for "source_files" of type "SignRequestCreateRequest"'});const t=null==e.source_files?void 0:(0,m.sdIsList)(e.source_files)?e.source_files.map((function(e){return(0,s.deserializeFileBase)(e)})):[],r=null==e.signature_color?void 0:v(e.signature_color);if(null==e.signers)throw new u.BoxSdkError({message:'Expecting "signers" of type "SignRequestCreateRequest" to be defined'});if(!(0,m.sdIsList)(e.signers))throw new u.BoxSdkError({message:'Expecting array for "signers" of type "SignRequestCreateRequest"'});const n=(0,m.sdIsList)(e.signers)?e.signers.map((function(e){return(0,l.deserializeSignRequestCreateSigner)(e)})):[],o=null==e.parent_folder?void 0:(0,c.deserializeFolderMini)(e.parent_folder);if(null!=e.is_document_preparation_needed&&!(0,p.sdIsBoolean)(e.is_document_preparation_needed))throw new u.BoxSdkError({message:'Expecting boolean for "is_document_preparation_needed" of type "SignRequestCreateRequest"'});const a=null==e.is_document_preparation_needed?void 0:e.is_document_preparation_needed;if(null!=e.redirect_url&&!(0,f.sdIsString)(e.redirect_url))throw new u.BoxSdkError({message:'Expecting string for "redirect_url" of type "SignRequestCreateRequest"'});const d=null==e.redirect_url?void 0:e.redirect_url;if(null!=e.declined_redirect_url&&!(0,f.sdIsString)(e.declined_redirect_url))throw new u.BoxSdkError({message:'Expecting string for "declined_redirect_url" of type "SignRequestCreateRequest"'});const y=null==e.declined_redirect_url?void 0:e.declined_redirect_url;if(null!=e.are_text_signatures_enabled&&!(0,p.sdIsBoolean)(e.are_text_signatures_enabled))throw new u.BoxSdkError({message:'Expecting boolean for "are_text_signatures_enabled" of type "SignRequestCreateRequest"'});const b=null==e.are_text_signatures_enabled?void 0:e.are_text_signatures_enabled;if(null!=e.email_subject&&!(0,f.sdIsString)(e.email_subject))throw new u.BoxSdkError({message:'Expecting string for "email_subject" of type "SignRequestCreateRequest"'});const w=null==e.email_subject?void 0:e.email_subject;if(null!=e.email_message&&!(0,f.sdIsString)(e.email_message))throw new u.BoxSdkError({message:'Expecting string for "email_message" of type "SignRequestCreateRequest"'});const _=null==e.email_message?void 0:e.email_message;if(null!=e.are_reminders_enabled&&!(0,p.sdIsBoolean)(e.are_reminders_enabled))throw new u.BoxSdkError({message:'Expecting boolean for "are_reminders_enabled" of type "SignRequestCreateRequest"'});const x=null==e.are_reminders_enabled?void 0:e.are_reminders_enabled;if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "SignRequestCreateRequest"'});const S=null==e.name?void 0:e.name;if(null!=e.prefill_tags&&!(0,m.sdIsList)(e.prefill_tags))throw new u.BoxSdkError({message:'Expecting array for "prefill_tags" of type "SignRequestCreateRequest"'});const k=null==e.prefill_tags?void 0:(0,m.sdIsList)(e.prefill_tags)?e.prefill_tags.map((function(e){return(0,i.deserializeSignRequestPrefillTag)(e)})):[];if(null!=e.days_valid&&!(0,h.sdIsNumber)(e.days_valid))throw new u.BoxSdkError({message:'Expecting number for "days_valid" of type "SignRequestCreateRequest"'});const E=null==e.days_valid?void 0:e.days_valid;if(null!=e.external_id&&!(0,f.sdIsString)(e.external_id))throw new u.BoxSdkError({message:'Expecting string for "external_id" of type "SignRequestCreateRequest"'});const T=null==e.external_id?void 0:e.external_id;if(null!=e.is_phone_verification_required_to_view&&!(0,p.sdIsBoolean)(e.is_phone_verification_required_to_view))throw new u.BoxSdkError({message:'Expecting boolean for "is_phone_verification_required_to_view" of type "SignRequestCreateRequest"'});const B=null==e.is_phone_verification_required_to_view?void 0:e.is_phone_verification_required_to_view;if(null!=e.template_id&&!(0,f.sdIsString)(e.template_id))throw new u.BoxSdkError({message:'Expecting string for "template_id" of type "SignRequestCreateRequest"'});const C=null==e.template_id?void 0:e.template_id;if(null!=e.external_system_name&&!(0,f.sdIsString)(e.external_system_name))throw new u.BoxSdkError({message:'Expecting string for "external_system_name" of type "SignRequestCreateRequest"'});const I=null==e.external_system_name?void 0:e.external_system_name;return{sourceFiles:t,signatureColor:r,signers:n,parentFolder:o,isDocumentPreparationNeeded:a,redirectUrl:d,declinedRedirectUrl:y,areTextSignaturesEnabled:b,emailSubject:w,emailMessage:_,areRemindersEnabled:x,name:S,prefillTags:k,daysValid:E,externalId:T,isPhoneVerificationRequiredToView:B,templateId:C,externalSystemName:I}};const i=r(3798),n=r(32991),o=r(39455),s=r(39455),a=r(15248),l=r(15248),d=r(70343),c=r(70343),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793),g=r(50793);function y(e){return e}function v(e){if("blue"==e)return e;if("black"==e)return e;if("red"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize SignRequestCreateRequestSignatureColorField"})}},15248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestCreateSignerRoleField=l,t.deserializeSignRequestCreateSignerRoleField=d,t.serializeSignRequestCreateSigner=function(e){return{email:null==e.email?void 0:e.email,role:null==e.role?void 0:e.role,is_in_person:null==e.isInPerson?void 0:e.isInPerson,order:null==e.order?void 0:e.order,embed_url_external_user_id:null==e.embedUrlExternalUserId?void 0:e.embedUrlExternalUserId,redirect_url:null==e.redirectUrl?void 0:e.redirectUrl,declined_redirect_url:null==e.declinedRedirectUrl?void 0:e.declinedRedirectUrl,login_required:null==e.loginRequired?void 0:e.loginRequired,verification_phone_number:null==e.verificationPhoneNumber?void 0:e.verificationPhoneNumber,password:null==e.password?void 0:e.password,signer_group_id:null==e.signerGroupId?void 0:e.signerGroupId,suppress_notifications:null==e.suppressNotifications?void 0:e.suppressNotifications}},t.deserializeSignRequestCreateSigner=function(e){if(!(0,a.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "SignRequestCreateSigner"'});if(null!=e.email&&!(0,s.sdIsString)(e.email))throw new i.BoxSdkError({message:'Expecting string for "email" of type "SignRequestCreateSigner"'});const t=null==e.email?void 0:e.email,r=null==e.role?void 0:d(e.role);if(null!=e.is_in_person&&!(0,n.sdIsBoolean)(e.is_in_person))throw new i.BoxSdkError({message:'Expecting boolean for "is_in_person" of type "SignRequestCreateSigner"'});const l=null==e.is_in_person?void 0:e.is_in_person;if(null!=e.order&&!(0,o.sdIsNumber)(e.order))throw new i.BoxSdkError({message:'Expecting number for "order" of type "SignRequestCreateSigner"'});const c=null==e.order?void 0:e.order;if(null!=e.embed_url_external_user_id&&!(0,s.sdIsString)(e.embed_url_external_user_id))throw new i.BoxSdkError({message:'Expecting string for "embed_url_external_user_id" of type "SignRequestCreateSigner"'});const u=null==e.embed_url_external_user_id?void 0:e.embed_url_external_user_id;if(null!=e.redirect_url&&!(0,s.sdIsString)(e.redirect_url))throw new i.BoxSdkError({message:'Expecting string for "redirect_url" of type "SignRequestCreateSigner"'});const p=null==e.redirect_url?void 0:e.redirect_url;if(null!=e.declined_redirect_url&&!(0,s.sdIsString)(e.declined_redirect_url))throw new i.BoxSdkError({message:'Expecting string for "declined_redirect_url" of type "SignRequestCreateSigner"'});const h=null==e.declined_redirect_url?void 0:e.declined_redirect_url;if(null!=e.login_required&&!(0,n.sdIsBoolean)(e.login_required))throw new i.BoxSdkError({message:'Expecting boolean for "login_required" of type "SignRequestCreateSigner"'});const f=null==e.login_required?void 0:e.login_required;if(null!=e.verification_phone_number&&!(0,s.sdIsString)(e.verification_phone_number))throw new i.BoxSdkError({message:'Expecting string for "verification_phone_number" of type "SignRequestCreateSigner"'});const m=null==e.verification_phone_number?void 0:e.verification_phone_number;if(null!=e.password&&!(0,s.sdIsString)(e.password))throw new i.BoxSdkError({message:'Expecting string for "password" of type "SignRequestCreateSigner"'});const g=null==e.password?void 0:e.password;if(null!=e.signer_group_id&&!(0,s.sdIsString)(e.signer_group_id))throw new i.BoxSdkError({message:'Expecting string for "signer_group_id" of type "SignRequestCreateSigner"'});const y=null==e.signer_group_id?void 0:e.signer_group_id;if(null!=e.suppress_notifications&&!(0,n.sdIsBoolean)(e.suppress_notifications))throw new i.BoxSdkError({message:'Expecting boolean for "suppress_notifications" of type "SignRequestCreateSigner"'});const v=null==e.suppress_notifications?void 0:e.suppress_notifications;return{email:t,role:r,isInPerson:l,order:c,embedUrlExternalUserId:u,redirectUrl:p,declinedRedirectUrl:h,loginRequired:f,verificationPhoneNumber:m,password:g,signerGroupId:y,suppressNotifications:v}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("signer"==e)return e;if("approver"==e)return e;if("final_copy_reader"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize SignRequestCreateSignerRoleField"})}},3798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestPrefillTag=function(e){return{document_tag_id:null==e.documentTagId?void 0:e.documentTagId,text_value:null==e.textValue?void 0:e.textValue,checkbox_value:null==e.checkboxValue?void 0:e.checkboxValue,date_value:null==e.dateValue?void 0:(0,i.serializeDate)(e.dateValue)}},t.deserializeSignRequestPrefillTag=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SignRequestPrefillTag"'});if(null!=e.document_tag_id&&!(0,a.sdIsString)(e.document_tag_id))throw new o.BoxSdkError({message:'Expecting string for "document_tag_id" of type "SignRequestPrefillTag"'});const t=null==e.document_tag_id?void 0:e.document_tag_id;if(null!=e.text_value&&!(0,a.sdIsString)(e.text_value))throw new o.BoxSdkError({message:'Expecting string for "text_value" of type "SignRequestPrefillTag"'});const r=null==e.text_value?void 0:e.text_value;if(null!=e.checkbox_value&&!(0,s.sdIsBoolean)(e.checkbox_value))throw new o.BoxSdkError({message:'Expecting boolean for "checkbox_value" of type "SignRequestPrefillTag"'});const i=null==e.checkbox_value?void 0:e.checkbox_value;if(null!=e.date_value&&!(0,a.sdIsString)(e.date_value))throw new o.BoxSdkError({message:'Expecting string for "date_value" of type "SignRequestPrefillTag"'});const d=null==e.date_value?void 0:(0,n.deserializeDate)(e.date_value);return{documentTagId:t,textValue:r,checkboxValue:i,dateValue:d}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},47636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestSignerSignerDecisionTypeField=m,t.deserializeSignRequestSignerSignerDecisionTypeField=g,t.serializeSignRequestSignerSignerDecisionField=y,t.deserializeSignRequestSignerSignerDecisionField=v,t.serializeSignRequestSigner=function(e){const t=(0,n.serializeSignRequestCreateSigner)(e);if(!(0,f.sdIsMap)(t))throw new d.BoxSdkError({message:'Expecting a map for "SignRequestSigner"'});return Object.assign(Object.assign({},t),{has_viewed_document:null==e.hasViewedDocument?void 0:e.hasViewedDocument,signer_decision:null==e.signerDecision?void 0:y(e.signerDecision),inputs:null==e.inputs?void 0:e.inputs.map((function(e){return(0,o.serializeSignRequestSignerInput)(e)})),embed_url:null==e.embedUrl?void 0:e.embedUrl,iframeable_embed_url:null==e.iframeableEmbedUrl?void 0:e.iframeableEmbedUrl})},t.deserializeSignRequestSigner=function(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignRequestSigner"'});if(null!=e.has_viewed_document&&!(0,c.sdIsBoolean)(e.has_viewed_document))throw new d.BoxSdkError({message:'Expecting boolean for "has_viewed_document" of type "SignRequestSigner"'});const t=null==e.has_viewed_document?void 0:e.has_viewed_document,r=null==e.signer_decision?void 0:v(e.signer_decision);if(null!=e.inputs&&!(0,h.sdIsList)(e.inputs))throw new d.BoxSdkError({message:'Expecting array for "inputs" of type "SignRequestSigner"'});const n=null==e.inputs?void 0:(0,h.sdIsList)(e.inputs)?e.inputs.map((function(e){return(0,s.deserializeSignRequestSignerInput)(e)})):[];if(null!=e.embed_url&&!(0,p.sdIsString)(e.embed_url))throw new d.BoxSdkError({message:'Expecting string for "embed_url" of type "SignRequestSigner"'});const o=null==e.embed_url?void 0:e.embed_url;if(null!=e.iframeable_embed_url&&!(0,p.sdIsString)(e.iframeable_embed_url))throw new d.BoxSdkError({message:'Expecting string for "iframeable_embed_url" of type "SignRequestSigner"'});const a=null==e.iframeable_embed_url?void 0:e.iframeable_embed_url;if(null!=e.email&&!(0,p.sdIsString)(e.email))throw new d.BoxSdkError({message:'Expecting string for "email" of type "SignRequestSigner"'});const l=null==e.email?void 0:e.email,m=null==e.role?void 0:(0,i.deserializeSignRequestCreateSignerRoleField)(e.role);if(null!=e.is_in_person&&!(0,c.sdIsBoolean)(e.is_in_person))throw new d.BoxSdkError({message:'Expecting boolean for "is_in_person" of type "SignRequestSigner"'});const g=null==e.is_in_person?void 0:e.is_in_person;if(null!=e.order&&!(0,u.sdIsNumber)(e.order))throw new d.BoxSdkError({message:'Expecting number for "order" of type "SignRequestSigner"'});const y=null==e.order?void 0:e.order;if(null!=e.embed_url_external_user_id&&!(0,p.sdIsString)(e.embed_url_external_user_id))throw new d.BoxSdkError({message:'Expecting string for "embed_url_external_user_id" of type "SignRequestSigner"'});const b=null==e.embed_url_external_user_id?void 0:e.embed_url_external_user_id;if(null!=e.redirect_url&&!(0,p.sdIsString)(e.redirect_url))throw new d.BoxSdkError({message:'Expecting string for "redirect_url" of type "SignRequestSigner"'});const w=null==e.redirect_url?void 0:e.redirect_url;if(null!=e.declined_redirect_url&&!(0,p.sdIsString)(e.declined_redirect_url))throw new d.BoxSdkError({message:'Expecting string for "declined_redirect_url" of type "SignRequestSigner"'});const _=null==e.declined_redirect_url?void 0:e.declined_redirect_url;if(null!=e.login_required&&!(0,c.sdIsBoolean)(e.login_required))throw new d.BoxSdkError({message:'Expecting boolean for "login_required" of type "SignRequestSigner"'});const x=null==e.login_required?void 0:e.login_required;if(null!=e.verification_phone_number&&!(0,p.sdIsString)(e.verification_phone_number))throw new d.BoxSdkError({message:'Expecting string for "verification_phone_number" of type "SignRequestSigner"'});const S=null==e.verification_phone_number?void 0:e.verification_phone_number;if(null!=e.password&&!(0,p.sdIsString)(e.password))throw new d.BoxSdkError({message:'Expecting string for "password" of type "SignRequestSigner"'});const k=null==e.password?void 0:e.password;if(null!=e.signer_group_id&&!(0,p.sdIsString)(e.signer_group_id))throw new d.BoxSdkError({message:'Expecting string for "signer_group_id" of type "SignRequestSigner"'});const E=null==e.signer_group_id?void 0:e.signer_group_id;if(null!=e.suppress_notifications&&!(0,c.sdIsBoolean)(e.suppress_notifications))throw new d.BoxSdkError({message:'Expecting boolean for "suppress_notifications" of type "SignRequestSigner"'});const T=null==e.suppress_notifications?void 0:e.suppress_notifications;return{hasViewedDocument:t,signerDecision:r,inputs:n,embedUrl:o,iframeableEmbedUrl:a,email:l,role:m,isInPerson:g,order:y,embedUrlExternalUserId:b,redirectUrl:w,declinedRedirectUrl:_,loginRequired:x,verificationPhoneNumber:S,password:k,signerGroupId:E,suppressNotifications:T}};const i=r(15248),n=r(15248),o=r(6992),s=r(6992),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793),f=r(50793);function m(e){return e}function g(e){if("signed"==e)return e;if("declined"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize SignRequestSignerSignerDecisionTypeField"})}function y(e){return{type:null==e.type?void 0:e.type,finalized_at:null==e.finalizedAt?void 0:(0,a.serializeDateTime)(e.finalizedAt),additional_info:null==e.additionalInfo?void 0:e.additionalInfo}}function v(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignRequestSignerSignerDecisionField"'});const t=null==e.type?void 0:g(e.type);if(null!=e.finalized_at&&!(0,p.sdIsString)(e.finalized_at))throw new d.BoxSdkError({message:'Expecting string for "finalized_at" of type "SignRequestSignerSignerDecisionField"'});const r=null==e.finalized_at?void 0:(0,l.deserializeDateTime)(e.finalized_at);if(null!=e.additional_info&&!(0,p.sdIsString)(e.additional_info))throw new d.BoxSdkError({message:'Expecting string for "additional_info" of type "SignRequestSignerSignerDecisionField"'});return{type:t,finalizedAt:r,additionalInfo:null==e.additional_info?void 0:e.additional_info}}},6992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequestSignerInputTypeField=c,t.deserializeSignRequestSignerInputTypeField=u,t.serializeSignRequestSignerInputContentTypeField=p,t.deserializeSignRequestSignerInputContentTypeField=h,t.serializeSignRequestSignerInput=function(e){const t=(0,n.serializeSignRequestPrefillTag)(e);if(!(0,d.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "SignRequestSignerInput"'});return Object.assign(Object.assign({},t),{type:null==e.type?void 0:e.type,content_type:null==e.contentType?void 0:e.contentType,page_index:e.pageIndex,read_only:null==e.readOnly?void 0:e.readOnly})},t.deserializeSignRequestSignerInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SignRequestSignerInput"'});const t=null==e.type?void 0:u(e.type),r=null==e.content_type?void 0:h(e.content_type);if(null==e.page_index)throw new o.BoxSdkError({message:'Expecting "page_index" of type "SignRequestSignerInput" to be defined'});if(!(0,a.sdIsNumber)(e.page_index))throw new o.BoxSdkError({message:'Expecting number for "page_index" of type "SignRequestSignerInput"'});const n=e.page_index;if(null!=e.read_only&&!(0,s.sdIsBoolean)(e.read_only))throw new o.BoxSdkError({message:'Expecting boolean for "read_only" of type "SignRequestSignerInput"'});const c=null==e.read_only?void 0:e.read_only;if(null!=e.document_tag_id&&!(0,l.sdIsString)(e.document_tag_id))throw new o.BoxSdkError({message:'Expecting string for "document_tag_id" of type "SignRequestSignerInput"'});const p=null==e.document_tag_id?void 0:e.document_tag_id;if(null!=e.text_value&&!(0,l.sdIsString)(e.text_value))throw new o.BoxSdkError({message:'Expecting string for "text_value" of type "SignRequestSignerInput"'});const f=null==e.text_value?void 0:e.text_value;if(null!=e.checkbox_value&&!(0,s.sdIsBoolean)(e.checkbox_value))throw new o.BoxSdkError({message:'Expecting boolean for "checkbox_value" of type "SignRequestSignerInput"'});const m=null==e.checkbox_value?void 0:e.checkbox_value;if(null!=e.date_value&&!(0,l.sdIsString)(e.date_value))throw new o.BoxSdkError({message:'Expecting string for "date_value" of type "SignRequestSignerInput"'});const g=null==e.date_value?void 0:(0,i.deserializeDate)(e.date_value);return{type:t,contentType:r,pageIndex:n,readOnly:c,documentTagId:p,textValue:f,checkboxValue:m,dateValue:g}};const i=r(93845),n=r(3798),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("signature"==e)return e;if("date"==e)return e;if("text"==e)return e;if("checkbox"==e)return e;if("radio"==e)return e;if("dropdown"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize SignRequestSignerInputTypeField"})}function p(e){return e}function h(e){if("signature"==e)return e;if("initial"==e)return e;if("stamp"==e)return e;if("date"==e)return e;if("checkbox"==e)return e;if("text"==e)return e;if("full_name"==e)return e;if("first_name"==e)return e;if("last_name"==e)return e;if("company"==e)return e;if("title"==e)return e;if("email"==e)return e;if("attachment"==e)return e;if("radio"==e)return e;if("dropdown"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize SignRequestSignerInputContentTypeField"})}},58267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignRequests=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeSignRequest)(e)}))}},t.deserializeSignRequests=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SignRequests"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SignRequests"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "SignRequests"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SignRequests"'});const i=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeSignRequest)(e)})):[];return{limit:t,nextMarker:r,entries:i}};const i=r(86982),n=r(86982),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},15139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignTemplateTypeField=m,t.deserializeSignTemplateTypeField=g,t.serializeSignTemplateAdditionalInfoNonEditableField=y,t.deserializeSignTemplateAdditionalInfoNonEditableField=v,t.serializeSignTemplateAdditionalInfoRequiredSignersField=b,t.deserializeSignTemplateAdditionalInfoRequiredSignersField=w,t.serializeSignTemplateAdditionalInfoRequiredField=_,t.deserializeSignTemplateAdditionalInfoRequiredField=x,t.serializeSignTemplateAdditionalInfoField=S,t.deserializeSignTemplateAdditionalInfoField=k,t.serializeSignTemplateReadySignLinkField=E,t.deserializeSignTemplateReadySignLinkField=T,t.serializeSignTemplateCustomBrandingField=B,t.deserializeSignTemplateCustomBrandingField=C,t.serializeSignTemplate=function(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,name:null==e.name?void 0:e.name,email_subject:null==e.emailSubject?void 0:e.emailSubject,email_message:null==e.emailMessage?void 0:e.emailMessage,days_valid:null==e.daysValid?void 0:e.daysValid,parent_folder:null==e.parentFolder?void 0:(0,i.serializeFolderMini)(e.parentFolder),source_files:null==e.sourceFiles?void 0:e.sourceFiles.map((function(e){return(0,o.serializeFileMini)(e)})),are_fields_locked:null==e.areFieldsLocked?void 0:e.areFieldsLocked,are_options_locked:null==e.areOptionsLocked?void 0:e.areOptionsLocked,are_recipients_locked:null==e.areRecipientsLocked?void 0:e.areRecipientsLocked,are_email_settings_locked:null==e.areEmailSettingsLocked?void 0:e.areEmailSettingsLocked,are_files_locked:null==e.areFilesLocked?void 0:e.areFilesLocked,signers:null==e.signers?void 0:e.signers.map((function(e){return(0,a.serializeTemplateSigner)(e)})),additional_info:null==e.additionalInfo?void 0:S(e.additionalInfo),ready_sign_link:null==e.readySignLink?void 0:E(e.readySignLink),custom_branding:null==e.customBranding?void 0:B(e.customBranding)}},t.deserializeSignTemplate=function(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignTemplate"'});const t=null==e.type?void 0:g(e.type);if(null!=e.id&&!(0,p.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "SignTemplate"'});const r=null==e.id?void 0:e.id;if(null!=e.name&&!(0,p.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "SignTemplate"'});const i=null==e.name?void 0:e.name;if(null!=e.email_subject&&!(0,p.sdIsString)(e.email_subject))throw new d.BoxSdkError({message:'Expecting string for "email_subject" of type "SignTemplate"'});const o=null==e.email_subject?void 0:e.email_subject;if(null!=e.email_message&&!(0,p.sdIsString)(e.email_message))throw new d.BoxSdkError({message:'Expecting string for "email_message" of type "SignTemplate"'});const a=null==e.email_message?void 0:e.email_message;if(null!=e.days_valid&&!(0,u.sdIsNumber)(e.days_valid))throw new d.BoxSdkError({message:'Expecting number for "days_valid" of type "SignTemplate"'});const m=null==e.days_valid?void 0:e.days_valid,y=null==e.parent_folder?void 0:(0,n.deserializeFolderMini)(e.parent_folder);if(null!=e.source_files&&!(0,h.sdIsList)(e.source_files))throw new d.BoxSdkError({message:'Expecting array for "source_files" of type "SignTemplate"'});const v=null==e.source_files?void 0:(0,h.sdIsList)(e.source_files)?e.source_files.map((function(e){return(0,s.deserializeFileMini)(e)})):[];if(null!=e.are_fields_locked&&!(0,c.sdIsBoolean)(e.are_fields_locked))throw new d.BoxSdkError({message:'Expecting boolean for "are_fields_locked" of type "SignTemplate"'});const b=null==e.are_fields_locked?void 0:e.are_fields_locked;if(null!=e.are_options_locked&&!(0,c.sdIsBoolean)(e.are_options_locked))throw new d.BoxSdkError({message:'Expecting boolean for "are_options_locked" of type "SignTemplate"'});const w=null==e.are_options_locked?void 0:e.are_options_locked;if(null!=e.are_recipients_locked&&!(0,c.sdIsBoolean)(e.are_recipients_locked))throw new d.BoxSdkError({message:'Expecting boolean for "are_recipients_locked" of type "SignTemplate"'});const _=null==e.are_recipients_locked?void 0:e.are_recipients_locked;if(null!=e.are_email_settings_locked&&!(0,c.sdIsBoolean)(e.are_email_settings_locked))throw new d.BoxSdkError({message:'Expecting boolean for "are_email_settings_locked" of type "SignTemplate"'});const x=null==e.are_email_settings_locked?void 0:e.are_email_settings_locked;if(null!=e.are_files_locked&&!(0,c.sdIsBoolean)(e.are_files_locked))throw new d.BoxSdkError({message:'Expecting boolean for "are_files_locked" of type "SignTemplate"'});const S=null==e.are_files_locked?void 0:e.are_files_locked;if(null!=e.signers&&!(0,h.sdIsList)(e.signers))throw new d.BoxSdkError({message:'Expecting array for "signers" of type "SignTemplate"'});const E=null==e.signers?void 0:(0,h.sdIsList)(e.signers)?e.signers.map((function(e){return(0,l.deserializeTemplateSigner)(e)})):[],B=null==e.additional_info?void 0:k(e.additional_info),I=null==e.ready_sign_link?void 0:T(e.ready_sign_link),A=null==e.custom_branding?void 0:C(e.custom_branding);return{type:t,id:r,name:i,emailSubject:o,emailMessage:a,daysValid:m,parentFolder:y,sourceFiles:v,areFieldsLocked:b,areOptionsLocked:w,areRecipientsLocked:_,areEmailSettingsLocked:x,areFilesLocked:S,signers:E,additionalInfo:B,readySignLink:I,customBranding:A}};const i=r(70343),n=r(70343),o=r(62929),s=r(62929),a=r(15048),l=r(15048),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793),f=r(50793);function m(e){return e}function g(e){if("sign-template"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize SignTemplateTypeField"})}function y(e){return e}function v(e){if("email_subject"==e)return e;if("email_message"==e)return e;if("name"==e)return e;if("days_valid"==e)return e;if("signers"==e)return e;if("source_files"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize SignTemplateAdditionalInfoNonEditableField"})}function b(e){return e}function w(e){if("email"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize SignTemplateAdditionalInfoRequiredSignersField"})}function _(e){return{signers:null==e.signers?void 0:e.signers.map((function(e){return e.map((function(e){return e}))}))}}function x(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignTemplateAdditionalInfoRequiredField"'});if(null!=e.signers&&!(0,h.sdIsList)(e.signers))throw new d.BoxSdkError({message:'Expecting array for "signers" of type "SignTemplateAdditionalInfoRequiredField"'});return{signers:null==e.signers?void 0:(0,h.sdIsList)(e.signers)?e.signers.map((function(e){return(0,h.sdIsList)(e)?e.map((function(e){return w(e)})):[]})):[]}}function S(e){return{non_editable:null==e.nonEditable?void 0:e.nonEditable.map((function(e){return e})),required:null==e.required?void 0:_(e.required)}}function k(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignTemplateAdditionalInfoField"'});if(null!=e.non_editable&&!(0,h.sdIsList)(e.non_editable))throw new d.BoxSdkError({message:'Expecting array for "non_editable" of type "SignTemplateAdditionalInfoField"'});return{nonEditable:null==e.non_editable?void 0:(0,h.sdIsList)(e.non_editable)?e.non_editable.map((function(e){return v(e)})):[],required:null==e.required?void 0:x(e.required)}}function E(e){return{url:null==e.url?void 0:e.url,name:null==e.name?void 0:e.name,instructions:null==e.instructions?void 0:e.instructions,folder_id:null==e.folderId?void 0:e.folderId,is_notification_disabled:null==e.isNotificationDisabled?void 0:e.isNotificationDisabled,is_active:null==e.isActive?void 0:e.isActive}}function T(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignTemplateReadySignLinkField"'});if(null!=e.url&&!(0,p.sdIsString)(e.url))throw new d.BoxSdkError({message:'Expecting string for "url" of type "SignTemplateReadySignLinkField"'});const t=null==e.url?void 0:e.url;if(null!=e.name&&!(0,p.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "SignTemplateReadySignLinkField"'});const r=null==e.name?void 0:e.name;if(null!=e.instructions&&!(0,p.sdIsString)(e.instructions))throw new d.BoxSdkError({message:'Expecting string for "instructions" of type "SignTemplateReadySignLinkField"'});const i=null==e.instructions?void 0:e.instructions;if(null!=e.folder_id&&!(0,p.sdIsString)(e.folder_id))throw new d.BoxSdkError({message:'Expecting string for "folder_id" of type "SignTemplateReadySignLinkField"'});const n=null==e.folder_id?void 0:e.folder_id;if(null!=e.is_notification_disabled&&!(0,c.sdIsBoolean)(e.is_notification_disabled))throw new d.BoxSdkError({message:'Expecting boolean for "is_notification_disabled" of type "SignTemplateReadySignLinkField"'});const o=null==e.is_notification_disabled?void 0:e.is_notification_disabled;if(null!=e.is_active&&!(0,c.sdIsBoolean)(e.is_active))throw new d.BoxSdkError({message:'Expecting boolean for "is_active" of type "SignTemplateReadySignLinkField"'});return{url:t,name:r,instructions:i,folderId:n,isNotificationDisabled:o,isActive:null==e.is_active?void 0:e.is_active}}function B(e){return{company_name:null==e.companyName?void 0:e.companyName,logo_uri:null==e.logoUri?void 0:e.logoUri,branding_color:null==e.brandingColor?void 0:e.brandingColor,email_footer_text:null==e.emailFooterText?void 0:e.emailFooterText}}function C(e){if(!(0,f.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "SignTemplateCustomBrandingField"'});if(null!=e.company_name&&!(0,p.sdIsString)(e.company_name))throw new d.BoxSdkError({message:'Expecting string for "company_name" of type "SignTemplateCustomBrandingField"'});const t=null==e.company_name?void 0:e.company_name;if(null!=e.logo_uri&&!(0,p.sdIsString)(e.logo_uri))throw new d.BoxSdkError({message:'Expecting string for "logo_uri" of type "SignTemplateCustomBrandingField"'});const r=null==e.logo_uri?void 0:e.logo_uri;if(null!=e.branding_color&&!(0,p.sdIsString)(e.branding_color))throw new d.BoxSdkError({message:'Expecting string for "branding_color" of type "SignTemplateCustomBrandingField"'});const i=null==e.branding_color?void 0:e.branding_color;if(null!=e.email_footer_text&&!(0,p.sdIsString)(e.email_footer_text))throw new d.BoxSdkError({message:'Expecting string for "email_footer_text" of type "SignTemplateCustomBrandingField"'});return{companyName:t,logoUri:r,brandingColor:i,emailFooterText:null==e.email_footer_text?void 0:e.email_footer_text}}},55064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignTemplates=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeSignTemplate)(e)}))}},t.deserializeSignTemplates=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SignTemplates"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "SignTemplates"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "SignTemplates"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "SignTemplates"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "SignTemplates"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeSignTemplate)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(15139),n=r(15139),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},75897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSkillCardsMetadata=function(e){return{$canEdit:null==e.canEdit?void 0:e.canEdit,$id:null==e.id?void 0:e.id,$parent:null==e.parent?void 0:e.parent,$scope:null==e.scope?void 0:e.scope,$template:null==e.template?void 0:e.template,$type:null==e.type?void 0:e.type,$typeVersion:null==e.typeVersion?void 0:e.typeVersion,$version:null==e.version?void 0:e.version,cards:null==e.cards?void 0:e.cards.map((function(e){return(0,i.serializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)}))}},t.deserializeSkillCardsMetadata=function(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "SkillCardsMetadata"'});if(null!=e.$canEdit&&!(0,s.sdIsBoolean)(e.$canEdit))throw new o.BoxSdkError({message:'Expecting boolean for "$canEdit" of type "SkillCardsMetadata"'});const t=null==e.$canEdit?void 0:e.$canEdit;if(null!=e.$id&&!(0,l.sdIsString)(e.$id))throw new o.BoxSdkError({message:'Expecting string for "$id" of type "SkillCardsMetadata"'});const r=null==e.$id?void 0:e.$id;if(null!=e.$parent&&!(0,l.sdIsString)(e.$parent))throw new o.BoxSdkError({message:'Expecting string for "$parent" of type "SkillCardsMetadata"'});const i=null==e.$parent?void 0:e.$parent;if(null!=e.$scope&&!(0,l.sdIsString)(e.$scope))throw new o.BoxSdkError({message:'Expecting string for "$scope" of type "SkillCardsMetadata"'});const u=null==e.$scope?void 0:e.$scope;if(null!=e.$template&&!(0,l.sdIsString)(e.$template))throw new o.BoxSdkError({message:'Expecting string for "$template" of type "SkillCardsMetadata"'});const p=null==e.$template?void 0:e.$template;if(null!=e.$type&&!(0,l.sdIsString)(e.$type))throw new o.BoxSdkError({message:'Expecting string for "$type" of type "SkillCardsMetadata"'});const h=null==e.$type?void 0:e.$type;if(null!=e.$typeVersion&&!(0,a.sdIsNumber)(e.$typeVersion))throw new o.BoxSdkError({message:'Expecting number for "$typeVersion" of type "SkillCardsMetadata"'});const f=null==e.$typeVersion?void 0:e.$typeVersion;if(null!=e.$version&&!(0,a.sdIsNumber)(e.$version))throw new o.BoxSdkError({message:'Expecting number for "$version" of type "SkillCardsMetadata"'});const m=null==e.$version?void 0:e.$version;if(null!=e.cards&&!(0,d.sdIsList)(e.cards))throw new o.BoxSdkError({message:'Expecting array for "cards" of type "SkillCardsMetadata"'});const g=null==e.cards?void 0:(0,d.sdIsList)(e.cards)?e.cards.map((function(e){return(0,n.deserializeKeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard)(e)})):[];return{canEdit:t,id:r,parent:i,scope:u,template:p,type:h,typeVersion:f,version:m,cards:g}};const i=r(20633),n=r(20633),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793),c=r(50793)},77421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusSkillCard=t.StatusSkillCardInvocationField=t.StatusSkillCardSkillField=void 0,t.serializeStatusSkillCardTypeField=l,t.deserializeStatusSkillCardTypeField=d,t.serializeStatusSkillCardSkillCardTypeField=c,t.deserializeStatusSkillCardSkillCardTypeField=u,t.serializeStatusSkillCardSkillCardTitleField=p,t.deserializeStatusSkillCardSkillCardTitleField=h,t.serializeStatusSkillCardStatusCodeField=f,t.deserializeStatusSkillCardStatusCodeField=m,t.serializeStatusSkillCardStatusField=g,t.deserializeStatusSkillCardStatusField=y,t.serializeStatusSkillCardSkillTypeField=v,t.deserializeStatusSkillCardSkillTypeField=b,t.serializeStatusSkillCardSkillField=w,t.deserializeStatusSkillCardSkillField=_,t.serializeStatusSkillCardSkillFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeStatusSkillCardSkillFieldInput=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardSkillFieldInput"'});const t=null==e.type?void 0:b(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StatusSkillCardSkillFieldInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StatusSkillCardSkillFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeStatusSkillCardInvocationTypeField=x,t.deserializeStatusSkillCardInvocationTypeField=S,t.serializeStatusSkillCardInvocationField=k,t.deserializeStatusSkillCardInvocationField=E,t.serializeStatusSkillCardInvocationFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeStatusSkillCardInvocationFieldInput=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardInvocationFieldInput"'});const t=null==e.type?void 0:S(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StatusSkillCardInvocationFieldInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StatusSkillCardInvocationFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeStatusSkillCard=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:e.type,skill_card_type:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:p(e.skillCardTitle),status:g(e.status),skill:w(e.skill),invocation:k(e.invocation)}},t.deserializeStatusSkillCard=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCard"'});if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "StatusSkillCard"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "StatusSkillCard" to be defined'});const r=d(e.type);if(null==e.skill_card_type)throw new o.BoxSdkError({message:'Expecting "skill_card_type" of type "StatusSkillCard" to be defined'});const i=u(e.skill_card_type),l=null==e.skill_card_title?void 0:h(e.skill_card_title);if(null==e.status)throw new o.BoxSdkError({message:'Expecting "status" of type "StatusSkillCard" to be defined'});const c=y(e.status);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "StatusSkillCard" to be defined'});const p=_(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "StatusSkillCard" to be defined'});const f=E(e.invocation);return{createdAt:t,type:r,skillCardType:i,skillCardTitle:l,status:c,skill:p,invocation:f}},t.serializeStatusSkillCardInput=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:null==e.type?void 0:e.type,skillCardType:null==e.skillCardType?void 0:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:p(e.skillCardTitle),status:g(e.status),skill:w(e.skill),invocation:k(e.invocation)}},t.deserializeStatusSkillCardInput=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardInput"'});if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "StatusSkillCardInput"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at),r=null==e.type?void 0:d(e.type),i=null==e.skillCardType?void 0:u(e.skillCardType),l=null==e.skill_card_title?void 0:h(e.skill_card_title);if(null==e.status)throw new o.BoxSdkError({message:'Expecting "status" of type "StatusSkillCardInput" to be defined'});const c=y(e.status);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "StatusSkillCardInput" to be defined'});const p=_(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "StatusSkillCardInput" to be defined'});const f=E(e.invocation);return{createdAt:t,type:r,skillCardType:i,skillCardTitle:l,status:c,skill:p,invocation:f}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793);t.StatusSkillCardSkillField=class{constructor(e){this.type="service",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};t.StatusSkillCardInvocationField=class{constructor(e){this.type="skill_invocation",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};function l(e){return e}function d(e){if("skill_card"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StatusSkillCardTypeField"})}function c(e){return e}function u(e){if("status"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StatusSkillCardSkillCardTypeField"})}function p(e){return{code:null==e.code?void 0:e.code,message:e.message}}function h(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardSkillCardTitleField"'});if(null!=e.code&&!(0,s.sdIsString)(e.code))throw new o.BoxSdkError({message:'Expecting string for "code" of type "StatusSkillCardSkillCardTitleField"'});const t=null==e.code?void 0:e.code;if(null==e.message)throw new o.BoxSdkError({message:'Expecting "message" of type "StatusSkillCardSkillCardTitleField" to be defined'});if(!(0,s.sdIsString)(e.message))throw new o.BoxSdkError({message:'Expecting string for "message" of type "StatusSkillCardSkillCardTitleField"'});return{code:t,message:e.message}}function f(e){return e}function m(e){if("invoked"==e)return e;if("processing"==e)return e;if("success"==e)return e;if("transient_failure"==e)return e;if("permanent_failure"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StatusSkillCardStatusCodeField"})}function g(e){return{code:e.code,message:null==e.message?void 0:e.message}}function y(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardStatusField"'});if(null==e.code)throw new o.BoxSdkError({message:'Expecting "code" of type "StatusSkillCardStatusField" to be defined'});const t=m(e.code);if(null!=e.message&&!(0,s.sdIsString)(e.message))throw new o.BoxSdkError({message:'Expecting string for "message" of type "StatusSkillCardStatusField"'});return{code:t,message:null==e.message?void 0:e.message}}function v(e){return e}function b(e){if("service"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StatusSkillCardSkillTypeField"})}function w(e){return{type:e.type,id:e.id}}function _(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardSkillField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "StatusSkillCardSkillField" to be defined'});const t=b(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StatusSkillCardSkillField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StatusSkillCardSkillField"'});return{type:t,id:e.id}}function x(e){return e}function S(e){if("skill_invocation"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StatusSkillCardInvocationTypeField"})}function k(e){return{type:e.type,id:e.id}}function E(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StatusSkillCardInvocationField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "StatusSkillCardInvocationField" to be defined'});const t=S(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StatusSkillCardInvocationField" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StatusSkillCardInvocationField"'});return{type:t,id:e.id}}t.StatusSkillCard=class{constructor(e){this.type="skill_card",this.skillCardType="status",e.createdAt&&(this.createdAt=e.createdAt),e.type&&(this.type=e.type),e.skillCardType&&(this.skillCardType=e.skillCardType),e.skillCardTitle&&(this.skillCardTitle=e.skillCardTitle),e.status&&(this.status=e.status),e.skill&&(this.skill=e.skill),e.invocation&&(this.invocation=e.invocation),e.rawData&&(this.rawData=e.rawData)}}},95199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeStoragePolicies=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeStoragePolicy)(e)}))}},t.deserializeStoragePolicies=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StoragePolicies"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "StoragePolicies"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "StoragePolicies"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "StoragePolicies"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "StoragePolicies"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeStoragePolicy)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(32735),n=r(32735),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},32735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePolicy=void 0,t.serializeStoragePolicy=function(e){const t=(0,n.serializeStoragePolicyMini)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "StoragePolicy"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name})},t.deserializeStoragePolicy=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "StoragePolicy"'});if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "StoragePolicy"'});const t=null==e.name?void 0:e.name;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "StoragePolicy" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicy"'});const r=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "StoragePolicy" to be defined'});const n=(0,i.deserializeStoragePolicyMiniTypeField)(e.type);return{name:t,id:r,type:n}};const i=r(42600),n=r(42600),o=r(42600),s=r(72631),a=r(50793),l=r(50793);class d extends o.StoragePolicyMini{constructor(e){super(e)}}t.StoragePolicy=d},66778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePolicyAssignment=void 0,t.serializeStoragePolicyAssignmentTypeField=l,t.deserializeStoragePolicyAssignmentTypeField=d,t.serializeStoragePolicyAssignmentAssignedToField=c,t.deserializeStoragePolicyAssignmentAssignedToField=u,t.serializeStoragePolicyAssignment=function(e){return{id:e.id,type:e.type,storage_policy:null==e.storagePolicy?void 0:(0,i.serializeStoragePolicyMini)(e.storagePolicy),assigned_to:null==e.assignedTo?void 0:c(e.assignedTo)}},t.deserializeStoragePolicyAssignment=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StoragePolicyAssignment"'});if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StoragePolicyAssignment" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicyAssignment"'});const t=e.id;if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "StoragePolicyAssignment" to be defined'});const r=d(e.type),i=null==e.storage_policy?void 0:(0,n.deserializeStoragePolicyMini)(e.storage_policy),l=null==e.assigned_to?void 0:u(e.assigned_to);return{id:t,type:r,storagePolicy:i,assignedTo:l}},t.serializeStoragePolicyAssignmentInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,storage_policy:null==e.storagePolicy?void 0:(0,i.serializeStoragePolicyMini)(e.storagePolicy),assigned_to:null==e.assignedTo?void 0:c(e.assignedTo)}},t.deserializeStoragePolicyAssignmentInput=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StoragePolicyAssignmentInput"'});if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "StoragePolicyAssignmentInput" to be defined'});if(!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicyAssignmentInput"'});const t=e.id,r=null==e.type?void 0:d(e.type),i=null==e.storage_policy?void 0:(0,n.deserializeStoragePolicyMini)(e.storage_policy),l=null==e.assigned_to?void 0:u(e.assigned_to);return{id:t,type:r,storagePolicy:i,assignedTo:l}};const i=r(42600),n=r(42600),o=r(72631),s=r(50793),a=r(50793);function l(e){return e}function d(e){if("storage_policy_assignment"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize StoragePolicyAssignmentTypeField"})}function c(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function u(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StoragePolicyAssignmentAssignedToField"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicyAssignmentAssignedToField"'});const t=null==e.id?void 0:e.id;if(null!=e.type&&!(0,s.sdIsString)(e.type))throw new o.BoxSdkError({message:'Expecting string for "type" of type "StoragePolicyAssignmentAssignedToField"'});return{id:t,type:null==e.type?void 0:e.type}}t.StoragePolicyAssignment=class{constructor(e){this.type="storage_policy_assignment",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.storagePolicy&&(this.storagePolicy=e.storagePolicy),e.assignedTo&&(this.assignedTo=e.assignedTo),e.rawData&&(this.rawData=e.rawData)}}},87335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeStoragePolicyAssignments=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeStoragePolicyAssignment)(e)}))}},t.deserializeStoragePolicyAssignments=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "StoragePolicyAssignments"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "StoragePolicyAssignments"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "StoragePolicyAssignments"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "StoragePolicyAssignments"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "StoragePolicyAssignments"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeStoragePolicyAssignment)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(66778),n=r(66778),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},42600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePolicyMini=void 0,t.serializeStoragePolicyMiniTypeField=s,t.deserializeStoragePolicyMiniTypeField=a,t.serializeStoragePolicyMini=function(e){return{id:e.id,type:e.type}},t.deserializeStoragePolicyMini=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "StoragePolicyMini"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "StoragePolicyMini" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicyMini"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "StoragePolicyMini" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeStoragePolicyMiniInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeStoragePolicyMiniInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "StoragePolicyMiniInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "StoragePolicyMiniInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "StoragePolicyMiniInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("storage_policy"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize StoragePolicyMiniTypeField"})}t.StoragePolicyMini=class{constructor(e){this.type="storage_policy",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},62125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTaskTypeField=m,t.deserializeTaskTypeField=g,t.serializeTaskActionField=y,t.deserializeTaskActionField=v,t.serializeTaskCompletionRuleField=b,t.deserializeTaskCompletionRuleField=w,t.serializeTask=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,item:null==e.item?void 0:(0,i.serializeFileMini)(e.item),due_at:null==e.dueAt?void 0:(0,d.serializeDateTime)(e.dueAt),action:null==e.action?void 0:e.action,message:null==e.message?void 0:e.message,task_assignment_collection:null==e.taskAssignmentCollection?void 0:(0,o.serializeTaskAssignments)(e.taskAssignmentCollection),is_completed:null==e.isCompleted?void 0:e.isCompleted,created_by:null==e.createdBy?void 0:(0,a.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,d.serializeDateTime)(e.createdAt),completion_rule:null==e.completionRule?void 0:e.completionRule}},t.deserializeTask=function(e){if(!(0,f.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "Task"'});if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "Task"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:g(e.type),i=null==e.item?void 0:(0,n.deserializeFileMini)(e.item);if(null!=e.due_at&&!(0,h.sdIsString)(e.due_at))throw new u.BoxSdkError({message:'Expecting string for "due_at" of type "Task"'});const o=null==e.due_at?void 0:(0,c.deserializeDateTime)(e.due_at),a=null==e.action?void 0:v(e.action);if(null!=e.message&&!(0,h.sdIsString)(e.message))throw new u.BoxSdkError({message:'Expecting string for "message" of type "Task"'});const d=null==e.message?void 0:e.message,m=null==e.task_assignment_collection?void 0:(0,s.deserializeTaskAssignments)(e.task_assignment_collection);if(null!=e.is_completed&&!(0,p.sdIsBoolean)(e.is_completed))throw new u.BoxSdkError({message:'Expecting boolean for "is_completed" of type "Task"'});const y=null==e.is_completed?void 0:e.is_completed,b=null==e.created_by?void 0:(0,l.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,h.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "Task"'});const _=null==e.created_at?void 0:(0,c.deserializeDateTime)(e.created_at),x=null==e.completion_rule?void 0:w(e.completion_rule);return{id:t,type:r,item:i,dueAt:o,action:a,message:d,taskAssignmentCollection:m,isCompleted:y,createdBy:b,createdAt:_,completionRule:x}};const i=r(62929),n=r(62929),o=r(85065),s=r(85065),a=r(95408),l=r(95408),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793),f=r(50793);function m(e){return e}function g(e){if("task"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TaskTypeField"})}function y(e){return e}function v(e){if("review"==e)return e;if("complete"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TaskActionField"})}function b(e){return e}function w(e){if("all_assignees"==e)return e;if("any_assignee"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TaskCompletionRuleField"})}},6884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTaskAssignmentTypeField=p,t.deserializeTaskAssignmentTypeField=h,t.serializeTaskAssignmentResolutionStateField=f,t.deserializeTaskAssignmentResolutionStateField=m,t.serializeTaskAssignment=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,item:null==e.item?void 0:(0,i.serializeFileMini)(e.item),assigned_to:null==e.assignedTo?void 0:(0,o.serializeUserMini)(e.assignedTo),message:null==e.message?void 0:e.message,completed_at:null==e.completedAt?void 0:(0,a.serializeDateTime)(e.completedAt),assigned_at:null==e.assignedAt?void 0:(0,a.serializeDateTime)(e.assignedAt),reminded_at:null==e.remindedAt?void 0:(0,a.serializeDateTime)(e.remindedAt),resolution_state:null==e.resolutionState?void 0:e.resolutionState,assigned_by:null==e.assignedBy?void 0:(0,o.serializeUserMini)(e.assignedBy)}},t.deserializeTaskAssignment=function(e){if(!(0,u.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TaskAssignment"'});if(null!=e.id&&!(0,c.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TaskAssignment"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:h(e.type),i=null==e.item?void 0:(0,n.deserializeFileMini)(e.item),o=null==e.assigned_to?void 0:(0,s.deserializeUserMini)(e.assigned_to);if(null!=e.message&&!(0,c.sdIsString)(e.message))throw new d.BoxSdkError({message:'Expecting string for "message" of type "TaskAssignment"'});const a=null==e.message?void 0:e.message;if(null!=e.completed_at&&!(0,c.sdIsString)(e.completed_at))throw new d.BoxSdkError({message:'Expecting string for "completed_at" of type "TaskAssignment"'});const p=null==e.completed_at?void 0:(0,l.deserializeDateTime)(e.completed_at);if(null!=e.assigned_at&&!(0,c.sdIsString)(e.assigned_at))throw new d.BoxSdkError({message:'Expecting string for "assigned_at" of type "TaskAssignment"'});const f=null==e.assigned_at?void 0:(0,l.deserializeDateTime)(e.assigned_at);if(null!=e.reminded_at&&!(0,c.sdIsString)(e.reminded_at))throw new d.BoxSdkError({message:'Expecting string for "reminded_at" of type "TaskAssignment"'});const g=null==e.reminded_at?void 0:(0,l.deserializeDateTime)(e.reminded_at),y=null==e.resolution_state?void 0:m(e.resolution_state),v=null==e.assigned_by?void 0:(0,s.deserializeUserMini)(e.assigned_by);return{id:t,type:r,item:i,assignedTo:o,message:a,completedAt:p,assignedAt:f,remindedAt:g,resolutionState:y,assignedBy:v}};const i=r(62929),n=r(62929),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793);function p(e){return e}function h(e){if("task_assignment"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TaskAssignmentTypeField"})}function f(e){return e}function m(e){if("completed"==e)return e;if("incomplete"==e)return e;if("approved"==e)return e;if("rejected"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TaskAssignmentResolutionStateField"})}},85065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTaskAssignments=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeTaskAssignment)(e)}))}},t.deserializeTaskAssignments=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TaskAssignments"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "TaskAssignments"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TaskAssignments"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeTaskAssignment)(e)})):[];return{totalCount:t,entries:r}};const i=r(6884),n=r(6884),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},46682:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTasks=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeTask)(e)}))}},t.deserializeTasks=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Tasks"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Tasks"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Tasks"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeTask)(e)})):[];return{totalCount:t,entries:r}};const i=r(62125),n=r(62125),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},15048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTemplateSignerRoleField=u,t.deserializeTemplateSignerRoleField=p,t.serializeTemplateSigner=function(e){return{inputs:null==e.inputs?void 0:e.inputs.map((function(e){return(0,i.serializeTemplateSignerInput)(e)})),email:null==e.email?void 0:e.email,role:null==e.role?void 0:e.role,is_in_person:null==e.isInPerson?void 0:e.isInPerson,order:null==e.order?void 0:e.order,signer_group_id:null==e.signerGroupId?void 0:e.signerGroupId,label:null==e.label?void 0:e.label,public_id:null==e.publicId?void 0:e.publicId}},t.deserializeTemplateSigner=function(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TemplateSigner"'});if(null!=e.inputs&&!(0,d.sdIsList)(e.inputs))throw new o.BoxSdkError({message:'Expecting array for "inputs" of type "TemplateSigner"'});const t=null==e.inputs?void 0:(0,d.sdIsList)(e.inputs)?e.inputs.map((function(e){return(0,n.deserializeTemplateSignerInput)(e)})):[];if(null!=e.email&&!(0,l.sdIsString)(e.email))throw new o.BoxSdkError({message:'Expecting string for "email" of type "TemplateSigner"'});const r=null==e.email?void 0:e.email,i=null==e.role?void 0:p(e.role);if(null!=e.is_in_person&&!(0,s.sdIsBoolean)(e.is_in_person))throw new o.BoxSdkError({message:'Expecting boolean for "is_in_person" of type "TemplateSigner"'});const u=null==e.is_in_person?void 0:e.is_in_person;if(null!=e.order&&!(0,a.sdIsNumber)(e.order))throw new o.BoxSdkError({message:'Expecting number for "order" of type "TemplateSigner"'});const h=null==e.order?void 0:e.order;if(null!=e.signer_group_id&&!(0,l.sdIsString)(e.signer_group_id))throw new o.BoxSdkError({message:'Expecting string for "signer_group_id" of type "TemplateSigner"'});const f=null==e.signer_group_id?void 0:e.signer_group_id;if(null!=e.label&&!(0,l.sdIsString)(e.label))throw new o.BoxSdkError({message:'Expecting string for "label" of type "TemplateSigner"'});const m=null==e.label?void 0:e.label;if(null!=e.public_id&&!(0,l.sdIsString)(e.public_id))throw new o.BoxSdkError({message:'Expecting string for "public_id" of type "TemplateSigner"'});const g=null==e.public_id?void 0:e.public_id;return{inputs:t,email:r,role:i,isInPerson:u,order:h,signerGroupId:f,label:m,publicId:g}};const i=r(8772),n=r(8772),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793),c=r(50793);function u(e){return e}function p(e){if("signer"==e)return e;if("approver"==e)return e;if("final_copy_reader"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TemplateSignerRoleField"})}},8772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTemplateSignerInputTypeField=u,t.deserializeTemplateSignerInputTypeField=p,t.serializeTemplateSignerInputContentTypeField=h,t.deserializeTemplateSignerInputContentTypeField=f,t.serializeTemplateSignerInputCoordinatesField=m,t.deserializeTemplateSignerInputCoordinatesField=g,t.serializeTemplateSignerInputDimensionsField=y,t.deserializeTemplateSignerInputDimensionsField=v,t.serializeTemplateSignerInput=function(e){const t=(0,n.serializeSignRequestPrefillTag)(e);if(!(0,c.sdIsMap)(t))throw new o.BoxSdkError({message:'Expecting a map for "TemplateSignerInput"'});return Object.assign(Object.assign({},t),{type:null==e.type?void 0:e.type,content_type:null==e.contentType?void 0:e.contentType,is_required:null==e.isRequired?void 0:e.isRequired,page_index:e.pageIndex,document_id:null==e.documentId?void 0:e.documentId,dropdown_choices:null==e.dropdownChoices?void 0:e.dropdownChoices.map((function(e){return e})),group_id:null==e.groupId?void 0:e.groupId,coordinates:null==e.coordinates?void 0:m(e.coordinates),dimensions:null==e.dimensions?void 0:y(e.dimensions),label:null==e.label?void 0:e.label,read_only:null==e.readOnly?void 0:e.readOnly})},t.deserializeTemplateSignerInput=function(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TemplateSignerInput"'});const t=null==e.type?void 0:p(e.type),r=null==e.content_type?void 0:f(e.content_type);if(null!=e.is_required&&!(0,s.sdIsBoolean)(e.is_required))throw new o.BoxSdkError({message:'Expecting boolean for "is_required" of type "TemplateSignerInput"'});const n=null==e.is_required?void 0:e.is_required;if(null==e.page_index)throw new o.BoxSdkError({message:'Expecting "page_index" of type "TemplateSignerInput" to be defined'});if(!(0,a.sdIsNumber)(e.page_index))throw new o.BoxSdkError({message:'Expecting number for "page_index" of type "TemplateSignerInput"'});const u=e.page_index;if(null!=e.document_id&&!(0,l.sdIsString)(e.document_id))throw new o.BoxSdkError({message:'Expecting string for "document_id" of type "TemplateSignerInput"'});const h=null==e.document_id?void 0:e.document_id;if(null!=e.dropdown_choices&&!(0,d.sdIsList)(e.dropdown_choices))throw new o.BoxSdkError({message:'Expecting array for "dropdown_choices" of type "TemplateSignerInput"'});const m=null==e.dropdown_choices?void 0:(0,d.sdIsList)(e.dropdown_choices)?e.dropdown_choices.map((function(e){if(!(0,l.sdIsString)(e))throw new o.BoxSdkError({message:'Expecting string for "TemplateSignerInput"'});return e})):[];if(null!=e.group_id&&!(0,l.sdIsString)(e.group_id))throw new o.BoxSdkError({message:'Expecting string for "group_id" of type "TemplateSignerInput"'});const y=null==e.group_id?void 0:e.group_id,b=null==e.coordinates?void 0:g(e.coordinates),w=null==e.dimensions?void 0:v(e.dimensions);if(null!=e.label&&!(0,l.sdIsString)(e.label))throw new o.BoxSdkError({message:'Expecting string for "label" of type "TemplateSignerInput"'});const _=null==e.label?void 0:e.label;if(null!=e.read_only&&!(0,s.sdIsBoolean)(e.read_only))throw new o.BoxSdkError({message:'Expecting boolean for "read_only" of type "TemplateSignerInput"'});const x=null==e.read_only?void 0:e.read_only;if(null!=e.document_tag_id&&!(0,l.sdIsString)(e.document_tag_id))throw new o.BoxSdkError({message:'Expecting string for "document_tag_id" of type "TemplateSignerInput"'});const S=null==e.document_tag_id?void 0:e.document_tag_id;if(null!=e.text_value&&!(0,l.sdIsString)(e.text_value))throw new o.BoxSdkError({message:'Expecting string for "text_value" of type "TemplateSignerInput"'});const k=null==e.text_value?void 0:e.text_value;if(null!=e.checkbox_value&&!(0,s.sdIsBoolean)(e.checkbox_value))throw new o.BoxSdkError({message:'Expecting boolean for "checkbox_value" of type "TemplateSignerInput"'});const E=null==e.checkbox_value?void 0:e.checkbox_value;if(null!=e.date_value&&!(0,l.sdIsString)(e.date_value))throw new o.BoxSdkError({message:'Expecting string for "date_value" of type "TemplateSignerInput"'});const T=null==e.date_value?void 0:(0,i.deserializeDate)(e.date_value);return{type:t,contentType:r,isRequired:n,pageIndex:u,documentId:h,dropdownChoices:m,groupId:y,coordinates:b,dimensions:w,label:_,readOnly:x,documentTagId:S,textValue:k,checkboxValue:E,dateValue:T}};const i=r(93845),n=r(3798),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793),c=r(50793);function u(e){return e}function p(e){if("signature"==e)return e;if("date"==e)return e;if("text"==e)return e;if("checkbox"==e)return e;if("attachment"==e)return e;if("radio"==e)return e;if("dropdown"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TemplateSignerInputTypeField"})}function h(e){return e}function f(e){if("signature"==e)return e;if("initial"==e)return e;if("stamp"==e)return e;if("date"==e)return e;if("checkbox"==e)return e;if("text"==e)return e;if("full_name"==e)return e;if("first_name"==e)return e;if("last_name"==e)return e;if("company"==e)return e;if("title"==e)return e;if("email"==e)return e;if("attachment"==e)return e;if("radio"==e)return e;if("dropdown"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TemplateSignerInputContentTypeField"})}function m(e){return{x:null==e.x?void 0:e.x,y:null==e.y?void 0:e.y}}function g(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TemplateSignerInputCoordinatesField"'});if(null!=e.x&&!(0,a.sdIsNumber)(e.x))throw new o.BoxSdkError({message:'Expecting number for "x" of type "TemplateSignerInputCoordinatesField"'});const t=null==e.x?void 0:e.x;if(null!=e.y&&!(0,a.sdIsNumber)(e.y))throw new o.BoxSdkError({message:'Expecting number for "y" of type "TemplateSignerInputCoordinatesField"'});return{x:t,y:null==e.y?void 0:e.y}}function y(e){return{width:null==e.width?void 0:e.width,height:null==e.height?void 0:e.height}}function v(e){if(!(0,c.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TemplateSignerInputDimensionsField"'});if(null!=e.width&&!(0,a.sdIsNumber)(e.width))throw new o.BoxSdkError({message:'Expecting number for "width" of type "TemplateSignerInputDimensionsField"'});const t=null==e.width?void 0:e.width;if(null!=e.height&&!(0,a.sdIsNumber)(e.height))throw new o.BoxSdkError({message:'Expecting number for "height" of type "TemplateSignerInputDimensionsField"'});return{width:t,height:null==e.height?void 0:e.height}}},13669:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermsOfService=void 0,t.serializeTermsOfServiceStatusField=p,t.deserializeTermsOfServiceStatusField=h,t.serializeTermsOfServiceEnterpriseTypeField=f,t.deserializeTermsOfServiceEnterpriseTypeField=m,t.serializeTermsOfServiceEnterpriseField=g,t.deserializeTermsOfServiceEnterpriseField=y,t.serializeTermsOfServiceTosTypeField=v,t.deserializeTermsOfServiceTosTypeField=b,t.serializeTermsOfService=function(e){const t=(0,n.serializeTermsOfServiceBase)(e);if(!(0,c.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "TermsOfService"'});return Object.assign(Object.assign({},t),{status:null==e.status?void 0:e.status,enterprise:null==e.enterprise?void 0:g(e.enterprise),tos_type:null==e.tosType?void 0:e.tosType,text:null==e.text?void 0:e.text,created_at:null==e.createdAt?void 0:(0,o.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,o.serializeDateTime)(e.modifiedAt)})},t.deserializeTermsOfService=function(e){if(!(0,c.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "TermsOfService"'});const t=null==e.status?void 0:h(e.status),r=null==e.enterprise?void 0:y(e.enterprise),n=null==e.tos_type?void 0:b(e.tos_type);if(null!=e.text&&!(0,d.sdIsString)(e.text))throw new l.BoxSdkError({message:'Expecting string for "text" of type "TermsOfService"'});const o=null==e.text?void 0:e.text;if(null!=e.created_at&&!(0,d.sdIsString)(e.created_at))throw new l.BoxSdkError({message:'Expecting string for "created_at" of type "TermsOfService"'});const a=null==e.created_at?void 0:(0,s.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,d.sdIsString)(e.modified_at))throw new l.BoxSdkError({message:'Expecting string for "modified_at" of type "TermsOfService"'});const u=null==e.modified_at?void 0:(0,s.deserializeDateTime)(e.modified_at);if(null==e.id)throw new l.BoxSdkError({message:'Expecting "id" of type "TermsOfService" to be defined'});if(!(0,d.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "TermsOfService"'});const p=e.id;if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "TermsOfService" to be defined'});const f=(0,i.deserializeTermsOfServiceBaseTypeField)(e.type);return{status:t,enterprise:r,tosType:n,text:o,createdAt:a,modifiedAt:u,id:p,type:f}};const i=r(10308),n=r(10308),o=r(93845),s=r(93845),a=r(10308),l=r(72631),d=r(50793),c=r(50793);class u extends a.TermsOfServiceBase{constructor(e){super(e)}}function p(e){return e}function h(e){if("enabled"==e)return e;if("disabled"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize TermsOfServiceStatusField"})}function f(e){return e}function m(e){if("enterprise"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize TermsOfServiceEnterpriseTypeField"})}function g(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}}function y(e){if(!(0,c.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "TermsOfServiceEnterpriseField"'});if(null!=e.id&&!(0,d.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "TermsOfServiceEnterpriseField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:m(e.type);if(null!=e.name&&!(0,d.sdIsString)(e.name))throw new l.BoxSdkError({message:'Expecting string for "name" of type "TermsOfServiceEnterpriseField"'});return{id:t,type:r,name:null==e.name?void 0:e.name}}function v(e){return e}function b(e){if("managed"==e)return e;if("external"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize TermsOfServiceTosTypeField"})}t.TermsOfService=u},10308:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermsOfServiceBase=void 0,t.serializeTermsOfServiceBaseTypeField=s,t.deserializeTermsOfServiceBaseTypeField=a,t.serializeTermsOfServiceBase=function(e){return{id:e.id,type:e.type}},t.deserializeTermsOfServiceBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "TermsOfServiceBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "TermsOfServiceBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "TermsOfServiceBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "TermsOfServiceBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeTermsOfServiceBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeTermsOfServiceBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "TermsOfServiceBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "TermsOfServiceBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "TermsOfServiceBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("terms_of_service"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize TermsOfServiceBaseTypeField"})}t.TermsOfServiceBase=class{constructor(e){this.type="terms_of_service",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},60848:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermsOfServiceUserStatus=void 0,t.serializeTermsOfServiceUserStatusTypeField=h,t.deserializeTermsOfServiceUserStatusTypeField=f,t.serializeTermsOfServiceUserStatus=function(e){return{id:e.id,type:e.type,tos:null==e.tos?void 0:(0,i.serializeTermsOfServiceBase)(e.tos),user:null==e.user?void 0:(0,o.serializeUserMini)(e.user),is_accepted:null==e.isAccepted?void 0:e.isAccepted,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt)}},t.deserializeTermsOfServiceUserStatus=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TermsOfServiceUserStatus"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "TermsOfServiceUserStatus" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TermsOfServiceUserStatus"'});const t=e.id;if(null==e.type)throw new d.BoxSdkError({message:'Expecting "type" of type "TermsOfServiceUserStatus" to be defined'});const r=f(e.type),i=null==e.tos?void 0:(0,n.deserializeTermsOfServiceBase)(e.tos),o=null==e.user?void 0:(0,s.deserializeUserMini)(e.user);if(null!=e.is_accepted&&!(0,c.sdIsBoolean)(e.is_accepted))throw new d.BoxSdkError({message:'Expecting boolean for "is_accepted" of type "TermsOfServiceUserStatus"'});const a=null==e.is_accepted?void 0:e.is_accepted;if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TermsOfServiceUserStatus"'});const h=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TermsOfServiceUserStatus"'});const m=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);return{id:t,type:r,tos:i,user:o,isAccepted:a,createdAt:h,modifiedAt:m}},t.serializeTermsOfServiceUserStatusInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,tos:null==e.tos?void 0:(0,i.serializeTermsOfServiceBase)(e.tos),user:null==e.user?void 0:(0,o.serializeUserMini)(e.user),is_accepted:null==e.isAccepted?void 0:e.isAccepted,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt)}},t.deserializeTermsOfServiceUserStatusInput=function(e){if(!(0,p.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TermsOfServiceUserStatusInput"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "TermsOfServiceUserStatusInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TermsOfServiceUserStatusInput"'});const t=e.id,r=null==e.type?void 0:f(e.type),i=null==e.tos?void 0:(0,n.deserializeTermsOfServiceBase)(e.tos),o=null==e.user?void 0:(0,s.deserializeUserMini)(e.user);if(null!=e.is_accepted&&!(0,c.sdIsBoolean)(e.is_accepted))throw new d.BoxSdkError({message:'Expecting boolean for "is_accepted" of type "TermsOfServiceUserStatusInput"'});const a=null==e.is_accepted?void 0:e.is_accepted;if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TermsOfServiceUserStatusInput"'});const h=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TermsOfServiceUserStatusInput"'});const m=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);return{id:t,type:r,tos:i,user:o,isAccepted:a,createdAt:h,modifiedAt:m}};const i=r(10308),n=r(10308),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793);function h(e){return e}function f(e){if("terms_of_service_user_status"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TermsOfServiceUserStatusTypeField"})}t.TermsOfServiceUserStatus=class{constructor(e){this.type="terms_of_service_user_status",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.tos&&(this.tos=e.tos),e.user&&(this.user=e.user),e.isAccepted&&(this.isAccepted=e.isAccepted),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.rawData&&(this.rawData=e.rawData)}}},32228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTermsOfServiceUserStatuses=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeTermsOfServiceUserStatus)(e)}))}},t.deserializeTermsOfServiceUserStatuses=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TermsOfServiceUserStatuses"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "TermsOfServiceUserStatuses"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TermsOfServiceUserStatuses"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeTermsOfServiceUserStatus)(e)})):[];return{totalCount:t,entries:r}};const i=r(60848),n=r(60848),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},67426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTermsOfServices=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeTermsOfService)(e)}))}},t.deserializeTermsOfServices=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TermsOfServices"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "TermsOfServices"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.entries&&!(0,a.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TermsOfServices"'});const r=null==e.entries?void 0:(0,a.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeTermsOfService)(e)})):[];return{totalCount:t,entries:r}};const i=r(13669),n=r(13669),o=r(72631),s=r(50793),a=r(50793),l=r(50793)},37086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineSkillCard=t.TimelineSkillCardInvocationField=t.TimelineSkillCardSkillField=void 0,t.serializeTimelineSkillCardTypeField=c,t.deserializeTimelineSkillCardTypeField=u,t.serializeTimelineSkillCardSkillCardTypeField=p,t.deserializeTimelineSkillCardSkillCardTypeField=h,t.serializeTimelineSkillCardSkillCardTitleField=f,t.deserializeTimelineSkillCardSkillCardTitleField=m,t.serializeTimelineSkillCardSkillTypeField=g,t.deserializeTimelineSkillCardSkillTypeField=y,t.serializeTimelineSkillCardSkillField=v,t.deserializeTimelineSkillCardSkillField=b,t.serializeTimelineSkillCardSkillFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeTimelineSkillCardSkillFieldInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardSkillFieldInput"'});const t=null==e.type?void 0:y(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TimelineSkillCardSkillFieldInput" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TimelineSkillCardSkillFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeTimelineSkillCardInvocationTypeField=w,t.deserializeTimelineSkillCardInvocationTypeField=_,t.serializeTimelineSkillCardInvocationField=x,t.deserializeTimelineSkillCardInvocationField=S,t.serializeTimelineSkillCardInvocationFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeTimelineSkillCardInvocationFieldInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardInvocationFieldInput"'});const t=null==e.type?void 0:_(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TimelineSkillCardInvocationFieldInput" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TimelineSkillCardInvocationFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeTimelineSkillCardEntriesAppearsField=k,t.deserializeTimelineSkillCardEntriesAppearsField=E,t.serializeTimelineSkillCardEntriesField=T,t.deserializeTimelineSkillCardEntriesField=B,t.serializeTimelineSkillCard=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:e.type,skill_card_type:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:f(e.skillCardTitle),skill:v(e.skill),invocation:x(e.invocation),duration:null==e.duration?void 0:e.duration,entries:e.entries.map((function(e){return T(e)}))}},t.deserializeTimelineSkillCard=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCard"'});if(null!=e.created_at&&!(0,a.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "TimelineSkillCard"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TimelineSkillCard" to be defined'});const r=u(e.type);if(null==e.skill_card_type)throw new o.BoxSdkError({message:'Expecting "skill_card_type" of type "TimelineSkillCard" to be defined'});const i=h(e.skill_card_type),c=null==e.skill_card_title?void 0:m(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "TimelineSkillCard" to be defined'});const p=b(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "TimelineSkillCard" to be defined'});const f=S(e.invocation);if(null!=e.duration&&!(0,s.sdIsNumber)(e.duration))throw new o.BoxSdkError({message:'Expecting number for "duration" of type "TimelineSkillCard"'});const g=null==e.duration?void 0:e.duration;if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "TimelineSkillCard" to be defined'});if(!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TimelineSkillCard"'});const y=(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return B(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:c,skill:p,invocation:f,duration:g,entries:y}},t.serializeTimelineSkillCardInput=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:null==e.type?void 0:e.type,skillCardType:null==e.skillCardType?void 0:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:f(e.skillCardTitle),skill:v(e.skill),invocation:x(e.invocation),duration:null==e.duration?void 0:e.duration,entries:e.entries.map((function(e){return T(e)}))}},t.deserializeTimelineSkillCardInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardInput"'});if(null!=e.created_at&&!(0,a.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "TimelineSkillCardInput"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at),r=null==e.type?void 0:u(e.type),i=null==e.skillCardType?void 0:h(e.skillCardType),c=null==e.skill_card_title?void 0:m(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "TimelineSkillCardInput" to be defined'});const p=b(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "TimelineSkillCardInput" to be defined'});const f=S(e.invocation);if(null!=e.duration&&!(0,s.sdIsNumber)(e.duration))throw new o.BoxSdkError({message:'Expecting number for "duration" of type "TimelineSkillCardInput"'});const g=null==e.duration?void 0:e.duration;if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "TimelineSkillCardInput" to be defined'});if(!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TimelineSkillCardInput"'});const y=(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return B(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:c,skill:p,invocation:f,duration:g,entries:y}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);t.TimelineSkillCardSkillField=class{constructor(e){this.type="service",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};t.TimelineSkillCardInvocationField=class{constructor(e){this.type="skill_invocation",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};function c(e){return e}function u(e){if("skill_card"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TimelineSkillCardTypeField"})}function p(e){return e}function h(e){if("timeline"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TimelineSkillCardSkillCardTypeField"})}function f(e){return{code:null==e.code?void 0:e.code,message:e.message}}function m(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardSkillCardTitleField"'});if(null!=e.code&&!(0,a.sdIsString)(e.code))throw new o.BoxSdkError({message:'Expecting string for "code" of type "TimelineSkillCardSkillCardTitleField"'});const t=null==e.code?void 0:e.code;if(null==e.message)throw new o.BoxSdkError({message:'Expecting "message" of type "TimelineSkillCardSkillCardTitleField" to be defined'});if(!(0,a.sdIsString)(e.message))throw new o.BoxSdkError({message:'Expecting string for "message" of type "TimelineSkillCardSkillCardTitleField"'});return{code:t,message:e.message}}function g(e){return e}function y(e){if("service"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TimelineSkillCardSkillTypeField"})}function v(e){return{type:e.type,id:e.id}}function b(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardSkillField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TimelineSkillCardSkillField" to be defined'});const t=y(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TimelineSkillCardSkillField" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TimelineSkillCardSkillField"'});return{type:t,id:e.id}}function w(e){return e}function _(e){if("skill_invocation"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TimelineSkillCardInvocationTypeField"})}function x(e){return{type:e.type,id:e.id}}function S(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardInvocationField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TimelineSkillCardInvocationField" to be defined'});const t=_(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TimelineSkillCardInvocationField" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TimelineSkillCardInvocationField"'});return{type:t,id:e.id}}function k(e){return{start:null==e.start?void 0:e.start,end:null==e.end?void 0:e.end}}function E(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardEntriesAppearsField"'});if(null!=e.start&&!(0,s.sdIsNumber)(e.start))throw new o.BoxSdkError({message:'Expecting number for "start" of type "TimelineSkillCardEntriesAppearsField"'});const t=null==e.start?void 0:e.start;if(null!=e.end&&!(0,s.sdIsNumber)(e.end))throw new o.BoxSdkError({message:'Expecting number for "end" of type "TimelineSkillCardEntriesAppearsField"'});return{start:t,end:null==e.end?void 0:e.end}}function T(e){return{text:null==e.text?void 0:e.text,appears:null==e.appears?void 0:e.appears.map((function(e){return k(e)})),image_url:null==e.imageUrl?void 0:e.imageUrl}}function B(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TimelineSkillCardEntriesField"'});if(null!=e.text&&!(0,a.sdIsString)(e.text))throw new o.BoxSdkError({message:'Expecting string for "text" of type "TimelineSkillCardEntriesField"'});const t=null==e.text?void 0:e.text;if(null!=e.appears&&!(0,l.sdIsList)(e.appears))throw new o.BoxSdkError({message:'Expecting array for "appears" of type "TimelineSkillCardEntriesField"'});const r=null==e.appears?void 0:(0,l.sdIsList)(e.appears)?e.appears.map((function(e){return E(e)})):[];if(null!=e.image_url&&!(0,a.sdIsString)(e.image_url))throw new o.BoxSdkError({message:'Expecting string for "image_url" of type "TimelineSkillCardEntriesField"'});return{text:t,appears:r,imageUrl:null==e.image_url?void 0:e.image_url}}t.TimelineSkillCard=class{constructor(e){this.type="skill_card",this.skillCardType="timeline",e.createdAt&&(this.createdAt=e.createdAt),e.type&&(this.type=e.type),e.skillCardType&&(this.skillCardType=e.skillCardType),e.skillCardTitle&&(this.skillCardTitle=e.skillCardTitle),e.skill&&(this.skill=e.skill),e.invocation&&(this.invocation=e.invocation),e.duration&&(this.duration=e.duration),e.entries&&(this.entries=e.entries),e.rawData&&(this.rawData=e.rawData)}}},55852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTrackingCodeTypeField=s,t.deserializeTrackingCodeTypeField=a,t.serializeTrackingCode=function(e){return{type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name,value:null==e.value?void 0:e.value}},t.deserializeTrackingCode=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "TrackingCode"'});const t=null==e.type?void 0:a(e.type);if(null!=e.name&&!(0,n.sdIsString)(e.name))throw new i.BoxSdkError({message:'Expecting string for "name" of type "TrackingCode"'});const r=null==e.name?void 0:e.name;if(null!=e.value&&!(0,n.sdIsString)(e.value))throw new i.BoxSdkError({message:'Expecting string for "value" of type "TrackingCode"'});const s=null==e.value?void 0:e.value;return{type:t,name:r,value:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("tracking_code"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize TrackingCodeTypeField"})}},20749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptSkillCard=t.TranscriptSkillCardInvocationField=t.TranscriptSkillCardSkillField=void 0,t.serializeTranscriptSkillCardTypeField=c,t.deserializeTranscriptSkillCardTypeField=u,t.serializeTranscriptSkillCardSkillCardTypeField=p,t.deserializeTranscriptSkillCardSkillCardTypeField=h,t.serializeTranscriptSkillCardSkillCardTitleField=f,t.deserializeTranscriptSkillCardSkillCardTitleField=m,t.serializeTranscriptSkillCardSkillTypeField=g,t.deserializeTranscriptSkillCardSkillTypeField=y,t.serializeTranscriptSkillCardSkillField=v,t.deserializeTranscriptSkillCardSkillField=b,t.serializeTranscriptSkillCardSkillFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeTranscriptSkillCardSkillFieldInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardSkillFieldInput"'});const t=null==e.type?void 0:y(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TranscriptSkillCardSkillFieldInput" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TranscriptSkillCardSkillFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeTranscriptSkillCardInvocationTypeField=w,t.deserializeTranscriptSkillCardInvocationTypeField=_,t.serializeTranscriptSkillCardInvocationField=x,t.deserializeTranscriptSkillCardInvocationField=S,t.serializeTranscriptSkillCardInvocationFieldInput=function(e){return{type:null==e.type?void 0:e.type,id:e.id}},t.deserializeTranscriptSkillCardInvocationFieldInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardInvocationFieldInput"'});const t=null==e.type?void 0:_(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TranscriptSkillCardInvocationFieldInput" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TranscriptSkillCardInvocationFieldInput"'});const r=e.id;return{type:t,id:r}},t.serializeTranscriptSkillCardEntriesAppearsField=k,t.deserializeTranscriptSkillCardEntriesAppearsField=E,t.serializeTranscriptSkillCardEntriesField=T,t.deserializeTranscriptSkillCardEntriesField=B,t.serializeTranscriptSkillCard=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:e.type,skill_card_type:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:f(e.skillCardTitle),skill:v(e.skill),invocation:x(e.invocation),duration:null==e.duration?void 0:e.duration,entries:e.entries.map((function(e){return T(e)}))}},t.deserializeTranscriptSkillCard=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCard"'});if(null!=e.created_at&&!(0,a.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "TranscriptSkillCard"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TranscriptSkillCard" to be defined'});const r=u(e.type);if(null==e.skill_card_type)throw new o.BoxSdkError({message:'Expecting "skill_card_type" of type "TranscriptSkillCard" to be defined'});const i=h(e.skill_card_type),c=null==e.skill_card_title?void 0:m(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "TranscriptSkillCard" to be defined'});const p=b(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "TranscriptSkillCard" to be defined'});const f=S(e.invocation);if(null!=e.duration&&!(0,s.sdIsNumber)(e.duration))throw new o.BoxSdkError({message:'Expecting number for "duration" of type "TranscriptSkillCard"'});const g=null==e.duration?void 0:e.duration;if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "TranscriptSkillCard" to be defined'});if(!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TranscriptSkillCard"'});const y=(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return B(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:c,skill:p,invocation:f,duration:g,entries:y}},t.serializeTranscriptSkillCardInput=function(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),type:null==e.type?void 0:e.type,skillCardType:null==e.skillCardType?void 0:e.skillCardType,skill_card_title:null==e.skillCardTitle?void 0:f(e.skillCardTitle),skill:v(e.skill),invocation:x(e.invocation),duration:null==e.duration?void 0:e.duration,entries:e.entries.map((function(e){return T(e)}))}},t.deserializeTranscriptSkillCardInput=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardInput"'});if(null!=e.created_at&&!(0,a.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "TranscriptSkillCardInput"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at),r=null==e.type?void 0:u(e.type),i=null==e.skillCardType?void 0:h(e.skillCardType),c=null==e.skill_card_title?void 0:m(e.skill_card_title);if(null==e.skill)throw new o.BoxSdkError({message:'Expecting "skill" of type "TranscriptSkillCardInput" to be defined'});const p=b(e.skill);if(null==e.invocation)throw new o.BoxSdkError({message:'Expecting "invocation" of type "TranscriptSkillCardInput" to be defined'});const f=S(e.invocation);if(null!=e.duration&&!(0,s.sdIsNumber)(e.duration))throw new o.BoxSdkError({message:'Expecting number for "duration" of type "TranscriptSkillCardInput"'});const g=null==e.duration?void 0:e.duration;if(null==e.entries)throw new o.BoxSdkError({message:'Expecting "entries" of type "TranscriptSkillCardInput" to be defined'});if(!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "TranscriptSkillCardInput"'});const y=(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return B(e)})):[];return{createdAt:t,type:r,skillCardType:i,skillCardTitle:c,skill:p,invocation:f,duration:g,entries:y}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);t.TranscriptSkillCardSkillField=class{constructor(e){this.type="service",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};t.TranscriptSkillCardInvocationField=class{constructor(e){this.type="skill_invocation",e.type&&(this.type=e.type),e.id&&(this.id=e.id),e.rawData&&(this.rawData=e.rawData)}};function c(e){return e}function u(e){if("skill_card"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TranscriptSkillCardTypeField"})}function p(e){return e}function h(e){if("transcript"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TranscriptSkillCardSkillCardTypeField"})}function f(e){return{code:null==e.code?void 0:e.code,message:e.message}}function m(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardSkillCardTitleField"'});if(null!=e.code&&!(0,a.sdIsString)(e.code))throw new o.BoxSdkError({message:'Expecting string for "code" of type "TranscriptSkillCardSkillCardTitleField"'});const t=null==e.code?void 0:e.code;if(null==e.message)throw new o.BoxSdkError({message:'Expecting "message" of type "TranscriptSkillCardSkillCardTitleField" to be defined'});if(!(0,a.sdIsString)(e.message))throw new o.BoxSdkError({message:'Expecting string for "message" of type "TranscriptSkillCardSkillCardTitleField"'});return{code:t,message:e.message}}function g(e){return e}function y(e){if("service"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TranscriptSkillCardSkillTypeField"})}function v(e){return{type:e.type,id:e.id}}function b(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardSkillField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TranscriptSkillCardSkillField" to be defined'});const t=y(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TranscriptSkillCardSkillField" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TranscriptSkillCardSkillField"'});return{type:t,id:e.id}}function w(e){return e}function _(e){if("skill_invocation"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize TranscriptSkillCardInvocationTypeField"})}function x(e){return{type:e.type,id:e.id}}function S(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardInvocationField"'});if(null==e.type)throw new o.BoxSdkError({message:'Expecting "type" of type "TranscriptSkillCardInvocationField" to be defined'});const t=_(e.type);if(null==e.id)throw new o.BoxSdkError({message:'Expecting "id" of type "TranscriptSkillCardInvocationField" to be defined'});if(!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "TranscriptSkillCardInvocationField"'});return{type:t,id:e.id}}function k(e){return{start:null==e.start?void 0:e.start}}function E(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardEntriesAppearsField"'});if(null!=e.start&&!(0,s.sdIsNumber)(e.start))throw new o.BoxSdkError({message:'Expecting number for "start" of type "TranscriptSkillCardEntriesAppearsField"'});return{start:null==e.start?void 0:e.start}}function T(e){return{text:null==e.text?void 0:e.text,appears:null==e.appears?void 0:e.appears.map((function(e){return k(e)}))}}function B(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "TranscriptSkillCardEntriesField"'});if(null!=e.text&&!(0,a.sdIsString)(e.text))throw new o.BoxSdkError({message:'Expecting string for "text" of type "TranscriptSkillCardEntriesField"'});const t=null==e.text?void 0:e.text;if(null!=e.appears&&!(0,l.sdIsList)(e.appears))throw new o.BoxSdkError({message:'Expecting array for "appears" of type "TranscriptSkillCardEntriesField"'});return{text:t,appears:null==e.appears?void 0:(0,l.sdIsList)(e.appears)?e.appears.map((function(e){return E(e)})):[]}}t.TranscriptSkillCard=class{constructor(e){this.type="skill_card",this.skillCardType="transcript",e.createdAt&&(this.createdAt=e.createdAt),e.type&&(this.type=e.type),e.skillCardType&&(this.skillCardType=e.skillCardType),e.skillCardTitle&&(this.skillCardTitle=e.skillCardTitle),e.skill&&(this.skill=e.skill),e.invocation&&(this.invocation=e.invocation),e.duration&&(this.duration=e.duration),e.entries&&(this.entries=e.entries),e.rawData&&(this.rawData=e.rawData)}}},37416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrashFile=void 0,t.serializeTrashFileTypeField=g,t.deserializeTrashFileTypeField=y,t.serializeTrashFilePathCollectionEntriesTypeField=v,t.deserializeTrashFilePathCollectionEntriesTypeField=b,t.serializeTrashFilePathCollectionEntriesField=w,t.deserializeTrashFilePathCollectionEntriesField=_,t.serializeTrashFilePathCollectionField=x,t.deserializeTrashFilePathCollectionField=S,t.serializeTrashFileItemStatusField=k,t.deserializeTrashFileItemStatusField=E,t.serializeTrashFile=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:e.type,sequence_id:e.sequenceId,name:null==e.name?void 0:e.name,sha1:e.sha1,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),description:e.description,size:e.size,path_collection:x(e.pathCollection),created_at:(0,d.serializeDateTime)(e.createdAt),modified_at:(0,d.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:(0,d.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,d.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,d.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,d.serializeDateTime)(e.contentModifiedAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),modified_by:(0,o.serializeUserMini)(e.modifiedBy),owned_by:(0,o.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,parent:null==e.parent?void 0:(0,a.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFile=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFile"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "TrashFile"'});const t=e.id;if(null!=e.etag&&!(0,h.sdIsString)(e.etag))throw new u.BoxSdkError({message:'Expecting string for "etag" of type "TrashFile"'});const r=null==e.etag?void 0:e.etag;if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "TrashFile" to be defined'});const i=y(e.type);if(null==e.sequence_id)throw new u.BoxSdkError({message:'Expecting "sequence_id" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.sequence_id))throw new u.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFile"'});const o=e.sequence_id;if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "TrashFile"'});const a=null==e.name?void 0:e.name;if(null==e.sha1)throw new u.BoxSdkError({message:'Expecting "sha1" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.sha1))throw new u.BoxSdkError({message:'Expecting string for "sha1" of type "TrashFile"'});const d=e.sha1,f=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.description)throw new u.BoxSdkError({message:'Expecting "description" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "TrashFile"'});const g=e.description;if(null==e.size)throw new u.BoxSdkError({message:'Expecting "size" of type "TrashFile" to be defined'});if(!(0,p.sdIsNumber)(e.size))throw new u.BoxSdkError({message:'Expecting number for "size" of type "TrashFile"'});const v=e.size;if(null==e.path_collection)throw new u.BoxSdkError({message:'Expecting "path_collection" of type "TrashFile" to be defined'});const b=S(e.path_collection);if(null==e.created_at)throw new u.BoxSdkError({message:'Expecting "created_at" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFile"'});const w=(0,c.deserializeDateTime)(e.created_at);if(null==e.modified_at)throw new u.BoxSdkError({message:'Expecting "modified_at" of type "TrashFile" to be defined'});if(!(0,h.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFile"'});const _=(0,c.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,h.sdIsString)(e.trashed_at))throw new u.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFile"'});const x=null==e.trashed_at?void 0:(0,c.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,h.sdIsString)(e.purged_at))throw new u.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFile"'});const k=null==e.purged_at?void 0:(0,c.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,h.sdIsString)(e.content_created_at))throw new u.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFile"'});const T=null==e.content_created_at?void 0:(0,c.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,h.sdIsString)(e.content_modified_at))throw new u.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFile"'});const B=null==e.content_modified_at?void 0:(0,c.deserializeDateTime)(e.content_modified_at),C=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new u.BoxSdkError({message:'Expecting "modified_by" of type "TrashFile" to be defined'});const I=(0,s.deserializeUserMini)(e.modified_by);if(null==e.owned_by)throw new u.BoxSdkError({message:'Expecting "owned_by" of type "TrashFile" to be defined'});const A=(0,s.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,h.sdIsString)(e.shared_link))throw new u.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFile"'});const F=null==e.shared_link?void 0:e.shared_link,M=null==e.parent?void 0:(0,l.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new u.BoxSdkError({message:'Expecting "item_status" of type "TrashFile" to be defined'});const D=E(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,sha1:d,fileVersion:f,description:g,size:v,pathCollection:b,createdAt:w,modifiedAt:_,trashedAt:x,purgedAt:k,contentCreatedAt:T,contentModifiedAt:B,createdBy:C,modifiedBy:I,ownedBy:A,sharedLink:F,parent:M,itemStatus:D}},t.serializeTrashFileInput=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type,sequence_id:e.sequenceId,name:null==e.name?void 0:e.name,sha1:e.sha1,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),description:e.description,size:e.size,path_collection:x(e.pathCollection),created_at:(0,d.serializeDateTime)(e.createdAt),modified_at:(0,d.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:(0,d.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,d.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,d.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,d.serializeDateTime)(e.contentModifiedAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),modified_by:(0,o.serializeUserMini)(e.modifiedBy),owned_by:(0,o.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,parent:null==e.parent?void 0:(0,a.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFileInput=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFileInput"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "TrashFileInput"'});const t=e.id;if(null!=e.etag&&!(0,h.sdIsString)(e.etag))throw new u.BoxSdkError({message:'Expecting string for "etag" of type "TrashFileInput"'});const r=null==e.etag?void 0:e.etag,i=null==e.type?void 0:y(e.type);if(null==e.sequence_id)throw new u.BoxSdkError({message:'Expecting "sequence_id" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.sequence_id))throw new u.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFileInput"'});const o=e.sequence_id;if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "TrashFileInput"'});const a=null==e.name?void 0:e.name;if(null==e.sha1)throw new u.BoxSdkError({message:'Expecting "sha1" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.sha1))throw new u.BoxSdkError({message:'Expecting string for "sha1" of type "TrashFileInput"'});const d=e.sha1,f=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.description)throw new u.BoxSdkError({message:'Expecting "description" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "TrashFileInput"'});const g=e.description;if(null==e.size)throw new u.BoxSdkError({message:'Expecting "size" of type "TrashFileInput" to be defined'});if(!(0,p.sdIsNumber)(e.size))throw new u.BoxSdkError({message:'Expecting number for "size" of type "TrashFileInput"'});const v=e.size;if(null==e.path_collection)throw new u.BoxSdkError({message:'Expecting "path_collection" of type "TrashFileInput" to be defined'});const b=S(e.path_collection);if(null==e.created_at)throw new u.BoxSdkError({message:'Expecting "created_at" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFileInput"'});const w=(0,c.deserializeDateTime)(e.created_at);if(null==e.modified_at)throw new u.BoxSdkError({message:'Expecting "modified_at" of type "TrashFileInput" to be defined'});if(!(0,h.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFileInput"'});const _=(0,c.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,h.sdIsString)(e.trashed_at))throw new u.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFileInput"'});const x=null==e.trashed_at?void 0:(0,c.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,h.sdIsString)(e.purged_at))throw new u.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFileInput"'});const k=null==e.purged_at?void 0:(0,c.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,h.sdIsString)(e.content_created_at))throw new u.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFileInput"'});const T=null==e.content_created_at?void 0:(0,c.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,h.sdIsString)(e.content_modified_at))throw new u.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFileInput"'});const B=null==e.content_modified_at?void 0:(0,c.deserializeDateTime)(e.content_modified_at),C=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new u.BoxSdkError({message:'Expecting "modified_by" of type "TrashFileInput" to be defined'});const I=(0,s.deserializeUserMini)(e.modified_by);if(null==e.owned_by)throw new u.BoxSdkError({message:'Expecting "owned_by" of type "TrashFileInput" to be defined'});const A=(0,s.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,h.sdIsString)(e.shared_link))throw new u.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFileInput"'});const F=null==e.shared_link?void 0:e.shared_link,M=null==e.parent?void 0:(0,l.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new u.BoxSdkError({message:'Expecting "item_status" of type "TrashFileInput" to be defined'});const D=E(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,sha1:d,fileVersion:f,description:g,size:v,pathCollection:b,createdAt:w,modifiedAt:_,trashedAt:x,purgedAt:k,contentCreatedAt:T,contentModifiedAt:B,createdBy:C,modifiedBy:I,ownedBy:A,sharedLink:F,parent:M,itemStatus:D}};const i=r(95053),n=r(95053),o=r(95408),s=r(95408),a=r(70343),l=r(70343),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793);function g(e){return e}function y(e){if("file"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TrashFileTypeField"})}function v(e){return e}function b(e){if("folder"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TrashFilePathCollectionEntriesTypeField"})}function w(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,sequence_id:null==e.sequenceId?void 0:e.sequenceId,etag:null==e.etag?void 0:e.etag,name:null==e.name?void 0:e.name}}function _(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFilePathCollectionEntriesField"'});const t=null==e.type?void 0:b(e.type);if(null!=e.id&&!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "TrashFilePathCollectionEntriesField"'});const r=null==e.id?void 0:e.id;if(null!=e.sequence_id&&!(0,h.sdIsString)(e.sequence_id))throw new u.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFilePathCollectionEntriesField"'});const i=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.etag&&!(0,h.sdIsString)(e.etag))throw new u.BoxSdkError({message:'Expecting string for "etag" of type "TrashFilePathCollectionEntriesField"'});const n=null==e.etag?void 0:e.etag;if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "TrashFilePathCollectionEntriesField"'});return{type:t,id:r,sequenceId:i,etag:n,name:null==e.name?void 0:e.name}}function x(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return w(e)}))}}function S(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFilePathCollectionField"'});if(null==e.total_count)throw new u.BoxSdkError({message:'Expecting "total_count" of type "TrashFilePathCollectionField" to be defined'});if(!(0,p.sdIsNumber)(e.total_count))throw new u.BoxSdkError({message:'Expecting number for "total_count" of type "TrashFilePathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new u.BoxSdkError({message:'Expecting "entries" of type "TrashFilePathCollectionField" to be defined'});if(!(0,f.sdIsList)(e.entries))throw new u.BoxSdkError({message:'Expecting array for "entries" of type "TrashFilePathCollectionField"'});return{totalCount:t,entries:(0,f.sdIsList)(e.entries)?e.entries.map((function(e){return _(e)})):[]}}function k(e){return e}function E(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TrashFileItemStatusField"})}t.TrashFile=class{constructor(e){this.type="file",e.id&&(this.id=e.id),e.etag&&(this.etag=e.etag),e.type&&(this.type=e.type),e.sequenceId&&(this.sequenceId=e.sequenceId),e.name&&(this.name=e.name),e.sha1&&(this.sha1=e.sha1),e.fileVersion&&(this.fileVersion=e.fileVersion),e.description&&(this.description=e.description),e.size&&(this.size=e.size),e.pathCollection&&(this.pathCollection=e.pathCollection),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.trashedAt&&(this.trashedAt=e.trashedAt),e.purgedAt&&(this.purgedAt=e.purgedAt),e.contentCreatedAt&&(this.contentCreatedAt=e.contentCreatedAt),e.contentModifiedAt&&(this.contentModifiedAt=e.contentModifiedAt),e.createdBy&&(this.createdBy=e.createdBy),e.modifiedBy&&(this.modifiedBy=e.modifiedBy),e.ownedBy&&(this.ownedBy=e.ownedBy),e.sharedLink&&(this.sharedLink=e.sharedLink),e.parent&&(this.parent=e.parent),e.itemStatus&&(this.itemStatus=e.itemStatus),e.rawData&&(this.rawData=e.rawData)}}},40950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrashFileRestored=void 0,t.serializeTrashFileRestoredTypeField=g,t.deserializeTrashFileRestoredTypeField=y,t.serializeTrashFileRestoredPathCollectionField=v,t.deserializeTrashFileRestoredPathCollectionField=b,t.serializeTrashFileRestoredItemStatusField=w,t.deserializeTrashFileRestoredItemStatusField=_,t.serializeTrashFileRestored=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:e.type,sequence_id:e.sequenceId,name:null==e.name?void 0:e.name,sha1:e.sha1,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),description:e.description,size:e.size,path_collection:v(e.pathCollection),created_at:(0,d.serializeDateTime)(e.createdAt),modified_at:(0,d.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:e.trashedAt,purged_at:null==e.purgedAt?void 0:e.purgedAt,content_created_at:null==e.contentCreatedAt?void 0:(0,d.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,d.serializeDateTime)(e.contentModifiedAt),created_by:null==e.createdBy?void 0:(0,a.serializeUserMini)(e.createdBy),modified_by:(0,a.serializeUserMini)(e.modifiedBy),owned_by:(0,a.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,parent:null==e.parent?void 0:(0,o.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFileRestored=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFileRestored"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "TrashFileRestored"'});const t=e.id;if(null!=e.etag&&!(0,h.sdIsString)(e.etag))throw new u.BoxSdkError({message:'Expecting string for "etag" of type "TrashFileRestored"'});const r=null==e.etag?void 0:e.etag;if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "TrashFileRestored" to be defined'});const i=y(e.type);if(null==e.sequence_id)throw new u.BoxSdkError({message:'Expecting "sequence_id" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.sequence_id))throw new u.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFileRestored"'});const o=e.sequence_id;if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "TrashFileRestored"'});const a=null==e.name?void 0:e.name;if(null==e.sha1)throw new u.BoxSdkError({message:'Expecting "sha1" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.sha1))throw new u.BoxSdkError({message:'Expecting string for "sha1" of type "TrashFileRestored"'});const d=e.sha1,f=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.description)throw new u.BoxSdkError({message:'Expecting "description" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "TrashFileRestored"'});const g=e.description;if(null==e.size)throw new u.BoxSdkError({message:'Expecting "size" of type "TrashFileRestored" to be defined'});if(!(0,p.sdIsNumber)(e.size))throw new u.BoxSdkError({message:'Expecting number for "size" of type "TrashFileRestored"'});const v=e.size;if(null==e.path_collection)throw new u.BoxSdkError({message:'Expecting "path_collection" of type "TrashFileRestored" to be defined'});const w=b(e.path_collection);if(null==e.created_at)throw new u.BoxSdkError({message:'Expecting "created_at" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFileRestored"'});const x=(0,c.deserializeDateTime)(e.created_at);if(null==e.modified_at)throw new u.BoxSdkError({message:'Expecting "modified_at" of type "TrashFileRestored" to be defined'});if(!(0,h.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFileRestored"'});const S=(0,c.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,h.sdIsString)(e.trashed_at))throw new u.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFileRestored"'});const k=null==e.trashed_at?void 0:e.trashed_at;if(null!=e.purged_at&&!(0,h.sdIsString)(e.purged_at))throw new u.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFileRestored"'});const E=null==e.purged_at?void 0:e.purged_at;if(null!=e.content_created_at&&!(0,h.sdIsString)(e.content_created_at))throw new u.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFileRestored"'});const T=null==e.content_created_at?void 0:(0,c.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,h.sdIsString)(e.content_modified_at))throw new u.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFileRestored"'});const B=null==e.content_modified_at?void 0:(0,c.deserializeDateTime)(e.content_modified_at),C=null==e.created_by?void 0:(0,l.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new u.BoxSdkError({message:'Expecting "modified_by" of type "TrashFileRestored" to be defined'});const I=(0,l.deserializeUserMini)(e.modified_by);if(null==e.owned_by)throw new u.BoxSdkError({message:'Expecting "owned_by" of type "TrashFileRestored" to be defined'});const A=(0,l.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,h.sdIsString)(e.shared_link))throw new u.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFileRestored"'});const F=null==e.shared_link?void 0:e.shared_link,M=null==e.parent?void 0:(0,s.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new u.BoxSdkError({message:'Expecting "item_status" of type "TrashFileRestored" to be defined'});const D=_(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,sha1:d,fileVersion:f,description:g,size:v,pathCollection:w,createdAt:x,modifiedAt:S,trashedAt:k,purgedAt:E,contentCreatedAt:T,contentModifiedAt:B,createdBy:C,modifiedBy:I,ownedBy:A,sharedLink:F,parent:M,itemStatus:D}},t.serializeTrashFileRestoredInput=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type,sequence_id:e.sequenceId,name:null==e.name?void 0:e.name,sha1:e.sha1,file_version:null==e.fileVersion?void 0:(0,i.serializeFileVersionMini)(e.fileVersion),description:e.description,size:e.size,path_collection:v(e.pathCollection),created_at:(0,d.serializeDateTime)(e.createdAt),modified_at:(0,d.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:e.trashedAt,purged_at:null==e.purgedAt?void 0:e.purgedAt,content_created_at:null==e.contentCreatedAt?void 0:(0,d.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,d.serializeDateTime)(e.contentModifiedAt),created_by:null==e.createdBy?void 0:(0,a.serializeUserMini)(e.createdBy),modified_by:(0,a.serializeUserMini)(e.modifiedBy),owned_by:(0,a.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,parent:null==e.parent?void 0:(0,o.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFileRestoredInput=function(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFileRestoredInput"'});if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "TrashFileRestoredInput"'});const t=e.id;if(null!=e.etag&&!(0,h.sdIsString)(e.etag))throw new u.BoxSdkError({message:'Expecting string for "etag" of type "TrashFileRestoredInput"'});const r=null==e.etag?void 0:e.etag,i=null==e.type?void 0:y(e.type);if(null==e.sequence_id)throw new u.BoxSdkError({message:'Expecting "sequence_id" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.sequence_id))throw new u.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFileRestoredInput"'});const o=e.sequence_id;if(null!=e.name&&!(0,h.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "TrashFileRestoredInput"'});const a=null==e.name?void 0:e.name;if(null==e.sha1)throw new u.BoxSdkError({message:'Expecting "sha1" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.sha1))throw new u.BoxSdkError({message:'Expecting string for "sha1" of type "TrashFileRestoredInput"'});const d=e.sha1,f=null==e.file_version?void 0:(0,n.deserializeFileVersionMini)(e.file_version);if(null==e.description)throw new u.BoxSdkError({message:'Expecting "description" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.description))throw new u.BoxSdkError({message:'Expecting string for "description" of type "TrashFileRestoredInput"'});const g=e.description;if(null==e.size)throw new u.BoxSdkError({message:'Expecting "size" of type "TrashFileRestoredInput" to be defined'});if(!(0,p.sdIsNumber)(e.size))throw new u.BoxSdkError({message:'Expecting number for "size" of type "TrashFileRestoredInput"'});const v=e.size;if(null==e.path_collection)throw new u.BoxSdkError({message:'Expecting "path_collection" of type "TrashFileRestoredInput" to be defined'});const w=b(e.path_collection);if(null==e.created_at)throw new u.BoxSdkError({message:'Expecting "created_at" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFileRestoredInput"'});const x=(0,c.deserializeDateTime)(e.created_at);if(null==e.modified_at)throw new u.BoxSdkError({message:'Expecting "modified_at" of type "TrashFileRestoredInput" to be defined'});if(!(0,h.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFileRestoredInput"'});const S=(0,c.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,h.sdIsString)(e.trashed_at))throw new u.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFileRestoredInput"'});const k=null==e.trashed_at?void 0:e.trashed_at;if(null!=e.purged_at&&!(0,h.sdIsString)(e.purged_at))throw new u.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFileRestoredInput"'});const E=null==e.purged_at?void 0:e.purged_at;if(null!=e.content_created_at&&!(0,h.sdIsString)(e.content_created_at))throw new u.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFileRestoredInput"'});const T=null==e.content_created_at?void 0:(0,c.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,h.sdIsString)(e.content_modified_at))throw new u.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFileRestoredInput"'});const B=null==e.content_modified_at?void 0:(0,c.deserializeDateTime)(e.content_modified_at),C=null==e.created_by?void 0:(0,l.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new u.BoxSdkError({message:'Expecting "modified_by" of type "TrashFileRestoredInput" to be defined'});const I=(0,l.deserializeUserMini)(e.modified_by);if(null==e.owned_by)throw new u.BoxSdkError({message:'Expecting "owned_by" of type "TrashFileRestoredInput" to be defined'});const A=(0,l.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,h.sdIsString)(e.shared_link))throw new u.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFileRestoredInput"'});const F=null==e.shared_link?void 0:e.shared_link,M=null==e.parent?void 0:(0,s.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new u.BoxSdkError({message:'Expecting "item_status" of type "TrashFileRestoredInput" to be defined'});const D=_(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,sha1:d,fileVersion:f,description:g,size:v,pathCollection:w,createdAt:x,modifiedAt:S,trashedAt:k,purgedAt:E,contentCreatedAt:T,contentModifiedAt:B,createdBy:C,modifiedBy:I,ownedBy:A,sharedLink:F,parent:M,itemStatus:D}};const i=r(95053),n=r(95053),o=r(70343),s=r(70343),a=r(95408),l=r(95408),d=r(93845),c=r(93845),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793);function g(e){return e}function y(e){if("file"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TrashFileRestoredTypeField"})}function v(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,o.serializeFolderMini)(e)}))}}function b(e){if(!(0,m.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "TrashFileRestoredPathCollectionField"'});if(null==e.total_count)throw new u.BoxSdkError({message:'Expecting "total_count" of type "TrashFileRestoredPathCollectionField" to be defined'});if(!(0,p.sdIsNumber)(e.total_count))throw new u.BoxSdkError({message:'Expecting number for "total_count" of type "TrashFileRestoredPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new u.BoxSdkError({message:'Expecting "entries" of type "TrashFileRestoredPathCollectionField" to be defined'});if(!(0,f.sdIsList)(e.entries))throw new u.BoxSdkError({message:'Expecting array for "entries" of type "TrashFileRestoredPathCollectionField"'});return{totalCount:t,entries:(0,f.sdIsList)(e.entries)?e.entries.map((function(e){return(0,s.deserializeFolderMini)(e)})):[]}}function w(e){return e}function _(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize TrashFileRestoredItemStatusField"})}t.TrashFileRestored=class{constructor(e){this.type="file",e.id&&(this.id=e.id),e.etag&&(this.etag=e.etag),e.type&&(this.type=e.type),e.sequenceId&&(this.sequenceId=e.sequenceId),e.name&&(this.name=e.name),e.sha1&&(this.sha1=e.sha1),e.fileVersion&&(this.fileVersion=e.fileVersion),e.description&&(this.description=e.description),e.size&&(this.size=e.size),e.pathCollection&&(this.pathCollection=e.pathCollection),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.trashedAt&&(this.trashedAt=e.trashedAt),e.purgedAt&&(this.purgedAt=e.purgedAt),e.contentCreatedAt&&(this.contentCreatedAt=e.contentCreatedAt),e.contentModifiedAt&&(this.contentModifiedAt=e.contentModifiedAt),e.createdBy&&(this.createdBy=e.createdBy),e.modifiedBy&&(this.modifiedBy=e.modifiedBy),e.ownedBy&&(this.ownedBy=e.ownedBy),e.sharedLink&&(this.sharedLink=e.sharedLink),e.parent&&(this.parent=e.parent),e.itemStatus&&(this.itemStatus=e.itemStatus),e.rawData&&(this.rawData=e.rawData)}}},4346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrashFolder=void 0,t.serializeTrashFolderTypeField=f,t.deserializeTrashFolderTypeField=m,t.serializeTrashFolderPathCollectionEntriesTypeField=g,t.deserializeTrashFolderPathCollectionEntriesTypeField=y,t.serializeTrashFolderPathCollectionEntriesField=v,t.deserializeTrashFolderPathCollectionEntriesField=b,t.serializeTrashFolderPathCollectionField=w,t.deserializeTrashFolderPathCollectionField=_,t.serializeTrashFolderItemStatusField=x,t.deserializeTrashFolderItemStatusField=S,t.serializeTrashFolder=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:e.type,sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:e.name,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),description:e.description,size:e.size,path_collection:w(e.pathCollection),created_by:(0,i.serializeUserMini)(e.createdBy),modified_by:(0,i.serializeUserMini)(e.modifiedBy),trashed_at:null==e.trashedAt?void 0:(0,a.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,a.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,a.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,a.serializeDateTime)(e.contentModifiedAt),owned_by:(0,i.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,folder_upload_email:null==e.folderUploadEmail?void 0:e.folderUploadEmail,parent:null==e.parent?void 0:(0,o.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFolder=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolder"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "TrashFolder" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashFolder"'});const t=e.id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashFolder"'});const r=null==e.etag?void 0:e.etag;if(null==e.type)throw new d.BoxSdkError({message:'Expecting "type" of type "TrashFolder" to be defined'});const i=m(e.type);if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFolder"'});const o=null==e.sequence_id?void 0:e.sequence_id;if(null==e.name)throw new d.BoxSdkError({message:'Expecting "name" of type "TrashFolder" to be defined'});if(!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashFolder"'});const a=e.name;if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFolder"'});const p=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFolder"'});const f=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null==e.description)throw new d.BoxSdkError({message:'Expecting "description" of type "TrashFolder" to be defined'});if(!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "TrashFolder"'});const g=e.description;if(null==e.size)throw new d.BoxSdkError({message:'Expecting "size" of type "TrashFolder" to be defined'});if(!(0,c.sdIsNumber)(e.size))throw new d.BoxSdkError({message:'Expecting number for "size" of type "TrashFolder"'});const y=e.size;if(null==e.path_collection)throw new d.BoxSdkError({message:'Expecting "path_collection" of type "TrashFolder" to be defined'});const v=_(e.path_collection);if(null==e.created_by)throw new d.BoxSdkError({message:'Expecting "created_by" of type "TrashFolder" to be defined'});const b=(0,n.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new d.BoxSdkError({message:'Expecting "modified_by" of type "TrashFolder" to be defined'});const w=(0,n.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new d.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFolder"'});const x=null==e.trashed_at?void 0:(0,l.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,u.sdIsString)(e.purged_at))throw new d.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFolder"'});const k=null==e.purged_at?void 0:(0,l.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,u.sdIsString)(e.content_created_at))throw new d.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFolder"'});const E=null==e.content_created_at?void 0:(0,l.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,u.sdIsString)(e.content_modified_at))throw new d.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFolder"'});const T=null==e.content_modified_at?void 0:(0,l.deserializeDateTime)(e.content_modified_at);if(null==e.owned_by)throw new d.BoxSdkError({message:'Expecting "owned_by" of type "TrashFolder" to be defined'});const B=(0,n.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,u.sdIsString)(e.shared_link))throw new d.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFolder"'});const C=null==e.shared_link?void 0:e.shared_link;if(null!=e.folder_upload_email&&!(0,u.sdIsString)(e.folder_upload_email))throw new d.BoxSdkError({message:'Expecting string for "folder_upload_email" of type "TrashFolder"'});const I=null==e.folder_upload_email?void 0:e.folder_upload_email,A=null==e.parent?void 0:(0,s.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new d.BoxSdkError({message:'Expecting "item_status" of type "TrashFolder" to be defined'});const F=S(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,createdAt:p,modifiedAt:f,description:g,size:y,pathCollection:v,createdBy:b,modifiedBy:w,trashedAt:x,purgedAt:k,contentCreatedAt:E,contentModifiedAt:T,ownedBy:B,sharedLink:C,folderUploadEmail:I,parent:A,itemStatus:F}},t.serializeTrashFolderInput=function(e){return{id:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type,sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:e.name,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),description:e.description,size:e.size,path_collection:w(e.pathCollection),created_by:(0,i.serializeUserMini)(e.createdBy),modified_by:(0,i.serializeUserMini)(e.modifiedBy),trashed_at:null==e.trashedAt?void 0:(0,a.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,a.serializeDateTime)(e.purgedAt),content_created_at:null==e.contentCreatedAt?void 0:(0,a.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,a.serializeDateTime)(e.contentModifiedAt),owned_by:(0,i.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,folder_upload_email:null==e.folderUploadEmail?void 0:e.folderUploadEmail,parent:null==e.parent?void 0:(0,o.serializeFolderMini)(e.parent),item_status:e.itemStatus}},t.deserializeTrashFolderInput=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolderInput"'});if(null==e.id)throw new d.BoxSdkError({message:'Expecting "id" of type "TrashFolderInput" to be defined'});if(!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashFolderInput"'});const t=e.id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashFolderInput"'});const r=null==e.etag?void 0:e.etag,i=null==e.type?void 0:m(e.type);if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFolderInput"'});const o=null==e.sequence_id?void 0:e.sequence_id;if(null==e.name)throw new d.BoxSdkError({message:'Expecting "name" of type "TrashFolderInput" to be defined'});if(!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashFolderInput"'});const a=e.name;if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFolderInput"'});const p=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFolderInput"'});const f=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null==e.description)throw new d.BoxSdkError({message:'Expecting "description" of type "TrashFolderInput" to be defined'});if(!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "TrashFolderInput"'});const g=e.description;if(null==e.size)throw new d.BoxSdkError({message:'Expecting "size" of type "TrashFolderInput" to be defined'});if(!(0,c.sdIsNumber)(e.size))throw new d.BoxSdkError({message:'Expecting number for "size" of type "TrashFolderInput"'});const y=e.size;if(null==e.path_collection)throw new d.BoxSdkError({message:'Expecting "path_collection" of type "TrashFolderInput" to be defined'});const v=_(e.path_collection);if(null==e.created_by)throw new d.BoxSdkError({message:'Expecting "created_by" of type "TrashFolderInput" to be defined'});const b=(0,n.deserializeUserMini)(e.created_by);if(null==e.modified_by)throw new d.BoxSdkError({message:'Expecting "modified_by" of type "TrashFolderInput" to be defined'});const w=(0,n.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new d.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFolderInput"'});const x=null==e.trashed_at?void 0:(0,l.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,u.sdIsString)(e.purged_at))throw new d.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFolderInput"'});const k=null==e.purged_at?void 0:(0,l.deserializeDateTime)(e.purged_at);if(null!=e.content_created_at&&!(0,u.sdIsString)(e.content_created_at))throw new d.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFolderInput"'});const E=null==e.content_created_at?void 0:(0,l.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,u.sdIsString)(e.content_modified_at))throw new d.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFolderInput"'});const T=null==e.content_modified_at?void 0:(0,l.deserializeDateTime)(e.content_modified_at);if(null==e.owned_by)throw new d.BoxSdkError({message:'Expecting "owned_by" of type "TrashFolderInput" to be defined'});const B=(0,n.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,u.sdIsString)(e.shared_link))throw new d.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFolderInput"'});const C=null==e.shared_link?void 0:e.shared_link;if(null!=e.folder_upload_email&&!(0,u.sdIsString)(e.folder_upload_email))throw new d.BoxSdkError({message:'Expecting string for "folder_upload_email" of type "TrashFolderInput"'});const I=null==e.folder_upload_email?void 0:e.folder_upload_email,A=null==e.parent?void 0:(0,s.deserializeFolderMini)(e.parent);if(null==e.item_status)throw new d.BoxSdkError({message:'Expecting "item_status" of type "TrashFolderInput" to be defined'});const F=S(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,createdAt:p,modifiedAt:f,description:g,size:y,pathCollection:v,createdBy:b,modifiedBy:w,trashedAt:x,purgedAt:k,contentCreatedAt:E,contentModifiedAt:T,ownedBy:B,sharedLink:C,folderUploadEmail:I,parent:A,itemStatus:F}};const i=r(95408),n=r(95408),o=r(70343),s=r(70343),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("folder"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashFolderTypeField"})}function g(e){return e}function y(e){if("folder"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashFolderPathCollectionEntriesTypeField"})}function v(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,sequence_id:null==e.sequenceId?void 0:e.sequenceId,etag:null==e.etag?void 0:e.etag,name:null==e.name?void 0:e.name}}function b(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolderPathCollectionEntriesField"'});const t=null==e.type?void 0:y(e.type);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashFolderPathCollectionEntriesField"'});const r=null==e.id?void 0:e.id;if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFolderPathCollectionEntriesField"'});const i=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashFolderPathCollectionEntriesField"'});const n=null==e.etag?void 0:e.etag;if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashFolderPathCollectionEntriesField"'});return{type:t,id:r,sequenceId:i,etag:n,name:null==e.name?void 0:e.name}}function w(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return v(e)}))}}function _(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolderPathCollectionField"'});if(null==e.total_count)throw new d.BoxSdkError({message:'Expecting "total_count" of type "TrashFolderPathCollectionField" to be defined'});if(!(0,c.sdIsNumber)(e.total_count))throw new d.BoxSdkError({message:'Expecting number for "total_count" of type "TrashFolderPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new d.BoxSdkError({message:'Expecting "entries" of type "TrashFolderPathCollectionField" to be defined'});if(!(0,p.sdIsList)(e.entries))throw new d.BoxSdkError({message:'Expecting array for "entries" of type "TrashFolderPathCollectionField"'});return{totalCount:t,entries:(0,p.sdIsList)(e.entries)?e.entries.map((function(e){return b(e)})):[]}}function x(e){return e}function S(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashFolderItemStatusField"})}t.TrashFolder=class{constructor(e){this.type="folder",e.id&&(this.id=e.id),e.etag&&(this.etag=e.etag),e.type&&(this.type=e.type),e.sequenceId&&(this.sequenceId=e.sequenceId),e.name&&(this.name=e.name),e.createdAt&&(this.createdAt=e.createdAt),e.modifiedAt&&(this.modifiedAt=e.modifiedAt),e.description&&(this.description=e.description),e.size&&(this.size=e.size),e.pathCollection&&(this.pathCollection=e.pathCollection),e.createdBy&&(this.createdBy=e.createdBy),e.modifiedBy&&(this.modifiedBy=e.modifiedBy),e.trashedAt&&(this.trashedAt=e.trashedAt),e.purgedAt&&(this.purgedAt=e.purgedAt),e.contentCreatedAt&&(this.contentCreatedAt=e.contentCreatedAt),e.contentModifiedAt&&(this.contentModifiedAt=e.contentModifiedAt),e.ownedBy&&(this.ownedBy=e.ownedBy),e.sharedLink&&(this.sharedLink=e.sharedLink),e.folderUploadEmail&&(this.folderUploadEmail=e.folderUploadEmail),e.parent&&(this.parent=e.parent),e.itemStatus&&(this.itemStatus=e.itemStatus),e.rawData&&(this.rawData=e.rawData)}}},84064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTrashFolderRestoredTypeField=f,t.deserializeTrashFolderRestoredTypeField=m,t.serializeTrashFolderRestoredPathCollectionField=g,t.deserializeTrashFolderRestoredPathCollectionField=y,t.serializeTrashFolderRestoredItemStatusField=v,t.deserializeTrashFolderRestoredItemStatusField=b,t.serializeTrashFolderRestored=function(e){return{id:null==e.id?void 0:e.id,etag:null==e.etag?void 0:e.etag,type:null==e.type?void 0:e.type,sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:null==e.name?void 0:e.name,created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),description:null==e.description?void 0:e.description,size:null==e.size?void 0:e.size,path_collection:null==e.pathCollection?void 0:g(e.pathCollection),created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,o.serializeUserMini)(e.modifiedBy),trashed_at:null==e.trashedAt?void 0:e.trashedAt,purged_at:null==e.purgedAt?void 0:e.purgedAt,content_created_at:null==e.contentCreatedAt?void 0:(0,a.serializeDateTime)(e.contentCreatedAt),content_modified_at:null==e.contentModifiedAt?void 0:(0,a.serializeDateTime)(e.contentModifiedAt),owned_by:null==e.ownedBy?void 0:(0,o.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,folder_upload_email:null==e.folderUploadEmail?void 0:e.folderUploadEmail,parent:null==e.parent?void 0:(0,i.serializeFolderMini)(e.parent),item_status:null==e.itemStatus?void 0:e.itemStatus}},t.deserializeTrashFolderRestored=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolderRestored"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashFolderRestored"'});const t=null==e.id?void 0:e.id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashFolderRestored"'});const r=null==e.etag?void 0:e.etag,i=null==e.type?void 0:m(e.type);if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashFolderRestored"'});const o=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashFolderRestored"'});const a=null==e.name?void 0:e.name;if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TrashFolderRestored"'});const p=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashFolderRestored"'});const f=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "TrashFolderRestored"'});const g=null==e.description?void 0:e.description;if(null!=e.size&&!(0,c.sdIsNumber)(e.size))throw new d.BoxSdkError({message:'Expecting number for "size" of type "TrashFolderRestored"'});const v=null==e.size?void 0:e.size,w=null==e.path_collection?void 0:y(e.path_collection),_=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by),x=null==e.modified_by?void 0:(0,s.deserializeUserMini)(e.modified_by);if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new d.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashFolderRestored"'});const S=null==e.trashed_at?void 0:e.trashed_at;if(null!=e.purged_at&&!(0,u.sdIsString)(e.purged_at))throw new d.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashFolderRestored"'});const k=null==e.purged_at?void 0:e.purged_at;if(null!=e.content_created_at&&!(0,u.sdIsString)(e.content_created_at))throw new d.BoxSdkError({message:'Expecting string for "content_created_at" of type "TrashFolderRestored"'});const E=null==e.content_created_at?void 0:(0,l.deserializeDateTime)(e.content_created_at);if(null!=e.content_modified_at&&!(0,u.sdIsString)(e.content_modified_at))throw new d.BoxSdkError({message:'Expecting string for "content_modified_at" of type "TrashFolderRestored"'});const T=null==e.content_modified_at?void 0:(0,l.deserializeDateTime)(e.content_modified_at),B=null==e.owned_by?void 0:(0,s.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,u.sdIsString)(e.shared_link))throw new d.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashFolderRestored"'});const C=null==e.shared_link?void 0:e.shared_link;if(null!=e.folder_upload_email&&!(0,u.sdIsString)(e.folder_upload_email))throw new d.BoxSdkError({message:'Expecting string for "folder_upload_email" of type "TrashFolderRestored"'});const I=null==e.folder_upload_email?void 0:e.folder_upload_email,A=null==e.parent?void 0:(0,n.deserializeFolderMini)(e.parent),F=null==e.item_status?void 0:b(e.item_status);return{id:t,etag:r,type:i,sequenceId:o,name:a,createdAt:p,modifiedAt:f,description:g,size:v,pathCollection:w,createdBy:_,modifiedBy:x,trashedAt:S,purgedAt:k,contentCreatedAt:E,contentModifiedAt:T,ownedBy:B,sharedLink:C,folderUploadEmail:I,parent:A,itemStatus:F}};const i=r(70343),n=r(70343),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("folder"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashFolderRestoredTypeField"})}function g(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,i.serializeFolderMini)(e)}))}}function y(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashFolderRestoredPathCollectionField"'});if(null==e.total_count)throw new d.BoxSdkError({message:'Expecting "total_count" of type "TrashFolderRestoredPathCollectionField" to be defined'});if(!(0,c.sdIsNumber)(e.total_count))throw new d.BoxSdkError({message:'Expecting number for "total_count" of type "TrashFolderRestoredPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new d.BoxSdkError({message:'Expecting "entries" of type "TrashFolderRestoredPathCollectionField" to be defined'});if(!(0,p.sdIsList)(e.entries))throw new d.BoxSdkError({message:'Expecting array for "entries" of type "TrashFolderRestoredPathCollectionField"'});return{totalCount:t,entries:(0,p.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFolderMini)(e)})):[]}}function v(e){return e}function b(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashFolderRestoredItemStatusField"})}},13640:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTrashWebLinkTypeField=f,t.deserializeTrashWebLinkTypeField=m,t.serializeTrashWebLinkPathCollectionEntriesTypeField=g,t.deserializeTrashWebLinkPathCollectionEntriesTypeField=y,t.serializeTrashWebLinkPathCollectionEntriesField=v,t.deserializeTrashWebLinkPathCollectionEntriesField=b,t.serializeTrashWebLinkPathCollectionField=w,t.deserializeTrashWebLinkPathCollectionField=_,t.serializeTrashWebLinkItemStatusField=x,t.deserializeTrashWebLinkItemStatusField=S,t.serializeTrashWebLink=function(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,sequence_id:null==e.sequenceId?void 0:e.sequenceId,etag:null==e.etag?void 0:e.etag,name:null==e.name?void 0:e.name,url:null==e.url?void 0:e.url,parent:null==e.parent?void 0:(0,i.serializeFolderMini)(e.parent),description:null==e.description?void 0:e.description,path_collection:null==e.pathCollection?void 0:w(e.pathCollection),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:(0,a.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,a.serializeDateTime)(e.purgedAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,o.serializeUserMini)(e.modifiedBy),owned_by:null==e.ownedBy?void 0:(0,o.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,item_status:null==e.itemStatus?void 0:e.itemStatus}},t.deserializeTrashWebLink=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashWebLink"'});const t=null==e.type?void 0:m(e.type);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashWebLink"'});const r=null==e.id?void 0:e.id;if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashWebLink"'});const i=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashWebLink"'});const o=null==e.etag?void 0:e.etag;if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashWebLink"'});const a=null==e.name?void 0:e.name;if(null!=e.url&&!(0,u.sdIsString)(e.url))throw new d.BoxSdkError({message:'Expecting string for "url" of type "TrashWebLink"'});const c=null==e.url?void 0:e.url,p=null==e.parent?void 0:(0,n.deserializeFolderMini)(e.parent);if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "TrashWebLink"'});const f=null==e.description?void 0:e.description,g=null==e.path_collection?void 0:_(e.path_collection);if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TrashWebLink"'});const y=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashWebLink"'});const v=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new d.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashWebLink"'});const b=null==e.trashed_at?void 0:(0,l.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,u.sdIsString)(e.purged_at))throw new d.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashWebLink"'});const w=null==e.purged_at?void 0:(0,l.deserializeDateTime)(e.purged_at),x=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by),k=null==e.modified_by?void 0:(0,s.deserializeUserMini)(e.modified_by),E=null==e.owned_by?void 0:(0,s.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,u.sdIsString)(e.shared_link))throw new d.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashWebLink"'});const T=null==e.shared_link?void 0:e.shared_link,B=null==e.item_status?void 0:S(e.item_status);return{type:t,id:r,sequenceId:i,etag:o,name:a,url:c,parent:p,description:f,pathCollection:g,createdAt:y,modifiedAt:v,trashedAt:b,purgedAt:w,createdBy:x,modifiedBy:k,ownedBy:E,sharedLink:T,itemStatus:B}};const i=r(70343),n=r(70343),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("web_link"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashWebLinkTypeField"})}function g(e){return e}function y(e){if("folder"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashWebLinkPathCollectionEntriesTypeField"})}function v(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,sequence_id:null==e.sequenceId?void 0:e.sequenceId,etag:null==e.etag?void 0:e.etag,name:null==e.name?void 0:e.name}}function b(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashWebLinkPathCollectionEntriesField"'});const t=null==e.type?void 0:y(e.type);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashWebLinkPathCollectionEntriesField"'});const r=null==e.id?void 0:e.id;if(null!=e.sequence_id&&!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashWebLinkPathCollectionEntriesField"'});const i=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashWebLinkPathCollectionEntriesField"'});const n=null==e.etag?void 0:e.etag;if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashWebLinkPathCollectionEntriesField"'});return{type:t,id:r,sequenceId:i,etag:n,name:null==e.name?void 0:e.name}}function w(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return v(e)}))}}function _(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashWebLinkPathCollectionField"'});if(null==e.total_count)throw new d.BoxSdkError({message:'Expecting "total_count" of type "TrashWebLinkPathCollectionField" to be defined'});if(!(0,c.sdIsNumber)(e.total_count))throw new d.BoxSdkError({message:'Expecting number for "total_count" of type "TrashWebLinkPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new d.BoxSdkError({message:'Expecting "entries" of type "TrashWebLinkPathCollectionField" to be defined'});if(!(0,p.sdIsList)(e.entries))throw new d.BoxSdkError({message:'Expecting array for "entries" of type "TrashWebLinkPathCollectionField"'});return{totalCount:t,entries:(0,p.sdIsList)(e.entries)?e.entries.map((function(e){return b(e)})):[]}}function x(e){return e}function S(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashWebLinkItemStatusField"})}},49238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTrashWebLinkRestoredTypeField=f,t.deserializeTrashWebLinkRestoredTypeField=m,t.serializeTrashWebLinkRestoredPathCollectionField=g,t.deserializeTrashWebLinkRestoredPathCollectionField=y,t.serializeTrashWebLinkRestoredItemStatusField=v,t.deserializeTrashWebLinkRestoredItemStatusField=b,t.serializeTrashWebLinkRestored=function(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id,sequence_id:e.sequenceId,etag:null==e.etag?void 0:e.etag,name:null==e.name?void 0:e.name,url:null==e.url?void 0:e.url,parent:null==e.parent?void 0:(0,i.serializeFolderMini)(e.parent),description:null==e.description?void 0:e.description,path_collection:g(e.pathCollection),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,a.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:e.trashedAt,purged_at:null==e.purgedAt?void 0:e.purgedAt,created_by:null==e.createdBy?void 0:(0,o.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,o.serializeUserMini)(e.modifiedBy),owned_by:null==e.ownedBy?void 0:(0,o.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:e.sharedLink,item_status:null==e.itemStatus?void 0:e.itemStatus}},t.deserializeTrashWebLinkRestored=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashWebLinkRestored"'});const t=null==e.type?void 0:m(e.type);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "TrashWebLinkRestored"'});const r=null==e.id?void 0:e.id;if(null==e.sequence_id)throw new d.BoxSdkError({message:'Expecting "sequence_id" of type "TrashWebLinkRestored" to be defined'});if(!(0,u.sdIsString)(e.sequence_id))throw new d.BoxSdkError({message:'Expecting string for "sequence_id" of type "TrashWebLinkRestored"'});const i=e.sequence_id;if(null!=e.etag&&!(0,u.sdIsString)(e.etag))throw new d.BoxSdkError({message:'Expecting string for "etag" of type "TrashWebLinkRestored"'});const o=null==e.etag?void 0:e.etag;if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "TrashWebLinkRestored"'});const a=null==e.name?void 0:e.name;if(null!=e.url&&!(0,u.sdIsString)(e.url))throw new d.BoxSdkError({message:'Expecting string for "url" of type "TrashWebLinkRestored"'});const c=null==e.url?void 0:e.url,p=null==e.parent?void 0:(0,n.deserializeFolderMini)(e.parent);if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "TrashWebLinkRestored"'});const f=null==e.description?void 0:e.description;if(null==e.path_collection)throw new d.BoxSdkError({message:'Expecting "path_collection" of type "TrashWebLinkRestored" to be defined'});const g=y(e.path_collection);if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "TrashWebLinkRestored"'});const v=null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new d.BoxSdkError({message:'Expecting string for "modified_at" of type "TrashWebLinkRestored"'});const w=null==e.modified_at?void 0:(0,l.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,u.sdIsString)(e.trashed_at))throw new d.BoxSdkError({message:'Expecting string for "trashed_at" of type "TrashWebLinkRestored"'});const _=null==e.trashed_at?void 0:e.trashed_at;if(null!=e.purged_at&&!(0,u.sdIsString)(e.purged_at))throw new d.BoxSdkError({message:'Expecting string for "purged_at" of type "TrashWebLinkRestored"'});const x=null==e.purged_at?void 0:e.purged_at,S=null==e.created_by?void 0:(0,s.deserializeUserMini)(e.created_by),k=null==e.modified_by?void 0:(0,s.deserializeUserMini)(e.modified_by),E=null==e.owned_by?void 0:(0,s.deserializeUserMini)(e.owned_by);if(null!=e.shared_link&&!(0,u.sdIsString)(e.shared_link))throw new d.BoxSdkError({message:'Expecting string for "shared_link" of type "TrashWebLinkRestored"'});const T=null==e.shared_link?void 0:e.shared_link,B=null==e.item_status?void 0:b(e.item_status);return{type:t,id:r,sequenceId:i,etag:o,name:a,url:c,parent:p,description:f,pathCollection:g,createdAt:v,modifiedAt:w,trashedAt:_,purgedAt:x,createdBy:S,modifiedBy:k,ownedBy:E,sharedLink:T,itemStatus:B}};const i=r(70343),n=r(70343),o=r(95408),s=r(95408),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("web_link"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashWebLinkRestoredTypeField"})}function g(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,i.serializeFolderMini)(e)}))}}function y(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "TrashWebLinkRestoredPathCollectionField"'});if(null==e.total_count)throw new d.BoxSdkError({message:'Expecting "total_count" of type "TrashWebLinkRestoredPathCollectionField" to be defined'});if(!(0,c.sdIsNumber)(e.total_count))throw new d.BoxSdkError({message:'Expecting number for "total_count" of type "TrashWebLinkRestoredPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new d.BoxSdkError({message:'Expecting "entries" of type "TrashWebLinkRestoredPathCollectionField" to be defined'});if(!(0,p.sdIsList)(e.entries))throw new d.BoxSdkError({message:'Expecting array for "entries" of type "TrashWebLinkRestoredPathCollectionField"'});return{totalCount:t,entries:(0,p.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeFolderMini)(e)})):[]}}function v(e){return e}function b(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize TrashWebLinkRestoredItemStatusField"})}},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadPart=function(e){const t=(0,i.serializeUploadPartMini)(e);if(!(0,a.sdIsMap)(t))throw new n.BoxSdkError({message:'Expecting a map for "UploadPart"'});return Object.assign(Object.assign({},t),{sha1:null==e.sha1?void 0:e.sha1})},t.deserializeUploadPart=function(e){if(!(0,a.sdIsMap)(e))throw new n.BoxSdkError({message:'Expecting a map for "UploadPart"'});if(null!=e.sha1&&!(0,s.sdIsString)(e.sha1))throw new n.BoxSdkError({message:'Expecting string for "sha1" of type "UploadPart"'});const t=null==e.sha1?void 0:e.sha1;if(null!=e.part_id&&!(0,s.sdIsString)(e.part_id))throw new n.BoxSdkError({message:'Expecting string for "part_id" of type "UploadPart"'});const r=null==e.part_id?void 0:e.part_id;if(null!=e.offset&&!(0,o.sdIsNumber)(e.offset))throw new n.BoxSdkError({message:'Expecting number for "offset" of type "UploadPart"'});const i=null==e.offset?void 0:e.offset;if(null!=e.size&&!(0,o.sdIsNumber)(e.size))throw new n.BoxSdkError({message:'Expecting number for "size" of type "UploadPart"'});const l=null==e.size?void 0:e.size;return{sha1:t,partId:r,offset:i,size:l}};const i=r(81891),n=r(72631),o=r(50793),s=r(50793),a=r(50793)},81891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadPartMini=function(e){return{part_id:null==e.partId?void 0:e.partId,offset:null==e.offset?void 0:e.offset,size:null==e.size?void 0:e.size}},t.deserializeUploadPartMini=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UploadPartMini"'});if(null!=e.part_id&&!(0,o.sdIsString)(e.part_id))throw new i.BoxSdkError({message:'Expecting string for "part_id" of type "UploadPartMini"'});const t=null==e.part_id?void 0:e.part_id;if(null!=e.offset&&!(0,n.sdIsNumber)(e.offset))throw new i.BoxSdkError({message:'Expecting number for "offset" of type "UploadPartMini"'});const r=null==e.offset?void 0:e.offset;if(null!=e.size&&!(0,n.sdIsNumber)(e.size))throw new i.BoxSdkError({message:'Expecting number for "size" of type "UploadPartMini"'});const a=null==e.size?void 0:e.size;return{partId:t,offset:r,size:a}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793)},2001:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadPartsOrderDirectionField=c,t.deserializeUploadPartsOrderDirectionField=u,t.serializeUploadPartsOrderField=p,t.deserializeUploadPartsOrderField=h,t.serializeUploadParts=function(e){return{total_count:null==e.totalCount?void 0:e.totalCount,limit:null==e.limit?void 0:e.limit,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeUploadPart)(e)}))}},t.deserializeUploadParts=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UploadParts"'});if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "UploadParts"'});const t=null==e.total_count?void 0:e.total_count;if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "UploadParts"'});const r=null==e.limit?void 0:e.limit;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "UploadParts"'});const i=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "UploadParts"'});const a=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "UploadParts"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeUploadPart)(e)})):[];return{totalCount:t,limit:r,offset:i,order:a,entries:c}};const i=r(3868),n=r(3868),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize UploadPartsOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UploadPartsOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "UploadPartsOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},26391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadSessionTypeField=d,t.deserializeUploadSessionTypeField=c,t.serializeUploadSessionSessionEndpointsField=u,t.deserializeUploadSessionSessionEndpointsField=p,t.serializeUploadSession=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,session_expires_at:null==e.sessionExpiresAt?void 0:(0,i.serializeDateTime)(e.sessionExpiresAt),part_size:null==e.partSize?void 0:e.partSize,total_parts:null==e.totalParts?void 0:e.totalParts,num_parts_processed:null==e.numPartsProcessed?void 0:e.numPartsProcessed,session_endpoints:null==e.sessionEndpoints?void 0:u(e.sessionEndpoints)}},t.deserializeUploadSession=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UploadSession"'});if(null!=e.id&&!(0,a.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "UploadSession"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:c(e.type);if(null!=e.session_expires_at&&!(0,a.sdIsString)(e.session_expires_at))throw new o.BoxSdkError({message:'Expecting string for "session_expires_at" of type "UploadSession"'});const i=null==e.session_expires_at?void 0:(0,n.deserializeDateTime)(e.session_expires_at);if(null!=e.part_size&&!(0,s.sdIsNumber)(e.part_size))throw new o.BoxSdkError({message:'Expecting number for "part_size" of type "UploadSession"'});const d=null==e.part_size?void 0:e.part_size;if(null!=e.total_parts&&!(0,s.sdIsNumber)(e.total_parts))throw new o.BoxSdkError({message:'Expecting number for "total_parts" of type "UploadSession"'});const u=null==e.total_parts?void 0:e.total_parts;if(null!=e.num_parts_processed&&!(0,s.sdIsNumber)(e.num_parts_processed))throw new o.BoxSdkError({message:'Expecting number for "num_parts_processed" of type "UploadSession"'});const h=null==e.num_parts_processed?void 0:e.num_parts_processed,f=null==e.session_endpoints?void 0:p(e.session_endpoints);return{id:t,type:r,sessionExpiresAt:i,partSize:d,totalParts:u,numPartsProcessed:h,sessionEndpoints:f}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("upload_session"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize UploadSessionTypeField"})}function u(e){return{upload_part:null==e.uploadPart?void 0:e.uploadPart,commit:null==e.commit?void 0:e.commit,abort:null==e.abort?void 0:e.abort,list_parts:null==e.listParts?void 0:e.listParts,status:null==e.status?void 0:e.status,log_event:null==e.logEvent?void 0:e.logEvent}}function p(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UploadSessionSessionEndpointsField"'});if(null!=e.upload_part&&!(0,a.sdIsString)(e.upload_part))throw new o.BoxSdkError({message:'Expecting string for "upload_part" of type "UploadSessionSessionEndpointsField"'});const t=null==e.upload_part?void 0:e.upload_part;if(null!=e.commit&&!(0,a.sdIsString)(e.commit))throw new o.BoxSdkError({message:'Expecting string for "commit" of type "UploadSessionSessionEndpointsField"'});const r=null==e.commit?void 0:e.commit;if(null!=e.abort&&!(0,a.sdIsString)(e.abort))throw new o.BoxSdkError({message:'Expecting string for "abort" of type "UploadSessionSessionEndpointsField"'});const i=null==e.abort?void 0:e.abort;if(null!=e.list_parts&&!(0,a.sdIsString)(e.list_parts))throw new o.BoxSdkError({message:'Expecting string for "list_parts" of type "UploadSessionSessionEndpointsField"'});const n=null==e.list_parts?void 0:e.list_parts;if(null!=e.status&&!(0,a.sdIsString)(e.status))throw new o.BoxSdkError({message:'Expecting string for "status" of type "UploadSessionSessionEndpointsField"'});const s=null==e.status?void 0:e.status;if(null!=e.log_event&&!(0,a.sdIsString)(e.log_event))throw new o.BoxSdkError({message:'Expecting string for "log_event" of type "UploadSessionSessionEndpointsField"'});return{uploadPart:t,commit:r,abort:i,listParts:n,status:s,logEvent:null==e.log_event?void 0:e.log_event}}},2090:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadUrl=function(e){return{upload_url:null==e.uploadUrl?void 0:e.uploadUrl,upload_token:null==e.uploadToken?void 0:e.uploadToken}},t.deserializeUploadUrl=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UploadUrl"'});if(null!=e.upload_url&&!(0,n.sdIsString)(e.upload_url))throw new i.BoxSdkError({message:'Expecting string for "upload_url" of type "UploadUrl"'});const t=null==e.upload_url?void 0:e.upload_url;if(null!=e.upload_token&&!(0,n.sdIsString)(e.upload_token))throw new i.BoxSdkError({message:'Expecting string for "upload_token" of type "UploadUrl"'});const r=null==e.upload_token?void 0:e.upload_token;return{uploadUrl:t,uploadToken:r}};const i=r(72631),n=r(50793),o=r(50793)},31621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUploadedPart=function(e){return{part:null==e.part?void 0:(0,i.serializeUploadPart)(e.part)}},t.deserializeUploadedPart=function(e){if(!(0,s.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UploadedPart"'});return{part:null==e.part?void 0:(0,n.deserializeUploadPart)(e.part)}};const i=r(3868),n=r(3868),o=r(72631),s=r(50793)},1543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0,t.serializeUserStatusField=f,t.deserializeUserStatusField=m,t.serializeUserNotificationEmailField=g,t.deserializeUserNotificationEmailField=y,t.serializeUser=function(e){const t=(0,n.serializeUserMini)(e);if(!(0,p.sdIsMap)(t))throw new l.BoxSdkError({message:'Expecting a map for "User"'});return Object.assign(Object.assign({},t),{created_at:null==e.createdAt?void 0:(0,o.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,o.serializeDateTime)(e.modifiedAt),language:null==e.language?void 0:e.language,timezone:null==e.timezone?void 0:e.timezone,space_amount:null==e.spaceAmount?void 0:e.spaceAmount,space_used:null==e.spaceUsed?void 0:e.spaceUsed,max_upload_size:null==e.maxUploadSize?void 0:e.maxUploadSize,status:null==e.status?void 0:e.status,job_title:null==e.jobTitle?void 0:e.jobTitle,phone:null==e.phone?void 0:e.phone,address:null==e.address?void 0:e.address,avatar_url:null==e.avatarUrl?void 0:e.avatarUrl,notification_email:null==e.notificationEmail?void 0:g(e.notificationEmail)})},t.deserializeUser=function(e){if(!(0,p.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "User"'});if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new l.BoxSdkError({message:'Expecting string for "created_at" of type "User"'});const t=null==e.created_at?void 0:(0,s.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,u.sdIsString)(e.modified_at))throw new l.BoxSdkError({message:'Expecting string for "modified_at" of type "User"'});const r=null==e.modified_at?void 0:(0,s.deserializeDateTime)(e.modified_at);if(null!=e.language&&!(0,u.sdIsString)(e.language))throw new l.BoxSdkError({message:'Expecting string for "language" of type "User"'});const n=null==e.language?void 0:e.language;if(null!=e.timezone&&!(0,u.sdIsString)(e.timezone))throw new l.BoxSdkError({message:'Expecting string for "timezone" of type "User"'});const o=null==e.timezone?void 0:e.timezone;if(null!=e.space_amount&&!(0,c.sdIsNumber)(e.space_amount))throw new l.BoxSdkError({message:'Expecting number for "space_amount" of type "User"'});const a=null==e.space_amount?void 0:e.space_amount;if(null!=e.space_used&&!(0,c.sdIsNumber)(e.space_used))throw new l.BoxSdkError({message:'Expecting number for "space_used" of type "User"'});const d=null==e.space_used?void 0:e.space_used;if(null!=e.max_upload_size&&!(0,c.sdIsNumber)(e.max_upload_size))throw new l.BoxSdkError({message:'Expecting number for "max_upload_size" of type "User"'});const h=null==e.max_upload_size?void 0:e.max_upload_size,f=null==e.status?void 0:m(e.status);if(null!=e.job_title&&!(0,u.sdIsString)(e.job_title))throw new l.BoxSdkError({message:'Expecting string for "job_title" of type "User"'});const g=null==e.job_title?void 0:e.job_title;if(null!=e.phone&&!(0,u.sdIsString)(e.phone))throw new l.BoxSdkError({message:'Expecting string for "phone" of type "User"'});const v=null==e.phone?void 0:e.phone;if(null!=e.address&&!(0,u.sdIsString)(e.address))throw new l.BoxSdkError({message:'Expecting string for "address" of type "User"'});const b=null==e.address?void 0:e.address;if(null!=e.avatar_url&&!(0,u.sdIsString)(e.avatar_url))throw new l.BoxSdkError({message:'Expecting string for "avatar_url" of type "User"'});const w=null==e.avatar_url?void 0:e.avatar_url,_=null==e.notification_email?void 0:y(e.notification_email);if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new l.BoxSdkError({message:'Expecting string for "name" of type "User"'});const x=null==e.name?void 0:e.name;if(null!=e.login&&!(0,u.sdIsString)(e.login))throw new l.BoxSdkError({message:'Expecting string for "login" of type "User"'});const S=null==e.login?void 0:e.login;if(null==e.id)throw new l.BoxSdkError({message:'Expecting "id" of type "User" to be defined'});if(!(0,u.sdIsString)(e.id))throw new l.BoxSdkError({message:'Expecting string for "id" of type "User"'});const k=e.id;if(null==e.type)throw new l.BoxSdkError({message:'Expecting "type" of type "User" to be defined'});const E=(0,i.deserializeUserBaseTypeField)(e.type);return{createdAt:t,modifiedAt:r,language:n,timezone:o,spaceAmount:a,spaceUsed:d,maxUploadSize:h,status:f,jobTitle:g,phone:v,address:b,avatarUrl:w,notificationEmail:_,name:x,login:S,id:k,type:E}};const i=r(78366),n=r(95408),o=r(93845),s=r(93845),a=r(95408),l=r(72631),d=r(50793),c=r(50793),u=r(50793),p=r(50793);class h extends a.UserMini{constructor(e){super(e)}}function f(e){return e}function m(e){if("active"==e)return e;if("inactive"==e)return e;if("cannot_delete_edit"==e)return e;if("cannot_delete_edit_upload"==e)return e;throw new l.BoxSdkError({message:"Can't deserialize UserStatusField"})}function g(e){return{email:null==e.email?void 0:e.email,is_confirmed:null==e.isConfirmed?void 0:e.isConfirmed}}function y(e){if(!(0,p.sdIsMap)(e))throw new l.BoxSdkError({message:'Expecting a map for "UserNotificationEmailField"'});if(null!=e.email&&!(0,u.sdIsString)(e.email))throw new l.BoxSdkError({message:'Expecting string for "email" of type "UserNotificationEmailField"'});const t=null==e.email?void 0:e.email;if(null!=e.is_confirmed&&!(0,d.sdIsBoolean)(e.is_confirmed))throw new l.BoxSdkError({message:'Expecting boolean for "is_confirmed" of type "UserNotificationEmailField"'});return{email:t,isConfirmed:null==e.is_confirmed?void 0:e.is_confirmed}}t.User=h},59730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUserAvatarPicUrlsField=s,t.deserializeUserAvatarPicUrlsField=a,t.serializeUserAvatar=function(e){return{pic_urls:null==e.picUrls?void 0:s(e.picUrls)}},t.deserializeUserAvatar=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UserAvatar"'});return{picUrls:null==e.pic_urls?void 0:a(e.pic_urls)}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return{small:null==e.small?void 0:e.small,large:null==e.large?void 0:e.large,preview:null==e.preview?void 0:e.preview}}function a(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UserAvatarPicUrlsField"'});if(null!=e.small&&!(0,n.sdIsString)(e.small))throw new i.BoxSdkError({message:'Expecting string for "small" of type "UserAvatarPicUrlsField"'});const t=null==e.small?void 0:e.small;if(null!=e.large&&!(0,n.sdIsString)(e.large))throw new i.BoxSdkError({message:'Expecting string for "large" of type "UserAvatarPicUrlsField"'});const r=null==e.large?void 0:e.large;if(null!=e.preview&&!(0,n.sdIsString)(e.preview))throw new i.BoxSdkError({message:'Expecting string for "preview" of type "UserAvatarPicUrlsField"'});return{small:t,large:r,preview:null==e.preview?void 0:e.preview}}},78366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserBase=void 0,t.serializeUserBaseTypeField=s,t.deserializeUserBaseTypeField=a,t.serializeUserBase=function(e){return{id:e.id,type:e.type}},t.deserializeUserBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UserBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "UserBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "UserBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "UserBase" to be defined'});const r=a(e.type);return{id:t,type:r}},t.serializeUserBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type}},t.deserializeUserBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "UserBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "UserBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "UserBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);return{id:t,type:r}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("user"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize UserBaseTypeField"})}t.UserBase=class{constructor(e){this.type="user",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.rawData&&(this.rawData=e.rawData)}}},21517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserCollaborations=void 0,t.serializeUserCollaborations=function(e){const t=(0,n.serializeUserBase)(e);if(!(0,d.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "UserCollaborations"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name,login:null==e.login?void 0:e.login,is_active:null==e.isActive?void 0:e.isActive})},t.deserializeUserCollaborations=function(e){if(!(0,d.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "UserCollaborations"'});if(null!=e.name&&!(0,l.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "UserCollaborations"'});const t=null==e.name?void 0:e.name;if(null!=e.login&&!(0,l.sdIsString)(e.login))throw new s.BoxSdkError({message:'Expecting string for "login" of type "UserCollaborations"'});const r=null==e.login?void 0:e.login;if(null!=e.is_active&&!(0,a.sdIsBoolean)(e.is_active))throw new s.BoxSdkError({message:'Expecting boolean for "is_active" of type "UserCollaborations"'});const n=null==e.is_active?void 0:e.is_active;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "UserCollaborations" to be defined'});if(!(0,l.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "UserCollaborations"'});const o=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "UserCollaborations" to be defined'});const c=(0,i.deserializeUserBaseTypeField)(e.type);return{name:t,login:r,isActive:n,id:o,type:c}};const i=r(78366),n=r(78366),o=r(78366),s=r(72631),a=r(50793),l=r(50793),d=r(50793);class c extends o.UserBase{constructor(e){super(e)}}t.UserCollaborations=c},88510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserFull=void 0,t.serializeUserFullRoleField=v,t.deserializeUserFullRoleField=b,t.serializeUserFullEnterpriseTypeField=w,t.deserializeUserFullEnterpriseTypeField=_,t.serializeUserFullEnterpriseField=x,t.deserializeUserFullEnterpriseField=S,t.serializeUserFull=function(e){const t=(0,a.serializeUser)(e);if(!(0,g.sdIsMap)(t))throw new u.BoxSdkError({message:'Expecting a map for "UserFull"'});return Object.assign(Object.assign({},t),{role:null==e.role?void 0:e.role,tracking_codes:null==e.trackingCodes?void 0:e.trackingCodes.map((function(e){return(0,l.serializeTrackingCode)(e)})),can_see_managed_users:null==e.canSeeManagedUsers?void 0:e.canSeeManagedUsers,is_sync_enabled:null==e.isSyncEnabled?void 0:e.isSyncEnabled,is_external_collab_restricted:null==e.isExternalCollabRestricted?void 0:e.isExternalCollabRestricted,is_exempt_from_device_limits:null==e.isExemptFromDeviceLimits?void 0:e.isExemptFromDeviceLimits,is_exempt_from_login_verification:null==e.isExemptFromLoginVerification?void 0:e.isExemptFromLoginVerification,enterprise:null==e.enterprise?void 0:x(e.enterprise),my_tags:null==e.myTags?void 0:e.myTags.map((function(e){return e})),hostname:null==e.hostname?void 0:e.hostname,is_platform_access_only:null==e.isPlatformAccessOnly?void 0:e.isPlatformAccessOnly,external_app_user_id:null==e.externalAppUserId?void 0:e.externalAppUserId})},t.deserializeUserFull=function(e){if(!(0,g.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UserFull"'});const t=null==e.role?void 0:b(e.role);if(null!=e.tracking_codes&&!(0,m.sdIsList)(e.tracking_codes))throw new u.BoxSdkError({message:'Expecting array for "tracking_codes" of type "UserFull"'});const r=null==e.tracking_codes?void 0:(0,m.sdIsList)(e.tracking_codes)?e.tracking_codes.map((function(e){return(0,d.deserializeTrackingCode)(e)})):[];if(null!=e.can_see_managed_users&&!(0,p.sdIsBoolean)(e.can_see_managed_users))throw new u.BoxSdkError({message:'Expecting boolean for "can_see_managed_users" of type "UserFull"'});const a=null==e.can_see_managed_users?void 0:e.can_see_managed_users;if(null!=e.is_sync_enabled&&!(0,p.sdIsBoolean)(e.is_sync_enabled))throw new u.BoxSdkError({message:'Expecting boolean for "is_sync_enabled" of type "UserFull"'});const l=null==e.is_sync_enabled?void 0:e.is_sync_enabled;if(null!=e.is_external_collab_restricted&&!(0,p.sdIsBoolean)(e.is_external_collab_restricted))throw new u.BoxSdkError({message:'Expecting boolean for "is_external_collab_restricted" of type "UserFull"'});const c=null==e.is_external_collab_restricted?void 0:e.is_external_collab_restricted;if(null!=e.is_exempt_from_device_limits&&!(0,p.sdIsBoolean)(e.is_exempt_from_device_limits))throw new u.BoxSdkError({message:'Expecting boolean for "is_exempt_from_device_limits" of type "UserFull"'});const y=null==e.is_exempt_from_device_limits?void 0:e.is_exempt_from_device_limits;if(null!=e.is_exempt_from_login_verification&&!(0,p.sdIsBoolean)(e.is_exempt_from_login_verification))throw new u.BoxSdkError({message:'Expecting boolean for "is_exempt_from_login_verification" of type "UserFull"'});const v=null==e.is_exempt_from_login_verification?void 0:e.is_exempt_from_login_verification,w=null==e.enterprise?void 0:S(e.enterprise);if(null!=e.my_tags&&!(0,m.sdIsList)(e.my_tags))throw new u.BoxSdkError({message:'Expecting array for "my_tags" of type "UserFull"'});const _=null==e.my_tags?void 0:(0,m.sdIsList)(e.my_tags)?e.my_tags.map((function(e){if(!(0,f.sdIsString)(e))throw new u.BoxSdkError({message:'Expecting string for "UserFull"'});return e})):[];if(null!=e.hostname&&!(0,f.sdIsString)(e.hostname))throw new u.BoxSdkError({message:'Expecting string for "hostname" of type "UserFull"'});const x=null==e.hostname?void 0:e.hostname;if(null!=e.is_platform_access_only&&!(0,p.sdIsBoolean)(e.is_platform_access_only))throw new u.BoxSdkError({message:'Expecting boolean for "is_platform_access_only" of type "UserFull"'});const k=null==e.is_platform_access_only?void 0:e.is_platform_access_only;if(null!=e.external_app_user_id&&!(0,f.sdIsString)(e.external_app_user_id))throw new u.BoxSdkError({message:'Expecting string for "external_app_user_id" of type "UserFull"'});const E=null==e.external_app_user_id?void 0:e.external_app_user_id;if(null!=e.created_at&&!(0,f.sdIsString)(e.created_at))throw new u.BoxSdkError({message:'Expecting string for "created_at" of type "UserFull"'});const T=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,f.sdIsString)(e.modified_at))throw new u.BoxSdkError({message:'Expecting string for "modified_at" of type "UserFull"'});const B=null==e.modified_at?void 0:(0,n.deserializeDateTime)(e.modified_at);if(null!=e.language&&!(0,f.sdIsString)(e.language))throw new u.BoxSdkError({message:'Expecting string for "language" of type "UserFull"'});const C=null==e.language?void 0:e.language;if(null!=e.timezone&&!(0,f.sdIsString)(e.timezone))throw new u.BoxSdkError({message:'Expecting string for "timezone" of type "UserFull"'});const I=null==e.timezone?void 0:e.timezone;if(null!=e.space_amount&&!(0,h.sdIsNumber)(e.space_amount))throw new u.BoxSdkError({message:'Expecting number for "space_amount" of type "UserFull"'});const A=null==e.space_amount?void 0:e.space_amount;if(null!=e.space_used&&!(0,h.sdIsNumber)(e.space_used))throw new u.BoxSdkError({message:'Expecting number for "space_used" of type "UserFull"'});const F=null==e.space_used?void 0:e.space_used;if(null!=e.max_upload_size&&!(0,h.sdIsNumber)(e.max_upload_size))throw new u.BoxSdkError({message:'Expecting number for "max_upload_size" of type "UserFull"'});const M=null==e.max_upload_size?void 0:e.max_upload_size,D=null==e.status?void 0:(0,o.deserializeUserStatusField)(e.status);if(null!=e.job_title&&!(0,f.sdIsString)(e.job_title))throw new u.BoxSdkError({message:'Expecting string for "job_title" of type "UserFull"'});const R=null==e.job_title?void 0:e.job_title;if(null!=e.phone&&!(0,f.sdIsString)(e.phone))throw new u.BoxSdkError({message:'Expecting string for "phone" of type "UserFull"'});const P=null==e.phone?void 0:e.phone;if(null!=e.address&&!(0,f.sdIsString)(e.address))throw new u.BoxSdkError({message:'Expecting string for "address" of type "UserFull"'});const O=null==e.address?void 0:e.address;if(null!=e.avatar_url&&!(0,f.sdIsString)(e.avatar_url))throw new u.BoxSdkError({message:'Expecting string for "avatar_url" of type "UserFull"'});const z=null==e.avatar_url?void 0:e.avatar_url,N=null==e.notification_email?void 0:(0,s.deserializeUserNotificationEmailField)(e.notification_email);if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "UserFull"'});const q=null==e.name?void 0:e.name;if(null!=e.login&&!(0,f.sdIsString)(e.login))throw new u.BoxSdkError({message:'Expecting string for "login" of type "UserFull"'});const U=null==e.login?void 0:e.login;if(null==e.id)throw new u.BoxSdkError({message:'Expecting "id" of type "UserFull" to be defined'});if(!(0,f.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UserFull"'});const L=e.id;if(null==e.type)throw new u.BoxSdkError({message:'Expecting "type" of type "UserFull" to be defined'});const j=(0,i.deserializeUserBaseTypeField)(e.type);return{role:t,trackingCodes:r,canSeeManagedUsers:a,isSyncEnabled:l,isExternalCollabRestricted:c,isExemptFromDeviceLimits:y,isExemptFromLoginVerification:v,enterprise:w,myTags:_,hostname:x,isPlatformAccessOnly:k,externalAppUserId:E,createdAt:T,modifiedAt:B,language:C,timezone:I,spaceAmount:A,spaceUsed:F,maxUploadSize:M,status:D,jobTitle:R,phone:P,address:O,avatarUrl:z,notificationEmail:N,name:q,login:U,id:L,type:j}};const i=r(78366),n=r(93845),o=r(1543),s=r(1543),a=r(1543),l=r(55852),d=r(55852),c=r(1543),u=r(72631),p=r(50793),h=r(50793),f=r(50793),m=r(50793),g=r(50793);class y extends c.User{constructor(e){super(e)}}function v(e){return e}function b(e){if("admin"==e)return e;if("coadmin"==e)return e;if("user"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UserFullRoleField"})}function w(e){return e}function _(e){if("enterprise"==e)return e;throw new u.BoxSdkError({message:"Can't deserialize UserFullEnterpriseTypeField"})}function x(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name}}function S(e){if(!(0,g.sdIsMap)(e))throw new u.BoxSdkError({message:'Expecting a map for "UserFullEnterpriseField"'});if(null!=e.id&&!(0,f.sdIsString)(e.id))throw new u.BoxSdkError({message:'Expecting string for "id" of type "UserFullEnterpriseField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:_(e.type);if(null!=e.name&&!(0,f.sdIsString)(e.name))throw new u.BoxSdkError({message:'Expecting string for "name" of type "UserFullEnterpriseField"'});return{id:t,type:r,name:null==e.name?void 0:e.name}}t.UserFull=y},80632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserIntegrationMappings=void 0,t.serializeUserIntegrationMappings=function(e){const t=(0,n.serializeUserBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "UserIntegrationMappings"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name,login:null==e.login?void 0:e.login})},t.deserializeUserIntegrationMappings=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "UserIntegrationMappings"'});if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "UserIntegrationMappings"'});const t=null==e.name?void 0:e.name;if(null!=e.login&&!(0,a.sdIsString)(e.login))throw new s.BoxSdkError({message:'Expecting string for "login" of type "UserIntegrationMappings"'});const r=null==e.login?void 0:e.login;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "UserIntegrationMappings" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "UserIntegrationMappings"'});const n=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "UserIntegrationMappings" to be defined'});const o=(0,i.deserializeUserBaseTypeField)(e.type);return{name:t,login:r,id:n,type:o}};const i=r(78366),n=r(78366),o=r(78366),s=r(72631),a=r(50793),l=r(50793);class d extends o.UserBase{constructor(e){super(e)}}t.UserIntegrationMappings=d},95408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserMini=void 0,t.serializeUserMini=function(e){const t=(0,n.serializeUserBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "UserMini"'});return Object.assign(Object.assign({},t),{name:null==e.name?void 0:e.name,login:null==e.login?void 0:e.login})},t.deserializeUserMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "UserMini"'});if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "UserMini"'});const t=null==e.name?void 0:e.name;if(null!=e.login&&!(0,a.sdIsString)(e.login))throw new s.BoxSdkError({message:'Expecting string for "login" of type "UserMini"'});const r=null==e.login?void 0:e.login;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "UserMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "UserMini"'});const n=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "UserMini" to be defined'});const o=(0,i.deserializeUserBaseTypeField)(e.type);return{name:t,login:r,id:n,type:o}};const i=r(78366),n=r(78366),o=r(78366),s=r(72631),a=r(50793),l=r(50793);class d extends o.UserBase{constructor(e){super(e)}}t.UserMini=d},57076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeUsersOrderDirectionField=c,t.deserializeUsersOrderDirectionField=u,t.serializeUsersOrderField=p,t.deserializeUsersOrderField=h,t.serializeUsers=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,total_count:null==e.totalCount?void 0:e.totalCount,offset:null==e.offset?void 0:e.offset,order:null==e.order?void 0:e.order.map((function(e){return p(e)})),entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeUserFull)(e)}))}},t.deserializeUsers=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Users"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Users"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "Users"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "Users"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.total_count&&!(0,s.sdIsNumber)(e.total_count))throw new o.BoxSdkError({message:'Expecting number for "total_count" of type "Users"'});const c=null==e.total_count?void 0:e.total_count;if(null!=e.offset&&!(0,s.sdIsNumber)(e.offset))throw new o.BoxSdkError({message:'Expecting number for "offset" of type "Users"'});const u=null==e.offset?void 0:e.offset;if(null!=e.order&&!(0,l.sdIsList)(e.order))throw new o.BoxSdkError({message:'Expecting array for "order" of type "Users"'});const p=null==e.order?void 0:(0,l.sdIsList)(e.order)?e.order.map((function(e){return h(e)})):[];if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Users"'});const f=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeUserFull)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,totalCount:c,offset:u,order:p,entries:f}};const i=r(88510),n=r(88510),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793);function c(e){return e}function u(e){if("ASC"==e)return e;if("DESC"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize UsersOrderDirectionField"})}function p(e){return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:e.direction}}function h(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "UsersOrderField"'});if(null!=e.by&&!(0,a.sdIsString)(e.by))throw new o.BoxSdkError({message:'Expecting string for "by" of type "UsersOrderField"'});return{by:null==e.by?void 0:e.by,direction:null==e.direction?void 0:u(e.direction)}}},99698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWatermarkWatermarkField=l,t.deserializeWatermarkWatermarkField=d,t.serializeWatermark=function(e){return{watermark:null==e.watermark?void 0:l(e.watermark)}},t.deserializeWatermark=function(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Watermark"'});return{watermark:null==e.watermark?void 0:d(e.watermark)}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793);function l(e){return{created_at:null==e.createdAt?void 0:(0,i.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,i.serializeDateTime)(e.modifiedAt)}}function d(e){if(!(0,a.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "WatermarkWatermarkField"'});if(null!=e.created_at&&!(0,s.sdIsString)(e.created_at))throw new o.BoxSdkError({message:'Expecting string for "created_at" of type "WatermarkWatermarkField"'});const t=null==e.created_at?void 0:(0,n.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,s.sdIsString)(e.modified_at))throw new o.BoxSdkError({message:'Expecting string for "modified_at" of type "WatermarkWatermarkField"'});return{createdAt:t,modifiedAt:null==e.modified_at?void 0:(0,n.deserializeDateTime)(e.modified_at)}}},60238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebLink=void 0,t.serializeWebLinkPathCollectionField=b,t.deserializeWebLinkPathCollectionField=w,t.serializeWebLinkSharedLinkAccessField=_,t.deserializeWebLinkSharedLinkAccessField=x,t.serializeWebLinkSharedLinkEffectiveAccessField=S,t.deserializeWebLinkSharedLinkEffectiveAccessField=k,t.serializeWebLinkSharedLinkEffectivePermissionField=E,t.deserializeWebLinkSharedLinkEffectivePermissionField=T,t.serializeWebLinkSharedLinkPermissionsField=B,t.deserializeWebLinkSharedLinkPermissionsField=C,t.serializeWebLinkSharedLinkField=I,t.deserializeWebLinkSharedLinkField=A,t.serializeWebLinkItemStatusField=F,t.deserializeWebLinkItemStatusField=M,t.serializeWebLink=function(e){const t=(0,n.serializeWebLinkMini)(e);if(!(0,y.sdIsMap)(t))throw new p.BoxSdkError({message:'Expecting a map for "WebLink"'});return Object.assign(Object.assign({},t),{parent:null==e.parent?void 0:(0,o.serializeFolderMini)(e.parent),description:null==e.description?void 0:e.description,path_collection:null==e.pathCollection?void 0:b(e.pathCollection),created_at:null==e.createdAt?void 0:(0,d.serializeDateTime)(e.createdAt),modified_at:null==e.modifiedAt?void 0:(0,d.serializeDateTime)(e.modifiedAt),trashed_at:null==e.trashedAt?void 0:(0,d.serializeDateTime)(e.trashedAt),purged_at:null==e.purgedAt?void 0:(0,d.serializeDateTime)(e.purgedAt),created_by:null==e.createdBy?void 0:(0,a.serializeUserMini)(e.createdBy),modified_by:null==e.modifiedBy?void 0:(0,a.serializeUserMini)(e.modifiedBy),owned_by:null==e.ownedBy?void 0:(0,a.serializeUserMini)(e.ownedBy),shared_link:null==e.sharedLink?void 0:I(e.sharedLink),item_status:null==e.itemStatus?void 0:e.itemStatus})},t.deserializeWebLink=function(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "WebLink"'});const t=null==e.parent?void 0:(0,s.deserializeFolderMini)(e.parent);if(null!=e.description&&!(0,m.sdIsString)(e.description))throw new p.BoxSdkError({message:'Expecting string for "description" of type "WebLink"'});const r=null==e.description?void 0:e.description,n=null==e.path_collection?void 0:w(e.path_collection);if(null!=e.created_at&&!(0,m.sdIsString)(e.created_at))throw new p.BoxSdkError({message:'Expecting string for "created_at" of type "WebLink"'});const o=null==e.created_at?void 0:(0,c.deserializeDateTime)(e.created_at);if(null!=e.modified_at&&!(0,m.sdIsString)(e.modified_at))throw new p.BoxSdkError({message:'Expecting string for "modified_at" of type "WebLink"'});const a=null==e.modified_at?void 0:(0,c.deserializeDateTime)(e.modified_at);if(null!=e.trashed_at&&!(0,m.sdIsString)(e.trashed_at))throw new p.BoxSdkError({message:'Expecting string for "trashed_at" of type "WebLink"'});const d=null==e.trashed_at?void 0:(0,c.deserializeDateTime)(e.trashed_at);if(null!=e.purged_at&&!(0,m.sdIsString)(e.purged_at))throw new p.BoxSdkError({message:'Expecting string for "purged_at" of type "WebLink"'});const u=null==e.purged_at?void 0:(0,c.deserializeDateTime)(e.purged_at),h=null==e.created_by?void 0:(0,l.deserializeUserMini)(e.created_by),f=null==e.modified_by?void 0:(0,l.deserializeUserMini)(e.modified_by),g=null==e.owned_by?void 0:(0,l.deserializeUserMini)(e.owned_by),v=null==e.shared_link?void 0:A(e.shared_link),b=null==e.item_status?void 0:M(e.item_status);if(null!=e.url&&!(0,m.sdIsString)(e.url))throw new p.BoxSdkError({message:'Expecting string for "url" of type "WebLink"'});const _=null==e.url?void 0:e.url;if(null!=e.sequence_id&&!(0,m.sdIsString)(e.sequence_id))throw new p.BoxSdkError({message:'Expecting string for "sequence_id" of type "WebLink"'});const x=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,m.sdIsString)(e.name))throw new p.BoxSdkError({message:'Expecting string for "name" of type "WebLink"'});const S=null==e.name?void 0:e.name;if(null==e.id)throw new p.BoxSdkError({message:'Expecting "id" of type "WebLink" to be defined'});if(!(0,m.sdIsString)(e.id))throw new p.BoxSdkError({message:'Expecting string for "id" of type "WebLink"'});const k=e.id;if(null==e.type)throw new p.BoxSdkError({message:'Expecting "type" of type "WebLink" to be defined'});const E=(0,i.deserializeWebLinkBaseTypeField)(e.type);if(null!=e.etag&&!(0,m.sdIsString)(e.etag))throw new p.BoxSdkError({message:'Expecting string for "etag" of type "WebLink"'});const T=null==e.etag?void 0:e.etag;return{parent:t,description:r,pathCollection:n,createdAt:o,modifiedAt:a,trashedAt:d,purgedAt:u,createdBy:h,modifiedBy:f,ownedBy:g,sharedLink:v,itemStatus:b,url:_,sequenceId:x,name:S,id:k,type:E,etag:T}};const i=r(3719),n=r(44793),o=r(70343),s=r(70343),a=r(95408),l=r(95408),d=r(93845),c=r(93845),u=r(44793),p=r(72631),h=r(50793),f=r(50793),m=r(50793),g=r(50793),y=r(50793);class v extends u.WebLinkMini{constructor(e){super(e)}}function b(e){return{total_count:e.totalCount,entries:e.entries.map((function(e){return(0,o.serializeFolderMini)(e)}))}}function w(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "WebLinkPathCollectionField"'});if(null==e.total_count)throw new p.BoxSdkError({message:'Expecting "total_count" of type "WebLinkPathCollectionField" to be defined'});if(!(0,f.sdIsNumber)(e.total_count))throw new p.BoxSdkError({message:'Expecting number for "total_count" of type "WebLinkPathCollectionField"'});const t=e.total_count;if(null==e.entries)throw new p.BoxSdkError({message:'Expecting "entries" of type "WebLinkPathCollectionField" to be defined'});if(!(0,g.sdIsList)(e.entries))throw new p.BoxSdkError({message:'Expecting array for "entries" of type "WebLinkPathCollectionField"'});return{totalCount:t,entries:(0,g.sdIsList)(e.entries)?e.entries.map((function(e){return(0,s.deserializeFolderMini)(e)})):[]}}function _(e){return e}function x(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize WebLinkSharedLinkAccessField"})}function S(e){return e}function k(e){if("open"==e)return e;if("company"==e)return e;if("collaborators"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize WebLinkSharedLinkEffectiveAccessField"})}function E(e){return e}function T(e){if("can_edit"==e)return e;if("can_download"==e)return e;if("can_preview"==e)return e;if("no_access"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize WebLinkSharedLinkEffectivePermissionField"})}function B(e){return{can_download:e.canDownload,can_preview:e.canPreview,can_edit:e.canEdit}}function C(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "WebLinkSharedLinkPermissionsField"'});if(null==e.can_download)throw new p.BoxSdkError({message:'Expecting "can_download" of type "WebLinkSharedLinkPermissionsField" to be defined'});if(!(0,h.sdIsBoolean)(e.can_download))throw new p.BoxSdkError({message:'Expecting boolean for "can_download" of type "WebLinkSharedLinkPermissionsField"'});const t=e.can_download;if(null==e.can_preview)throw new p.BoxSdkError({message:'Expecting "can_preview" of type "WebLinkSharedLinkPermissionsField" to be defined'});if(!(0,h.sdIsBoolean)(e.can_preview))throw new p.BoxSdkError({message:'Expecting boolean for "can_preview" of type "WebLinkSharedLinkPermissionsField"'});const r=e.can_preview;if(null==e.can_edit)throw new p.BoxSdkError({message:'Expecting "can_edit" of type "WebLinkSharedLinkPermissionsField" to be defined'});if(!(0,h.sdIsBoolean)(e.can_edit))throw new p.BoxSdkError({message:'Expecting boolean for "can_edit" of type "WebLinkSharedLinkPermissionsField"'});return{canDownload:t,canPreview:r,canEdit:e.can_edit}}function I(e){return{url:e.url,download_url:null==e.downloadUrl?void 0:e.downloadUrl,vanity_url:null==e.vanityUrl?void 0:e.vanityUrl,vanity_name:null==e.vanityName?void 0:e.vanityName,access:null==e.access?void 0:e.access,effective_access:e.effectiveAccess,effective_permission:e.effectivePermission,unshared_at:null==e.unsharedAt?void 0:(0,d.serializeDateTime)(e.unsharedAt),is_password_enabled:e.isPasswordEnabled,permissions:null==e.permissions?void 0:B(e.permissions),download_count:e.downloadCount,preview_count:e.previewCount}}function A(e){if(!(0,y.sdIsMap)(e))throw new p.BoxSdkError({message:'Expecting a map for "WebLinkSharedLinkField"'});if(null==e.url)throw new p.BoxSdkError({message:'Expecting "url" of type "WebLinkSharedLinkField" to be defined'});if(!(0,m.sdIsString)(e.url))throw new p.BoxSdkError({message:'Expecting string for "url" of type "WebLinkSharedLinkField"'});const t=e.url;if(null!=e.download_url&&!(0,m.sdIsString)(e.download_url))throw new p.BoxSdkError({message:'Expecting string for "download_url" of type "WebLinkSharedLinkField"'});const r=null==e.download_url?void 0:e.download_url;if(null!=e.vanity_url&&!(0,m.sdIsString)(e.vanity_url))throw new p.BoxSdkError({message:'Expecting string for "vanity_url" of type "WebLinkSharedLinkField"'});const i=null==e.vanity_url?void 0:e.vanity_url;if(null!=e.vanity_name&&!(0,m.sdIsString)(e.vanity_name))throw new p.BoxSdkError({message:'Expecting string for "vanity_name" of type "WebLinkSharedLinkField"'});const n=null==e.vanity_name?void 0:e.vanity_name,o=null==e.access?void 0:x(e.access);if(null==e.effective_access)throw new p.BoxSdkError({message:'Expecting "effective_access" of type "WebLinkSharedLinkField" to be defined'});const s=k(e.effective_access);if(null==e.effective_permission)throw new p.BoxSdkError({message:'Expecting "effective_permission" of type "WebLinkSharedLinkField" to be defined'});const a=T(e.effective_permission);if(null!=e.unshared_at&&!(0,m.sdIsString)(e.unshared_at))throw new p.BoxSdkError({message:'Expecting string for "unshared_at" of type "WebLinkSharedLinkField"'});const l=null==e.unshared_at?void 0:(0,c.deserializeDateTime)(e.unshared_at);if(null==e.is_password_enabled)throw new p.BoxSdkError({message:'Expecting "is_password_enabled" of type "WebLinkSharedLinkField" to be defined'});if(!(0,h.sdIsBoolean)(e.is_password_enabled))throw new p.BoxSdkError({message:'Expecting boolean for "is_password_enabled" of type "WebLinkSharedLinkField"'});const d=e.is_password_enabled,u=null==e.permissions?void 0:C(e.permissions);if(null==e.download_count)throw new p.BoxSdkError({message:'Expecting "download_count" of type "WebLinkSharedLinkField" to be defined'});if(!(0,f.sdIsNumber)(e.download_count))throw new p.BoxSdkError({message:'Expecting number for "download_count" of type "WebLinkSharedLinkField"'});const g=e.download_count;if(null==e.preview_count)throw new p.BoxSdkError({message:'Expecting "preview_count" of type "WebLinkSharedLinkField" to be defined'});if(!(0,f.sdIsNumber)(e.preview_count))throw new p.BoxSdkError({message:'Expecting number for "preview_count" of type "WebLinkSharedLinkField"'});return{url:t,downloadUrl:r,vanityUrl:i,vanityName:n,access:o,effectiveAccess:s,effectivePermission:a,unsharedAt:l,isPasswordEnabled:d,permissions:u,downloadCount:g,previewCount:e.preview_count}}function F(e){return e}function M(e){if("active"==e)return e;if("trashed"==e)return e;if("deleted"==e)return e;throw new p.BoxSdkError({message:"Can't deserialize WebLinkItemStatusField"})}t.WebLink=v},3719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebLinkBase=void 0,t.serializeWebLinkBaseTypeField=s,t.deserializeWebLinkBaseTypeField=a,t.serializeWebLinkBase=function(e){return{id:e.id,type:e.type,etag:null==e.etag?void 0:e.etag}},t.deserializeWebLinkBase=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "WebLinkBase"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "WebLinkBase" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "WebLinkBase"'});const t=e.id;if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "WebLinkBase" to be defined'});const r=a(e.type);if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "WebLinkBase"'});const s=null==e.etag?void 0:e.etag;return{id:t,type:r,etag:s}},t.serializeWebLinkBaseInput=function(e){return{id:e.id,type:null==e.type?void 0:e.type,etag:null==e.etag?void 0:e.etag}},t.deserializeWebLinkBaseInput=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "WebLinkBaseInput"'});if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "WebLinkBaseInput" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "WebLinkBaseInput"'});const t=e.id,r=null==e.type?void 0:a(e.type);if(null!=e.etag&&!(0,n.sdIsString)(e.etag))throw new i.BoxSdkError({message:'Expecting string for "etag" of type "WebLinkBaseInput"'});const s=null==e.etag?void 0:e.etag;return{id:t,type:r,etag:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("web_link"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize WebLinkBaseTypeField"})}t.WebLinkBase=class{constructor(e){this.type="web_link",e.id&&(this.id=e.id),e.type&&(this.type=e.type),e.etag&&(this.etag=e.etag),e.rawData&&(this.rawData=e.rawData)}}},44793:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebLinkMini=void 0,t.serializeWebLinkMini=function(e){const t=(0,n.serializeWebLinkBase)(e);if(!(0,l.sdIsMap)(t))throw new s.BoxSdkError({message:'Expecting a map for "WebLinkMini"'});return Object.assign(Object.assign({},t),{url:null==e.url?void 0:e.url,sequence_id:null==e.sequenceId?void 0:e.sequenceId,name:null==e.name?void 0:e.name})},t.deserializeWebLinkMini=function(e){if(!(0,l.sdIsMap)(e))throw new s.BoxSdkError({message:'Expecting a map for "WebLinkMini"'});if(null!=e.url&&!(0,a.sdIsString)(e.url))throw new s.BoxSdkError({message:'Expecting string for "url" of type "WebLinkMini"'});const t=null==e.url?void 0:e.url;if(null!=e.sequence_id&&!(0,a.sdIsString)(e.sequence_id))throw new s.BoxSdkError({message:'Expecting string for "sequence_id" of type "WebLinkMini"'});const r=null==e.sequence_id?void 0:e.sequence_id;if(null!=e.name&&!(0,a.sdIsString)(e.name))throw new s.BoxSdkError({message:'Expecting string for "name" of type "WebLinkMini"'});const n=null==e.name?void 0:e.name;if(null==e.id)throw new s.BoxSdkError({message:'Expecting "id" of type "WebLinkMini" to be defined'});if(!(0,a.sdIsString)(e.id))throw new s.BoxSdkError({message:'Expecting string for "id" of type "WebLinkMini"'});const o=e.id;if(null==e.type)throw new s.BoxSdkError({message:'Expecting "type" of type "WebLinkMini" to be defined'});const d=(0,i.deserializeWebLinkBaseTypeField)(e.type);if(null!=e.etag&&!(0,a.sdIsString)(e.etag))throw new s.BoxSdkError({message:'Expecting string for "etag" of type "WebLinkMini"'});const c=null==e.etag?void 0:e.etag;return{url:t,sequenceId:r,name:n,id:o,type:d,etag:c}};const i=r(3719),n=r(3719),o=r(3719),s=r(72631),a=r(50793),l=r(50793);class d extends o.WebLinkBase{constructor(e){super(e)}}t.WebLinkMini=d},36257:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWebhookTriggersField=f,t.deserializeWebhookTriggersField=m,t.serializeWebhook=function(e){const t=(0,o.serializeWebhookMini)(e);if(!(0,h.sdIsMap)(t))throw new c.BoxSdkError({message:'Expecting a map for "Webhook"'});return Object.assign(Object.assign({},t),{created_by:null==e.createdBy?void 0:(0,s.serializeUserMini)(e.createdBy),created_at:null==e.createdAt?void 0:(0,l.serializeDateTime)(e.createdAt),address:null==e.address?void 0:e.address,triggers:null==e.triggers?void 0:e.triggers.map((function(e){return e}))})},t.deserializeWebhook=function(e){if(!(0,h.sdIsMap)(e))throw new c.BoxSdkError({message:'Expecting a map for "Webhook"'});const t=null==e.created_by?void 0:(0,a.deserializeUserMini)(e.created_by);if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new c.BoxSdkError({message:'Expecting string for "created_at" of type "Webhook"'});const r=null==e.created_at?void 0:(0,d.deserializeDateTime)(e.created_at);if(null!=e.address&&!(0,u.sdIsString)(e.address))throw new c.BoxSdkError({message:'Expecting string for "address" of type "Webhook"'});const o=null==e.address?void 0:e.address;if(null!=e.triggers&&!(0,p.sdIsList)(e.triggers))throw new c.BoxSdkError({message:'Expecting array for "triggers" of type "Webhook"'});const s=null==e.triggers?void 0:(0,p.sdIsList)(e.triggers)?e.triggers.map((function(e){return m(e)})):[];if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new c.BoxSdkError({message:'Expecting string for "id" of type "Webhook"'});const l=null==e.id?void 0:e.id,f=null==e.type?void 0:(0,i.deserializeWebhookMiniTypeField)(e.type),g=null==e.target?void 0:(0,n.deserializeWebhookMiniTargetField)(e.target);return{createdBy:t,createdAt:r,address:o,triggers:s,id:l,type:f,target:g}};const i=r(29510),n=r(29510),o=r(29510),s=r(95408),a=r(95408),l=r(93845),d=r(93845),c=r(72631),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("FILE.UPLOADED"==e)return e;if("FILE.PREVIEWED"==e)return e;if("FILE.DOWNLOADED"==e)return e;if("FILE.TRASHED"==e)return e;if("FILE.DELETED"==e)return e;if("FILE.RESTORED"==e)return e;if("FILE.COPIED"==e)return e;if("FILE.MOVED"==e)return e;if("FILE.LOCKED"==e)return e;if("FILE.UNLOCKED"==e)return e;if("FILE.RENAMED"==e)return e;if("COMMENT.CREATED"==e)return e;if("COMMENT.UPDATED"==e)return e;if("COMMENT.DELETED"==e)return e;if("TASK_ASSIGNMENT.CREATED"==e)return e;if("TASK_ASSIGNMENT.UPDATED"==e)return e;if("METADATA_INSTANCE.CREATED"==e)return e;if("METADATA_INSTANCE.UPDATED"==e)return e;if("METADATA_INSTANCE.DELETED"==e)return e;if("FOLDER.CREATED"==e)return e;if("FOLDER.RENAMED"==e)return e;if("FOLDER.DOWNLOADED"==e)return e;if("FOLDER.RESTORED"==e)return e;if("FOLDER.DELETED"==e)return e;if("FOLDER.COPIED"==e)return e;if("FOLDER.MOVED"==e)return e;if("FOLDER.TRASHED"==e)return e;if("WEBHOOK.DELETED"==e)return e;if("COLLABORATION.CREATED"==e)return e;if("COLLABORATION.ACCEPTED"==e)return e;if("COLLABORATION.REJECTED"==e)return e;if("COLLABORATION.REMOVED"==e)return e;if("COLLABORATION.UPDATED"==e)return e;if("SHARED_LINK.DELETED"==e)return e;if("SHARED_LINK.CREATED"==e)return e;if("SHARED_LINK.UPDATED"==e)return e;if("SIGN_REQUEST.COMPLETED"==e)return e;if("SIGN_REQUEST.DECLINED"==e)return e;if("SIGN_REQUEST.EXPIRED"==e)return e;if("SIGN_REQUEST.SIGNER_EMAIL_BOUNCED"==e)return e;throw new c.BoxSdkError({message:"Can't deserialize WebhookTriggersField"})}},29510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWebhookMiniTypeField=s,t.deserializeWebhookMiniTypeField=a,t.serializeWebhookMiniTargetTypeField=l,t.deserializeWebhookMiniTargetTypeField=d,t.serializeWebhookMiniTargetField=c,t.deserializeWebhookMiniTargetField=u,t.serializeWebhookMini=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,target:null==e.target?void 0:c(e.target)}},t.deserializeWebhookMini=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "WebhookMini"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "WebhookMini"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:a(e.type),s=null==e.target?void 0:u(e.target);return{id:t,type:r,target:s}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("webhook"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize WebhookMiniTypeField"})}function l(e){return e}function d(e){if("file"==e)return e;if("folder"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize WebhookMiniTargetTypeField"})}function c(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type}}function u(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "WebhookMiniTargetField"'});if(null!=e.id&&!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "WebhookMiniTargetField"'});return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:d(e.type)}}},70934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWebhooks=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeWebhookMini)(e)}))}},t.deserializeWebhooks=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Webhooks"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Webhooks"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "Webhooks"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "Webhooks"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Webhooks"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeWebhookMini)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(29510),n=r(29510),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},90213:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWorkflowFlowsTypeField=f,t.deserializeWorkflowFlowsTypeField=m,t.serializeWorkflowFlowsTriggerTypeField=g,t.deserializeWorkflowFlowsTriggerTypeField=y,t.serializeWorkflowFlowsTriggerTriggerTypeField=v,t.deserializeWorkflowFlowsTriggerTriggerTypeField=b,t.serializeWorkflowFlowsTriggerScopeTypeField=w,t.deserializeWorkflowFlowsTriggerScopeTypeField=_,t.serializeWorkflowFlowsTriggerScopeObjectTypeField=x,t.deserializeWorkflowFlowsTriggerScopeObjectTypeField=S,t.serializeWorkflowFlowsTriggerScopeObjectField=k,t.deserializeWorkflowFlowsTriggerScopeObjectField=E,t.serializeWorkflowFlowsTriggerScopeField=T,t.deserializeWorkflowFlowsTriggerScopeField=B,t.serializeWorkflowFlowsTriggerField=C,t.deserializeWorkflowFlowsTriggerField=I,t.serializeWorkflowFlowsOutcomesTypeField=A,t.deserializeWorkflowFlowsOutcomesTypeField=F,t.serializeWorkflowFlowsOutcomesActionTypeField=M,t.deserializeWorkflowFlowsOutcomesActionTypeField=D,t.serializeWorkflowFlowsOutcomesIfRejectedTypeField=R,t.deserializeWorkflowFlowsOutcomesIfRejectedTypeField=P,t.serializeWorkflowFlowsOutcomesIfRejectedActionTypeField=O,t.deserializeWorkflowFlowsOutcomesIfRejectedActionTypeField=z,t.serializeWorkflowFlowsOutcomesIfRejectedField=N,t.deserializeWorkflowFlowsOutcomesIfRejectedField=q,t.serializeWorkflowFlowsOutcomesField=U,t.deserializeWorkflowFlowsOutcomesField=L,t.serializeWorkflowFlowsField=j,t.deserializeWorkflowFlowsField=H,t.serializeWorkflow=function(e){const t=(0,n.serializeWorkflowMini)(e);if(!(0,h.sdIsMap)(t))throw new d.BoxSdkError({message:'Expecting a map for "Workflow"'});return Object.assign(Object.assign({},t),{flows:null==e.flows?void 0:e.flows.map((function(e){return j(e)}))})},t.deserializeWorkflow=function(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "Workflow"'});if(null!=e.flows&&!(0,p.sdIsList)(e.flows))throw new d.BoxSdkError({message:'Expecting array for "flows" of type "Workflow"'});const t=null==e.flows?void 0:(0,p.sdIsList)(e.flows)?e.flows.map((function(e){return H(e)})):[];if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "Workflow"'});const r=null==e.id?void 0:e.id,n=null==e.type?void 0:(0,i.deserializeWorkflowMiniTypeField)(e.type);if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "Workflow"'});const o=null==e.name?void 0:e.name;if(null!=e.description&&!(0,u.sdIsString)(e.description))throw new d.BoxSdkError({message:'Expecting string for "description" of type "Workflow"'});const s=null==e.description?void 0:e.description;if(null!=e.is_enabled&&!(0,c.sdIsBoolean)(e.is_enabled))throw new d.BoxSdkError({message:'Expecting boolean for "is_enabled" of type "Workflow"'});const a=null==e.is_enabled?void 0:e.is_enabled;return{flows:t,id:r,type:n,name:o,description:s,isEnabled:a}};const i=r(3386),n=r(3386),o=r(78366),s=r(78366),a=r(93845),l=r(93845),d=r(72631),c=r(50793),u=r(50793),p=r(50793),h=r(50793);function f(e){return e}function m(e){if("flow"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsTypeField"})}function g(e){return e}function y(e){if("trigger"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsTriggerTypeField"})}function v(e){return e}function b(e){if("WORKFLOW_MANUAL_START"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsTriggerTriggerTypeField"})}function w(e){return e}function _(e){if("trigger_scope"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsTriggerScopeTypeField"})}function x(e){return e}function S(e){if("folder"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsTriggerScopeObjectTypeField"})}function k(e){return{type:null==e.type?void 0:e.type,id:null==e.id?void 0:e.id}}function E(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsTriggerScopeObjectField"'});const t=null==e.type?void 0:S(e.type);if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "WorkflowFlowsTriggerScopeObjectField"'});return{type:t,id:null==e.id?void 0:e.id}}function T(e){return{type:null==e.type?void 0:e.type,ref:null==e.ref?void 0:e.ref,object:null==e.object?void 0:k(e.object)}}function B(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsTriggerScopeField"'});const t=null==e.type?void 0:_(e.type);if(null!=e.ref&&!(0,u.sdIsString)(e.ref))throw new d.BoxSdkError({message:'Expecting string for "ref" of type "WorkflowFlowsTriggerScopeField"'});return{type:t,ref:null==e.ref?void 0:e.ref,object:null==e.object?void 0:E(e.object)}}function C(e){return{type:null==e.type?void 0:e.type,trigger_type:null==e.triggerType?void 0:e.triggerType,scope:null==e.scope?void 0:e.scope.map((function(e){return T(e)}))}}function I(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsTriggerField"'});const t=null==e.type?void 0:y(e.type),r=null==e.trigger_type?void 0:b(e.trigger_type);if(null!=e.scope&&!(0,p.sdIsList)(e.scope))throw new d.BoxSdkError({message:'Expecting array for "scope" of type "WorkflowFlowsTriggerField"'});return{type:t,triggerType:r,scope:null==e.scope?void 0:(0,p.sdIsList)(e.scope)?e.scope.map((function(e){return B(e)})):[]}}function A(e){return e}function F(e){if("outcome"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsOutcomesTypeField"})}function M(e){return e}function D(e){if("add_metadata"==e)return e;if("assign_task"==e)return e;if("copy_file"==e)return e;if("copy_folder"==e)return e;if("create_folder"==e)return e;if("delete_file"==e)return e;if("delete_folder"==e)return e;if("lock_file"==e)return e;if("move_file"==e)return e;if("move_folder"==e)return e;if("remove_watermark_file"==e)return e;if("rename_folder"==e)return e;if("restore_folder"==e)return e;if("share_file"==e)return e;if("share_folder"==e)return e;if("unlock_file"==e)return e;if("upload_file"==e)return e;if("wait_for_task"==e)return e;if("watermark_file"==e)return e;if("go_back_to_step"==e)return e;if("apply_file_classification"==e)return e;if("apply_folder_classification"==e)return e;if("send_notification"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsOutcomesActionTypeField"})}function R(e){return e}function P(e){if("outcome"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsOutcomesIfRejectedTypeField"})}function O(e){return e}function z(e){if("add_metadata"==e)return e;if("assign_task"==e)return e;if("copy_file"==e)return e;if("copy_folder"==e)return e;if("create_folder"==e)return e;if("delete_file"==e)return e;if("delete_folder"==e)return e;if("lock_file"==e)return e;if("move_file"==e)return e;if("move_folder"==e)return e;if("remove_watermark_file"==e)return e;if("rename_folder"==e)return e;if("restore_folder"==e)return e;if("share_file"==e)return e;if("share_folder"==e)return e;if("unlock_file"==e)return e;if("upload_file"==e)return e;if("wait_for_task"==e)return e;if("watermark_file"==e)return e;if("go_back_to_step"==e)return e;if("apply_file_classification"==e)return e;if("apply_folder_classification"==e)return e;if("send_notification"==e)return e;throw new d.BoxSdkError({message:"Can't deserialize WorkflowFlowsOutcomesIfRejectedActionTypeField"})}function N(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name,action_type:null==e.actionType?void 0:e.actionType}}function q(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsOutcomesIfRejectedField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "WorkflowFlowsOutcomesIfRejectedField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:P(e.type);if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "WorkflowFlowsOutcomesIfRejectedField"'});return{id:t,type:r,name:null==e.name?void 0:e.name,actionType:null==e.action_type?void 0:z(e.action_type)}}function U(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name,action_type:null==e.actionType?void 0:e.actionType,if_rejected:null==e.ifRejected?void 0:e.ifRejected.map((function(e){return N(e)}))}}function L(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsOutcomesField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "WorkflowFlowsOutcomesField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:F(e.type);if(null!=e.name&&!(0,u.sdIsString)(e.name))throw new d.BoxSdkError({message:'Expecting string for "name" of type "WorkflowFlowsOutcomesField"'});const i=null==e.name?void 0:e.name,n=null==e.action_type?void 0:D(e.action_type);if(null!=e.if_rejected&&!(0,p.sdIsList)(e.if_rejected))throw new d.BoxSdkError({message:'Expecting array for "if_rejected" of type "WorkflowFlowsOutcomesField"'});return{id:t,type:r,name:i,actionType:n,ifRejected:null==e.if_rejected?void 0:(0,p.sdIsList)(e.if_rejected)?e.if_rejected.map((function(e){return q(e)})):[]}}function j(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,trigger:null==e.trigger?void 0:C(e.trigger),outcomes:null==e.outcomes?void 0:e.outcomes.map((function(e){return U(e)})),created_at:null==e.createdAt?void 0:(0,a.serializeDateTime)(e.createdAt),created_by:null==e.createdBy?void 0:(0,o.serializeUserBase)(e.createdBy)}}function H(e){if(!(0,h.sdIsMap)(e))throw new d.BoxSdkError({message:'Expecting a map for "WorkflowFlowsField"'});if(null!=e.id&&!(0,u.sdIsString)(e.id))throw new d.BoxSdkError({message:'Expecting string for "id" of type "WorkflowFlowsField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:m(e.type),i=null==e.trigger?void 0:I(e.trigger);if(null!=e.outcomes&&!(0,p.sdIsList)(e.outcomes))throw new d.BoxSdkError({message:'Expecting array for "outcomes" of type "WorkflowFlowsField"'});const n=null==e.outcomes?void 0:(0,p.sdIsList)(e.outcomes)?e.outcomes.map((function(e){return L(e)})):[];if(null!=e.created_at&&!(0,u.sdIsString)(e.created_at))throw new d.BoxSdkError({message:'Expecting string for "created_at" of type "WorkflowFlowsField"'});return{id:t,type:r,trigger:i,outcomes:n,createdAt:null==e.created_at?void 0:(0,l.deserializeDateTime)(e.created_at),createdBy:null==e.created_by?void 0:(0,s.deserializeUserBase)(e.created_by)}}},3386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWorkflowMiniTypeField=a,t.deserializeWorkflowMiniTypeField=l,t.serializeWorkflowMini=function(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,name:null==e.name?void 0:e.name,description:null==e.description?void 0:e.description,is_enabled:null==e.isEnabled?void 0:e.isEnabled}},t.deserializeWorkflowMini=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "WorkflowMini"'});if(null!=e.id&&!(0,o.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "WorkflowMini"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:l(e.type);if(null!=e.name&&!(0,o.sdIsString)(e.name))throw new i.BoxSdkError({message:'Expecting string for "name" of type "WorkflowMini"'});const a=null==e.name?void 0:e.name;if(null!=e.description&&!(0,o.sdIsString)(e.description))throw new i.BoxSdkError({message:'Expecting string for "description" of type "WorkflowMini"'});const d=null==e.description?void 0:e.description;if(null!=e.is_enabled&&!(0,n.sdIsBoolean)(e.is_enabled))throw new i.BoxSdkError({message:'Expecting boolean for "is_enabled" of type "WorkflowMini"'});const c=null==e.is_enabled?void 0:e.is_enabled;return{id:t,type:r,name:a,description:d,isEnabled:c}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793);function a(e){return e}function l(e){if("workflow"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize WorkflowMiniTypeField"})}},70018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeWorkflows=function(e){return{limit:null==e.limit?void 0:e.limit,next_marker:null==e.nextMarker?void 0:e.nextMarker,prev_marker:null==e.prevMarker?void 0:e.prevMarker,entries:null==e.entries?void 0:e.entries.map((function(e){return(0,i.serializeWorkflow)(e)}))}},t.deserializeWorkflows=function(e){if(!(0,d.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "Workflows"'});if(null!=e.limit&&!(0,s.sdIsNumber)(e.limit))throw new o.BoxSdkError({message:'Expecting number for "limit" of type "Workflows"'});const t=null==e.limit?void 0:e.limit;if(null!=e.next_marker&&!(0,a.sdIsString)(e.next_marker))throw new o.BoxSdkError({message:'Expecting string for "next_marker" of type "Workflows"'});const r=null==e.next_marker?void 0:e.next_marker;if(null!=e.prev_marker&&!(0,a.sdIsString)(e.prev_marker))throw new o.BoxSdkError({message:'Expecting string for "prev_marker" of type "Workflows"'});const i=null==e.prev_marker?void 0:e.prev_marker;if(null!=e.entries&&!(0,l.sdIsList)(e.entries))throw new o.BoxSdkError({message:'Expecting array for "entries" of type "Workflows"'});const c=null==e.entries?void 0:(0,l.sdIsList)(e.entries)?e.entries.map((function(e){return(0,n.deserializeWorkflow)(e)})):[];return{limit:t,nextMarker:r,prevMarker:i,entries:c}};const i=r(90213),n=r(90213),o=r(72631),s=r(50793),a=r(50793),l=r(50793),d=r(50793)},63055:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeZipDownloadNameConflictsTypeField=d,t.deserializeZipDownloadNameConflictsTypeField=c,t.serializeZipDownloadNameConflictsField=u,t.deserializeZipDownloadNameConflictsField=p,t.serializeZipDownload=function(e){return{download_url:null==e.downloadUrl?void 0:e.downloadUrl,status_url:null==e.statusUrl?void 0:e.statusUrl,expires_at:null==e.expiresAt?void 0:(0,i.serializeDateTime)(e.expiresAt),name_conflicts:null==e.nameConflicts?void 0:e.nameConflicts.map((function(e){return e.map((function(e){return u(e)}))}))}},t.deserializeZipDownload=function(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ZipDownload"'});if(null!=e.download_url&&!(0,s.sdIsString)(e.download_url))throw new o.BoxSdkError({message:'Expecting string for "download_url" of type "ZipDownload"'});const t=null==e.download_url?void 0:e.download_url;if(null!=e.status_url&&!(0,s.sdIsString)(e.status_url))throw new o.BoxSdkError({message:'Expecting string for "status_url" of type "ZipDownload"'});const r=null==e.status_url?void 0:e.status_url;if(null!=e.expires_at&&!(0,s.sdIsString)(e.expires_at))throw new o.BoxSdkError({message:'Expecting string for "expires_at" of type "ZipDownload"'});const i=null==e.expires_at?void 0:(0,n.deserializeDateTime)(e.expires_at);if(null!=e.name_conflicts&&!(0,a.sdIsList)(e.name_conflicts))throw new o.BoxSdkError({message:'Expecting array for "name_conflicts" of type "ZipDownload"'});const d=null==e.name_conflicts?void 0:(0,a.sdIsList)(e.name_conflicts)?e.name_conflicts.map((function(e){return(0,a.sdIsList)(e)?e.map((function(e){return p(e)})):[]})):[];return{downloadUrl:t,statusUrl:r,expiresAt:i,nameConflicts:d}};const i=r(93845),n=r(93845),o=r(72631),s=r(50793),a=r(50793),l=r(50793);function d(e){return e}function c(e){if("file"==e)return e;if("folder"==e)return e;throw new o.BoxSdkError({message:"Can't deserialize ZipDownloadNameConflictsTypeField"})}function u(e){return{id:null==e.id?void 0:e.id,type:null==e.type?void 0:e.type,original_name:null==e.originalName?void 0:e.originalName,download_name:null==e.downloadName?void 0:e.downloadName}}function p(e){if(!(0,l.sdIsMap)(e))throw new o.BoxSdkError({message:'Expecting a map for "ZipDownloadNameConflictsField"'});if(null!=e.id&&!(0,s.sdIsString)(e.id))throw new o.BoxSdkError({message:'Expecting string for "id" of type "ZipDownloadNameConflictsField"'});const t=null==e.id?void 0:e.id,r=null==e.type?void 0:c(e.type);if(null!=e.original_name&&!(0,s.sdIsString)(e.original_name))throw new o.BoxSdkError({message:'Expecting string for "original_name" of type "ZipDownloadNameConflictsField"'});const i=null==e.original_name?void 0:e.original_name;if(null!=e.download_name&&!(0,s.sdIsString)(e.download_name))throw new o.BoxSdkError({message:'Expecting string for "download_name" of type "ZipDownloadNameConflictsField"'});return{id:t,type:r,originalName:i,downloadName:null==e.download_name?void 0:e.download_name}}},37248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeZipDownloadRequestItemsTypeField=a,t.deserializeZipDownloadRequestItemsTypeField=l,t.serializeZipDownloadRequestItemsField=d,t.deserializeZipDownloadRequestItemsField=c,t.serializeZipDownloadRequest=function(e){return{items:e.items.map((function(e){return d(e)})),download_file_name:null==e.downloadFileName?void 0:e.downloadFileName}},t.deserializeZipDownloadRequest=function(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ZipDownloadRequest"'});if(null==e.items)throw new i.BoxSdkError({message:'Expecting "items" of type "ZipDownloadRequest" to be defined'});if(!(0,o.sdIsList)(e.items))throw new i.BoxSdkError({message:'Expecting array for "items" of type "ZipDownloadRequest"'});const t=(0,o.sdIsList)(e.items)?e.items.map((function(e){return c(e)})):[];if(null!=e.download_file_name&&!(0,n.sdIsString)(e.download_file_name))throw new i.BoxSdkError({message:'Expecting string for "download_file_name" of type "ZipDownloadRequest"'});const r=null==e.download_file_name?void 0:e.download_file_name;return{items:t,downloadFileName:r}};const i=r(72631),n=r(50793),o=r(50793),s=r(50793);function a(e){return e}function l(e){if("file"==e)return e;if("folder"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ZipDownloadRequestItemsTypeField"})}function d(e){return{type:e.type,id:e.id}}function c(e){if(!(0,s.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ZipDownloadRequestItemsField"'});if(null==e.type)throw new i.BoxSdkError({message:'Expecting "type" of type "ZipDownloadRequestItemsField" to be defined'});const t=l(e.type);if(null==e.id)throw new i.BoxSdkError({message:'Expecting "id" of type "ZipDownloadRequestItemsField" to be defined'});if(!(0,n.sdIsString)(e.id))throw new i.BoxSdkError({message:'Expecting string for "id" of type "ZipDownloadRequestItemsField"'});return{type:t,id:e.id}}},47237:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeZipDownloadStatusStateField=s,t.deserializeZipDownloadStatusStateField=a,t.serializeZipDownloadStatus=function(e){return{total_file_count:null==e.totalFileCount?void 0:e.totalFileCount,downloaded_file_count:null==e.downloadedFileCount?void 0:e.downloadedFileCount,skipped_file_count:null==e.skippedFileCount?void 0:e.skippedFileCount,skipped_folder_count:null==e.skippedFolderCount?void 0:e.skippedFolderCount,state:null==e.state?void 0:e.state}},t.deserializeZipDownloadStatus=function(e){if(!(0,o.sdIsMap)(e))throw new i.BoxSdkError({message:'Expecting a map for "ZipDownloadStatus"'});if(null!=e.total_file_count&&!(0,n.sdIsNumber)(e.total_file_count))throw new i.BoxSdkError({message:'Expecting number for "total_file_count" of type "ZipDownloadStatus"'});const t=null==e.total_file_count?void 0:e.total_file_count;if(null!=e.downloaded_file_count&&!(0,n.sdIsNumber)(e.downloaded_file_count))throw new i.BoxSdkError({message:'Expecting number for "downloaded_file_count" of type "ZipDownloadStatus"'});const r=null==e.downloaded_file_count?void 0:e.downloaded_file_count;if(null!=e.skipped_file_count&&!(0,n.sdIsNumber)(e.skipped_file_count))throw new i.BoxSdkError({message:'Expecting number for "skipped_file_count" of type "ZipDownloadStatus"'});const s=null==e.skipped_file_count?void 0:e.skipped_file_count;if(null!=e.skipped_folder_count&&!(0,n.sdIsNumber)(e.skipped_folder_count))throw new i.BoxSdkError({message:'Expecting number for "skipped_folder_count" of type "ZipDownloadStatus"'});const l=null==e.skipped_folder_count?void 0:e.skipped_folder_count,d=null==e.state?void 0:a(e.state);return{totalFileCount:t,downloadedFileCount:r,skippedFileCount:s,skippedFolderCount:l,state:d}};const i=r(72631),n=r(50793),o=r(50793);function s(e){return e}function a(e){if("in_progress"==e)return e;if("failed"==e)return e;if("succeeded"==e)return e;throw new i.BoxSdkError({message:"Can't deserialize ZipDownloadStatusStateField"})}},50793:(e,t)=>{"use strict";function r(e){return"string"==typeof e}function i(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonToSerializedData=function(e){return JSON.parse(e)},t.sdToJson=function(e){return JSON.stringify(e)},t.sdToUrlParams=function(e){if(!i(e)&&!r(e))throw new Error("Expecting an object or string as an argument for sdToUrlParams");const t=r(e)?JSON.parse(e):e;return new URLSearchParams(Object.fromEntries(Object.entries(t).filter((([e,t])=>null!=t)))).toString()},t.sdIsEmpty=function(e){return null==e},t.sdIsBoolean=function(e){return"boolean"==typeof e},t.sdIsNumber=function(e){return"number"==typeof e},t.sdIsString=r,t.sdIsList=function(e){return Array.isArray(e)},t.sdIsMap=i},16882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return l.default}});var i=p(r(89125)),n=p(r(14851)),o=p(r(37338)),s=p(r(49865)),a=p(r(25293)),l=p(r(86598)),d=p(r(49350)),c=p(r(655)),u=p(r(99121));function p(e){return e&&e.__esModule?e:{default:e}}},45630:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,n,o,s){return i((a=i(i(t,e),i(n,s)))<<(l=o)|a>>>32-l,r);var a,l}function o(e,t,r,i,o,s,a){return n(t&r|~t&i,e,t,o,s,a)}function s(e,t,r,i,o,s,a){return n(t&i|r&~i,e,t,o,s,a)}function a(e,t,r,i,o,s,a){return n(t^r^i,e,t,o,s,a)}function l(e,t,r,i,o,s,a){return n(r^(t|~i),e,t,o,s,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var d=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,i="0123456789abcdef";for(let n=0;n<r;n+=8){const r=e[n>>5]>>>n%32&255,o=parseInt(i.charAt(r>>>4&15)+i.charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let n=1732584193,d=-271733879,c=-1732584194,u=271733878;for(let t=0;t<e.length;t+=16){const r=n,p=d,h=c,f=u;n=o(n,d,c,u,e[t],7,-680876936),u=o(u,n,d,c,e[t+1],12,-389564586),c=o(c,u,n,d,e[t+2],17,606105819),d=o(d,c,u,n,e[t+3],22,-1044525330),n=o(n,d,c,u,e[t+4],7,-176418897),u=o(u,n,d,c,e[t+5],12,1200080426),c=o(c,u,n,d,e[t+6],17,-1473231341),d=o(d,c,u,n,e[t+7],22,-45705983),n=o(n,d,c,u,e[t+8],7,1770035416),u=o(u,n,d,c,e[t+9],12,-1958414417),c=o(c,u,n,d,e[t+10],17,-42063),d=o(d,c,u,n,e[t+11],22,-1990404162),n=o(n,d,c,u,e[t+12],7,1804603682),u=o(u,n,d,c,e[t+13],12,-40341101),c=o(c,u,n,d,e[t+14],17,-1502002290),d=o(d,c,u,n,e[t+15],22,1236535329),n=s(n,d,c,u,e[t+1],5,-165796510),u=s(u,n,d,c,e[t+6],9,-1069501632),c=s(c,u,n,d,e[t+11],14,643717713),d=s(d,c,u,n,e[t],20,-373897302),n=s(n,d,c,u,e[t+5],5,-701558691),u=s(u,n,d,c,e[t+10],9,38016083),c=s(c,u,n,d,e[t+15],14,-660478335),d=s(d,c,u,n,e[t+4],20,-405537848),n=s(n,d,c,u,e[t+9],5,568446438),u=s(u,n,d,c,e[t+14],9,-1019803690),c=s(c,u,n,d,e[t+3],14,-187363961),d=s(d,c,u,n,e[t+8],20,1163531501),n=s(n,d,c,u,e[t+13],5,-1444681467),u=s(u,n,d,c,e[t+2],9,-51403784),c=s(c,u,n,d,e[t+7],14,1735328473),d=s(d,c,u,n,e[t+12],20,-1926607734),n=a(n,d,c,u,e[t+5],4,-378558),u=a(u,n,d,c,e[t+8],11,-2022574463),c=a(c,u,n,d,e[t+11],16,1839030562),d=a(d,c,u,n,e[t+14],23,-35309556),n=a(n,d,c,u,e[t+1],4,-1530992060),u=a(u,n,d,c,e[t+4],11,1272893353),c=a(c,u,n,d,e[t+7],16,-155497632),d=a(d,c,u,n,e[t+10],23,-1094730640),n=a(n,d,c,u,e[t+13],4,681279174),u=a(u,n,d,c,e[t],11,-358537222),c=a(c,u,n,d,e[t+3],16,-722521979),d=a(d,c,u,n,e[t+6],23,76029189),n=a(n,d,c,u,e[t+9],4,-640364487),u=a(u,n,d,c,e[t+12],11,-421815835),c=a(c,u,n,d,e[t+15],16,530742520),d=a(d,c,u,n,e[t+2],23,-995338651),n=l(n,d,c,u,e[t],6,-198630844),u=l(u,n,d,c,e[t+7],10,1126891415),c=l(c,u,n,d,e[t+14],15,-1416354905),d=l(d,c,u,n,e[t+5],21,-57434055),n=l(n,d,c,u,e[t+12],6,1700485571),u=l(u,n,d,c,e[t+3],10,-1894986606),c=l(c,u,n,d,e[t+10],15,-1051523),d=l(d,c,u,n,e[t+1],21,-2054922799),n=l(n,d,c,u,e[t+8],6,1873313359),u=l(u,n,d,c,e[t+15],10,-30611744),c=l(c,u,n,d,e[t+6],15,-1560198380),d=l(d,c,u,n,e[t+13],21,1309151649),n=l(n,d,c,u,e[t+4],6,-145523070),u=l(u,n,d,c,e[t+11],10,-1120210379),c=l(c,u,n,d,e[t+2],15,718787259),d=l(d,c,u,n,e[t+9],21,-343485551),n=i(n,r),d=i(d,p),c=i(c,h),u=i(u,f)}return[n,d,c,u]}(function(e){if(0===e.length)return[];const t=8*e.length,i=new Uint32Array(r(t));for(let r=0;r<t;r+=8)i[r>>5]|=(255&e[r/8])<<r%32;return i}(e),8*e.length))};t.default=d},53887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},25293:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},99121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(49350))&&i.__esModule?i:{default:i};var o=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};t.default=o},23573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},41223:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)};const i=new Uint8Array(16)},55577:(e,t)=>{"use strict";function r(e,t,r,i){switch(e){case 0:return t&r^~t&i;case 1:case 3:return t^r^i;case 2:return t&r^t&i^r&i}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(let t=0;t<s;++t){const r=new Uint32Array(16);for(let i=0;i<16;++i)r[i]=e[64*t+4*i]<<24|e[64*t+4*i+1]<<16|e[64*t+4*i+2]<<8|e[64*t+4*i+3];a[t]=r}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<s;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=a[e][t];for(let e=16;e<80;++e)o[e]=i(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=n[0],l=n[1],d=n[2],c=n[3],u=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),a=i(s,5)+r(n,l,d,c)+u+t[n]+o[e]>>>0;u=c,c=d,d=i(l,30)>>>0,l=s,s=a}n[0]=n[0]+s>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+d>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+u>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};t.default=n},655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;var i,n=(i=r(49350))&&i.__esModule?i:{default:i};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function s(e,t=0){return o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]}var a=function(e,t=0){const r=s(e,t);if(!(0,n.default)(r))throw TypeError("Stringified UUID is invalid");return r};t.default=a},89125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(41223))&&i.__esModule?i:{default:i},o=r(655);let s,a,l=0,d=0;var c=function(e,t,r){let i=t&&r||0;const c=t||new Array(16);let u=(e=e||{}).node||s,p=void 0!==e.clockseq?e.clockseq:a;if(null==u||null==p){const t=e.random||(e.rng||n.default)();null==u&&(u=s=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==p&&(p=a=16383&(t[6]<<8|t[7]))}let h=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:d+1;const m=h-l+(f-d)/1e4;if(m<0&&void 0===e.clockseq&&(p=p+1&16383),(m<0||h>l)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=h,d=f,a=p,h+=122192928e5;const g=(1e4*(268435455&h)+f)%4294967296;c[i++]=g>>>24&255,c[i++]=g>>>16&255,c[i++]=g>>>8&255,c[i++]=255&g;const y=h/4294967296*1e4&268435455;c[i++]=y>>>8&255,c[i++]=255&y,c[i++]=y>>>24&15|16,c[i++]=y>>>16&255,c[i++]=p>>>8|128,c[i++]=255&p;for(let e=0;e<6;++e)c[i+e]=u[e];return t||(0,o.unsafeStringify)(c)};t.default=c},14851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(32816)),n=o(r(45630));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,i.default)("v3",48,n.default);t.default=s},32816:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function i(e,i,s,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof i&&(i=(0,o.default)(i)),16!==(null===(l=i)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+e.length);if(d.set(i),d.set(e,i.length),d=r(d),d[6]=15&d[6]|t,d[8]=63&d[8]|128,s){a=a||0;for(let e=0;e<16;++e)s[a+e]=d[e];return s}return(0,n.unsafeStringify)(d)}try{i.name=e}catch(e){}return i.DNS=s,i.URL=a,i};var i,n=r(655),o=(i=r(99121))&&i.__esModule?i:{default:i};const s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=s;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=a},37338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(r(53887)),n=s(r(41223)),o=r(655);function s(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t,r){if(i.default.randomUUID&&!t&&!e)return i.default.randomUUID();const s=(e=e||{}).random||(e.rng||n.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return(0,o.unsafeStringify)(s)};t.default=a},49865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(32816)),n=o(r(55577));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,i.default)("v5",80,n.default);t.default=s},49350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(23573))&&i.__esModule?i:{default:i};var o=function(e){return"string"==typeof e&&n.default.test(e)};t.default=o},86598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(49350))&&i.__esModule?i:{default:i};var o=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=o},15037:(e,t,r)=>{var i;function n(e){this.rand=e}if(e.exports=function(e){return i||(i=new n(null)),i.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(73776);if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},50462:(e,t,r)=>{var i=r(92861).Buffer;function n(e){i.isBuffer(e)||(e=i.from(e));for(var t=e.length/4|0,r=new Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,r,i,n){for(var o,s,a,l,d=r[0],c=r[1],u=r[2],p=r[3],h=e[0]^t[0],f=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],y=4,v=1;v<n;v++)o=d[h>>>24]^c[f>>>16&255]^u[m>>>8&255]^p[255&g]^t[y++],s=d[f>>>24]^c[m>>>16&255]^u[g>>>8&255]^p[255&h]^t[y++],a=d[m>>>24]^c[g>>>16&255]^u[h>>>8&255]^p[255&f]^t[y++],l=d[g>>>24]^c[h>>>16&255]^u[f>>>8&255]^p[255&m]^t[y++],h=o,f=s,m=a,g=l;return o=(i[h>>>24]<<24|i[f>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^t[y++],s=(i[f>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&h])^t[y++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[h>>>8&255]<<8|i[255&f])^t[y++],l=(i[g>>>24]<<24|i[h>>>16&255]<<16|i[f>>>8&255]<<8|i[255&m])^t[y++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var d=a^a<<1^a<<2^a<<3^a<<4;d=d>>>8^255&d^99,r[s]=d,i[d]=s;var c=e[s],u=e[c],p=e[u],h=257*e[d]^16843008*d;n[0][s]=h<<24|h>>>8,n[1][s]=h<<16|h>>>16,n[2][s]=h<<8|h>>>24,n[3][s]=h,h=16843009*p^65537*u^257*c^16843008*s,o[0][d]=h<<24|h>>>8,o[1][d]=h<<16|h>>>16,o[2][d]=h<<8|h>>>24,o[3][d]=h,0===s?s=a=1:(s=c^e[e[e[p^c]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function d(e){this._key=n(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var s=n[o-1];o%t==0?(s=s<<8|s>>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[o]=n[o-t]^s}for(var d=[],c=0;c<i;c++){var u=i-c,p=n[u-(c%4?0:4)];d[c]=c<4||u<=4?p:l.INV_SUB_MIX[0][l.SBOX[p>>>24]]^l.INV_SUB_MIX[1][l.SBOX[p>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[p>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&p]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=d},d.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=i.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},d.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},d.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=d},92356:(e,t,r)=>{var i=r(50462),n=r(92861).Buffer,o=r(56168),s=r(56698),a=r(25892),l=r(30295),d=r(45122);function c(e,t,r,s){o.call(this);var l=n.alloc(4,0);this._cipher=new i.AES(t);var c=this._cipher.encryptBlock(l);this._ghash=new a(c),r=function(e,t,r){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var i=new a(r),o=t.length,s=o%16;i.update(t),s&&(s=16-s,i.update(n.alloc(s,0))),i.update(n.alloc(8,0));var l=8*o,c=n.alloc(8);c.writeUIntBE(l,0,8),i.update(c),e._finID=i.state;var u=n.from(e._finID);return d(u),u}(this,r,c),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,o),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=c},1241:(e,t,r)=>{var i=r(25799),n=r(36171),o=r(3219);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},36171:(e,t,r)=>{var i=r(92356),n=r(92861).Buffer,o=r(530),s=r(50650),a=r(56168),l=r(50462),d=r(68078);function c(e,t,r){a.call(this),this._cache=new u,this._last=void 0,this._cipher=new l.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}function u(){this.cache=n.allocUnsafe(0)}function p(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=n.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new i(a.module,t,r,!0):new c(a.module,t,r)}r(56698)(c,a),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return n.concat(i)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},u.prototype.add=function(e){this.cache=n.concat([this.cache,e])},u.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=d(t,!1,r.key,r.iv);return p(e,i.key,i.iv)},t.createDecipheriv=p},25799:(e,t,r)=>{var i=r(530),n=r(92356),o=r(92861).Buffer,s=r(50650),a=r(56168),l=r(50462),d=r(68078);function c(e,t,r){a.call(this),this._cache=new p,this._cipher=new l.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(56698)(c,a),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return o.concat(i)};var u=o.alloc(16,16);function p(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var a=i[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new n(a.module,t,r):new c(a.module,t,r)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=o.concat([this.cache,e])},p.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},p.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var r=i[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=d(t,!1,r.key,r.iv);return h(e,n.key,n.iv)}},25892:(e,t,r)=>{var i=r(92861).Buffer,n=i.alloc(16,0);function o(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,r,i=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],n=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(n[0]^=i[0],n[1]^=i[1],n[2]^=i[2],n[3]^=i[3]),r=!!(1&i[3]),t=3;t>0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=o(n)},s.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},45122:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},92884:(e,t,r)=>{var i=r(30295);t.encrypt=function(e,t){var r=i(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return i(n,r)}},46383:(e,t,r)=>{var i=r(92861).Buffer,n=r(30295);function o(e,t,r){var o=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(o),e._prev=i.concat([e._prev,r?t:s]),s}t.encrypt=function(e,t,r){for(var n,s=i.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),!(e._cache.length<=t.length)){s=i.concat([s,o(e,t,r)]);break}n=e._cache.length,s=i.concat([s,o(e,t.slice(0,n),r)]),t=t.slice(n)}return s}},32883:(e,t,r)=>{var i=r(92861).Buffer;function n(e,t,r){for(var i,n,s=-1,a=0;++s<8;)i=t&1<<7-s?128:0,a+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^i))>>s%8,e._prev=o(e._prev,r?i:n);return a}function o(e,t){var r=e.length,n=-1,o=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++n<r;)o[n]=e[n]<<1|e[n+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=i.allocUnsafe(o),a=-1;++a<o;)s[a]=n(e,t[a],r);return s}},86975:(e,t,r)=>{var i=r(92861).Buffer;function n(e,t,r){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=i.concat([e._prev.slice(1),i.from([r?t:n])]),n}t.encrypt=function(e,t,r){for(var o=t.length,s=i.allocUnsafe(o),a=-1;++a<o;)s[a]=n(e,t[a],r);return s}},63053:(e,t,r)=>{var i=r(30295),n=r(92861).Buffer,o=r(45122);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var l=s(e),d=o+16*a;e._cache.writeUInt32BE(l[0],d+0),e._cache.writeUInt32BE(l[1],d+4),e._cache.writeUInt32BE(l[2],d+8),e._cache.writeUInt32BE(l[3],d+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,c)}},52632:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},530:(e,t,r)=>{var i={ECB:r(52632),CBC:r(92884),CFB:r(46383),CFB8:r(86975),CFB1:r(32883),OFB:r(46843),CTR:r(63053),GCM:r(63053)},n=r(3219);for(var o in n)n[o].module=i[n[o].mode];e.exports=n},46843:(e,t,r)=>{var i=r(48287).Buffer,n=r(30295);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=i.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,r)}},50650:(e,t,r)=>{var i=r(50462),n=r(92861).Buffer,o=r(56168);function s(e,t,r,s){o.call(this),this._cipher=new i.AES(t),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._mode=e}r(56698)(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},30125:(e,t,r)=>{var i=r(84050),n=r(1241),o=r(530),s=r(32438),a=r(68078);function l(e,t,r){if(e=e.toLowerCase(),o[e])return n.createCipheriv(e,t,r);if(s[e])return new i({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function d(e,t,r){if(e=e.toLowerCase(),o[e])return n.createDecipheriv(e,t,r);if(s[e])return new i({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,i=s[e].iv}var n=a(t,!1,r,i);return l(e,n.key,n.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,i=s[e].iv}var n=a(t,!1,r,i);return d(e,n.key,n.iv)},t.createDecipheriv=t.Decipheriv=d,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(n.getCiphers())}},84050:(e,t,r)=>{var i=r(56168),n=r(29560),o=r(56698),s=r(92861).Buffer,a={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function l(e){i.call(this);var t,r=e.mode.toLowerCase(),n=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=n.create({key:o,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,o(l,i),l.prototype._update=function(e){return s.from(this._des.update(e))},l.prototype._final=function(){return s.from(this._des.final())}},32438:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},67332:(e,t,r)=>{"use strict";var i=r(39404),n=r(53209),o=r(92861).Buffer;function s(e){var t,r=e.modulus.byteLength();do{t=new i(n(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=s(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),n=t.modulus.byteLength(),a=new i(e).mul(r.blinder).umod(t.modulus),l=a.toRed(i.mont(t.prime1)),d=a.toRed(i.mont(t.prime2)),c=t.coefficient,u=t.prime1,p=t.prime2,h=l.redPow(t.exponent1).fromRed(),f=d.redPow(t.exponent2).fromRed(),m=h.isub(f).imul(c).umod(u).imul(p);return f.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(o,"be",n)}a.getr=s,e.exports=a},55715:(e,t,r)=>{"use strict";e.exports=r(62951)},20:(e,t,r)=>{"use strict";var i=r(92861).Buffer,n=r(47108),o=r(28399),s=r(56698),a=r(35359),l=r(74847),d=r(62951);function c(e){o.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){o.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function p(e){return new c(e)}function h(e){return new u(e)}Object.keys(d).forEach((function(e){d[e].id=i.from(d[e].id,"hex"),d[e.toLowerCase()]=d[e]})),s(c,o.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=a(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},s(u,o.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},u.prototype.verify=function(e,t,r){var n="string"==typeof t?i.from(t,r):t;this.end();var o=this._hash.digest();return l(n,o,e,this._signType,this._tag)},e.exports={Sign:p,Verify:h,createSign:p,createVerify:h}},35359:(e,t,r)=>{"use strict";var i=r(92861).Buffer,n=r(83507),o=r(67332),s=r(86729).ec,a=r(39404),l=r(78170),d=r(64589);function c(e,t,r,o){if((e=i.from(e.toArray())).length<t.byteLength()){var s=i.alloc(t.byteLength()-e.length);e=i.concat([s,e])}var a=r.length,l=function(e,t){e=u(e,t),e=e.mod(t);var r=i.from(e.toArray());if(r.length<t.byteLength()){var n=i.alloc(t.byteLength()-r.length);r=i.concat([n,r])}return r}(r,t),d=i.alloc(a);d.fill(1);var c=i.alloc(a);return c=n(o,c).update(d).update(i.from([0])).update(e).update(l).digest(),d=n(o,c).update(d).digest(),{k:c=n(o,c).update(d).update(i.from([1])).update(e).update(l).digest(),v:d=n(o,c).update(d).digest()}}function u(e,t){var r=new a(e),i=(e.length<<3)-t.bitLength();return i>0&&r.ishrn(i),r}function p(e,t,r){var o,s;do{for(o=i.alloc(0);8*o.length<e.bitLength();)t.v=n(r,t.k).update(t.v).digest(),o=i.concat([o,t.v]);s=u(o,e),t.k=n(r,t.k).update(t.v).update(i.from([0])).digest(),t.v=n(r,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function h(e,t,r,i){return e.toRed(a.mont(r)).redPow(t).fromRed().mod(i)}e.exports=function(e,t,r,n,f){var m=l(t);if(m.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(e,t){var r=d[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var n=new s(r).keyFromPrivate(t.privateKey),o=n.sign(e);return i.from(o.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==n)throw new Error("wrong private key type");return function(e,t,r){var n,o=t.params.priv_key,s=t.params.p,l=t.params.q,d=t.params.g,f=new a(0),m=u(e,l).mod(l),g=!1,y=c(o,l,e,r);for(;!1===g;)f=h(d,n=p(l,y,r),s,l),0===(g=n.invm(l).imul(m.add(o.mul(f))).mod(l)).cmpn(0)&&(g=!1,f=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=e.length+t.length+4,n=[48,r,2,e.length];return n=n.concat(e,[2,t.length],t),i.from(n)}(f,g)}(e,m,r)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=i.concat([f,e]);for(var g=m.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var v=-1;++v<e.length;)y.push(e[v]);return o(y,m)},e.exports.getKey=c,e.exports.makeKey=p},74847:(e,t,r)=>{"use strict";var i=r(92861).Buffer,n=r(39404),o=r(86729).ec,s=r(78170),a=r(64589);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,d,c){var u=s(r);if("ec"===u.type){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var i=a[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new o(i),s=r.data.subjectPrivateKey.data;return n.verify(t,e,s)}(e,t,u)}if("dsa"===u.type){if("dsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,o=r.data.q,a=r.data.g,d=r.data.pub_key,c=s.signature.decode(e,"der"),u=c.s,p=c.r;l(u,o),l(p,o);var h=n.mont(i),f=u.invm(o),m=a.toRed(h).redPow(new n(t).mul(f).mod(o)).fromRed().mul(d.toRed(h).redPow(p.mul(f).mod(o)).fromRed()).mod(i).mod(o);return 0===m.cmp(p)}(e,t,u)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");t=i.concat([c,t]);for(var p=u.modulus.byteLength(),h=[1],f=0;t.length+h.length+2<p;)h.push(255),f+=1;h.push(0);for(var m=-1;++m<t.length;)h.push(t[m]);h=i.from(h);var g=n.mont(u.modulus);e=(e=new n(e).toRed(g)).redPow(new n(u.publicExponent)),e=i.from(e.fromRed().toArray());var y=f<8?1:0;for(p=Math.min(e.length,h.length),e.length!==h.length&&(y=1),m=-1;++m<p;)y|=e[m]^h[m];return 0===y}},41045:(e,t,r)=>{"use strict";var i=r(48287).Buffer,n=r(48287).SlowBuffer;function o(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}e.exports=o,o.install=function(){i.prototype.equal=n.prototype.equal=function(e){return o(this,e)}};var s=i.prototype.equal,a=n.prototype.equal;o.restore=function(){i.prototype.equal=s,n.prototype.equal=a}},30295:(e,t,r)=>{var i=r(48287).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),n=new i(r),o=0;o<r;++o)n[o]=e[o]^t[o];return n}},48287:(e,t,r)=>{"use strict";
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/const i=r(67526),n=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let i=a(r);const n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);const n=function(e){if(l.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,l.prototype),i}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return i?-1:W(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,i,n){let o,s=1,a=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function d(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){let i=-1;for(o=r;o<a;o++)if(d(e,o)===d(t,-1===i?0:o-i)){if(-1===i&&(i=o),o-i+1===l)return i*s}else-1!==i&&(o-=o-i),i=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let i=0;i<l;i++)if(d(e,o+i)!==d(t,i)){r=!1;break}if(r)return o}return-1}function w(e,t,r,i){r=Number(r)||0;const n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;const o=t.length;let s;for(i>o/2&&(i=o/2),s=0;s<i;++s){const i=parseInt(t.substr(2*s,2),16);if(Y(i))return s;e[r+s]=i}return s}function _(e,t,r,i){return V(W(t,e.length-r),e,r,i)}function x(e,t,r,i){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function S(e,t,r,i){return V(K(t),e,r,i)}function k(e,t,r,i){return V(function(e,t){let r,i,n;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function E(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const i=[];let n=t;for(;n<r;){const t=e[n];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(n+s<=r){let r,i,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[n+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[n+1],i=e[n+2],128==(192&r)&&128==(192&i)&&(l=(15&t)<<12|(63&r)<<6|63&i,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[n+1],i=e[n+2],a=e[n+3],128==(192&r)&&128==(192&i)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=s}return function(e){const t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=B));return r}(i)}t.kMaxLength=s,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(J(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const i=l.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))n+t.length>i.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,n)}n+=t.length}return i},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,i,n){if(J(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),d=this.slice(i,n),c=e.slice(t,r);for(let e=0;e<a;++e)if(d[e]!==c[e]){o=d[e],s=c[e];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},l.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function C(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function I(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function A(e,t,r){const i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=Q[e[i]];return n}function F(e,t,r){const i=e.slice(t,r);let n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,i,n,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function R(e,t,r,i,n){j(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function P(e,t,r,i,n){j(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function O(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,i,o){return t=+t,r>>>=0,o||O(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function N(e,t,r,i,o){return t=+t,r>>>=0,o||O(e,0,r,8),n.write(e,t,r,i,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(n)<<BigInt(32))})),l.prototype.readBigUInt64BE=Z((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let i=t,n=1,o=this[e+--i];for(;i>0&&(n*=256);)o+=this[e+--i]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Z((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){D(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){D(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}let n=0,o=1,s=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}let n=r-1,o=1,s=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,i){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);const n=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),n},l.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{const o=l.isBuffer(e)?e:l.from(e,i),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%s]}return this};const q={};function U(e,t,r){q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function L(e){let t="",r=e.length;const i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,i,n,o){if(e>r||e<t){const i="bigint"==typeof t?"n":"";let n;throw n=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(o+1)}${i}`:`>= -(2${i} ** ${8*(o+1)-1}${i}) and < 2 ** ${8*(o+1)-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new q.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(i,n,o)}function H(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new q.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=L(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=L(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const i=e.length;let n=null;const o=[];for(let s=0;s<i;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function Z(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},38075:(e,t,r)=>{"use strict";var i=r(70453),n=r(10487),o=n(i("String.prototype.indexOf"));e.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?n(r):r}},10487:(e,t,r)=>{"use strict";var i=r(66743),n=r(70453),o=r(96897),s=r(69675),a=n("%Function.prototype.apply%"),l=n("%Function.prototype.call%"),d=n("%Reflect.apply%",!0)||i.call(l,a),c=r(30655),u=n("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=d(i,l,arguments);return o(t,1+u(0,e.length-(arguments.length-1)),!0)};var p=function(){return d(i,a,arguments)};c?c(e.exports,"apply",{value:p}):e.exports.apply=p},56168:(e,t,r)=>{var i=r(92861).Buffer,n=r(88310).Transform,o=r(83141).I;function s(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(56698)(s,n),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=i.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i},e.exports=s},5971:e=>{function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<i.length;n++)if((r=i[n])===t||r.fn===t){i.splice(n,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(r){i=0;for(var n=(r=r.slice(0)).length;i<n;++i)r[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},15622:(e,t,r)=>{function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(48287).Buffer.isBuffer},61324:(e,t,r)=>{var i=r(48287).Buffer,n=r(86729),o=r(92801);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function l(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.length<r){var o=new i(r-n.length);o.fill(0),n=i.concat([o,n])}return t?n.toString(t):n}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,r){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),l(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),l(r,e)},a.prototype.getPrivateKey=function(e){return l(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",i.isBuffer(e)||(e=new i(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},92801:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(77965).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},47108:(e,t,r)=>{"use strict";var i=r(56698),n=r(88276),o=r(66011),s=r(62802),a=r(56168);function l(e){a.call(this,"digest"),this._hash=e}i(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new o:new l(s(e))}},20320:(e,t,r)=>{var i=r(88276);e.exports=function(e){return(new i).update(e).digest()}},83507:(e,t,r)=>{"use strict";var i=r(56698),n=r(41800),o=r(56168),s=r(92861).Buffer,a=r(20320),l=r(66011),d=r(62802),c=s.alloc(128);function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new l:d(e)).update(t).digest():t.length<r&&(t=s.concat([t,c],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),a=0;a<r;a++)i[a]=54^t[a],n[a]=92^t[a];this._hash="rmd160"===e?new l:d(e),this._hash.update(i)}i(u,o),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:d(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new u("rmd160",t):"md5"===e?new n(a,t):new u(e,t)}},41800:(e,t,r)=>{"use strict";var i=r(56698),n=r(92861).Buffer,o=r(56168),s=n.alloc(128),a=64;function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=n.concat([t,s],a));for(var r=this._ipad=n.allocUnsafe(a),i=this._opad=n.allocUnsafe(a),l=0;l<a;l++)r[l]=54^t[l],i[l]=92^t[l];this._hash=[r]}i(l,o),l.prototype._update=function(e){this._hash.push(e)},l.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},e.exports=l},91565:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(53209),t.createHash=t.Hash=r(47108),t.createHmac=t.Hmac=r(83507);var i=r(55715),n=Object.keys(i),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);t.getHashes=function(){return o};var s=r(78396);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(30125);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var l=r(15380);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var d=r(20);t.createSign=d.createSign,t.Sign=d.Sign,t.createVerify=d.createVerify,t.Verify=d.Verify,t.createECDH=r(61324);var c=r(97168);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var u=r(76983);t.randomFill=u.randomFill,t.randomFillSync=u.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},73923:(e,t,r)=>{"use strict";var i=r(88997),n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(e,t,r){var o=t[r];if(null!=o){if(n.call(e,r)&&(void 0===e[r]||null===e[r]))throw new TypeError("Cannot convert undefined or null to object ("+r+")");n.call(e,r)&&i(o)?e[r]=a(Object(e[r]),t[r]):e[r]=o}}function a(e,t){if(e===t)return e;for(var r in t=Object(t))n.call(t,r)&&s(e,t,r);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),a=0;a<i.length;a++)o.call(t,i[a])&&s(e,t,i[a]);return e}e.exports=function(e){e=function(e){if(null==e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}(e);for(var t=1;t<arguments.length;t++)a(e,arguments[t]);return e}},30041:(e,t,r)=>{"use strict";var i=r(30655),n=r(58068),o=r(69675),s=r(75795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],u=!!s&&s(e,t);if(i)i(e,t,{configurable:null===d&&u?u.configurable:!d,enumerable:null===a&&u?u.enumerable:!a,value:r,writable:null===l&&u?u.writable:!l});else{if(!c&&(a||l||d))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},29560:(e,t,r)=>{"use strict";t.utils=r(87626),t.Cipher=r(82808),t.DES=r(82211),t.CBC=r(3389),t.EDE=r(65279)},3389:(e,t,r)=>{"use strict";var i=r(43349),n=r(56698),o={};function s(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}n(t,e);for(var r=Object.keys(o),i=0;i<r.length;i++){var s=r[i];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,r,i){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];o._update.call(this,s,0,r,i);for(a=0;a<this.blockSize;a++)s[a]=r[i+a]}else{o._update.call(this,e,t,r,i);for(a=0;a<this.blockSize;a++)r[i+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},82808:(e,t,r)=>{"use strict";var i=r(43349);function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},82211:(e,t,r)=>{"use strict";var i=r(43349),n=r(56698),o=r(87626),s=r(82808);function a(){this.tmp=new Array(2),this.keys=null}function l(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}n(l,s),e.exports=l,l.create=function(e){return new l(e)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),n=o.readUInt32BE(t,4);o.pc1(r,n,e.tmp,0),r=e.tmp[0],n=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=d[s>>>1];r=o.r28shl(r,a),n=o.r28shl(n,a),o.pc2(r,n,e.keys,s)}},l.prototype._update=function(e,t,r,i){var n=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,n.tmp,0),s=n.tmp[0],a=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,a,n.tmp,0):this._decrypt(n,s,a,n.tmp,0),s=n.tmp[0],a=n.tmp[1],o.writeUInt32BE(r,s,i),o.writeUInt32BE(r,a,i+4)},l.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},l.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)i.equal(e[r],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,r,i,n){for(var s=t,a=r,l=0;l<e.keys.length;l+=2){var d=e.keys[l],c=e.keys[l+1];o.expand(a,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var u=o.substitute(d,c),p=a;a=(s^o.permute(u))>>>0,s=p}o.rip(a,s,i,n)},l.prototype._decrypt=function(e,t,r,i,n){for(var s=r,a=t,l=e.keys.length-2;l>=0;l-=2){var d=e.keys[l],c=e.keys[l+1];o.expand(s,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var u=o.substitute(d,c),p=s;s=(a^o.permute(u))>>>0,a=p}o.rip(s,a,i,n)}},65279:(e,t,r)=>{"use strict";var i=r(43349),n=r(56698),o=r(82808),s=r(82211);function a(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:r})]}function l(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}n(l,o),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},87626:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,i){for(var n=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=t>>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[i+0]=n>>>0,r[i+1]=o>>>0},t.rip=function(e,t,r,i){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)n<<=1,n|=t>>>a+s&1,n<<=1,n|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},t.pc1=function(e,t,r,i){for(var n=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1}for(a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,i,n){for(var o=0,s=0,a=r.length>>>1,l=0;l<a;l++)o<<=1,o|=e>>>r[l]&1;for(l=a;l<r.length;l++)s<<=1,s|=t>>>r[l]&1;i[n+0]=o>>>0,i[n+1]=s>>>0},t.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=e>>>o&63;for(o=11;o>=3;o-=4)n|=e>>>o&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<n.length;r++)t<<=1,t|=e>>>n[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],o=0;o<t;o+=r)n.push(i.slice(o,o+r));return n.join(" ")}},15380:(e,t,r)=>{var i=r(48287).Buffer,n=r(4934),o=r(23241),s=r(14910);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new i(o[e].prime,"hex"),r=new i(o[e].gen,"hex");return new s(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,l){return i.isBuffer(r)||void 0===a[r]?e(t,"binary",r,o):(r=r||"binary",l=l||"binary",o=o||new i([2]),i.isBuffer(o)||(o=new i(o,l)),"number"==typeof t?new s(n(t,o),o,!0):(i.isBuffer(t)||(t=new i(t,r)),new s(t,o,!0)))}},14910:(e,t,r)=>{var i=r(48287).Buffer,n=r(66473),o=new(r(52244)),s=new n(24),a=new n(11),l=new n(10),d=new n(3),c=new n(7),u=r(4934),p=r(53209);function h(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._pub=new n(e),this}function f(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._priv=new n(e),this}e.exports=g;var m={};function g(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=f):this._primeCode=8}function y(e,t){var r=new i(e.toArray());return t?r.toString(t):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in m)return m[i];var n,p=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!o.test(e))return p+=1,p+="02"===r||"05"===r?8:4,m[i]=p,p;switch(o.test(e.shrn(1))||(p+=2),r){case"02":e.mod(s).cmp(a)&&(p+=8);break;case"05":(n=e.mod(l)).cmp(d)&&n.cmp(c)&&(p+=8);break;default:p+=4}return m[i]=p,p}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new i(t.toArray()),o=this.getPrime();if(r.length<o.length){var s=new i(o.length-r.length);s.fill(0),r=i.concat([s,r])}return r},g.prototype.getPublicKey=function(e){return y(this._pub,e)},g.prototype.getPrivateKey=function(e){return y(this._priv,e)},g.prototype.getPrime=function(e){return y(this.__prime,e)},g.prototype.getGenerator=function(e){return y(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.__gen=e,this._gen=new n(e),this}},4934:(e,t,r)=>{var i=r(53209);e.exports=v,v.simpleSieve=g,v.fermatTest=y;var n=r(66473),o=new n(24),s=new(r(52244)),a=new n(1),l=new n(2),d=new n(5),c=(new n(16),new n(8),new n(10)),u=new n(3),p=(new n(7),new n(11)),h=new n(4),f=(new n(12),null);function m(){if(null!==f)return f;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return f=e,e}function g(e){for(var t=m(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=n.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new n(2===t||5===t?[140,123]:[140,39]);var r,f;for(t=new n(t);;){for(r=new n(i(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(l),t.cmp(l)){if(!t.cmp(d))for(;r.mod(c).cmp(u);)r.iadd(h)}else for(;r.mod(o).cmp(p);)r.iadd(h);if(g(f=r.shrn(1))&&g(r)&&y(f)&&y(r)&&s.test(f)&&s.test(r))return r}}},66473:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(66089).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},76320:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,i){var n={},o={};o[r]=0;var s,a,l,d,c,u,p,h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(l in a=(s=h.pop()).value,d=s.cost,c=e[a]||{})c.hasOwnProperty(l)&&(u=d+c[l],p=o[l],(void 0===o[l]||p>u)&&(o[l]=u,h.push(l,u),n[l]=a));if(void 0!==i&&void 0===o[i]){var f=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,r,i){var n=t.single_source_shortest_paths(e,r,i);return t.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var r,i=t.PriorityQueue,n={};for(r in e=e||{},i)i.hasOwnProperty(r)&&(n[r]=i[r]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},34783:function(e,t,r){var i=r(48287).Buffer;!function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;t.length>r;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,r){return(d=l()?Reflect.construct:function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&a(n,r.prototype),n}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function u(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var p="app",h="user",f="team",m="dropboxapi.com",g="dropbox.com",y={api:"api",notify:"bolt",content:"api-content"},v={};function b(e){var t="000".concat(e.charCodeAt(0).toString(16)).slice(-4);return"\\u".concat(t)}v.accountSetProfilePhoto=function(e){return this.request("account/set_profile_photo",e,"user","api","rpc","account_info.write")},v.authTokenFromOauth1=function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc",null)},v.authTokenRevoke=function(){return this.request("auth/token/revoke",null,"user","api","rpc",null)},v.checkApp=function(e){return this.request("check/app",e,"app","api","rpc",null)},v.checkUser=function(e){return this.request("check/user",e,"user","api","rpc","account_info.read")},v.contactsDeleteManualContacts=function(){return this.request("contacts/delete_manual_contacts",null,"user","api","rpc","contacts.write")},v.contactsDeleteManualContactsBatch=function(e){return this.request("contacts/delete_manual_contacts_batch",e,"user","api","rpc","contacts.write")},v.filePropertiesPropertiesAdd=function(e){return this.request("file_properties/properties/add",e,"user","api","rpc","files.metadata.write")},v.filePropertiesPropertiesOverwrite=function(e){return this.request("file_properties/properties/overwrite",e,"user","api","rpc","files.metadata.write")},v.filePropertiesPropertiesRemove=function(e){return this.request("file_properties/properties/remove",e,"user","api","rpc","files.metadata.write")},v.filePropertiesPropertiesSearch=function(e){return this.request("file_properties/properties/search",e,"user","api","rpc","files.metadata.read")},v.filePropertiesPropertiesSearchContinue=function(e){return this.request("file_properties/properties/search/continue",e,"user","api","rpc","files.metadata.read")},v.filePropertiesPropertiesUpdate=function(e){return this.request("file_properties/properties/update",e,"user","api","rpc","files.metadata.write")},v.filePropertiesTemplatesAddForTeam=function(e){return this.request("file_properties/templates/add_for_team",e,"team","api","rpc","files.team_metadata.write")},v.filePropertiesTemplatesAddForUser=function(e){return this.request("file_properties/templates/add_for_user",e,"user","api","rpc","files.metadata.write")},v.filePropertiesTemplatesGetForTeam=function(e){return this.request("file_properties/templates/get_for_team",e,"team","api","rpc","files.team_metadata.write")},v.filePropertiesTemplatesGetForUser=function(e){return this.request("file_properties/templates/get_for_user",e,"user","api","rpc","files.metadata.read")},v.filePropertiesTemplatesListForTeam=function(){return this.request("file_properties/templates/list_for_team",null,"team","api","rpc","files.team_metadata.write")},v.filePropertiesTemplatesListForUser=function(){return this.request("file_properties/templates/list_for_user",null,"user","api","rpc","files.metadata.read")},v.filePropertiesTemplatesRemoveForTeam=function(e){return this.request("file_properties/templates/remove_for_team",e,"team","api","rpc","files.team_metadata.write")},v.filePropertiesTemplatesRemoveForUser=function(e){return this.request("file_properties/templates/remove_for_user",e,"user","api","rpc","files.metadata.write")},v.filePropertiesTemplatesUpdateForTeam=function(e){return this.request("file_properties/templates/update_for_team",e,"team","api","rpc","files.team_metadata.write")},v.filePropertiesTemplatesUpdateForUser=function(e){return this.request("file_properties/templates/update_for_user",e,"user","api","rpc","files.metadata.write")},v.fileRequestsCount=function(){return this.request("file_requests/count",null,"user","api","rpc","file_requests.read")},v.fileRequestsCreate=function(e){return this.request("file_requests/create",e,"user","api","rpc","file_requests.write")},v.fileRequestsDelete=function(e){return this.request("file_requests/delete",e,"user","api","rpc","file_requests.write")},v.fileRequestsDeleteAllClosed=function(){return this.request("file_requests/delete_all_closed",null,"user","api","rpc","file_requests.write")},v.fileRequestsGet=function(e){return this.request("file_requests/get",e,"user","api","rpc","file_requests.read")},v.fileRequestsListV2=function(e){return this.request("file_requests/list_v2",e,"user","api","rpc","file_requests.read")},v.fileRequestsList=function(){return this.request("file_requests/list",null,"user","api","rpc","file_requests.read")},v.fileRequestsListContinue=function(e){return this.request("file_requests/list/continue",e,"user","api","rpc","file_requests.read")},v.fileRequestsUpdate=function(e){return this.request("file_requests/update",e,"user","api","rpc","file_requests.write")},v.filesAlphaGetMetadata=function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc","files.metadata.read")},v.filesAlphaUpload=function(e){return this.request("files/alpha/upload",e,"user","content","upload","files.content.write")},v.filesCopyV2=function(e){return this.request("files/copy_v2",e,"user","api","rpc","files.content.write")},v.filesCopy=function(e){return this.request("files/copy",e,"user","api","rpc","files.content.write")},v.filesCopyBatchV2=function(e){return this.request("files/copy_batch_v2",e,"user","api","rpc","files.content.write")},v.filesCopyBatch=function(e){return this.request("files/copy_batch",e,"user","api","rpc","files.content.write")},v.filesCopyBatchCheckV2=function(e){return this.request("files/copy_batch/check_v2",e,"user","api","rpc","files.content.write")},v.filesCopyBatchCheck=function(e){return this.request("files/copy_batch/check",e,"user","api","rpc","files.content.write")},v.filesCopyReferenceGet=function(e){return this.request("files/copy_reference/get",e,"user","api","rpc","files.content.write")},v.filesCopyReferenceSave=function(e){return this.request("files/copy_reference/save",e,"user","api","rpc","files.content.write")},v.filesCreateFolderV2=function(e){return this.request("files/create_folder_v2",e,"user","api","rpc","files.content.write")},v.filesCreateFolder=function(e){return this.request("files/create_folder",e,"user","api","rpc","files.content.write")},v.filesCreateFolderBatch=function(e){return this.request("files/create_folder_batch",e,"user","api","rpc","files.content.write")},v.filesCreateFolderBatchCheck=function(e){return this.request("files/create_folder_batch/check",e,"user","api","rpc","files.content.write")},v.filesDeleteV2=function(e){return this.request("files/delete_v2",e,"user","api","rpc","files.content.write")},v.filesDelete=function(e){return this.request("files/delete",e,"user","api","rpc","files.content.write")},v.filesDeleteBatch=function(e){return this.request("files/delete_batch",e,"user","api","rpc","files.content.write")},v.filesDeleteBatchCheck=function(e){return this.request("files/delete_batch/check",e,"user","api","rpc","files.content.write")},v.filesDownload=function(e){return this.request("files/download",e,"user","content","download","files.content.read")},v.filesDownloadZip=function(e){return this.request("files/download_zip",e,"user","content","download","files.content.read")},v.filesExport=function(e){return this.request("files/export",e,"user","content","download","files.content.read")},v.filesGetFileLockBatch=function(e){return this.request("files/get_file_lock_batch",e,"user","api","rpc","files.content.read")},v.filesGetMetadata=function(e){return this.request("files/get_metadata",e,"user","api","rpc","files.metadata.read")},v.filesGetPreview=function(e){return this.request("files/get_preview",e,"user","content","download","files.content.read")},v.filesGetTemporaryLink=function(e){return this.request("files/get_temporary_link",e,"user","api","rpc","files.content.read")},v.filesGetTemporaryUploadLink=function(e){return this.request("files/get_temporary_upload_link",e,"user","api","rpc","files.content.write")},v.filesGetThumbnail=function(e){return this.request("files/get_thumbnail",e,"user","content","download","files.content.read")},v.filesGetThumbnailV2=function(e){return this.request("files/get_thumbnail_v2",e,"app, user","content","download","files.content.read")},v.filesGetThumbnailBatch=function(e){return this.request("files/get_thumbnail_batch",e,"user","content","rpc","files.content.read")},v.filesListFolder=function(e){return this.request("files/list_folder",e,"app, user","api","rpc","files.metadata.read")},v.filesListFolderContinue=function(e){return this.request("files/list_folder/continue",e,"app, user","api","rpc","files.metadata.read")},v.filesListFolderGetLatestCursor=function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc","files.metadata.read")},v.filesListFolderLongpoll=function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc","files.metadata.read")},v.filesListRevisions=function(e){return this.request("files/list_revisions",e,"user","api","rpc","files.metadata.read")},v.filesLockFileBatch=function(e){return this.request("files/lock_file_batch",e,"user","api","rpc","files.content.write")},v.filesMoveV2=function(e){return this.request("files/move_v2",e,"user","api","rpc","files.content.write")},v.filesMove=function(e){return this.request("files/move",e,"user","api","rpc","files.content.write")},v.filesMoveBatchV2=function(e){return this.request("files/move_batch_v2",e,"user","api","rpc","files.content.write")},v.filesMoveBatch=function(e){return this.request("files/move_batch",e,"user","api","rpc","files.content.write")},v.filesMoveBatchCheckV2=function(e){return this.request("files/move_batch/check_v2",e,"user","api","rpc","files.content.write")},v.filesMoveBatchCheck=function(e){return this.request("files/move_batch/check",e,"user","api","rpc","files.content.write")},v.filesPaperCreate=function(e){return this.request("files/paper/create",e,"user","api","upload","files.content.write")},v.filesPaperUpdate=function(e){return this.request("files/paper/update",e,"user","api","upload","files.content.write")},v.filesPermanentlyDelete=function(e){return this.request("files/permanently_delete",e,"user","api","rpc","files.permanent_delete")},v.filesPropertiesAdd=function(e){return this.request("files/properties/add",e,"user","api","rpc","files.metadata.write")},v.filesPropertiesOverwrite=function(e){return this.request("files/properties/overwrite",e,"user","api","rpc","files.metadata.write")},v.filesPropertiesRemove=function(e){return this.request("files/properties/remove",e,"user","api","rpc","files.metadata.write")},v.filesPropertiesTemplateGet=function(e){return this.request("files/properties/template/get",e,"user","api","rpc","files.metadata.read")},v.filesPropertiesTemplateList=function(){return this.request("files/properties/template/list",null,"user","api","rpc","files.metadata.read")},v.filesPropertiesUpdate=function(e){return this.request("files/properties/update",e,"user","api","rpc","files.metadata.write")},v.filesRestore=function(e){return this.request("files/restore",e,"user","api","rpc","files.content.write")},v.filesSaveUrl=function(e){return this.request("files/save_url",e,"user","api","rpc","files.content.write")},v.filesSaveUrlCheckJobStatus=function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc","files.content.write")},v.filesSearch=function(e){return this.request("files/search",e,"user","api","rpc","files.metadata.read")},v.filesSearchV2=function(e){return this.request("files/search_v2",e,"user","api","rpc","files.metadata.read")},v.filesSearchContinueV2=function(e){return this.request("files/search/continue_v2",e,"user","api","rpc","files.metadata.read")},v.filesTagsAdd=function(e){return this.request("files/tags/add",e,"user","api","rpc","files.metadata.write")},v.filesTagsGet=function(e){return this.request("files/tags/get",e,"user","api","rpc","files.metadata.read")},v.filesTagsRemove=function(e){return this.request("files/tags/remove",e,"user","api","rpc","files.metadata.write")},v.filesUnlockFileBatch=function(e){return this.request("files/unlock_file_batch",e,"user","api","rpc","files.content.write")},v.filesUpload=function(e){return this.request("files/upload",e,"user","content","upload","files.content.write")},v.filesUploadSessionAppendV2=function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload","files.content.write")},v.filesUploadSessionAppend=function(e){return this.request("files/upload_session/append",e,"user","content","upload","files.content.write")},v.filesUploadSessionFinish=function(e){return this.request("files/upload_session/finish",e,"user","content","upload","files.content.write")},v.filesUploadSessionFinishBatch=function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc","files.content.write")},v.filesUploadSessionFinishBatchV2=function(e){return this.request("files/upload_session/finish_batch_v2",e,"user","api","rpc","files.content.write")},v.filesUploadSessionFinishBatchCheck=function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc","files.content.write")},v.filesUploadSessionStart=function(e){return this.request("files/upload_session/start",e,"user","content","upload","files.content.write")},v.filesUploadSessionStartBatch=function(e){return this.request("files/upload_session/start_batch",e,"user","api","rpc","files.content.write")},v.openidUserinfo=function(e){return this.request("openid/userinfo",e,"user","api","rpc","openid")},v.paperDocsArchive=function(e){return this.request("paper/docs/archive",e,"user","api","rpc","files.content.write")},v.paperDocsCreate=function(e){return this.request("paper/docs/create",e,"user","api","upload","files.content.write")},v.paperDocsDownload=function(e){return this.request("paper/docs/download",e,"user","api","download","files.content.read")},v.paperDocsFolderUsersList=function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc","sharing.read")},v.paperDocsFolderUsersListContinue=function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc","sharing.read")},v.paperDocsGetFolderInfo=function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc","sharing.read")},v.paperDocsList=function(e){return this.request("paper/docs/list",e,"user","api","rpc","files.metadata.read")},v.paperDocsListContinue=function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc","files.metadata.read")},v.paperDocsPermanentlyDelete=function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc","files.permanent_delete")},v.paperDocsSharingPolicyGet=function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc","sharing.read")},v.paperDocsSharingPolicySet=function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc","sharing.write")},v.paperDocsUpdate=function(e){return this.request("paper/docs/update",e,"user","api","upload","files.content.write")},v.paperDocsUsersAdd=function(e){return this.request("paper/docs/users/add",e,"user","api","rpc","sharing.write")},v.paperDocsUsersList=function(e){return this.request("paper/docs/users/list",e,"user","api","rpc","sharing.read")},v.paperDocsUsersListContinue=function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc","sharing.read")},v.paperDocsUsersRemove=function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc","sharing.write")},v.paperFoldersCreate=function(e){return this.request("paper/folders/create",e,"user","api","rpc","files.content.write")},v.sharingAddFileMember=function(e){return this.request("sharing/add_file_member",e,"user","api","rpc","sharing.write")},v.sharingAddFolderMember=function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc","sharing.write")},v.sharingCheckJobStatus=function(e){return this.request("sharing/check_job_status",e,"user","api","rpc","sharing.write")},v.sharingCheckRemoveMemberJobStatus=function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc","sharing.write")},v.sharingCheckShareJobStatus=function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc","sharing.write")},v.sharingCreateSharedLink=function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc","sharing.write")},v.sharingCreateSharedLinkWithSettings=function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc","sharing.write")},v.sharingGetFileMetadata=function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc","sharing.read")},v.sharingGetFileMetadataBatch=function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc","sharing.read")},v.sharingGetFolderMetadata=function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc","sharing.read")},v.sharingGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download","sharing.read")},v.sharingGetSharedLinkMetadata=function(e){return this.request("sharing/get_shared_link_metadata",e,"app, user","api","rpc","sharing.read")},v.sharingGetSharedLinks=function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc","sharing.read")},v.sharingListFileMembers=function(e){return this.request("sharing/list_file_members",e,"user","api","rpc","sharing.read")},v.sharingListFileMembersBatch=function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc","sharing.read")},v.sharingListFileMembersContinue=function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc","sharing.read")},v.sharingListFolderMembers=function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc","sharing.read")},v.sharingListFolderMembersContinue=function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc","sharing.read")},v.sharingListFolders=function(e){return this.request("sharing/list_folders",e,"user","api","rpc","sharing.read")},v.sharingListFoldersContinue=function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc","sharing.read")},v.sharingListMountableFolders=function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc","sharing.read")},v.sharingListMountableFoldersContinue=function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc","sharing.read")},v.sharingListReceivedFiles=function(e){return this.request("sharing/list_received_files",e,"user","api","rpc","sharing.read")},v.sharingListReceivedFilesContinue=function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc","sharing.read")},v.sharingListSharedLinks=function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc","sharing.read")},v.sharingModifySharedLinkSettings=function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc","sharing.write")},v.sharingMountFolder=function(e){return this.request("sharing/mount_folder",e,"user","api","rpc","sharing.write")},v.sharingRelinquishFileMembership=function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc","sharing.write")},v.sharingRelinquishFolderMembership=function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc","sharing.write")},v.sharingRemoveFileMember=function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc","sharing.write")},v.sharingRemoveFileMember2=function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc","sharing.write")},v.sharingRemoveFolderMember=function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc","sharing.write")},v.sharingRevokeSharedLink=function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc","sharing.write")},v.sharingSetAccessInheritance=function(e){return this.request("sharing/set_access_inheritance",e,"user","api","rpc","sharing.write")},v.sharingShareFolder=function(e){return this.request("sharing/share_folder",e,"user","api","rpc","sharing.write")},v.sharingTransferFolder=function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc","sharing.write")},v.sharingUnmountFolder=function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc","sharing.write")},v.sharingUnshareFile=function(e){return this.request("sharing/unshare_file",e,"user","api","rpc","sharing.write")},v.sharingUnshareFolder=function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc","sharing.write")},v.sharingUpdateFileMember=function(e){return this.request("sharing/update_file_member",e,"user","api","rpc","sharing.write")},v.sharingUpdateFolderMember=function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc","sharing.write")},v.sharingUpdateFolderPolicy=function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc","sharing.write")},v.teamDevicesListMemberDevices=function(e){return this.request("team/devices/list_member_devices",e,"team","api","rpc","sessions.list")},v.teamDevicesListMembersDevices=function(e){return this.request("team/devices/list_members_devices",e,"team","api","rpc","sessions.list")},v.teamDevicesListTeamDevices=function(e){return this.request("team/devices/list_team_devices",e,"team","api","rpc","sessions.list")},v.teamDevicesRevokeDeviceSession=function(e){return this.request("team/devices/revoke_device_session",e,"team","api","rpc","sessions.modify")},v.teamDevicesRevokeDeviceSessionBatch=function(e){return this.request("team/devices/revoke_device_session_batch",e,"team","api","rpc","sessions.modify")},v.teamFeaturesGetValues=function(e){return this.request("team/features/get_values",e,"team","api","rpc","team_info.read")},v.teamGetInfo=function(){return this.request("team/get_info",null,"team","api","rpc","team_info.read")},v.teamGroupsCreate=function(e){return this.request("team/groups/create",e,"team","api","rpc","groups.write")},v.teamGroupsDelete=function(e){return this.request("team/groups/delete",e,"team","api","rpc","groups.write")},v.teamGroupsGetInfo=function(e){return this.request("team/groups/get_info",e,"team","api","rpc","groups.read")},v.teamGroupsJobStatusGet=function(e){return this.request("team/groups/job_status/get",e,"team","api","rpc","groups.write")},v.teamGroupsList=function(e){return this.request("team/groups/list",e,"team","api","rpc","groups.read")},v.teamGroupsListContinue=function(e){return this.request("team/groups/list/continue",e,"team","api","rpc","groups.read")},v.teamGroupsMembersAdd=function(e){return this.request("team/groups/members/add",e,"team","api","rpc","groups.write")},v.teamGroupsMembersList=function(e){return this.request("team/groups/members/list",e,"team","api","rpc","groups.read")},v.teamGroupsMembersListContinue=function(e){return this.request("team/groups/members/list/continue",e,"team","api","rpc","groups.read")},v.teamGroupsMembersRemove=function(e){return this.request("team/groups/members/remove",e,"team","api","rpc","groups.write")},v.teamGroupsMembersSetAccessType=function(e){return this.request("team/groups/members/set_access_type",e,"team","api","rpc","groups.write")},v.teamGroupsUpdate=function(e){return this.request("team/groups/update",e,"team","api","rpc","groups.write")},v.teamLegalHoldsCreatePolicy=function(e){return this.request("team/legal_holds/create_policy",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsGetPolicy=function(e){return this.request("team/legal_holds/get_policy",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsListHeldRevisions=function(e){return this.request("team/legal_holds/list_held_revisions",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsListHeldRevisionsContinue=function(e){return this.request("team/legal_holds/list_held_revisions_continue",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsListPolicies=function(e){return this.request("team/legal_holds/list_policies",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsReleasePolicy=function(e){return this.request("team/legal_holds/release_policy",e,"team","api","rpc","team_data.governance.write")},v.teamLegalHoldsUpdatePolicy=function(e){return this.request("team/legal_holds/update_policy",e,"team","api","rpc","team_data.governance.write")},v.teamLinkedAppsListMemberLinkedApps=function(e){return this.request("team/linked_apps/list_member_linked_apps",e,"team","api","rpc","sessions.list")},v.teamLinkedAppsListMembersLinkedApps=function(e){return this.request("team/linked_apps/list_members_linked_apps",e,"team","api","rpc","sessions.list")},v.teamLinkedAppsListTeamLinkedApps=function(e){return this.request("team/linked_apps/list_team_linked_apps",e,"team","api","rpc","sessions.list")},v.teamLinkedAppsRevokeLinkedApp=function(e){return this.request("team/linked_apps/revoke_linked_app",e,"team","api","rpc","sessions.modify")},v.teamLinkedAppsRevokeLinkedAppBatch=function(e){return this.request("team/linked_apps/revoke_linked_app_batch",e,"team","api","rpc","sessions.modify")},v.teamMemberSpaceLimitsExcludedUsersAdd=function(e){return this.request("team/member_space_limits/excluded_users/add",e,"team","api","rpc","members.write")},v.teamMemberSpaceLimitsExcludedUsersList=function(e){return this.request("team/member_space_limits/excluded_users/list",e,"team","api","rpc","members.read")},v.teamMemberSpaceLimitsExcludedUsersListContinue=function(e){return this.request("team/member_space_limits/excluded_users/list/continue",e,"team","api","rpc","members.read")},v.teamMemberSpaceLimitsExcludedUsersRemove=function(e){return this.request("team/member_space_limits/excluded_users/remove",e,"team","api","rpc","members.write")},v.teamMemberSpaceLimitsGetCustomQuota=function(e){return this.request("team/member_space_limits/get_custom_quota",e,"team","api","rpc","members.read")},v.teamMemberSpaceLimitsRemoveCustomQuota=function(e){return this.request("team/member_space_limits/remove_custom_quota",e,"team","api","rpc","members.write")},v.teamMemberSpaceLimitsSetCustomQuota=function(e){return this.request("team/member_space_limits/set_custom_quota",e,"team","api","rpc","members.read")},v.teamMembersAddV2=function(e){return this.request("team/members/add_v2",e,"team","api","rpc","members.write")},v.teamMembersAdd=function(e){return this.request("team/members/add",e,"team","api","rpc","members.write")},v.teamMembersAddJobStatusGetV2=function(e){return this.request("team/members/add/job_status/get_v2",e,"team","api","rpc","members.write")},v.teamMembersAddJobStatusGet=function(e){return this.request("team/members/add/job_status/get",e,"team","api","rpc","members.write")},v.teamMembersDeleteProfilePhotoV2=function(e){return this.request("team/members/delete_profile_photo_v2",e,"team","api","rpc","members.write")},v.teamMembersDeleteProfilePhoto=function(e){return this.request("team/members/delete_profile_photo",e,"team","api","rpc","members.write")},v.teamMembersGetAvailableTeamMemberRoles=function(){return this.request("team/members/get_available_team_member_roles",null,"team","api","rpc","members.read")},v.teamMembersGetInfoV2=function(e){return this.request("team/members/get_info_v2",e,"team","api","rpc","members.read")},v.teamMembersGetInfo=function(e){return this.request("team/members/get_info",e,"team","api","rpc","members.read")},v.teamMembersListV2=function(e){return this.request("team/members/list_v2",e,"team","api","rpc","members.read")},v.teamMembersList=function(e){return this.request("team/members/list",e,"team","api","rpc","members.read")},v.teamMembersListContinueV2=function(e){return this.request("team/members/list/continue_v2",e,"team","api","rpc","members.read")},v.teamMembersListContinue=function(e){return this.request("team/members/list/continue",e,"team","api","rpc","members.read")},v.teamMembersMoveFormerMemberFiles=function(e){return this.request("team/members/move_former_member_files",e,"team","api","rpc","members.write")},v.teamMembersMoveFormerMemberFilesJobStatusCheck=function(e){return this.request("team/members/move_former_member_files/job_status/check",e,"team","api","rpc","members.write")},v.teamMembersRecover=function(e){return this.request("team/members/recover",e,"team","api","rpc","members.delete")},v.teamMembersRemove=function(e){return this.request("team/members/remove",e,"team","api","rpc","members.delete")},v.teamMembersRemoveJobStatusGet=function(e){return this.request("team/members/remove/job_status/get",e,"team","api","rpc","members.delete")},v.teamMembersSecondaryEmailsAdd=function(e){return this.request("team/members/secondary_emails/add",e,"team","api","rpc","members.write")},v.teamMembersSecondaryEmailsDelete=function(e){return this.request("team/members/secondary_emails/delete",e,"team","api","rpc","members.write")},v.teamMembersSecondaryEmailsResendVerificationEmails=function(e){return this.request("team/members/secondary_emails/resend_verification_emails",e,"team","api","rpc","members.write")},v.teamMembersSendWelcomeEmail=function(e){return this.request("team/members/send_welcome_email",e,"team","api","rpc","members.write")},v.teamMembersSetAdminPermissionsV2=function(e){return this.request("team/members/set_admin_permissions_v2",e,"team","api","rpc","members.write")},v.teamMembersSetAdminPermissions=function(e){return this.request("team/members/set_admin_permissions",e,"team","api","rpc","members.write")},v.teamMembersSetProfileV2=function(e){return this.request("team/members/set_profile_v2",e,"team","api","rpc","members.write")},v.teamMembersSetProfile=function(e){return this.request("team/members/set_profile",e,"team","api","rpc","members.write")},v.teamMembersSetProfilePhotoV2=function(e){return this.request("team/members/set_profile_photo_v2",e,"team","api","rpc","members.write")},v.teamMembersSetProfilePhoto=function(e){return this.request("team/members/set_profile_photo",e,"team","api","rpc","members.write")},v.teamMembersSuspend=function(e){return this.request("team/members/suspend",e,"team","api","rpc","members.write")},v.teamMembersUnsuspend=function(e){return this.request("team/members/unsuspend",e,"team","api","rpc","members.write")},v.teamNamespacesList=function(e){return this.request("team/namespaces/list",e,"team","api","rpc","team_data.member")},v.teamNamespacesListContinue=function(e){return this.request("team/namespaces/list/continue",e,"team","api","rpc","team_data.member")},v.teamPropertiesTemplateAdd=function(e){return this.request("team/properties/template/add",e,"team","api","rpc","files.team_metadata.write")},v.teamPropertiesTemplateGet=function(e){return this.request("team/properties/template/get",e,"team","api","rpc","files.team_metadata.write")},v.teamPropertiesTemplateList=function(){return this.request("team/properties/template/list",null,"team","api","rpc","files.team_metadata.write")},v.teamPropertiesTemplateUpdate=function(e){return this.request("team/properties/template/update",e,"team","api","rpc","files.team_metadata.write")},v.teamReportsGetActivity=function(e){return this.request("team/reports/get_activity",e,"team","api","rpc","team_info.read")},v.teamReportsGetDevices=function(e){return this.request("team/reports/get_devices",e,"team","api","rpc","team_info.read")},v.teamReportsGetMembership=function(e){return this.request("team/reports/get_membership",e,"team","api","rpc","team_info.read")},v.teamReportsGetStorage=function(e){return this.request("team/reports/get_storage",e,"team","api","rpc","team_info.read")},v.teamSharingAllowlistAdd=function(e){return this.request("team/sharing_allowlist/add",e,"team","api","rpc","team_info.write")},v.teamSharingAllowlistList=function(e){return this.request("team/sharing_allowlist/list",e,"team","api","rpc","team_info.read")},v.teamSharingAllowlistListContinue=function(e){return this.request("team/sharing_allowlist/list/continue",e,"team","api","rpc","team_info.read")},v.teamSharingAllowlistRemove=function(e){return this.request("team/sharing_allowlist/remove",e,"team","api","rpc","team_info.write")},v.teamTeamFolderActivate=function(e){return this.request("team/team_folder/activate",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderArchive=function(e){return this.request("team/team_folder/archive",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderArchiveCheck=function(e){return this.request("team/team_folder/archive/check",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderCreate=function(e){return this.request("team/team_folder/create",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderGetInfo=function(e){return this.request("team/team_folder/get_info",e,"team","api","rpc","team_data.content.read")},v.teamTeamFolderList=function(e){return this.request("team/team_folder/list",e,"team","api","rpc","team_data.content.read")},v.teamTeamFolderListContinue=function(e){return this.request("team/team_folder/list/continue",e,"team","api","rpc","team_data.content.read")},v.teamTeamFolderPermanentlyDelete=function(e){return this.request("team/team_folder/permanently_delete",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderRename=function(e){return this.request("team/team_folder/rename",e,"team","api","rpc","team_data.content.write")},v.teamTeamFolderUpdateSyncSettings=function(e){return this.request("team/team_folder/update_sync_settings",e,"team","api","rpc","team_data.content.write")},v.teamTokenGetAuthenticatedAdmin=function(){return this.request("team/token/get_authenticated_admin",null,"team","api","rpc","team_info.read")},v.teamLogGetEvents=function(e){return this.request("team_log/get_events",e,"team","api","rpc","events.read")},v.teamLogGetEventsContinue=function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc","events.read")},v.usersFeaturesGetValues=function(e){return this.request("users/features/get_values",e,"user","api","rpc","account_info.read")},v.usersGetAccount=function(e){return this.request("users/get_account",e,"user","api","rpc","sharing.read")},v.usersGetAccountBatch=function(e){return this.request("users/get_account_batch",e,"user","api","rpc","sharing.read")},v.usersGetCurrentAccount=function(){return this.request("users/get_current_account",null,"user","api","rpc","account_info.read")},v.usersGetSpaceUsage=function(){return this.request("users/get_space_usage",null,"user","api","rpc","account_info.read")};var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";return r?(t!==m&&void 0!==y[e]&&(e=y[e],r="-"),"https://".concat(e).concat(r).concat(t,"/2/")):"https://".concat(t,"/2/")},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;return e!==g&&(e="meta-".concat(e)),"https://".concat(e,"/oauth2/authorize")},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",r="api";return e!==m&&(r=y[r],t="-"),"https://".concat(r).concat(t).concat(e,"/oauth2/token")};function S(e){return JSON.stringify(e).replace(/[\u007f-\uffff]/g,b)}function k(e){return new Date(Date.now()+1e3*e)}function E(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope||"undefined"!=typeof window}function T(){return"undefined"!=typeof window}function B(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}function C(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var I,A,F,M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(o,e);var r,i,n=(r=o,i=l(),function(){var e,t=s(r);if(i){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function o(e,r,i){var s;return t(this,o),(s=n.call(this,"Response failed with a ".concat(e," code"))).name="DropboxResponseError",s.status=e,s.headers=r,s.error=i,s}return o}(c(Error)),D=function e(r,i,n){t(this,e),this.status=r,this.headers=i,this.result=n};function R(e){return e.text().then((function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}throw new M(e.status,e.headers,r)}))}function P(e){return e.ok?e.text().then((function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}return new D(e.status,e.headers,r)})):R(e)}var O=["legacy","offline","online"],z=["code","token"],N=["none","user","team"],q=function(){function e(i){t(this,e),i=i||{},T()?(I=window.fetch.bind(window),A=window.crypto||window.msCrypto):B()?(I=self.fetch.bind(self),A=self.crypto):(I=r(43092),A=r(91565)),F="undefined"==typeof TextEncoder?r(40537).TextEncoder:TextEncoder,this.fetch=i.fetch||I,this.accessToken=i.accessToken,this.accessTokenExpiresAt=i.accessTokenExpiresAt,this.refreshToken=i.refreshToken,this.clientId=i.clientId,this.clientSecret=i.clientSecret,this.domain=i.domain,this.domainDelimiter=i.domainDelimiter,this.customHeaders=i.customHeaders,this.dataOnBody=i.dataOnBody}return o(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"getAccessToken",value:function(){return this.accessToken}},{key:"setClientId",value:function(e){this.clientId=e}},{key:"getClientId",value:function(){return this.clientId}},{key:"setClientSecret",value:function(e){this.clientSecret=e}},{key:"getClientSecret",value:function(){return this.clientSecret}},{key:"getRefreshToken",value:function(){return this.refreshToken}},{key:"setRefreshToken",value:function(e){this.refreshToken=e}},{key:"getAccessTokenExpiresAt",value:function(){return this.accessTokenExpiresAt}},{key:"setAccessTokenExpiresAt",value:function(e){this.accessTokenExpiresAt=e}},{key:"setCodeVerifier",value:function(e){this.codeVerifier=e}},{key:"getCodeVerifier",value:function(){return this.codeVerifier}},{key:"generateCodeChallenge",value:function(){var e,t=this,r=(new F).encode(this.codeVerifier);if(T()||B())return A.subtle.digest("SHA-256",r).then((function(r){var i=btoa(String.fromCharCode.apply(null,new Uint8Array(r)));e=C(i).substr(0,128),t.codeChallenge=e}));var i=A.createHash("sha256").update(r).digest();return e=C(i),this.codeChallenge=e,Promise.resolve()}},{key:"generatePKCECodes",value:function(){var e;if(T()||B()){var t=new Uint8Array(128),r=A.getRandomValues(t);e=C(btoa(r)).substr(0,128)}else e=C(A.randomBytes(128)).substr(0,128);return this.codeVerifier=e,this.generateCodeChallenge()}},{key:"getAuthenticationUrl",value:function(e,t){var r,i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"token",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none",l=arguments.length>6&&void 0!==arguments[6]&&arguments[6],d=this.getClientId(),c=_(this.domain);if(!d)throw Error("A client id is required. You can set the client id using .setClientId().");if("code"!==n&&!e)throw Error("A redirect uri is required.");if(!z.includes(n))throw Error("Authorization type must be code or token");if(o&&!O.includes(o))throw Error("Token Access Type must be legacy, offline, or online");if(s&&!(s instanceof Array))throw Error("Scope must be an array of strings");if(!N.includes(a))throw Error("includeGrantedScopes must be none, user, or team");return r="code"===n?"".concat(c,"?response_type=code&client_id=").concat(d):"".concat(c,"?response_type=token&client_id=").concat(d),e&&(r+="&redirect_uri=".concat(e)),t&&(r+="&state=".concat(t)),o&&(r+="&token_access_type=".concat(o)),s&&(r+="&scope=".concat(s.join(" "))),"none"!==a&&(r+="&include_granted_scopes=".concat(a)),l?this.generatePKCECodes().then((function(){return r+="&code_challenge_method=S256",r+="&code_challenge=".concat(i.codeChallenge)})):Promise.resolve(r)}},{key:"getAccessTokenFromCode",value:function(e,t){var r=this.getClientId(),i=this.getClientSecret();if(!r)throw Error("A client id is required. You can set the client id using .setClientId().");var n=x(this.domain,this.domainDelimiter);if(n+="?grant_type=authorization_code",n+="&code=".concat(t),n+="&client_id=".concat(r),i)n+="&client_secret=".concat(i);else{if(!this.codeVerifier)throw Error("You must use PKCE when generating the authorization URL to not include a client secret");n+="&code_verifier=".concat(this.codeVerifier)}return e&&(n+="&redirect_uri=".concat(e)),this.fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((function(e){return P(e)}))}},{key:"checkAndRefreshAccessToken",value:function(){var e=this.getRefreshToken()&&this.getClientId(),t=!this.getAccessTokenExpiresAt()||new Date(Date.now()+3e5)>=this.getAccessTokenExpiresAt(),r=!this.getAccessToken();return(t||r)&&e?this.refreshAccessToken():Promise.resolve()}},{key:"refreshAccessToken",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=this.getClientId(),i=this.getClientSecret();if(!r)throw Error("A client id is required. You can set the client id using .setClientId().");if(t&&!(t instanceof Array))throw Error("Scope must be an array of strings");var n=x(this.domain,this.domainDelimiter),o={headers:{"Content-Type":"application/json"},method:"POST"};if(this.dataOnBody){var s={grant_type:"refresh_token",client_id:r,refresh_token:this.getRefreshToken()};i&&(s.client_secret=i),t&&(s.scope=t.join(" ")),o.body=s}else n+="?grant_type=refresh_token&refresh_token=".concat(this.getRefreshToken()),n+="&client_id=".concat(r),i&&(n+="&client_secret=".concat(i)),t&&(n+="&scope=".concat(t.join(" ")));return this.fetch(n,o).then((function(e){return P(e)})).then((function(t){e.setAccessToken(t.result.access_token),e.setAccessTokenExpiresAt(k(t.result.expires_in))}))}}]),e}(),U="undefined"==typeof btoa?function(e){return i.from(e).toString("base64")}:btoa;e.Dropbox=function(){function e(r){t(this,e),this.auth=(r=r||{}).auth?r.auth:new q(r),this.fetch=r.fetch||this.auth.fetch,this.selectUser=r.selectUser,this.selectAdmin=r.selectAdmin,this.pathRoot=r.pathRoot,this.domain=r.domain||this.auth.domain,this.domainDelimiter=r.domainDelimiter||this.auth.domainDelimiter,this.customHeaders=r.customHeaders||this.auth.customHeaders,Object.assign(this,v)}return o(e,[{key:"request",value:function(e,t,r,i,n){switch(n){case"rpc":return this.rpcRequest(e,t,r,i);case"download":return this.downloadRequest(e,t,r,i);case"upload":return this.uploadRequest(e,t,r,i);default:throw Error("Invalid request style: ".concat(n))}}},{key:"rpcRequest",value:function(e,t,r,i){var n=this;return this.auth.checkAndRefreshAccessToken().then((function(){var e={method:"POST",body:t?JSON.stringify(t):null,headers:{}};return t&&(e.headers["Content-Type"]="application/json"),n.setAuthHeaders(r,e),n.setCommonHeaders(e),e})).then((function(t){return n.fetch(w(i,n.domain,n.domainDelimiter)+e,t)})).then((function(e){return P(e)}))}},{key:"downloadRequest",value:function(e,t,r,i){var n=this;return this.auth.checkAndRefreshAccessToken().then((function(){var e={method:"POST",headers:{"Dropbox-API-Arg":S(t)}};return n.setAuthHeaders(r,e),n.setCommonHeaders(e),e})).then((function(t){return n.fetch(w(i,n.domain,n.domainDelimiter)+e,t)})).then((function(e){return function(e){return e.ok?new Promise((function(t){E()?e.blob().then((function(e){return t(e)})):e.buffer().then((function(e){return t(e)}))})).then((function(t){var r=JSON.parse(e.headers.get("dropbox-api-result"));return E()?r.fileBlob=t:r.fileBinary=t,new D(e.status,e.headers,r)})):R(e)}(e)}))}},{key:"uploadRequest",value:function(e,t,r,i){var n=this;return this.auth.checkAndRefreshAccessToken().then((function(){var e=t.contents;delete t.contents;var i={body:e,method:"POST",headers:{"Content-Type":"application/octet-stream","Dropbox-API-Arg":S(t)}};return n.setAuthHeaders(r,i),n.setCommonHeaders(i),i})).then((function(t){return n.fetch(w(i,n.domain,n.domainDelimiter)+e,t)})).then((function(e){return P(e)}))}},{key:"setAuthHeaders",value:function(e,t){if(e.split(",").length>1){var r=e.replace(" ","").split(",");r.includes(h)&&this.auth.getAccessToken()?e=h:r.includes(f)&&this.auth.getAccessToken()?e=f:r.includes(p)&&(e=p)}switch(e){case p:if(this.auth.clientId&&this.auth.clientSecret){var i=U("".concat(this.auth.clientId,":").concat(this.auth.clientSecret));t.headers.Authorization="Basic ".concat(i)}break;case f:case h:this.auth.getAccessToken()&&(t.headers.Authorization="Bearer ".concat(this.auth.getAccessToken()));break;case"noauth":case"cookie":break;default:throw Error("Unhandled auth type: ".concat(e))}}},{key:"setCommonHeaders",value:function(e){var t=this;this.selectUser&&(e.headers["Dropbox-API-Select-User"]=this.selectUser),this.selectAdmin&&(e.headers["Dropbox-API-Select-Admin"]=this.selectAdmin),this.pathRoot&&(e.headers["Dropbox-API-Path-Root"]=this.pathRoot),this.customHeaders&&Object.keys(this.customHeaders).forEach((function(r){e.headers[r]=t.customHeaders[r]}))}}]),e}(),e.DropboxAuth=q,e.DropboxResponse=D,e.DropboxResponseError=M,Object.defineProperty(e,"__esModule",{value:!0})}(t)},22010:(e,t,r)=>{"use strict";var i=r(92861).Buffer,n=r(3527),o=128;function s(e){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function a(e,t,r){for(var i=0;t+i<r&&0===e[t+i];)++i;return e[t+i]>=o&&--i,i}e.exports={derToJose:function(e,t){e=s(e);var r=n(t),o=r+1,a=e.length,l=0;if(48!==e[l++])throw new Error('Could not find expected "seq"');var d=e[l++];if(129===d&&(d=e[l++]),a-l<d)throw new Error('"seq" specified length of "'+d+'", only "'+(a-l)+'" remaining');if(2!==e[l++])throw new Error('Could not find expected "int" for "r"');var c=e[l++];if(a-l-2<c)throw new Error('"r" specified length of "'+c+'", only "'+(a-l-2)+'" available');if(o<c)throw new Error('"r" specified length of "'+c+'", max of "'+o+'" is acceptable');var u=l;if(l+=c,2!==e[l++])throw new Error('Could not find expected "int" for "s"');var p=e[l++];if(a-l!==p)throw new Error('"s" specified length of "'+p+'", expected "'+(a-l)+'"');if(o<p)throw new Error('"s" specified length of "'+p+'", max of "'+o+'" is acceptable');var h=l;if((l+=p)!==a)throw new Error('Expected to consume entire buffer, but "'+(a-l)+'" bytes remain');var f=r-c,m=r-p,g=i.allocUnsafe(f+c+m+p);for(l=0;l<f;++l)g[l]=0;e.copy(g,l,u+Math.max(-f,0),u+c);for(var y=l=r;l<y+m;++l)g[l]=0;return e.copy(g,l,h+Math.max(-m,0),h+p),g=(g=g.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=s(e);var r=n(t),l=e.length;if(l!==2*r)throw new TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+l+'"');var d=a(e,0,r),c=a(e,r,e.length),u=r-d,p=r-c,h=2+u+1+1+p,f=h<o,m=i.allocUnsafe((f?2:3)+h),g=0;return m[g++]=48,f?m[g++]=h:(m[g++]=129,m[g++]=255&h),m[g++]=2,m[g++]=u,d<0?(m[g++]=0,g+=e.copy(m,g,0,r)):g+=e.copy(m,g,d,r),m[g++]=2,m[g++]=p,c<0?(m[g++]=0,e.copy(m,g,r)):e.copy(m,g,r+c),m}}},3527:e=>{"use strict";function t(e){return(e/8|0)+(e%8==0?0:1)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};e.exports=function(e){var t=r[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}},86729:(e,t,r)=>{"use strict";var i=t;i.version=r(1636).rE,i.utils=r(47011),i.rand=r(15037),i.curve=r(894),i.curves=r(60480),i.ec=r(57447),i.eddsa=r(8650)},36677:(e,t,r)=>{"use strict";var i=r(28490),n=r(47011),o=n.getNAF,s=n.getJSF,a=n.assert;function l(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function d(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),i=o(t,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;var s,l,d=[];for(s=0;s<i.length;s+=r.step){l=0;for(var c=s+r.step-1;c>=s;c--)l=(l<<1)+i[c];d.push(l)}for(var u=this.jpoint(null,null,null),p=this.jpoint(null,null,null),h=n;h>0;h--){for(s=0;s<d.length;s++)(l=d[s])===h?p=p.mixedAdd(r.points[s]):l===-h&&(p=p.mixedAdd(r.points[s].neg()));u=u.add(p)}return u.toP()},l.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,s=o(t,r,this._bitLength),l=this.jpoint(null,null,null),d=s.length-1;d>=0;d--){for(var c=0;d>=0&&0===s[d];d--)c++;if(d>=0&&c++,l=l.dblp(c),d<0)break;var u=s[d];a(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,i,n){var a,l,d,c=this._wnafT1,u=this._wnafT2,p=this._wnafT3,h=0;for(a=0;a<i;a++){var f=(d=t[a])._getNAFPoints(e);c[a]=f.wnd,u[a]=f.points}for(a=i-1;a>=1;a-=2){var m=a-1,g=a;if(1===c[m]&&1===c[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[m],r[g]);for(h=Math.max(b[0].length,h),p[m]=new Array(h),p[g]=new Array(h),l=0;l<h;l++){var w=0|b[0][l],_=0|b[1][l];p[m][l]=v[3*(w+1)+(_+1)],p[g][l]=0,u[m]=y}}else p[m]=o(r[m],c[m],this._bitLength),p[g]=o(r[g],c[g],this._bitLength),h=Math.max(p[m].length,h),h=Math.max(p[g].length,h)}var x=this.jpoint(null,null,null),S=this._wnafT4;for(a=h;a>=0;a--){for(var k=0;a>=0;){var E=!0;for(l=0;l<i;l++)S[l]=0|p[l][a],0!==S[l]&&(E=!1);if(!E)break;k++,a--}if(a>=0&&k++,x=x.dblp(k),a<0)break;for(l=0;l<i;l++){var T=S[l];0!==T&&(T>0?d=u[l][T-1>>1]:T<0&&(d=u[l][-T-1>>1].neg()),x="affine"===d.type?x.mixedAdd(d):x.add(d))}}for(a=0;a<i;a++)u[a]=null;return n?x:x.toP()},l.BasePoint=d,d.prototype.eq=function(){throw new Error("Not implemented")},d.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},d.prototype.encodeCompressed=function(e){return this.encode(e,!0)},d.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},d.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},d.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},d.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},d.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},d.prototype._getBeta=function(){return null},d.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},31298:(e,t,r)=>{"use strict";var i=r(47011),n=r(28490),o=r(56698),s=r(36677),a=i.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function d(e,t,r,i,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=o&&new n(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(l,s),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},o(d,s.BasePoint),l.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)},l.prototype.point=function(e,t,r,i){return new d(this,e,t,r,i)},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),s=o.redSub(r),a=i.redSub(t),l=n.redMul(s),d=o.redMul(a),c=n.redMul(a),u=s.redMul(o);return this.curve.point(l,d,u,c)},d.prototype._projDbl=function(){var e,t,r,i,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var d=(i=this.curve._mulA(a)).redAdd(l);this.zOne?(e=s.redSub(a).redSub(l).redMul(d.redSub(this.curve.two)),t=d.redMul(i.redSub(l)),r=d.redSqr().redSub(d).redSub(d)):(n=this.z.redSqr(),o=d.redSub(n).redISub(n),e=s.redSub(a).redISub(l).redMul(o),t=d.redMul(i.redSub(l)),r=d.redMul(o))}else i=a.redAdd(l),n=this.curve._mulC(this.z).redSqr(),o=i.redSub(n).redSub(n),e=this.curve._mulC(s.redISub(i)).redMul(o),t=this.curve._mulC(i).redMul(a.redISub(l)),r=i.redMul(o);return this.curve.point(e,t,r)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=n.redSub(i),a=n.redAdd(i),l=r.redAdd(t),d=o.redMul(s),c=a.redMul(l),u=o.redMul(l),p=s.redMul(a);return this.curve.point(d,c,p,u)},d.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),l=n.redSub(a),d=n.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),u=i.redMul(l).redMul(c);return this.curve.twisted?(t=i.redMul(d).redMul(s.redSub(this.curve._mulA(o))),r=l.redMul(d)):(t=i.redMul(d).redMul(s.redSub(o)),r=this.curve._mulC(l).redMul(d)),this.curve.point(u,t,r)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},d.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},894:(e,t,r)=>{"use strict";var i=t;i.base=r(36677),i.short=r(39188),i.mont=r(30370),i.edwards=r(31298)},30370:(e,t,r)=>{"use strict";var i=r(28490),n=r(56698),o=r(36677),s=r(47011);function a(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},n(l,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=n.redMul(i),a=t.z.redMul(o.redAdd(s).redSqr()),l=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},39188:(e,t,r)=>{"use strict";var i=r(47011),n=r(28490),o=r(56698),s=r(36677),a=i.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(e,t,r,i){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,i){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(r,16),this.z=new n(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,s),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new n(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(r)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),r=new n(2).toRed(t).redInvm(),i=r.redNeg(),o=new n(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,i,o,s,a,l,d,c,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,h=this.n.clone(),f=new n(1),m=new n(0),g=new n(0),y=new n(1),v=0;0!==p.cmpn(0);){var b=h.div(p);d=h.sub(b.mul(p)),c=g.sub(b.mul(f));var w=y.sub(b.mul(m));if(!i&&d.cmp(u)<0)t=l.neg(),r=f,i=d.neg(),o=c;else if(i&&2==++v)break;l=d,h=p,p=d,g=f,f=c,y=m,m=w}s=d.neg(),a=c;var _=i.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),i.negative&&(i=i.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:i,b:o},{a:s,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=n.mul(r.a),a=o.mul(i.a),l=n.mul(r.b),d=o.mul(i.b);return{k1:e.sub(s).sub(a),k2:l.add(d).neg()}},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),i[2*o]=a,i[2*o+1]=l,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var d=this._wnafMulAdd(1,i,n,2*o,r),c=0;c<2*o;c++)i[c]=null,n[c]=null;return d},o(d,s.BasePoint),l.prototype.point=function(e,t,r){return new d(this,e,t,r)},l.prototype.pointFromJSON=function(e,t){return d.fromJSON(this,e,t)},d.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},d.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},d.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},d.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),l.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=i.redSub(n),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=a.redSqr(),c=d.redMul(a),u=i.redMul(d),p=l.redSqr().redIAdd(c).redISub(u).redISub(u),h=l.redMul(u.redISub(p)).redISub(o.redMul(c)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(p,h,f)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(i),a=n.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),d=l.redMul(s),c=r.redMul(l),u=a.redSqr().redIAdd(d).redISub(c).redISub(c),p=a.redMul(c.redISub(u)).redISub(n.redMul(d)),h=this.z.redMul(s);return this.curve.jpoint(u,p,h)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),d=s.redAdd(s);for(t=0;t<e;t++){var c=o.redSqr(),u=d.redSqr(),p=u.redSqr(),h=c.redAdd(c).redIAdd(c).redIAdd(i.redMul(l)),f=o.redMul(u),m=h.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),y=h.redMul(g);y=y.redIAdd(y).redISub(p);var v=d.redMul(a);t+1<e&&(l=l.redMul(p)),o=m,a=v,d=y}return this.curve.jpoint(o,d.redMul(n),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var a=i.redAdd(i).redIAdd(i),l=a.redSqr().redISub(s).redISub(s),d=o.redIAdd(o);d=(d=d.redIAdd(d)).redIAdd(d),e=l,t=a.redMul(s.redISub(l)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),u=this.y.redSqr(),p=u.redSqr(),h=this.x.redAdd(u).redSqr().redISub(c).redISub(p);h=h.redIAdd(h);var f=c.redAdd(c).redIAdd(c),m=f.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=f.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},c.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var a=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var d=o.redIAdd(o);d=(d=d.redIAdd(d)).redIAdd(d),t=a.redMul(s.redISub(l)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),u=this.y.redSqr(),p=this.x.redMul(u),h=this.x.redSub(c).redMul(this.x.redAdd(c));h=h.redAdd(h).redIAdd(h);var f=p.redIAdd(p),m=(f=f.redIAdd(f)).redAdd(f);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(u).redISub(c);var g=u.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},c.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),l=t.redAdd(t),d=(l=l.redIAdd(l)).redMul(s),c=a.redSqr().redISub(d.redAdd(d)),u=d.redISub(c),p=s.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=a.redMul(u).redISub(p),f=r.redAdd(r).redMul(i);return this.curve.jpoint(c,h,f)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(i),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),l=i.redIAdd(i);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=n.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(l),c=t.redMul(d);c=(c=c.redIAdd(c)).redIAdd(c);var u=this.x.redMul(a).redISub(c);u=(u=u.redIAdd(u)).redIAdd(u);var p=this.y.redMul(d.redMul(l.redISub(d)).redISub(s.redMul(a)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(u,p,h)},c.prototype.mul=function(e,t){return e=new n(e,t),this.curve._wnafMul(this,e)},c.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},c.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},60480:(e,t,r)=>{"use strict";var i,n=t,o=r(77952),s=r(894),a=r(47011).assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=l,d("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),d("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),d("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(74011)}catch(e){i=void 0}d("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},57447:(e,t,r)=>{"use strict";var i=r(28490),n=r(32723),o=r(47011),s=r(60480),a=r(15037),l=o.assert,d=r(61200),c=r(28545);function u(e){if(!(this instanceof u))return new u(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=u,u.prototype.keyPair=function(e){return new d(this,e)},u.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),l=e.toArray("be",s),d=new n({hash:this.hash,entropy:a,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),u=this.n.sub(new i(1)),p=0;;p++){var h=o.k?o.k(p):new i(d.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(u)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var m=f.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(f.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new c({r:g,s:y,recoveryParam:v})}}}}}},u.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new c(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,l=s.invm(this.n),d=l.mul(e).umod(this.n),u=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(d,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(d,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},u.prototype.recoverPubKey=function(e,t,r,n){l((3&r)===r,"The recovery param is more than two bits"),t=new c(t,n);var o=this.n,s=new i(e),a=t.r,d=t.s,u=1&r,p=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");a=p?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var h=t.r.invm(o),f=o.sub(s).mul(h).umod(o),m=d.mul(h).umod(o);return this.g.mulAdd(f,a,m)},u.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new c(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch(e){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},61200:(e,t,r)=>{"use strict";var i=r(28490),n=r(47011).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},28545:(e,t,r)=>{"use strict";var i=r(28490),n=r(47011),o=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;if(0===e[t.place])return!1;for(var n=0,o=0,s=t.place;o<i;o++,s++)n<<=8,n|=e[s],n>>>=0;return!(n<=127)&&(t.place=s,n)}function d(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=l(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=l(e,r);if(!1===s)return!1;if(128&e[r.place])return!1;var d=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var c=l(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;if(128&e[r.place])return!1;var u=e.slice(r.place,c+r.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new i(d),this.s=new i(u),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=d(t),r=d(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];c(i,t.length),(i=i.concat(t)).push(2),c(i,r.length);var o=i.concat(r),s=[48];return c(s,o.length),s=s.concat(o),n.encode(s,e)}},8650:(e,t,r)=>{"use strict";var i=r(77952),n=r(60480),o=r(47011),s=o.assert,a=o.parseBytes,l=r(46661),d=r(90220);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),o=this.encodePoint(n),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),l=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:o})},c.prototype.verify=function(e,t,r){if(e=a(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof d?e:new d(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return o.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},46661:(e,t,r)=>{"use strict";var i=r(47011),n=i.assert,o=i.parseBytes,s=i.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},a.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=a},90220:(e,t,r)=>{"use strict";var i=r(28490),n=r(47011),o=n.assert,s=n.cachedProperty,a=n.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(o(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},74011:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},47011:(e,t,r)=>{"use strict";var i=t,n=r(28490),o=r(43349),s=r(64367);i.assert=o,i.toArray=s.toArray,i.zero2=s.zero2,i.toHex=s.toHex,i.encode=s.encode,i.getNAF=function(e,t,r){var i,n=new Array(Math.max(e.bitLength(),r)+1);for(i=0;i<n.length;i+=1)n[i]=0;var o=1<<t+1,s=e.clone();for(i=0;i<n.length;i++){var a,l=s.andln(o-1);s.isOdd()?(a=l>(o>>1)-1?(o>>1)-l:l,s.isubn(a)):a=0,n[i]=a,s.iushrn(1)}return n},i.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i,n=0,o=0;e.cmpn(-n)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+n&3,d=t.andln(3)+o&3;3===l&&(l=-1),3===d&&(d=-1),s=1&l?3!==(i=e.andln(7)+n&7)&&5!==i||2!==d?l:-l:0,r[0].push(s),a=1&d?3!==(i=t.andln(7)+o&7)&&5!==i||2!==l?d:-d:0,r[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},i.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new n(e,"hex","le")}},28490:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(79368).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},30655:(e,t,r)=>{"use strict";var i=r(70453)("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch(e){i=!1}e.exports=i},41237:e=>{"use strict";e.exports=EvalError},69383:e=>{"use strict";e.exports=Error},79290:e=>{"use strict";e.exports=RangeError},79538:e=>{"use strict";e.exports=ReferenceError},58068:e=>{"use strict";e.exports=SyntaxError},69675:e=>{"use strict";e.exports=TypeError},35345:e=>{"use strict";e.exports=URIError},30228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function i(){}function n(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,i,n=[];if(0===this._eventsCount)return n;for(i in e=this._events)t.call(e,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},a.prototype.listeners=function(e){var t=r?r+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n<o;n++)s[n]=i[n].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,n,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,d,c=this._events[a],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,n),!0;case 5:return c.fn.call(c.context,t,i,n,o),!0;case 6:return c.fn.call(c.context,t,i,n,o,s),!0}for(d=1,l=new Array(u-1);d<u;d++)l[d-1]=arguments[d];c.fn.apply(c.context,l)}else{var p,h=c.length;for(d=0;d<h;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,i);break;case 4:c[d].fn.call(c[d].context,t,i,n);break;default:if(!l)for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];c[d].fn.apply(c[d].context,l)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,i,n){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||n&&!a.once||i&&a.context!==i||s(this,o);else{for(var l=0,d=[],c=a.length;l<c;l++)(a[l].fn!==t||n&&!a[l].once||i&&a[l].context!==i)&&d.push(a[l]);d.length?this._events[o]=1===d.length?d[0]:d:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},37007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,i){function n(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,r)}(e,n,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,r,i){var n,o,s,d;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=l(e))>0&&s.length>n&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=c.bind(i);return n.listener=r,i.wrapFn=n,n}function p(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):f(n,n.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function m(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(o){i.once&&e.removeEventListener(t,n),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var d=l.length,c=f(l,d);for(r=0;r<d;++r)i(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,i,n,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},68078:(e,t,r)=>{var i=r(92861).Buffer,n=r(88276);e.exports=function(e,t,r,o){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=i.alloc(s),l=i.alloc(o||0),d=i.alloc(0);s>0||o>0;){var c=new n;c.update(d),c.update(e),t&&c.update(t),d=c.digest();var u=0;if(s>0){var p=a.length-s;u=Math.min(s,d.length),d.copy(a,p,0,u),s-=u}if(u<d.length&&o>0){var h=l.length-o,f=Math.min(o,d.length-u);d.copy(l,h,u,u+f),o-=f}}return d.fill(0),{key:a,iv:l}}},78463:e=>{e.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var t="[...]",r="[Circular]",i=[],n=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),l(e,"",0,[],void 0,0,s);try{a=0===n.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),i.push([o,r,t,s])):n.push([t,r,e]):(o[r]=e,i.push([o,r,t]))}function l(e,i,n,o,s,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<o.length;u++)if(o[u]===e)return void a(r,e,i,s);if(void 0!==c.depthLimit&&d>c.depthLimit)return void a(t,e,i,s);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void a(t,e,i,s);if(o.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,o,e,d,c);else{var p=Object.keys(e);for(u=0;u<p.length;u++){var h=p[u];l(e[h],h,u,o,e,d,c)}}o.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,r,s){void 0===s&&(s=o());var a,l=u(e,"",0,[],void 0,0,s)||e;try{a=0===n.length?JSON.stringify(l,t,r):JSON.stringify(l,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function u(e,n,o,s,l,c,p){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<s.length;h++)if(s[h]===e)return void a(r,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==p.depthLimit&&c>p.depthLimit)return void a(t,e,n,l);if(void 0!==p.edgesLimit&&o+1>p.edgesLimit)return void a(t,e,n,l);if(s.push(e),Array.isArray(e))for(h=0;h<e.length;h++)u(e[h],h,h,s,e,c,p);else{var f={},m=Object.keys(e).sort(d);for(h=0;h<m.length;h++){var g=m[h];u(e[g],g,h,s,e,c,p),f[g]=e[g]}if(void 0===l)return f;i.push([l,n,e]),l[n]=f}s.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(n.length>0)for(var i=0;i<n.length;i++){var o=n[i];if(o[1]===t&&o[0]===r){r=o[2],n.splice(i,1);break}}return e.call(this,t,r)}}},86454:(e,t,r)=>{"use strict";const i=r(43918),n=r(32923),o=r(8904);e.exports={XMLParser:n,XMLValidator:i,XMLBuilder:o}},35334:(e,t)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"]["+(r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+i+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const i=Object.keys(t),n=i.length;for(let o=0;o<n;o++)e[i[o]]="strict"===r?[t[i[o]]]:t[i[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){const t=n.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const r=[];let i=t.exec(e);for(;i;){const n=[];n.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e<o;e++)n.push(i[e]);r.push(n),i=t.exec(e)}return r},t.nameRegexp=i},43918:(e,t,r)=>{"use strict";const i=r(35334),n={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function s(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(r,t-r);if(t>5&&"xml"===i)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},n,t);const r=[];let l=!1,d=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let n=0;n<e.length;n++)if("<"===e[n]&&"?"===e[n+1]){if(n+=2,n=s(e,n),n.err)return n}else{if("<"!==e[n]){if(o(e[n]))continue;return f("InvalidChar","char '"+e[n]+"' is not expected.",g(e,n))}{let m=n;if(n++,"!"===e[n]){n=a(e,n);continue}{let y=!1;"/"===e[n]&&(y=!0,n++);let v="";for(;n<e.length&&">"!==e[n]&&" "!==e[n]&&"\t"!==e[n]&&"\n"!==e[n]&&"\r"!==e[n];n++)v+=e[n];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),n--),u=v,!i.isName(u)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",f("InvalidTag",t,g(e,n))}const b=c(e,n);if(!1===b)return f("InvalidAttr","Attributes for '"+v+"' have open quote.",g(e,n));let w=b.value;if(n=b.index,"/"===w[w.length-1]){const r=n-w.length;w=w.substring(0,w.length-1);const i=p(w,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,r+i.err.line));l=!0}else if(y){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",g(e,n));if(w.trim().length>0)return f("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",g(e,m));if(0===r.length)return f("InvalidTag","Closing tag '"+v+"' has not been opened.",g(e,m));{const t=r.pop();if(v!==t.tagName){let r=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+v+"'.",g(e,m))}0==r.length&&(d=!0)}}else{const i=p(w,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,n-w.length+i.err.line));if(!0===d)return f("InvalidXml","Multiple possible root nodes found.",g(e,n));-1!==t.unpairedTags.indexOf(v)||r.push({tagName:v,tagStartPos:m}),l=!0}for(n++;n<e.length;n++)if("<"===e[n]){if("!"===e[n+1]){n++,n=a(e,n);continue}if("?"!==e[n+1])break;if(n=s(e,++n),n.err)return n}else if("&"===e[n]){const t=h(e,n);if(-1==t)return f("InvalidChar","char '&' is not expected.",g(e,n));n=t}else if(!0===d&&!o(e[n]))return f("InvalidXml","Extra text at the end",g(e,n));"<"===e[n]&&n--}}}var u;return l?1==r.length?f("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(e,r[0].tagStartPos)):!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const l='"',d="'";function c(e,t){let r="",i="",n=!1;for(;t<e.length;t++){if(e[t]===l||e[t]===d)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){n=!0;break}r+=e[t]}return""===i&&{value:r,index:t,tagClosed:n}}const u=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=i.getAllMatches(e,u),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return f("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",y(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return f("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",y(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",y(r[e]));const i=r[e][2];if(!m(i))return f("InvalidAttr","Attribute '"+i+"' is an invalid name.",y(r[e]));if(n.hasOwnProperty(i))return f("InvalidAttr","Attribute '"+i+"' is repeated.",y(r[e]));n[i]=1}return!0}function h(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function m(e){return i.isName(e)}function g(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function y(e){return e.startIndex+e[1].length}},8904:(e,t,r)=>{"use strict";const i=r(12788),n={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function o(e){this.options=Object.assign({},n,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=s,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,r){const i=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}o.prototype.build=function(e){return this.options.preserveOrder?i(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},o.prototype.j2x=function(e,t){let r="",i="";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n])this.isAttribute(n)&&(i+="");else if(null===e[n])this.isAttribute(n)?i+="":"?"===n[0]?i+=this.indentate(t)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+n+"/"+this.tagEndChar;else if(e[n]instanceof Date)i+=this.buildTextValNode(e[n],n,"",t);else if("object"!=typeof e[n]){const o=this.isAttribute(n);if(o)r+=this.buildAttrPairStr(o,""+e[n]);else if(n===this.options.textNodeName){let t=this.options.tagValueProcessor(n,""+e[n]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[n],n,"",t)}else if(Array.isArray(e[n])){const r=e[n].length;let o="",s="";for(let a=0;a<r;a++){const r=e[n][a];if(void 0===r);else if(null===r)"?"===n[0]?i+=this.indentate(t)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+n+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1);o+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(r,n,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(n,r);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(r,n,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,n,s,t)),i+=o}else if(this.options.attributesGroupName&&n===this.options.attributesGroupName){const t=Object.keys(e[n]),i=t.length;for(let o=0;o<i;o++)r+=this.buildAttrPairStr(t[o],""+e[n][t[o]])}else i+=this.processTextOrObjNode(e[n],n,t);return{attrStr:r,val:i}},o.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},o.prototype.buildObjectNode=function(e,t,r,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+r+"?"+this.tagEndChar:this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",n=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+r+o+this.tagEndChar+e+this.indentate(i)+n:this.indentate(i)+"<"+t+r+o+">"+e+n}},o.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},o.prototype.buildTextValNode=function(e,t,r,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+r+">"+n+"</"+t+this.tagEndChar}},o.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},e.exports=o},12788:e=>{function t(e,s,a,l){let d="",c=!1;for(let u=0;u<e.length;u++){const p=e[u],h=r(p);if(void 0===h)continue;let f="";if(f=0===a.length?h:`${a}.${h}`,h===s.textNodeName){let e=p[h];n(f,s)||(e=s.tagValueProcessor(h,e),e=o(e,s)),c&&(d+=l),d+=e,c=!1;continue}if(h===s.cdataPropName){c&&(d+=l),d+=`<![CDATA[${p[h][0][s.textNodeName]}]]>`,c=!1;continue}if(h===s.commentPropName){d+=l+`\x3c!--${p[h][0][s.textNodeName]}--\x3e`,c=!0;continue}if("?"===h[0]){const e=i(p[":@"],s),t="?xml"===h?"":l;let r=p[h][0][s.textNodeName];r=0!==r.length?" "+r:"",d+=t+`<${h}${r}${e}?>`,c=!0;continue}let m=l;""!==m&&(m+=s.indentBy);const g=l+`<${h}${i(p[":@"],s)}`,y=t(p[h],s,f,m);-1!==s.unpairedTags.indexOf(h)?s.suppressUnpairedNode?d+=g+">":d+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?d+=g+`>${y}${l}</${h}>`:(d+=g+">",y&&""!==l&&(y.includes("/>")||y.includes("</"))?d+=l+s.indentBy+y+l:d+=y,d+=`</${h}>`):d+=g+"/>",c=!0}return d}function r(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const i=t[r];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function i(e,t){let r="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let n=t.attributeValueProcessor(i,e[i]);n=o(n,t),!0===n&&t.suppressBooleanAttributes?r+=` ${i.substr(t.attributeNamePrefix.length)}`:r+=` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return r}function n(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+r)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const i=t.entities[r];e=e.replace(i.regex,i.val)}return e}e.exports=function(e,r){let i="";return r.format&&r.indentBy.length>0&&(i="\n"),t(e,r,"",i)}},9400:(e,t,r)=>{const i=r(35334);function n(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const i=e[t++];let n="";for(;t<e.length&&e[t]!==i;t++)n+=e[t];return[r,n,t]}function o(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function d(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function c(e){if(i.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,u=!1,p=!1,h="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,i--):i--,0===i)break}else"["===e[t]?u=!0:h+=e[t];else{if(u&&s(e,t))t+=7,[entityName,val,t]=n(e,t+1),-1===val.indexOf("&")&&(r[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(u&&a(e,t))t+=8;else if(u&&l(e,t))t+=8;else if(u&&d(e,t))t+=9;else{if(!o)throw new Error("Invalid DOCTYPE");p=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},50460:(e,t)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};t.buildOptions=function(e){return Object.assign({},r,e)},t.defaultOptions=r},17680:(e,t,r)=>{"use strict";const i=r(35334),n=r(23832),o=r(9400),s=r(17983);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const i=t[r];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:e[i]}}}function l(e,t,r,i,n,o,s){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,r,n,o);if(null==i)return e;if(typeof i!=typeof e||i!==e)return i;if(this.options.trimValues)return w(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?w(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function d(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const c=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function u(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=i.getAllMatches(e,c),n=r.length,o={};for(let e=0;e<n;e++){const i=this.resolveNameSpace(r[e][1]);let n=r[e][4],s=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==n){this.options.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n);const e=this.options.attributeValueProcessor(i,n,t);o[s]=null==e?n:typeof e!=typeof n||e!==n?e:w(n,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new n("!xml");let r=t,i="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=y(e,">",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(i=this.saveTextToParentTag(i,r,s));const o=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let l=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),r=this.tagsNodeStack.pop(),i="",a=t}else if("?"===e[a+1]){let t=v(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new n(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=y(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);i=this.saveTextToParentTag(i,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=o(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=y(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);i=this.saveTextToParentTag(i,r,s);let o=this.parseTextData(n,r.tagname,s,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,o),a=t+2}else{let o=v(e,a,this.options.removeNSPrefix),l=o.tagName;const d=o.rawTagName;let c=o.tagExp,u=o.attrExpPresent,p=o.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,s,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==t.tagname&&(s+=s?"."+l:l),this.isItStopNode(this.options.stopNodes,s,l)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),c=l):c=c.substr(0,c.length-1),a=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=o.closeIndex;else{const r=this.readStopNodeData(e,d,p+1);if(!r)throw new Error(`Unexpected end of ${d}`);a=r.i,t=r.tagContent}const i=new n(l);l!==c&&u&&(i[":@"]=this.buildAttributesMap(c,s,l)),t&&(t=this.parseTextData(t,l,s,!0,u,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(r,i,s)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new n(l);l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,s,l)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new n(l);this.tagsNodeStack.push(r),l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,s,l)),this.addChild(r,e,s),r=e}i="",a=p}}else i+=e[a]}return t.child};function h(e,t,r){const i=this.options.updateTag(t.tagname,r,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,r,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,r){const i="*."+r;for(const r in e){const n=e[r];if(i===n||t===n)return!0}return!1}function y(e,t,r,i){const n=e.indexOf(t,r);if(-1===n)throw new Error(i);return n+t.length-1}function v(e,t,r,i=">"){const n=function(e,t,r=">"){let i,n="";for(let o=t;o<e.length;o++){let t=e[o];if(i)t===i&&(i="");else if('"'===t||"'"===t)i=t;else if(t===r[0]){if(!r[1])return{data:n,index:o};if(e[o+1]===r[1])return{data:n,index:o}}else"\t"===t&&(t=" ");n+=t}}(e,t+1,i);if(!n)return;let o=n.data;const s=n.index,a=o.search(/\s/);let l=o,d=!0;-1!==a&&(l=o.substring(0,a),o=o.substring(a+1).trimStart());const c=l;if(r){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),d=l!==n.data.substr(e+1))}return{tagName:l,tagExp:o,closeIndex:s,attrExpPresent:d,rawTagName:c}}function b(e,t,r){const i=r;let n=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const o=y(e,">",r,`${t} is not closed`);if(e.substring(r+2,o).trim()===t&&(n--,0===n))return{tagContent:e.substring(i,r),i:o};r=o}else if("?"===e[r+1]){r=y(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=y(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=y(e,"]]>",r,"StopNode is not closed.")-2}else{const i=v(e,r,">");if(i){(i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&n++,r=i.closeIndex}}}function w(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&s(e,r)}return i.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=l,this.resolveNameSpace=d,this.buildAttributesMap=u,this.isItStopNode=g,this.replaceEntitiesValue=f,this.readStopNodeData=b,this.saveTextToParentTag=m,this.addChild=h}}},32923:(e,t,r)=>{const{buildOptions:i}=r(50460),n=r(17680),{prettify:o}=r(75629),s=r(43918);e.exports=class{constructor(e){this.externalEntities={},this.options=i(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=s.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new n(this.options);r.addExternalEntities(this.externalEntities);const i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:o(i,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},75629:(e,t)=>{"use strict";function r(e,t,s){let a;const l={};for(let d=0;d<e.length;d++){const c=e[d],u=i(c);let p="";if(p=void 0===s?u:s+"."+u,u===t.textNodeName)void 0===a?a=c[u]:a+=""+c[u];else{if(void 0===u)continue;if(c[u]){let e=r(c[u],t,p);const i=o(e,t);c[":@"]?n(e,c[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==l[u]&&l.hasOwnProperty(u)?(Array.isArray(l[u])||(l[u]=[l[u]]),l[u].push(e)):t.isArray(u,p,i)?l[u]=[e]:l[u]=e}}}return"string"==typeof a?a.length>0&&(l[t.textNodeName]=a):void 0!==a&&(l[t.textNodeName]=a),l}function i(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function n(e,t,r,i){if(t){const n=Object.keys(t),o=n.length;for(let s=0;s<o;s++){const o=n[s];i.isArray(o,r+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function o(e,t){const{textNodeName:r}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}t.prettify=function(e,t){return r(e,t)}},23832:e=>{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},82682:(e,t,r)=>{"use strict";var i=r(69600),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!i(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===n.call(e)?function(e,t,r){for(var i=0,n=e.length;i<n;i++)o.call(e,i)&&(null==r?t(e[i],i,e):t.call(r,e[i],i,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var i=0,n=e.length;i<n;i++)null==r?t(e.charAt(i),i,e):t.call(r,e.charAt(i),i,e)}(e,t,s):function(e,t,r){for(var i in e)o.call(e,i)&&(null==r?t(e[i],i,e):t.call(r,e[i],i,e))}(e,t,s)}},89353:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,i=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var n=0;n<t.length;n+=1)r[n+e.length]=t[n];return r};e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==t.apply(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,s=function(e,t){for(var r=[],i=t||0,n=0;i<e.length;i+=1,n+=1)r[n]=e[i];return r}(arguments,1),a=r(0,n.length-s.length),l=[],d=0;d<a;d++)l[d]="$"+d;if(o=Function("binder","return function ("+function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r}(l,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=n.apply(this,i(s,arguments));return Object(t)===t?t:this}return n.apply(e,i(s,arguments))})),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o}},66743:(e,t,r)=>{"use strict";var i=r(89353);e.exports=Function.prototype.bind||i},70453:(e,t,r)=>{"use strict";var i,n=r(69383),o=r(41237),s=r(79290),a=r(79538),l=r(58068),d=r(69675),c=r(35345),u=Function,p=function(e){try{return u('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var f=function(){throw new d},m=h?function(){try{return f}catch(e){try{return h(arguments,"callee").get}catch(e){return f}}}():f,g=r(64039)(),y=r(80024)(),v=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),b={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):i,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):i,"%Symbol%":g?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":w,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(v)try{null.error}catch(e){var x=v(v(e));_["%Error.prototype%"]=x}var S=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&v&&(r=v(n.prototype))}return _[t]=r,r},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=r(66743),T=r(9957),B=E.call(Function.call,Array.prototype.concat),C=E.call(Function.apply,Array.prototype.splice),I=E.call(Function.call,String.prototype.replace),A=E.call(Function.call,String.prototype.slice),F=E.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,R=function(e,t){var r,i=e;if(T(k,i)&&(i="%"+(r=k[i])[0]+"%"),T(_,i)){var n=_[i];if(n===b&&(n=S(i)),void 0===n&&!t)throw new d("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new d('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return I(e,M,(function(e,t,r,n){i[i.length]=r?I(n,D,"$1"):t||e})),i}(e),i=r.length>0?r[0]:"",n=R("%"+i+"%",t),o=n.name,s=n.value,a=!1,c=n.alias;c&&(i=c[0],C(r,B([0,1],c)));for(var u=1,p=!0;u<r.length;u+=1){var f=r[u],m=A(f,0,1),g=A(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==f&&p||(a=!0),T(_,o="%"+(i+="."+f)+"%"))s=_[o];else if(null!=s){if(!(f in s)){if(!t)throw new d("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&u+1>=r.length){var y=h(s,f);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[f]}else p=T(s,f),s=s[f];p&&!a&&(_[o]=s)}}return s}},75795:(e,t,r)=>{"use strict";var i=r(70453)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(e){i=null}e.exports=i},30592:(e,t,r)=>{"use strict";var i=r(30655),n=function(){return!!i};n.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},e.exports=n},80024:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},64039:(e,t,r)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,n=r(41333);e.exports=function(){return"function"==typeof i&&("function"==typeof Symbol&&("symbol"==typeof i("foo")&&("symbol"==typeof Symbol("bar")&&n())))}},41333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},49092:(e,t,r)=>{"use strict";var i=r(41333);e.exports=function(){return i()&&!!Symbol.toStringTag}},4729:(e,t,r)=>{"use strict";var i=r(92861).Buffer,n=r(88310).Transform;function o(e){n.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(o,n),o.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},77952:(e,t,r)=>{var i=t;i.utils=r(45045),i.common=r(66166),i.sha=r(46229),i.ripemd=r(46784),i.hmac=r(28948),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},66166:(e,t,r)=>{"use strict";var i=r(45045),n=r(43349);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o<this.padLength;o++)i[n++]=0;return i}},28948:(e,t,r)=>{"use strict";var i=r(45045),n=r(43349);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},46784:(e,t,r)=>{"use strict";var i=r(45045),n=r(66166),o=i.rotl32,s=i.sum32,a=i.sum32_3,l=i.sum32_4,d=n.BlockHash;function c(){if(!(this instanceof c))return new c;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(c,d),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],n=this.h[2],d=this.h[3],c=this.h[4],v=r,b=i,w=n,_=d,x=c,S=0;S<80;S++){var k=s(o(l(r,u(S,i,n,d),e[f[S]+t],p(S)),g[S]),c);r=c,c=d,d=o(n,10),n=i,i=k,k=s(o(l(v,u(79-S,b,w,_),e[m[S]+t],h(S)),y[S]),x),v=x,x=_,_=o(w,10),w=b,b=k}k=a(this.h[1],n,_),this.h[1]=a(this.h[2],d,x),this.h[2]=a(this.h[3],c,v),this.h[3]=a(this.h[4],r,b),this.h[4]=a(this.h[0],i,w),this.h[0]=k},c.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},46229:(e,t,r)=>{"use strict";t.sha1=r(43917),t.sha224=r(47714),t.sha256=r(2287),t.sha384=r(21911),t.sha512=r(57766)},43917:(e,t,r)=>{"use strict";var i=r(45045),n=r(66166),o=r(66225),s=i.rotl32,a=i.sum32,l=i.sum32_5,d=o.ft_1,c=n.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(p,c),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],o=this.h[1],c=this.h[2],p=this.h[3],h=this.h[4];for(i=0;i<r.length;i++){var f=~~(i/20),m=l(s(n,5),d(f,o,c,p),h,r[i],u[f]);h=p,p=c,c=s(o,30),o=n,n=m}this.h[0]=a(this.h[0],n),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],p),this.h[4]=a(this.h[4],h)},p.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},47714:(e,t,r)=>{"use strict";var i=r(45045),n=r(2287);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(o,n),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},2287:(e,t,r)=>{"use strict";var i=r(45045),n=r(66166),o=r(66225),s=r(43349),a=i.sum32,l=i.sum32_4,d=i.sum32_5,c=o.ch32,u=o.maj32,p=o.s0_256,h=o.s1_256,f=o.g0_256,m=o.g1_256,g=n.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}i.inherits(v,g),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=l(m(r[i-2]),r[i-7],f(r[i-15]),r[i-16]);var n=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var x=d(_,h(v),c(v,b,w),this.k[i],r[i]),S=a(p(n),u(n,o,g));_=w,w=b,b=v,v=a(y,x),y=g,g=o,o=n,n=a(x,S)}this.h[0]=a(this.h[0],n),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},v.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},21911:(e,t,r)=>{"use strict";var i=r(45045),n=r(57766);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(o,n),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},57766:(e,t,r)=>{"use strict";var i=r(45045),n=r(66166),o=r(43349),s=i.rotr64_hi,a=i.rotr64_lo,l=i.shr64_hi,d=i.shr64_lo,c=i.sum64,u=i.sum64_hi,p=i.sum64_lo,h=i.sum64_4_hi,f=i.sum64_4_lo,m=i.sum64_5_hi,g=i.sum64_5_lo,y=n.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function _(e,t,r,i,n,o){var s=t&i^~t&o;return s<0&&(s+=4294967296),s}function x(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function S(e,t,r,i,n,o){var s=t&i^t&o^i&o;return s<0&&(s+=4294967296),s}function k(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function B(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,1)^s(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,1)^a(e,t,8)^d(e,t,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,19)^s(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}function F(e,t){var r=a(e,t,19)^a(t,e,29)^d(e,t,6);return r<0&&(r+=4294967296),r}i.inherits(b,y),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=A(r[i-4],r[i-3]),o=F(r[i-4],r[i-3]),s=r[i-14],a=r[i-13],l=C(r[i-30],r[i-29]),d=I(r[i-30],r[i-29]),c=r[i-32],u=r[i-31];r[i]=h(n,o,s,a,l,d,c,u),r[i+1]=f(n,o,s,a,l,d,c,u)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],d=this.h[5],h=this.h[6],f=this.h[7],y=this.h[8],v=this.h[9],b=this.h[10],C=this.h[11],I=this.h[12],A=this.h[13],F=this.h[14],M=this.h[15];o(this.k.length===r.length);for(var D=0;D<r.length;D+=2){var R=F,P=M,O=T(y,v),z=B(y,v),N=w(y,v,b,C,I),q=_(y,v,b,C,I,A),U=this.k[D],L=this.k[D+1],j=r[D],H=r[D+1],$=m(R,P,O,z,N,q,U,L,j,H),G=g(R,P,O,z,N,q,U,L,j,H);R=k(i,n),P=E(i,n),O=x(i,n,s,a,l),z=S(i,n,s,a,l,d);var W=u(R,P,O,z),K=p(R,P,O,z);F=I,M=A,I=b,A=C,b=y,C=v,y=u(h,f,$,G),v=p(f,f,$,G),h=l,f=d,l=s,d=a,s=i,a=n,i=u($,G,W,K),n=p($,G,W,K)}c(this.h,0,i,n),c(this.h,2,s,a),c(this.h,4,l,d),c(this.h,6,h,f),c(this.h,8,y,v),c(this.h,10,b,C),c(this.h,12,I,A),c(this.h,14,F,M)},b.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},66225:(e,t,r)=>{"use strict";var i=r(45045).rotr32;function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,i){return 0===e?n(t,r,i):1===e||3===e?s(t,r,i):2===e?o(t,r,i):void 0},t.ch32=n,t.maj32=o,t.p32=s,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},45045:(e,t,r)=>{"use strict";var i=r(43349),n=r(56698);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=n,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var s=e.charCodeAt(n);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):o(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(n=0;n<e.length;n++)r[n]=0|e[n];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=s(n)),r+=l(n.toString(16))}return r},t.zero2=a,t.zero8=l,t.join32=function(e,t,r,n){var o=r-t;i(o%4==0);for(var s=new Array(o/4),a=0,l=t;a<s.length;a++,l+=4){var d;d="big"===n?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],s[a]=d>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];"big"===t?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},t.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},t.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0,s=(o<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,i){return t+i>>>0},t.sum64_4_hi=function(e,t,r,i,n,o,s,a){var l=0,d=t;return l+=(d=d+i>>>0)<t?1:0,l+=(d=d+o>>>0)<o?1:0,e+r+n+s+(l+=(d=d+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,i,n,o,s,a){return t+i+o+a>>>0},t.sum64_5_hi=function(e,t,r,i,n,o,s,a,l,d){var c=0,u=t;return c+=(u=u+i>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,c+=(u=u+a>>>0)<a?1:0,e+r+n+s+l+(c+=(u=u+d>>>0)<d?1:0)>>>0},t.sum64_5_lo=function(e,t,r,i,n,o,s,a,l,d){return t+i+o+a+d>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},9957:(e,t,r)=>{"use strict";var i=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=r(66743);e.exports=o.call(i,n)},32723:(e,t,r)=>{"use strict";var i=r(77952),n=r(64367),o=r(43349);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),r=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}e.exports=s,s.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=n.toArray(e,t),r=n.toArray(r,i),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,n.encode(s,t)}},26794:(e,t,r)=>{"use strict";t.Us=void 0;var i=r(34550);function n(e){var t=i.statusCodeToReasonPhrase[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}t.Us=n},34550:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reasonPhraseToStatusCode=t.statusCodeToReasonPhrase=void 0,t.statusCodeToReasonPhrase={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",103:"Early Hints",426:"Upgrade Required",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},t.reasonPhraseToStatusCode={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Early Hints":103,"Upgrade Required":426,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421}},251:(e,t)=>{
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.read=function(e,t,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,d=l>>1,c=-7,u=r?n-1:0,p=r?-1:1,h=e[t+u];for(u+=p,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+u],u+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+e[t+u],u+=p,c-=8);if(0===o)o=1-d;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,i),o-=d}return(h?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,r,i,n,o){var s,a,l,d=8*o-n-1,c=(1<<d)-1,u=c>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=c?(a=0,s=c):s+u>=1?(a=(t*l-1)*Math.pow(2,n),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=255&a,h+=f,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+h]=255&s,h+=f,s/=256,d-=8);e[r+h-f]|=128*m}},56698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},20311:e=>{"use strict";e.exports=function(e,t,r,i,n,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,i,n,o,s,a],c=0;(l=new Error(t.replace(/%s/g,(function(){return d[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},47244:(e,t,r)=>{"use strict";var i=r(49092)(),n=r(38075)("Object.prototype.toString"),o=function(e){return!(i&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},69600:e=>{"use strict";var t,r,i=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},n((function(){throw 42}),null,t)}catch(e){e!==r&&(n=null)}else n=null;var o=/^\s*class\b/,s=function(e){try{var t=i.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(i.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,d="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var p=document.all;l.call(p)===l.call(document.all)&&(u=function(e){if((c||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=n?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{n(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(d)return a(e);if(s(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},48184:(e,t,r)=>{"use strict";var i,n=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(49092)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(o.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===n.call(e);if(!l)return!1;if(void 0===i){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();i=!!t&&l(t)}return l(e)===i}},88997:e=>{"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},35680:(e,t,r)=>{"use strict";var i=r(25767);e.exports=function(e){return!!i(e)}},64634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},37260:(e,t,r)=>{var i=r(25747);e.exports=function(e,t){t=t||{};var r=i.decode(e,t);if(!r)return null;var n=r.payload;if("string"==typeof n)try{var o=JSON.parse(n);null!==o&&"object"==typeof o&&(n=o)}catch(e){}return!0===t.complete?{header:r.header,payload:n,signature:r.signature}:n}},44040:(e,t,r)=>{e.exports={decode:r(37260),verify:r(91691),sign:r(37651),JsonWebTokenError:r(81741),NotBeforeError:r(13726),TokenExpiredError:r(18980)}},81741:e=>{var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};(t.prototype=Object.create(Error.prototype)).constructor=t,e.exports=t},13726:(e,t,r)=>{var i=r(81741),n=function(e,t){i.call(this,e),this.name="NotBeforeError",this.date=t};(n.prototype=Object.create(i.prototype)).constructor=n,e.exports=n},18980:(e,t,r)=>{var i=r(81741),n=function(e,t){i.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};(n.prototype=Object.create(i.prototype)).constructor=n,e.exports=n},1977:(e,t,r)=>{var i=r(65606);const n=r(99589);e.exports=n.satisfies(i.version,">=15.7.0")},74977:(e,t,r)=>{var i=r(65606),n=r(99589);e.exports=n.satisfies(i.version,"^6.12.0 || >=8.0.0")},34623:(e,t,r)=>{var i=r(65606);const n=r(99589);e.exports=n.satisfies(i.version,">=16.9.0")},40855:(e,t,r)=>{var i=r(6585);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var n=i(e);if(void 0===n)return;return Math.floor(r+n/1e3)}return"number"==typeof e?r+e:void 0}},47019:(e,t,r)=>{const i=r(1977),n=r(34623),o={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},s={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;const r=t.asymmetricKeyType;if(!r)return;const a=o[r];if(!a)throw new Error(`Unknown key type "${r}".`);if(!a.includes(e))throw new Error(`"alg" parameter for "${r}" key type must be one of: ${a.join(", ")}.`);if(i)switch(r){case"ec":const r=t.asymmetricKeyDetails.namedCurve,i=s[e];if(r!==i)throw new Error(`"alg" parameter "${e}" requires curve "${i}".`);break;case"rsa-pss":if(n){const r=parseInt(e.slice(-3),10),{hashAlgorithm:i,mgf1HashAlgorithm:n,saltLength:o}=t.asymmetricKeyDetails;if(i!==`sha${r}`||n!==i)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==o&&o>r>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},37651:(e,t,r)=>{var i=r(48287).Buffer;const n=r(40855),o=r(74977),s=r(47019),a=r(25747),l=r(46111),d=r(87914),c=r(58928),u=r(73639),p=r(79001),h=r(45931),f=r(67083),{KeyObject:m,createSecretKey:g,createPrivateKey:y}=r(91565),v=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];o&&v.splice(3,0,"PS256","PS384","PS512");const b={expiresIn:{isValid:function(e){return c(e)||h(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return c(e)||h(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return h(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:l.bind(null,v),message:'"algorithm" must be a valid string enum value'},header:{isValid:p,message:'"header" must be an object'},encoding:{isValid:h,message:'"encoding" must be a string'},issuer:{isValid:h,message:'"issuer" must be a string'},subject:{isValid:h,message:'"subject" must be a string'},jwtid:{isValid:h,message:'"jwtid" must be a string'},noTimestamp:{isValid:d,message:'"noTimestamp" must be a boolean'},keyid:{isValid:h,message:'"keyid" must be a string'},mutatePayload:{isValid:d,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:d,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:d,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},w={iat:{isValid:u,message:'"iat" should be a number of seconds'},exp:{isValid:u,message:'"exp" should be a number of seconds'},nbf:{isValid:u,message:'"nbf" should be a number of seconds'}};function _(e,t,r,i){if(!p(r))throw new Error('Expected "'+i+'" to be a plain object.');Object.keys(r).forEach((function(n){const o=e[n];if(o){if(!o.isValid(r[n]))throw new Error(o.message)}else if(!t)throw new Error('"'+n+'" is not allowed in "'+i+'"')}))}const x={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},S=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,o){"function"==typeof r?(o=r,r={}):r=r||{};const l="object"==typeof e&&!i.isBuffer(e),d=Object.assign({alg:r.algorithm||"HS256",typ:l?"JWT":void 0,kid:r.keyid},r.header);function c(e){if(o)return o(e);throw e}if(!t&&"none"!==r.algorithm)return c(new Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof m))try{t=y(t)}catch(e){try{t=g("string"==typeof t?i.from(t):t)}catch(e){return c(new Error("secretOrPrivateKey is not valid key material"))}}if(d.alg.startsWith("HS")&&"secret"!==t.type)return c(new Error(`secretOrPrivateKey must be a symmetric key when using ${d.alg}`));if(/^(?:RS|PS|ES)/.test(d.alg)){if("private"!==t.type)return c(new Error(`secretOrPrivateKey must be an asymmetric key when using ${d.alg}`));if(!r.allowInsecureKeySizes&&!d.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return c(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${d.alg}`))}if(void 0===e)return c(new Error("payload is required"));if(l){try{!function(e){_(w,!0,e,"payload")}(e)}catch(e){return c(e)}r.mutatePayload||(e=Object.assign({},e))}else{const t=S.filter((function(e){return void 0!==r[e]}));if(t.length>0)return c(new Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return c(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return c(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){_(b,!1,e,"options")}(r)}catch(e){return c(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{s(d.alg,t)}catch(e){return c(e)}const u=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:l&&(e.iat=u),void 0!==r.notBefore){try{e.nbf=n(r.notBefore,u)}catch(e){return c(e)}if(void 0===e.nbf)return c(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=n(r.expiresIn,u)}catch(e){return c(e)}if(void 0===e.exp)return c(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(x).forEach((function(t){const i=x[t];if(void 0!==r[t]){if(void 0!==e[i])return c(new Error('Bad "options.'+t+'" option. The payload already has an "'+i+'" property.'));e[i]=r[t]}}));const p=r.encoding||"utf8";if("function"!=typeof o){let i=a.sign({header:d,payload:e,secret:t,encoding:p});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(d.alg)&&i.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${d.alg}`);return i}o=o&&f(o),a.createSign({header:d,privateKey:t,payload:e,encoding:p}).once("error",o).once("done",(function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(d.alg)&&e.length<256)return o(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${d.alg}`));o(null,e)}))}},91691:(e,t,r)=>{var i=r(48287).Buffer;const n=r(81741),o=r(13726),s=r(18980),a=r(37260),l=r(40855),d=r(47019),c=r(74977),u=r(25747),{KeyObject:p,createSecretKey:h,createPublicKey:f}=r(91565),m=["RS256","RS384","RS512"],g=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],v=["HS256","HS384","HS512"];c&&(m.splice(m.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,c){let b;if("function"!=typeof r||c||(c=r,r={}),r||(r={}),r=Object.assign({},r),b=c||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return b(new n("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return b(new n("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return b(new n("allowInvalidAsymmetricKeyTypes must be a boolean"));const w=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return b(new n("jwt must be provided"));if("string"!=typeof e)return b(new n("jwt must be a string"));const _=e.split(".");if(3!==_.length)return b(new n("jwt malformed"));let x;try{x=a(e,{complete:!0})}catch(e){return b(e)}if(!x)return b(new n("invalid token"));const S=x.header;let k;if("function"==typeof t){if(!c)return b(new n("verify must be called asynchronous if secret or public key is provided as a callback"));k=t}else k=function(e,r){return r(null,t)};return k(S,(function(t,a){if(t)return b(new n("error in secret or public key callback: "+t.message));const c=""!==_[2].trim();if(!c&&a)return b(new n("jwt signature is required"));if(c&&!a)return b(new n("secret or public key must be provided"));if(!c&&!r.algorithms)return b(new n('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=a&&!(a instanceof p))try{a=f(a)}catch(e){try{a=h("string"==typeof a?i.from(a):a)}catch(e){return b(new n("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===a.type?r.algorithms=v:["rsa","rsa-pss"].includes(a.asymmetricKeyType)?r.algorithms=y:"ec"===a.asymmetricKeyType?r.algorithms=g:r.algorithms=m),-1===r.algorithms.indexOf(x.header.alg))return b(new n("invalid algorithm"));if(S.alg.startsWith("HS")&&"secret"!==a.type)return b(new n(`secretOrPublicKey must be a symmetric key when using ${S.alg}`));if(/^(?:RS|PS|ES)/.test(S.alg)&&"public"!==a.type)return b(new n(`secretOrPublicKey must be an asymmetric key when using ${S.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{d(S.alg,a)}catch(e){return b(e)}let k;try{k=u.verify(e,x.header.alg,a)}catch(e){return b(e)}if(!k)return b(new n("invalid signature"));const E=x.payload;if(void 0!==E.nbf&&!r.ignoreNotBefore){if("number"!=typeof E.nbf)return b(new n("invalid nbf value"));if(E.nbf>w+(r.clockTolerance||0))return b(new o("jwt not active",new Date(1e3*E.nbf)))}if(void 0!==E.exp&&!r.ignoreExpiration){if("number"!=typeof E.exp)return b(new n("invalid exp value"));if(w>=E.exp+(r.clockTolerance||0))return b(new s("jwt expired",new Date(1e3*E.exp)))}if(r.audience){const e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(E.aud)?E.aud:[E.aud]).some((function(t){return e.some((function(e){return e instanceof RegExp?e.test(t):e===t}))})))return b(new n("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer){if("string"==typeof r.issuer&&E.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(E.iss))return b(new n("jwt issuer invalid. expected: "+r.issuer))}if(r.subject&&E.sub!==r.subject)return b(new n("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&E.jti!==r.jwtid)return b(new n("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&E.nonce!==r.nonce)return b(new n("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof E.iat)return b(new n("iat required when maxAge is specified"));const e=l(r.maxAge,E.iat);if(void 0===e)return b(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=e+(r.clockTolerance||0))return b(new s("maxAge exceeded",new Date(1e3*e)))}if(!0===r.complete){const e=x.signature;return b(null,{header:S,payload:E,signature:e})}return b(null,E)}))}},58789:(e,t,r)=>{var i=r(41045),n=r(92861).Buffer,o=r(91565),s=r(22010),a=r(40537),l="secret must be a string or buffer",d="key must be a string or a buffer",c="function"==typeof o.createPublicKey;function u(e){if(!n.isBuffer(e)&&"string"!=typeof e){if(!c)throw m(d);if("object"!=typeof e)throw m(d);if("string"!=typeof e.type)throw m(d);if("string"!=typeof e.asymmetricKeyType)throw m(d);if("function"!=typeof e.export)throw m(d)}}function p(e){if(!n.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function h(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function f(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var t=[].slice.call(arguments,1),r=a.format.bind(a,e).apply(null,t);return new TypeError(r)}function g(e){var t;return t=e,n.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function y(e){return function(t,r){!function(e){if(!n.isBuffer(e)){if("string"==typeof e)return e;if(!c)throw m(l);if("object"!=typeof e)throw m(l);if("secret"!==e.type)throw m(l);if("function"!=typeof e.export)throw m(l)}}(r),t=g(t);var i=o.createHmac("sha"+e,r);return h((i.update(t),i.digest("base64")))}}function v(e){return function(t,r,o){var s=y(e)(t,o);return i(n.from(r),n.from(s))}}function b(e){return function(t,r){p(r),t=g(t);var i=o.createSign("RSA-SHA"+e);return h((i.update(t),i.sign(r,"base64")))}}function w(e){return function(t,r,i){u(i),t=g(t),r=f(r);var n=o.createVerify("RSA-SHA"+e);return n.update(t),n.verify(i,r,"base64")}}function _(e){return function(t,r){p(r),t=g(t);var i=o.createSign("RSA-SHA"+e);return h((i.update(t),i.sign({key:r,padding:o.constants.RSA_PKCS1_PSS_PADDING,saltLength:o.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function x(e){return function(t,r,i){u(i),t=g(t),r=f(r);var n=o.createVerify("RSA-SHA"+e);return n.update(t),n.verify({key:i,padding:o.constants.RSA_PKCS1_PSS_PADDING,saltLength:o.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function S(e){var t=b(e);return function(){var r=t.apply(null,arguments);return r=s.derToJose(r,"ES"+e)}}function k(e){var t=w(e);return function(r,i,n){return i=s.joseToDer(i,"ES"+e).toString("base64"),t(r,i,n)}}function E(){return function(){return""}}function T(){return function(e,t){return""===t}}c&&(d+=" or a KeyObject",l+="or a KeyObject"),e.exports=function(e){var t={hs:y,rs:b,ps:_,es:S,none:E},r={hs:v,rs:w,ps:x,es:k,none:T},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!i)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var n=(i[1]||i[3]).toLowerCase(),o=i[2];return{sign:t[n](o),verify:r[n](o)}}},25747:(e,t,r)=>{var i=r(13387),n=r(57599);t.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],t.sign=i.sign,t.verify=n.verify,t.decode=n.decode,t.isValid=n.isValid,t.createSign=function(e){return new i(e)},t.createVerify=function(e){return new n(e)}},18948:(e,t,r)=>{var i=r(65606),n=r(92861).Buffer,o=r(88310);function s(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=n.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=n.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,i.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}r(40537).inherits(s,o),s.prototype.write=function(e){this.buffer=n.concat([this.buffer,n.from(e)]),this.emit("data",e)},s.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=s},13387:(e,t,r)=>{var i=r(92861).Buffer,n=r(18948),o=r(58789),s=r(88310),a=r(82851),l=r(40537);function d(e,t){return i.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){var t=e.header,r=e.payload,i=e.secret||e.privateKey,n=e.encoding,s=o(t.alg),c=function(e,t,r){r=r||"utf8";var i=d(a(e),"binary"),n=d(a(t),r);return l.format("%s.%s",i,n)}(t,r,n),u=s.sign(c,i);return l.format("%s.%s",c,u)}function u(e){var t=e.secret||e.privateKey||e.key,r=new n(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new n(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}l.inherits(u,s),u.prototype.sign=function(){try{var e=c({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},u.sign=c,e.exports=u},82851:(e,t,r)=>{var i=r(48287).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||i.isBuffer(e)?e.toString():JSON.stringify(e)}},57599:(e,t,r)=>{var i=r(92861).Buffer,n=r(18948),o=r(58789),s=r(88310),a=r(82851),l=r(40537),d=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function c(e){if(function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e))return e;try{return JSON.parse(e)}catch(e){return}}function u(e){var t=e.split(".",1)[0];return c(i.from(t,"base64").toString("binary"))}function p(e){return e.split(".")[2]}function h(e){return d.test(e)&&!!u(e)}function f(e,t,r){if(!t){var i=new Error("Missing algorithm parameter for jws.verify");throw i.code="MISSING_ALGORITHM",i}var n=p(e=a(e)),s=function(e){return e.split(".",2).join(".")}(e);return o(t).verify(s,n,r)}function m(e,t){if(t=t||{},!h(e=a(e)))return null;var r=u(e);if(!r)return null;var n=function(e,t){t=t||"utf8";var r=e.split(".")[1];return i.from(r,"base64").toString(t)}(e);return("JWT"===r.typ||t.json)&&(n=JSON.parse(n,t.encoding)),{header:r,payload:n,signature:p(e)}}function g(e){var t=(e=e||{}).secret||e.publicKey||e.key,r=new n(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new n(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}l.inherits(g,s),g.prototype.verify=function(){try{var e=f(this.signature.buffer,this.algorithm,this.key.buffer),t=m(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},g.decode=m,g.isValid=h,g.verify=f,e.exports=g},98860:function(e,t,r){!function(e,t){"use strict";function r(e){return r.result?r.result:e&&"function"==typeof e.getSerializer?(r.result=e.getSerializer(),r.result):Promise.reject(new Error("localforage.getSerializer() was not available! localforage v1.4+ is required!"))}function i(e,t){return t&&e.then((function(e){t(null,e)}),(function(e){t(e)})),e}function n(e,t){var r=this.getItem(e).then((function(t){return{key:e,value:t}}));return i(r,t),r}function o(e){var t=this,r=new Promise((function(r,i){for(var o=[],s=0,a=e.length;s<a;s++)o.push(n.call(t,e[s]));Promise.all(o).then((function(e){for(var t={},i=0,n=e.length;i<n;i++){var o=e[i];t[o.key]=o.value}r(t)})).catch(i)}));return r}function s(){var e={};return this.iterate((function(t,r){e[r]=t})).then((function(){return e}))}function a(){return"undefined"!=typeof IDBKeyRange?IDBKeyRange:"undefined"!=typeof webkitIDBKeyRange?webkitIDBKeyRange:"undefined"!=typeof mozIDBKeyRange?mozIDBKeyRange:void 0}t="default"in t?t.default:t;var l=a();function d(e){e=e.slice();var t=this;function r(e,t){return e<t?-1:e>t?1:0}var i=new Promise((function(i,n){t.ready().then((function(){var o=t._dbInfo,s=o.db.transaction(o.storeName,"readonly").objectStore(o.storeName),a=e.sort(r),d=l.bound(e[0],e[e.length-1],!1,!1),c=s.openCursor(d),u={},p=0;c.onsuccess=function(){var e=c.result;if(e){for(var t=e.key;t>a[p];)if(++p===a.length)return void i(u);if(t===a[p]){var r=e.value;void 0===r&&(r=null),u[t]=r,e.continue()}else e.continue(a[p])}else i(u)},c.onerror=function(){n(c.error)}})).catch(n)}));return i}function c(e){var t=this,i=new Promise((function(i,n){t.ready().then((function(){return r(t)})).then((function(r){var o=t._dbInfo;o.db.transaction((function(t){for(var s=new Array(e.length),a=0,l=e.length;a<l;a++)s[a]="?";t.executeSql("SELECT * FROM "+o.storeName+" WHERE (key IN ("+s.join(",")+"))",e,(function(e,t){for(var n={},o=t.rows,s=0,a=o.length;s<a;s++){var l=o.item(s),d=l.value;d&&(d=r.deserialize(d)),n[l.key]=d}i(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return i}function u(e,t){var r,n=this;if(arguments.length&&null!==e){var a=n.driver();r=a===n.INDEXEDDB?d.apply(n,arguments):a===n.WEBSQL?c.apply(n,arguments):o.apply(n,arguments)}else r=s.apply(n);return i(r,t),r}function p(e){var t=Object.getPrototypeOf(e);t&&(t.getItems=u,t.getItems.indexedDB=function(){return d.apply(this,arguments)},t.getItems.websql=function(){return c.apply(this,arguments)},t.getItems.generic=function(){return o.apply(this,arguments)})}var h=p(t);e.localforageGetItems=u,e.extendPrototype=p,e.extendPrototypeResult=h,e.getItemsGeneric=o,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(73790))},66604:function(e,t,r){!function(e,t){"use strict";function r(e,t){return t&&e.then((function(e){t(null,e)}),(function(e){t(e)})),e}function i(e,t){for(var i=this,n=[],o=0,s=e.length;o<s;o++){var a=e[o];n.push(i.removeItem(a))}var l=Promise.all(n);return r(l,t),l}function n(e,t){var i=this,n=i.ready().then((function(){return new Promise((function(t,r){var n,o=i._dbInfo,s=o.db.transaction(o.storeName,"readwrite"),a=s.objectStore(o.storeName);function l(e){var t=e.target||this;n||(n=t.error||t.transaction.error,r(n))}s.oncomplete=function(){t()},s.onabort=s.onerror=function(){n||r(s.error||"Unknown error")};for(var d=0,c=e.length;d<c;d++){var u=e[d];"string"!=typeof u&&(console.warn(u+" used as a key, but it is not a string."),u=String(u)),a.delete(u).onerror=l}}))}));return r(n,t),n}function o(e,t,r){return new Promise((function(i,n){e.executeSql(t,r,(function(){i()}),(function(e,t){n(t)}))}))}function s(e,t){var i=this,n=i.ready().then((function(){return new Promise((function(t,r){var n=i._dbInfo;n.db.transaction((function(i){for(var s=n.storeName,a=[],l=0,d=e.length;l<d;l++){var c=e[l];"string"!=typeof c&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),a.push(o(i,"DELETE FROM "+s+" WHERE key = ?",[c]))}Promise.all(a).then(t,r)}),(function(e){r(e)}))}))}));return r(n,t),n}function a(){var e=this,t=e.driver();return t===e.INDEXEDDB?n.apply(e,arguments):t===e.WEBSQL?s.apply(e,arguments):i.apply(e,arguments)}function l(e){var t=Object.getPrototypeOf(e);t&&(t.removeItems=a,t.removeItems.indexedDB=function(){return n.apply(this,arguments)},t.removeItems.websql=function(){return s.apply(this,arguments)},t.removeItems.generic=function(){return i.apply(this,arguments)})}var d=l(t="default"in t?t.default:t);e.localforageRemoveItems=a,e.extendPrototype=l,e.extendPrototypeResult=d,e.removeItemsGeneric=i,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(73790))},73790:(e,t,r)=>{
|
||
/*!
|
||
localForage -- Offline Storage, Improved
|
||
Version 1.10.0
|
||
https://localforage.github.io/localForage
|
||
(c) 2013-2017 Mozilla, Apache License 2.0
|
||
*/
|
||
e.exports=function e(t,r,i){function n(s,a){if(!r[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=r[s]={exports:{}};t[s][0].call(d.exports,(function(e){var r=t[s][1][e];return n(r||e)}),d,d.exports,e,t,r,i)}return r[s].exports}for(var o=void 0,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(e,t,i){(function(e){"use strict";var r,i,n=e.MutationObserver||e.WebKitMutationObserver;if(n){var o=0,s=new n(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,r=function(){l.port2.postMessage(0)}}var d=[];function c(){var e,t;i=!0;for(var r=d.length;r;){for(t=d,d=[],e=-1;++e<r;)t[e]();r=d.length}i=!1}function u(e){1!==d.push(e)||i||r()}t.exports=u}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var i=e(1);function n(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function d(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==n&&h(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){i((function(){var i;try{i=t(r)}catch(t){return o.reject(e,t)}i===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,i)}))}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function i(t){r||(r=!0,o.reject(e,t))}function n(t){r||(r=!0,o.resolve(e,t))}function s(){t(n,i)}var a=f(s);"error"===a.status&&i(a.value)}function f(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}function m(e){return e instanceof this?e:o.resolve(new this(n),e)}function g(e){var t=new this(n);return o.reject(t,e)}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,d=new this(n);++l<r;)c(e[l],l);return d;function c(e,n){function l(e){s[n]=e,++a!==r||i||(i=!0,o.resolve(d,s))}t.resolve(e).then(l,(function(e){i||(i=!0,o.reject(d,e))}))}}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var s=-1,a=new this(n);++s<r;)l(e[s]);return a;function l(e){t.resolve(e).then((function(e){i||(i=!0,o.resolve(a,e))}),(function(e){i||(i=!0,o.reject(a,e))}))}}t.exports=d,d.prototype.catch=function(e){return this.then(null,e)},d.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(n);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new c(r,e,t)),r},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=f(p,t);if("error"===r.status)return o.reject(e,r.value);var i=r.value;if(i)h(e,i);else{e.state=a,e.outcome=t;for(var n=-1,s=e.queue.length;++n<s;)e.queue[n].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e},d.resolve=m,d.reject=g,d.all=y,d.race=v},{1:1}],3:[function(e,t,i){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var s=o();function a(){try{if(!s||!s.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(n){if("TypeError"!==n.name)throw n;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<e.length;i+=1)r.append(e[i]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var d=Promise;function c(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function p(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,g={},y=Object.prototype.toString,v="readonly",b="readwrite";function w(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n<t;n++)i[n]=e.charCodeAt(n);return r}function _(e){return new d((function(t){var r=e.transaction(f,b),i=l([""]);r.objectStore(f).put(i,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}function x(e){return"boolean"==typeof m?d.resolve(m):_(e).then((function(e){return m=e}))}function S(e){var t=g[e.name],r={};r.promise=new d((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function k(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function E(e,t){var r=g[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function T(e,t){return new d((function(r,i){if(g[e.name]=g[e.name]||O(),e.db){if(!t)return r(e.db);S(e),e.db.close()}var n=[e.name];t&&n.push(e.version);var o=s.open.apply(s,n);t&&(o.onupgradeneeded=function(t){var r=o.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(f)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),i(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},r(t),k(e)}}))}function B(e){return T(e,!1)}function C(e){return T(e,!0)}function I(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,n=e.version>e.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),n||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function A(e){return new d((function(t,r){var i=new FileReader;i.onerror=r,i.onloadend=function(r){var i=btoa(r.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)}))}function F(e){return l([w(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,r=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function R(e){S(e);for(var t=g[e.name],r=t.forages,i=0;i<r.length;i++){var n=r[i];n._dbInfo.db&&(n._dbInfo.db.close(),n._dbInfo.db=null)}return e.db=null,B(e).then((function(t){return e.db=t,I(e)?C(e):t})).then((function(i){e.db=t.db=i;for(var n=0;n<r.length;n++)r[n]._dbInfo.db=i})).catch((function(t){throw E(e,t),t}))}function P(e,t,r,i){void 0===i&&(i=1);try{var n=e.db.transaction(e.storeName,t);r(null,n)}catch(n){if(i>0&&(!e.db||"InvalidStateError"===n.name||"NotFoundError"===n.name))return d.resolve().then((function(){if(!e.db||"NotFoundError"===n.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),C(e)})).then((function(){return R(e).then((function(){P(e,t,r,i-1)}))})).catch(r);r(n)}}function O(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function z(e){var t=this,r={db:null};if(e)for(var i in e)r[i]=e[i];var n=g[r.name];n||(n=O(),g[r.name]=n),n.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var o=[];function s(){return d.resolve()}for(var a=0;a<n.forages.length;a++){var l=n.forages[a];l!==t&&o.push(l._initReady().catch(s))}var c=n.forages.slice(0);return d.all(o).then((function(){return r.db=n.db,B(r)})).then((function(e){return r.db=e,I(r,t._defaultConfig.version)?C(r):e})).then((function(e){r.db=n.db=e,t._dbInfo=r;for(var i=0;i<c.length;i++){var o=c[i];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))}function N(e,t){var r=this;e=p(e);var i=new d((function(t,i){r.ready().then((function(){P(r._dbInfo,v,(function(n,o){if(n)return i(n);try{var s=o.objectStore(r._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),M(e)&&(e=F(e)),t(e)},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return c(i,t),i}function q(e,t){var r=this,i=new d((function(t,i){r.ready().then((function(){P(r._dbInfo,v,(function(n,o){if(n)return i(n);try{var s=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var r=s.result;if(r){var i=r.value;M(i)&&(i=F(i));var n=e(i,r.key,a++);void 0!==n?t(n):r.continue()}else t()},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return c(i,t),i}function U(e,t,r){var i=this;e=p(e);var n=new d((function(r,n){var o;i.ready().then((function(){return o=i._dbInfo,"[object Blob]"===y.call(t)?x(o.db).then((function(e){return e?t:A(t)})):t})).then((function(t){P(i._dbInfo,b,(function(o,s){if(o)return n(o);try{var a=s.objectStore(i._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),r(t)},s.onabort=s.onerror=function(){var e=l.error?l.error:l.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return c(n,r),n}function L(e,t){var r=this;e=p(e);var i=new d((function(t,i){r.ready().then((function(){P(r._dbInfo,b,(function(n,o){if(n)return i(n);try{var s=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){i(s.error)},o.onabort=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return c(i,t),i}function j(e){var t=this,r=new d((function(e,r){t.ready().then((function(){P(t._dbInfo,b,(function(i,n){if(i)return r(i);try{var o=n.objectStore(t._dbInfo.storeName).clear();n.oncomplete=function(){e()},n.onabort=n.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return c(r,e),r}function H(e){var t=this,r=new d((function(e,r){t.ready().then((function(){P(t._dbInfo,v,(function(i,n){if(i)return r(i);try{var o=n.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return c(r,e),r}function $(e,t){var r=this,i=new d((function(t,i){e<0?t(null):r.ready().then((function(){P(r._dbInfo,v,(function(n,o){if(n)return i(n);try{var s=o.objectStore(r._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var r=l.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},l.onerror=function(){i(l.error)}}catch(e){i(e)}}))})).catch(i)}));return c(i,t),i}function G(e){var t=this,r=new d((function(e,r){t.ready().then((function(){P(t._dbInfo,v,(function(i,n){if(i)return r(i);try{var o=n.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return c(r,e),r}function W(e,t){t=h.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var i,n=this;if(e.name){var o=e.name===r.name&&n._dbInfo.db?d.resolve(n._dbInfo.db):B(e).then((function(t){var r=g[e.name],i=r.forages;r.db=t;for(var n=0;n<i.length;n++)i[n]._dbInfo.db=t;return t}));i=e.storeName?o.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;S(e);var i=g[e.name],n=i.forages;t.close();for(var o=0;o<n.length;o++){var a=n[o];a._dbInfo.db=null,a._dbInfo.version=r}var l=new d((function(t,i){var n=s.open(e.name,r);n.onerror=function(e){n.result.close(),i(e)},n.onupgradeneeded=function(){n.result.deleteObjectStore(e.storeName)},n.onsuccess=function(){var e=n.result;e.close(),t(e)}}));return l.then((function(e){i.db=e;for(var t=0;t<n.length;t++){var r=n[t];r._dbInfo.db=e,k(r._dbInfo)}})).catch((function(t){throw(E(e,t)||d.resolve()).catch((function(){})),t}))}})):o.then((function(t){S(e);var r=g[e.name],i=r.forages;t.close();for(var n=0;n<i.length;n++)i[n]._dbInfo.db=null;var o=new d((function(t,r){var i=s.deleteDatabase(e.name);i.onerror=function(){var e=i.result;e&&e.close(),r(i.error)},i.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},i.onsuccess=function(){var e=i.result;e&&e.close(),t(e)}}));return o.then((function(e){r.db=e;for(var t=0;t<i.length;t++)k(i[t]._dbInfo)})).catch((function(t){throw(E(e,t)||d.resolve()).catch((function(){})),t}))}))}else i=d.reject("Invalid arguments");return c(i,t),i}var K={_driver:"asyncStorage",_initStorage:z,_support:a(),iterate:q,getItem:N,setItem:U,removeItem:L,clear:j,length:H,key:$,keys:G,dropInstance:W};function V(){return"function"==typeof openDatabase}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y="~~local_forage_type~",Q=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",X=Z.length,ee="arbf",te="blob",re="si08",ie="ui08",ne="uic8",oe="si16",se="si32",ae="ur16",le="ui32",de="fl32",ce="fl64",ue=X+ee.length,pe=Object.prototype.toString;function he(e){var t,r,i,n,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var d=new ArrayBuffer(s),c=new Uint8Array(d);for(t=0;t<a;t+=4)r=J.indexOf(e[t]),i=J.indexOf(e[t+1]),n=J.indexOf(e[t+2]),o=J.indexOf(e[t+3]),c[l++]=r<<2|i>>4,c[l++]=(15&i)<<4|n>>2,c[l++]=(3&n)<<6|63&o;return d}function fe(e){var t,r=new Uint8Array(e),i="";for(t=0;t<r.length;t+=3)i+=J[r[t]>>2],i+=J[(3&r[t])<<4|r[t+1]>>4],i+=J[(15&r[t+1])<<2|r[t+2]>>6],i+=J[63&r[t+2]];return r.length%3==2?i=i.substring(0,i.length-1)+"=":r.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}function me(e,t){var r="";if(e&&(r=pe.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===pe.call(e.buffer))){var i,n=Z;e instanceof ArrayBuffer?(i=e,n+=ee):(i=e.buffer,"[object Int8Array]"===r?n+=re:"[object Uint8Array]"===r?n+=ie:"[object Uint8ClampedArray]"===r?n+=ne:"[object Int16Array]"===r?n+=oe:"[object Uint16Array]"===r?n+=ae:"[object Int32Array]"===r?n+=se:"[object Uint32Array]"===r?n+=le:"[object Float32Array]"===r?n+=de:"[object Float64Array]"===r?n+=ce:t(new Error("Failed to get type for BinaryArray"))),t(n+fe(i))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r=Y+e.type+"~"+fe(this.result);t(Z+te+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}}function ge(e){if(e.substring(0,X)!==Z)return JSON.parse(e);var t,r=e.substring(ue),i=e.substring(X,ue);if(i===te&&Q.test(r)){var n=r.match(Q);t=n[1],r=r.substring(n[0].length)}var o=he(r);switch(i){case ee:return o;case te:return l([o],{type:t});case re:return new Int8Array(o);case ie:return new Uint8Array(o);case ne:return new Uint8ClampedArray(o);case oe:return new Int16Array(o);case ae:return new Uint16Array(o);case se:return new Int32Array(o);case le:return new Uint32Array(o);case de:return new Float32Array(o);case ce:return new Float64Array(o);default:throw new Error("Unkown type: "+i)}}var ye={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:fe};function ve(e,t,r,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,i)}function be(e){var t=this,r={db:null};if(e)for(var i in e)r[i]="string"!=typeof e[i]?e[i].toString():e[i];var n=new d((function(e,i){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return i(e)}r.db.transaction((function(n){ve(n,r,(function(){t._dbInfo=r,e()}),(function(e,t){i(t)}))}),i)}));return r.serializer=ye,n}function we(e,t,r,i,n,o){e.executeSql(r,i,n,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):ve(e,t,(function(){e.executeSql(r,i,n,o)}),o)}),o):o(e,s)}),o)}function _e(e,t){var r=this;e=p(e);var i=new d((function(t,i){r.ready().then((function(){var n=r._dbInfo;n.db.transaction((function(r){we(r,n,"SELECT * FROM "+n.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var i=r.rows.length?r.rows.item(0).value:null;i&&(i=n.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return c(i,t),i}function xe(e,t){var r=this,i=new d((function(t,i){r.ready().then((function(){var n=r._dbInfo;n.db.transaction((function(r){we(r,n,"SELECT * FROM "+n.storeName,[],(function(r,i){for(var o=i.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),d=l.value;if(d&&(d=n.serializer.deserialize(d)),void 0!==(d=e(d,l.key,a+1)))return void t(d)}t()}),(function(e,t){i(t)}))}))})).catch(i)}));return c(i,t),i}function Se(e,t,r,i){var n=this;e=p(e);var o=new d((function(o,s){n.ready().then((function(){void 0===t&&(t=null);var a=t,l=n._dbInfo;l.serializer.serialize(t,(function(t,d){d?s(d):l.db.transaction((function(r){we(r,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void o(Se.apply(n,[e,a,r,i-1]));s(t)}}))}))})).catch(s)}));return c(o,r),o}function ke(e,t,r){return Se.apply(this,[e,t,r,1])}function Ee(e,t){var r=this;e=p(e);var i=new d((function(t,i){r.ready().then((function(){var n=r._dbInfo;n.db.transaction((function(r){we(r,n,"DELETE FROM "+n.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return c(i,t),i}function Te(e){var t=this,r=new d((function(e,r){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){we(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return c(r,e),r}function Be(e){var t=this,r=new d((function(e,r){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){we(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,r){var i=r.rows.item(0).c;e(i)}),(function(e,t){r(t)}))}))})).catch(r)}));return c(r,e),r}function Ce(e,t){var r=this,i=new d((function(t,i){r.ready().then((function(){var n=r._dbInfo;n.db.transaction((function(r){we(r,n,"SELECT key FROM "+n.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var i=r.rows.length?r.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return c(i,t),i}function Ie(e){var t=this,r=new d((function(e,r){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){we(t,i,"SELECT key FROM "+i.storeName,[],(function(t,r){for(var i=[],n=0;n<r.rows.length;n++)i.push(r.rows.item(n).key);e(i)}),(function(e,t){r(t)}))}))})).catch(r)}));return c(r,e),r}function Ae(e){return new d((function(t,r){e.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,i){for(var n=[],o=0;o<i.rows.length;o++)n.push(i.rows.item(o).name);t({db:e,storeNames:n})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}function Fe(e,t){t=h.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var i,n=this;return i=e.name?new d((function(t){var i;i=e.name===r.name?n._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:i,storeNames:[e.storeName]}):t(Ae(i))})).then((function(e){return new d((function(t,r){e.db.transaction((function(i){function n(e){return new d((function(t,r){i.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],s=0,a=e.storeNames.length;s<a;s++)o.push(n(e.storeNames[s]));d.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):d.reject("Invalid arguments"),c(i,t),i}var Me={_driver:"webSQLStorage",_initStorage:be,_support:V(),iterate:xe,getItem:_e,setItem:ke,removeItem:Ee,clear:Te,length:Be,key:Ce,keys:Ie,dropInstance:Fe};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Re(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function Pe(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function Oe(){return!Pe()||localStorage.length>0}function ze(e){var t=this,r={};if(e)for(var i in e)r[i]=e[i];return r.keyPrefix=Re(e,t._defaultConfig),Oe()?(t._dbInfo=r,r.serializer=ye,d.resolve()):d.reject()}function Ne(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var i=localStorage.key(r);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return c(r,e),r}function qe(e,t){var r=this;e=p(e);var i=r.ready().then((function(){var t=r._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return c(i,t),i}function Ue(e,t){var r=this,i=r.ready().then((function(){for(var t=r._dbInfo,i=t.keyPrefix,n=i.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(i)){var d=localStorage.getItem(l);if(d&&(d=t.serializer.deserialize(d)),void 0!==(d=e(d,l.substring(n),s++)))return d}}}));return c(i,t),i}function Le(e,t){var r=this,i=r.ready().then((function(){var t,i=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t}));return c(i,t),i}function je(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,i=[],n=0;n<r;n++){var o=localStorage.key(n);0===o.indexOf(e.keyPrefix)&&i.push(o.substring(e.keyPrefix.length))}return i}));return c(r,e),r}function He(e){var t=this.keys().then((function(e){return e.length}));return c(t,e),t}function $e(e,t){var r=this;e=p(e);var i=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return c(i,t),i}function Ge(e,t,r){var i=this;e=p(e);var n=i.ready().then((function(){void 0===t&&(t=null);var r=t;return new d((function(n,o){var s=i._dbInfo;s.serializer.serialize(t,(function(t,i){if(i)o(i);else try{localStorage.setItem(s.keyPrefix+e,t),n(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return c(n,r),n}function We(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var i,n=this;return i=e.name?new d((function(t){e.storeName?t(Re(e,n._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):d.reject("Invalid arguments"),c(i,t),i}var Ke={_driver:"localStorageWrapper",_initStorage:ze,_support:De(),iterate:Ue,getItem:qe,setItem:Ge,removeItem:$e,clear:Ne,length:He,key:Le,keys:je,dropInstance:We},Ve=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Je=function(e,t){for(var r=e.length,i=0;i<r;){if(Ve(e[i],t))return!0;i++}return!1},Ye=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Qe={},Ze={},Xe={INDEXEDDB:K,WEBSQL:Me,LOCALSTORAGE:Ke},et=[Xe.INDEXEDDB._driver,Xe.WEBSQL._driver,Xe.LOCALSTORAGE._driver],tt=["dropInstance"],rt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),it={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function nt(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ot(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(Ye(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var st=function(){function e(t){for(var r in n(this,e),Xe)if(Xe.hasOwnProperty(r)){var i=Xe[r],o=i._driver;this[r]=o,Qe[o]||this.defineDriver(i)}this._defaultConfig=ot({},it),this._config=ot({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":i(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var i=new d((function(t,r){try{var i=e._driver,n=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(n);for(var o=rt.concat("_initStorage"),s=0,a=o.length;s<a;s++){var l=o[s];if((!Je(tt,l)||e[l])&&"function"!=typeof e[l])return void r(n)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=d.reject(t);return c(r,arguments[arguments.length-1]),r}},r=0,i=tt.length;r<i;r++){var n=tt[r];e[n]||(e[n]=t(n))}};u();var p=function(r){Qe[i]&&console.info("Redefining LocalForage driver: "+i),Qe[i]=e,Ze[i]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(p,r):p(!!e._support):p(!0)}catch(e){r(e)}}));return u(i,t,r),i},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var i=Qe[e]?d.resolve(Qe[e]):d.reject(new Error("Driver not found."));return u(i,t,r),i},e.prototype.getSerializer=function(e){var t=d.resolve(ye);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var i=this;Ye(e)||(e=[e]);var n=this._getSupportedDrivers(e);function o(){i._config.driver=i.driver()}function s(e){return i._extend(e),o(),i._ready=i._initStorage(i._config),i._ready}function a(e){return function(){var t=0;function r(){for(;t<e.length;){var n=e[t];return t++,i._dbInfo=null,i._ready=null,i.getDriver(n).then(s).catch(r)}o();var a=new Error("No available storage method found.");return i._driverSet=d.reject(a),i._driverSet}return r()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return d.resolve()})):d.resolve();return this._driverSet=l.then((function(){var e=n[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then((function(e){i._driver=e._driver,o(),i._wrapLibraryMethodsWithReady(),i._initDriver=a(n)}))})).catch((function(){o();var e=new Error("No available storage method found.");return i._driverSet=d.reject(e),i._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!Ze[e]},e.prototype._extend=function(e){ot(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,i=e.length;r<i;r++){var n=e[r];this.supports(n)&&t.push(n)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=rt.length;e<t;e++)nt(this,rt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new st;t.exports=at},{3:3}]},{},[4])(4)},46111:e=>{var t=1/0,r=9007199254740991,i=17976931348623157e292,n=NaN,o="[object Arguments]",s="[object Function]",a="[object GeneratorFunction]",l="[object String]",d="[object Symbol]",c=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=/^(?:0|[1-9]\d*)$/,m=parseInt;function g(e){return e!=e}function y(e,t){return function(e,t){for(var r=-1,i=e?e.length:0,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}(t,(function(t){return e[t]}))}var v,b,w=Object.prototype,_=w.hasOwnProperty,x=w.toString,S=w.propertyIsEnumerable,k=(v=Object.keys,b=Object,function(e){return v(b(e))}),E=Math.max;function T(e,t){var r=I(e)||function(e){return function(e){return M(e)&&A(e)}(e)&&_.call(e,"callee")&&(!S.call(e,"callee")||x.call(e)==o)}(e)?function(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}(e.length,String):[],i=r.length,n=!!i;for(var s in e)!t&&!_.call(e,s)||n&&("length"==s||C(s,i))||r.push(s);return r}function B(e){if(r=(t=e)&&t.constructor,i="function"==typeof r&&r.prototype||w,t!==i)return k(e);var t,r,i,n=[];for(var o in Object(e))_.call(e,o)&&"constructor"!=o&&n.push(o);return n}function C(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}var I=Array.isArray;function A(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=F(e)?x.call(e):"";return t==s||t==a}(e)}function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function M(e){return!!e&&"object"==typeof e}e.exports=function(e,r,o,s){var a;e=A(e)?e:(a=e)?y(a,function(e){return A(e)?T(e):B(e)}(a)):[],o=o&&!s?function(e){var r=function(e){if(!e)return 0===e?e:0;if(e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||M(e)&&x.call(e)==d}(e))return n;if(F(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=F(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var r=p.test(e);return r||h.test(e)?m(e.slice(2),r?2:8):u.test(e)?n:+e}(e),e===t||e===-1/0){return(e<0?-1:1)*i}return e==e?e:0}(e),o=r%1;return r==r?o?r-o:r:0}(o):0;var f=e.length;return o<0&&(o=E(f+o,0)),function(e){return"string"==typeof e||!I(e)&&M(e)&&x.call(e)==l}(e)?o<=f&&e.indexOf(r,o)>-1:!!f&&function(e,t,r){if(t!=t)return function(e,t,r,i){for(var n=e.length,o=r+(i?1:-1);i?o--:++o<n;)if(t(e[o],o,e))return o;return-1}(e,g,r);for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}(e,r,o)>-1}},87914:e=>{var t=Object.prototype.toString;e.exports=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Boolean]"==t.call(e)}},58928:e=>{var t=1/0,r=17976931348623157e292,i=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt,c=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){return"number"==typeof e&&e==function(e){var p=function(e){if(!e)return 0===e?e:0;if(e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==n}(e))return i;if(u(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=u(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||l.test(e)?d(e.slice(2),r?2:8):s.test(e)?i:+e}(e),e===t||e===-1/0){return(e<0?-1:1)*r}return e==e?e:0}(e),h=p%1;return p==p?h?p-h:p:0}(e)}},73639:e=>{var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Number]"==t.call(e)}},79001:e=>{var t,r,i=Function.prototype,n=Object.prototype,o=i.toString,s=n.hasOwnProperty,a=o.call(Object),l=n.toString,d=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=l.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=d(e);if(null===t)return!0;var r=s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&o.call(r)==a}},45931:e=>{var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){return"string"==typeof e||!r(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},67083:e=>{var t=1/0,r=17976931348623157e292,i=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt,c=Object.prototype.toString;function u(e,u){var h;if("function"!=typeof u)throw new TypeError("Expected a function");return e=function(e){var u=function(e){if(!e)return 0===e?e:0;if(e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==n}(e))return i;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||l.test(e)?d(e.slice(2),r?2:8):s.test(e)?i:+e}(e),e===t||e===-1/0){return(e<0?-1:1)*r}return e==e?e:0}(e),h=u%1;return u==u?h?u-h:u:0}(e),function(){return--e>0&&(h=u.apply(this,arguments)),e<=1&&(u=void 0),h}}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){return u(2,e)}},55580:(e,t,r)=>{var i=r(56110)(r(9325),"DataView");e.exports=i},21549:(e,t,r)=>{var i=r(22032),n=r(63862),o=r(66721),s=r(12749),a=r(35749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},80079:(e,t,r)=>{var i=r(63702),n=r(70080),o=r(24739),s=r(48655),a=r(31175);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},68223:(e,t,r)=>{var i=r(56110)(r(9325),"Map");e.exports=i},53661:(e,t,r)=>{var i=r(63040),n=r(17670),o=r(90289),s=r(4509),a=r(72949);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=n,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},32804:(e,t,r)=>{var i=r(56110)(r(9325),"Promise");e.exports=i},76545:(e,t,r)=>{var i=r(56110)(r(9325),"Set");e.exports=i},38859:(e,t,r)=>{var i=r(53661),n=r(31380),o=r(51459);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=n,s.prototype.has=o,e.exports=s},37217:(e,t,r)=>{var i=r(80079),n=r(51420),o=r(90938),s=r(63605),a=r(29817),l=r(80945);function d(e){var t=this.__data__=new i(e);this.size=t.size}d.prototype.clear=n,d.prototype.delete=o,d.prototype.get=s,d.prototype.has=a,d.prototype.set=l,e.exports=d},51873:(e,t,r)=>{var i=r(9325).Symbol;e.exports=i},37828:(e,t,r)=>{var i=r(9325).Uint8Array;e.exports=i},28303:(e,t,r)=>{var i=r(56110)(r(9325),"WeakMap");e.exports=i},91033:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},83729:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}},79770:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length,n=0,o=[];++r<i;){var s=e[r];t(s,r,e)&&(o[n++]=s)}return o}},70695:(e,t,r)=>{var i=r(78096),n=r(72428),o=r(56449),s=r(3656),a=r(30361),l=r(37167),d=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),c=!r&&n(e),u=!r&&!c&&s(e),p=!r&&!c&&!u&&l(e),h=r||c||u||p,f=h?i(e.length,String):[],m=f.length;for(var g in e)!t&&!d.call(e,g)||h&&("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},14528:e=>{e.exports=function(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}},14248:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}},87805:(e,t,r)=>{var i=r(43360),n=r(75288);e.exports=function(e,t,r){(void 0!==r&&!n(e[t],r)||void 0===r&&!(t in e))&&i(e,t,r)}},16547:(e,t,r)=>{var i=r(43360),n=r(75288),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&n(s,r)&&(void 0!==r||t in e)||i(e,t,r)}},26025:(e,t,r)=>{var i=r(75288);e.exports=function(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}},74733:(e,t,r)=>{var i=r(21791),n=r(95950);e.exports=function(e,t){return e&&i(t,n(t),e)}},43838:(e,t,r)=>{var i=r(21791),n=r(37241);e.exports=function(e,t){return e&&i(t,n(t),e)}},43360:(e,t,r)=>{var i=r(93243);e.exports=function(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},9999:(e,t,r)=>{var i=r(37217),n=r(83729),o=r(16547),s=r(74733),a=r(43838),l=r(93290),d=r(23007),c=r(92271),u=r(48948),p=r(50002),h=r(83349),f=r(5861),m=r(76189),g=r(77199),y=r(35529),v=r(56449),b=r(3656),w=r(87730),_=r(23805),x=r(38440),S=r(95950),k=r(37241),E="[object Arguments]",T="[object Function]",B="[object Object]",C={};C[E]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[B]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[T]=C["[object WeakMap]"]=!1,e.exports=function e(t,r,I,A,F,M){var D,R=1&r,P=2&r,O=4&r;if(I&&(D=F?I(t,A,F,M):I(t)),void 0!==D)return D;if(!_(t))return t;var z=v(t);if(z){if(D=m(t),!R)return d(t,D)}else{var N=f(t),q=N==T||"[object GeneratorFunction]"==N;if(b(t))return l(t,R);if(N==B||N==E||q&&!F){if(D=P||q?{}:y(t),!R)return P?u(t,a(D,t)):c(t,s(D,t))}else{if(!C[N])return F?t:{};D=g(t,N,R)}}M||(M=new i);var U=M.get(t);if(U)return U;M.set(t,D),x(t)?t.forEach((function(i){D.add(e(i,r,I,i,t,M))})):w(t)&&t.forEach((function(i,n){D.set(n,e(i,r,I,n,t,M))}));var L=z?void 0:(O?P?h:p:P?k:S)(t);return n(L||t,(function(i,n){L&&(i=t[n=i]),o(D,n,e(i,r,I,n,t,M))})),D}},39344:(e,t,r)=>{var i=r(23805),n=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(n)return n(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},83120:(e,t,r)=>{var i=r(14528),n=r(45891);e.exports=function e(t,r,o,s,a){var l=-1,d=t.length;for(o||(o=n),a||(a=[]);++l<d;){var c=t[l];r>0&&o(c)?r>1?e(c,r-1,o,s,a):i(a,c):s||(a[a.length]=c)}return a}},86649:(e,t,r)=>{var i=r(83221)();e.exports=i},82199:(e,t,r)=>{var i=r(14528),n=r(56449);e.exports=function(e,t,r){var o=t(e);return n(e)?o:i(o,r(e))}},72552:(e,t,r)=>{var i=r(51873),n=r(659),o=r(59350),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?n(e):o(e)}},27534:(e,t,r)=>{var i=r(72552),n=r(40346);e.exports=function(e){return n(e)&&"[object Arguments]"==i(e)}},60270:(e,t,r)=>{var i=r(87068),n=r(40346);e.exports=function e(t,r,o,s,a){return t===r||(null==t||null==r||!n(t)&&!n(r)?t!=t&&r!=r:i(t,r,o,s,e,a))}},87068:(e,t,r)=>{var i=r(37217),n=r(25911),o=r(21986),s=r(50689),a=r(5861),l=r(56449),d=r(3656),c=r(37167),u="[object Arguments]",p="[object Array]",h="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var v=l(e),b=l(t),w=v?p:a(e),_=b?p:a(t),x=(w=w==u?h:w)==h,S=(_=_==u?h:_)==h,k=w==_;if(k&&d(e)){if(!d(t))return!1;v=!0,x=!1}if(k&&!x)return y||(y=new i),v||c(e)?n(e,t,r,m,g,y):o(e,t,w,r,m,g,y);if(!(1&r)){var E=x&&f.call(e,"__wrapped__"),T=S&&f.call(t,"__wrapped__");if(E||T){var B=E?e.value():e,C=T?t.value():t;return y||(y=new i),g(B,C,r,m,y)}}return!!k&&(y||(y=new i),s(e,t,r,m,g,y))}},29172:(e,t,r)=>{var i=r(5861),n=r(40346);e.exports=function(e){return n(e)&&"[object Map]"==i(e)}},45083:(e,t,r)=>{var i=r(1882),n=r(87296),o=r(23805),s=r(47473),a=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,c=l.toString,u=d.hasOwnProperty,p=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||n(e))&&(i(e)?p:a).test(s(e))}},16038:(e,t,r)=>{var i=r(5861),n=r(40346);e.exports=function(e){return n(e)&&"[object Set]"==i(e)}},4901:(e,t,r)=>{var i=r(72552),n=r(30294),o=r(40346),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&n(e.length)&&!!s[i(e)]}},88984:(e,t,r)=>{var i=r(55527),n=r(3650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return n(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},72903:(e,t,r)=>{var i=r(23805),n=r(55527),o=r(90181),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=n(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},85250:(e,t,r)=>{var i=r(37217),n=r(87805),o=r(86649),s=r(42824),a=r(23805),l=r(37241),d=r(14974);e.exports=function e(t,r,c,u,p){t!==r&&o(r,(function(o,l){if(p||(p=new i),a(o))s(t,r,l,c,e,u,p);else{var h=u?u(d(t,l),o,l+"",t,r,p):void 0;void 0===h&&(h=o),n(t,l,h)}}),l)}},42824:(e,t,r)=>{var i=r(87805),n=r(93290),o=r(71961),s=r(23007),a=r(35529),l=r(72428),d=r(56449),c=r(83693),u=r(3656),p=r(1882),h=r(23805),f=r(11331),m=r(37167),g=r(14974),y=r(69884);e.exports=function(e,t,r,v,b,w,_){var x=g(e,r),S=g(t,r),k=_.get(S);if(k)i(e,r,k);else{var E=w?w(x,S,r+"",e,t,_):void 0,T=void 0===E;if(T){var B=d(S),C=!B&&u(S),I=!B&&!C&&m(S);E=S,B||C||I?d(x)?E=x:c(x)?E=s(x):C?(T=!1,E=n(S,!0)):I?(T=!1,E=o(S,!0)):E=[]:f(S)||l(S)?(E=x,l(x)?E=y(x):h(x)&&!p(x)||(E=a(S))):T=!1}T&&(_.set(S,E),b(E,S,v,w,_),_.delete(S)),i(e,r,E)}}},13195:e=>{var t=Math.floor,r=Math.random;e.exports=function(e,i){return e+t(r()*(i-e+1))}},69302:(e,t,r)=>{var i=r(83488),n=r(56757),o=r(32865);e.exports=function(e,t){return o(n(e,t,i),e+"")}},19570:(e,t,r)=>{var i=r(37334),n=r(93243),o=r(83488),s=n?function(e,t){return n(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=s},25160:e=>{e.exports=function(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(n);++i<n;)o[i]=e[i+t];return o}},78096:e=>{e.exports=function(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}},54128:(e,t,r)=>{var i=r(31800),n=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(n,""):e}},27301:e=>{e.exports=function(e){return function(t){return e(t)}}},19219:e=>{e.exports=function(e,t){return e.has(t)}},49653:(e,t,r)=>{var i=r(37828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},93290:(e,t,r)=>{e=r.nmd(e);var i=r(9325),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,i=a?a(r):new e.constructor(r);return e.copy(i),i}},76169:(e,t,r)=>{var i=r(49653);e.exports=function(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},73201:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},93736:(e,t,r)=>{var i=r(51873),n=i?i.prototype:void 0,o=n?n.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},71961:(e,t,r)=>{var i=r(49653);e.exports=function(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},23007:e=>{e.exports=function(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}},21791:(e,t,r)=>{var i=r(16547),n=r(43360);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,l=t.length;++a<l;){var d=t[a],c=o?o(r[d],e[d],d,r,e):void 0;void 0===c&&(c=e[d]),s?n(r,d,c):i(r,d,c)}return r}},92271:(e,t,r)=>{var i=r(21791),n=r(4664);e.exports=function(e,t){return i(e,n(e),t)}},48948:(e,t,r)=>{var i=r(21791),n=r(86375);e.exports=function(e,t){return i(e,n(e),t)}},55481:(e,t,r)=>{var i=r(9325)["__core-js_shared__"];e.exports=i},20999:(e,t,r)=>{var i=r(69302),n=r(36800);e.exports=function(e){return i((function(t,r){var i=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&n(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++i<o;){var l=r[i];l&&e(t,l,i,s)}return t}))}},83221:e=>{e.exports=function(e){return function(t,r,i){for(var n=-1,o=Object(t),s=i(t),a=s.length;a--;){var l=s[e?a:++n];if(!1===r(o[l],l,o))break}return t}}},93243:(e,t,r)=>{var i=r(56110),n=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},25911:(e,t,r)=>{var i=r(38859),n=r(14248),o=r(19219);e.exports=function(e,t,r,s,a,l){var d=1&r,c=e.length,u=t.length;if(c!=u&&!(d&&u>c))return!1;var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var f=-1,m=!0,g=2&r?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var y=e[f],v=t[f];if(s)var b=d?s(v,y,f,t,e,l):s(y,v,f,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!n(t,(function(e,t){if(!o(g,t)&&(y===e||a(y,e,r,s,l)))return g.push(t)}))){m=!1;break}}else if(y!==v&&!a(y,v,r,s,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},21986:(e,t,r)=>{var i=r(51873),n=r(37828),o=r(75288),s=r(25911),a=r(20317),l=r(84247),d=i?i.prototype:void 0,c=d?d.valueOf:void 0;e.exports=function(e,t,r,i,d,u,p){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new n(e),new n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var f=1&i;if(h||(h=l),e.size!=t.size&&!f)return!1;var m=p.get(e);if(m)return m==t;i|=2,p.set(e,t);var g=s(h(e),h(t),i,d,u,p);return p.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},50689:(e,t,r)=>{var i=r(50002),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var l=1&r,d=i(e),c=d.length;if(c!=i(t).length&&!l)return!1;for(var u=c;u--;){var p=d[u];if(!(l?p in t:n.call(t,p)))return!1}var h=a.get(e),f=a.get(t);if(h&&f)return h==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++u<c;){var y=e[p=d[u]],v=t[p];if(o)var b=l?o(v,y,p,t,e,a):o(y,v,p,e,t,a);if(!(void 0===b?y===v||s(y,v,r,o,a):b)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return a.delete(e),a.delete(t),m}},34840:(e,t,r)=>{var i="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=i},50002:(e,t,r)=>{var i=r(82199),n=r(4664),o=r(95950);e.exports=function(e){return i(e,o,n)}},83349:(e,t,r)=>{var i=r(82199),n=r(86375),o=r(37241);e.exports=function(e){return i(e,o,n)}},12651:(e,t,r)=>{var i=r(74218);e.exports=function(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}},56110:(e,t,r)=>{var i=r(45083),n=r(10392);e.exports=function(e,t){var r=n(e,t);return i(r)?r:void 0}},28879:(e,t,r)=>{var i=r(74335)(Object.getPrototypeOf,Object);e.exports=i},659:(e,t,r)=>{var i=r(51873),n=Object.prototype,o=n.hasOwnProperty,s=n.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var i=!0}catch(e){}var n=s.call(e);return i&&(t?e[a]=r:delete e[a]),n}},4664:(e,t,r)=>{var i=r(79770),n=r(63345),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:n;e.exports=a},86375:(e,t,r)=>{var i=r(14528),n=r(28879),o=r(4664),s=r(63345),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=n(e);return t}:s;e.exports=a},5861:(e,t,r)=>{var i=r(55580),n=r(68223),o=r(32804),s=r(76545),a=r(28303),l=r(72552),d=r(47473),c="[object Map]",u="[object Promise]",p="[object Set]",h="[object WeakMap]",f="[object DataView]",m=d(i),g=d(n),y=d(o),v=d(s),b=d(a),w=l;(i&&w(new i(new ArrayBuffer(1)))!=f||n&&w(new n)!=c||o&&w(o.resolve())!=u||s&&w(new s)!=p||a&&w(new a)!=h)&&(w=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,i=r?d(r):"";if(i)switch(i){case m:return f;case g:return c;case y:return u;case v:return p;case b:return h}return t}),e.exports=w},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},22032:(e,t,r)=>{var i=r(81042);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},63862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},66721:(e,t,r)=>{var i=r(81042),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(t,e)?t[e]:void 0}},12749:(e,t,r)=>{var i=r(81042),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:n.call(t,e)}},35749:(e,t,r)=>{var i=r(81042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},76189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,i=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},77199:(e,t,r)=>{var i=r(49653),n=r(76169),o=r(73201),s=r(93736),a=r(71961);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return n(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},35529:(e,t,r)=>{var i=r(39344),n=r(28879),o=r(55527);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(n(e))}},45891:(e,t,r)=>{var i=r(51873),n=r(72428),o=r(56449),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||n(e)||!!(s&&e&&e[s])}},30361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var i=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<r}},36800:(e,t,r)=>{var i=r(75288),n=r(64894),o=r(30361),s=r(23805);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return!!("number"==a?n(r)&&o(t,r.length):"string"==a&&t in r)&&i(r[t],e)}},74218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},87296:(e,t,r)=>{var i,n=r(55481),o=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},55527:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},63702:e=>{e.exports=function(){this.__data__=[],this.size=0}},70080:(e,t,r)=>{var i=r(26025),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():n.call(t,r,1),--this.size,!0)}},24739:(e,t,r)=>{var i=r(26025);e.exports=function(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}},48655:(e,t,r)=>{var i=r(26025);e.exports=function(e){return i(this.__data__,e)>-1}},31175:(e,t,r)=>{var i=r(26025);e.exports=function(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}},63040:(e,t,r)=>{var i=r(21549),n=r(80079),o=r(68223);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||n),string:new i}}},17670:(e,t,r)=>{var i=r(12651);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},90289:(e,t,r)=>{var i=r(12651);e.exports=function(e){return i(this,e).get(e)}},4509:(e,t,r)=>{var i=r(12651);e.exports=function(e){return i(this,e).has(e)}},72949:(e,t,r)=>{var i=r(12651);e.exports=function(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}},20317:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}},81042:(e,t,r)=>{var i=r(56110)(Object,"create");e.exports=i},3650:(e,t,r)=>{var i=r(74335)(Object.keys,Object);e.exports=i},90181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},86009:(e,t,r)=>{e=r.nmd(e);var i=r(34840),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n&&i.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74335:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},56757:(e,t,r)=>{var i=r(91033),n=Math.max;e.exports=function(e,t,r){return t=n(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=n(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var d=Array(t+1);++s<t;)d[s]=o[s];return d[t]=r(l),i(e,this,d)}}},9325:(e,t,r)=>{var i=r(34840),n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")();e.exports=o},14974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},31380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},51459:e=>{e.exports=function(e){return this.__data__.has(e)}},84247:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},32865:(e,t,r)=>{var i=r(19570),n=r(51811)(i);e.exports=n},51811:e=>{var t=Date.now;e.exports=function(e){var r=0,i=0;return function(){var n=t(),o=16-(n-i);if(i=n,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},51420:(e,t,r)=>{var i=r(80079);e.exports=function(){this.__data__=new i,this.size=0}},90938:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},63605:e=>{e.exports=function(e){return this.__data__.get(e)}},29817:e=>{e.exports=function(e){return this.__data__.has(e)}},80945:(e,t,r)=>{var i=r(80079),n=r(68223),o=r(53661);e.exports=function(e,t){var r=this.__data__;if(r instanceof i){var s=r.__data__;if(!n||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},47473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},31800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},21013:(e,t,r)=>{var i=r(25160),n=r(36800),o=r(61489),s=Math.ceil,a=Math.max;e.exports=function(e,t,r){t=(r?n(e,t,r):void 0===t)?1:a(o(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var d=0,c=0,u=Array(s(l/t));d<l;)u[c++]=i(e,d,d+=t);return u}},88055:(e,t,r)=>{var i=r(9999);e.exports=function(e){return i(e,5)}},37334:e=>{e.exports=function(e){return function(){return e}}},38221:(e,t,r)=>{var i=r(23805),n=r(10124),o=r(99374),s=Math.max,a=Math.min;e.exports=function(e,t,r){var l,d,c,u,p,h,f=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=l,i=d;return l=d=void 0,f=t,u=e.apply(i,r)}function b(e){var r=e-h;return void 0===h||r>=t||r<0||g&&e-f>=c}function w(){var e=n();if(b(e))return _(e);p=setTimeout(w,function(e){var r=t-(e-h);return g?a(r,c-(e-f)):r}(e))}function _(e){return p=void 0,y&&l?v(e):(l=d=void 0,u)}function x(){var e=n(),r=b(e);if(l=arguments,d=this,h=e,r){if(void 0===p)return function(e){return f=e,p=setTimeout(w,t),m?v(e):u}(h);if(g)return clearTimeout(p),p=setTimeout(w,t),v(h)}return void 0===p&&(p=setTimeout(w,t)),u}return t=o(t)||0,i(r)&&(m=!!r.leading,c=(g="maxWait"in r)?s(o(r.maxWait)||0,t):c,y="trailing"in r?!!r.trailing:y),x.cancel=function(){void 0!==p&&clearTimeout(p),f=0,l=h=d=p=void 0},x.flush=function(){return void 0===p?u:_(n())},x}},75288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},35970:(e,t,r)=>{var i=r(83120);e.exports=function(e){return(null==e?0:e.length)?i(e,1):[]}},83488:e=>{e.exports=function(e){return e}},72428:(e,t,r)=>{var i=r(27534),n=r(40346),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return n(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},56449:e=>{var t=Array.isArray;e.exports=t},64894:(e,t,r)=>{var i=r(1882),n=r(30294);e.exports=function(e){return null!=e&&n(e.length)&&!i(e)}},83693:(e,t,r)=>{var i=r(64894),n=r(40346);e.exports=function(e){return n(e)&&i(e)}},3656:(e,t,r)=>{e=r.nmd(e);var i=r(9325),n=r(89935),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,l=(a?a.isBuffer:void 0)||n;e.exports=l},2404:(e,t,r)=>{var i=r(60270);e.exports=function(e,t){return i(e,t)}},1882:(e,t,r)=>{var i=r(72552),n=r(23805);e.exports=function(e){if(!n(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},30294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},87730:(e,t,r)=>{var i=r(29172),n=r(27301),o=r(86009),s=o&&o.isMap,a=s?n(s):i;e.exports=a},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},11331:(e,t,r)=>{var i=r(72552),n=r(28879),o=r(40346),s=Function.prototype,a=Object.prototype,l=s.toString,d=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=i(e))return!1;var t=n(e);if(null===t)return!0;var r=d.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==c}},38440:(e,t,r)=>{var i=r(16038),n=r(27301),o=r(86009),s=o&&o.isSet,a=s?n(s):i;e.exports=a},44394:(e,t,r)=>{var i=r(72552),n=r(40346);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==i(e)}},37167:(e,t,r)=>{var i=r(4901),n=r(27301),o=r(86009),s=o&&o.isTypedArray,a=s?n(s):i;e.exports=a},95950:(e,t,r)=>{var i=r(70695),n=r(88984),o=r(64894);e.exports=function(e){return o(e)?i(e):n(e)}},37241:(e,t,r)=>{var i=r(70695),n=r(72903),o=r(64894);e.exports=function(e){return o(e)?i(e,!0):n(e)}},2543:function(e,t,r){var i;
|
||
/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/e=r.nmd(e),function(){var n,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,d=32,c=64,u=128,p=256,h=1/0,f=9007199254740991,m=NaN,g=4294967295,y=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",d],["partialRight",c],["rearg",p]],v="[object Arguments]",b="[object Array]",w="[object Boolean]",_="[object Date]",x="[object Error]",S="[object Function]",k="[object GeneratorFunction]",E="[object Map]",T="[object Number]",B="[object Object]",C="[object Promise]",I="[object RegExp]",A="[object Set]",F="[object String]",M="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",N="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",L="[object Uint8Array]",j="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp(V.source),Q=RegExp(J.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),se=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Be="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fe="['’]",Me="["+ke+"]",De="["+Ae+"]",Re="["+Ee+"]",Pe="\\d+",Oe="["+Te+"]",ze="["+Be+"]",Ne="[^"+ke+Ae+Pe+Te+Be+Ce+"]",qe="\\ud83c[\\udffb-\\udfff]",Ue="[^"+ke+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",$e="\\u200d",Ge="(?:"+ze+"|"+Ne+")",We="(?:"+He+"|"+Ne+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",Je="(?:"+Re+"|"+qe+")"+"?",Ye="["+Ie+"]?",Qe=Ye+Je+("(?:"+$e+"(?:"+[Ue,Le,je].join("|")+")"+Ye+Je+")*"),Ze="(?:"+[Oe,Le,je].join("|")+")"+Qe,Xe="(?:"+[Ue+Re+"?",Re,Le,je,Me].join("|")+")",et=RegExp(Fe,"g"),tt=RegExp(Re,"g"),rt=RegExp(qe+"(?="+qe+")|"+Xe+Qe,"g"),it=RegExp([He+"?"+ze+"+"+Ke+"(?="+[De,He,"$"].join("|")+")",We+"+"+Ve+"(?="+[De,He+Ge,"$"].join("|")+")",He+"?"+Ge+"+"+Ke,He+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ze].join("|"),"g"),nt=RegExp("["+$e+ke+Ee+Ie+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[O]=lt[z]=lt[N]=lt[q]=lt[U]=lt[L]=lt[j]=lt[H]=lt[$]=!0,lt[v]=lt[b]=lt[R]=lt[w]=lt[P]=lt[_]=lt[x]=lt[S]=lt[E]=lt[T]=lt[B]=lt[I]=lt[A]=lt[F]=lt[D]=!1;var dt={};dt[v]=dt[b]=dt[R]=dt[P]=dt[w]=dt[_]=dt[O]=dt[z]=dt[N]=dt[q]=dt[U]=dt[E]=dt[T]=dt[B]=dt[I]=dt[A]=dt[F]=dt[M]=dt[L]=dt[j]=dt[H]=dt[$]=!0,dt[x]=dt[S]=dt[D]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,pt=parseInt,ht="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||ft||Function("return this")(),gt=t&&!t.nodeType&&t,yt=gt&&e&&!e.nodeType&&e,vt=yt&&yt.exports===gt,bt=vt&&ht.process,wt=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),_t=wt&&wt.isArrayBuffer,xt=wt&&wt.isDate,St=wt&&wt.isMap,kt=wt&&wt.isRegExp,Et=wt&&wt.isSet,Tt=wt&&wt.isTypedArray;function Bt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,i){for(var n=-1,o=null==e?0:e.length;++n<o;){var s=e[n];t(i,s,r(s),e)}return i}function It(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ft(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(!t(e[r],r,e))return!1;return!0}function Mt(e,t){for(var r=-1,i=null==e?0:e.length,n=0,o=[];++r<i;){var s=e[r];t(s,r,e)&&(o[n++]=s)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Rt(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}function Pt(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}function Ot(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}function zt(e,t,r,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(r=e[++n]);++n<o;)r=t(r,e[n],n,e);return r}function Nt(e,t,r,i){var n=null==e?0:e.length;for(i&&n&&(r=e[--n]);n--;)r=t(r,e[n],n,e);return r}function qt(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var Ut=Kt("length");function Lt(e,t,r){var i;return r(e,(function(e,r,n){if(t(e,r,n))return i=r,!1})),i}function jt(e,t,r,i){for(var n=e.length,o=r+(i?1:-1);i?o--:++o<n;)if(t(e[o],o,e))return o;return-1}function Ht(e,t,r){return t==t?function(e,t,r){var i=r-1,n=e.length;for(;++i<n;)if(e[i]===t)return i;return-1}(e,t,r):jt(e,Gt,r)}function $t(e,t,r,i){for(var n=r-1,o=e.length;++n<o;)if(i(e[n],t))return n;return-1}function Gt(e){return e!=e}function Wt(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:m}function Kt(e){return function(t){return null==t?n:t[e]}}function Vt(e){return function(t){return null==e?n:e[t]}}function Jt(e,t,r,i,n){return n(e,(function(e,n,o){r=i?(i=!1,e):t(r,e,n,o)})),r}function Yt(e,t){for(var r,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==n&&(r=r===n?s:r+s)}return r}function Qt(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}function Zt(e){return e?e.slice(0,mr(e)+1).replace(se,""):e}function Xt(e){return function(t){return e(t)}}function er(e,t){return Pt(t,(function(t){return e[t]}))}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,i=e.length;++r<i&&Ht(t,e[r],0)>-1;);return r}function ir(e,t){for(var r=e.length;r--&&Ht(t,e[r],0)>-1;);return r}var nr=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),or=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sr(e){return"\\"+ct[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}function dr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,i=e.length,n=0,o=[];++r<i;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[n++]=r)}return o}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function pr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function hr(e){return ar(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):Ut(e)}function fr(e){return ar(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}function mr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var gr=Vt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yr=function e(t){var r,i=(t=null==t?mt:yr.defaults(mt.Object(),t,yr.pick(mt,st))).Array,ae=t.Date,ke=t.Error,Ee=t.Function,Te=t.Math,Be=t.Object,Ce=t.RegExp,Ie=t.String,Ae=t.TypeError,Fe=i.prototype,Me=Ee.prototype,De=Be.prototype,Re=t["__core-js_shared__"],Pe=Me.toString,Oe=De.hasOwnProperty,ze=0,Ne=(r=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",qe=De.toString,Ue=Pe.call(Be),Le=mt._,je=Ce("^"+Pe.call(Oe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=vt?t.Buffer:n,$e=t.Symbol,Ge=t.Uint8Array,We=He?He.allocUnsafe:n,Ke=dr(Be.getPrototypeOf,Be),Ve=Be.create,Je=De.propertyIsEnumerable,Ye=Fe.splice,Qe=$e?$e.isConcatSpreadable:n,Ze=$e?$e.iterator:n,Xe=$e?$e.toStringTag:n,rt=function(){try{var e=ho(Be,"defineProperty");return e({},"",{}),e}catch(e){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ct=ae&&ae.now!==mt.Date.now&&ae.now,ht=t.setTimeout!==mt.setTimeout&&t.setTimeout,ft=Te.ceil,gt=Te.floor,yt=Be.getOwnPropertySymbols,bt=He?He.isBuffer:n,wt=t.isFinite,Ut=Fe.join,Vt=dr(Be.keys,Be),vr=Te.max,br=Te.min,wr=ae.now,_r=t.parseInt,xr=Te.random,Sr=Fe.reverse,kr=ho(t,"DataView"),Er=ho(t,"Map"),Tr=ho(t,"Promise"),Br=ho(t,"Set"),Cr=ho(t,"WeakMap"),Ir=ho(Be,"create"),Ar=Cr&&new Cr,Fr={},Mr=qo(kr),Dr=qo(Er),Rr=qo(Tr),Pr=qo(Br),Or=qo(Cr),zr=$e?$e.prototype:n,Nr=zr?zr.valueOf:n,qr=zr?zr.toString:n;function Ur(e){if(ra(e)&&!Gs(e)&&!(e instanceof $r)){if(e instanceof Hr)return e;if(Oe.call(e,"__wrapped__"))return Uo(e)}return new Hr(e)}var Lr=function(){function e(){}return function(t){if(!ta(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function jr(){}function Hr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function $r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Kr;++t<r;)this.add(e[t])}function Jr(e){var t=this.__data__=new Wr(e);this.size=t.size}function Yr(e,t){var r=Gs(e),i=!r&&$s(e),n=!r&&!i&&Js(e),o=!r&&!i&&!n&&ca(e),s=r||i||n||o,a=s?Qt(e.length,Ie):[],l=a.length;for(var d in e)!t&&!Oe.call(e,d)||s&&("length"==d||n&&("offset"==d||"parent"==d)||o&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||wo(d,l))||a.push(d);return a}function Qr(e){var t=e.length;return t?e[Vi(0,t-1)]:n}function Zr(e,t){return Oo(An(e),ai(t,0,e.length))}function Xr(e){return Oo(An(e))}function ei(e,t,r){(r!==n&&!Ls(e[t],r)||r===n&&!(t in e))&&oi(e,t,r)}function ti(e,t,r){var i=e[t];Oe.call(e,t)&&Ls(i,r)&&(r!==n||t in e)||oi(e,t,r)}function ri(e,t){for(var r=e.length;r--;)if(Ls(e[r][0],t))return r;return-1}function ii(e,t,r,i){return pi(e,(function(e,n,o){t(i,e,r(e),o)})),i}function ni(e,t){return e&&Fn(t,Ma(t),e)}function oi(e,t,r){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function si(e,t){for(var r=-1,o=t.length,s=i(o),a=null==e;++r<o;)s[r]=a?n:Ba(e,t[r]);return s}function ai(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function li(e,t,r,i,o,s){var a,l=1&t,d=2&t,c=4&t;if(r&&(a=o?r(e,i,o,s):r(e)),a!==n)return a;if(!ta(e))return e;var u=Gs(e);if(u){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!l)return An(e,a)}else{var p=go(e),h=p==S||p==k;if(Js(e))return kn(e,l);if(p==B||p==v||h&&!o){if(a=d||h?{}:vo(e),!l)return d?function(e,t){return Fn(e,mo(e),t)}(e,function(e,t){return e&&Fn(t,Da(t),e)}(a,e)):function(e,t){return Fn(e,fo(e),t)}(e,ni(a,e))}else{if(!dt[p])return o?e:{};a=function(e,t,r){var i=e.constructor;switch(t){case R:return En(e);case w:case _:return new i(+e);case P:return function(e,t){var r=t?En(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case O:case z:case N:case q:case U:case L:case j:case H:case $:return Tn(e,r);case E:return new i;case T:case F:return new i(e);case I:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case M:return n=e,Nr?Be(Nr.call(n)):{}}var n}(e,p,l)}}s||(s=new Jr);var f=s.get(e);if(f)return f;s.set(e,a),aa(e)?e.forEach((function(i){a.add(li(i,t,r,i,e,s))})):ia(e)&&e.forEach((function(i,n){a.set(n,li(i,t,r,n,e,s))}));var m=u?n:(c?d?oo:no:d?Da:Ma)(e);return It(m||e,(function(i,n){m&&(i=e[n=i]),ti(a,n,li(i,t,r,n,e,s))})),a}function di(e,t,r){var i=r.length;if(null==e)return!i;for(e=Be(e);i--;){var o=r[i],s=t[o],a=e[o];if(a===n&&!(o in e)||!s(a))return!1}return!0}function ci(e,t,r){if("function"!=typeof e)throw new Ae(o);return Mo((function(){e.apply(n,r)}),t)}function ui(e,t,r,i){var n=-1,o=Dt,s=!0,a=e.length,l=[],d=t.length;if(!a)return l;r&&(t=Pt(t,Xt(r))),i?(o=Rt,s=!1):t.length>=200&&(o=tr,s=!1,t=new Vr(t));e:for(;++n<a;){var c=e[n],u=null==r?c:r(c);if(c=i||0!==c?c:0,s&&u==u){for(var p=d;p--;)if(t[p]===u)continue e;l.push(c)}else o(t,u,i)||l.push(c)}return l}Ur.templateSettings={escape:Z,evaluate:X,interpolate:ee,variable:"",imports:{_:Ur}},Ur.prototype=jr.prototype,Ur.prototype.constructor=Ur,Hr.prototype=Lr(jr.prototype),Hr.prototype.constructor=Hr,$r.prototype=Lr(jr.prototype),$r.prototype.constructor=$r,Gr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Gr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gr.prototype.get=function(e){var t=this.__data__;if(Ir){var r=t[e];return r===s?n:r}return Oe.call(t,e)?t[e]:n},Gr.prototype.has=function(e){var t=this.__data__;return Ir?t[e]!==n:Oe.call(t,e)},Gr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ir&&t===n?s:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=ri(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ye.call(t,r,1),--this.size,!0)},Wr.prototype.get=function(e){var t=this.__data__,r=ri(t,e);return r<0?n:t[r][1]},Wr.prototype.has=function(e){return ri(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,i=ri(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Gr,map:new(Er||Wr),string:new Gr}},Kr.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return uo(this,e).get(e)},Kr.prototype.has=function(e){return uo(this,e).has(e)},Kr.prototype.set=function(e,t){var r=uo(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this},Vr.prototype.add=Vr.prototype.push=function(e){return this.__data__.set(e,s),this},Vr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Jr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Jr.prototype.get=function(e){return this.__data__.get(e)},Jr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var i=r.__data__;if(!Er||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(i)}return r.set(e,t),this.size=r.size,this};var pi=Rn(wi),hi=Rn(_i,!0);function fi(e,t){var r=!0;return pi(e,(function(e,i,n){return r=!!t(e,i,n)})),r}function mi(e,t,r){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===n?a==a&&!da(a):r(a,l)))var l=a,d=s}return d}function gi(e,t){var r=[];return pi(e,(function(e,i,n){t(e,i,n)&&r.push(e)})),r}function yi(e,t,r,i,n){var o=-1,s=e.length;for(r||(r=bo),n||(n=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yi(a,t-1,r,i,n):Ot(n,a):i||(n[n.length]=a)}return n}var vi=Pn(),bi=Pn(!0);function wi(e,t){return e&&vi(e,t,Ma)}function _i(e,t){return e&&bi(e,t,Ma)}function xi(e,t){return Mt(t,(function(t){return Zs(e[t])}))}function Si(e,t){for(var r=0,i=(t=wn(t,e)).length;null!=e&&r<i;)e=e[No(t[r++])];return r&&r==i?e:n}function ki(e,t,r){var i=t(e);return Gs(e)?i:Ot(i,r(e))}function Ei(e){return null==e?e===n?"[object Undefined]":"[object Null]":Xe&&Xe in Be(e)?function(e){var t=Oe.call(e,Xe),r=e[Xe];try{e[Xe]=n;var i=!0}catch(e){}var o=qe.call(e);i&&(t?e[Xe]=r:delete e[Xe]);return o}(e):function(e){return qe.call(e)}(e)}function Ti(e,t){return e>t}function Bi(e,t){return null!=e&&Oe.call(e,t)}function Ci(e,t){return null!=e&&t in Be(e)}function Ii(e,t,r){for(var o=r?Rt:Dt,s=e[0].length,a=e.length,l=a,d=i(a),c=1/0,u=[];l--;){var p=e[l];l&&t&&(p=Pt(p,Xt(t))),c=br(p.length,c),d[l]=!r&&(t||s>=120&&p.length>=120)?new Vr(l&&p):n}p=e[0];var h=-1,f=d[0];e:for(;++h<s&&u.length<c;){var m=p[h],g=t?t(m):m;if(m=r||0!==m?m:0,!(f?tr(f,g):o(u,g,r))){for(l=a;--l;){var y=d[l];if(!(y?tr(y,g):o(e[l],g,r)))continue e}f&&f.push(g),u.push(m)}}return u}function Ai(e,t,r){var i=null==(e=Io(e,t=wn(t,e)))?e:e[No(Qo(t))];return null==i?n:Bt(i,e,r)}function Fi(e){return ra(e)&&Ei(e)==v}function Mi(e,t,r,i,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,i,o,s){var a=Gs(e),l=Gs(t),d=a?b:go(e),c=l?b:go(t),u=(d=d==v?B:d)==B,p=(c=c==v?B:c)==B,h=d==c;if(h&&Js(e)){if(!Js(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Jr),a||ca(e)?ro(e,t,r,i,o,s):function(e,t,r,i,n,o,s){switch(r){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!o(new Ge(e),new Ge(t)));case w:case _:case T:return Ls(+e,+t);case x:return e.name==t.name&&e.message==t.message;case I:case F:return e==t+"";case E:var a=lr;case A:var l=1&i;if(a||(a=ur),e.size!=t.size&&!l)return!1;var d=s.get(e);if(d)return d==t;i|=2,s.set(e,t);var c=ro(a(e),a(t),i,n,o,s);return s.delete(e),c;case M:if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,d,r,i,o,s);if(!(1&r)){var f=u&&Oe.call(e,"__wrapped__"),m=p&&Oe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,y=m?t.value():t;return s||(s=new Jr),o(g,y,r,i,s)}}if(!h)return!1;return s||(s=new Jr),function(e,t,r,i,o,s){var a=1&r,l=no(e),d=l.length,c=no(t),u=c.length;if(d!=u&&!a)return!1;var p=d;for(;p--;){var h=l[p];if(!(a?h in t:Oe.call(t,h)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var y=a;for(;++p<d;){var v=e[h=l[p]],b=t[h];if(i)var w=a?i(b,v,h,t,e,s):i(v,b,h,e,t,s);if(!(w===n?v===b||o(v,b,r,i,s):w)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,r,i,o,s)}(e,t,r,i,Mi,o))}function Di(e,t,r,i){var o=r.length,s=o,a=!i;if(null==e)return!s;for(e=Be(e);o--;){var l=r[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var d=(l=r[o])[0],c=e[d],u=l[1];if(a&&l[2]){if(c===n&&!(d in e))return!1}else{var p=new Jr;if(i)var h=i(c,u,d,e,t,p);if(!(h===n?Mi(u,c,3,i,p):h))return!1}}return!0}function Ri(e){return!(!ta(e)||(t=e,Ne&&Ne in t))&&(Zs(e)?je:ve).test(qo(e));var t}function Pi(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Gs(e)?Li(e[0],e[1]):Ui(e):hl(e)}function Oi(e){if(!Eo(e))return Vt(e);var t=[];for(var r in Be(e))Oe.call(e,r)&&"constructor"!=r&&t.push(r);return t}function zi(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Be(e))t.push(r);return t}(e);var t=Eo(e),r=[];for(var i in e)("constructor"!=i||!t&&Oe.call(e,i))&&r.push(i);return r}function Ni(e,t){return e<t}function qi(e,t){var r=-1,n=Ks(e)?i(e.length):[];return pi(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function Ui(e){var t=po(e);return 1==t.length&&t[0][2]?Bo(t[0][0],t[0][1]):function(r){return r===e||Di(r,e,t)}}function Li(e,t){return xo(e)&&To(t)?Bo(No(e),t):function(r){var i=Ba(r,e);return i===n&&i===t?Ca(r,e):Mi(t,i,3)}}function ji(e,t,r,i,o){e!==t&&vi(t,(function(s,a){if(o||(o=new Jr),ta(s))!function(e,t,r,i,o,s,a){var l=Ao(e,r),d=Ao(t,r),c=a.get(d);if(c)return void ei(e,r,c);var u=s?s(l,d,r+"",e,t,a):n,p=u===n;if(p){var h=Gs(d),f=!h&&Js(d),m=!h&&!f&&ca(d);u=d,h||f||m?Gs(l)?u=l:Vs(l)?u=An(l):f?(p=!1,u=kn(d,!0)):m?(p=!1,u=Tn(d,!0)):u=[]:oa(d)||$s(d)?(u=l,$s(l)?u=va(l):ta(l)&&!Zs(l)||(u=vo(d))):p=!1}p&&(a.set(d,u),o(u,d,i,s,a),a.delete(d));ei(e,r,u)}(e,t,a,r,ji,i,o);else{var l=i?i(Ao(e,a),s,a+"",e,t,o):n;l===n&&(l=s),ei(e,a,l)}}),Da)}function Hi(e,t){var r=e.length;if(r)return wo(t+=t<0?r:0,r)?e[t]:n}function $i(e,t,r){t=t.length?Pt(t,(function(e){return Gs(e)?function(t){return Si(t,1===e.length?e[0]:e)}:e})):[nl];var i=-1;t=Pt(t,Xt(co()));var n=qi(e,(function(e,r,n){var o=Pt(t,(function(t){return t(e)}));return{criteria:o,index:++i,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(n,(function(e,t){return function(e,t,r){var i=-1,n=e.criteria,o=t.criteria,s=n.length,a=r.length;for(;++i<s;){var l=Bn(n[i],o[i]);if(l)return i>=a?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}(e,t,r)}))}function Gi(e,t,r){for(var i=-1,n=t.length,o={};++i<n;){var s=t[i],a=Si(e,s);r(a,s)&&Xi(o,wn(s,e),a)}return o}function Wi(e,t,r,i){var n=i?$t:Ht,o=-1,s=t.length,a=e;for(e===t&&(t=An(t)),r&&(a=Pt(e,Xt(r)));++o<s;)for(var l=0,d=t[o],c=r?r(d):d;(l=n(a,c,l,i))>-1;)a!==e&&Ye.call(a,l,1),Ye.call(e,l,1);return e}function Ki(e,t){for(var r=e?t.length:0,i=r-1;r--;){var n=t[r];if(r==i||n!==o){var o=n;wo(n)?Ye.call(e,n,1):pn(e,n)}}return e}function Vi(e,t){return e+gt(xr()*(t-e+1))}function Ji(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=gt(t/2))&&(e+=e)}while(t);return r}function Yi(e,t){return Do(Co(e,t,nl),e+"")}function Qi(e){return Qr(La(e))}function Zi(e,t){var r=La(e);return Oo(r,ai(t,0,r.length))}function Xi(e,t,r,i){if(!ta(e))return e;for(var o=-1,s=(t=wn(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var d=No(t[o]),c=r;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(o!=a){var u=l[d];(c=i?i(u,d,l):n)===n&&(c=ta(u)?u:wo(t[o+1])?[]:{})}ti(l,d,c),l=l[d]}return e}var en=Ar?function(e,t){return Ar.set(e,t),e}:nl,tn=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:nl;function rn(e){return Oo(La(e))}function nn(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=i(o);++n<o;)s[n]=e[n+t];return s}function on(e,t){var r;return pi(e,(function(e,i,n){return!(r=t(e,i,n))})),!!r}function sn(e,t,r){var i=0,n=null==e?i:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;i<n;){var o=i+n>>>1,s=e[o];null!==s&&!da(s)&&(r?s<=t:s<t)?i=o+1:n=o}return n}return an(e,t,nl,r)}function an(e,t,r,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,l=null===t,d=da(t),c=t===n;o<s;){var u=gt((o+s)/2),p=r(e[u]),h=p!==n,f=null===p,m=p==p,g=da(p);if(a)var y=i||m;else y=c?m&&(i||h):l?m&&h&&(i||!f):d?m&&h&&!f&&(i||!g):!f&&!g&&(i?p<=t:p<t);y?o=u+1:s=u}return br(s,4294967294)}function ln(e,t){for(var r=-1,i=e.length,n=0,o=[];++r<i;){var s=e[r],a=t?t(s):s;if(!r||!Ls(a,l)){var l=a;o[n++]=0===s?0:s}}return o}function dn(e){return"number"==typeof e?e:da(e)?m:+e}function cn(e){if("string"==typeof e)return e;if(Gs(e))return Pt(e,cn)+"";if(da(e))return qr?qr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function un(e,t,r){var i=-1,n=Dt,o=e.length,s=!0,a=[],l=a;if(r)s=!1,n=Rt;else if(o>=200){var d=t?null:Yn(e);if(d)return ur(d);s=!1,n=tr,l=new Vr}else l=t?[]:a;e:for(;++i<o;){var c=e[i],u=t?t(c):c;if(c=r||0!==c?c:0,s&&u==u){for(var p=l.length;p--;)if(l[p]===u)continue e;t&&l.push(u),a.push(c)}else n(l,u,r)||(l!==a&&l.push(u),a.push(c))}return a}function pn(e,t){return null==(e=Io(e,t=wn(t,e)))||delete e[No(Qo(t))]}function hn(e,t,r,i){return Xi(e,t,r(Si(e,t)),i)}function fn(e,t,r,i){for(var n=e.length,o=i?n:-1;(i?o--:++o<n)&&t(e[o],o,e););return r?nn(e,i?0:o,i?o+1:n):nn(e,i?o+1:0,i?n:o)}function mn(e,t){var r=e;return r instanceof $r&&(r=r.value()),zt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),r)}function gn(e,t,r){var n=e.length;if(n<2)return n?un(e[0]):[];for(var o=-1,s=i(n);++o<n;)for(var a=e[o],l=-1;++l<n;)l!=o&&(s[o]=ui(s[o]||a,e[l],t,r));return un(yi(s,1),t,r)}function yn(e,t,r){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:n;r(a,e[i],l)}return a}function vn(e){return Vs(e)?e:[]}function bn(e){return"function"==typeof e?e:nl}function wn(e,t){return Gs(e)?e:xo(e,t)?[e]:zo(ba(e))}var _n=Yi;function xn(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:nn(e,t,r)}var Sn=nt||function(e){return mt.clearTimeout(e)};function kn(e,t){if(t)return e.slice();var r=e.length,i=We?We(r):new e.constructor(r);return e.copy(i),i}function En(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Tn(e,t){var r=t?En(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Bn(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,s=da(e),a=t!==n,l=null===t,d=t==t,c=da(t);if(!l&&!c&&!s&&e>t||s&&a&&d&&!l&&!c||i&&a&&d||!r&&d||!o)return 1;if(!i&&!s&&!c&&e<t||c&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!d)return-1}return 0}function Cn(e,t,r,n){for(var o=-1,s=e.length,a=r.length,l=-1,d=t.length,c=vr(s-a,0),u=i(d+c),p=!n;++l<d;)u[l]=t[l];for(;++o<a;)(p||o<s)&&(u[r[o]]=e[o]);for(;c--;)u[l++]=e[o++];return u}function In(e,t,r,n){for(var o=-1,s=e.length,a=-1,l=r.length,d=-1,c=t.length,u=vr(s-l,0),p=i(u+c),h=!n;++o<u;)p[o]=e[o];for(var f=o;++d<c;)p[f+d]=t[d];for(;++a<l;)(h||o<s)&&(p[f+r[a]]=e[o++]);return p}function An(e,t){var r=-1,n=e.length;for(t||(t=i(n));++r<n;)t[r]=e[r];return t}function Fn(e,t,r,i){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],d=i?i(r[l],e[l],l,r,e):n;d===n&&(d=e[l]),o?oi(r,l,d):ti(r,l,d)}return r}function Mn(e,t){return function(r,i){var n=Gs(r)?Ct:ii,o=t?t():{};return n(r,e,co(i,2),o)}}function Dn(e){return Yi((function(t,r){var i=-1,o=r.length,s=o>1?r[o-1]:n,a=o>2?r[2]:n;for(s=e.length>3&&"function"==typeof s?(o--,s):n,a&&_o(r[0],r[1],a)&&(s=o<3?n:s,o=1),t=Be(t);++i<o;){var l=r[i];l&&e(t,l,i,s)}return t}))}function Rn(e,t){return function(r,i){if(null==r)return r;if(!Ks(r))return e(r,i);for(var n=r.length,o=t?n:-1,s=Be(r);(t?o--:++o<n)&&!1!==i(s[o],o,s););return r}}function Pn(e){return function(t,r,i){for(var n=-1,o=Be(t),s=i(t),a=s.length;a--;){var l=s[e?a:++n];if(!1===r(o[l],l,o))break}return t}}function On(e){return function(t){var r=ar(t=ba(t))?fr(t):n,i=r?r[0]:t.charAt(0),o=r?xn(r,1).join(""):t.slice(1);return i[e]()+o}}function zn(e){return function(t){return zt(Za($a(t).replace(et,"")),e,"")}}function Nn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Lr(e.prototype),i=e.apply(r,t);return ta(i)?i:r}}function qn(e){return function(t,r,i){var o=Be(t);if(!Ks(t)){var s=co(r,3);t=Ma(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,i);return a>-1?o[s?t[a]:a]:n}}function Un(e){return io((function(t){var r=t.length,i=r,s=Hr.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ae(o);if(s&&!l&&"wrapper"==ao(a))var l=new Hr([],!0)}for(i=l?i:r;++i<r;){var d=ao(a=t[i]),c="wrapper"==d?so(a):n;l=c&&So(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ao(c[0])].apply(l,c[3]):1==a.length&&So(a)?l[d]():l.thru(a)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Gs(i))return l.plant(i).value();for(var n=0,o=r?t[n].apply(this,e):i;++n<r;)o=t[n].call(this,o);return o}}))}function Ln(e,t,r,o,s,a,l,d,c,p){var h=t&u,f=1&t,m=2&t,g=24&t,y=512&t,v=m?n:Nn(e);return function u(){for(var b=arguments.length,w=i(b),_=b;_--;)w[_]=arguments[_];if(g)var x=lo(u),S=function(e,t){for(var r=e.length,i=0;r--;)e[r]===t&&++i;return i}(w,x);if(o&&(w=Cn(w,o,s,g)),a&&(w=In(w,a,l,g)),b-=S,g&&b<p){var k=cr(w,x);return Vn(e,t,Ln,u.placeholder,r,w,k,d,c,p-b)}var E=f?r:this,T=m?E[e]:e;return b=w.length,d?w=function(e,t){var r=e.length,i=br(t.length,r),o=An(e);for(;i--;){var s=t[i];e[i]=wo(s,r)?o[s]:n}return e}(w,d):y&&b>1&&w.reverse(),h&&c<b&&(w.length=c),this&&this!==mt&&this instanceof u&&(T=v||Nn(T)),T.apply(E,w)}}function jn(e,t){return function(r,i){return function(e,t,r,i){return wi(e,(function(e,n,o){t(i,r(e),n,o)})),i}(r,e,t(i),{})}}function Hn(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=cn(r),i=cn(i)):(r=dn(r),i=dn(i)),o=e(r,i)}return o}}function $n(e){return io((function(t){return t=Pt(t,Xt(co())),Yi((function(r){var i=this;return e(t,(function(e){return Bt(e,i,r)}))}))}))}function Gn(e,t){var r=(t=t===n?" ":cn(t)).length;if(r<2)return r?Ji(t,e):t;var i=Ji(t,ft(e/hr(t)));return ar(t)?xn(fr(i),0,e).join(""):i.slice(0,e)}function Wn(e){return function(t,r,o){return o&&"number"!=typeof o&&_o(t,r,o)&&(r=o=n),t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,r,n){for(var o=-1,s=vr(ft((t-e)/(r||1)),0),a=i(s);s--;)a[n?s:++o]=e,e+=r;return a}(t,r,o=o===n?t<r?1:-1:fa(o),e)}}function Kn(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Vn(e,t,r,i,o,s,a,l,u,p){var h=8&t;t|=h?d:c,4&(t&=~(h?c:d))||(t&=-4);var f=[e,t,o,h?s:n,h?a:n,h?n:s,h?n:a,l,u,p],m=r.apply(n,f);return So(e)&&Fo(m,f),m.placeholder=i,Ro(m,e,t)}function Jn(e){var t=Te[e];return function(e,r){if(e=ya(e),(r=null==r?0:br(ma(r),292))&&wt(e)){var i=(ba(e)+"e").split("e");return+((i=(ba(t(i[0]+"e"+(+i[1]+r)))+"e").split("e"))[0]+"e"+(+i[1]-r))}return t(e)}}var Yn=Br&&1/ur(new Br([,-0]))[1]==h?function(e){return new Br(e)}:dl;function Qn(e){return function(t){var r=go(t);return r==E?lr(t):r==A?pr(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zn(e,t,r,s,h,f,m,g){var y=2&t;if(!y&&"function"!=typeof e)throw new Ae(o);var v=s?s.length:0;if(v||(t&=-97,s=h=n),m=m===n?m:vr(ma(m),0),g=g===n?g:ma(g),v-=h?h.length:0,t&c){var b=s,w=h;s=h=n}var _=y?n:so(e),x=[e,t,r,s,h,b,w,f,m,g];if(_&&function(e,t){var r=e[1],i=t[1],n=r|i,o=n<131,s=i==u&&8==r||i==u&&r==p&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&i&&(e[2]=t[2],n|=1&r?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?Cn(d,l,t[4]):l,e[4]=d?cr(e[3],a):t[4]}(l=t[5])&&(d=e[5],e[5]=d?In(d,l,t[6]):l,e[6]=d?cr(e[5],a):t[6]);(l=t[7])&&(e[7]=l);i&u&&(e[8]=null==e[8]?t[8]:br(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=n}(x,_),e=x[0],t=x[1],r=x[2],s=x[3],h=x[4],!(g=x[9]=x[9]===n?y?0:e.length:vr(x[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==l?function(e,t,r){var o=Nn(e);return function s(){for(var a=arguments.length,l=i(a),d=a,c=lo(s);d--;)l[d]=arguments[d];var u=a<3&&l[0]!==c&&l[a-1]!==c?[]:cr(l,c);return(a-=u.length)<r?Vn(e,t,Ln,s.placeholder,n,l,u,n,n,r-a):Bt(this&&this!==mt&&this instanceof s?o:e,this,l)}}(e,t,g):t!=d&&33!=t||h.length?Ln.apply(n,x):function(e,t,r,n){var o=1&t,s=Nn(e);return function t(){for(var a=-1,l=arguments.length,d=-1,c=n.length,u=i(c+l),p=this&&this!==mt&&this instanceof t?s:e;++d<c;)u[d]=n[d];for(;l--;)u[d++]=arguments[++a];return Bt(p,o?r:this,u)}}(e,t,r,s);else var S=function(e,t,r){var i=1&t,n=Nn(e);return function t(){return(this&&this!==mt&&this instanceof t?n:e).apply(i?r:this,arguments)}}(e,t,r);return Ro((_?en:Fo)(S,x),e,t)}function Xn(e,t,r,i){return e===n||Ls(e,De[r])&&!Oe.call(i,r)?t:e}function eo(e,t,r,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),ji(e,t,n,eo,s),s.delete(t)),e}function to(e){return oa(e)?n:e}function ro(e,t,r,i,o,s){var a=1&r,l=e.length,d=t.length;if(l!=d&&!(a&&d>l))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var p=-1,h=!0,f=2&r?new Vr:n;for(s.set(e,t),s.set(t,e);++p<l;){var m=e[p],g=t[p];if(i)var y=a?i(g,m,p,t,e,s):i(m,g,p,e,t,s);if(y!==n){if(y)continue;h=!1;break}if(f){if(!qt(t,(function(e,t){if(!tr(f,t)&&(m===e||o(m,e,r,i,s)))return f.push(t)}))){h=!1;break}}else if(m!==g&&!o(m,g,r,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function io(e){return Do(Co(e,n,Wo),e+"")}function no(e){return ki(e,Ma,fo)}function oo(e){return ki(e,Da,mo)}var so=Ar?function(e){return Ar.get(e)}:dl;function ao(e){for(var t=e.name+"",r=Fr[t],i=Oe.call(Fr,t)?r.length:0;i--;){var n=r[i],o=n.func;if(null==o||o==e)return n.name}return t}function lo(e){return(Oe.call(Ur,"placeholder")?Ur:e).placeholder}function co(){var e=Ur.iteratee||ol;return e=e===ol?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function uo(e,t){var r,i,n=e.__data__;return("string"==(i=typeof(r=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function po(e){for(var t=Ma(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,To(n)]}return t}function ho(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Ri(r)?r:n}var fo=yt?function(e){return null==e?[]:(e=Be(e),Mt(yt(e),(function(t){return Je.call(e,t)})))}:gl,mo=yt?function(e){for(var t=[];e;)Ot(t,fo(e)),e=Ke(e);return t}:gl,go=Ei;function yo(e,t,r){for(var i=-1,n=(t=wn(t,e)).length,o=!1;++i<n;){var s=No(t[i]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++i!=n?o:!!(n=null==e?0:e.length)&&ea(n)&&wo(s,n)&&(Gs(e)||$s(e))}function vo(e){return"function"!=typeof e.constructor||Eo(e)?{}:Lr(Ke(e))}function bo(e){return Gs(e)||$s(e)||!!(Qe&&e&&e[Qe])}function wo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&we.test(e))&&e>-1&&e%1==0&&e<t}function _o(e,t,r){if(!ta(r))return!1;var i=typeof t;return!!("number"==i?Ks(r)&&wo(t,r.length):"string"==i&&t in r)&&Ls(r[t],e)}function xo(e,t){if(Gs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!da(e))||(re.test(e)||!te.test(e)||null!=t&&e in Be(t))}function So(e){var t=ao(e),r=Ur[t];if("function"!=typeof r||!(t in $r.prototype))return!1;if(e===r)return!0;var i=so(r);return!!i&&e===i[0]}(kr&&go(new kr(new ArrayBuffer(1)))!=P||Er&&go(new Er)!=E||Tr&&go(Tr.resolve())!=C||Br&&go(new Br)!=A||Cr&&go(new Cr)!=D)&&(go=function(e){var t=Ei(e),r=t==B?e.constructor:n,i=r?qo(r):"";if(i)switch(i){case Mr:return P;case Dr:return E;case Rr:return C;case Pr:return A;case Or:return D}return t});var ko=Re?Zs:yl;function Eo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function To(e){return e==e&&!ta(e)}function Bo(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Be(r)))}}function Co(e,t,r){return t=vr(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=vr(n.length-t,0),a=i(s);++o<s;)a[o]=n[t+o];o=-1;for(var l=i(t+1);++o<t;)l[o]=n[o];return l[t]=r(a),Bt(e,this,l)}}function Io(e,t){return t.length<2?e:Si(e,nn(t,0,-1))}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Fo=Po(en),Mo=ht||function(e,t){return mt.setTimeout(e,t)},Do=Po(tn);function Ro(e,t,r){var i=t+"";return Do(e,function(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return It(y,(function(r){var i="_."+r[0];t&r[1]&&!Dt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(de);return t?t[1].split(ce):[]}(i),r)))}function Po(e){var t=0,r=0;return function(){var i=wr(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Oo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var s=Vi(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var zo=function(e){var t=Ps(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ie,(function(e,r,i,n){t.push(i?n.replace(he,"$1"):r||e)})),t}));function No(e){if("string"==typeof e||da(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Uo(e){if(e instanceof $r)return e.clone();var t=new Hr(e.__wrapped__,e.__chain__);return t.__actions__=An(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Lo=Yi((function(e,t){return Vs(e)?ui(e,yi(t,1,Vs,!0)):[]})),jo=Yi((function(e,t){var r=Qo(t);return Vs(r)&&(r=n),Vs(e)?ui(e,yi(t,1,Vs,!0),co(r,2)):[]})),Ho=Yi((function(e,t){var r=Qo(t);return Vs(r)&&(r=n),Vs(e)?ui(e,yi(t,1,Vs,!0),n,r):[]}));function $o(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var n=null==r?0:ma(r);return n<0&&(n=vr(i+n,0)),jt(e,co(t,3),n)}function Go(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=ma(r),o=r<0?vr(i+o,0):br(o,i-1)),jt(e,co(t,3),o,!0)}function Wo(e){return(null==e?0:e.length)?yi(e,1):[]}function Ko(e){return e&&e.length?e[0]:n}var Vo=Yi((function(e){var t=Pt(e,vn);return t.length&&t[0]===e[0]?Ii(t):[]})),Jo=Yi((function(e){var t=Qo(e),r=Pt(e,vn);return t===Qo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ii(r,co(t,2)):[]})),Yo=Yi((function(e){var t=Qo(e),r=Pt(e,vn);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ii(r,n,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Zo=Yi(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Wi(e,t):e}var es=io((function(e,t){var r=null==e?0:e.length,i=si(e,t);return Ki(e,Pt(t,(function(e){return wo(e,r)?+e:e})).sort(Bn)),i}));function ts(e){return null==e?e:Sr.call(e)}var rs=Yi((function(e){return un(yi(e,1,Vs,!0))})),is=Yi((function(e){var t=Qo(e);return Vs(t)&&(t=n),un(yi(e,1,Vs,!0),co(t,2))})),ns=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:n,un(yi(e,1,Vs,!0),n,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(Vs(e))return t=vr(e.length,t),!0})),Qt(t,(function(t){return Pt(e,Kt(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:Pt(r,(function(e){return Bt(t,n,e)}))}var as=Yi((function(e,t){return Vs(e)?ui(e,t):[]})),ls=Yi((function(e){return gn(Mt(e,Vs))})),ds=Yi((function(e){var t=Qo(e);return Vs(t)&&(t=n),gn(Mt(e,Vs),co(t,2))})),cs=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:n,gn(Mt(e,Vs),n,t)})),us=Yi(os);var ps=Yi((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ss(e,r)}));function hs(e){var t=Ur(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ms=io((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return si(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $r&&wo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:fs,args:[o],thisArg:n}),new Hr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var gs=Mn((function(e,t,r){Oe.call(e,r)?++e[r]:oi(e,r,1)}));var ys=qn($o),vs=qn(Go);function bs(e,t){return(Gs(e)?It:pi)(e,co(t,3))}function ws(e,t){return(Gs(e)?At:hi)(e,co(t,3))}var _s=Mn((function(e,t,r){Oe.call(e,r)?e[r].push(t):oi(e,r,[t])}));var xs=Yi((function(e,t,r){var n=-1,o="function"==typeof t,s=Ks(e)?i(e.length):[];return pi(e,(function(e){s[++n]=o?Bt(t,e,r):Ai(e,t,r)})),s})),Ss=Mn((function(e,t,r){oi(e,r,t)}));function ks(e,t){return(Gs(e)?Pt:qi)(e,co(t,3))}var Es=Mn((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ts=Yi((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_o(e,t[0],t[1])?t=[]:r>2&&_o(t[0],t[1],t[2])&&(t=[t[0]]),$i(e,yi(t,1),[])})),Bs=ct||function(){return mt.Date.now()};function Cs(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Zn(e,u,n,n,n,n,t)}function Is(e,t){var r;if("function"!=typeof t)throw new Ae(o);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var As=Yi((function(e,t,r){var i=1;if(r.length){var n=cr(r,lo(As));i|=d}return Zn(e,i,t,r,n)})),Fs=Yi((function(e,t,r){var i=3;if(r.length){var n=cr(r,lo(Fs));i|=d}return Zn(t,i,e,r,n)}));function Ms(e,t,r){var i,s,a,l,d,c,u=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new Ae(o);function m(t){var r=i,o=s;return i=s=n,u=t,l=e.apply(o,r)}function g(e){var r=e-c;return c===n||r>=t||r<0||h&&e-u>=a}function y(){var e=Bs();if(g(e))return v(e);d=Mo(y,function(e){var r=t-(e-c);return h?br(r,a-(e-u)):r}(e))}function v(e){return d=n,f&&i?m(e):(i=s=n,l)}function b(){var e=Bs(),r=g(e);if(i=arguments,s=this,c=e,r){if(d===n)return function(e){return u=e,d=Mo(y,t),p?m(e):l}(c);if(h)return Sn(d),d=Mo(y,t),m(c)}return d===n&&(d=Mo(y,t)),l}return t=ya(t)||0,ta(r)&&(p=!!r.leading,a=(h="maxWait"in r)?vr(ya(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),b.cancel=function(){d!==n&&Sn(d),u=0,i=c=s=d=n},b.flush=function(){return d===n?l:v(Bs())},b}var Ds=Yi((function(e,t){return ci(e,1,t)})),Rs=Yi((function(e,t,r){return ci(e,ya(t)||0,r)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=e.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(Ps.Cache||Kr),r}function Os(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ps.Cache=Kr;var zs=_n((function(e,t){var r=(t=1==t.length&&Gs(t[0])?Pt(t[0],Xt(co())):Pt(yi(t,1),Xt(co()))).length;return Yi((function(i){for(var n=-1,o=br(i.length,r);++n<o;)i[n]=t[n].call(this,i[n]);return Bt(e,this,i)}))})),Ns=Yi((function(e,t){var r=cr(t,lo(Ns));return Zn(e,d,n,t,r)})),qs=Yi((function(e,t){var r=cr(t,lo(qs));return Zn(e,c,n,t,r)})),Us=io((function(e,t){return Zn(e,p,n,n,n,t)}));function Ls(e,t){return e===t||e!=e&&t!=t}var js=Kn(Ti),Hs=Kn((function(e,t){return e>=t})),$s=Fi(function(){return arguments}())?Fi:function(e){return ra(e)&&Oe.call(e,"callee")&&!Je.call(e,"callee")},Gs=i.isArray,Ws=_t?Xt(_t):function(e){return ra(e)&&Ei(e)==R};function Ks(e){return null!=e&&ea(e.length)&&!Zs(e)}function Vs(e){return ra(e)&&Ks(e)}var Js=bt||yl,Ys=xt?Xt(xt):function(e){return ra(e)&&Ei(e)==_};function Qs(e){if(!ra(e))return!1;var t=Ei(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Ei(e);return t==S||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var ia=St?Xt(St):function(e){return ra(e)&&go(e)==E};function na(e){return"number"==typeof e||ra(e)&&Ei(e)==T}function oa(e){if(!ra(e)||Ei(e)!=B)return!1;var t=Ke(e);if(null===t)return!0;var r=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pe.call(r)==Ue}var sa=kt?Xt(kt):function(e){return ra(e)&&Ei(e)==I};var aa=Et?Xt(Et):function(e){return ra(e)&&go(e)==A};function la(e){return"string"==typeof e||!Gs(e)&&ra(e)&&Ei(e)==F}function da(e){return"symbol"==typeof e||ra(e)&&Ei(e)==M}var ca=Tt?Xt(Tt):function(e){return ra(e)&&ea(e.length)&&!!lt[Ei(e)]};var ua=Kn(Ni),pa=Kn((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Ks(e))return la(e)?fr(e):An(e);if(Ze&&e[Ze])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ze]());var t=go(e);return(t==E?lr:t==A?ur:La)(e)}function fa(e){return e?(e=ya(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?ai(ma(e),0,g):0}function ya(e){if("number"==typeof e)return e;if(da(e))return m;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ye.test(e);return r||be.test(e)?pt(e.slice(2),r?2:8):ge.test(e)?m:+e}function va(e){return Fn(e,Da(e))}function ba(e){return null==e?"":cn(e)}var wa=Dn((function(e,t){if(Eo(t)||Ks(t))Fn(t,Ma(t),e);else for(var r in t)Oe.call(t,r)&&ti(e,r,t[r])})),_a=Dn((function(e,t){Fn(t,Da(t),e)})),xa=Dn((function(e,t,r,i){Fn(t,Da(t),e,i)})),Sa=Dn((function(e,t,r,i){Fn(t,Ma(t),e,i)})),ka=io(si);var Ea=Yi((function(e,t){e=Be(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&_o(t[0],t[1],o)&&(i=1);++r<i;)for(var s=t[r],a=Da(s),l=-1,d=a.length;++l<d;){var c=a[l],u=e[c];(u===n||Ls(u,De[c])&&!Oe.call(e,c))&&(e[c]=s[c])}return e})),Ta=Yi((function(e){return e.push(n,eo),Bt(Pa,n,e)}));function Ba(e,t,r){var i=null==e?n:Si(e,t);return i===n?r:i}function Ca(e,t){return null!=e&&yo(e,t,Ci)}var Ia=jn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=qe.call(t)),e[t]=r}),tl(nl)),Aa=jn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=qe.call(t)),Oe.call(e,t)?e[t].push(r):e[t]=[r]}),co),Fa=Yi(Ai);function Ma(e){return Ks(e)?Yr(e):Oi(e)}function Da(e){return Ks(e)?Yr(e,!0):zi(e)}var Ra=Dn((function(e,t,r){ji(e,t,r)})),Pa=Dn((function(e,t,r,i){ji(e,t,r,i)})),Oa=io((function(e,t){var r={};if(null==e)return r;var i=!1;t=Pt(t,(function(t){return t=wn(t,e),i||(i=t.length>1),t})),Fn(e,oo(e),r),i&&(r=li(r,7,to));for(var n=t.length;n--;)pn(r,t[n]);return r}));var za=io((function(e,t){return null==e?{}:function(e,t){return Gi(e,t,(function(t,r){return Ca(e,r)}))}(e,t)}));function Na(e,t){if(null==e)return{};var r=Pt(oo(e),(function(e){return[e]}));return t=co(t),Gi(e,r,(function(e,r){return t(e,r[0])}))}var qa=Qn(Ma),Ua=Qn(Da);function La(e){return null==e?[]:er(e,Ma(e))}var ja=zn((function(e,t,r){return t=t.toLowerCase(),e+(r?Ha(t):t)}));function Ha(e){return Qa(ba(e).toLowerCase())}function $a(e){return(e=ba(e))&&e.replace(_e,nr).replace(tt,"")}var Ga=zn((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Wa=zn((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ka=On("toLowerCase");var Va=zn((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ja=zn((function(e,t,r){return e+(r?" ":"")+Qa(t)}));var Ya=zn((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qa=On("toUpperCase");function Za(e,t,r){return e=ba(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(it)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Yi((function(e,t){try{return Bt(e,n,t)}catch(e){return Qs(e)?e:new ke(e)}})),el=io((function(e,t){return It(t,(function(t){t=No(t),oi(e,t,As(e[t],e))})),e}));function tl(e){return function(){return e}}var rl=Un(),il=Un(!0);function nl(e){return e}function ol(e){return Pi("function"==typeof e?e:li(e,1))}var sl=Yi((function(e,t){return function(r){return Ai(r,e,t)}})),al=Yi((function(e,t){return function(r){return Ai(e,r,t)}}));function ll(e,t,r){var i=Ma(t),n=xi(t,i);null!=r||ta(t)&&(n.length||!i.length)||(r=t,t=e,e=this,n=xi(t,Ma(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return It(n,(function(r){var i=t[r];e[r]=i,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=An(this.__actions__)).push({func:i,args:arguments,thisArg:e}),r.__chain__=t,r}return i.apply(e,Ot([this.value()],arguments))})})),e}function dl(){}var cl=$n(Pt),ul=$n(Ft),pl=$n(qt);function hl(e){return xo(e)?Kt(No(e)):function(e){return function(t){return Si(t,e)}}(e)}var fl=Wn(),ml=Wn(!0);function gl(){return[]}function yl(){return!1}var vl=Hn((function(e,t){return e+t}),0),bl=Jn("ceil"),wl=Hn((function(e,t){return e/t}),1),_l=Jn("floor");var xl,Sl=Hn((function(e,t){return e*t}),1),kl=Jn("round"),El=Hn((function(e,t){return e-t}),0);return Ur.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Ur.ary=Cs,Ur.assign=wa,Ur.assignIn=_a,Ur.assignInWith=xa,Ur.assignWith=Sa,Ur.at=ka,Ur.before=Is,Ur.bind=As,Ur.bindAll=el,Ur.bindKey=Fs,Ur.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gs(e)?e:[e]},Ur.chain=hs,Ur.chunk=function(e,t,r){t=(r?_o(e,t,r):t===n)?1:vr(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,l=i(ft(o/t));s<o;)l[a++]=nn(e,s,s+=t);return l},Ur.compact=function(e){for(var t=-1,r=null==e?0:e.length,i=0,n=[];++t<r;){var o=e[t];o&&(n[i++]=o)}return n},Ur.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Ot(Gs(r)?An(r):[r],yi(t,1))},Ur.cond=function(e){var t=null==e?0:e.length,r=co();return e=t?Pt(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[r(e[0]),e[1]]})):[],Yi((function(r){for(var i=-1;++i<t;){var n=e[i];if(Bt(n[0],this,r))return Bt(n[1],this,r)}}))},Ur.conforms=function(e){return function(e){var t=Ma(e);return function(r){return di(r,e,t)}}(li(e,1))},Ur.constant=tl,Ur.countBy=gs,Ur.create=function(e,t){var r=Lr(e);return null==t?r:ni(r,t)},Ur.curry=function e(t,r,i){var o=Zn(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Ur.curryRight=function e(t,r,i){var o=Zn(t,l,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Ur.debounce=Ms,Ur.defaults=Ea,Ur.defaultsDeep=Ta,Ur.defer=Ds,Ur.delay=Rs,Ur.difference=Lo,Ur.differenceBy=jo,Ur.differenceWith=Ho,Ur.drop=function(e,t,r){var i=null==e?0:e.length;return i?nn(e,(t=r||t===n?1:ma(t))<0?0:t,i):[]},Ur.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?nn(e,0,(t=i-(t=r||t===n?1:ma(t)))<0?0:t):[]},Ur.dropRightWhile=function(e,t){return e&&e.length?fn(e,co(t,3),!0,!0):[]},Ur.dropWhile=function(e,t){return e&&e.length?fn(e,co(t,3),!0):[]},Ur.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_o(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:ma(i))<0&&(i+=o),i=r>i?0:ga(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Ur.filter=function(e,t){return(Gs(e)?Mt:gi)(e,co(t,3))},Ur.flatMap=function(e,t){return yi(ks(e,t),1)},Ur.flatMapDeep=function(e,t){return yi(ks(e,t),h)},Ur.flatMapDepth=function(e,t,r){return r=r===n?1:ma(r),yi(ks(e,t),r)},Ur.flatten=Wo,Ur.flattenDeep=function(e){return(null==e?0:e.length)?yi(e,h):[]},Ur.flattenDepth=function(e,t){return(null==e?0:e.length)?yi(e,t=t===n?1:ma(t)):[]},Ur.flip=function(e){return Zn(e,512)},Ur.flow=rl,Ur.flowRight=il,Ur.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,i={};++t<r;){var n=e[t];i[n[0]]=n[1]}return i},Ur.functions=function(e){return null==e?[]:xi(e,Ma(e))},Ur.functionsIn=function(e){return null==e?[]:xi(e,Da(e))},Ur.groupBy=_s,Ur.initial=function(e){return(null==e?0:e.length)?nn(e,0,-1):[]},Ur.intersection=Vo,Ur.intersectionBy=Jo,Ur.intersectionWith=Yo,Ur.invert=Ia,Ur.invertBy=Aa,Ur.invokeMap=xs,Ur.iteratee=ol,Ur.keyBy=Ss,Ur.keys=Ma,Ur.keysIn=Da,Ur.map=ks,Ur.mapKeys=function(e,t){var r={};return t=co(t,3),wi(e,(function(e,i,n){oi(r,t(e,i,n),e)})),r},Ur.mapValues=function(e,t){var r={};return t=co(t,3),wi(e,(function(e,i,n){oi(r,i,t(e,i,n))})),r},Ur.matches=function(e){return Ui(li(e,1))},Ur.matchesProperty=function(e,t){return Li(e,li(t,1))},Ur.memoize=Ps,Ur.merge=Ra,Ur.mergeWith=Pa,Ur.method=sl,Ur.methodOf=al,Ur.mixin=ll,Ur.negate=Os,Ur.nthArg=function(e){return e=ma(e),Yi((function(t){return Hi(t,e)}))},Ur.omit=Oa,Ur.omitBy=function(e,t){return Na(e,Os(co(t)))},Ur.once=function(e){return Is(2,e)},Ur.orderBy=function(e,t,r,i){return null==e?[]:(Gs(t)||(t=null==t?[]:[t]),Gs(r=i?n:r)||(r=null==r?[]:[r]),$i(e,t,r))},Ur.over=cl,Ur.overArgs=zs,Ur.overEvery=ul,Ur.overSome=pl,Ur.partial=Ns,Ur.partialRight=qs,Ur.partition=Es,Ur.pick=za,Ur.pickBy=Na,Ur.property=hl,Ur.propertyOf=function(e){return function(t){return null==e?n:Si(e,t)}},Ur.pull=Zo,Ur.pullAll=Xo,Ur.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Wi(e,t,co(r,2)):e},Ur.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Wi(e,t,n,r):e},Ur.pullAt=es,Ur.range=fl,Ur.rangeRight=ml,Ur.rearg=Us,Ur.reject=function(e,t){return(Gs(e)?Mt:gi)(e,Os(co(t,3)))},Ur.remove=function(e,t){var r=[];if(!e||!e.length)return r;var i=-1,n=[],o=e.length;for(t=co(t,3);++i<o;){var s=e[i];t(s,i,e)&&(r.push(s),n.push(i))}return Ki(e,n),r},Ur.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Yi(e,t=t===n?t:ma(t))},Ur.reverse=ts,Ur.sampleSize=function(e,t,r){return t=(r?_o(e,t,r):t===n)?1:ma(t),(Gs(e)?Zr:Zi)(e,t)},Ur.set=function(e,t,r){return null==e?e:Xi(e,t,r)},Ur.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Xi(e,t,r,i)},Ur.shuffle=function(e){return(Gs(e)?Xr:rn)(e)},Ur.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&_o(e,t,r)?(t=0,r=i):(t=null==t?0:ma(t),r=r===n?i:ma(r)),nn(e,t,r)):[]},Ur.sortBy=Ts,Ur.sortedUniq=function(e){return e&&e.length?ln(e):[]},Ur.sortedUniqBy=function(e,t){return e&&e.length?ln(e,co(t,2)):[]},Ur.split=function(e,t,r){return r&&"number"!=typeof r&&_o(e,t,r)&&(t=r=n),(r=r===n?g:r>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=cn(t))&&ar(e)?xn(fr(e),0,r):e.split(t,r):[]},Ur.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:vr(ma(t),0),Yi((function(r){var i=r[t],n=xn(r,0,t);return i&&Ot(n,i),Bt(e,this,n)}))},Ur.tail=function(e){var t=null==e?0:e.length;return t?nn(e,1,t):[]},Ur.take=function(e,t,r){return e&&e.length?nn(e,0,(t=r||t===n?1:ma(t))<0?0:t):[]},Ur.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?nn(e,(t=i-(t=r||t===n?1:ma(t)))<0?0:t,i):[]},Ur.takeRightWhile=function(e,t){return e&&e.length?fn(e,co(t,3),!1,!0):[]},Ur.takeWhile=function(e,t){return e&&e.length?fn(e,co(t,3)):[]},Ur.tap=function(e,t){return t(e),e},Ur.throttle=function(e,t,r){var i=!0,n=!0;if("function"!=typeof e)throw new Ae(o);return ta(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),Ms(e,t,{leading:i,maxWait:t,trailing:n})},Ur.thru=fs,Ur.toArray=ha,Ur.toPairs=qa,Ur.toPairsIn=Ua,Ur.toPath=function(e){return Gs(e)?Pt(e,No):da(e)?[e]:An(zo(ba(e)))},Ur.toPlainObject=va,Ur.transform=function(e,t,r){var i=Gs(e),n=i||Js(e)||ca(e);if(t=co(t,4),null==r){var o=e&&e.constructor;r=n?i?new o:[]:ta(e)&&Zs(o)?Lr(Ke(e)):{}}return(n?It:wi)(e,(function(e,i,n){return t(r,e,i,n)})),r},Ur.unary=function(e){return Cs(e,1)},Ur.union=rs,Ur.unionBy=is,Ur.unionWith=ns,Ur.uniq=function(e){return e&&e.length?un(e):[]},Ur.uniqBy=function(e,t){return e&&e.length?un(e,co(t,2)):[]},Ur.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?un(e,n,t):[]},Ur.unset=function(e,t){return null==e||pn(e,t)},Ur.unzip=os,Ur.unzipWith=ss,Ur.update=function(e,t,r){return null==e?e:hn(e,t,bn(r))},Ur.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:hn(e,t,bn(r),i)},Ur.values=La,Ur.valuesIn=function(e){return null==e?[]:er(e,Da(e))},Ur.without=as,Ur.words=Za,Ur.wrap=function(e,t){return Ns(bn(t),e)},Ur.xor=ls,Ur.xorBy=ds,Ur.xorWith=cs,Ur.zip=us,Ur.zipObject=function(e,t){return yn(e||[],t||[],ti)},Ur.zipObjectDeep=function(e,t){return yn(e||[],t||[],Xi)},Ur.zipWith=ps,Ur.entries=qa,Ur.entriesIn=Ua,Ur.extend=_a,Ur.extendWith=xa,ll(Ur,Ur),Ur.add=vl,Ur.attempt=Xa,Ur.camelCase=ja,Ur.capitalize=Ha,Ur.ceil=bl,Ur.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ya(r))==r?r:0),t!==n&&(t=(t=ya(t))==t?t:0),ai(ya(e),t,r)},Ur.clone=function(e){return li(e,4)},Ur.cloneDeep=function(e){return li(e,5)},Ur.cloneDeepWith=function(e,t){return li(e,5,t="function"==typeof t?t:n)},Ur.cloneWith=function(e,t){return li(e,4,t="function"==typeof t?t:n)},Ur.conformsTo=function(e,t){return null==t||di(e,t,Ma(t))},Ur.deburr=$a,Ur.defaultTo=function(e,t){return null==e||e!=e?t:e},Ur.divide=wl,Ur.endsWith=function(e,t,r){e=ba(e),t=cn(t);var i=e.length,o=r=r===n?i:ai(ma(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Ur.eq=Ls,Ur.escape=function(e){return(e=ba(e))&&Q.test(e)?e.replace(J,or):e},Ur.escapeRegExp=function(e){return(e=ba(e))&&oe.test(e)?e.replace(ne,"\\$&"):e},Ur.every=function(e,t,r){var i=Gs(e)?Ft:fi;return r&&_o(e,t,r)&&(t=n),i(e,co(t,3))},Ur.find=ys,Ur.findIndex=$o,Ur.findKey=function(e,t){return Lt(e,co(t,3),wi)},Ur.findLast=vs,Ur.findLastIndex=Go,Ur.findLastKey=function(e,t){return Lt(e,co(t,3),_i)},Ur.floor=_l,Ur.forEach=bs,Ur.forEachRight=ws,Ur.forIn=function(e,t){return null==e?e:vi(e,co(t,3),Da)},Ur.forInRight=function(e,t){return null==e?e:bi(e,co(t,3),Da)},Ur.forOwn=function(e,t){return e&&wi(e,co(t,3))},Ur.forOwnRight=function(e,t){return e&&_i(e,co(t,3))},Ur.get=Ba,Ur.gt=js,Ur.gte=Hs,Ur.has=function(e,t){return null!=e&&yo(e,t,Bi)},Ur.hasIn=Ca,Ur.head=Ko,Ur.identity=nl,Ur.includes=function(e,t,r,i){e=Ks(e)?e:La(e),r=r&&!i?ma(r):0;var n=e.length;return r<0&&(r=vr(n+r,0)),la(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&Ht(e,t,r)>-1},Ur.indexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var n=null==r?0:ma(r);return n<0&&(n=vr(i+n,0)),Ht(e,t,n)},Ur.inRange=function(e,t,r){return t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,r){return e>=br(t,r)&&e<vr(t,r)}(e=ya(e),t,r)},Ur.invoke=Fa,Ur.isArguments=$s,Ur.isArray=Gs,Ur.isArrayBuffer=Ws,Ur.isArrayLike=Ks,Ur.isArrayLikeObject=Vs,Ur.isBoolean=function(e){return!0===e||!1===e||ra(e)&&Ei(e)==w},Ur.isBuffer=Js,Ur.isDate=Ys,Ur.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},Ur.isEmpty=function(e){if(null==e)return!0;if(Ks(e)&&(Gs(e)||"string"==typeof e||"function"==typeof e.splice||Js(e)||ca(e)||$s(e)))return!e.length;var t=go(e);if(t==E||t==A)return!e.size;if(Eo(e))return!Oi(e).length;for(var r in e)if(Oe.call(e,r))return!1;return!0},Ur.isEqual=function(e,t){return Mi(e,t)},Ur.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Mi(e,t,n,r):!!i},Ur.isError=Qs,Ur.isFinite=function(e){return"number"==typeof e&&wt(e)},Ur.isFunction=Zs,Ur.isInteger=Xs,Ur.isLength=ea,Ur.isMap=ia,Ur.isMatch=function(e,t){return e===t||Di(e,t,po(t))},Ur.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Di(e,t,po(t),r)},Ur.isNaN=function(e){return na(e)&&e!=+e},Ur.isNative=function(e){if(ko(e))throw new ke("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ri(e)},Ur.isNil=function(e){return null==e},Ur.isNull=function(e){return null===e},Ur.isNumber=na,Ur.isObject=ta,Ur.isObjectLike=ra,Ur.isPlainObject=oa,Ur.isRegExp=sa,Ur.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Ur.isSet=aa,Ur.isString=la,Ur.isSymbol=da,Ur.isTypedArray=ca,Ur.isUndefined=function(e){return e===n},Ur.isWeakMap=function(e){return ra(e)&&go(e)==D},Ur.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==Ei(e)},Ur.join=function(e,t){return null==e?"":Ut.call(e,t)},Ur.kebabCase=Ga,Ur.last=Qo,Ur.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ma(r))<0?vr(i+o,0):br(o,i-1)),t==t?function(e,t,r){for(var i=r+1;i--;)if(e[i]===t)return i;return i}(e,t,o):jt(e,Gt,o,!0)},Ur.lowerCase=Wa,Ur.lowerFirst=Ka,Ur.lt=ua,Ur.lte=pa,Ur.max=function(e){return e&&e.length?mi(e,nl,Ti):n},Ur.maxBy=function(e,t){return e&&e.length?mi(e,co(t,2),Ti):n},Ur.mean=function(e){return Wt(e,nl)},Ur.meanBy=function(e,t){return Wt(e,co(t,2))},Ur.min=function(e){return e&&e.length?mi(e,nl,Ni):n},Ur.minBy=function(e,t){return e&&e.length?mi(e,co(t,2),Ni):n},Ur.stubArray=gl,Ur.stubFalse=yl,Ur.stubObject=function(){return{}},Ur.stubString=function(){return""},Ur.stubTrue=function(){return!0},Ur.multiply=Sl,Ur.nth=function(e,t){return e&&e.length?Hi(e,ma(t)):n},Ur.noConflict=function(){return mt._===this&&(mt._=Le),this},Ur.noop=dl,Ur.now=Bs,Ur.pad=function(e,t,r){e=ba(e);var i=(t=ma(t))?hr(e):0;if(!t||i>=t)return e;var n=(t-i)/2;return Gn(gt(n),r)+e+Gn(ft(n),r)},Ur.padEnd=function(e,t,r){e=ba(e);var i=(t=ma(t))?hr(e):0;return t&&i<t?e+Gn(t-i,r):e},Ur.padStart=function(e,t,r){e=ba(e);var i=(t=ma(t))?hr(e):0;return t&&i<t?Gn(t-i,r)+e:e},Ur.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),_r(ba(e).replace(se,""),t||0)},Ur.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_o(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=fa(e),t===n?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xr();return br(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Vi(e,t)},Ur.reduce=function(e,t,r){var i=Gs(e)?zt:Jt,n=arguments.length<3;return i(e,co(t,4),r,n,pi)},Ur.reduceRight=function(e,t,r){var i=Gs(e)?Nt:Jt,n=arguments.length<3;return i(e,co(t,4),r,n,hi)},Ur.repeat=function(e,t,r){return t=(r?_o(e,t,r):t===n)?1:ma(t),Ji(ba(e),t)},Ur.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Ur.result=function(e,t,r){var i=-1,o=(t=wn(t,e)).length;for(o||(o=1,e=n);++i<o;){var s=null==e?n:e[No(t[i])];s===n&&(i=o,s=r),e=Zs(s)?s.call(e):s}return e},Ur.round=kl,Ur.runInContext=e,Ur.sample=function(e){return(Gs(e)?Qr:Qi)(e)},Ur.size=function(e){if(null==e)return 0;if(Ks(e))return la(e)?hr(e):e.length;var t=go(e);return t==E||t==A?e.size:Oi(e).length},Ur.snakeCase=Va,Ur.some=function(e,t,r){var i=Gs(e)?qt:on;return r&&_o(e,t,r)&&(t=n),i(e,co(t,3))},Ur.sortedIndex=function(e,t){return sn(e,t)},Ur.sortedIndexBy=function(e,t,r){return an(e,t,co(r,2))},Ur.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var i=sn(e,t);if(i<r&&Ls(e[i],t))return i}return-1},Ur.sortedLastIndex=function(e,t){return sn(e,t,!0)},Ur.sortedLastIndexBy=function(e,t,r){return an(e,t,co(r,2),!0)},Ur.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=sn(e,t,!0)-1;if(Ls(e[r],t))return r}return-1},Ur.startCase=Ja,Ur.startsWith=function(e,t,r){return e=ba(e),r=null==r?0:ai(ma(r),0,e.length),t=cn(t),e.slice(r,r+t.length)==t},Ur.subtract=El,Ur.sum=function(e){return e&&e.length?Yt(e,nl):0},Ur.sumBy=function(e,t){return e&&e.length?Yt(e,co(t,2)):0},Ur.template=function(e,t,r){var i=Ur.templateSettings;r&&_o(e,t,r)&&(t=n),e=ba(e),t=xa({},t,i,Xn);var o,s,a=xa({},t.imports,i.imports,Xn),l=Ma(a),d=er(a,l),c=0,u=t.interpolate||xe,p="__p += '",h=Ce((t.escape||xe).source+"|"+u.source+"|"+(u===ee?fe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),f="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(h,(function(t,r,i,n,a,l){return i||(i=n),p+=e.slice(c,l).replace(Se,sr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),i&&(p+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),p+="';\n";var m=Oe.call(t,"variable")&&t.variable;if(m){if(pe.test(m))throw new ke("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(G,""):p).replace(W,"$1").replace(K,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa((function(){return Ee(l,f+"return "+p).apply(n,d)}));if(g.source=p,Qs(g))throw g;return g},Ur.times=function(e,t){if((e=ma(e))<1||e>f)return[];var r=g,i=br(e,g);t=co(t),e-=g;for(var n=Qt(i,t);++r<e;)t(r);return n},Ur.toFinite=fa,Ur.toInteger=ma,Ur.toLength=ga,Ur.toLower=function(e){return ba(e).toLowerCase()},Ur.toNumber=ya,Ur.toSafeInteger=function(e){return e?ai(ma(e),-9007199254740991,f):0===e?e:0},Ur.toString=ba,Ur.toUpper=function(e){return ba(e).toUpperCase()},Ur.trim=function(e,t,r){if((e=ba(e))&&(r||t===n))return Zt(e);if(!e||!(t=cn(t)))return e;var i=fr(e),o=fr(t);return xn(i,rr(i,o),ir(i,o)+1).join("")},Ur.trimEnd=function(e,t,r){if((e=ba(e))&&(r||t===n))return e.slice(0,mr(e)+1);if(!e||!(t=cn(t)))return e;var i=fr(e);return xn(i,0,ir(i,fr(t))+1).join("")},Ur.trimStart=function(e,t,r){if((e=ba(e))&&(r||t===n))return e.replace(se,"");if(!e||!(t=cn(t)))return e;var i=fr(e);return xn(i,rr(i,fr(t))).join("")},Ur.truncate=function(e,t){var r=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ma(t.length):r,i="omission"in t?cn(t.omission):i}var s=(e=ba(e)).length;if(ar(e)){var a=fr(e);s=a.length}if(r>=s)return e;var l=r-hr(i);if(l<1)return i;var d=a?xn(a,0,l).join(""):e.slice(0,l);if(o===n)return d+i;if(a&&(l+=d.length-l),sa(o)){if(e.slice(l).search(o)){var c,u=d;for(o.global||(o=Ce(o.source,ba(me.exec(o))+"g")),o.lastIndex=0;c=o.exec(u);)var p=c.index;d=d.slice(0,p===n?l:p)}}else if(e.indexOf(cn(o),l)!=l){var h=d.lastIndexOf(o);h>-1&&(d=d.slice(0,h))}return d+i},Ur.unescape=function(e){return(e=ba(e))&&Y.test(e)?e.replace(V,gr):e},Ur.uniqueId=function(e){var t=++ze;return ba(e)+t},Ur.upperCase=Ya,Ur.upperFirst=Qa,Ur.each=bs,Ur.eachRight=ws,Ur.first=Ko,ll(Ur,(xl={},wi(Ur,(function(e,t){Oe.call(Ur.prototype,t)||(xl[t]=e)})),xl),{chain:!1}),Ur.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Ur[e].placeholder=Ur})),It(["drop","take"],(function(e,t){$r.prototype[e]=function(r){r=r===n?1:vr(ma(r),0);var i=this.__filtered__&&!t?new $r(this):this.clone();return i.__filtered__?i.__takeCount__=br(r,i.__takeCount__):i.__views__.push({size:br(r,g),type:e+(i.__dir__<0?"Right":"")}),i},$r.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,i=1==r||3==r;$r.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:r}),t.__filtered__=t.__filtered__||i,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");$r.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");$r.prototype[e]=function(){return this.__filtered__?new $r(this):this[r](1)}})),$r.prototype.compact=function(){return this.filter(nl)},$r.prototype.find=function(e){return this.filter(e).head()},$r.prototype.findLast=function(e){return this.reverse().find(e)},$r.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new $r(this):this.map((function(r){return Ai(r,e,t)}))})),$r.prototype.reject=function(e){return this.filter(Os(co(e)))},$r.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $r(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},$r.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$r.prototype.toArray=function(){return this.take(g)},wi($r.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Ur[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(Ur.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof $r,d=a[0],c=l||Gs(t),u=function(e){var t=o.apply(Ur,Ot([e],a));return i&&p?t[0]:t};c&&r&&"function"==typeof d&&1!=d.length&&(l=c=!1);var p=this.__chain__,h=!!this.__actions__.length,f=s&&!p,m=l&&!h;if(!s&&c){t=m?t:new $r(this);var g=e.apply(t,a);return g.__actions__.push({func:fs,args:[u],thisArg:n}),new Hr(g,p)}return f&&m?e.apply(this,a):(g=this.thru(u),f?i?g.value()[0]:g.value():g)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Fe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Ur.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(Gs(n)?n:[],e)}return this[r]((function(r){return t.apply(Gs(r)?r:[],e)}))}})),wi($r.prototype,(function(e,t){var r=Ur[t];if(r){var i=r.name+"";Oe.call(Fr,i)||(Fr[i]=[]),Fr[i].push({name:t,func:r})}})),Fr[Ln(n,2).name]=[{name:"wrapper",func:n}],$r.prototype.clone=function(){var e=new $r(this.__wrapped__);return e.__actions__=An(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=An(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=An(this.__views__),e},$r.prototype.reverse=function(){if(this.__filtered__){var e=new $r(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$r.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Gs(e),i=t<0,n=r?e.length:0,o=function(e,t,r){var i=-1,n=r.length;for(;++i<n;){var o=r[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=br(t,e+s);break;case"takeRight":e=vr(e,t-s)}}return{start:e,end:t}}(0,n,this.__views__),s=o.start,a=o.end,l=a-s,d=i?a:s-1,c=this.__iteratees__,u=c.length,p=0,h=br(l,this.__takeCount__);if(!r||!i&&n==l&&h==l)return mn(e,this.__actions__);var f=[];e:for(;l--&&p<h;){for(var m=-1,g=e[d+=t];++m<u;){var y=c[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}f[p++]=g}return f},Ur.prototype.at=ms,Ur.prototype.chain=function(){return hs(this)},Ur.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},Ur.prototype.next=function(){this.__values__===n&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Ur.prototype.plant=function(e){for(var t,r=this;r instanceof jr;){var i=Uo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Ur.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $r){var t=e;return this.__actions__.length&&(t=new $r(this)),(t=t.reverse()).__actions__.push({func:fs,args:[ts],thisArg:n}),new Hr(t,this.__chain__)}return this.thru(ts)},Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=function(){return mn(this.__wrapped__,this.__actions__)},Ur.prototype.first=Ur.prototype.head,Ze&&(Ur.prototype[Ze]=function(){return this}),Ur}();mt._=yr,(i=function(){return yr}.call(t,r,t,e))===n||(e.exports=i)}.call(this)},55364:(e,t,r)=>{var i=r(85250),n=r(20999)((function(e,t,r){i(e,t,r)}));e.exports=n},10124:(e,t,r)=>{var i=r(9325);e.exports=function(){return i.Date.now()}},58253:(e,t,r)=>{var i=r(13195),n=r(36800),o=r(17400),s=parseFloat,a=Math.min,l=Math.random;e.exports=function(e,t,r){if(r&&"boolean"!=typeof r&&n(e,t,r)&&(t=r=void 0),void 0===r&&("boolean"==typeof t?(r=t,t=void 0):"boolean"==typeof e&&(r=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=o(e),void 0===t?(t=e,e=0):t=o(t)),e>t){var d=e;e=t,t=d}if(r||e%1||t%1){var c=l();return a(e+c*(t-e+s("1e-"+((c+"").length-1))),t)}return i(e,t)}},63345:e=>{e.exports=function(){return[]}},89935:e=>{e.exports=function(){return!1}},7350:(e,t,r)=>{var i=r(38221),n=r(23805);e.exports=function(e,t,r){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),i(e,t,{leading:o,maxWait:t,trailing:s})}},17400:(e,t,r)=>{var i=r(99374),n=1/0;e.exports=function(e){return e?(e=i(e))===n||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},61489:(e,t,r)=>{var i=r(17400);e.exports=function(e){var t=i(e),r=t%1;return t==t?r?t-r:t:0}},99374:(e,t,r)=>{var i=r(54128),n=r(23805),o=r(44394),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var r=a.test(e);return r||l.test(e)?d(e.slice(2),r?2:8):s.test(e)?NaN:+e}},69884:(e,t,r)=>{var i=r(21791),n=r(37241);e.exports=function(e){return i(e,n(e))}},88276:(e,t,r)=>{"use strict";var i=r(56698),n=r(4729),o=r(92861).Buffer,s=new Array(16);function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function d(e,t,r,i,n,o,s){return l(e+(t&r|~t&i)+n+o|0,s)+t|0}function c(e,t,r,i,n,o,s){return l(e+(t&i|r&~i)+n+o|0,s)+t|0}function u(e,t,r,i,n,o,s){return l(e+(t^r^i)+n+o|0,s)+t|0}function p(e,t,r,i,n,o,s){return l(e+(r^(t|~i))+n+o|0,s)+t|0}i(a,n),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,o=this._d;r=d(r,i,n,o,e[0],3614090360,7),o=d(o,r,i,n,e[1],3905402710,12),n=d(n,o,r,i,e[2],606105819,17),i=d(i,n,o,r,e[3],3250441966,22),r=d(r,i,n,o,e[4],4118548399,7),o=d(o,r,i,n,e[5],1200080426,12),n=d(n,o,r,i,e[6],2821735955,17),i=d(i,n,o,r,e[7],4249261313,22),r=d(r,i,n,o,e[8],1770035416,7),o=d(o,r,i,n,e[9],2336552879,12),n=d(n,o,r,i,e[10],4294925233,17),i=d(i,n,o,r,e[11],2304563134,22),r=d(r,i,n,o,e[12],1804603682,7),o=d(o,r,i,n,e[13],4254626195,12),n=d(n,o,r,i,e[14],2792965006,17),r=c(r,i=d(i,n,o,r,e[15],1236535329,22),n,o,e[1],4129170786,5),o=c(o,r,i,n,e[6],3225465664,9),n=c(n,o,r,i,e[11],643717713,14),i=c(i,n,o,r,e[0],3921069994,20),r=c(r,i,n,o,e[5],3593408605,5),o=c(o,r,i,n,e[10],38016083,9),n=c(n,o,r,i,e[15],3634488961,14),i=c(i,n,o,r,e[4],3889429448,20),r=c(r,i,n,o,e[9],568446438,5),o=c(o,r,i,n,e[14],3275163606,9),n=c(n,o,r,i,e[3],4107603335,14),i=c(i,n,o,r,e[8],1163531501,20),r=c(r,i,n,o,e[13],2850285829,5),o=c(o,r,i,n,e[2],4243563512,9),n=c(n,o,r,i,e[7],1735328473,14),r=u(r,i=c(i,n,o,r,e[12],2368359562,20),n,o,e[5],4294588738,4),o=u(o,r,i,n,e[8],2272392833,11),n=u(n,o,r,i,e[11],1839030562,16),i=u(i,n,o,r,e[14],4259657740,23),r=u(r,i,n,o,e[1],2763975236,4),o=u(o,r,i,n,e[4],1272893353,11),n=u(n,o,r,i,e[7],4139469664,16),i=u(i,n,o,r,e[10],3200236656,23),r=u(r,i,n,o,e[13],681279174,4),o=u(o,r,i,n,e[0],3936430074,11),n=u(n,o,r,i,e[3],3572445317,16),i=u(i,n,o,r,e[6],76029189,23),r=u(r,i,n,o,e[9],3654602809,4),o=u(o,r,i,n,e[12],3873151461,11),n=u(n,o,r,i,e[15],530742520,16),r=p(r,i=u(i,n,o,r,e[2],3299628645,23),n,o,e[0],4096336452,6),o=p(o,r,i,n,e[7],1126891415,10),n=p(n,o,r,i,e[14],2878612391,15),i=p(i,n,o,r,e[5],4237533241,21),r=p(r,i,n,o,e[12],1700485571,6),o=p(o,r,i,n,e[3],2399980690,10),n=p(n,o,r,i,e[10],4293915773,15),i=p(i,n,o,r,e[1],2240044497,21),r=p(r,i,n,o,e[8],1873313359,6),o=p(o,r,i,n,e[15],4264355552,10),n=p(n,o,r,i,e[6],2734768916,15),i=p(i,n,o,r,e[13],1309151649,21),r=p(r,i,n,o,e[4],4149444226,6),o=p(o,r,i,n,e[11],3174756917,10),n=p(n,o,r,i,e[2],718787259,15),i=p(i,n,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},52244:(e,t,r)=>{var i=r(61158),n=r(15037);function o(e){this.rand=e||new n.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(e)>=0);return n},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var n=e.bitLength(),o=i.mont(e),s=new i(1).toRed(o);t||(t=Math.max(1,n/48|0));for(var a=e.subn(1),l=0;!a.testn(l);l++);for(var d=e.shrn(l),c=a.toRed(o);t>0;t--){var u=this._randrange(new i(2),a);r&&r(u);var p=u.toRed(o).redPow(d);if(0!==p.cmp(s)&&0!==p.cmp(c)){for(var h=1;h<l;h++){if(0===(p=p.redSqr()).cmp(s))return!1;if(0===p.cmp(c))break}if(h===l)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),n=i.mont(e),o=new i(1).toRed(n);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var l=e.shrn(a),d=s.toRed(n);t>0;t--){var c=this._randrange(new i(2),s),u=e.gcd(c);if(0!==u.cmpn(1))return u;var p=c.toRed(n).redPow(l);if(0!==p.cmp(o)&&0!==p.cmp(d)){for(var h=1;h<a;h++){if(0===(p=p.redSqr()).cmp(o))return p.fromRed().subn(1).gcd(e);if(0===p.cmp(d))break}if(h===a)return(p=p.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},61158:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(64688).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7598:(e,t,r)=>{
|
||
/*!
|
||
* mime-db
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=r(81813)},86049:(e,t,r)=>{"use strict";
|
||
/*!
|
||
* mime-types
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/var i,n,o,s=r(7598),a=r(57975).extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,d=/^text\//i;function c(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),r=t&&s[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!d.test(t[1]))&&"UTF-8"}t.charset=c,t.charsets={lookup:c},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var r=-1===e.indexOf("/")?t.lookup(e):e;if(!r)return!1;if(-1===r.indexOf("charset")){var i=t.charset(r);i&&(r+="; charset="+i.toLowerCase())}return r},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var r=l.exec(e),i=r&&t.extensions[r[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var r=a("x."+e).toLowerCase().substr(1);if(!r)return!1;return t.types[r]||!1},t.types=Object.create(null),i=t.extensions,n=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach((function(e){var t=s[e],r=t.extensions;if(r&&r.length){i[e]=r;for(var a=0;a<r.length;a++){var l=r[a];if(n[l]){var d=o.indexOf(s[n[l]].source),c=o.indexOf(t.source);if("application/octet-stream"!==n[l]&&(d>c||d===c&&"application/"===n[l].substr(0,12)))continue}n[l]=e}}}))},43349:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},64367:(e,t)=>{"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,s=255&n;o?r.push(o,s):r.push(s)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}},6585:e=>{var t=1e3,r=60*t,i=60*r,n=24*i,o=7*n,s=365.25*n;function a(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,l){l=l||{};var d=typeof e;if("string"===d&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var l=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*n;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===d&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=n)return a(e,o,n,"day");if(o>=i)return a(e,o,i,"hour");if(o>=r)return a(e,o,r,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=n)return Math.round(e/n)+"d";if(o>=i)return Math.round(e/i)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},43092:(e,t,r)=>{"use strict";var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();e.exports=t=i.fetch,i.fetch&&(t.default=i.fetch.bind(i)),t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response},58859:(e,t,r)=>{var i="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&n&&"function"==typeof n.get?n.get:null,s=i&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,d=a&&l&&"function"==typeof l.get?l.get:null,c=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,k=Array.prototype.join,E=Array.prototype.slice,T=Math.floor,B="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,F="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-T(-e):T(e);if(i!==e){var n=String(i),o=v.call(t,n.length+1);return b.call(n,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var P=r(42634),O=P.custom,z=j(O)?O:null;function N(e,t,r){var i="double"===(r.quoteStyle||t)?'"':"'";return i+e+i}function q(e){return b.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==G(e)||F&&"object"==typeof e&&F in e)}function L(e){return!("[object RegExp]"!==G(e)||F&&"object"==typeof e&&F in e)}function j(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}e.exports=function e(t,i,n,a){var l=i||{};if($(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!$(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var x=String(t);return w?R(t,x):x}if("bigint"==typeof t){var T=String(t)+"n";return w?R(t,T):T}var C=void 0===l.depth?5:l.depth;if(void 0===n&&(n=0),n>=C&&C>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var O=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=k.call(Array(e.indent+1)," ")}return{base:r,prev:k.call(Array(t+1),r)}}(l,n);if(void 0===a)a=[];else if(W(a,t)>=0)return"[Circular]";function H(t,r,i){if(r&&(a=E.call(a)).push(r),i){var o={depth:l.depth};return $(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,n+1,a)}return e(t,l,n+1,a)}if("function"==typeof t&&!L(t)){var V=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,H);return"[Function"+(V?": "+V:" (anonymous)")+"]"+(ee.length>0?" { "+k.call(ee,", ")+" }":"")}if(j(t)){var te=A?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(t);return"object"!=typeof t||A?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var re="<"+_.call(String(t.nodeName)),ie=t.attributes||[],ne=0;ne<ie.length;ne++)re+=" "+ie[ne].name+"="+N(q(ie[ne].value),"double",l);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+="</"+_.call(String(t.nodeName))+">"}if(U(t)){if(0===t.length)return"[]";var oe=X(t,H);return O&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(oe)?"["+Z(oe,O)+"]":"[ "+k.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||F&&"object"==typeof e&&F in e)}(t)){var se=X(t,H);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(se,", ")+" }":"{ ["+String(t)+"] "+k.call(S.call("[cause]: "+H(t.cause),se),", ")+" }"}if("object"==typeof t&&m){if(z&&"function"==typeof t[z]&&P)return P(t,{depth:C-n});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{d.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s&&s.call(t,(function(e,r){ae.push(H(r,t,!0)+" => "+H(e,t))})),Q("Map",o.call(t),ae,O)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return c&&c.call(t,(function(e){le.push(H(e,t))})),Q("Set",d.call(t),le,O)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==G(e)||F&&"object"==typeof e&&F in e)}(t))return J(H(Number(t)));if(function(e){if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}(t))return J(H(B.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||F&&"object"==typeof e&&F in e)}(t))return J(f.call(t));if(function(e){return!("[object String]"!==G(e)||F&&"object"==typeof e&&F in e)}(t))return J(H(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==G(e)||F&&"object"==typeof e&&F in e)}(t)&&!L(t)){var de=X(t,H),ce=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",pe=!ce&&F&&Object(t)===t&&F in t?v.call(G(t),8,-1):ue?"Object":"",he=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||ue?"["+k.call(S.call([],pe||[],ue||[]),": ")+"] ":"");return 0===de.length?he+"{}":O?he+"{"+Z(de,O)+"}":he+"{ "+k.call(de,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function $(e,t){return H.call(e,t)}function G(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}function K(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+i}return N(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,V),"single",t)}function V(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,r,i){return e+" ("+t+") {"+(i?Z(r,i):k.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+k.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=U(e),i=[];if(r){i.length=e.length;for(var n=0;n<e.length;n++)i[n]=$(e,n)?t(e[n],e):""}var o,s="function"==typeof C?C(e):[];if(A){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in e)$(e,l)&&(r&&String(Number(l))===l&&l<e.length||A&&o["$"+l]instanceof Symbol||(x.call(/[^\w$]/,l)?i.push(t(l,e)+": "+t(e[l],e)):i.push(l+": "+t(e[l],e))));if("function"==typeof C)for(var d=0;d<s.length;d++)M.call(e,s[d])&&i.push("["+t(s[d])+"]: "+t(e[s[d]],e));return i}},21137:(e,t,r)=>{"use strict";var i=r(87568);t.certificate=r(36413);var n=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=n;var o=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var l=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=l;var d=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=d;var c=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=i.define("DSAparam",(function(){this.int()}));var u=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),p=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=p,t.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},36413:(e,t,r)=>{"use strict";var i=r(87568),n=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=i.define("RelativeDistinguishedName",(function(){this.setof(o)})),d=i.define("RDNSequence",(function(){this.seqof(l)})),c=i.define("Name",(function(){this.choice({rdnSequence:this.use(d)})})),u=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),p=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(c),this.key("validity").use(u),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),f=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=f},24101:(e,t,r)=>{"use strict";var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(68078),a=r(1241),l=r(92861).Buffer;e.exports=function(e,t){var r,d=e.toString(),c=d.match(i);if(c){var u="aes"+c[1],p=l.from(c[2],"hex"),h=l.from(c[3].replace(/[\r\n]/g,""),"base64"),f=s(t,p.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(u,f,p);m.push(g.update(h)),m.push(g.final()),r=l.concat(m)}else{var y=d.match(o);r=l.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:d.match(n)[1],data:r}}},78170:(e,t,r)=>{"use strict";var i=r(21137),n=r(15579),o=r(24101),s=r(1241),a=r(78396),l=r(92861).Buffer;function d(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var r,d,c=o(e,t),u=c.tag,p=c.data;switch(u){case"CERTIFICATE":d=i.certificate.decode(p,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(d||(d=i.PublicKey.decode(p,"der")),r=d.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(d.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return d.subjectPrivateKey=d.subjectPublicKey,{type:"ec",data:d};case"1.2.840.10040.4.1":return d.algorithm.params.pub_key=i.DSAparam.decode(d.subjectPublicKey.data,"der"),{type:"dsa",data:d.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":p=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[e.algorithm.decrypt.cipher.algo.join(".")],d=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,u=parseInt(o.split("-")[1],10)/8,p=a.pbkdf2Sync(t,r,i,u,"sha1"),h=s.createDecipheriv(o,p,d),f=[];return f.push(h.update(c)),f.push(h.final()),l.concat(f)}(p=i.EncryptedPrivateKey.decode(p,"der"),t);case"PRIVATE KEY":switch(r=(d=i.PrivateKey.decode(p,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(d.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:d.algorithm.curve,privateKey:i.ECPrivateKey.decode(d.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return d.algorithm.params.priv_key=i.DSAparam.decode(d.subjectPrivateKey,"der"),{type:"dsa",params:d.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(p,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(p,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(p,"der")};case"EC PRIVATE KEY":return{curve:(p=i.ECPrivateKey.decode(p,"der")).parameters.value,privateKey:p.privateKey};default:throw new Error("unknown key type "+u)}}d.signature=i.signature,e.exports=d},57975:(e,t,r)=>{"use strict";var i=r(65606);function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var r,i="",n=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(i.length<2||2!==n||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",n=0):n=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),o=a,s=0;continue}}else if(2===i.length||1===i.length){i="",n=0,o=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",n=2)}else i.length>0?i+="/"+e.slice(o+1,a):i=e.slice(o+1,a),n=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return i}var s={resolve:function(){for(var e,t="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=i.cwd()),a=e),n(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=o(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var i=e.length,o=i-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,d=o<l?o:l,c=-1,u=0;u<=d;++u){if(u===d){if(l>d){if(47===t.charCodeAt(a+u))return t.slice(a+u+1);if(0===u)return t.slice(a+u)}else o>d&&(47===e.charCodeAt(r+u)?c=u:0===u&&(c=0));break}var p=e.charCodeAt(r+u);if(p!==t.charCodeAt(a+u))break;47===p&&(c=u)}var h="";for(u=r+c+1;u<=i;++u)u!==i&&47!==e.charCodeAt(u)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(a+c):(a+=c,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var d=e.charCodeAt(r);if(47===d){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(d===t.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){r=a+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+i:r+e+i:i}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,d=!0,c=e.length-1,u=0;c>=r;--c)if(47!==(i=e.charCodeAt(c)))-1===l&&(d=!1,l=c+1),46===i?-1===s?s=c:1!==u&&(u=1):-1!==s&&(u=-1);else if(!d){a=c+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===a+1?-1!==l&&(t.base=t.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(a,s),t.base=e.slice(a,l)),t.ext=e.slice(s,l)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},78396:(e,t,r)=>{t.pbkdf2=r(43832),t.pbkdf2Sync=r(21352)},43832:(e,t,r)=>{var i,n,o=r(92861).Buffer,s=r(64196),a=r(2455),l=r(21352),d=r(93382),c=r.g.crypto&&r.g.crypto.subtle,u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},p=[];function h(){return n||(n=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function f(e,t,r,i,n){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,n,m,g,y){"function"==typeof g&&(y=g,g=void 0);var v=u[(g=g||"sha1").toLowerCase()];if(v&&"function"==typeof r.g.Promise){if(s(n,m),e=d(e,a,"Password"),t=d(t,a,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==p[e])return p[e];var t=f(i=i||o.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return p[e]=t,t}(v).then((function(r){return r?f(e,t,n,m,v):l(e,t,n,m,g)})),y)}else h()((function(){var r;try{r=l(e,t,n,m,g)}catch(e){return y(e)}y(null,r)}))}},2455:(e,t,r)=>{var i,n=r(65606);if(r.g.process&&r.g.process.browser)i="utf-8";else if(r.g.process&&r.g.process.version){i=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else i="utf-8";e.exports=i},64196:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},21352:(e,t,r)=>{var i=r(20320),n=r(66011),o=r(62802),s=r(92861).Buffer,a=r(64196),l=r(2455),d=r(93382),c=s.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(e,t,r){var a=function(e){function t(t){return o(e).update(t).digest()}function r(e){return(new n).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?i:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=a(t):t.length<l&&(t=s.concat([t,c],l));for(var d=s.allocUnsafe(l+u[e]),p=s.allocUnsafe(l+u[e]),h=0;h<l;h++)d[h]=54^t[h],p[h]=92^t[h];var f=s.allocUnsafe(l+r+4);d.copy(f,0,0,l),this.ipad1=f,this.ipad2=d,this.opad=p,this.alg=e,this.blocksize=l,this.hash=a,this.size=u[e]}p.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,i,n){a(r,i);var o=new p(n=n||"sha1",e=d(e,l,"Password"),(t=d(t,l,"Salt")).length),c=s.allocUnsafe(i),h=s.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var f=0,m=u[n],g=Math.ceil(i/m),y=1;y<=g;y++){h.writeUInt32BE(y,t.length);for(var v=o.run(h,o.ipad1),b=v,w=1;w<r;w++){b=o.run(b,o.ipad2);for(var _=0;_<m;_++)v[_]^=b[_]}v.copy(c,f),f+=m}return c}},93382:(e,t,r)=>{var i=r(92861).Buffer;e.exports=function(e,t,r){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,t);if(ArrayBuffer.isView(e))return i.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},57985:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.apiServer,i=void 0===r?d:r,u=t.apiProtocol,p=void 0===u?"https":u,h=t.params,f=void 0===h?{}:h,m=(0,n.default)(t,["apiServer","apiProtocol","params"]);(0,s.default)((0,a.isApiMethod)(e),"Method `"+e+"` is not pCloud API method."),(0,s.default)(!(0,a.isAuthMethod)(e)||"auth"in f||"access_token"in f||"username"in f,"`auth` must be present for methods that require authentication.");var g=o.default.format({protocol:p,host:c[locationid]||i,pathname:e,query:f});void 0===m.responseType&&(m.responseType="json");return(0,l.default)(g,m).then((function(e){return"json"===m.responseType&&0!==e.result?Promise.reject(e):e}))};var n=i(r(91847)),o=i(r(88835)),s=i(r(20311)),a=r(27413),l=i(r(47023)),d="eapi.pcloud.com",c={1:"api.pcloud.com",2:"eapi.pcloud.com"}},47023:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(e.length,"`url` is required.");var r=t.method,i=void 0===r?"get":r,u=t.responseType,p=void 0===u?"json":u,h=t.onProgress,f=void 0===h?function(){}:h,m=t.xhr,g=t.pipe,y=void 0!==g&&g,v=t.files,b=void 0===v?[]:v;if("get"===i&&e in l)return void 0===d[e]&&(d[e]=[]),new Promise((function(r){d[e].push([function(e){r(e)},t])}));l[e]=1;var w=o.default[i](e);w.on("progress",f),b.length&&((0,s.default)(-1!==["put","post"].indexOf(i),"When uploading, `method` must be either `post` or `put`."),b.forEach((function(e){var t=e.name,r=void 0===t?void 0:t,i=e.file;(0,s.default)(i,"`file` is a required property of `files`."),w.attach("file-upload-"+ ++c,i,r)})));"responseType"in w&&"json"!==p&&w.responseType(p);if("node"===ENV&&(w.use(a.httpProgressMiddleware),y))return new Promise((function(e,t){w.pipe(y).on("finish",e).on("error",t)}));m&&m(w.xhr);return w.then((function(t){if("json"===p){var r=t.body;return function(t){if(_(),e in d)for(;d[e].length;){var r=d[e].shift();(0,(0,n.default)(r,1)[0])(t)}}(r),r}if("text"===p)return t.text})).catch((function(e){var t={result:e.status||500,error:"Network Error"};return _(),Promise.reject(t)}));function _(){e in l&&delete l[e]}};var n=i(r(85715)),o=i(r(15734)),s=i(r(20311)),a=r(27413),l={},d={};var c=1},21272:(e,t,r)=>{"use strict";var i=r(6305),n=r(24994);t.A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"oauth",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,o.default)(-1!==["oauth","pcloud"].indexOf(t),"`type` must be either `oauth` or `pcloud`."),"oauth"===t&&((0,o.default)("string"==typeof e,"`token` is required."),(0,o.default)(e.length,"`token` is required."));function i(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,s.default)({},function(r){var i={params:{}};return(0,d.isAuthMethod)(r)&&e&&(i.params["oauth"===t?"access_token":"auth"]=e),i}(r),n);return(0,a.default)(r,o).catch((function(e){return 500===e.result&&apiServer!==c?(apiServer=c,i(r,n)):Promise.reject(e)}))}function n(){return i("getapiserver",{}).then((function(e){return apiServer=e.api[0]}))}function u(t){e=t}var p,h={api:i,setupProxy:n};for(var f in l){if(Object.prototype.hasOwnProperty.call(l,f))"function"==typeof(p=(0,l[f])({client:h,setToken:u,type:t}))&&(h[f]=p)}r&&n();return h};var o=n(r(20311)),s=n(r(73923)),a=n(r(57985)),l=i(r(83666)),d=r(27413),c="api.pcloud.com"},32614:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311)),o={view:0,edit:7};t.default=function(e){var t=e.client,r=e.type;return function(e,i,s){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"view";return(0,n.default)("pcloud"===r,"This method supports only clients of type `pcloud`."),(0,n.default)("number"==typeof e,"`folderid` must be number."),(0,n.default)(0!==e,"`folderid` cannot be 0."),(0,n.default)(-1!=["view","edit"].indexOf(a),"`permissions` can be either `view` or `edit`."),(0,n.default)(i,"`userid` is required."),(0,n.default)("number"==typeof i,"`userid` is required."),(0,n.default)(parseInt(i),"`userid` must be either number or a valid mail address."),(0,n.default)(s,"`clientid` is required"),(0,n.default)("string"==typeof s,"`clientid` is required"),t.api("sharefolder",{params:{folderid:e,permissions:o[a],userid:i,client_id:s}}).then((function(){return!0}))}}},14813:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(47023));t.default=function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){var r=t.onBegin,i=t.onProgress,o=t.onFinish;return r&&r(),(0,n.default)(e,{type:"arraybuffer",onProgress:function(e){"download"===e.direction&&t.onProgress&&i&&i(e)}}).then((function(e){return t.onFinish&&o&&o(e),e}))}}}},79099:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=e.client;return function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.getfilelink,o=t.download;return n(e).then(o(r,i))}}},62324:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(73738)),o=i(r(20311));t.default=function(e){var t=e.client;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e,"`file` is required."),(0,o.default)("object"===(0,n.default)(e),"`file` of type File must be supplied.");var s=i.onBegin,a=i.onProgress,l=i.onFinish;return s&&s(),t.api("uploadfile",{method:"post",params:{folderid:r,nopartial:1},files:[{file:e}],onProgress:function(e){"upload"===e.direction&&a&&a(e)}}).then((function(e){var t=e.metadata,r=e.checksums,i={metadata:t[0],checksums:r[0]};return l&&l(i),i}))}}},58292:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,n.default)(e.length,"`name` for is required"),(0,n.default)("string"==typeof e,"`name` is required and be a string."),(0,n.default)("number"==typeof r,"`parentfolderid` is required."),t.api("createfolder",{params:{name:e,folderid:r}}).then((function(e){return e.metadata}))}}},33881:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e){return(0,n.default)("number"==typeof e,"`fileid` must be a number."),(0,n.default)(e,"`fileid` is required."),t.api("deletefile",{params:{fileid:e}}).then((function(){return!0}))}}},65315:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e){return(0,n.default)("number"==typeof e,"`folderid must be a number.`"),(0,n.default)(e,"`folderid` is required and can't be `0`."),t.api("deletefolderrecursive",{params:{folderid:e}}).then((function(){return!0}))}}},30964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(27413);t.default=function(e){var t=e.client;return function(e){return t.api("getfilelink",{params:{fileid:e,forcedownload:1}}).then((function(e){return(0,i.pCloudUrl)(e)}))}}},84591:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(73738)),o=i(r(20311)),s=i(r(94220));t.default=function(e){var t=e.client;return function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"32x32";(0,o.default)("object"===(0,n.default)(e)&&"length"in e&&e.length,"`fileids` is required, must be array of numbers."),(0,o.default)(-1!==["auto","png","jpg"].indexOf(i),'thumbType must be one of: "auto", "png", "jpg".'),(0,o.default)(-1!==["32x32","120x120"].indexOf(a),'size must be one of: "32x32", "120x120".'),(0,o.default)(r,"`receiveThumb` is required."),(0,o.default)("function"==typeof r,"`receiveThumb` must be a function.");var l=[],d=(0,s.default)();return t.api("getthumbs",{responseType:"text",params:{fileids:e.join(","),type:i,size:a,crop:1},onProgress:function(e){var t=d(e.currentTarget.responseText);l=l.concat(t),t.forEach(r)}}).then((function(e){var t=d(e);return t.forEach(r),l.concat(t)}))}}},83666:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appshare",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"createfolder",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"deletefile",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"download",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"downloadfile",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"deletefolder",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"getfilelink",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"getthumbs",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"listfolder",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"login",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"movefile",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"movefolder",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"register",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"remoteupload",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"renamefile",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"renamefolder",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"sharefolder",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"upload",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"userinfo",{enumerable:!0,get:function(){return x.default}});var n=i(r(32614)),o=i(r(58292)),s=i(r(33881)),a=i(r(14813)),l=i(r(79099)),d=i(r(65315)),c=i(r(30964)),u=i(r(84591)),p=i(r(43956)),h=i(r(28199)),f=i(r(61131)),m=i(r(6173)),g=i(r(86689)),y=i(r(8727)),v=i(r(50004)),b=i(r(91962)),w=i(r(44221)),_=i(r(62324)),x=i(r(59147))},43956:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(43693)),o=i(r(20311));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.default=function(e){var t=e.client;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return(0,o.default)("number"==typeof e,"`folderid` must be a number."),t.api("listfolder",{params:a({folderid:e},r)}).then((function(e){return e.metadata}))}}},28199:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311)),o=r(27413);t.default=function(e){var t=e.client,r=e.setToken;return function(e,i){return(0,n.default)("string"==typeof e&&(0,o.isEmail)(e),"`email` must be provided."),(0,n.default)(i,"`password` is required."),(0,n.default)(i.length,"`password` is required."),t.api("userinfo",{params:{username:e,password:i,getauth:1,logout:1}}).then((function(e){var t=e.auth;return r(t),t}))}}},61131:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e,r){return(0,n.default)("number"==typeof e,"`fileid` must be number."),(0,n.default)(0!==e,"`fileid` cannot be 0."),(0,n.default)(r,"`tofolderid` is required."),t.api("renamefile",{params:{fileid:e,tofolderid:r}}).then((function(e){return e.metadata}))}}},6173:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e,r){return(0,n.default)("number"==typeof e,"`folderid` must be number."),(0,n.default)(0!==e,"`folderid` cannot be 0."),(0,n.default)(r,"`tofolderid` is required."),t.api("renamefolder",{params:{folderid:e,tofolderid:r}}).then((function(e){return e.metadata}))}}},86689:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311)),o=r(27413);t.default=function(e){var t=e.client;return function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.default)("string"==typeof e&&(0,o.isEmail)(e),"`email` must be provided."),(0,n.default)(r,"`password` is required."),(0,n.default)(r.length,"`password` is required.");var s={mail:e,password:r,getauth:1,logout:1,termsaccepted:"yes"};return i.invite&&(s.invite=i.invite),i.ref&&(s.ref=i.ref),"web"===ENV&&(s.os=4,s.device=navigator.userAgent),t.api("register",{params:s}).then((function(e){return e.userid}))}}},8727:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311)),o=r(27413);t.default=function(e){var t=e.client;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,n.default)(e,"`file` is required."),(0,n.default)("string"==typeof e,"`file` must be supplied");var a,l=i.onBegin,d=i.onProgress,c=i.onFinish,u="pcloud-sdk-remote-"+(0,o.uniqueNumber)()+"-"+(0,o.randomNumber)(),p=function e(t){f(t),a=setTimeout((function(){return e(t)}),200)},h=function(){a&&clearTimeout(a)},f=function(e){t.api("uploadprogress",{params:{progresshash:u,apiServer:e}}).then((function(e){var t=e.files;return d&&d(s(t))})).catch((function(e){var t=e.result,r=e.error;1900===t&&d&&d(s()),console.log(r)}))};return l&&l(),t.api("currentserver").then((function(i){var n=i.hostname,o=t.api("downloadfile",{method:"post",params:{folderid:r,progresshash:u,nopartial:1,url:e,apiServer:n}});return p(n),o})).then((function(e){var t=e.metadata;return h(),c&&c({metadata:t[0]}),{metadata:t[0]}})).catch((function(e){h(),console.log("Error",e)}))}};var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{all:{downloaded:e.reduce((function(e,t){var r=t.downloaded;return e+(void 0===r?0:r)}),0),size:e.reduce((function(e,t){var r=t.size;return e+(void 0===r?0:r)}),0)},files:e}}},50004:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e,r){return(0,n.default)("number"==typeof e,"`fileid` must be number."),(0,n.default)(0!==e,"`fileid` cannot be 0."),(0,n.default)(r,"`toname` is required."),(0,n.default)(r.length,"`toname` is required."),t.api("renamefile",{params:{fileid:e,toname:r}}).then((function(e){return e.metadata}))}}},91962:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311));t.default=function(e){var t=e.client;return function(e,r){return(0,n.default)("number"==typeof e,"`folderid` must be number."),(0,n.default)(0!==e,"`folderid` cannot be 0."),(0,n.default)(r,"`toname` is required."),(0,n.default)(r.length,"`toname` is required."),t.api("renamefolder",{params:{folderid:e,toname:r}}).then((function(e){return e.metadata}))}}},44221:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(20311)),o=r(27413),s={view:0,edit:7};t.default=function(e){var t=e.client;return function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"view",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;(0,n.default)("number"==typeof e,"`folderid` must be number."),(0,n.default)(0!==e,"`folderid` cannot be 0."),(0,n.default)(-1!=["view","edit"].indexOf(i),"`permissions` can be either `view` or `edit`."),(0,n.default)(r,"`mail` is required."),(0,n.default)("string"==typeof r,"`mail` is required."),(0,n.default)((0,o.isEmail)(r),"`mail` must be either number or a valid mail address.");var l={};return l.folderid=e,l.permissions=s[i],l.mail=r,a&&(l.message=a),t.api("sharefolder",{params:l}).then((function(){return!0}))}}},59147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=e.client;return function(){return t.api("userinfo")}}},83679:(e,t,r)=>{"use strict";r.g.ENV="web"},85403:(e,t,r)=>{"use strict";r(83679),e.exports={createClient:r(21272).A,oauth:r(16019).A,ApiMethod:r(57985).default,ApiRequest:r(57985).default}},16019:(e,t,r)=>{"use strict";var i=r(24994);t.A=void 0;var n=i(r(88835)),o=i(r(20311)),s=i(r(57985)),a=r(52768);function l(e){return n.default.format({protocol:"https",hostname:"my.pcloud.com",pathname:"/oauth2/authorize",query:e})}var d={initOauthToken:function(e){var t=e.client_id,r=void 0===t?null:t,i=e.redirect_uri,n=void 0===i?null:i,s=e.receiveToken,a=void 0===s?null:s,d=e.response_type,c=void 0===d?"token":d;(0,o.default)(r,"`client_id` is required."),(0,o.default)(n,"`redirect_uri` is required."),(0,o.default)(a,"`receiveToken` is required.");var u=l({redirect_uri:n,client_id:r,response_type:c});window.open(u,"oauth","width=680,height=700"),window.__setPcloudToken=function(e,t){a(e,t),delete window.__setPcloudToken}},initOauthPollToken:function(e){var t=(0,a.generateRandomString)(40),r=e.client_id,i=void 0===r?null:r,n=e.receiveToken,d=void 0===n?null:n,c=e.onError,u=void 0===c?null:c;(0,o.default)(i,"`client_id` is required."),(0,o.default)(d,"`receiveToken` is required."),(0,o.default)(u,"`onError` is required.");var p=l({request_id:t,client_id:i,response_type:"poll_token"});window.open(p,"","width=680,height=700"),(0,s.default)("oauth2_token",{apiServer:"eapi.pcloud.com",params:{client_id:i,request_id:t}}).then((function(e){d(e.access_token,e.locationid)})).catch((function(e){u(e)})),(0,s.default)("oauth2_token",{apiServer:"api.pcloud.com",params:{client_id:i,request_id:t}}).then((function(e){d(e.access_token,e.locationid)})).catch((function(e){u(e)}))},popup:function(){var e=location.hash.match(/access_token=([^&]+)/),t=location.search.match(/code=([^&]+)/),r=location.hash.match(/locationid=([^&]+)/),i=r?r[1]:null,n=e?e[1]:t?t[1]:null;n&&(window.opener.__setPcloudToken(n,i),window.close())},getTokenFromCode:function(e,t,r){return(0,s.default)("oauth2_token",{params:{client_id:t,client_secret:r,code:e}})}};t.A=d},52768:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\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,}))$/.test(e)},t.fileext=function(e){return e.split(".").pop()},t.formatSize=function(e,t){void 0===t&&(t=1);return(e=parseInt(e,10))>=1099511627776?(e/1099511627776).toFixed(t)+" Tb":e>=1073741824?(e/1073741824).toFixed(t)+" Gb":e>=1048576?(e/1048576).toFixed(t)+" Mb":e>=1024?(e/1024).toFixed(t)+" Kb":e.toFixed(t)+" B"},t.uniqueNumber=function(){return++r},t.randomNumber=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return Math.random()*(10<<e)},t.methodStringify=function(e,t){return JSON.stringify({method:e,params:t})},t.pCloudUrl=function(e){return"https://"+e.hosts[0]+e.path},t.generateRandomString=function(e){for(var t=[],r=0;r<e;r++)t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(100*Math.random())]);return t.join("")};var r=0},17898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=0,r=0;e.on("response",(function(i){0===r&&(r=i.headers["content-length"]),i.on("data",(function(i){t+=i.length,e.emit("progress",{direction:"download",loaded:t,total:r})}))}))}},27413:(e,t,r)=>{"use strict";var i=r(24994);Object.defineProperty(t,"__esModule",{value:!0});var n={httpProgressMiddleware:!0};Object.defineProperty(t,"httpProgressMiddleware",{enumerable:!0,get:function(){return s.default}});var o=r(52768);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var s=i(r(17898)),a=r(66719);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},66719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isApiMethod=i,t.isAuthMethod=n,t.isOAuthMethod=function(e){return n(e)&&"oauth"in r[e]},t.pCloudApiMethods=void 0;var r={oauth2_token:{auth:!1,type:"write"},register:{auth:!1,type:"write"},listfolder:{auth:!0,type:"read"},createfolder:{auth:!0,type:"write"},userinfo:{auth:!0,type:"read"},currentserver:{auth:!1,type:"read"},uploadfile:{auth:!0,type:"write"},getfilelink:{auth:!0,type:"read"},getapiserver:{auth:!1,type:"read"},renamefolder:{auth:!0,type:"write"},deletefile:{auth:!0,type:"write"},deletefolderrecursive:{auth:!0,type:"write"},logout:{auth:!0,type:"write"},createfolderifnotexists:{auth:!0,type:"write"},getthumblink:{auth:!0,type:"read"},getvideolink:{auth:!0,type:"read"},getaudiolink:{auth:!0,type:"read"},deletefolder:{auth:!0,type:"write"},diff:{auth:!0,type:"write"},subscribe:{auth:!0,type:"write"},listnotifications:{auth:!0,type:"write"},readnotifications:{auth:!0,type:"write"},listshares:{auth:!0,type:"read"},acceptshare:{auth:!0,type:"write"},declineshare:{auth:!0,type:"write"},removeshare:{auth:!0,type:"write"},cancelsharerequest:{auth:!0,type:"write"},changeshare:{auth:!0,type:"write"},sharefolder:{auth:!0,type:"write"},copyfile:{auth:!0,type:"write"},checksumfile:{auth:!0,type:"read"},copyfolder:{auth:!0,type:"write"},listpublinks:{auth:!0,type:"read"},getfilepublink:{auth:!0,type:"write"},getfolderpublink:{auth:!0,type:"write"},gettreepublink:{auth:!0,type:"write"},deletepublink:{auth:!0,type:"write"},changepublink:{auth:!0,type:"write"},copypubfile:{auth:!0,type:"write"},renamefile:{auth:!0,type:"write"},showpublink:{auth:!1,type:"read"},getzip:{auth:!0,type:"write"},getziplink:{auth:!0,type:"write"},createuploadlink:{auth:!0,type:"write"},listuploadlinks:{auth:!0,type:"read"},deleteuploadlink:{auth:!0,type:"write"},changeuploadlink:{auth:!0,type:"write"},uploadlinkprogress:{auth:!0,type:"read"},downloadfile:{auth:!0,type:"write"},lostpassword:{auth:!1,type:"write"},resetpassword:{auth:!1,type:"write"},changepassword:{auth:!0,type:"write"},verifyemail:{auth:!1,type:"write"},sharerequestinfo:{auth:!1,type:"read"},sendverificationemail:{auth:!0,type:"write"},getthumbslinks:{auth:!0,type:"read"},getthumbs:{auth:!0,type:"read"},uploadprogress:{auth:!0,type:"write"},invite:{auth:!0,type:"write"},fb_assign:{auth:!0,type:"write"},userbonuses:{auth:!0,type:"write"},givebonus:{auth:!0,type:"write"},userinvites:{auth:!0,type:"write"},getvideolinks:{auth:!0,type:"read"},backup_modify:{auth:!0,type:"write"},backup_list:{auth:!0,type:"read"},social_assign:{auth:!0,type:"write"},extractarchive:{auth:!0,type:"write"},extractarchiveprogress:{auth:!0,type:"write"},listrevisions:{auth:!0,type:"read"},revertrevision:{auth:!0,type:"write"},supportedlanguages:{auth:!0,type:"read"},newsletter_check:{auth:!0,type:"read"},blockchain_address:{auth:!0,type:"read"},trash_list:{auth:!0,type:"read"},trash_clear:{auth:!0,type:"write"},trash_restore:{auth:!0,type:"write"},trash_getrestorepath:{auth:!0,type:"write"},collection_list:{auth:!0,type:"read"},collection_details:{auth:!0,type:"read"},collection_create:{auth:!0,type:"write"},collection_rename:{auth:!0,type:"write"},collection_delete:{auth:!0,type:"write"},collection_linkfiles:{auth:!0,type:"write"},collection_unlinkfiles:{auth:!0,type:"write"},collection_move:{auth:!0,type:"write"},app_userlist:{auth:!0,type:"read"},app_userdelete:{auth:!0,type:"write"},gettextfile:{auth:!0,type:"write"},getpubtextfile:{auth:!1,type:"write"},account_teams:{auth:!0,type:"read"},account_teamcreate:{auth:!0,type:"read"},account_info:{auth:!0,type:"read"},account_modify:{auth:!0,type:"write"},account_users:{auth:!0,type:"read"},account_invitemail:{auth:!0,type:"read"},account_usermodify:{auth:!0,type:"write"},account_teammodify:{auth:!0,type:"write"},account_teamlink:{auth:!0,type:"write"},account_billinginfo:{auth:!0,type:"read"},account_invoice_modify:{auth:!0,type:"write"},account_upload_avatar:{auth:!0,type:"write"},account_teamunlink:{auth:!0,type:"write"},account_teamlink_head:{auth:!0,type:"write"},account_teamlink_accept:{auth:!0,type:"write"},account_invitelist:{auth:!0,type:"read"},account_invalidate_password:{auth:!0,type:"write"},account_invitecancel:{auth:!0,type:"write"},commentlist:{auth:!0,type:"read"},commentpost:{auth:!0,type:"write"},commentdelete:{auth:!0,type:"write"},eventsubscribe:{auth:!0,type:"write"},account_teamshare:{auth:!0,type:"write"},account_modifyshare:{auth:!0,type:"write"},account_stopshare:{auth:!0,type:"write"},account_listshares:{auth:!0,type:"read"},account_log:{auth:!0,type:"read"},account_paystripe:{auth:!0,type:"read"},listtokens:{auth:!0,type:"read"},deletetoken:{auth:!0,type:"write"},savezip:{auth:!0,type:"write"},savezipprogress:{auth:!0,type:"write"},contactload:{auth:!0,type:"write"},sendpublink:{auth:!0,type:"write"},contactlist:{auth:!0,type:"read"},account_viewtoken:{auth:!0,type:"write"},eventslast:{auth:!0,type:"write"},search:{auth:!0,type:"read"},issueproforma:{auth:!0,type:"write"},listproforma:{auth:!0,type:"write"},getbreadcrumb:{auth:!0,type:"read"},getpreviewlink:{auth:!0,type:"read"},getpublinkpreviewdownload:{type:"read",auth:!1},setlanguage:{auth:!0,type:"write"},account_branding:{auth:!0,type:"read"},account_branding_set:{auth:!0,type:"write"},account_branding_logo_upload:{auth:!0,type:"write"},account_logintoken:{auth:!0,type:"write"},getpublinkstats:{auth:!0,type:"read"},getpublinkadpreference:{auth:!0,type:"read"},setpublinkadpreference:{auth:!0,type:"write"},account_ispublinktrafficlimited:{auth:!0,type:"read"},getreferrallink:{auth:!0,type:"read"},sendreferrallink:{auth:!0,type:"write"},listpaymentsubscriptions:{auth:!0,type:"read"},getip:{auth:!1,type:"read"},crypto_getuserkeys:{auth:!0,type:"read"},crypto_getfolderkey:{auth:!0,type:"read"},crypto_getfilekey:{auth:!0,type:"read"},crypto_reset:{auth:!0,type:"write"},crypto_setuserkeys:{auth:!0,type:"write"},crypto_getuserhint:{auth:!0,type:"write"},upload_create:{auth:!0,type:"write"},upload_write:{auth:!0,type:"write"},upload_save:{auth:!0,type:"write"},crypto_getroot:{auth:!0,type:"read"},crypto_getfolderskey:{auth:!0,type:"read"},stat:{auth:!0,type:"read"}};function i(e){return e in r}function n(e){return i(e)&&r[e].auth}t.pCloudApiMethods=r},94220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e,t=0,s=[];return function(a){for(var l,d,c=[];-1!==(e=a.indexOf("\n",t+1));){var u=(l=a.substr(t,e-t),d=void 0,d=l.split("|"),{result:parseInt(d[i],10),url:o in d?d[o].trim():"",fileid:parseInt(d[r],10),size:d[n]}),p=u.result,h=u.url,f=u.fileid;if(t=e,6001===p&&(h=s[parseInt(u.size,10)].url,p=0),0===p){var m={url:h,fileid:f};s.push(m),c.push(m)}}return c}},t.THUMB_URL=t.THUMB_LINEID=t.THUMB_SIZE=t.THUMB_RESULT=t.THUMB_FILEID=void 0;var r=0;t.THUMB_FILEID=r;var i=1;t.THUMB_RESULT=i;var n=2;t.THUMB_SIZE=n;t.THUMB_LINEID=2;var o=3;t.THUMB_URL=o},80819:e=>{e.exports={pad:function(e,t){var r=e;if("number"!=typeof t)t=16;else{if(t>255)throw new RangeError("pad(): PKCS#7 padding cannot be longer than 255 bytes");if(t<0)throw new RangeError("pad(): PKCS#7 padding size must be positive")}if("string"==typeof e){var i=t-e.length%t;isNaN(i)&&(i=0);for(var n=String.fromCharCode(i),o=0;o<i;o++)r+=n}else{if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray))throw new TypeError("pad(): data could not be padded");var s=e.byteLength;i=t-s%t,isNaN(i)&&(i=0);var a=s+i;for((r=new e.constructor(a)).set(e),o=s;o<a;o++)r[o]=i}return r},unpad:function(e){var t=e;if("string"==typeof e&&e.length>0){var r=e.charCodeAt(e.length-1);if(r>e.length)throw new Error("unpad(): cannot remove "+r+" bytes from a "+e.length+"-byte(s) string");for(var i=e.length-2,n=e.length-r;i>=n;i--)if(e.charCodeAt(i)!==r)throw new Error("unpad(): found a padding byte of "+e.charCodeAt(i)+" instead of "+r+" at position "+i);t=e.substring(0,n)}else if(e instanceof Uint8Array||e instanceof Uint8ClampedArray){var o=e.byteLength,s=o-(r=e[o-1]);if(s<0)throw new Error("unpad(): cannot remove "+r+" bytes from a "+o+"-byte(s) string");for(i=o-2;i>=s;i--)if(e[i]!==r)throw new Error("unpad(): found a padding byte of "+e[i]+" instead of "+r+" at position "+i);t=e.slice(0,s)}return t}}},76578:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},33225:(e,t,r)=>{"use strict";var i=r(65606);void 0===i||!i.version||0===i.version.indexOf("v0.")||0===i.version.indexOf("v1.")&&0!==i.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return i.nextTick(e);case 2:return i.nextTick((function(){e.call(null,t)}));case 3:return i.nextTick((function(){e.call(null,t,r)}));case 4:return i.nextTick((function(){e.call(null,t,r,n)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return i.nextTick((function(){e.apply(null,o)}))}}}:e.exports=i},65606:e=>{var t,r,i=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(e){t=n}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],d=!1,c=-1;function u(){d&&a&&(d=!1,a.length?l=a.concat(l):c=-1,l.length&&p())}function p(){if(!d){var e=s(u);d=!0;for(var t=l.length;t;){for(a=l,l=[];++c<t;)a&&a[c].run();c=-1,t=l.length}a=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new h(e,t)),1!==l.length||d||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},97168:(e,t,r)=>{t.publicEncrypt=r(28902),t.privateDecrypt=r(77362),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},48206:(e,t,r)=>{var i=r(47108),n=r(92861).Buffer;function o(e){var t=n.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=n.alloc(0),a=0;s.length<t;)r=o(a++),s=n.concat([s,i("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},82509:function(e,t,r){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(51069).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function d(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=l(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=i)l=d(e,c,c+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var u=1;for(l=d(e,c,e.length,t),c=0;c<s;c++)u*=t;this.imuln(u),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var d=1;d<i;d++){for(var c=l>>>26,u=67108863&l,p=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=p;h++){var f=d-h|0;c+=(s=(n=0|e.words[f])*(o=0|t.words[h])+u)/67108864|0,u=67108863&s}r.words[d]=0|u,l=0|c}return 0!==l?r.words[d]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,d=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[a]=s;for(;a<o;a++)d[a]=0}else{for(a=0;a<o-n;a++)d[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),d[o-a-1]=s}return d},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var i,n,o,s=e.words,a=t.words,l=r.words,d=0,c=0|s[0],u=8191&c,p=c>>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,x=0|s[4],S=8191&x,k=x>>>13,E=0|s[5],T=8191&E,B=E>>>13,C=0|s[6],I=8191&C,A=C>>>13,F=0|s[7],M=8191&F,D=F>>>13,R=0|s[8],P=8191&R,O=R>>>13,z=0|s[9],N=8191&z,q=z>>>13,U=0|a[0],L=8191&U,j=U>>>13,H=0|a[1],$=8191&H,G=H>>>13,W=0|a[2],K=8191&W,V=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],le=8191&ae,de=ae>>>13,ce=0|a[8],ue=8191&ce,pe=ce>>>13,he=0|a[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(d+(i=Math.imul(u,L))|0)+((8191&(n=(n=Math.imul(u,j))+Math.imul(p,L)|0))<<13)|0;d=((o=Math.imul(p,j))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(f,L),n=(n=Math.imul(f,j))+Math.imul(m,L)|0,o=Math.imul(m,j);var ye=(d+(i=i+Math.imul(u,$)|0)|0)+((8191&(n=(n=n+Math.imul(u,G)|0)+Math.imul(p,$)|0))<<13)|0;d=((o=o+Math.imul(p,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,j))+Math.imul(v,L)|0,o=Math.imul(v,j),i=i+Math.imul(f,$)|0,n=(n=n+Math.imul(f,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(d+(i=i+Math.imul(u,K)|0)|0)+((8191&(n=(n=n+Math.imul(u,V)|0)+Math.imul(p,K)|0))<<13)|0;d=((o=o+Math.imul(p,V)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,j))+Math.imul(_,L)|0,o=Math.imul(_,j),i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(f,K)|0,n=(n=n+Math.imul(f,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var be=(d+(i=i+Math.imul(u,Y)|0)|0)+((8191&(n=(n=n+Math.imul(u,Q)|0)+Math.imul(p,Y)|0))<<13)|0;d=((o=o+Math.imul(p,Q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,j))+Math.imul(k,L)|0,o=Math.imul(k,j),i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var we=(d+(i=i+Math.imul(u,X)|0)|0)+((8191&(n=(n=n+Math.imul(u,ee)|0)+Math.imul(p,X)|0))<<13)|0;d=((o=o+Math.imul(p,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(T,L),n=(n=Math.imul(T,j))+Math.imul(B,L)|0,o=Math.imul(B,j),i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(d+(i=i+Math.imul(u,re)|0)|0)+((8191&(n=(n=n+Math.imul(u,ie)|0)+Math.imul(p,re)|0))<<13)|0;d=((o=o+Math.imul(p,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,L),n=(n=Math.imul(I,j))+Math.imul(A,L)|0,o=Math.imul(A,j),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var xe=(d+(i=i+Math.imul(u,oe)|0)|0)+((8191&(n=(n=n+Math.imul(u,se)|0)+Math.imul(p,oe)|0))<<13)|0;d=((o=o+Math.imul(p,se)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,L),n=(n=Math.imul(M,j))+Math.imul(D,L)|0,o=Math.imul(D,j),i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(d+(i=i+Math.imul(u,le)|0)|0)+((8191&(n=(n=n+Math.imul(u,de)|0)+Math.imul(p,le)|0))<<13)|0;d=((o=o+Math.imul(p,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,j))+Math.imul(O,L)|0,o=Math.imul(O,j),i=i+Math.imul(M,$)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,i=i+Math.imul(f,le)|0,n=(n=n+Math.imul(f,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var ke=(d+(i=i+Math.imul(u,ue)|0)|0)+((8191&(n=(n=n+Math.imul(u,pe)|0)+Math.imul(p,ue)|0))<<13)|0;d=((o=o+Math.imul(p,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(N,L),n=(n=Math.imul(N,j))+Math.imul(q,L)|0,o=Math.imul(q,j),i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(M,K)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,V)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0,i=i+Math.imul(f,ue)|0,n=(n=n+Math.imul(f,pe)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,pe)|0;var Ee=(d+(i=i+Math.imul(u,fe)|0)|0)+((8191&(n=(n=n+Math.imul(u,me)|0)+Math.imul(p,fe)|0))<<13)|0;d=((o=o+Math.imul(p,me)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,G))+Math.imul(q,$)|0,o=Math.imul(q,G),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,Q)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Q)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,pe)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,pe)|0;var Te=(d+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;d=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(q,K)|0,o=Math.imul(q,V),i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(M,X)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,pe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,pe)|0;var Be=(d+(i=i+Math.imul(y,fe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;d=((o=o+Math.imul(v,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,Q))+Math.imul(q,Y)|0,o=Math.imul(q,Q),i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(T,le)|0,n=(n=n+Math.imul(T,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,pe)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,pe)|0;var Ce=(d+(i=i+Math.imul(w,fe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,fe)|0))<<13)|0;d=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(q,X)|0,o=Math.imul(q,ee),i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(M,oe)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,i=i+Math.imul(I,le)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,pe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,pe)|0;var Ie=(d+(i=i+Math.imul(S,fe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;d=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(N,re),n=(n=Math.imul(N,ie))+Math.imul(q,re)|0,o=Math.imul(q,ie),i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,i=i+Math.imul(M,le)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,pe)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,pe)|0;var Ae=(d+(i=i+Math.imul(T,fe)|0)|0)+((8191&(n=(n=n+Math.imul(T,me)|0)+Math.imul(B,fe)|0))<<13)|0;d=((o=o+Math.imul(B,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(N,oe),n=(n=Math.imul(N,se))+Math.imul(q,oe)|0,o=Math.imul(q,se),i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0,i=i+Math.imul(M,ue)|0,n=(n=n+Math.imul(M,pe)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,pe)|0;var Fe=(d+(i=i+Math.imul(I,fe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(A,fe)|0))<<13)|0;d=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(N,le),n=(n=Math.imul(N,de))+Math.imul(q,le)|0,o=Math.imul(q,de),i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,pe)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,pe)|0;var Me=(d+(i=i+Math.imul(M,fe)|0)|0)+((8191&(n=(n=n+Math.imul(M,me)|0)+Math.imul(D,fe)|0))<<13)|0;d=((o=o+Math.imul(D,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(N,ue),n=(n=Math.imul(N,pe))+Math.imul(q,ue)|0,o=Math.imul(q,pe);var De=(d+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;d=((o=o+Math.imul(O,me)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863;var Re=(d+(i=Math.imul(N,fe))|0)+((8191&(n=(n=Math.imul(N,me))+Math.imul(q,fe)|0))<<13)|0;return d=((o=Math.imul(q,me))+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=xe,l[7]=Se,l[8]=ke,l[9]=Ee,l[10]=Te,l[11]=Be,l[12]=Ce,l[13]=Ie,l[14]=Ae,l[15]=Fe,l[16]=Me,l[17]=De,l[18]=Re,0!==d&&(l[19]=d,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),o.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,l=Math.min(o,t.length-1),d=Math.max(0,o-e.length+1);d<=l;d++){var c=o-d,u=(0|e.words[c])*(0|t.words[d]),p=67108863&u;a=67108863&(p=p+a|0),n+=(s=(s=s+(u/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),d=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var u=l,p=d,h=0;h<s;h++){var f=r[c+h],m=i[c+h],g=r[c+h+s],y=i[c+h+s],v=u*g-p*y;y=u*y+p*g,g=v,r[c+h]=f+g,i[c+h]=m+y,r[c+h+s]=f-g,i[c+h+s]=m-y,h!==a&&(v=l*u-d*p,p=l*p+d*u,u=v)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),l=new Array(i),d=new Array(i),c=new Array(i),u=new Array(i),p=r.words;p.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,d,i),this.transform(s,o,a,l,i,n),this.transform(d,o,c,u,i,n);for(var h=0;h<i;h++){var f=a[h]*c[h]-l[h]*u[h];l[h]=a[h]*u[h]+l[h]*c[h],a[h]=f}return this.conjugate(a,l,i),this.transform(a,l,p,o,i,n),this.conjugate(p,o,i),this.normalize13b(p,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(n-=s,n=Math.max(0,n),l){for(var d=0;d<s;d++)l.words[d]=this.words[d];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=n);d--){var u=0|this.words[d];this.words[d]=c<<26-o|u>>>o,c=u&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,s=e.length+r;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+a;var l=(0|e.words[n])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,l=i.length-n.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var c=i.clone()._ishlnsubmul(n,1,l);0===c.negative&&(i=c,a&&(a.words[l]=1));for(var u=l-1;u>=0;u--){var p=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,u);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);a&&(a.words[u]=p)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),l=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),u=t.clone();!t.isZero();){for(var p=0,h=1;!(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(u)),n.iushrn(1),s.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(u)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(a),s.isub(l)):(r.isub(t),a.isub(n),l.isub(s))}return{a,b:l,gcd:r.iushln(d)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;!(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var u=0,p=1;!(r.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,v),n(_,v),n(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var a=new o(1).toRed(this),l=a.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,d).cmp(l);)c.redIAdd(l);for(var u=this.pow(c,n),p=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),f=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();i(g<f);var y=this.pow(u,new o(1).iushln(f-g-1));p=p.redMul(y),u=y.redSqr(),h=h.redMul(u),f=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),i=t.length-1;i>=0;i--){for(var d=t.words[i],c=l-1;c>=0;c--){var u=d>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==s?(s<<=1,s|=u,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[s]),a=0,s=0)):a=0}l=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},77362:(e,t,r)=>{var i=r(78170),n=r(48206),o=r(52061),s=r(82509),a=r(67332),l=r(47108),d=r(99247),c=r(92861).Buffer;e.exports=function(e,t,r){var u;u=e.padding?e.padding:r?1:4;var p,h=i(e),f=h.modulus.byteLength();if(t.length>f||new s(t).cmp(h.modulus)>=0)throw new Error("decryption error");p=r?d(new s(t),h):a(t,h);var m=c.alloc(f-p.length);if(p=c.concat([m,p],f),4===u)return function(e,t){var r=e.modulus.byteLength(),i=l("sha1").update(c.alloc(0)).digest(),s=i.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),d=t.slice(s+1),u=o(a,n(d,s)),p=o(d,n(u,r-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n<i;)r+=e[n]^t[n];return r}(i,p.slice(0,s)))throw new Error("decryption error");var h=s;for(;0===p[h];)h++;if(1!==p[h++])throw new Error("decryption error");return p.slice(h)}(h,p);if(1===u)return function(e,t,r){var i=t.slice(0,2),n=2,o=0;for(;0!==t[n++];)if(n>=t.length){o++;break}var s=t.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(n)}(0,p,r);if(3===u)return p;throw new Error("unknown padding")}},28902:(e,t,r)=>{var i=r(78170),n=r(53209),o=r(47108),s=r(48206),a=r(52061),l=r(82509),d=r(99247),c=r(67332),u=r(92861).Buffer;e.exports=function(e,t,r){var p;p=e.padding?e.padding:r?1:4;var h,f=i(e);if(4===p)h=function(e,t){var r=e.modulus.byteLength(),i=t.length,d=o("sha1").update(u.alloc(0)).digest(),c=d.length,p=2*c;if(i>r-p-2)throw new Error("message too long");var h=u.alloc(r-i-p-2),f=r-c-1,m=n(c),g=a(u.concat([d,h,u.alloc(1,1),t],f),s(m,f)),y=a(m,s(g,c));return new l(u.concat([u.alloc(1),y,g],r))}(f,t);else if(1===p)h=function(e,t,r){var i,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");i=r?u.alloc(s-o-3,255):function(e){var t,r=u.allocUnsafe(e),i=0,o=n(2*e),s=0;for(;i<e;)s===o.length&&(o=n(2*e),s=0),(t=o[s++])&&(r[i++]=t);return r}(s-o-3);return new l(u.concat([u.from([0,r?1:2]),i,u.alloc(1),t],s))}(f,t,r);else{if(3!==p)throw new Error("unknown padding");if((h=new l(t)).cmp(f.modulus)>=0)throw new Error("data too long for modulus")}return r?c(h,f):d(h,f)}},99247:(e,t,r)=>{var i=r(82509),n=r(92861).Buffer;e.exports=function(e,t){return n.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}},52061:e=>{e.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},87583:(e,t,r)=>{const i=r(91333),n=r(90157),o=r(47899),s=r(56756);function a(e,t,r,o,s){const a=[].slice.call(arguments,1),l=a.length,d="function"==typeof a[l-1];if(!d&&!i())throw new Error("Callback required as last argument");if(!d){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=t,t=o=void 0):2!==l||t.getContext||(o=r,r=t,t=void 0),new Promise((function(i,s){try{const s=n.create(r,o);i(e(s,t,o))}catch(e){s(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(s=r,r=t,t=o=void 0):3===l&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=t,t=void 0));try{const i=n.create(r,o);s(null,e(i,t,o))}catch(e){s(e)}}t.create=n.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,r){return s.render(e,r)}))},91333:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},28802:(e,t,r)=>{const i=r(56886).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=i(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-n;return o.push(6),o.reverse()},t.getPositions=function(e){const r=[],i=t.getRowColCoords(e),n=i.length;for(let e=0;e<n;e++)for(let t=0;t<n;t++)0===e&&0===t||0===e&&t===n-1||e===n-1&&0===t||r.push([i[e],i[t]]);return r}},11433:(e,t,r)=>{const i=r(30208),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=i.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},e.exports=o},99899:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},8820:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,i){const n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},25822:(e,t,r)=>{const i=r(30208);function n(e){this.mode=i.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=n},97518:(e,t,r)=>{const i=r(49953),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case i.L:return n[4*(e-1)+0];case i.M:return n[4*(e-1)+1];case i.Q:return n[4*(e-1)+2];case i.H:return n[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case i.L:return o[4*(e-1)+0];case i.M:return o[4*(e-1)+1];case i.Q:return o[4*(e-1)+2];case i.H:return o[4*(e-1)+3];default:return}}},49953:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},7756:(e,t,r)=>{const i=r(56886).getSymbolSize;t.getPositions=function(e){const t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},84565:(e,t,r)=>{const i=r(56886),n=i.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;i.getBCHDigit(o)-n>=0;)o^=1335<<i.getBCHDigit(o)-n;return 21522^(r<<10|o)}},2731:(e,t)=>{const r=new Uint8Array(512),i=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,i[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return i[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[i[e]+i[t]]}},24861:(e,t,r)=>{const i=r(30208),n=r(56886);function o(e){this.mode=i.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},81332:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,i=3,n=40,o=10;function s(e,r,i){switch(e){case t.Patterns.PATTERN000:return(r+i)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return i%3==0;case t.Patterns.PATTERN011:return(r+i)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2==0;case t.Patterns.PATTERN101:return r*i%2+r*i%3==0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2==0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let i=0,n=0,o=0,s=null,a=null;for(let l=0;l<t;l++){n=o=0,s=a=null;for(let d=0;d<t;d++){let t=e.get(l,d);t===s?n++:(n>=5&&(i+=r+(n-5)),s=t,n=1),t=e.get(d,l),t===a?o++:(o>=5&&(i+=r+(o-5)),a=t,o=1)}n>=5&&(i+=r+(n-5)),o>=5&&(i+=r+(o-5))}return i},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let i=0;i<t-1;i++)for(let n=0;n<t-1;n++){const t=e.get(i,n)+e.get(i,n+1)+e.get(i+1,n)+e.get(i+1,n+1);4!==t&&0!==t||r++}return r*i},t.getPenaltyN3=function(e){const t=e.size;let r=0,i=0,o=0;for(let n=0;n<t;n++){i=o=0;for(let s=0;s<t;s++)i=i<<1&2047|e.get(n,s),s>=10&&(1488===i||93===i)&&r++,o=o<<1&2047|e.get(s,n),s>=10&&(1488===o||93===o)&&r++}return r*n},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*o},t.applyMask=function(e,t){const r=t.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)t.isReserved(n,i)||t.xor(n,i,s(e,n,i))},t.getBestMask=function(e,r){const i=Object.keys(t.Patterns).length;let n=0,o=1/0;for(let s=0;s<i;s++){r(s),t.applyMask(s,e);const i=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),i<o&&(o=i,n=s)}return n}},30208:(e,t,r)=>{const i=r(21878),n=r(67044);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!i.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},24357:(e,t,r)=>{const i=r(30208);function n(e){this.mode=i.NUMERIC,this.data=e.toString()}n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);const n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},e.exports=n},64713:(e,t,r)=>{const i=r(2731);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let o=0;o<t.length;o++)r[n+o]^=i.mul(e[n],t[o]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let n=0;n<t.length;n++)r[n]^=i.mul(t[n],e);let n=0;for(;n<r.length&&0===r[n];)n++;r=r.slice(n)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=t.mul(r,new Uint8Array([1,i.exp(n)]));return r}},90157:(e,t,r)=>{const i=r(56886),n=r(49953),o=r(99899),s=r(8820),a=r(28802),l=r(7756),d=r(81332),c=r(97518),u=r(74764),p=r(31427),h=r(84565),f=r(30208),m=r(29801);function g(e,t,r){const i=e.size,n=h.getEncodedBits(t,r);let o,s;for(o=0;o<15;o++)s=1==(n>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(i-15+o,8,s,!0),o<8?e.set(8,i-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(i-8,8,1,!0)}function y(e,t,r){const n=new o;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(n)}));const s=8*(i.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const a=(s-n.getLengthInBits())/8;for(let e=0;e<a;e++)n.put(e%2?17:236,8);return function(e,t,r){const n=i.getSymbolTotalCodewords(t),o=c.getTotalCodewordsCount(t,r),s=n-o,a=c.getBlocksCount(t,r),l=n%a,d=a-l,p=Math.floor(n/a),h=Math.floor(s/a),f=h+1,m=p-h,g=new u(m);let y=0;const v=new Array(a),b=new Array(a);let w=0;const _=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<d?h:f;v[e]=_.slice(y,y+t),b[e]=g.encode(v[e]),y+=t,w=Math.max(w,t)}const x=new Uint8Array(n);let S,k,E=0;for(S=0;S<w;S++)for(k=0;k<a;k++)S<v[k].length&&(x[E++]=v[k][S]);for(S=0;S<m;S++)for(k=0;k<a;k++)x[E++]=b[k][S];return x}(n,e,t)}function v(e,t,r,n){let o;if(Array.isArray(e))o=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let i=t;if(!i){const t=m.rawSplit(e);i=p.getBestVersionForData(t,r)}o=m.fromString(e,i||40)}}const c=p.getBestVersionForData(o,r);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else t=c;const u=y(t,r,o),h=i.getSymbolSize(t),f=new s(h);return function(e,t){const r=e.size,i=l.getPositions(t);for(let t=0;t<i.length;t++){const n=i[t][0],o=i[t][1];for(let t=-1;t<=7;t++)if(!(n+t<=-1||r<=n+t))for(let i=-1;i<=7;i++)o+i<=-1||r<=o+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(n+t,o+i,!0,!0):e.set(n+t,o+i,!1,!0))}}(f,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(f),function(e,t){const r=a.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],n=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(i+t,n+r,!0,!0):e.set(i+t,n+r,!1,!0)}}(f,t),g(f,r,0),t>=7&&function(e,t){const r=e.size,i=p.getEncodedBits(t);let n,o,s;for(let t=0;t<18;t++)n=Math.floor(t/3),o=t%3+r-8-3,s=1==(i>>t&1),e.set(n,o,s,!0),e.set(o,n,s,!0)}(f,t),function(e,t){const r=e.size;let i=-1,n=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(n,a-r)){let i=!1;s<t.length&&(i=1==(t[s]>>>o&1)),e.set(n,a-r,i),o--,-1===o&&(s++,o=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}(f,u),isNaN(n)&&(n=d.getBestMask(f,g.bind(null,f,r))),d.applyMask(n,f),g(f,r,n),{modules:f,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,o,s=n.M;return void 0!==t&&(s=n.from(t.errorCorrectionLevel,n.M),r=p.from(t.version),o=d.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),v(e,r,s,o)}},74764:(e,t,r)=>{const i=r(64713);function n(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}n.prototype.initialize=function(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},n.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=i.mod(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r},e.exports=n},67044:(e,t)=>{const r="[0-9]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";t.KANJI=new RegExp(i,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(n,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+i+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},29801:(e,t,r)=>{const i=r(30208),n=r(24357),o=r(11433),s=r(25822),a=r(24861),l=r(67044),d=r(56886),c=r(76320);function u(e){return unescape(encodeURIComponent(e)).length}function p(e,t,r){const i=[];let n;for(;null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function h(e){const t=p(l.NUMERIC,i.NUMERIC,e),r=p(l.ALPHANUMERIC,i.ALPHANUMERIC,e);let n,o;d.isKanjiModeEnabled()?(n=p(l.BYTE,i.BYTE,e),o=p(l.KANJI,i.KANJI,e)):(n=p(l.BYTE_KANJI,i.BYTE,e),o=[]);return t.concat(r,n,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return o.getBitsLength(e);case i.KANJI:return a.getBitsLength(e);case i.BYTE:return s.getBitsLength(e)}}function m(e,t){let r;const l=i.getBestModeForData(e);if(r=i.from(t,l),r!==i.BYTE&&r.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+i.toString(r)+".\n Suggested mode is: "+i.toString(l));switch(r!==i.KANJI||d.isKanjiModeEnabled()||(r=i.BYTE),r){case i.NUMERIC:return new n(e);case i.ALPHANUMERIC:return new o(e);case i.KANJI:return new a(e);case i.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},t.fromString=function(e,r){const n=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];switch(n.mode){case i.NUMERIC:t.push([n,{data:n.data,mode:i.ALPHANUMERIC,length:n.length},{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.ALPHANUMERIC:t.push([n,{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.KANJI:t.push([n,{data:n.data,mode:i.BYTE,length:u(n.data)}]);break;case i.BYTE:t.push([{data:n.data,mode:i.BYTE,length:u(n.data)}])}}return t}(h(e,d.isKanjiModeEnabled())),o=function(e,t){const r={},n={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],l=[];for(let e=0;e<a.length;e++){const d=a[e],c=""+s+e;l.push(c),r[c]={node:d,lastCount:0},n[c]={};for(let e=0;e<o.length;e++){const s=o[e];r[s]&&r[s].node.mode===d.mode?(n[s][c]=f(r[s].lastCount+d.length,d.mode)-f(r[s].lastCount,d.mode),r[s].lastCount+=d.length):(r[s]&&(r[s].lastCount=d.length),n[s][c]=f(d.length,d.mode)+4+i.getCharCountIndicator(d.mode,t))}}o=l}for(let e=0;e<o.length;e++)n[o[e]].end=0;return{map:n,table:r}}(n,r),s=c.find_path(o.map,"start","end"),a=[];for(let e=1;e<s.length-1;e++)a.push(o.table[s[e]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function(e){return t.fromArray(h(e,d.isKanjiModeEnabled()))}},56886:(e,t)=>{let r;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return i[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},21878:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},31427:(e,t,r)=>{const i=r(56886),n=r(97518),o=r(49953),s=r(30208),a=r(21878),l=i.getBCHDigit(7973);function d(e,t){return s.getCharCountIndicator(e,t)+4}function c(e,t){let r=0;return e.forEach((function(e){const i=d(e.mode,t);r+=i+e.getBitsLength()})),r}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);const o=8*(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(r===s.MIXED)return o;const l=o-d(r,e);switch(r){case s.NUMERIC:return Math.floor(l/10*3);case s.ALPHANUMERIC:return Math.floor(l/11*2);case s.KANJI:return Math.floor(l/13);case s.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,r){let i;const n=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let i=1;i<=40;i++)if(c(e,i)<=t.getCapacity(i,r,s.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,r,i){for(let n=1;n<=40;n++)if(r<=t.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;i.getBCHDigit(t)-l>=0;)t^=7973<<i.getBCHDigit(t)-l;return e<<12|t}},47899:(e,t,r)=>{const i=r(92726);t.render=function(e,t,r){let n=r,o=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=i.getOptions(n);const s=i.getImageWidth(e.modules.size,n),a=o.getContext("2d"),l=a.createImageData(s,s);return i.qrToImageData(l.data,e,n),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,o,s),a.putImageData(l,0,0),o},t.renderToDataURL=function(e,r,i){let n=i;void 0!==n||r&&r.getContext||(n=r,r=void 0),n||(n={});const o=t.render(e,r,n),s=n.type||"image/png",a=n.rendererOpts||{};return o.toDataURL(s,a.quality)}},56756:(e,t,r)=>{const i=r(92726);function n(e,t){const r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function o(e,t,r){let i=e+t;return void 0!==r&&(i+=" "+r),i}t.render=function(e,t,r){const s=i.getOptions(t),a=e.modules.size,l=e.modules.data,d=a+2*s.margin,c=s.color.light.a?"<path "+n(s.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",u="<path "+n(s.color.dark,"stroke")+' d="'+function(e,t,r){let i="",n=0,s=!1,a=0;for(let l=0;l<e.length;l++){const d=Math.floor(l%t),c=Math.floor(l/t);d||s||(s=!0),e[l]?(a++,l>0&&d>0&&e[l-1]||(i+=s?o("M",d+r,.5+c+r):o("m",n,0),n=0,s=!1),d+1<t&&e[l+1]||(i+=o("h",a),a=0)):n++}return i}(l,a,s.margin)+'"/>',p='viewBox="0 0 '+d+" "+d+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+p+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof r&&r(null,h),h}},92726:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const i=t.getScale(e,r);return Math.floor((e+2*r.margin)*i)},t.qrToImageData=function(e,r,i){const n=r.modules.size,o=r.modules.data,s=t.getScale(n,i),a=Math.floor((n+2*i.margin)*s),l=i.margin*s,d=[i.color.light,i.color.dark];for(let t=0;t<a;t++)for(let r=0;r<a;r++){let c=4*(t*a+r),u=i.color.light;if(t>=l&&r>=l&&t<a-l&&r<a-l){u=d[o[Math.floor((t-l)/s)*n+Math.floor((r-l)/s)]?1:0]}e[c++]=u.r,e[c++]=u.g,e[c++]=u.b,e[c]=u.a}}},74765:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,i="RFC1738",n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:n}},55373:(e,t,r)=>{"use strict";var i=r(98636),n=r(62642),o=r(74765);e.exports={formats:o,parse:n,stringify:i}},62642:(e,t,r)=>{"use strict";var i=r(37720),n=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},d=function(e,t,r,i){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),d=a?o.slice(0,a.index):o,c=[];if(d){if(!r.plainObjects&&n.call(Object.prototype,d)&&!r.allowPrototypes)return;c.push(d)}for(var u=0;r.depth>0&&null!==(a=s.exec(o))&&u<r.depth;){if(u+=1,!r.plainObjects&&n.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}if(a){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+o.slice(a.index)+"]")}return function(e,t,r,i){for(var n=i?t:l(t,r),o=e.length-1;o>=0;--o){var s,a=e[o];if("[]"===a&&r.parseArrays)s=r.allowEmptyArrays&&(""===n||r.strictNullHandling&&null===n)?[]:[].concat(n);else{s=r.plainObjects?Object.create(null):{};var d="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=r.decodeDotInKeys?d.replace(/%2E/g,"."):d,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(s=[])[u]=n:"__proto__"!==c&&(s[c]=n):s={0:n}}n=s}return n}(c,t,r,i)}};e.exports=function(e,t){var r=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||i.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var r={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;d=d.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c,u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,u),h=-1,f=t.charset;if(t.charsetSentinel)for(c=0;c<p.length;++c)0===p[c].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[c]?f="utf-8":"utf8=%26%2310003%3B"===p[c]&&(f="iso-8859-1"),h=c,c=p.length);for(c=0;c<p.length;++c)if(c!==h){var m,g,y=p[c],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=t.decoder(y,s.decoder,f,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),s.decoder,f,"key"),g=i.maybeMap(l(y.slice(b+1),t),(function(e){return t.decoder(e,s.decoder,f,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=a(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g);var w=n.call(r,m);w&&"combine"===t.duplicates?r[m]=i.combine(r[m],g):w&&"last"!==t.duplicates||(r[m]=g)}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},p=Object.keys(c),h=0;h<p.length;++h){var f=p[h],m=d(f,c[f],r,"string"==typeof e);u=i.merge(u,m,r)}return!0===r.allowSparse?u:i.compact(u)}},98636:(e,t,r)=>{"use strict";var i=r(920),n=r(37720),o=r(74765),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,d=Array.prototype.push,c=function(e,t){d.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,p=o.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,r,o,s,a,d,u,p,m,g,y,v,b,w,_,x,S,k){for(var E,T=t,B=k,C=0,I=!1;void 0!==(B=B.get(f))&&!I;){var A=B.get(t);if(C+=1,void 0!==A){if(A===C)throw new RangeError("Cyclic object value");I=!0}void 0===B.get(f)&&(C=0)}if("function"==typeof g?T=g(r,T):T instanceof Date?T=b(T):"comma"===o&&l(T)&&(T=n.maybeMap(T,(function(e){return e instanceof Date?b(e):e}))),null===T){if(d)return m&&!x?m(r,h.encoder,S,"key",w):r;T=""}if("string"==typeof(E=T)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||n.isBuffer(T))return m?[_(x?r:m(r,h.encoder,S,"key",w))+"="+_(m(T,h.encoder,S,"value",w))]:[_(r)+"="+_(String(T))];var F,M=[];if(void 0===T)return M;if("comma"===o&&l(T))x&&m&&(T=n.maybeMap(T,m)),F=[{value:T.length>0?T.join(",")||null:void 0}];else if(l(g))F=g;else{var D=Object.keys(T);F=y?D.sort(y):D}var R=p?r.replace(/\./g,"%2E"):r,P=s&&l(T)&&1===T.length?R+"[]":R;if(a&&l(T)&&0===T.length)return P+"[]";for(var O=0;O<F.length;++O){var z=F[O],N="object"==typeof z&&void 0!==z.value?z.value:T[z];if(!u||null!==N){var q=v&&p?z.replace(/\./g,"%2E"):z,U=l(T)?"function"==typeof o?o(P,q):P:P+(v?"."+q:"["+q+"]");k.set(t,C);var L=i();L.set(f,k),c(M,e(N,U,o,s,a,d,u,p,"comma"===o&&x&&l(T)?null:m,g,y,v,b,w,_,x,S,L))}}return M};e.exports=function(e,t){var r,n=e,d=function(e){if(!e)return h;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var i,n=o.formatters[r],d=h.filter;if(("function"==typeof e.filter||l(e.filter))&&(d=e.filter),i=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=void 0===e.allowDots?!0===e.encodeDotInKeys||h.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:c,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:d,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof d.filter?n=(0,d.filter)("",n):l(d.filter)&&(r=d.filter);var u=[];if("object"!=typeof n||null===n)return"";var p=a[d.arrayFormat],f="comma"===p&&d.commaRoundTrip;r||(r=Object.keys(n)),d.sort&&r.sort(d.sort);for(var g=i(),y=0;y<r.length;++y){var v=r[y];d.skipNulls&&null===n[v]||c(u,m(n[v],v,p,f,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,g))}var b=u.join(d.delimiter),w=!0===d.addQueryPrefix?"?":"";return d.charsetSentinel&&("iso-8859-1"===d.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),b.length>0?w+b:""}},37720:(e,t,r)=>{"use strict";var i=r(74765),n=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(r[i]=e[i]);return r},l=1024;e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var n=t[i],s=n.obj[n.prop],a=Object.keys(s),l=0;l<a.length;++l){var d=a[l],c=s[d];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:s,prop:d}),r.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var i=[],n=0;n<r.length;++n)void 0!==r[n]&&i.push(r[n]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,r){var i=e.replace(/\+/g," ");if("iso-8859-1"===r)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,r,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var d="",c=0;c<a.length;c+=l){for(var u=a.length>=l?a.slice(c,c+l):a,p=[],h=0;h<u.length;++h){var f=u.charCodeAt(h);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===i.RFC1738&&(40===f||41===f)?p[p.length]=u.charAt(h):f<128?p[p.length]=s[f]:f<2048?p[p.length]=s[192|f>>6]+s[128|63&f]:f<55296||f>=57344?p[p.length]=s[224|f>>12]+s[128|f>>6&63]+s[128|63&f]:(h+=1,f=65536+((1023&f)<<10|1023&u.charCodeAt(h)),p[p.length]=s[240|f>>18]+s[128|f>>12&63]+s[128|f>>6&63]+s[128|63&f])}d+=p.join("")}return d},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(t(e[i]));return r}return t(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var s=t;return o(t)&&!o(r)&&(s=a(t,i)),o(t)&&o(r)?(r.forEach((function(r,o){if(n.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,i):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var s=r[o];return n.call(t,o)?t[o]=e(t[o],s,i):t[o]=s,t}),s)}}},53209:(e,t,r)=>{"use strict";var i=r(65606),n=65536,o=4294967295;var s=r(92861).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(e);if(e>0)if(e>n)for(var l=0;l<e;l+=n)a.getRandomValues(r.slice(l,l+n));else a.getRandomValues(r);if("function"==typeof t)return i.nextTick((function(){t(null,r)}));return r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},76983:(e,t,r)=>{"use strict";var i=r(65606);function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(92861),s=r(53209),a=o.Buffer,l=o.kMaxLength,d=r.g.crypto||r.g.msCrypto,c=Math.pow(2,32)-1;function u(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function p(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function h(e,t,r,n){if(i.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return d.getRandomValues(a),n?void i.nextTick((function(){n(null,e)})):e}if(!n)return s(r).copy(e,t),e;s(r,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}d&&d.getRandomValues||!i.browser?(t.randomFill=function(e,t,i,n){if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return u(t,e.length),p(i,t,e.length),h(e,t,i,n)},t.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');u(t,e.length),void 0===i&&(i=e.length-t);return p(i,t,e.length),h(e,t,i)}):(t.randomFill=n,t.randomFillSync=n)},25382:(e,t,r)=>{"use strict";var i=r(33225),n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var o=Object.create(r(15622));o.inherits=r(56698);var s=r(45412),a=r(16708);o.inherits(u,s);for(var l=n(a.prototype),d=0;d<l.length;d++){var c=l[d];u.prototype[c]||(u.prototype[c]=a.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||i.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(e,t){this.push(null),this.end(),i.nextTick(t,e)}},63600:(e,t,r)=>{"use strict";e.exports=o;var i=r(74610),n=Object.create(r(15622));function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n.inherits=r(56698),n.inherits(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},45412:(e,t,r)=>{"use strict";var i=r(65606),n=r(33225);e.exports=b;var o,s=r(64634);b.ReadableState=v;r(37007).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=r(40345),d=r(34106).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u=Object.create(r(15622));u.inherits=r(56698);var p=r(79838),h=void 0;h=p&&p.debuglog?p.debuglog("stream"):function(){};var f,m=r(83222),g=r(75896);u.inherits(b,l);var y=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var i=t instanceof(o=o||r(25382));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(83141).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function b(e){if(o=o||r(25382),!(this instanceof b))return new b(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function w(e,t,r,i,n){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,s)):(n||(o=function(e,t){var r;i=t,d.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),i?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?_(e,s,t,!1):T(e,s)):_(e,s,t,!1))):i||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function _(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),T(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=d.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},b.prototype.unshift=function(e){return w(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return f||(f=r(83141).I),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var x=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),A(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(B,e,t))}function B(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function C(e){h("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var i;e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,i=1,n=r.data;e-=n.length;for(;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(s===o.length?n+=o:n+=o.slice(0,e),0===(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t):function(e,t){var r=d.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var o=i.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(s));break}++n}return t.length-=n,r}(e,t);return i}(e,t.buffer,t.decoder),r);var r}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}b.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&M(this),null;var i,n=t.needReadable;return h("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",n=!0),t.ended||t.reading?h("reading or ended",n=!1):n&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(i=e>0?F(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?c:b;function d(t,i){h("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",d),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",m),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){h("onend"),e.end()}o.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",d);var u=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,A(e))}}(r);e.on("drain",u);var p=!1;var f=!1;function m(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==R(o.pipes,e))&&!p&&(h("false write response, pause",o.awaitDrain),o.awaitDrain++,f=!0),r.pause())}function g(t){h("onerror",t),b(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),b()}function v(){h("onfinish"),e.removeListener("close",y),b()}function b(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",v),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=R(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&k(this):n.nextTick(C,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(I,e,t))}(this,e)),this},b.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<y.length;o++)e.on(y[o],this.emit.bind(this,y[o]));return this._read=function(t){h("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=F},74610:(e,t,r)=>{"use strict";e.exports=s;var i=r(25382),n=Object.create(r(15622));function o(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);i.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){l(e,t,r)})):l(this,null,null)}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}n.inherits=r(56698),n.inherits(s,i),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;i.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},16708:(e,t,r)=>{"use strict";var i=r(65606),n=r(33225);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var s,a=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?setImmediate:n.nextTick;y.WritableState=g;var l=Object.create(r(15622));l.inherits=r(56698);var d={deprecate:r(94643)},c=r(40345),u=r(34106).Buffer,p=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,f=r(75896);function m(){}function g(e,t){s=s||r(25382),e=e||{};var i=t instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var l=e.highWaterMark,d=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=l||0===l?l:i&&(d||0===d)?d:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===e.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),S(e,t))}(e,r,i,t,o);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),i?a(b,e,r,s,o):b(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(e){if(s=s||r(25382),!(h.call(y,this)||this instanceof s))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function v(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function b(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)n[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;n.allBuffers=l,v(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,u=r.callback;if(v(e,t,!1,t.objectMode?1:d.length,d,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}l.inherits(y,c),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof p);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),n.nextTick(i,s),o=!1),o}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,i,n,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,a,i,n,o);return l}(this,o,a,e,t,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=f.destroy,y.prototype._undestroy=f.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},83222:(e,t,r)=>{"use strict";var i=r(34106).Buffer,n=r(15340);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);for(var t,r,n,o=i.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,n=a,t.copy(r,n),a+=s.data.length,s=s.next;return o},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},75896:(e,t,r)=>{"use strict";var i=r(33225);function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,e)):i.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,i.nextTick(n,r,e)):i.nextTick(n,r,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},40345:(e,t,r)=>{e.exports=r(37007).EventEmitter},34106:(e,t,r)=>{var i=r(48287),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),o(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},28399:(e,t,r)=>{(t=e.exports=r(45412)).Stream=t,t.Readable=t,t.Writable=r(16708),t.Duplex=r(25382),t.Transform=r(74610),t.PassThrough=r(63600)},66011:(e,t,r)=>{"use strict";var i=r(48287).Buffer,n=r(56698),o=r(4729),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],u=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function f(e,t){return e<<t|e>>>32-t}function m(e,t,r,i,n,o,s,a){return f(e+(t^r^i)+o+s|0,a)+n|0}function g(e,t,r,i,n,o,s,a){return f(e+(t&r|~t&i)+o+s|0,a)+n|0}function y(e,t,r,i,n,o,s,a){return f(e+((t|~r)^i)+o+s|0,a)+n|0}function v(e,t,r,i,n,o,s,a){return f(e+(t&i|r&~i)+o+s|0,a)+n|0}function b(e,t,r,i,n,o,s,a){return f(e+(t^(r|~i))+o+s|0,a)+n|0}n(h,o),h.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,x=0|this._c,S=0|this._d,k=0|this._e,E=0;E<80;E+=1){var T,B;E<16?(T=m(r,i,n,o,h,e[a[E]],u[0],d[E]),B=b(w,_,x,S,k,e[l[E]],p[0],c[E])):E<32?(T=g(r,i,n,o,h,e[a[E]],u[1],d[E]),B=v(w,_,x,S,k,e[l[E]],p[1],c[E])):E<48?(T=y(r,i,n,o,h,e[a[E]],u[2],d[E]),B=y(w,_,x,S,k,e[l[E]],p[2],c[E])):E<64?(T=v(r,i,n,o,h,e[a[E]],u[3],d[E]),B=g(w,_,x,S,k,e[l[E]],p[3],c[E])):(T=b(r,i,n,o,h,e[a[E]],u[4],d[E]),B=m(w,_,x,S,k,e[l[E]],p[4],c[E])),r=h,h=o,o=f(n,10),n=i,i=T,w=k,k=S,S=f(x,10),x=_,_=B}var C=this._b+n+S|0;this._b=this._c+o+k|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+i+x|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.alloc?i.alloc(20):new i(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},92861:(e,t,r)=>{
|
||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=r(48287),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},93904:(e,t,r)=>{const i=Symbol("SemVer ANY");class n{static get ANY(){return i}constructor(e,t){if(t=o(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),d("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(d("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new u(e.value,t).test(this.value):""===e.operator?""===e.value||new u(this.value,t).test(e.semver):(!(t=o(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=n;const o=r(98587),{safeRe:s,t:a}=r(99718),l=r(72111),d=r(57272),c=r(53908),u=r(78311)},78311:(e,t,r)=>{const i=/\s+/g;class n{constructor(e,t){if(t=s(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(i," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const i=this.options.loose,n=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(n,A(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),l("comparator trim",e),e=e.replace(c[u.TILDETRIM],h),l("tilde trim",e),e=e.replace(c[u.CARETTRIM],f),l("caret trim",e);let s=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));i&&(s=s.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),l("range list",s);const d=new Map,v=s.map((e=>new a(e,this.options)));for(const e of v){if(y(e))return[e];d.set(e.value,e)}d.size>1&&d.has("")&&d.delete("");const b=[...d.values()];return o.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(F(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(68794)),s=r(98587),a=r(93904),l=r(57272),d=r(53908),{safeRe:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:h,caretTrimReplace:f}=r(99718),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(16874),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let r=!0;const i=e.slice();let n=i.pop();for(;r&&i.length;)r=i.every((e=>n.intersects(e,t))),n=i.pop();return r},w=(e,t)=>(l("comp",e,t),e=k(e,t),l("caret",e),e=x(e,t),l("tildes",e),e=T(e,t),l("xrange",e),e=C(e,t),l("stars",e),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,((t,r,i,n,o)=>{let s;return l("tilde",e,t,r,i,n,o),_(r)?s="":_(i)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:_(n)?s=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:o?(l("replaceTilde pr",o),s=`>=${r}.${i}.${n}-${o} <${r}.${+i+1}.0-0`):s=`>=${r}.${i}.${n} <${r}.${+i+1}.0-0`,l("tilde return",s),s}))},k=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{l("caret",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,o,s)=>{let a;return l("caret",e,t,r,n,o,s),_(r)?a="":_(n)?a=`>=${r}.0.0${i} <${+r+1}.0.0-0`:_(o)?a="0"===r?`>=${r}.${n}.0${i} <${r}.${+n+1}.0-0`:`>=${r}.${n}.0${i} <${+r+1}.0.0-0`:s?(l("replaceCaret pr",s),a="0"===r?"0"===n?`>=${r}.${n}.${o}-${s} <${r}.${n}.${+o+1}-0`:`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${o}-${s} <${+r+1}.0.0-0`):(l("no pr"),a="0"===r?"0"===n?`>=${r}.${n}.${o}${i} <${r}.${n}.${+o+1}-0`:`>=${r}.${n}.${o}${i} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${o} <${+r+1}.0.0-0`),l("caret return",a),a}))},T=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>B(e,t))).join(" ")),B=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,((r,i,n,o,s,a)=>{l("xRange",e,r,i,n,o,s,a);const d=_(n),c=d||_(o),u=c||_(s),p=u;return"="===i&&p&&(i=""),a=t.includePrerelease?"-0":"",d?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&p?(c&&(o=0),s=0,">"===i?(i=">=",c?(n=+n+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",c?n=+n+1:o=+o+1),"<"===i&&(a="-0"),r=`${i+n}.${o}.${s}${a}`):c?r=`>=${n}.0.0${a} <${+n+1}.0.0-0`:u&&(r=`>=${n}.${o}.0${a} <${n}.${+o+1}.0-0`),l("xRange return",r),r}))},C=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=e=>(t,r,i,n,o,s,a,l,d,c,u,p)=>`${r=_(i)?"":_(n)?`>=${i}.0.0${e?"-0":""}`:_(o)?`>=${i}.${n}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=_(d)?"":_(c)?`<${+d+1}.0.0-0`:_(u)?`<${d}.${+c+1}.0-0`:p?`<=${d}.${c}.${u}-${p}`:e?`<${d}.${c}.${+u+1}-0`:`<=${l}`}`.trim(),F=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==a.ANY&&e[r].semver.prerelease.length>0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},53908:(e,t,r)=>{const i=r(57272),{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(16874),{safeRe:s,t:a}=r(99718),l=r(98587),{compareIdentifiers:d}=r(61123);class c{constructor(e,t){if(t=l(t),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),d(this.major,e.major)||d(this.minor,e.minor)||d(this.patch,e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return d(r,n)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(i("build compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return d(r,n)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===d(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},57414:(e,t,r)=>{const i=r(30144);e.exports=(e,t)=>{const r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},72111:(e,t,r)=>{const i=r(94641),n=r(13999),o=r(35580),s=r(54089),a=r(7059),l=r(25200);e.exports=(e,t,r,d)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return i(e,r,d);case"!=":return n(e,r,d);case">":return o(e,r,d);case">=":return s(e,r,d);case"<":return a(e,r,d);case"<=":return l(e,r,d);default:throw new TypeError(`Invalid operator: ${t}`)}}},46170:(e,t,r)=>{const i=r(53908),n=r(30144),{safeRe:o,t:s}=r(99718);e.exports=(e,t)=>{if(e instanceof i)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const i=t.includePrerelease?o[s.COERCERTLFULL]:o[s.COERCERTL];let n;for(;(n=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i.lastIndex=n.index+n[1].length+n[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?o[s.COERCEFULL]:o[s.COERCE]);if(null===r)return null;const a=r[2],l=r[3]||"0",d=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",u=t.includePrerelease&&r[6]?`+${r[6]}`:"";return n(`${a}.${l}.${d}${c}${u}`,t)}},40909:(e,t,r)=>{const i=r(53908);e.exports=(e,t,r)=>{const n=new i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)}},11763:(e,t,r)=>{const i=r(50560);e.exports=(e,t)=>i(e,t,!0)},50560:(e,t,r)=>{const i=r(53908);e.exports=(e,t,r)=>new i(e,r).compare(new i(t,r))},51832:(e,t,r)=>{const i=r(30144);e.exports=(e,t)=>{const r=i(e,null,!0),n=i(t,null,!0),o=r.compare(n);if(0===o)return null;const s=o>0,a=s?r:n,l=s?n:r,d=!!a.prerelease.length;if(!!l.prerelease.length&&!d)return l.patch||l.minor?a.patch?"patch":a.minor?"minor":"major":"major";const c=d?"pre":"";return r.major!==n.major?c+"major":r.minor!==n.minor?c+"minor":r.patch!==n.patch?c+"patch":"prerelease"}},94641:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>0===i(e,t,r)},35580:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>i(e,t,r)>0},54089:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>i(e,t,r)>=0},93007:(e,t,r)=>{const i=r(53908);e.exports=(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new i(e instanceof i?e.version:e,r).inc(t,n,o).version}catch(e){return null}}},7059:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>i(e,t,r)<0},25200:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>i(e,t,r)<=0},32938:(e,t,r)=>{const i=r(53908);e.exports=(e,t)=>new i(e,t).major},46254:(e,t,r)=>{const i=r(53908);e.exports=(e,t)=>new i(e,t).minor},13999:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>0!==i(e,t,r)},30144:(e,t,r)=>{const i=r(53908);e.exports=(e,t,r=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!r)return null;throw e}}},24493:(e,t,r)=>{const i=r(53908);e.exports=(e,t)=>new i(e,t).patch},31729:(e,t,r)=>{const i=r(30144);e.exports=(e,t)=>{const r=i(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970:(e,t,r)=>{const i=r(50560);e.exports=(e,t,r)=>i(t,e,r)},74277:(e,t,r)=>{const i=r(40909);e.exports=(e,t)=>e.sort(((e,r)=>i(r,e,t)))},97638:(e,t,r)=>{const i=r(78311);e.exports=(e,t,r)=>{try{t=new i(t,r)}catch(e){return!1}return t.test(e)}},43927:(e,t,r)=>{const i=r(40909);e.exports=(e,t)=>e.sort(((e,r)=>i(e,r,t)))},56953:(e,t,r)=>{const i=r(30144);e.exports=(e,t)=>{const r=i(e,t);return r?r.version:null}},99589:(e,t,r)=>{const i=r(99718),n=r(16874),o=r(53908),s=r(61123),a=r(30144),l=r(56953),d=r(57414),c=r(93007),u=r(51832),p=r(32938),h=r(46254),f=r(24493),m=r(31729),g=r(50560),y=r(9970),v=r(11763),b=r(40909),w=r(43927),_=r(74277),x=r(35580),S=r(7059),k=r(94641),E=r(13999),T=r(54089),B=r(25200),C=r(72111),I=r(46170),A=r(93904),F=r(78311),M=r(97638),D=r(77631),R=r(19628),P=r(270),O=r(41261),z=r(13874),N=r(97075),q=r(75571),U=r(5342),L=r(76780),j=r(72525),H=r(75032);e.exports={parse:a,valid:l,clean:d,inc:c,diff:u,major:p,minor:h,patch:f,prerelease:m,compare:g,rcompare:y,compareLoose:v,compareBuild:b,sort:w,rsort:_,gt:x,lt:S,eq:k,neq:E,gte:T,lte:B,cmp:C,coerce:I,Comparator:A,Range:F,satisfies:M,toComparators:D,maxSatisfying:R,minSatisfying:P,minVersion:O,validRange:z,outside:N,gtr:q,ltr:U,intersects:L,simplifyRange:j,subset:H,SemVer:o,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},16874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},57272:(e,t,r)=>{var i=r(65606);const n=("object"==typeof i&&i.env,()=>{});e.exports=n},61123:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},68794:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},98587:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},99718:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=r(16874),s=r(57272),a=(t=e.exports={}).re=[],l=t.safeRe=[],d=t.src=[],c=t.t={};let u=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[p,n]],f=(e,t,r)=>{const i=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;s(e,n,t),c[e]=n,d[n]=t,a[n]=new RegExp(t,r?"g":void 0),l[n]=new RegExp(i,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),f("MAINVERSION",`(${d[c.NUMERICIDENTIFIER]})\\.(${d[c.NUMERICIDENTIFIER]})\\.(${d[c.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${d[c.NUMERICIDENTIFIERLOOSE]})\\.(${d[c.NUMERICIDENTIFIERLOOSE]})\\.(${d[c.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${d[c.NUMERICIDENTIFIER]}|${d[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${d[c.NUMERICIDENTIFIERLOOSE]}|${d[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${d[c.PRERELEASEIDENTIFIER]}(?:\\.${d[c.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${d[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[c.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${p}+`),f("BUILD",`(?:\\+(${d[c.BUILDIDENTIFIER]}(?:\\.${d[c.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${d[c.MAINVERSION]}${d[c.PRERELEASE]}?${d[c.BUILD]}?`),f("FULL",`^${d[c.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${d[c.MAINVERSIONLOOSE]}${d[c.PRERELEASELOOSE]}?${d[c.BUILD]}?`),f("LOOSE",`^${d[c.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${d[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${d[c.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${d[c.XRANGEIDENTIFIER]})(?:\\.(${d[c.XRANGEIDENTIFIER]})(?:\\.(${d[c.XRANGEIDENTIFIER]})(?:${d[c.PRERELEASE]})?${d[c.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${d[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[c.XRANGEIDENTIFIERLOOSE]})(?:${d[c.PRERELEASELOOSE]})?${d[c.BUILD]}?)?)?`),f("XRANGE",`^${d[c.GTLT]}\\s*${d[c.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${d[c.GTLT]}\\s*${d[c.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),f("COERCE",`${d[c.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",d[c.COERCEPLAIN]+`(?:${d[c.PRERELEASE]})?`+`(?:${d[c.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",d[c.COERCE],!0),f("COERCERTLFULL",d[c.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${d[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${d[c.LONETILDE]}${d[c.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${d[c.LONETILDE]}${d[c.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${d[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${d[c.LONECARET]}${d[c.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${d[c.LONECARET]}${d[c.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${d[c.GTLT]}\\s*(${d[c.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${d[c.GTLT]}\\s*(${d[c.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${d[c.GTLT]}\\s*(${d[c.LOOSEPLAIN]}|${d[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${d[c.XRANGEPLAIN]})\\s+-\\s+(${d[c.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${d[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[c.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},75571:(e,t,r)=>{const i=r(97075);e.exports=(e,t,r)=>i(e,t,">",r)},76780:(e,t,r)=>{const i=r(78311);e.exports=(e,t,r)=>(e=new i(e,r),t=new i(t,r),e.intersects(t,r))},5342:(e,t,r)=>{const i=r(97075);e.exports=(e,t,r)=>i(e,t,"<",r)},19628:(e,t,r)=>{const i=r(53908),n=r(78311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new n(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new i(o,r)))})),o}},270:(e,t,r)=>{const i=r(53908),n=r(78311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new n(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new i(o,r)))})),o}},41261:(e,t,r)=>{const i=r(53908),n=r(78311),o=r(35580);e.exports=(e,t)=>{e=new n(e,t);let r=new i("0.0.0");if(e.test(r))return r;if(r=new i("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const n=e.set[t];let s=null;n.forEach((e=>{const t=new i(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},97075:(e,t,r)=>{const i=r(53908),n=r(93904),{ANY:o}=n,s=r(78311),a=r(97638),l=r(35580),d=r(7059),c=r(25200),u=r(54089);e.exports=(e,t,r,p)=>{let h,f,m,g,y;switch(e=new i(e,p),t=new s(t,p),r){case">":h=l,f=c,m=d,g=">",y=">=";break;case"<":h=d,f=u,m=l,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const i=t.set[r];let s=null,a=null;if(i.forEach((e=>{e.semver===o&&(e=new n(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,p)?s=e:m(e.semver,a.semver,p)&&(a=e)})),s.operator===g||s.operator===y)return!1;if((!a.operator||a.operator===g)&&f(e,a.semver))return!1;if(a.operator===y&&m(e,a.semver))return!1}return!0}},72525:(e,t,r)=>{const i=r(97638),n=r(50560);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const l=e.sort(((e,t)=>n(e,t,r)));for(const e of l){i(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const d=[];for(const[e,t]of o)e===t?d.push(e):t||e!==l[0]?t?e===l[0]?d.push(`<=${t}`):d.push(`${e} - ${t}`):d.push(`>=${e}`):d.push("*");const c=d.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return c.length<u.length?c:t}},75032:(e,t,r)=>{const i=r(78311),n=r(93904),{ANY:o}=n,s=r(97638),a=r(50560),l=[new n(">=0.0.0-0")],d=[new n(">=0.0.0")],c=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?l:d}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=d}const i=new Set;let n,c,h,f,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?n=u(n,t,r):"<"===t.operator||"<="===t.operator?c=p(c,t,r):i.add(t.semver);if(i.size>1)return null;if(n&&c){if(h=a(n.semver,c.semver,r),h>0)return null;if(0===h&&(">="!==n.operator||"<="!==c.operator))return null}for(const e of i){if(n&&!s(e,String(n),r))return null;if(c&&!s(e,String(c),r))return null;for(const i of t)if(!s(e,String(i),r))return!1;return!0}let v=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver,b=!(!n||r.includePrerelease||!n.semver.prerelease.length)&&n.semver;v&&1===v.prerelease.length&&"<"===c.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,n)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(f=u(n,e,r),f===e&&f!==n)return!1}else if(">="===n.operator&&!s(n.semver,String(e),r))return!1;if(c)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(m=p(c,e,r),m===e&&m!==c)return!1}else if("<="===c.operator&&!s(c.semver,String(e),r))return!1;if(!e.operator&&(c||n)&&0!==h)return!1}return!(n&&g&&!c&&0!==h)&&(!(c&&y&&!n&&0!==h)&&(!b&&!v))},u=(e,t,r)=>{if(!e)return t;const i=a(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const i=a(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new i(e,r),t=new i(t,r);let n=!1;e:for(const i of e.set){for(const e of t.set){const t=c(i,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0}},77631:(e,t,r)=>{const i=r(78311);e.exports=(e,t)=>new i(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},13874:(e,t,r)=>{const i=r(78311);e.exports=(e,t)=>{try{return new i(e,t).range||"*"}catch(e){return null}}},96897:(e,t,r)=>{"use strict";var i=r(70453),n=r(30041),o=r(30592)(),s=r(75795),a=r(69675),l=i("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,d=!0;if("length"in e&&s){var c=s(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(d=!1)}return(i||d||!r)&&(o?n(e,"length",t,!0,!0):n(e,"length",t)),e}},90392:(e,t,r)=>{var i=r(92861).Buffer;function n(e,t){this._block=i.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=i.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var l=s%n,d=Math.min(o-a,n-l),c=0;c<d;c++)r[l+c]=e[a+c];a+=d,(s+=d)%n==0&&this._update(r)}return this._len+=o,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=n},62802:(e,t,r)=>{var i=e.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};i.sha=r(27816),i.sha1=r(63737),i.sha224=r(26710),i.sha256=r(24107),i.sha384=r(32827),i.sha512=r(82890)},27816:(e,t,r)=>{var i=r(56698),n=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,n.call(this,64,56)}function d(e){return e<<30|e>>>2}function c(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=r[u-3]^r[u-8]^r[u-14]^r[u-16];for(var p=0;p<80;++p){var h=~~(p/20),f=0|((t=i)<<5|t>>>27)+c(h,n,o,a)+l+r[p]+s[h];l=a,a=o,o=d(n),n=i,i=f}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},63737:(e,t,r)=>{var i=r(56698),n=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,n.call(this,64,56)}function d(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function u(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var f=~~(h/20),m=d(i)+u(f,n,o,a)+l+r[h]+s[f]|0;l=a,a=o,o=c(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},26710:(e,t,r)=>{var i=r(56698),n=r(24107),o=r(90392),s=r(92861).Buffer,a=new Array(64);function l(){this.init(),this._w=a,o.call(this,64,56)}i(l,n),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},24107:(e,t,r)=>{var i=r(56698),n=r(90392),o=r(92861).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function l(){this.init(),this._w=a,n.call(this,64,56)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function u(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(l,n),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,f=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=g+p(l)+d(l,f,m)+s[v]+r[v]|0,w=u(i)+c(i,n,o)|0;g=m,m=f,f=l,l=a+b|0,a=o,o=n,n=i,i=b+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0,this._f=f+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},32827:(e,t,r)=>{var i=r(56698),n=r(82890),o=r(90392),s=r(92861).Buffer,a=new Array(160);function l(){this.init(),this._w=a,o.call(this,128,112)}i(l,n),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},82890:(e,t,r)=>{var i=r(56698),n=r(90392),o=r(92861).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function l(){this.init(),this._w=a,n.call(this,128,112)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}i(l,n),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,a=0|this._eh,l=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,x=0|this._cl,S=0|this._dl,k=0|this._el,E=0|this._fl,T=0|this._gl,B=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var I=t[C-30],A=t[C-30+1],F=h(I,A),M=f(A,I),D=m(I=t[C-4],A=t[C-4+1]),R=g(A,I),P=t[C-14],O=t[C-14+1],z=t[C-32],N=t[C-32+1],q=M+O|0,U=F+P+y(q,M)|0;U=(U=U+D+y(q=q+R|0,R)|0)+z+y(q=q+N|0,N)|0,t[C]=U,t[C+1]=q}for(var L=0;L<160;L+=2){U=t[L],q=t[L+1];var j=c(r,i,n),H=c(w,_,x),$=u(r,w),G=u(w,r),W=p(a,k),K=p(k,a),V=s[L],J=s[L+1],Y=d(a,l,v),Q=d(k,E,T),Z=B+K|0,X=b+W+y(Z,B)|0;X=(X=(X=X+Y+y(Z=Z+Q|0,Q)|0)+V+y(Z=Z+J|0,J)|0)+U+y(Z=Z+q|0,q)|0;var ee=G+H|0,te=$+j+y(ee,G)|0;b=v,B=T,v=l,T=E,l=a,E=k,a=o+X+y(k=S+Z|0,S)|0,o=n,S=x,n=i,x=_,i=r,_=w,r=X+te+y(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+x|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+T|0,this._hl=this._hl+B|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+i+y(this._bl,_)|0,this._ch=this._ch+n+y(this._cl,x)|0,this._dh=this._dh+o+y(this._dl,S)|0,this._eh=this._eh+a+y(this._el,k)|0,this._fh=this._fh+l+y(this._fl,E)|0,this._gh=this._gh+v+y(this._gl,T)|0,this._hh=this._hh+b+y(this._hl,B)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},920:(e,t,r)=>{"use strict";var i=r(70453),n=r(38075),o=r(58859),s=r(69675),a=i("%WeakMap%",!0),l=i("%Map%",!0),d=n("WeakMap.prototype.get",!0),c=n("WeakMap.prototype.set",!0),u=n("WeakMap.prototype.has",!0),p=n("Map.prototype.get",!0),h=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),m=function(e,t){for(var r,i=e;null!==(r=i.next);i=r)if(r.key===t)return i.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,i={assert:function(e){if(!i.has(e))throw new s("Side channel does not contain "+o(e))},get:function(i){if(a&&i&&("object"==typeof i||"function"==typeof i)){if(e)return d(e,i)}else if(l){if(t)return p(t,i)}else if(r)return function(e,t){var r=m(e,t);return r&&r.value}(r,i)},has:function(i){if(a&&i&&("object"==typeof i||"function"==typeof i)){if(e)return u(e,i)}else if(l){if(t)return f(t,i)}else if(r)return function(e,t){return!!m(e,t)}(r,i);return!1},set:function(i,n){a&&i&&("object"==typeof i||"function"==typeof i)?(e||(e=new a),c(e,i,n)):l?(t||(t=new l),h(t,i,n)):(r||(r={key:{},next:null}),function(e,t,r){var i=m(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}}(r,i,n))}};return i}},88310:(e,t,r)=>{e.exports=n;var i=r(37007).EventEmitter;function n(){i.call(this)}r(56698)(n,i),n.Readable=r(46891),n.Writable=r(81999),n.Duplex=r(88101),n.Transform=r(59083),n.PassThrough=r(3681),n.finished=r(14257),n.pipeline=r(5267),n.Stream=n,n.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function d(e){if(c(),0===i.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",n),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",d),e.removeListener("error",d),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",d),e.on("error",d),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},12463:e=>{"use strict";var t={};function r(e,r,i){i||(i=Error);var n=function(e){var t,i;function n(t,i,n){return e.call(this,function(e,t,i){return"string"==typeof r?r:r(e,t,i)}(t,i,n))||this}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,n}(i);n.prototype.name=i.name,n.prototype.code=e,t[e]=n}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,o,s,a;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(i(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},88101:(e,t,r)=>{"use strict";var i=r(65606),n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var o=r(46891),s=r(81999);r(56698)(c,o);for(var a=n(s.prototype),l=0;l<a.length;l++){var d=a[l];c.prototype[d]||(c.prototype[d]=s.prototype[d])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||i.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},3681:(e,t,r)=>{"use strict";e.exports=n;var i=r(59083);function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}r(56698)(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},46891:(e,t,r)=>{"use strict";var i,n=r(65606);e.exports=E,E.ReadableState=k;r(37007).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(41396),a=r(48287).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,c=r(99580);d=c&&c.debuglog?c.debuglog("stream"):function(){};var u,p,h,f=r(81766),m=r(54347),g=r(66644).getHighWaterMark,y=r(12463).F,v=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(56698)(E,s);var x=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function k(e,t,n){i=i||r(88101),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",n),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=r(83141).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function E(e){if(i=i||r(88101),!(this instanceof E))return new E(e);var t=this instanceof i;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function T(e,t,r,i,n){d("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,F(e)))}(e,s);else if(n||(o=function(e,t){var r;i=t,a.isBuffer(i)||i instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(s,t)),o)x(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),i)s.endEmitted?x(e,new _):B(e,s,t,!0);else if(s.ended)x(e,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?B(e,s,t,!1):M(e,s)):B(e,s,t,!1)}else i||(s.reading=!1,M(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function B(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),M(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=a.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},E.prototype.unshift=function(e){return T(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){u||(u=r(83141).I);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=t.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var C=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(F,e))}function F(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(d("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){d("readable nexttick read 0"),e.read(0)}function O(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function q(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(U,t,e))}function U(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function L(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):A(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&q(this),null;var i,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",n=!0),t.ended||t.reading?d("reading or ended",n=!1):n&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&q(this)),null!==i&&this.emit("data",i),i},E.prototype._read=function(e){x(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:g;function a(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",g),r.removeListener("data",p),u=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,z(e))}}(r);e.on("drain",c);var u=!1;function p(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!u&&(d("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){d("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&x(e,t)}function f(){e.removeListener("finish",m),g()}function m(){d("onfinish"),e.removeListener("close",f),g()}function g(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",f),e.once("finish",m),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=L(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,d("on readable",i.length,i.reading),i.length?A(this):i.reading||n.nextTick(P,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(R,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(O,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){d("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r(65034)),p(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=N,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===h&&(h=r(90968)),h(E,e,t)})},59083:(e,t,r)=>{"use strict";e.exports=c;var i=r(12463).F,n=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,l=r(88101);function d(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,r){p(e,t,r)}))}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(56698)(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new n("_transform()"))},c.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},81999:(e,t,r)=>{"use strict";var i,n=r(65606);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=k;var s={deprecate:r(94643)},a=r(41396),l=r(48287).Buffer,d=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,u=r(54347),p=r(66644).getHighWaterMark,h=r(12463).F,f=h.ERR_INVALID_ARG_TYPE,m=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,v=h.ERR_STREAM_DESTROYED,b=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,_=h.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;function S(){}function k(e,t,s){i=i||r(88101),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(F,e,t),e._writableState.errorEmitted=!0,x(e,i)):(o(i),e._writableState.errorEmitted=!0,x(e,i),F(e,t))}(e,r,i,t,o);else{var s=I(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),i?n.nextTick(B,e,r,s,o):B(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function E(e){var t=this instanceof(i=i||r(88101));if(!t&&!c.call(E,this))return new E(e);this._writableState=new k(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function T(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function B(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),F(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)n[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;n.allBuffers=l,T(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,u=r.callback;if(T(e,t,!1,t.objectMode?1:d.length,d,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),F(e,t)}))}function F(e,t){var r=I(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(A,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(56698)(E,a),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===E&&(e&&e._writableState instanceof k)}})):c=function(e){return e instanceof this},E.prototype.pipe=function(){x(this,new y)},E.prototype.write=function(e,t,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,l.isBuffer(i)||i instanceof d);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new w;x(e,r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var o;return null===r?o=new b:"string"==typeof r||t.objectMode||(o=new f("chunk",["string","Buffer"],r)),!o||(x(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,i,n,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var d=t.length<t.highWaterMark;d||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,a,i,n,o);return d}(this,o,a,e,t,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||C(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,F(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(e,t){t(e)}},65034:(e,t,r)=>{"use strict";var i,n=r(65606);function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(14257),a=Symbol("lastResolve"),l=Symbol("lastReject"),d=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),p=Symbol("handlePromise"),h=Symbol("stream");function f(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[u]=null,e[a]=null,e[l]=null,t(f(r,!1)))}}function g(e){n.nextTick(m,e)}var y=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((o(i={get stream(){return this[h]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[d]?r(e[d]):t(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(function(e,t){return function(r,i){e.then((function(){t[c]?r(f(void 0,!0)):t[p](r,i)}),i)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[p])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),o(i,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(f(void 0,!0))}))}))})),i),y);e.exports=function(e){var t,r=Object.create(v,(o(t={},h,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,p,{value:function(e,t){var i=r[h].read();i?(r[u]=null,r[a]=null,r[l]=null,e(f(i,!1))):(r[a]=e,r[l]=t)},writable:!0}),t));return r[u]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];return null!==t&&(r[u]=null,r[a]=null,r[l]=null,t(e)),void(r[d]=e)}var i=r[a];null!==i&&(r[u]=null,r[a]=null,r[l]=null,i(f(void 0,!0))),r[c]=!0})),e.on("readable",g.bind(null,r)),r}},81766:(e,t,r)=>{"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=r(48287).Buffer,d=r(63779).inspect,c=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,i;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,r,i,n=l.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=n,i=s,l.prototype.copy.call(t,r,i),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0==(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:c,value:function(e,t){return d(this,n(n({},t),{},{depth:0,customInspect:!1}))}}],r&&s(t.prototype,r),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}()},54347:(e,t,r)=>{"use strict";var i=r(65606);function n(e,t){s(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,e)):i.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?i.nextTick(o,r):(r._writableState.errorEmitted=!0,i.nextTick(n,r,e)):i.nextTick(n,r,e):t?(i.nextTick(o,r),t(e)):i.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}},14257:(e,t,r)=>{"use strict";var i=r(12463).F.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(o||n);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||c()},d=t._writableState&&t._writableState.finished,c=function(){a=!1,d=!0,s||o.call(t)},u=t._readableState&&t._readableState.endEmitted,p=function(){s=!1,u=!0,a||o.call(t)},h=function(e){o.call(t,e)},f=function(){var e;return s&&!u?(t._readableState&&t._readableState.ended||(e=new i),o.call(t,e)):a&&!d?(t._writableState&&t._writableState.ended||(e=new i),o.call(t,e)):void 0},m=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",c),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",p),t.on("finish",c),!1!==r.error&&t.on("error",h),t.on("close",f),function(){t.removeListener("complete",c),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",p),t.removeListener("error",h),t.removeListener("close",f)}}},90968:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},5267:(e,t,r)=>{"use strict";var i;var n=r(12463).F,o=n.ERR_MISSING_ARGS,s=n.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function d(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var c,u=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var p=t.map((function(e,n){var o=n<t.length-1;return function(e,t,n,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===i&&(i=r(14257)),i(e,{readable:t,writable:n},(function(e){if(e)return o(e);a=!0,o()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}(e,o,n>0,(function(e){c||(c=e),e&&p.forEach(l),o||(p.forEach(l),u(c))}))}));return t.reduce(d)}},66644:(e,t,r)=>{"use strict";var i=r(12463).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new i(n?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},41396:(e,t,r)=>{e.exports=r(37007).EventEmitter},83141:(e,t,r)=>{"use strict";var i=r(15003).Buffer,n=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=d,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=u,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},o.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var n=s(t[i]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if(n=s(t[i]),n>=0)return n>0&&(e.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if(n=s(t[i]),n>=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},15003:(e,t,r)=>{var i=r(48287),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),o(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},17983:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,n={}){if(n=Object.assign({},i,n),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==n.skipLike&&n.skipLike.test(o))return e;if(n.hex&&t.test(o))return Number.parseInt(o,16);{const t=r.exec(o);if(t){const r=t[1],i=t[2];let s=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(t[3]);const a=t[4]||t[6];if(!n.leadingZeros&&i.length>0&&r&&"."!==o[2])return e;if(!n.leadingZeros&&i.length>0&&!r&&"."!==o[1])return e;{const t=Number(o),l=""+t;return-1!==l.search(/[eE]/)||a?n.eNotation?t:e:-1!==o.indexOf(".")?"0"===l&&""===s||l===s||r&&l==="-"+s?t:e:i?s===l||r+s===l?t:e:o===l||o===r+l?t:e}}return e}}},51380:e=>{"use strict";function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function i(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){i.prototype[e]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return this._defaults.push({fn:e,args:r}),this}})),i.prototype._setDefaults=function(e){this._defaults.forEach((function(r){e[r.fn].apply(e,t(r.args))}))},e.exports=i},15734:(e,t,r)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var n;"undefined"!=typeof window?n=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),n=void 0):n=self;var o=r(5971),s=r(78463),a=r(31948),l=r(85125),d=r(19450),c=r(51380);function u(){}e.exports=function(e,r){return"function"==typeof r?new t.Request("GET",e).end(r):1===arguments.length?new t.Request("GET",e):new t.Request(e,r)};var p=t=e.exports;t.Request=b,p.getXHR=function(){if(n.XMLHttpRequest&&(!n.location||"file:"!==n.location.protocol||!n.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function f(e){if(!l(e))return e;var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&m(t,r,e[r]);return t.join("&")}function m(e,t,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach((function(r){m(e,t,r)}));else if(l(r))for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&m(e,"".concat(t,"[").concat(i,"]"),r[i]);else e.push(encodeURI(t)+"="+encodeURIComponent(r));else e.push(encodeURI(t))}function g(e){for(var t,r,i={},n=e.split("&"),o=0,s=n.length;o<s;++o)-1===(r=(t=n[o]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return i}function y(e){return/[/+]json($|[^-\w])/.test(e)}function v(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,r,i,n,o=e.split(/\r?\n/),s={},a=0,l=o.length;a<l;++a)-1!==(t=(r=o[a]).indexOf(":"))&&(i=r.slice(0,t).toLowerCase(),n=h(r.slice(t+1)),s[i]=n);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function b(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,i=null;try{i=new v(r)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,r.xhr?(t.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,t.status=r.xhr.status?r.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),r.callback(t)}r.emit("response",i);try{r._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,r.callback(e,i)):r.callback(null,i)}))}function w(e,t,r){var i=p("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&i.send(t),r&&i.end(r),i}p.serializeObject=f,p.parseString=g,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":f,"application/json":s},p.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},d(v.prototype),v.prototype._parseBody=function(e){var t=p.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&y(this.type)&&(t=p.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},v.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,i="cannot ".concat(t," ").concat(r," (").concat(this.status,")"),n=new Error(i);return n.status=this.status,n.method=t,n.url=r,n},p.Response=v,o(b.prototype),a(b.prototype),b.prototype.type=function(e){return this.set("Content-Type",p.types[e]||e),this},b.prototype.accept=function(e){return this.set("Accept",p.types[e]||e),this},b.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===i(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});return this._auth(e,t,r,(function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")}))},b.prototype.query=function(e){return"string"!=typeof e&&(e=f(e)),e&&this._query.push(e),this},b.prototype.attach=function(e,t,r){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},b.prototype._getFormData=function(){return this._formData||(this._formData=new n.FormData),this._formData},b.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},b.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},b.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},b.prototype.ca=b.prototype.agent,b.prototype.buffer=b.prototype.ca,b.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},b.prototype.pipe=b.prototype.write,b.prototype._isHost=function(e){return e&&"object"===i(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},b.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||u,this._finalizeQueryString(),this._end()},b.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},b.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=p.getXHR();var t=this.xhr,r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===r){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(e._uploadTimeoutTimer)),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var n=this._header["content-type"],o=this._serializer||p.serialize[n?n.split(";")[0]:""];!o&&y(n)&&(o=p.serialize["application/json"]),o&&(r=o(r))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===r?null:r)},p.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,r){var i=new p.Request(e,t);return this._setDefaults(i),r&&i.end(r),i}})),c.prototype.del=c.prototype.delete,p.get=function(e,t,r){var i=p("GET",e);return"function"==typeof t&&(r=t,t=null),t&&i.query(t),r&&i.end(r),i},p.head=function(e,t,r){var i=p("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&i.query(t),r&&i.end(r),i},p.options=function(e,t,r){var i=p("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&i.send(t),r&&i.end(r),i},p.del=w,p.delete=w,p.patch=function(e,t,r){var i=p("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&i.send(t),r&&i.end(r),i},p.post=function(e,t,r){var i=p("POST",e);return"function"==typeof t&&(r=t,t=null),t&&i.send(t),r&&i.end(r),i},p.put=function(e,t,r){var i=p("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&i.send(t),r&&i.end(r),i}},85125:e=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(e){return null!==e&&"object"===t(e)}},31948:(e,t,r)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var n=r(85125);function o(e){if(e)return function(e){for(var t in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,t)&&(e[t]=o.prototype[t]);return e}(e)}e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!==i(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&s.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},o.prototype.then=function(e,t){var r=this;if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){i.on("abort",(function(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)t(r.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=r.status,e.method=r.method,e.url=r.url,t(e)}})),i.end((function(r,i){r?t(r):e(i)}))}))}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(n(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(n(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(r,e[r]);return this}if(Array.isArray(t)){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.field(e,t[i]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},o.prototype._auth=function(e,t,r,i){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(i("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},o.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=n(e),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&n(this._data))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this._data[i]=e[i]);else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||r||this.type("json"),this},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.slice(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.warn("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var i=new Error("".concat(e+t,"ms exceeded"));i.timeout=t,i.code="ECONNABORTED",i.errno=r,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},19450:(e,t,r)=>{"use strict";var i=r(33048);function n(e){if(e)return function(e){for(var t in n.prototype)Object.prototype.hasOwnProperty.call(n.prototype,t)&&(e[t]=n.prototype[t]);return e}(e)}e.exports=n,n.prototype.get=function(e){return this.header[e.toLowerCase()]},n.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var r=i.params(t);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},n.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},33048:(e,t)=>{"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var r=t.split(/ *= */),i=r.shift(),n=r.shift();return i&&n&&(e[i]=n),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var r=t.split(/ *; */),i=r[0].slice(1,-1);return e[r[1].split(/ *= */)[1].slice(1,-1)]=i,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},61270:function(e,t,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var n="object"==typeof r.g&&r.g;n.global!==n&&n.window!==n&&n.self;var o,s=2147483647,a=36,l=/^xn--/,d=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function f(e){throw new RangeError(u[e])}function m(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function g(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+m((e=e.replace(c,".")).split("."),t).join(".")}function y(e){for(var t,r,i=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?56320==(64512&(r=e.charCodeAt(n++)))?i.push(((1023&t)<<10)+(1023&r)+65536):(i.push(t),n--):i.push(t);return i}function v(e){return m(e,(function(e){var t="";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var i=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;i+=a)e=p(e/35);return p(i+36*e/(e+38))}function _(e){var t,r,i,n,o,l,d,c,u,h,m,g=[],y=e.length,b=0,_=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)e.charCodeAt(i)>=128&&f("not-basic"),g.push(e.charCodeAt(i));for(n=r>0?r+1:0;n<y;){for(o=b,l=1,d=a;n>=y&&f("invalid-input"),((c=(m=e.charCodeAt(n++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:a)>=a||c>p((s-b)/l))&&f("overflow"),b+=c*l,!(c<(u=d<=x?1:d>=x+26?26:d-x));d+=a)l>p(s/(h=a-u))&&f("overflow"),l*=h;x=w(b-o,t=g.length+1,0==o),p(b/t)>s-_&&f("overflow"),_+=p(b/t),b%=t,g.splice(b++,0,_)}return v(g)}function x(e){var t,r,i,n,o,l,d,c,u,m,g,v,_,x,S,k=[];for(v=(e=y(e)).length,t=128,r=0,o=72,l=0;l<v;++l)(g=e[l])<128&&k.push(h(g));for(i=n=k.length,n&&k.push("-");i<v;){for(d=s,l=0;l<v;++l)(g=e[l])>=t&&g<d&&(d=g);for(d-t>p((s-r)/(_=i+1))&&f("overflow"),r+=(d-t)*_,t=d,l=0;l<v;++l)if((g=e[l])<t&&++r>s&&f("overflow"),g==t){for(c=r,u=a;!(c<(m=u<=o?1:u>=o+26?26:u-o));u+=a)S=c-m,x=a-m,k.push(h(b(m+S%x,0))),c=p(S/x);k.push(h(b(c,0))),o=w(r,_,i==n),r=0,++i}++r,++t}return k.join("")}o={version:"1.4.1",ucs2:{decode:y,encode:v},decode:_,encode:x,toASCII:function(e){return g(e,(function(e){return d.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return g(e,(function(e){return l.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return o}.call(t,r,t,e))||(e.exports=i)}()},88835:(e,t,r)=>{"use strict";var i=r(61270);function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(l),c=["%","/","?",";","#"].concat(d),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(55373);function v(e,t,r){if(e&&"object"==typeof e&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),s=-1!==n&&n<e.indexOf("#")?"?":"#",l=e.split(s);l[0]=l[0].replace(/\\/g,"/");var v=e=l.join(s);if(v=v.trim(),!r&&1===e.split("#").length){var b=a.exec(v);if(b)return this.path=v,this.href=v,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=o.exec(v);if(w){var _=(w=w[0]).toLowerCase();this.protocol=_,v=v.substr(w.length)}if(r||w||v.match(/^\/\/[^@/]+@[^@/]+/)){var x="//"===v.substr(0,2);!x||w&&m[w]||(v=v.substr(2),this.slashes=!0)}if(!m[w]&&(x||w&&!g[w])){for(var S,k,E=-1,T=0;T<u.length;T++){-1!==(B=v.indexOf(u[T]))&&(-1===E||B<E)&&(E=B)}-1!==(k=-1===E?v.lastIndexOf("@"):v.lastIndexOf("@",E))&&(S=v.slice(0,k),v=v.slice(k+1),this.auth=decodeURIComponent(S)),E=-1;for(T=0;T<c.length;T++){var B;-1!==(B=v.indexOf(c[T]))&&(-1===E||B<E)&&(E=B)}-1===E&&(E=v.length),this.host=v.slice(0,E),v=v.slice(E),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var I=this.hostname.split(/\./),A=(T=0,I.length);T<A;T++){var F=I[T];if(F&&!F.match(p)){for(var M="",D=0,R=F.length;D<R;D++)F.charCodeAt(D)>127?M+="x":M+=F[D];if(!M.match(p)){var P=I.slice(0,T),O=I.slice(T+1),z=F.match(h);z&&(P.push(z[1]),O.unshift(z[2])),O.length&&(v="/"+O.join(".")+v),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=i.toASCII(this.hostname));var N=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+N,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!f[_])for(T=0,A=d.length;T<A;T++){var U=d[T];if(-1!==v.indexOf(U)){var L=encodeURIComponent(U);L===U&&(L=escape(U)),v=v.split(U).join(L)}}var j=v.indexOf("#");-1!==j&&(this.hash=v.substr(j),v=v.slice(0,j));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=y.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),g[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){N=this.pathname||"";var $=this.search||"";this.path=N+$}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),t+n+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i},n.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if("string"==typeof e){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,i=Object.keys(this),o=0;o<i.length;o++){var s=i[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),l=0;l<a.length;l++){var d=a[l];"protocol"!==d&&(r[d]=e[d])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var c=Object.keys(e),u=0;u<c.length;u++){var p=c[u];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||m[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",y=r.search||"";r.path=f+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||v||r.host&&e.pathname,_=w,x=r.pathname&&r.pathname.split("/")||[],S=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),w=w&&(""===h[0]||""===x[0])),b)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),r.search=e.search,r.query=e.query;else if(null!=e.search){if(S)r.host=x.shift(),r.hostname=r.host,(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=x.slice(-1)[0],E=(r.host||e.host||x.length>1)&&("."===k||".."===k)||""===k,T=0,B=x.length;B>=0;B--)"."===(k=x[B])?x.splice(B,1):".."===k?(x.splice(B,1),T++):T&&(x.splice(B,1),T--);if(!w&&!_)for(;T--;T)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),E&&"/"!==x.join("/").substr(-1)&&x.push("");var C,I=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(r.hostname=I?"":x.length?x.shift():"",r.host=r.hostname,(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname));return(w=w||r.host&&x.length)&&!I&&x.unshift(""),x.length>0?r.pathname=x.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=v(e)),e instanceof n?e.format():n.prototype.format.call(e)},t.Url=n},94643:(e,t,r)=>{function i(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},81135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},49032:(e,t,r)=>{"use strict";var i=r(47244),n=r(48184),o=r(25767),s=r(35680);function a(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,d="undefined"!=typeof Symbol,c=a(Object.prototype.toString),u=a(Number.prototype.valueOf),p=a(String.prototype.valueOf),h=a(Boolean.prototype.valueOf);if(l)var f=a(BigInt.prototype.valueOf);if(d)var m=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===c(e)}function v(e){return"[object Set]"===c(e)}function b(e){return"[object WeakMap]"===c(e)}function w(e){return"[object WeakSet]"===c(e)}function _(e){return"[object ArrayBuffer]"===c(e)}function x(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===c(e)}function k(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=n,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=x,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(e){return"[object SharedArrayBuffer]"===c(e)}function B(e){return void 0!==E&&(void 0===T.working&&(T.working=T(new E)),T.working?T(e):e instanceof E)}function C(e){return g(e,u)}function I(e){return g(e,p)}function A(e){return g(e,h)}function F(e){return l&&g(e,f)}function M(e){return d&&g(e,m)}t.isSharedArrayBuffer=B,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},t.isGeneratorObject=function(e){return"[object Generator]"===c(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},t.isNumberObject=C,t.isStringObject=I,t.isBooleanObject=A,t.isBigIntObject=F,t.isSymbolObject=M,t.isBoxedPrimitive=function(e){return C(e)||I(e)||A(e)||F(e)||M(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(x(e)||B(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},40537:(e,t,r)=>{var i=r(65606),n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++)r[t[i]]=Object.getOwnPropertyDescriptor(e,t[i]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,n=i.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=n)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r<n;a=i[++r])g(a)||!_(a)?s+=" "+a:s+=" "+l(a);return s},t.deprecate=function(e,r){if(void 0!==i&&!0===i.noDeprecation)return e;if(void 0===i)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(i.throwDeprecation)throw new Error(r);i.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var s={},a=/^$/;function l(e,r){var i={seen:[],stylize:c};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),m(r)?i.showHidden=r:r&&t._extend(i,r),b(i.showHidden)&&(i.showHidden=!1),b(i.depth)&&(i.depth=2),b(i.colors)&&(i.colors=!1),b(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=d),u(i,e,i.depth)}function d(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,i){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,e);return v(n)||(n=u(e,n,i)),n}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(k(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var d,c="",_=!1,E=["{","}"];(f(r)&&(_=!0,E=["[","]"]),k(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(c=" "+RegExp.prototype.toString.call(r)),x(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+p(r)),0!==s.length||_&&0!=r.length?i<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),d=_?function(e,t,r,i,n){for(var o=[],s=0,a=t.length;s<a;++s)C(t,String(s))?o.push(h(e,t,r,i,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(h(e,t,r,i,n,!0))})),o}(e,r,i,a,s):s.map((function(t){return h(e,r,i,a,t,_)})),e.seen.pop(),function(e,t,r){var i=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(i>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(d,c,E)):E[0]+c+E[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,i,n,o){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),C(i,n)||(s="["+n+"]"),a||(e.seen.indexOf(l.value)<0?(a=g(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&n.match(/^\d+$/))return a;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===E(e)}function _(e){return"object"==typeof e&&null!==e}function x(e){return _(e)&&"[object Date]"===E(e)}function S(e){return _(e)&&("[object Error]"===E(e)||e instanceof Error)}function k(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=i.pid;s[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,i)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(49032),t.isArray=f,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=w,t.types.isRegExp=w,t.isObject=_,t.isDate=x,t.types.isDate=x,t.isError=S,t.types.isNativeError=S,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(81135);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":"),[e.getDate(),B[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(56698),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,i=new Promise((function(e,i){t=e,r=i})),n=[],o=0;o<arguments.length;o++)n.push(arguments[o]);n.push((function(e,i){e?r(e):t(i)}));try{e.apply(this,n)}catch(e){r(e)}return i}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=I,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return n.apply(o,arguments)};e.apply(this,t).then((function(e){i.nextTick(s.bind(null,null,e))}),(function(e){i.nextTick(A.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},25767:(e,t,r)=>{"use strict";var i=r(82682),n=r(39209),o=r(10487),s=r(38075),a=r(75795),l=s("Object.prototype.toString"),d=r(49092)(),c="undefined"==typeof globalThis?r.g:globalThis,u=n(),p=s("String.prototype.slice"),h=Object.getPrototypeOf,f=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},m={__proto__:null};i(u,d&&a&&h?function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=h(t),i=a(r,Symbol.toStringTag);if(!i){var n=h(r);i=a(n,Symbol.toStringTag)}m["$"+e]=o(i.get)}}:function(e){var t=new c[e],r=t.slice||t.set;r&&(m["$"+e]=o(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!d){var t=p(l(e),8,-1);return f(u,t)>-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,i){if(!t)try{r(e),t=p(i,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return i(m,(function(r,i){if(!t)try{"$"+r(e)===i&&(t=p(i,1))}catch(e){}})),t}(e):null}},55512:e=>{"use strict";e.exports=function(e,t,r,i){var n=self||window;try{try{var o;try{o=new n.Blob([e])}catch(t){(o=new(n.BlobBuilder||n.WebKitBlobBuilder||n.MozBlobBuilder||n.MSBlobBuilder)).append(e),o=o.getBlob()}var s=n.URL||n.webkitURL,a=s.createObjectURL(o),l=new n[t](a,r);return s.revokeObjectURL(a),l}catch(i){return new n[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!i)throw Error("Inline worker is not supported");return new n[t](i,r)}}},26692:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(73363)),s=n(r(48079)),a=n(r(64007)),l=n(r(11393));t.default=function(e){var t="xregexp",r=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,i=e.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,r],"g",{conjunction:"or"});function n(e){var t=/^(?:\(\?:\))*\^/,r=/\$(?:\(\?:\))*$/;return t.test(e)&&r.test(e)&&r.test(e.replace(/\\[\s\S]/g,""))?e.replace(t,"").replace(r,""):e}function d(r,i){var n=i?"x":"";return e.isRegExp(r)?r[t]&&r[t].captureNames?r:e(r.source,n):e(r,n)}function c(t){return t instanceof RegExp?t:e.escape(t)}function u(e,t,r){return e["subpattern".concat(r)]=t,e}function p(e,t,r){return e+(t<r.length-1?"{{subpattern".concat(t,"}}"):"")}e.tag=function(t){return function(r){for(var i,n,a=arguments.length,l=new Array(a>1?a-1:0),d=1;d<a;d++)l[d-1]=arguments[d];var h=(0,o.default)(i=(0,s.default)(l).call(l,c)).call(i,u,{}),f=(0,s.default)(n=r.raw).call(n,p).join("");return e.build(f,h,t)}},e.build=function(o,s,c){c=c||"";var u=-1!==(0,a.default)(c).call(c,"x"),p=/^\(\?([\w$]+)\)/.exec(o);p&&(c=e._clipDuplicates(c+p[1]));var h={};for(var f in s)if(s.hasOwnProperty(f)){var m=d(s[f],u);h[f]={pattern:n(m.source),names:m[t].captureNames||[]}}var g,y=d(o,u),v=0,b=0,w=[0],_=y[t].captureNames||[],x=y.source.replace(i,(function(e,t,i,n,o){var s,a,d,c=t||i;if(c){var u;if(!h.hasOwnProperty(c))throw new ReferenceError("Undefined property ".concat(e));t?(s=_[b],w[++b]=++v,a="(?<".concat(s||c,">")):a="(?:",g=v;var p=h[c].pattern.replace(r,(function(e,t,r){if(t){if(s=h[c].names[v-g],++v,s)return"(?<".concat(s,">")}else if(r)return d=+r-1,h[c].names[d]?"\\k<".concat(h[c].names[d],">"):"\\".concat(+r+g);return e}));return(0,l.default)(u="".concat(a)).call(u,p,")")}if(n){if(s=_[b],w[++b]=++v,s)return"(?<".concat(s,">")}else if(o)return _[d=+o-1]?"\\k<".concat(_[d],">"):"\\".concat(w[+o]);return e}));return e(x,c)}},e.exports=t.default},87409:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(64007)),s=n(r(11393)),a=n(r(18979));t.default=function(e){function t(e,t,r,i){return{name:e,value:t,start:r,end:i}}e.matchRecursive=function(r,i,n,l,d){l=l||"",d=d||{};var c,u=-1!==(0,o.default)(l).call(l,"g"),p=-1!==(0,o.default)(l).call(l,"y"),h=l.replace(/y/g,"");i=e(i,h),n=e(n,h);var f=d.escapeChar;if(f){var m,g;if(f.length>1)throw new Error("Cannot use more than one escape character");f=e.escape(f),c=new RegExp((0,s.default)(m=(0,s.default)(g="(?:".concat(f,"[\\S\\s]|(?:(?!")).call(g,e.union([i,n],"",{conjunction:"or"}).source,")[^")).call(m,f,"])+)+"),l.replace(e._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}for(var y,v,b,w,_=0,x=0,S=0,k=0,E=d.valueNames,T=[];;){if(f&&(S+=(e.exec(r,c,S,"sticky")||[""])[0].length),b=e.exec(r,i,S),w=e.exec(r,n,S),b&&w&&(b.index<=w.index?w=null:b=null),b||w)S=(x=(b||w).index)+(b||w)[0].length;else if(!_)break;if(p&&!_&&x>k)break;if(b)_||(y=x,v=S),_+=1;else if(w&&_){if(!(_-=1)&&(E?(E[0]&&y>k&&T.push(t(E[0],(0,a.default)(r).call(r,k,y),k,y)),E[1]&&T.push(t(E[1],(0,a.default)(r).call(r,y,v),y,v)),E[2]&&T.push(t(E[2],(0,a.default)(r).call(r,v,x),v,x)),E[3]&&T.push(t(E[3],(0,a.default)(r).call(r,x,S),x,S))):T.push((0,a.default)(r).call(r,v,x)),k=S,!u))break}else{var B=d.unbalanced||"error";if("skip"!==B&&"skip-lazy"!==B){if("error"===B){var C,I=w?"right":"left",A=w?x:y;throw new Error((0,s.default)(C="Unbalanced ".concat(I," delimiter found in string at position ")).call(C,A))}throw new Error("Unsupported value for unbalanced: ".concat(B))}if(w)w=null;else{if("skip"===B)S=y+(e.exec(r,i,y,"sticky")[0].length||1);else S=y+1;_=0}}x===S&&(S+=1)}return u&&T.length>0&&!p&&E&&E[0]&&r.length>k&&T.push(t(E[0],(0,a.default)(r).call(r,k),k,r.length)),T}},e.exports=t.default},77801:(e,t,r)=>{"use strict";var i=r(18979),n=r(49763),o=r(16781),s=r(62222),a=r(66615),l=r(53930),d=r(5946);l(t,"__esModule",{value:!0}),t.default=void 0;var c=d(r(34875)),u=d(r(86226)),p=d(r(11393)),h=d(r(64007));function f(e,t){var r=void 0!==o&&s(e)||e["@@iterator"];if(!r){if(a(e)||(r=function(e,t){var r;if(!e)return;if("string"==typeof e)return m(e,t);var o=i(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return n(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var l=0,d=function(){};return{s:d,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){p=!0,c=e},f:function(){try{u||null==r.return||r.return()}finally{if(p)throw c}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}
|
||
/*!
|
||
* XRegExp Unicode Base 5.1.1
|
||
* <xregexp.com>
|
||
* Steven Levithan (c) 2008-present MIT License
|
||
*/t.default=function(e){var t={},r={},i=e._dec,n=e._hex,o=e._pad4;function s(e){return e.replace(/[- _]+/g,"").toLowerCase()}function a(e){var t=/^\\[xu](.+)/.exec(e);return t?i(t[1]):e.charCodeAt("\\"===e[0]?1:0)}function l(r){var i,s,l;return t[r]["b!"]||(t[r]["b!"]=(i=t[r].bmp,s="",l=-1,(0,u.default)(e).call(e,i,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(e){var t=a(e[1]);t>l+1&&(s+="\\u".concat(o(n(l+1))),t>l+2&&(s+="-\\u".concat(o(n(t-1))))),l=a(e[2]||e[1])})),l<65535&&(s+="\\u".concat(o(n(l+1))),l<65534&&(s+="-\\uFFFF")),s))}function d(e,r){var i=r?"a!":"a=";return t[e][i]||(t[e][i]=function(e,r){var i,n,o=t[e],s="";return o.bmp&&!o.isBmpLast&&(s=(0,p.default)(i="[".concat(o.bmp,"]")).call(i,o.astral?"|":"")),o.astral&&(s+=o.astral),o.isBmpLast&&o.bmp&&(s+=(0,p.default)(n="".concat(o.astral?"|":"","[")).call(n,o.bmp,"]")),r?"(?:(?!".concat(s,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-]))"):"(?:".concat(s,")")}(e,r))}e.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(function(e,i,n){var o="Unknown Unicode token ",a=(0,c.default)(e,6),u=a[0],f=a[1],m=a[2],g=a[3],y=a[4],v=a[5],b="P"===f||!!m,w=-1!==(0,h.default)(n).call(n,"A"),_=s(v||y),x=t[_];if("P"===f&&m)throw new SyntaxError("Invalid double negation "+u);if(!t.hasOwnProperty(_))throw new SyntaxError(o+u);if(g&&(!r[g]||!r[g][_]))throw new SyntaxError(o+u);if(x.inverseOf){var S;if(_=s(x.inverseOf),!t.hasOwnProperty(_))throw new ReferenceError((0,p.default)(S="".concat("Unicode token missing data "+u," -> ")).call(S,x.inverseOf));x=t[_],b=!b}if(!x.bmp&&!w)throw new SyntaxError("Astral mode required for Unicode token "+u);if(w){if("class"===i)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return d(_,b)}return"class"===i?b?l(_):x.bmp:"".concat((b?"[^":"[")+x.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(i,n){n&&(r[n]={});var o,a=f(i);try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!l.name)throw new Error("Unicode token requires name");if(!(l.inverseOf||l.bmp||l.astral))throw new Error("Unicode token has no character data "+l.name);var d=s(l.name);if(t[d]=l,n&&(r[n][d]=!0),l.alias){var c=s(l.alias);t[c]=l,n&&(r[n][c]=!0)}}}catch(e){a.e(e)}finally{a.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(e){var r=s(e);return t[r]}},e.exports=t.default},47884:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4311));
|
||
/*!
|
||
* XRegExp Unicode Categories 5.1.1
|
||
* <xregexp.com>
|
||
* Steven Levithan (c) 2010-present MIT License
|
||
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
||
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData(o.default)},e.exports=t.default},59749:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(88477));
|
||
/*!
|
||
* XRegExp Unicode Properties 5.1.1
|
||
* <xregexp.com>
|
||
* Steven Levithan (c) 2012-present MIT License
|
||
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
||
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var t=o.default;t.push({name:"Assigned",inverseOf:"Cn"}),e.addUnicodeData(t)},e.exports=t.default},50302:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(5142));
|
||
/*!
|
||
* XRegExp Unicode Scripts 5.1.1
|
||
* <xregexp.com>
|
||
* Steven Levithan (c) 2010-present MIT License
|
||
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
||
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");e.addUnicodeData(o.default,"Script")},e.exports=t.default},53050:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(56011)),s=n(r(26692)),a=n(r(87409)),l=n(r(77801)),d=n(r(47884)),c=n(r(59749)),u=n(r(50302));(0,s.default)(o.default),(0,a.default)(o.default),(0,l.default)(o.default),(0,d.default)(o.default),(0,c.default)(o.default),(0,u.default)(o.default);var p=o.default;t.default=p,e.exports=t.default},56011:(e,t,r)=>{"use strict";var i=r(18979),n=r(49763),o=r(16781),s=r(62222),a=r(66615),l=r(53930),d=r(5946);l(t,"__esModule",{value:!0}),t.default=void 0;var c=d(r(34875)),u=d(r(52730)),p=d(r(129)),h=d(r(18979)),f=d(r(36586)),m=d(r(64007)),g=d(r(86226)),y=d(r(27681)),v=d(r(11393));function b(e,t){var r=void 0!==o&&s(e)||e["@@iterator"];if(!r){if(a(e)||(r=function(e,t){var r;if(!e)return;if("string"==typeof e)return w(e,t);var o=i(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return n(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var l=0,d=function(){};return{s:d,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){p=!0,c=e},f:function(){try{u||null==r.return||r.return()}finally{if(p)throw c}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}
|
||
/*!
|
||
* XRegExp 5.1.1
|
||
* <xregexp.com>
|
||
* Steven Levithan (c) 2007-present MIT License
|
||
*/var _="xregexp",x={astral:!1,namespacing:!0},S={},k={},E={},T=[],B="default",C="class",I={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},A=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,F=void 0===/()??/.exec("")[1],M=void 0!==(0,u.default)(/x/);function D(e){var t=!0;try{if(new RegExp("",e),"y"===e){".."===".a".replace(new RegExp("a","gy"),".")&&(t=!1)}}catch(e){t=!1}return t}var R=D("d"),P=D("s"),O=D("u"),z=D("y"),N={d:R,g:!0,i:!0,m:!0,s:P,u:O,y:z},q=P?/[^dgimsuy]+/g:/[^dgimuy]+/g;function U(e,t,r,i,n){var o;if(e[_]={captureNames:t},n)return e;if(e.__proto__)e.__proto__=ee.prototype;else for(var s in ee.prototype)e[s]=ee.prototype[s];return e[_].source=r,e[_].flags=i?(0,p.default)(o=i.split("")).call(o).join(""):i,e}function L(e){return e.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function j(e,t){var r;if(!ee.isRegExp(e))throw new TypeError("Type RegExp expected");var i=e[_]||{},n=function(e){return M?(0,u.default)(e):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(e))[1]}(e),o="",s="",a=null,l=null;return(t=t||{}).removeG&&(s+="g"),t.removeY&&(s+="y"),s&&(n=n.replace(new RegExp("[".concat(s,"]+"),"g"),"")),t.addG&&(o+="g"),t.addY&&(o+="y"),o&&(n=L(n+o)),t.isInternalOnly||(void 0!==i.source&&(a=i.source),null!=(0,u.default)(i)&&(l=o?L((0,u.default)(i)+o):(0,u.default)(i))),e=U(new RegExp(t.source||e.source,n),function(e){return!(!e[_]||!e[_].captureNames)}(e)?(0,h.default)(r=i.captureNames).call(r,0):null,a,l,t.isInternalOnly)}function H(e){return(0,f.default)(e,16)}function $(e,t,r){var i=e.index+e[0].length,n=e.input[e.index-1],o=e.input[i];return/^[()|]$/.test(n)||/^[()|]$/.test(o)||0===e.index||i===e.input.length||/\(\?(?:[:=!]|<[=!])$/.test(e.input.substring(e.index-4,e.index))||function(e,t,r){var i=-1!==(0,m.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return i.test((0,h.default)(e).call(e,t))}(e.input,i,r)?"":"(?:)"}function G(e){return(0,f.default)(e,10).toString(16)}function W(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function K(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}function V(e){for(;e.length<4;)e="0".concat(e);return e}function J(e){var t={};return W(e,"String")?((0,g.default)(ee).call(ee,e,/[^\s,]+/,(function(e){t[e]=!0})),t):e}function Y(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");N[e]=!0}function Q(e,t,r,i,n){for(var o,s,a=T.length,l=e[r],d=null;a--;)if(!((s=T[a]).leadChar&&s.leadChar!==l||s.scope!==i&&"all"!==s.scope||s.flag&&-1===(0,m.default)(t).call(t,s.flag))&&(o=ee.exec(e,s.regex,r,"sticky"))){d={matchLength:o[0].length,output:s.handler.call(n,o,i,t),reparse:s.reparse};break}return d}function Z(e){x.astral=e}function X(e){x.namespacing=e}function ee(e,t){if(ee.isRegExp(e)){if(void 0!==t)throw new TypeError("Cannot supply flags when copying a RegExp");return j(e)}if(e=void 0===e?"":String(e),t=void 0===t?"":String(t),ee.isInstalled("astral")&&-1===(0,m.default)(t).call(t,"A")&&(t+="A"),E[e]||(E[e]={}),!E[e][t]){for(var r,i={hasNamedCapture:!1,captureNames:[]},n=B,o="",s=0,a=function(e,t){if(L(t)!==t)throw new SyntaxError("Invalid duplicate regex flag ".concat(t));e=e.replace(/^\(\?([\w$]+)\)/,(function(e,r){if(/[dgy]/.test(r))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(e));return t=L(t+r),""}));var r,i=b(t);try{for(i.s();!(r=i.n()).done;){var n=r.value;if(!N[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(e){i.e(e)}finally{i.f()}return{pattern:e,flags:t}}(e,t),l=a.pattern,d=(0,u.default)(a);s<l.length;){do{(r=Q(l,d,s,n,i))&&r.reparse&&(l=(0,h.default)(l).call(l,0,s)+r.output+(0,h.default)(l).call(l,s+r.matchLength))}while(r&&r.reparse);if(r)o+=r.output,s+=r.matchLength||1;else{var p=ee.exec(l,I[n],s,"sticky"),f=(0,c.default)(p,1)[0];o+=f,s+=f.length,"["===f&&n===B?n=C:"]"===f&&n===C&&(n=B)}}E[e][t]={pattern:o.replace(/(?:\(\?:\))+/g,"(?:)"),flags:d.replace(q,""),captures:i.hasNamedCapture?i.captureNames:null}}var g=E[e][t];return U(new RegExp(g.pattern,(0,u.default)(g)),g.captures,e,t)}ee.prototype=/(?:)/,ee.version="5.1.1",ee._clipDuplicates=L,ee._hasNativeFlag=D,ee._dec=H,ee._hex=G,ee._pad4=V,ee.addToken=function(e,t,r){var i=(r=r||{}).optionalFlags;if(r.flag&&Y(r.flag),i){var n,o=b(i=i.split(""));try{for(o.s();!(n=o.n()).done;){Y(n.value)}}catch(e){o.e(e)}finally{o.f()}}T.push({regex:j(e,{addG:!0,addY:z,isInternalOnly:!0}),handler:t,scope:r.scope||B,flag:r.flag,reparse:r.reparse,leadChar:r.leadChar}),ee.cache.flush("patterns")},ee.cache=function(e,t){return k[e]||(k[e]={}),k[e][t]||(k[e][t]=ee(e,t))},ee.cache.flush=function(e){"patterns"===e?E={}:k={}},ee.escape=function(e){return String(K(e)).replace(/[\\\[\]{}()*+?.^$|]/g,"\\$&").replace(/[\s#\-,]/g,(function(e){return"\\u".concat(V(G(e.charCodeAt(0))))}))},ee.exec=function(e,t,r,i){var n,o,s="g",a=!1;(n=z&&!!(i||t.sticky&&!1!==i))?s+="y":i&&(a=!0,s+="FakeY"),t[_]=t[_]||{};var l=t[_][s]||(t[_][s]=j(t,{addG:!0,addY:n,source:a?"".concat(t.source,"|()"):void 0,removeY:!1===i,isInternalOnly:!0}));return r=r||0,l.lastIndex=r,o=S.exec.call(l,e),a&&o&&""===o.pop()&&(o=null),t.global&&(t.lastIndex=o?l.lastIndex:0),o},ee.forEach=function(e,t,r){for(var i,n=0,o=-1;i=ee.exec(e,t,n);)r(i,++o,e,t),n=i.index+(i[0].length||1)},ee.globalize=function(e){return j(e,{addG:!0})},ee.install=function(e){e=J(e),!x.astral&&e.astral&&Z(!0),!x.namespacing&&e.namespacing&&X(!0)},ee.isInstalled=function(e){return!!x[e]},ee.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},ee.match=function(e,t,r){var i=t.global&&"one"!==r||"all"===r,n=(i?"g":"")+(t.sticky?"y":"")||"noGY";t[_]=t[_]||{};var o=t[_][n]||(t[_][n]=j(t,{addG:!!i,removeG:"one"===r,isInternalOnly:!0})),s=String(K(e)).match(o);return t.global&&(t.lastIndex="one"===r&&s?s.index+s[0].length:0),i?s||[]:s&&s[0]},ee.matchChain=function(e,t){return function e(r,i){var n=t[i].regex?t[i]:{regex:t[i]},o=[];function s(e){if(n.backref){var t="Backreference to undefined group: ".concat(n.backref),r=isNaN(n.backref);if(r&&ee.isInstalled("namespacing")){if(!e.groups||!(n.backref in e.groups))throw new ReferenceError(t)}else if(!e.hasOwnProperty(n.backref))throw new ReferenceError(t);var i=r&&ee.isInstalled("namespacing")?e.groups[n.backref]:e[n.backref];o.push(i||"")}else o.push(e[0])}var a,l=b(r);try{for(l.s();!(a=l.n()).done;){var d=a.value;(0,g.default)(ee).call(ee,d,n.regex,s)}}catch(e){l.e(e)}finally{l.f()}return i!==t.length-1&&o.length?e(o,i+1):o}([e],0)},ee.replace=function(e,t,r,i){var n=ee.isRegExp(t),o=t.global&&"one"!==i||"all"===i,s=(o?"g":"")+(t.sticky?"y":"")||"noGY",a=t;n?(t[_]=t[_]||{},a=t[_][s]||(t[_][s]=j(t,{addG:!!o,removeG:"one"===i,isInternalOnly:!0}))):o&&(a=new RegExp(ee.escape(String(t)),"g"));var l=S.replace.call(K(e),a,r);return n&&t.global&&(t.lastIndex=0),l},ee.replaceEach=function(e,t){var r,i=b(t);try{for(i.s();!(r=i.n()).done;){var n=r.value;e=ee.replace(e,n[0],n[1],n[2])}}catch(e){i.e(e)}finally{i.f()}return e},ee.split=function(e,t,r){return S.split.call(K(e),t,r)},ee.test=function(e,t,r,i){return!!ee.exec(e,t,r,i)},ee.uninstall=function(e){e=J(e),x.astral&&e.astral&&Z(!1),x.namespacing&&e.namespacing&&X(!1)},ee.union=function(e,t,r){var i,n,o=(r=r||{}).conjunction||"or",s=0;function a(e,t,r){var o=n[s-i];if(t){if(++s,o)return"(?<".concat(o,">")}else if(r)return"\\".concat(+r+i);return e}if(!W(e,"Array")||!e.length)throw new TypeError("Must provide a nonempty array of patterns to merge");var l,d=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,c=[],u=b(e);try{for(u.s();!(l=u.n()).done;){var p=l.value;ee.isRegExp(p)?(i=s,n=p[_]&&p[_].captureNames||[],c.push(ee(p.source).source.replace(d,a))):c.push(ee.escape(p))}}catch(e){u.e(e)}finally{u.f()}var h="none"===o?"":"|";return ee(c.join(h),t)},S.exec=function(e){var t=this.lastIndex,r=RegExp.prototype.exec.apply(this,arguments);if(r){if(!F&&r.length>1&&-1!==(0,m.default)(r).call(r,"")){var i,n=j(this,{removeG:!0,isInternalOnly:!0});(0,h.default)(i=String(e)).call(i,r.index).replace(n,(function(){for(var e=arguments.length,t=1;t<e-2;++t)void 0===(t<0||arguments.length<=t?void 0:arguments[t])&&(r[t]=void 0)}))}if(this[_]&&this[_].captureNames){var o=r;ee.isInstalled("namespacing")&&(r.groups=(0,y.default)(null),o=r.groups);for(var s=1;s<r.length;++s){var a=this[_].captureNames[s-1];a&&(o[a]=r[s])}}else!r.groups&&ee.isInstalled("namespacing")&&(r.groups=void 0);this.global&&!r[0].length&&this.lastIndex>r.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=t),r},S.test=function(e){return!!S.exec.call(this,e)},S.match=function(e){if(ee.isRegExp(e)){if(e.global){var t=String.prototype.match.apply(this,arguments);return e.lastIndex=0,t}}else e=new RegExp(e);return S.exec.call(e,K(this))},S.replace=function(e,t){var r,i,n,o=ee.isRegExp(e);return o?(e[_]&&(i=e[_].captureNames),r=e.lastIndex):e+="",n=W(t,"Function")?String(this).replace(e,(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(i){var o;ee.isInstalled("namespacing")?(o=(0,y.default)(null),r.push(o)):(r[0]=new String(r[0]),o=r[0]);for(var s=0;s<i.length;++s)i[s]&&(o[i[s]]=r[s+1])}return t.apply(void 0,r)})):String(K(this)).replace(e,(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return String(t).replace(A,(function(e,t,n,o){t=t||n;var s,a,l=W(r[r.length-1],"Object")?4:3,d=r.length-l;if(t){if(/^\d+$/.test(t)){var c=+t;if(c<=d)return r[c]||""}var u=i?(0,m.default)(i).call(i,t):-1;if(u<0)throw new SyntaxError("Backreference to undefined group ".concat(e));return r[u+1]||""}if(""===o||" "===o)throw new SyntaxError("Invalid token ".concat(e));if("&"===o||0==+o)return r[0];if("$"===o)return"$";if("`"===o)return(0,h.default)(s=r[r.length-1]).call(s,0,r[r.length-2]);if("'"===o)return(0,h.default)(a=r[r.length-1]).call(a,r[r.length-2]+r[0].length);if(o=+o,!isNaN(o)){if(o>d)throw new SyntaxError("Backreference to undefined group ".concat(e));return r[o]||""}throw new SyntaxError("Invalid token ".concat(e))}))})),o&&(e.global?e.lastIndex=0:e.lastIndex=r),n},S.split=function(e,t){if(!ee.isRegExp(e))return String.prototype.split.apply(this,arguments);var r,i=String(this),n=[],o=e.lastIndex,s=0;return t=(void 0===t?-1:t)>>>0,(0,g.default)(ee).call(ee,i,e,(function(e){e.index+e[0].length>s&&(n.push((0,h.default)(i).call(i,s,e.index)),e.length>1&&e.index<i.length&&Array.prototype.push.apply(n,(0,h.default)(e).call(e,1)),r=e[0].length,s=e.index+r)})),s===i.length?e.test("")&&!r||n.push(""):n.push((0,h.default)(i).call(i,s)),e.lastIndex=o,n.length>t?(0,h.default)(n).call(n,0,t):n},ee.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(e,t){if("B"===e[1]&&t===B)return e[0];throw new SyntaxError("Invalid escape ".concat(e[0]))}),{scope:"all",leadChar:"\\"}),ee.addToken(/\\u{([\dA-Fa-f]+)}/,(function(e,t,r){var i=H(e[1]);if(i>1114111)throw new SyntaxError("Invalid Unicode code point ".concat(e[0]));if(i<=65535)return"\\u".concat(V(G(i)));if(O&&-1!==(0,m.default)(r).call(r,"u"))return e[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),ee.addToken(/\(\?#[^)]*\)/,$,{leadChar:"("}),ee.addToken(/\s+|#[^\n]*\n?/,$,{flag:"x"}),P||ee.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),ee.addToken(/\\k<([^>]+)>/,(function(e){var t,r,i=isNaN(e[1])?(0,m.default)(t=this.captureNames).call(t,e[1])+1:+e[1],n=e.index+e[0].length;if(!i||i>this.captureNames.length)throw new SyntaxError("Backreference to undefined group ".concat(e[0]));return(0,v.default)(r="\\".concat(i)).call(r,n===e.input.length||isNaN(e.input[n])?"":"(?:)")}),{leadChar:"\\"}),ee.addToken(/\\(\d+)/,(function(e,t){if(!(t===B&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(e[0]));return e[0]}),{scope:"all",leadChar:"\\"}),ee.addToken(/\(\?P?<((?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])*)>/,(function(e){var t;if(!ee.isInstalled("namespacing")&&("length"===e[1]||"__proto__"===e[1]))throw new SyntaxError("Cannot use reserved word as capture name ".concat(e[0]));if(-1!==(0,m.default)(t=this.captureNames).call(t,e[1]))throw new SyntaxError("Cannot use same name for multiple groups ".concat(e[0]));return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),ee.addToken(/\((?!\?)/,(function(e,t,r){return-1!==(0,m.default)(r).call(r,"n")?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var te=ee;t.default=te,e.exports=t.default},4311:e=>{e.exports=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0-------------------------------------ೳ---------໎------------------------------------------------------------------------------------------",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcbd\udcc3-\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udbff][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca0-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\udd73-\udd7a\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00-\udcff\uddf0-\udfff]"},{name:"Cc",alias:"Control",bmp:"\0--"},{name:"Cf",alias:"Format",bmp:"-----\ufeff-",astral:"\ud804[\udcbd\udccd]|\ud80d[\udc30-\udc38]|\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|\udb40[\udc01\udc20-\udc7f]"},{name:"Cn",alias:"Unassigned",bmp:"-----------------------------------ೳ---------໎--------------------------------------------------------------------------------------",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcc3-\udccc\udcce\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udb7f][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f\udc39-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca4-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00\udc02-\udc1f\udc80-\udcff\uddf0-\udfff]|[\udbbf\udbff][\udffe\udfff]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\udb80-\udbbe\udbc0-\udbfe][\udc00-\udfff]|[\udbbf\udbff][\udc00-\udffd]"},{name:"Cs",alias:"Surrogate",bmp:"\ud800-\udfff"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf50\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\ud801[\udc00-\udc4f\udcb0-\udcd3\udcd8-\udcfb\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udc80-\udcb2\udcc0-\udcf2]|\ud806[\udca0-\udcdf]|\ud81b[\ude40-\ude7f]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd00-\udd43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud81a[\udf40-\udf43]|\ud81b[\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud838[\udd37-\udd3d]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc50-\udc9d\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf4a\udf50]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|𝼊|\ud838[\udd00-\udd2c\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc00-\udc02\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc82\udcb0-\udcba\udcc2\udd00-\udd02\udd27-\udd34\udd45\udd46\udd73\udd80-\udd82\uddb3-\uddc0\uddc9-\uddcc\uddce\uddcf\ude2c-\ude37\ude3e\udedf-\udeea\udf00-\udf03\udf3b\udf3c\udf3e-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63\udf66-\udf6c\udf70-\udf74]|\ud805[\udc35-\udc46\udc5e\udcb0-\udcc3\uddaf-\uddb5\uddb8-\uddc0\udddc\udddd\ude30-\ude40\udeab-\udeb7\udf1d-\udf2b]|\ud806[\udc2c-\udc3a\udd30-\udd35\udd37\udd38\udd3b-\udd3e\udd40\udd42\udd43\uddd1-\uddd7\uddda-\udde0\udde4\ude01-\ude0a\ude33-\ude39\ude3b-\ude3e\ude47\ude51-\ude5b\ude8a-\ude99]|\ud807[\udc2f-\udc36\udc38-\udc3f\udc92-\udca7\udca9-\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd8a-\udd8e\udd90\udd91\udd93-\udd97\udef3-\udef6]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf51-\udf87\udf8f-\udf92\udfe4\udff0\udff1]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd65-\udd69\udd6d-\udd72\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\ud804[\udc00\udc02\udc82\udcb0-\udcb2\udcb7\udcb8\udd2c\udd45\udd46\udd82\uddb3-\uddb5\uddbf\uddc0\uddce\ude2c-\ude2e\ude32\ude33\ude35\udee0-\udee2\udf02\udf03\udf3e\udf3f\udf41-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63]|\ud805[\udc35-\udc37\udc40\udc41\udc45\udcb0-\udcb2\udcb9\udcbb-\udcbe\udcc1\uddaf-\uddb1\uddb8-\uddbb\uddbe\ude30-\ude32\ude3b\ude3c\ude3e\udeac\udeae\udeaf\udeb6\udf20\udf21\udf26]|\ud806[\udc2c-\udc2e\udc38\udd30-\udd35\udd37\udd38\udd3d\udd40\udd42\uddd1-\uddd3\udddc-\udddf\udde4\ude39\ude57\ude58\ude97]|\ud807[\udc2f\udc3e\udca9\udcb1\udcb4\udd8a-\udd8e\udd93\udd94\udd96\udef5\udef6]|\ud81b[\udf51-\udf87\udff0\udff1]|\ud834[\udd65\udd66\udd6d-\udd72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc01\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc81\udcb3-\udcb6\udcb9\udcba\udcc2\udd00-\udd02\udd27-\udd2b\udd2d-\udd34\udd73\udd80\udd81\uddb6-\uddbe\uddc9-\uddcc\uddcf\ude2f-\ude31\ude34\ude36\ude37\ude3e\udedf\udee3-\udeea\udf00\udf01\udf3b\udf3c\udf40\udf66-\udf6c\udf70-\udf74]|\ud805[\udc38-\udc3f\udc42-\udc44\udc46\udc5e\udcb3-\udcb8\udcba\udcbf\udcc0\udcc2\udcc3\uddb2-\uddb5\uddbc\uddbd\uddbf\uddc0\udddc\udddd\ude33-\ude3a\ude3d\ude3f\ude40\udeab\udead\udeb0-\udeb5\udeb7\udf1d-\udf1f\udf22-\udf25\udf27-\udf2b]|\ud806[\udc2f-\udc37\udc39\udc3a\udd3b\udd3c\udd3e\udd43\uddd4-\uddd7\uddda\udddb\udde0\ude01-\ude0a\ude33-\ude38\ude3b-\ude3e\ude47\ude51-\ude56\ude59-\ude5b\ude8a-\ude96\ude98\ude99]|\ud807[\udc30-\udc36\udc38-\udc3d\udc3f\udc92-\udca7\udcaa-\udcb0\udcb2\udcb3\udcb5\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd90\udd91\udd95\udd97\udef3\udef4]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf8f-\udf92\udfe4]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud800[\udd07-\udd33\udd40-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23\udf41\udf4a\udfd1-\udfd5]|\ud801[\udca0-\udca9]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\udd30-\udd39\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udde1-\uddf4\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf3b]|\ud806[\udce0-\udcf2\udd50-\udd59]|\ud807[\udc50-\udc6c\udd50-\udd59\udda0-\udda9\udfc0-\udfd4]|\ud809[\udc00-\udc6e]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udcc7-\udccf\udd50-\udd59]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]|\ud83e[\udff0-\udff9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud801[\udca0-\udca9]|\ud803[\udd30-\udd39]|\ud804[\udc66-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf39]|\ud806[\udce0-\udce9\udd50-\udd59]|\ud807[\udc50-\udc59\udd50-\udd59\udda0-\udda9]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udd50-\udd59]|\ud83e[\udff0-\udff9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\ud800[\udd40-\udd74\udf41\udf4a\udfd1-\udfd5]|\ud809[\udc00-\udc6e]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\ud800[\udd07-\udd33\udd75-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc65\udde1-\uddf4]|\ud805[\udf3a\udf3b]|\ud806[\udcea-\udcf2]|\ud807[\udc5a-\udc6c\udfc0-\udfd4]|\ud81a[\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud83a[\udcc7-\udccf]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udead\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○<EFBFAE>",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud838[\udd4f\udeff]|\ud83b[\udcac\udcb0\udd2e\udef0\udef1]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\ud807[\udfdd-\udfe0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\ud83c[\udffb-\udfff]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud83b[\udef0\udef1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○<EFBFAE>",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udfdc\udfe1-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|𞅏|\ud83b[\udcac\udd2e]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udffa]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Z",alias:"Separator",bmp:" - \u2028\u2029 "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:" - "}]},88477:e=>{e.exports=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd40-\udd74\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf4a\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd27\ude80-\udea9\udeab\udeac\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc00-\udc45\udc71-\udc75\udc82-\udcb8\udcc2\udcd0-\udce8\udd00-\udd32\udd44-\udd47\udd50-\udd72\udd76\udd80-\uddbf\uddc1-\uddc4\uddce\uddcf\uddda\udddc\ude00-\ude11\ude13-\ude34\ude37\ude3e\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udee8\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d-\udf44\udf47\udf48\udf4b\udf4c\udf50\udf57\udf5d-\udf63]|\ud805[\udc00-\udc41\udc43-\udc45\udc47-\udc4a\udc5f-\udc61\udc80-\udcc1\udcc4\udcc5\udcc7\udd80-\uddb5\uddb8-\uddbe\uddd8-\udddd\ude00-\ude3e\ude40\ude44\ude80-\udeb5\udeb8\udf00-\udf1a\udf1d-\udf2a\udf40-\udf46]|\ud806[\udc00-\udc38\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b\udd3c\udd3f-\udd42\udda0-\udda7\uddaa-\uddd7\uddda-\udddf\udde1\udde3\udde4\ude00-\ude32\ude35-\ude3e\ude50-\ude97\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc3e\udc40\udc72-\udc8f\udc92-\udca7\udca9-\udcb6\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd41\udd43\udd46\udd47\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd96\udd98\udee0-\udef6\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f\udfe0\udfe1\udfe3\udff0\udff1]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9e]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd47\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Any",isBmpLast:!0,bmp:"\0-",astral:"[\ud800-\udbff][\udc00-\udfff]"},{name:"Default_Ignorable_Code_Point",bmp:"͏ᅟᅠ឴឵᠋-᠏---ㅤ︀-️\ufeffᅠ-",astral:"\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\udf80\udf83-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Noncharacter_Code_Point",bmp:"-",astral:"[\ud83f\ud87f\ud8bf\ud8ff\ud93f\ud97f\ud9bf\ud9ff\uda3f\uda7f\udabf\udaff\udb3f\udb7f\udbbf\udbff][\udffe\udfff]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]"},{name:"White_Space",bmp:"\t-\r
- \u2028\u2029 "}]},5142:e=>{e.exports=[{name:"Adlam",astral:"\ud83a[\udd00-\udd4b\udd50-\udd59\udd5e\udd5f]"},{name:"Ahom",astral:"\ud805[\udf00-\udf1a\udf1d-\udf2b\udf30-\udf46]"},{name:"Anatolian_Hieroglyphs",astral:"\ud811[\udc00-\ude46]"},{name:"Arabic",bmp:"-؆-؋؍-ؚ-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\ud803[\ude60-\ude7e]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb\udef0\udef1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\ud802[\udf00-\udf35\udf39-\udf3f]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\ud81a[\udc00-\ude38]"},{name:"Bassa_Vah",astral:"\ud81a[\uded0-\udeed\udef0-\udef5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc45\udc50-\udc6c]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\ud804[\udc00-\udc4d\udc52-\udc75\udc7f]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\ud806[\udeb0-\udebf]"},{name:"Carian",astral:"\ud800[\udea0-\uded0]"},{name:"Caucasian_Albanian",astral:"\ud801[\udd30-\udd63\udd6f]"},{name:"Chakma",astral:"\ud804[\udd00-\udd34\udd36-\udd47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\ud803[\udfb0-\udfcb]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·،؛؟ـ।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ ---⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\ufeff!-@[-`{-・ー゙゚¢-₩│-○-<2D>",astral:"\ud800[\udd00-\udd02\udd07-\udd33\udd37-\udd3f\udd90-\udd9c\uddd0-\uddfc\udee1-\udefb]|\ud82f[\udca0-\udca3]|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd66\udd6a-\udd7a\udd83\udd84\udd8c-\udda9\uddae-\uddea\udee0-\udef3\udf00-\udf56\udf60-\udf78]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud83b[\udc71-\udcb4\udd01-\udd3d]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd00-\uddad\udde6-\uddff\ude01\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca\udff0-\udff9]|\udb40[\udc01\udc20-\udc7f]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc70-\udc74\udc80-\udd43]"},{name:"Cypriot",astral:"\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f]"},{name:"Cypro_Minoan",astral:"\ud80b[\udf90-\udff2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\ud801[\udc00-\udc4f]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\ud806[\udd00-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b-\udd46\udd50-\udd59]"},{name:"Dogra",astral:"\ud806[\udc00-\udc3b]"},{name:"Duployan",astral:"\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9c-\udc9f]"},{name:"Egyptian_Hieroglyphs",astral:"\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e\udc30-\udc38]"},{name:"Elbasan",astral:"\ud801[\udd00-\udd27]"},{name:"Elymaic",astral:"\ud803[\udfe0-\udff6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]"},{name:"Gothic",astral:"\ud800[\udf30-\udf4a]"},{name:"Grantha",astral:"\ud804[\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf50\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\ud800[\udd40-\udd8e\udda0]|\ud834[\ude00-\ude45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\ud807[\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd98\udda0-\udda9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\ud81b[\udfe2\udfe3\udff0\udff1]|[\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\ud803[\udd00-\udd27\udd30-\udd39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\ud802[\udce0-\udcf2\udcf4\udcf5\udcfb-\udcff]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\ud82c[\udc01-\udd1f\udd50-\udd52]|🈀"},{name:"Imperial_Aramaic",astral:"\ud802[\udc40-\udc55\udc57-\udc5f]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\ud800[\uddfd\udee0]|𑌻|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad]|\udb40[\udd00-\uddef]"},{name:"Inscriptional_Pahlavi",astral:"\ud802[\udf60-\udf72\udf78-\udf7f]"},{name:"Inscriptional_Parthian",astral:"\ud802[\udf40-\udf55\udf58-\udf5f]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\ud804[\udc80-\udcc2\udccd]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00\udd20-\udd22\udd64-\udd67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\ud802[\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude38-\ude3a\ude3f-\ude48\ude50-\ude58]"},{name:"Khitan_Small_Script",astral:"𖿤|\ud822[\udf00-\udfff]|\ud823[\udc00-\udcd5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\ud804[\ude00-\ude11\ude13-\ude3e]"},{name:"Khudawadi",astral:"\ud804[\udeb0-\udeea\udef0-\udef9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud837[\udf00-\udf1e]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\ud801[\ude00-\udf36\udf40-\udf55\udf60-\udf67]"},{name:"Linear_B",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\ud800[\ude80-\ude9c]"},{name:"Lydian",astral:"\ud802[\udd20-\udd39\udd3f]"},{name:"Mahajani",astral:"\ud804[\udd50-\udd76]"},{name:"Makasar",astral:"\ud807[\udee0-\udef8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\ud802[\udec0-\udee6\udeeb-\udef6]"},{name:"Marchen",astral:"\ud807[\udc70-\udc8f\udc92-\udca7\udca9-\udcb6]"},{name:"Masaram_Gondi",astral:"\ud807[\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd47\udd50-\udd59]"},{name:"Medefaidrin",astral:"\ud81b[\ude40-\ude9a]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\ud83a[\udc00-\udcc4\udcc7-\udcd6]"},{name:"Meroitic_Cursive",astral:"\ud802[\udda0-\uddb7\uddbc-\uddcf\uddd2-\uddff]"},{name:"Meroitic_Hieroglyphs",astral:"\ud802[\udd80-\udd9f]"},{name:"Miao",astral:"\ud81b[\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f]"},{name:"Modi",astral:"\ud805[\ude00-\ude44\ude50-\ude59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\ud805[\ude60-\ude6c]"},{name:"Mro",astral:"\ud81a[\ude40-\ude5e\ude60-\ude69\ude6e\ude6f]"},{name:"Multani",astral:"\ud804[\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\ud802[\udc80-\udc9e\udca7-\udcaf]"},{name:"Nandinagari",astral:"\ud806[\udda0-\udda7\uddaa-\uddd7\uddda-\udde4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\ud805[\udc00-\udc5b\udc5d-\udc61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\ud82c[\udd70-\udefb]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\ud838[\udd00-\udd2c\udd30-\udd3d\udd40-\udd49\udd4e\udd4f]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\ud803[\udc80-\udcb2\udcc0-\udcf2\udcfa-\udcff]"},{name:"Old_Italic",astral:"\ud800[\udf00-\udf23\udf2d-\udf2f]"},{name:"Old_North_Arabian",astral:"\ud802[\ude80-\ude9f]"},{name:"Old_Permic",astral:"\ud800[\udf50-\udf7a]"},{name:"Old_Persian",astral:"\ud800[\udfa0-\udfc3\udfc8-\udfd5]"},{name:"Old_Sogdian",astral:"\ud803[\udf00-\udf27]"},{name:"Old_South_Arabian",astral:"\ud802[\ude60-\ude7f]"},{name:"Old_Turkic",astral:"\ud803[\udc00-\udc48]"},{name:"Old_Uyghur",astral:"\ud803[\udf70-\udf89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\ud801[\udcb0-\udcd3\udcd8-\udcfb]"},{name:"Osmanya",astral:"\ud801[\udc80-\udc9d\udca0-\udca9]"},{name:"Pahawh_Hmong",astral:"\ud81a[\udf00-\udf45\udf50-\udf59\udf5b-\udf61\udf63-\udf77\udf7d-\udf8f]"},{name:"Palmyrene",astral:"\ud802[\udc60-\udc7f]"},{name:"Pau_Cin_Hau",astral:"\ud806[\udec0-\udef8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\ud802[\udd00-\udd1b\udd1f]"},{name:"Psalter_Pahlavi",astral:"\ud802[\udf80-\udf91\udf99-\udf9c\udfa9-\udfaf]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\ud804[\udd80-\udddf]"},{name:"Shavian",astral:"\ud801[\udc50-\udc7f]"},{name:"Siddham",astral:"\ud805[\udd80-\uddb5\uddb8-\udddd]"},{name:"SignWriting",astral:"\ud836[\udc00-\ude8b\ude9b-\ude9f\udea1-\udeaf]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\ud804[\udde1-\uddf4]"},{name:"Sogdian",astral:"\ud803[\udf30-\udf59]"},{name:"Sora_Sompeng",astral:"\ud804[\udcd0-\udce8\udcf0-\udcf9]"},{name:"Soyombo",astral:"\ud806[\ude50-\udea2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\ud805[\ude80-\udeb9\udec0-\udec9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\ud807[\udfc0-\udff1\udfff]"},{name:"Tangsa",astral:"\ud81a[\ude70-\udebe\udec0-\udec9]"},{name:"Tangut",astral:"𖿠|[\ud81c-\ud820][\udc00-\udfff]|\ud821[\udc00-\udff7]|\ud822[\udc00-\udeff]|\ud823[\udd00-\udd08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\ud805[\udc80-\udcc7\udcd0-\udcd9]"},{name:"Toto",astral:"\ud838[\ude90-\udeae]"},{name:"Ugaritic",astral:"\ud800[\udf80-\udf9d\udf9f]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\ud801[\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]"},{name:"Wancho",astral:"\ud838[\udec0-\udef9\udeff]"},{name:"Warang_Citi",astral:"\ud806[\udca0-\udcf2\udcff]"},{name:"Yezidi",astral:"\ud803[\ude80-\udea9\udeab-\udead\udeb0\udeb1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\ud806[\ude00-\ude47]"}]},23313:()=>{},35265:()=>{},70440:()=>{},18950:()=>{},78982:()=>{},47790:()=>{},73776:()=>{},77965:()=>{},66089:()=>{},79368:()=>{},64688:()=>{},42634:()=>{},51069:()=>{},15340:()=>{},79838:()=>{},63779:()=>{},99580:()=>{},49763:(e,t,r)=>{e.exports=r(86450)},66615:(e,t,r)=>{e.exports=r(18402)},11393:(e,t,r)=>{e.exports=r(50530)},52730:(e,t,r)=>{e.exports=r(64055)},86226:(e,t,r)=>{e.exports=r(24525)},64007:(e,t,r)=>{e.exports=r(77852)},48079:(e,t,r)=>{e.exports=r(98894)},73363:(e,t,r)=>{e.exports=r(79528)},18979:(e,t,r)=>{e.exports=r(6686)},129:(e,t,r)=>{e.exports=r(81086)},27681:(e,t,r)=>{e.exports=r(93658)},53930:(e,t,r)=>{e.exports=r(68251)},36586:(e,t,r)=>{e.exports=r(91921)},16781:(e,t,r)=>{e.exports=r(24139)},62222:(e,t,r)=>{e.exports=r(81519)},31607:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i},e.exports.__esModule=!0,e.exports.default=e.exports},31251:(e,t,r)=>{var i=r(22382);e.exports=function(e){if(i(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},5946:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},94172:(e,t,r)=>{var i=r(93071),n=r(81519),o=r(1958);e.exports=function(e,t){var r=null==e?null:void 0!==i&&n(e)||e["@@iterator"];if(null!=r){var s,a,l,d,c=[],u=!0,p=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(s=l.call(r)).done)&&(o(c).call(c,s.value),c.length!==t);u=!0);}catch(e){p=!0,a=e}finally{try{if(!u&&null!=r.return&&(d=r.return(),Object(d)!==d))return}finally{if(p)throw a}}return c}},e.exports.__esModule=!0,e.exports.default=e.exports},85344:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},34875:(e,t,r)=>{var i=r(31251),n=r(94172),o=r(90426),s=r(85344);e.exports=function(e,t){return i(e)||n(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},90426:(e,t,r)=>{var i=r(55186),n=r(62014),o=r(31607);e.exports=function(e,t){if(e){var r;if("string"==typeof e)return o(e,t);var s=i(r={}.toString.call(e)).call(r,8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?n(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},70079:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i},e.exports.__esModule=!0,e.exports.default=e.exports},92987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},43693:(e,t,r)=>{var i=r(77736);e.exports=function(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6305:(e,t,r)=>{var i=r(73738).default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=i(e)&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var l=s?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},81156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,o,s,a=[],l=!0,d=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){d=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw n}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},47752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},91847:(e,t,r)=>{var i=r(54893);e.exports=function(e,t){if(null==e)return{};var r,n,o=i(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},54893:e=>{e.exports=function(e,t){if(null==e)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.includes(i))continue;r[i]=e[i]}return r},e.exports.__esModule=!0,e.exports.default=e.exports},85715:(e,t,r)=>{var i=r(92987),n=r(81156),o=r(17122),s=r(47752);e.exports=function(e,t){return i(e)||n(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,r)=>{var i=r(73738).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,r)=>{var i=r(73738).default,n=r(89045);e.exports=function(e){var t=n(e,"string");return"symbol"==i(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},17122:(e,t,r)=>{var i=r(70079);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},39209:(e,t,r)=>{"use strict";var i=r(76578),n="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<i.length;t++)"function"==typeof n[i[t]]&&(e[e.length]=i[t]);return e}},47985:(e,t,r)=>{"use strict";var i=r(86450);e.exports=i},77725:(e,t,r)=>{"use strict";var i=r(18402);e.exports=i},68690:(e,t,r)=>{"use strict";var i=r(33067);e.exports=i},45779:(e,t,r)=>{"use strict";var i=r(33266);e.exports=i},6221:(e,t,r)=>{"use strict";var i=r(6686);e.exports=i},57264:(e,t,r)=>{"use strict";var i=r(24139);r(20768),r(8549),r(87152),r(11372),e.exports=i},93607:(e,t,r)=>{"use strict";r(7057),r(57277);var i=r(92046);e.exports=i.Array.from},13531:(e,t,r)=>{"use strict";r(92425);var i=r(92046);e.exports=i.Array.isArray},96275:(e,t,r)=>{"use strict";r(58545);var i=r(61747);e.exports=i("Array","concat")},22092:(e,t,r)=>{"use strict";r(95650);var i=r(61747);e.exports=i("Array","forEach")},83309:(e,t,r)=>{"use strict";r(66391);var i=r(61747);e.exports=i("Array","indexOf")},28253:(e,t,r)=>{"use strict";r(6687);var i=r(61747);e.exports=i("Array","map")},21127:(e,t,r)=>{"use strict";r(85745);var i=r(61747);e.exports=i("Array","push")},16693:(e,t,r)=>{"use strict";r(46339);var i=r(61747);e.exports=i("Array","reduce")},75265:(e,t,r)=>{"use strict";r(62099);var i=r(61747);e.exports=i("Array","slice")},11263:(e,t,r)=>{"use strict";r(26737);var i=r(61747);e.exports=i("Array","sort")},54712:(e,t,r)=>{"use strict";r(99363),r(7057);var i=r(73448);e.exports=i},45837:(e,t,r)=>{"use strict";var i=r(88280),n=r(96275),o=Array.prototype;e.exports=function(e){var t=e.concat;return e===o||i(o,e)&&t===o.concat?n:t}},60974:(e,t,r)=>{"use strict";var i=r(88280),n=r(48804),o=RegExp.prototype;e.exports=function(e){return e===o||i(o,e)?n(e):e.flags}},44507:(e,t,r)=>{"use strict";var i=r(88280),n=r(83309),o=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===o||i(o,e)&&t===o.indexOf?n:t}},39299:(e,t,r)=>{"use strict";var i=r(88280),n=r(28253),o=Array.prototype;e.exports=function(e){var t=e.map;return e===o||i(o,e)&&t===o.map?n:t}},78685:(e,t,r)=>{"use strict";var i=r(88280),n=r(21127),o=Array.prototype;e.exports=function(e){var t=e.push;return e===o||i(o,e)&&t===o.push?n:t}},28823:(e,t,r)=>{"use strict";var i=r(88280),n=r(16693),o=Array.prototype;e.exports=function(e){var t=e.reduce;return e===o||i(o,e)&&t===o.reduce?n:t}},40303:(e,t,r)=>{"use strict";var i=r(88280),n=r(75265),o=Array.prototype;e.exports=function(e){var t=e.slice;return e===o||i(o,e)&&t===o.slice?n:t}},12757:(e,t,r)=>{"use strict";var i=r(88280),n=r(11263),o=Array.prototype;e.exports=function(e){var t=e.sort;return e===o||i(o,e)&&t===o.sort?n:t}},80149:(e,t,r)=>{"use strict";r(25837);var i=r(92046).Object;e.exports=function(e,t){return i.create(e,t)}},21926:(e,t,r)=>{"use strict";r(46750);var i=r(92046).Object,n=e.exports=function(e,t,r){return i.defineProperty(e,t,r)};i.defineProperty.sham&&(n.sham=!0)},84326:(e,t,r)=>{"use strict";r(42193);var i=r(92046);e.exports=i.parseInt},48804:(e,t,r)=>{"use strict";r(9164);var i=r(40663);e.exports=i},83842:(e,t,r)=>{"use strict";r(58545),r(86024),r(94452),r(3997),r(75084),r(2596),r(5721),r(44954),r(44123),r(73377),r(72230),r(15344),r(51660),r(4610),r(33669),r(44810),r(93325),r(87024),r(38172),r(85205);var i=r(92046);e.exports=i.Symbol},62014:(e,t,r)=>{"use strict";e.exports=r(8980)},22382:(e,t,r)=>{"use strict";e.exports=r(31564)},81519:(e,t,r)=>{"use strict";e.exports=r(99029)},1958:(e,t,r)=>{"use strict";e.exports=r(63520)},55186:(e,t,r)=>{"use strict";e.exports=r(64908)},93071:(e,t,r)=>{"use strict";e.exports=r(32321)},8980:(e,t,r)=>{"use strict";var i=r(47985);e.exports=i},31564:(e,t,r)=>{"use strict";var i=r(77725);e.exports=i},99029:(e,t,r)=>{"use strict";var i=r(68690);e.exports=i},63520:(e,t,r)=>{"use strict";var i=r(45779);e.exports=i},64908:(e,t,r)=>{"use strict";var i=r(6221);e.exports=i},32321:(e,t,r)=>{"use strict";var i=r(57264);r(13939),r(21785),r(81697),r(84664),r(63422),r(70036),r(28703),r(86878),r(59671),r(50359),e.exports=i},82159:(e,t,r)=>{"use strict";var i=r(62250),n=r(4640),o=TypeError;e.exports=function(e){if(i(e))return e;throw new o(n(e)+" is not a function")}},10043:(e,t,r)=>{"use strict";var i=r(54018),n=String,o=TypeError;e.exports=function(e){if(i(e))return e;throw new o("Can't set "+n(e)+" as a prototype")}},42156:e=>{"use strict";e.exports=function(){}},36624:(e,t,r)=>{"use strict";var i=r(46285),n=String,o=TypeError;e.exports=function(e){if(i(e))return e;throw new o(n(e)+" is not an object")}},22914:(e,t,r)=>{"use strict";var i=r(70726).forEach,n=r(77623)("forEach");e.exports=n?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},11229:(e,t,r)=>{"use strict";var i=r(28311),n=r(13930),o=r(39298),s=r(26818),a=r(37812),l=r(25468),d=r(20575),c=r(5543),u=r(10300),p=r(73448),h=Array;e.exports=function(e){var t=o(e),r=l(this),f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m;g&&(m=i(m,f>2?arguments[2]:void 0));var y,v,b,w,_,x,S=p(t),k=0;if(!S||this===h&&a(S))for(y=d(t),v=r?new this(y):h(y);y>k;k++)x=g?m(t[k],k):t[k],c(v,k,x);else for(v=r?new this:[],_=(w=u(t,S)).next;!(b=n(_,w)).done;k++)x=g?s(w,m,[b.value,k],!0):b.value,c(v,k,x);return v.length=k,v}},74436:(e,t,r)=>{"use strict";var i=r(27374),n=r(34849),o=r(20575),s=function(e){return function(t,r,s){var a=i(t),l=o(a);if(0===l)return!e&&-1;var d,c=n(s,l);if(e&&r!=r){for(;l>c;)if((d=a[c++])!=d)return!0}else for(;l>c;c++)if((e||c in a)&&a[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},70726:(e,t,r)=>{"use strict";var i=r(28311),n=r(1907),o=r(16946),s=r(39298),a=r(20575),l=r(56968),d=n([].push),c=function(e){var t=1===e,r=2===e,n=3===e,c=4===e,u=6===e,p=7===e,h=5===e||u;return function(f,m,g,y){for(var v,b,w=s(f),_=o(w),x=a(_),S=i(m,g),k=0,E=y||l,T=t?E(f,x):r||p?E(f,0):void 0;x>k;k++)if((h||k in _)&&(b=S(v=_[k],k,w),e))if(t)T[k]=b;else if(b)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:d(T,v)}else switch(e){case 4:return!1;case 7:d(T,v)}return u?-1:n||c?c:T}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},59552:(e,t,r)=>{"use strict";var i=r(98828),n=r(76264),o=r(20798),s=n("species");e.exports=function(e){return o>=51||!i((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},77623:(e,t,r)=>{"use strict";var i=r(98828);e.exports=function(e,t){var r=[][e];return!!r&&i((function(){r.call(null,t||function(){return 1},1)}))}},35043:(e,t,r)=>{"use strict";var i=r(82159),n=r(39298),o=r(16946),s=r(20575),a=TypeError,l="Reduce of empty array with no initial value",d=function(e){return function(t,r,d,c){var u=n(t),p=o(u),h=s(u);if(i(r),0===h&&d<2)throw new a(l);var f=e?h-1:0,m=e?-1:1;if(d<2)for(;;){if(f in p){c=p[f],f+=m;break}if(f+=m,e?f<0:h<=f)throw new a(l)}for(;e?f>=0:h>f;f+=m)f in p&&(c=r(c,p[f],f,u));return c}};e.exports={left:d(!1),right:d(!0)}},3130:(e,t,r)=>{"use strict";var i=r(39447),n=r(11793),o=TypeError,s=Object.getOwnPropertyDescriptor,a=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(n(e)&&!s(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},93427:(e,t,r)=>{"use strict";var i=r(1907);e.exports=i([].slice)},34321:(e,t,r)=>{"use strict";var i=r(93427),n=Math.floor,o=function(e,t){var r=e.length;if(r<8)for(var s,a,l=1;l<r;){for(a=l,s=e[l];a&&t(e[a-1],s)>0;)e[a]=e[--a];a!==l++&&(e[a]=s)}else for(var d=n(r/2),c=o(i(e,0,d),t),u=o(i(e,d),t),p=c.length,h=u.length,f=0,m=0;f<p||m<h;)e[f+m]=f<p&&m<h?t(c[f],u[m])<=0?c[f++]:u[m++]:f<p?c[f++]:u[m++];return e};e.exports=o},64010:(e,t,r)=>{"use strict";var i=r(11793),n=r(25468),o=r(46285),s=r(76264)("species"),a=Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,(n(t)&&(t===a||i(t.prototype))||o(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},56968:(e,t,r)=>{"use strict";var i=r(64010);e.exports=function(e,t){return new(i(e))(0===t?0:t)}},26818:(e,t,r)=>{"use strict";var i=r(36624),n=r(40154);e.exports=function(e,t,r,o){try{return o?t(i(r)[0],r[1]):t(r)}catch(t){n(e,"throw",t)}}},70473:(e,t,r)=>{"use strict";var i=r(76264)("iterator"),n=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){n=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!n)return!1}catch(e){return!1}var r=!1;try{var o={};o[i]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},45807:(e,t,r)=>{"use strict";var i=r(1907),n=i({}.toString),o=i("".slice);e.exports=function(e){return o(n(e),8,-1)}},73948:(e,t,r)=>{"use strict";var i=r(52623),n=r(62250),o=r(45807),s=r(76264)("toStringTag"),a=Object,l="Arguments"===o(function(){return arguments}());e.exports=i?o:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?r:l?o(t):"Object"===(i=o(t))&&n(t.callee)?"Arguments":i}},57382:(e,t,r)=>{"use strict";var i=r(98828);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},59550:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},61626:(e,t,r)=>{"use strict";var i=r(39447),n=r(74284),o=r(75817);e.exports=i?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},75817:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:(e,t,r)=>{"use strict";var i=r(39447),n=r(74284),o=r(75817);e.exports=function(e,t,r){i?n.f(e,t,o(0,r)):e[t]=r}},89251:(e,t,r)=>{"use strict";var i=r(74284);e.exports=function(e,t,r){return i.f(e,t,r)}},68055:(e,t,r)=>{"use strict";var i=r(61626);e.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:i(e,t,r),e}},2532:(e,t,r)=>{"use strict";var i=r(45951),n=Object.defineProperty;e.exports=function(e,t){try{n(i,e,{value:t,configurable:!0,writable:!0})}catch(r){i[e]=t}return t}},74535:(e,t,r)=>{"use strict";var i=r(4640),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+i(t)+" of "+i(e))}},39447:(e,t,r)=>{"use strict";var i=r(98828);e.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},49552:(e,t,r)=>{"use strict";var i=r(45951),n=r(46285),o=i.document,s=n(o)&&n(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},88024:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},19287:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},80376:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},93440:(e,t,r)=>{"use strict";var i=r(96794).match(/firefox\/(\d+)/i);e.exports=!!i&&+i[1]},24328:(e,t,r)=>{"use strict";var i=r(96794);e.exports=/MSIE|Trident/.test(i)},47586:(e,t,r)=>{"use strict";var i=r(42832);e.exports="NODE"===i},96794:(e,t,r)=>{"use strict";var i=r(45951).navigator,n=i&&i.userAgent;e.exports=n?String(n):""},20798:(e,t,r)=>{"use strict";var i,n,o=r(45951),s=r(96794),a=o.process,l=o.Deno,d=a&&a.versions||l&&l.version,c=d&&d.v8;c&&(n=(i=c.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(n=+i[1]),e.exports=n},3786:(e,t,r)=>{"use strict";var i=r(96794).match(/AppleWebKit\/(\d+)\./);e.exports=!!i&&+i[1]},42832:(e,t,r)=>{"use strict";var i=r(45951),n=r(96794),o=r(45807),s=function(e){return n.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"},11091:(e,t,r)=>{"use strict";var i=r(45951),n=r(76024),o=r(92361),s=r(62250),a=r(13846).f,l=r(7463),d=r(92046),c=r(28311),u=r(61626),p=r(49724);r(36128);var h=function(e){var t=function(r,i,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,o)}return n(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,n,f,m,g,y,v,b,w,_=e.target,x=e.global,S=e.stat,k=e.proto,E=x?i:S?i[_]:i[_]&&i[_].prototype,T=x?d:d[_]||u(d,_,{})[_],B=T.prototype;for(m in t)n=!(r=l(x?m:_+(S?".":"#")+m,e.forced))&&E&&p(E,m),y=T[m],n&&(v=e.dontCallGetSet?(w=a(E,m))&&w.value:E[m]),g=n&&v?v:t[m],(r||k||typeof y!=typeof g)&&(b=e.bind&&n?c(g,i):e.wrap&&n?h(g):k&&s(g)?o(g):g,(e.sham||g&&g.sham||y&&y.sham)&&u(b,"sham",!0),u(T,m,b),k&&(p(d,f=_+"Prototype")||u(d,f,{}),u(d[f],m,g),e.real&&B&&(r||!B[m])&&u(B,m,g)))}},98828:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},76024:(e,t,r)=>{"use strict";var i=r(41505),n=Function.prototype,o=n.apply,s=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(o):function(){return s.apply(o,arguments)})},28311:(e,t,r)=>{"use strict";var i=r(92361),n=r(82159),o=r(41505),s=i(i.bind);e.exports=function(e,t){return n(e),void 0===t?e:o?s(e,t):function(){return e.apply(t,arguments)}}},41505:(e,t,r)=>{"use strict";var i=r(98828);e.exports=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},13930:(e,t,r)=>{"use strict";var i=r(41505),n=Function.prototype.call;e.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},36833:(e,t,r)=>{"use strict";var i=r(39447),n=r(49724),o=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=n(o,"name"),l=a&&"something"===function(){}.name,d=a&&(!i||i&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:d}},51871:(e,t,r)=>{"use strict";var i=r(1907),n=r(82159);e.exports=function(e,t,r){try{return i(n(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},92361:(e,t,r)=>{"use strict";var i=r(45807),n=r(1907);e.exports=function(e){if("Function"===i(e))return n(e)}},1907:(e,t,r)=>{"use strict";var i=r(41505),n=Function.prototype,o=n.call,s=i&&n.bind.bind(o,o);e.exports=i?s:function(e){return function(){return o.apply(e,arguments)}}},61747:(e,t,r)=>{"use strict";var i=r(45951),n=r(92046);e.exports=function(e,t){var r=n[e+"Prototype"],o=r&&r[t];if(o)return o;var s=i[e],a=s&&s.prototype;return a&&a[t]}},85582:(e,t,r)=>{"use strict";var i=r(92046),n=r(45951),o=r(62250),s=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(i[e])||s(n[e]):i[e]&&i[e][t]||n[e]&&n[e][t]}},73448:(e,t,r)=>{"use strict";var i=r(73948),n=r(29367),o=r(87136),s=r(93742),a=r(76264)("iterator");e.exports=function(e){if(!o(e))return n(e,a)||n(e,"@@iterator")||s[i(e)]}},10300:(e,t,r)=>{"use strict";var i=r(13930),n=r(82159),o=r(36624),s=r(4640),a=r(73448),l=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(n(r))return o(i(r,e));throw new l(s(e)+" is not iterable")}},96656:(e,t,r)=>{"use strict";var i=r(1907),n=r(11793),o=r(62250),s=r(45807),a=r(90160),l=i([].push);e.exports=function(e){if(o(e))return e;if(n(e)){for(var t=e.length,r=[],i=0;i<t;i++){var d=e[i];"string"==typeof d?l(r,d):"number"!=typeof d&&"Number"!==s(d)&&"String"!==s(d)||l(r,a(d))}var c=r.length,u=!0;return function(e,t){if(u)return u=!1,t;if(n(this))return t;for(var i=0;i<c;i++)if(r[i]===e)return t}}}},29367:(e,t,r)=>{"use strict";var i=r(82159),n=r(87136);e.exports=function(e,t){var r=e[t];return n(r)?void 0:i(r)}},45951:function(e,t,r){"use strict";var i=function(e){return e&&e.Math===Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r.g&&r.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},49724:(e,t,r)=>{"use strict";var i=r(1907),n=r(39298),o=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(n(e),t)}},38530:e=>{"use strict";e.exports={}},62416:(e,t,r)=>{"use strict";var i=r(85582);e.exports=i("document","documentElement")},73648:(e,t,r)=>{"use strict";var i=r(39447),n=r(98828),o=r(49552);e.exports=!i&&!n((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},16946:(e,t,r)=>{"use strict";var i=r(1907),n=r(98828),o=r(45807),s=Object,a=i("".split);e.exports=n((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?a(e,""):s(e)}:s},12647:(e,t,r)=>{"use strict";var i=r(1907),n=r(62250),o=r(36128),s=i(Function.toString);n(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},64932:(e,t,r)=>{"use strict";var i,n,o,s=r(40551),a=r(45951),l=r(46285),d=r(61626),c=r(49724),u=r(36128),p=r(92522),h=r(38530),f="Object already initialized",m=a.TypeError,g=a.WeakMap;if(s||u.state){var y=u.state||(u.state=new g);y.get=y.get,y.has=y.has,y.set=y.set,i=function(e,t){if(y.has(e))throw new m(f);return t.facade=e,y.set(e,t),t},n=function(e){return y.get(e)||{}},o=function(e){return y.has(e)}}else{var v=p("state");h[v]=!0,i=function(e,t){if(c(e,v))throw new m(f);return t.facade=e,d(e,v,t),t},n=function(e){return c(e,v)?e[v]:{}},o=function(e){return c(e,v)}}e.exports={set:i,get:n,has:o,enforce:function(e){return o(e)?n(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=n(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return r}}}},37812:(e,t,r)=>{"use strict";var i=r(76264),n=r(93742),o=i("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||s[o]===e)}},11793:(e,t,r)=>{"use strict";var i=r(45807);e.exports=Array.isArray||function(e){return"Array"===i(e)}},62250:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},25468:(e,t,r)=>{"use strict";var i=r(1907),n=r(98828),o=r(62250),s=r(73948),a=r(85582),l=r(12647),d=function(){},c=a("Reflect","construct"),u=/^\s*(?:class|function)\b/,p=i(u.exec),h=!u.test(d),f=function(e){if(!o(e))return!1;try{return c(d,[],e),!0}catch(e){return!1}},m=function(e){if(!o(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(u,l(e))}catch(e){return!0}};m.sham=!0,e.exports=!c||n((function(){var e;return f(f.call)||!f(Object)||!f((function(){e=!0}))||e}))?m:f},7463:(e,t,r)=>{"use strict";var i=r(98828),n=r(62250),o=/#|\.prototype\./,s=function(e,t){var r=l[a(e)];return r===c||r!==d&&(n(t)?i(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=s.data={},d=s.NATIVE="N",c=s.POLYFILL="P";e.exports=s},87136:e=>{"use strict";e.exports=function(e){return null==e}},46285:(e,t,r)=>{"use strict";var i=r(62250);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},54018:(e,t,r)=>{"use strict";var i=r(46285);e.exports=function(e){return i(e)||null===e}},7376:e=>{"use strict";e.exports=!0},25594:(e,t,r)=>{"use strict";var i=r(85582),n=r(62250),o=r(88280),s=r(51175),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return n(t)&&o(t.prototype,a(e))}},40154:(e,t,r)=>{"use strict";var i=r(13930),n=r(36624),o=r(29367);e.exports=function(e,t,r){var s,a;n(e);try{if(!(s=o(e,"return"))){if("throw"===t)throw r;return r}s=i(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw r;if(a)throw s;return n(s),r}},47181:(e,t,r)=>{"use strict";var i=r(95116).IteratorPrototype,n=r(58075),o=r(75817),s=r(14840),a=r(93742),l=function(){return this};e.exports=function(e,t,r,d){var c=t+" Iterator";return e.prototype=n(i,{next:o(+!d,r)}),s(e,c,!1,!0),a[c]=l,e}},60183:(e,t,r)=>{"use strict";var i=r(11091),n=r(13930),o=r(7376),s=r(36833),a=r(62250),l=r(47181),d=r(15972),c=r(79192),u=r(14840),p=r(61626),h=r(68055),f=r(76264),m=r(93742),g=r(95116),y=s.PROPER,v=s.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,_=f("iterator"),x="keys",S="values",k="entries",E=function(){return this};e.exports=function(e,t,r,s,f,g,T){l(r,t,s);var B,C,I,A=function(e){if(e===f&&P)return P;if(!w&&e&&e in D)return D[e];switch(e){case x:case S:case k:return function(){return new r(this,e)}}return function(){return new r(this)}},F=t+" Iterator",M=!1,D=e.prototype,R=D[_]||D["@@iterator"]||f&&D[f],P=!w&&R||A(f),O="Array"===t&&D.entries||R;if(O&&(B=d(O.call(new e)))!==Object.prototype&&B.next&&(o||d(B)===b||(c?c(B,b):a(B[_])||h(B,_,E)),u(B,F,!0,!0),o&&(m[F]=E)),y&&f===S&&R&&R.name!==S&&(!o&&v?p(D,"name",S):(M=!0,P=function(){return n(R,this)})),f)if(C={values:A(S),keys:g?P:A(x),entries:A(k)},T)for(I in C)(w||M||!(I in D))&&h(D,I,C[I]);else i({target:t,proto:!0,forced:w||M},C);return o&&!T||D[_]===P||h(D,_,P,{name:f}),m[t]=P,C}},95116:(e,t,r)=>{"use strict";var i,n,o,s=r(98828),a=r(62250),l=r(46285),d=r(58075),c=r(15972),u=r(68055),p=r(76264),h=r(7376),f=p("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(n=c(c(o)))!==Object.prototype&&(i=n):m=!0),!l(i)||s((function(){var e={};return i[f].call(e)!==e}))?i={}:h&&(i=d(i)),a(i[f])||u(i,f,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},93742:e=>{"use strict";e.exports={}},20575:(e,t,r)=>{"use strict";var i=r(3121);e.exports=function(e){return i(e.length)}},41176:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:t)(i)}},72778:(e,t,r)=>{"use strict";var i=r(45951),n=r(98828),o=r(1907),s=r(90160),a=r(65993).trim,l=r(86395),d=i.parseInt,c=i.Symbol,u=c&&c.iterator,p=/^[+-]?0x/i,h=o(p.exec),f=8!==d(l+"08")||22!==d(l+"0x16")||u&&!n((function(){d(Object(u))}));e.exports=f?function(e,t){var r=a(s(e));return d(r,t>>>0||(h(p,r)?16:10))}:d},58075:(e,t,r)=>{"use strict";var i,n=r(36624),o=r(42220),s=r(80376),a=r(38530),l=r(62416),d=r(49552),c=r(92522),u="prototype",p="script",h=c("IE_PROTO"),f=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;y="undefined"!=typeof document?document.domain&&i?g(i):(t=d("iframe"),r="java"+p+":",t.style.display="none",l.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(i);for(var n=s.length;n--;)delete y[u][s[n]];return y()};a[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(f[u]=n(e),r=new f,f[u]=null,r[h]=e):r=y(),void 0===t?r:o.f(r,t)}},42220:(e,t,r)=>{"use strict";var i=r(39447),n=r(58661),o=r(74284),s=r(36624),a=r(27374),l=r(2875);t.f=i&&!n?Object.defineProperties:function(e,t){s(e);for(var r,i=a(t),n=l(t),d=n.length,c=0;d>c;)o.f(e,r=n[c++],i[r]);return e}},74284:(e,t,r)=>{"use strict";var i=r(39447),n=r(73648),o=r(58661),s=r(36624),a=r(70470),l=TypeError,d=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",h="writable";t.f=i?o?function(e,t,r){if(s(e),t=a(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var i=c(e,t);i&&i[h]&&(e[t]=r.value,r={configurable:p in r?r[p]:i[p],enumerable:u in r?r[u]:i[u],writable:!1})}return d(e,t,r)}:d:function(e,t,r){if(s(e),t=a(t),s(r),n)try{return d(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},13846:(e,t,r)=>{"use strict";var i=r(39447),n=r(13930),o=r(22574),s=r(75817),a=r(27374),l=r(70470),d=r(49724),c=r(73648),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=a(e),t=l(t),c)try{return u(e,t)}catch(e){}if(d(e,t))return s(!n(o.f,e,t),e[t])}},25407:(e,t,r)=>{"use strict";var i=r(45807),n=r(27374),o=r(24443).f,s=r(93427),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"===i(e)?function(e){try{return o(e)}catch(e){return s(a)}}(e):o(n(e))}},24443:(e,t,r)=>{"use strict";var i=r(23045),n=r(80376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,n)}},87170:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},15972:(e,t,r)=>{"use strict";var i=r(49724),n=r(62250),o=r(39298),s=r(92522),a=r(57382),l=s("IE_PROTO"),d=Object,c=d.prototype;e.exports=a?d.getPrototypeOf:function(e){var t=o(e);if(i(t,l))return t[l];var r=t.constructor;return n(r)&&t instanceof r?r.prototype:t instanceof d?c:null}},88280:(e,t,r)=>{"use strict";var i=r(1907);e.exports=i({}.isPrototypeOf)},23045:(e,t,r)=>{"use strict";var i=r(1907),n=r(49724),o=r(27374),s=r(74436).indexOf,a=r(38530),l=i([].push);e.exports=function(e,t){var r,i=o(e),d=0,c=[];for(r in i)!n(a,r)&&n(i,r)&&l(c,r);for(;t.length>d;)n(i,r=t[d++])&&(~s(c,r)||l(c,r));return c}},2875:(e,t,r)=>{"use strict";var i=r(23045),n=r(80376);e.exports=Object.keys||function(e){return i(e,n)}},22574:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!r.call({1:2},1);t.f=n?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},79192:(e,t,r)=>{"use strict";var i=r(51871),n=r(46285),o=r(74239),s=r(10043);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return o(r),s(i),n(r)?(t?e(r,i):r.__proto__=i,r):r}}():void 0)},54878:(e,t,r)=>{"use strict";var i=r(52623),n=r(73948);e.exports=i?{}.toString:function(){return"[object "+n(this)+"]"}},60581:(e,t,r)=>{"use strict";var i=r(13930),n=r(62250),o=r(46285),s=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&n(r=e.toString)&&!o(a=i(r,e)))return a;if(n(r=e.valueOf)&&!o(a=i(r,e)))return a;if("string"!==t&&n(r=e.toString)&&!o(a=i(r,e)))return a;throw new s("Can't convert object to primitive value")}},92046:e=>{"use strict";e.exports={}},85606:(e,t,r)=>{"use strict";var i=r(36624);e.exports=function(){var e=i(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},40663:(e,t,r)=>{"use strict";var i=r(13930),n=r(49724),o=r(88280),s=r(85606),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||n(e,"flags")||!o(a,e)?t:i(s,e)}},74239:(e,t,r)=>{"use strict";var i=r(87136),n=TypeError;e.exports=function(e){if(i(e))throw new n("Can't call method on "+e);return e}},14840:(e,t,r)=>{"use strict";var i=r(52623),n=r(74284).f,o=r(61626),s=r(49724),a=r(54878),l=r(76264)("toStringTag");e.exports=function(e,t,r,d){var c=r?e:e&&e.prototype;c&&(s(c,l)||n(c,l,{configurable:!0,value:t}),d&&!i&&o(c,"toString",a))}},92522:(e,t,r)=>{"use strict";var i=r(85816),n=r(6499),o=i("keys");e.exports=function(e){return o[e]||(o[e]=n(e))}},36128:(e,t,r)=>{"use strict";var i=r(7376),n=r(45951),o=r(2532),s="__core-js_shared__",a=e.exports=n[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.38.1",mode:i?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},85816:(e,t,r)=>{"use strict";var i=r(36128);e.exports=function(e,t){return i[e]||(i[e]=t||{})}},11470:(e,t,r)=>{"use strict";var i=r(1907),n=r(65482),o=r(90160),s=r(74239),a=i("".charAt),l=i("".charCodeAt),d=i("".slice),c=function(e){return function(t,r){var i,c,u=o(s(t)),p=n(r),h=u.length;return p<0||p>=h?e?"":void 0:(i=l(u,p))<55296||i>56319||p+1===h||(c=l(u,p+1))<56320||c>57343?e?a(u,p):i:e?d(u,p,p+2):c-56320+(i-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},65993:(e,t,r)=>{"use strict";var i=r(1907),n=r(74239),o=r(90160),s=r(86395),a=i("".replace),l=RegExp("^["+s+"]+"),d=RegExp("(^|[^"+s+"])["+s+"]+$"),c=function(e){return function(t){var r=o(n(t));return 1&e&&(r=a(r,l,"")),2&e&&(r=a(r,d,"$1")),r}};e.exports={start:c(1),end:c(2),trim:c(3)}},19846:(e,t,r)=>{"use strict";var i=r(20798),n=r(98828),o=r(45951).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},83467:(e,t,r)=>{"use strict";var i=r(13930),n=r(85582),o=r(76264),s=r(68055);e.exports=function(){var e=n("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,a=o("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return i(r,this)}),{arity:1})}},12595:(e,t,r)=>{"use strict";var i=r(85582),n=r(1907),o=i("Symbol"),s=o.keyFor,a=n(o.prototype.valueOf);e.exports=o.isRegisteredSymbol||function(e){try{return void 0!==s(a(e))}catch(e){return!1}}},69197:(e,t,r)=>{"use strict";for(var i=r(85816),n=r(85582),o=r(1907),s=r(25594),a=r(76264),l=n("Symbol"),d=l.isWellKnownSymbol,c=n("Object","getOwnPropertyNames"),u=o(l.prototype.valueOf),p=i("wks"),h=0,f=c(l),m=f.length;h<m;h++)try{var g=f[h];s(l[g])&&a(g)}catch(e){}e.exports=function(e){if(d&&d(e))return!0;try{for(var t=u(e),r=0,i=c(p),n=i.length;r<n;r++)if(p[i[r]]==t)return!0}catch(e){}return!1}},84411:(e,t,r)=>{"use strict";var i=r(19846);e.exports=i&&!!Symbol.for&&!!Symbol.keyFor},34849:(e,t,r)=>{"use strict";var i=r(65482),n=Math.max,o=Math.min;e.exports=function(e,t){var r=i(e);return r<0?n(r+t,0):o(r,t)}},27374:(e,t,r)=>{"use strict";var i=r(16946),n=r(74239);e.exports=function(e){return i(n(e))}},65482:(e,t,r)=>{"use strict";var i=r(41176);e.exports=function(e){var t=+e;return t!=t||0===t?0:i(t)}},3121:(e,t,r)=>{"use strict";var i=r(65482),n=Math.min;e.exports=function(e){var t=i(e);return t>0?n(t,9007199254740991):0}},39298:(e,t,r)=>{"use strict";var i=r(74239),n=Object;e.exports=function(e){return n(i(e))}},46028:(e,t,r)=>{"use strict";var i=r(13930),n=r(46285),o=r(25594),s=r(29367),a=r(60581),l=r(76264),d=TypeError,c=l("toPrimitive");e.exports=function(e,t){if(!n(e)||o(e))return e;var r,l=s(e,c);if(l){if(void 0===t&&(t="default"),r=i(l,e,t),!n(r)||o(r))return r;throw new d("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},70470:(e,t,r)=>{"use strict";var i=r(46028),n=r(25594);e.exports=function(e){var t=i(e,"string");return n(t)?t:t+""}},52623:(e,t,r)=>{"use strict";var i={};i[r(76264)("toStringTag")]="z",e.exports="[object z]"===String(i)},90160:(e,t,r)=>{"use strict";var i=r(73948),n=String;e.exports=function(e){if("Symbol"===i(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},4640:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:(e,t,r)=>{"use strict";var i=r(1907),n=0,o=Math.random(),s=i(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++n+o,36)}},51175:(e,t,r)=>{"use strict";var i=r(19846);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},58661:(e,t,r)=>{"use strict";var i=r(39447),n=r(98828);e.exports=i&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},40551:(e,t,r)=>{"use strict";var i=r(45951),n=r(62250),o=i.WeakMap;e.exports=n(o)&&/native code/.test(String(o))},20366:(e,t,r)=>{"use strict";var i=r(92046),n=r(49724),o=r(80560),s=r(74284).f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});n(t,e)||s(t,e,{value:o.f(e)})}},80560:(e,t,r)=>{"use strict";var i=r(76264);t.f=i},76264:(e,t,r)=>{"use strict";var i=r(45951),n=r(85816),o=r(49724),s=r(6499),a=r(19846),l=r(51175),d=i.Symbol,c=n("wks"),u=l?d.for||d:d&&d.withoutSetter||s;e.exports=function(e){return o(c,e)||(c[e]=a&&o(d,e)?d[e]:u("Symbol."+e)),c[e]}},86395:e=>{"use strict";e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},58545:(e,t,r)=>{"use strict";var i=r(11091),n=r(98828),o=r(11793),s=r(46285),a=r(39298),l=r(20575),d=r(88024),c=r(5543),u=r(56968),p=r(59552),h=r(76264),f=r(20798),m=h("isConcatSpreadable"),g=f>=51||!n((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),y=function(e){if(!s(e))return!1;var t=e[m];return void 0!==t?!!t:o(e)};i({target:"Array",proto:!0,arity:1,forced:!g||!p("concat")},{concat:function(e){var t,r,i,n,o,s=a(this),p=u(s,0),h=0;for(t=-1,i=arguments.length;t<i;t++)if(y(o=-1===t?s:arguments[t]))for(n=l(o),d(h+n),r=0;r<n;r++,h++)r in o&&c(p,h,o[r]);else d(h+1),c(p,h++,o);return p.length=h,p}})},95650:(e,t,r)=>{"use strict";var i=r(11091),n=r(22914);i({target:"Array",proto:!0,forced:[].forEach!==n},{forEach:n})},57277:(e,t,r)=>{"use strict";var i=r(11091),n=r(11229);i({target:"Array",stat:!0,forced:!r(70473)((function(e){Array.from(e)}))},{from:n})},66391:(e,t,r)=>{"use strict";var i=r(11091),n=r(92361),o=r(74436).indexOf,s=r(77623),a=n([].indexOf),l=!!a&&1/a([1],1,-0)<0;i({target:"Array",proto:!0,forced:l||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return l?a(this,e,t)||0:o(this,e,t)}})},92425:(e,t,r)=>{"use strict";r(11091)({target:"Array",stat:!0},{isArray:r(11793)})},99363:(e,t,r)=>{"use strict";var i=r(27374),n=r(42156),o=r(93742),s=r(64932),a=r(74284).f,l=r(60183),d=r(59550),c=r(7376),u=r(39447),p="Array Iterator",h=s.set,f=s.getterFor(p);e.exports=l(Array,"Array",(function(e,t){h(this,{type:p,target:i(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,d(void 0,!0);switch(e.kind){case"keys":return d(r,!1);case"values":return d(t[r],!1)}return d([r,t[r]],!1)}),"values");var m=o.Arguments=o.Array;if(n("keys"),n("values"),n("entries"),!c&&u&&"values"!==m.name)try{a(m,"name",{value:"values"})}catch(e){}},6687:(e,t,r)=>{"use strict";var i=r(11091),n=r(70726).map;i({target:"Array",proto:!0,forced:!r(59552)("map")},{map:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},85745:(e,t,r)=>{"use strict";var i=r(11091),n=r(39298),o=r(20575),s=r(3130),a=r(88024);i({target:"Array",proto:!0,arity:1,forced:r(98828)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),r=o(t),i=arguments.length;a(r+i);for(var l=0;l<i;l++)t[r]=arguments[l],r++;return s(t,r),r}})},46339:(e,t,r)=>{"use strict";var i=r(11091),n=r(35043).left,o=r(77623),s=r(20798);i({target:"Array",proto:!0,forced:!r(47586)&&s>79&&s<83||!o("reduce")},{reduce:function(e){var t=arguments.length;return n(this,e,t,t>1?arguments[1]:void 0)}})},62099:(e,t,r)=>{"use strict";var i=r(11091),n=r(11793),o=r(25468),s=r(46285),a=r(34849),l=r(20575),d=r(27374),c=r(5543),u=r(76264),p=r(59552),h=r(93427),f=p("slice"),m=u("species"),g=Array,y=Math.max;i({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var r,i,u,p=d(this),f=l(p),v=a(e,f),b=a(void 0===t?f:t,f);if(n(p)&&(r=p.constructor,(o(r)&&(r===g||n(r.prototype))||s(r)&&null===(r=r[m]))&&(r=void 0),r===g||void 0===r))return h(p,v,b);for(i=new(void 0===r?g:r)(y(b-v,0)),u=0;v<b;v++,u++)v in p&&c(i,u,p[v]);return i.length=u,i}})},26737:(e,t,r)=>{"use strict";var i=r(11091),n=r(1907),o=r(82159),s=r(39298),a=r(20575),l=r(74535),d=r(90160),c=r(98828),u=r(34321),p=r(77623),h=r(93440),f=r(24328),m=r(20798),g=r(3786),y=[],v=n(y.sort),b=n(y.push),w=c((function(){y.sort(void 0)})),_=c((function(){y.sort(null)})),x=p("sort"),S=!c((function(){if(m)return m<70;if(!(h&&h>3)){if(f)return!0;if(g)return g<603;var e,t,r,i,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)y.push({k:t+i,v:r})}for(y.sort((function(e,t){return t.v-e.v})),i=0;i<y.length;i++)t=y[i].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}}));i({target:"Array",proto:!0,forced:w||!_||!x||!S},{sort:function(e){void 0!==e&&o(e);var t=s(this);if(S)return void 0===e?v(t):v(t,e);var r,i,n=[],c=a(t);for(i=0;i<c;i++)i in t&&b(n,t[i]);for(u(n,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:d(t)>d(r)?1:-1}}(e)),r=a(n),i=0;i<r;)t[i]=n[i++];for(;i<c;)l(t,i++);return t}})},49721:(e,t,r)=>{"use strict";var i=r(11091),n=r(85582),o=r(76024),s=r(13930),a=r(1907),l=r(98828),d=r(62250),c=r(25594),u=r(93427),p=r(96656),h=r(19846),f=String,m=n("JSON","stringify"),g=a(/./.exec),y=a("".charAt),v=a("".charCodeAt),b=a("".replace),w=a(1..toString),_=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,k=!h||l((function(){var e=n("Symbol")("stringify detection");return"[null]"!==m([e])||"{}"!==m({a:e})||"{}"!==m(Object(e))})),E=l((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),T=function(e,t){var r=u(arguments),i=p(t);if(d(i)||void 0!==e&&!c(e))return r[1]=function(e,t){if(d(i)&&(t=s(i,this,f(e),t)),!c(t))return t},o(m,null,r)},B=function(e,t,r){var i=y(r,t-1),n=y(r,t+1);return g(x,e)&&!g(S,n)||g(S,e)&&!g(x,i)?"\\u"+w(v(e,0),16):e};m&&i({target:"JSON",stat:!0,arity:3,forced:k||E},{stringify:function(e,t,r){var i=u(arguments),n=o(k?T:m,null,i);return E&&"string"==typeof n?b(n,_,B):n}})},87024:(e,t,r)=>{"use strict";var i=r(45951);r(14840)(i.JSON,"JSON",!0)},38172:()=>{},25837:(e,t,r)=>{"use strict";r(11091)({target:"Object",stat:!0,sham:!r(39447)},{create:r(58075)})},46750:(e,t,r)=>{"use strict";var i=r(11091),n=r(39447),o=r(74284).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!n},{defineProperty:o})},55264:(e,t,r)=>{"use strict";var i=r(11091),n=r(19846),o=r(98828),s=r(87170),a=r(39298);i({target:"Object",stat:!0,forced:!n||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},86024:()=>{},42193:(e,t,r)=>{"use strict";var i=r(11091),n=r(72778);i({global:!0,forced:parseInt!==n},{parseInt:n})},85205:()=>{},9164:()=>{},7057:(e,t,r)=>{"use strict";var i=r(11470).charAt,n=r(90160),o=r(64932),s=r(60183),a=r(59550),l="String Iterator",d=o.set,c=o.getterFor(l);s(String,"String",(function(e){d(this,{type:l,string:n(e),index:0})}),(function(){var e,t=c(this),r=t.string,n=t.index;return n>=r.length?a(void 0,!0):(e=i(r,n),t.index+=e.length,a(e,!1))}))},3997:(e,t,r)=>{"use strict";r(20366)("asyncIterator")},23674:(e,t,r)=>{"use strict";var i=r(11091),n=r(45951),o=r(13930),s=r(1907),a=r(7376),l=r(39447),d=r(19846),c=r(98828),u=r(49724),p=r(88280),h=r(36624),f=r(27374),m=r(70470),g=r(90160),y=r(75817),v=r(58075),b=r(2875),w=r(24443),_=r(25407),x=r(87170),S=r(13846),k=r(74284),E=r(42220),T=r(22574),B=r(68055),C=r(89251),I=r(85816),A=r(92522),F=r(38530),M=r(6499),D=r(76264),R=r(80560),P=r(20366),O=r(83467),z=r(14840),N=r(64932),q=r(70726).forEach,U=A("hidden"),L="Symbol",j="prototype",H=N.set,$=N.getterFor(L),G=Object[j],W=n.Symbol,K=W&&W[j],V=n.RangeError,J=n.TypeError,Y=n.QObject,Q=S.f,Z=k.f,X=_.f,ee=T.f,te=s([].push),re=I("symbols"),ie=I("op-symbols"),ne=I("wks"),oe=!Y||!Y[j]||!Y[j].findChild,se=function(e,t,r){var i=Q(G,t);i&&delete G[t],Z(e,t,r),i&&e!==G&&Z(G,t,i)},ae=l&&c((function(){return 7!==v(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?se:Z,le=function(e,t){var r=re[e]=v(K);return H(r,{type:L,tag:e,description:t}),l||(r.description=t),r},de=function(e,t,r){e===G&&de(ie,t,r),h(e);var i=m(t);return h(r),u(re,i)?(r.enumerable?(u(e,U)&&e[U][i]&&(e[U][i]=!1),r=v(r,{enumerable:y(0,!1)})):(u(e,U)||Z(e,U,y(1,v(null))),e[U][i]=!0),ae(e,i,r)):Z(e,i,r)},ce=function(e,t){h(e);var r=f(t),i=b(r).concat(fe(r));return q(i,(function(t){l&&!o(ue,r,t)||de(e,t,r[t])})),e},ue=function(e){var t=m(e),r=o(ee,this,t);return!(this===G&&u(re,t)&&!u(ie,t))&&(!(r||!u(this,t)||!u(re,t)||u(this,U)&&this[U][t])||r)},pe=function(e,t){var r=f(e),i=m(t);if(r!==G||!u(re,i)||u(ie,i)){var n=Q(r,i);return!n||!u(re,i)||u(r,U)&&r[U][i]||(n.enumerable=!0),n}},he=function(e){var t=X(f(e)),r=[];return q(t,(function(e){u(re,e)||u(F,e)||te(r,e)})),r},fe=function(e){var t=e===G,r=X(t?ie:f(e)),i=[];return q(r,(function(e){!u(re,e)||t&&!u(G,e)||te(i,re[e])})),i};d||(B(K=(W=function(){if(p(K,this))throw new J("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=M(e),r=function(e){var i=void 0===this?n:this;i===G&&o(r,ie,e),u(i,U)&&u(i[U],t)&&(i[U][t]=!1);var s=y(1,e);try{ae(i,t,s)}catch(e){if(!(e instanceof V))throw e;se(i,t,s)}};return l&&oe&&ae(G,t,{configurable:!0,set:r}),le(t,e)})[j],"toString",(function(){return $(this).tag})),B(W,"withoutSetter",(function(e){return le(M(e),e)})),T.f=ue,k.f=de,E.f=ce,S.f=pe,w.f=_.f=he,x.f=fe,R.f=function(e){return le(D(e),e)},l&&(C(K,"description",{configurable:!0,get:function(){return $(this).description}}),a||B(G,"propertyIsEnumerable",ue,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:W}),q(b(ne),(function(e){P(e)})),i({target:L,stat:!0,forced:!d},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),i({target:"Object",stat:!0,forced:!d,sham:!l},{create:function(e,t){return void 0===t?v(e):ce(v(e),t)},defineProperty:de,defineProperties:ce,getOwnPropertyDescriptor:pe}),i({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:he}),O(),z(W,L),F[U]=!0},75084:()=>{},13313:(e,t,r)=>{"use strict";var i=r(11091),n=r(85582),o=r(49724),s=r(90160),a=r(85816),l=r(84411),d=a("string-to-symbol-registry"),c=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=s(e);if(o(d,t))return d[t];var r=n("Symbol")(t);return d[t]=r,c[r]=t,r}})},2596:(e,t,r)=>{"use strict";r(20366)("hasInstance")},5721:(e,t,r)=>{"use strict";r(20366)("isConcatSpreadable")},44954:(e,t,r)=>{"use strict";r(20366)("iterator")},94452:(e,t,r)=>{"use strict";r(23674),r(13313),r(10751),r(49721),r(55264)},10751:(e,t,r)=>{"use strict";var i=r(11091),n=r(49724),o=r(25594),s=r(4640),a=r(85816),l=r(84411),d=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!o(e))throw new TypeError(s(e)+" is not a symbol");if(n(d,e))return d[e]}})},73377:(e,t,r)=>{"use strict";r(20366)("matchAll")},44123:(e,t,r)=>{"use strict";r(20366)("match")},72230:(e,t,r)=>{"use strict";r(20366)("replace")},15344:(e,t,r)=>{"use strict";r(20366)("search")},51660:(e,t,r)=>{"use strict";r(20366)("species")},4610:(e,t,r)=>{"use strict";r(20366)("split")},33669:(e,t,r)=>{"use strict";var i=r(20366),n=r(83467);i("toPrimitive"),n()},44810:(e,t,r)=>{"use strict";var i=r(85582),n=r(20366),o=r(14840);n("toStringTag"),o(i("Symbol"),"Symbol")},93325:(e,t,r)=>{"use strict";r(20366)("unscopables")},20768:(e,t,r)=>{"use strict";var i=r(76264),n=r(74284).f,o=i("metadata"),s=Function.prototype;void 0===s[o]&&n(s,o,{value:null})},8549:(e,t,r)=>{"use strict";r(20366)("asyncDispose")},81697:(e,t,r)=>{"use strict";r(20366)("customMatcher")},87152:(e,t,r)=>{"use strict";r(20366)("dispose")},13939:(e,t,r)=>{"use strict";r(11091)({target:"Symbol",stat:!0},{isRegisteredSymbol:r(12595)})},63422:(e,t,r)=>{"use strict";r(11091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:r(12595)})},21785:(e,t,r)=>{"use strict";r(11091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:r(69197)})},70036:(e,t,r)=>{"use strict";r(11091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:r(69197)})},28703:(e,t,r)=>{"use strict";r(20366)("matcher")},86878:(e,t,r)=>{"use strict";r(20366)("metadataKey")},11372:(e,t,r)=>{"use strict";r(20366)("metadata")},84664:(e,t,r)=>{"use strict";r(20366)("observable")},59671:(e,t,r)=>{"use strict";r(20366)("patternMatch")},50359:(e,t,r)=>{"use strict";r(20366)("replaceAll")},60237:()=>{},12560:(e,t,r)=>{"use strict";r(99363);var i=r(19287),n=r(45951),o=r(14840),s=r(93742);for(var a in i)o(n[a],a),s[a]=s.Array},86450:(e,t,r)=>{"use strict";var i=r(93607);e.exports=i},18402:(e,t,r)=>{"use strict";var i=r(13531);e.exports=i},41969:(e,t,r)=>{"use strict";var i=r(22092);e.exports=i},33067:(e,t,r)=>{"use strict";var i=r(54712);r(12560),e.exports=i},50530:(e,t,r)=>{"use strict";var i=r(45837);e.exports=i},64055:(e,t,r)=>{"use strict";var i=r(60974);e.exports=i},24525:(e,t,r)=>{"use strict";var i=r(73948),n=r(49724),o=r(88280),s=r(41969);r(60237);var a=Array.prototype,l={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===a||o(a,e)&&t===a.forEach||n(l,i(e))?s:t}},77852:(e,t,r)=>{"use strict";var i=r(44507);e.exports=i},98894:(e,t,r)=>{"use strict";var i=r(39299);e.exports=i},33266:(e,t,r)=>{"use strict";var i=r(78685);e.exports=i},79528:(e,t,r)=>{"use strict";var i=r(28823);e.exports=i},6686:(e,t,r)=>{"use strict";var i=r(40303);e.exports=i},81086:(e,t,r)=>{"use strict";var i=r(12757);e.exports=i},93658:(e,t,r)=>{"use strict";var i=r(80149);e.exports=i},68251:(e,t,r)=>{"use strict";var i=r(21926);e.exports=i},91921:(e,t,r)=>{"use strict";var i=r(84326);e.exports=i},24139:(e,t,r)=>{"use strict";var i=r(83842);r(12560),e.exports=i},99211:(e,t)=>{"use strict";function r(e,t,r){var i;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var n=0;n<t.chars.length;++n)t.codes[t.chars[n]]=n}if(!r.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var o=e.length;"="===e[o-1];)if(--o,!(r.loose||(e.length-o)*t.bits&7))throw new SyntaxError("Invalid padding");for(var s=new(null!=(i=r.out)?i:Uint8Array)(o*t.bits/8|0),a=0,l=0,d=0,c=0;c<o;++c){var u=t.codes[e[c]];if(void 0===u)throw new SyntaxError("Invalid character "+e[c]);l=l<<t.bits|u,(a+=t.bits)>=8&&(a-=8,s[d++]=255&l>>a)}if(a>=t.bits||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return s}function i(e,t,r){void 0===r&&(r={});for(var i=r.pad,n=void 0===i||i,o=(1<<t.bits)-1,s="",a=0,l=0,d=0;d<e.length;++d)for(l=l<<8|255&e[d],a+=8;a>t.bits;)a-=t.bits,s+=t.chars[o&l>>a];if(a&&(s+=t.chars[o&l<<t.bits-a]),n)for(;s.length*t.bits&7;)s+="=";return s}Object.defineProperty(t,"__esModule",{value:!0});var n={chars:"0123456789ABCDEF",bits:4},o={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},s={chars:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bits:5},a={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bits:6},l={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},d={parse:function(e,t){return r(e.toUpperCase(),n,t)},stringify:function(e,t){return i(e,n,t)}},c={parse:function(e,t){return void 0===t&&(t={}),r(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,o,t)},stringify:function(e,t){return i(e,o,t)}},u={parse:function(e,t){return r(e,s,t)},stringify:function(e,t){return i(e,s,t)}},p={parse:function(e,t){return r(e,a,t)},stringify:function(e,t){return i(e,a,t)}},h={parse:function(e,t){return r(e,l,t)},stringify:function(e,t){return i(e,l,t)}},f={parse:r,stringify:i};t.base16=d,t.base32=c,t.base32hex=u,t.base64=p,t.base64url=h,t.codec=f},62718:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>s,encode:()=>o});const i={},n={};["ҠҿԀԟڀڿݠޟ߀ߟကဟႠႿᄀᅟᆀᆟᇠሿበቿዠዿጠጿᎠᏟᐠᙟᚠᛟកសᠠᡟᣀᣟᦀᦟ᧠᧿ᨠᨿᯀᯟᰀᰟᴀᴟ⇠⇿⋀⋟⍀⏟␀␟─❟➀➿⠀⥿⦠⦿⨠⩟⪀⪿⫠⭟ⰀⰟⲀⳟⴀⴟⵀⵟ⺠⻟㇀㇟㐀䶟䷀龿ꀀꑿ꒠꒿ꔀꗿꙀꙟꚠꛟ꜀ꝟꞀꞟꡀꡟ","ƀƟɀʟ"].forEach(((e,t)=>{const r=[];e.match(/../gu).forEach((e=>{const t=e.codePointAt(0),i=e.codePointAt(1);for(let e=t;e<=i;e++)r.push(String.fromCodePoint(e))}));const o=15-8*t;i[o]=r,r.forEach(((e,t)=>{n[e]=[o,t]}))}));const o=e=>{const t=e.length;let r="",n=0,o=0;for(let s=0;s<t;s++){const t=e[s];for(let e=7;e>=0;e--){n=(n<<1)+(t>>e&1),o++,15===o&&(r+=i[o][n],n=0,o=0)}}if(0!==o){for(;!(o in i);)n=1+(n<<1),o++;r+=i[o][n]}return r},s=e=>{const t=e.length,r=new Uint8Array(Math.floor(15*t/8));let i=0,o=0,s=0;for(let a=0;a<t;a++){const l=e.charAt(a);if(!(l in n))throw new Error(`Unrecognised Base32768 character: ${l}`);const[d,c]=n[l];if(15!==d&&a!==t-1)throw new Error("Secondary character found before end of input at position "+String(a));for(let e=d-1;e>=0;e--){o=(o<<1)+(c>>e&1),s++,8===s&&(r[i]=o,i++,o=0,s=0)}}if(o!==(1<<s)-1)throw new Error("Padding mismatch");return new Uint8Array(r.buffer,0,i)}},25948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>wt,CompactSign:()=>St,EmbeddedJWK:()=>Dt,EncryptJWT:()=>It,FlattenedEncrypt:()=>it,FlattenedSign:()=>xt,GeneralEncrypt:()=>ot,GeneralSign:()=>Et,SignJWT:()=>Ct,UnsecuredJWT:()=>Gt,base64url:()=>n,calculateJwkThumbprint:()=>Ft,calculateJwkThumbprintUri:()=>Mt,compactDecrypt:()=>Je,compactVerify:()=>ct,createLocalJWKSet:()=>Nt,createRemoteJWKSet:()=>Ht,cryptoRuntime:()=>Xt,decodeJwt:()=>Jt,decodeProtectedHeader:()=>Vt,errors:()=>i,experimental_jwksCache:()=>$t,exportJWK:()=>tt,exportPKCS8:()=>et,exportSPKI:()=>Xe,flattenedDecrypt:()=>Ve,flattenedVerify:()=>dt,generalDecrypt:()=>Ye,generalVerify:()=>ut,generateKeyPair:()=>Qt,generateSecret:()=>Zt,importJWK:()=>ze,importPKCS8:()=>Oe,importSPKI:()=>Re,importX509:()=>Pe,jwksCache:()=>Lt,jwtDecrypt:()=>bt,jwtVerify:()=>vt});var i={};r.r(i),r.d(i,{JOSEAlgNotAllowed:()=>S,JOSEError:()=>w,JOSENotSupported:()=>k,JWEDecryptionFailed:()=>E,JWEInvalid:()=>T,JWKInvalid:()=>I,JWKSInvalid:()=>A,JWKSMultipleMatchingKeys:()=>M,JWKSNoMatchingKey:()=>F,JWKSTimeout:()=>D,JWSInvalid:()=>B,JWSSignatureVerificationFailed:()=>R,JWTClaimValidationFailed:()=>_,JWTExpired:()=>x,JWTInvalid:()=>C});var n={};r.r(n),r.d(n,{decode:()=>Kt,encode:()=>Wt});const o=crypto,s=e=>e instanceof CryptoKey,a=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await o.subtle.digest(r,t))},l=new TextEncoder,d=new TextDecoder,c=2**32;function u(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let i=0;for(const t of e)r.set(t,i),i+=t.length;return r}function p(e,t,r){if(t<0||t>=c)throw new RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function h(e){const t=Math.floor(e/c),r=e%c,i=new Uint8Array(8);return p(i,t,0),p(i,r,4),i}function f(e){const t=new Uint8Array(4);return p(t,e),t}function m(e){return u(f(e.length),e)}const g=e=>{let t=e;"string"==typeof t&&(t=l.encode(t));const r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},y=e=>g(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),v=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},b=e=>{let t=e;t instanceof Uint8Array&&(t=d.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return v(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class w extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}w.code="ERR_JOSE_GENERIC";class _ extends w{constructor(e,t,r="unspecified",i="unspecified"){super(e,{cause:{claim:r,reason:i,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=i,this.payload=t}}_.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class x extends w{constructor(e,t,r="unspecified",i="unspecified"){super(e,{cause:{claim:r,reason:i,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=i,this.payload=t}}x.code="ERR_JWT_EXPIRED";class S extends w{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}S.code="ERR_JOSE_ALG_NOT_ALLOWED";class k extends w{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}k.code="ERR_JOSE_NOT_SUPPORTED";class E extends w{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}E.code="ERR_JWE_DECRYPTION_FAILED";class T extends w{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}T.code="ERR_JWE_INVALID";class B extends w{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}B.code="ERR_JWS_INVALID";class C extends w{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}C.code="ERR_JWT_INVALID";class I extends w{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}I.code="ERR_JWK_INVALID";class A extends w{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}A.code="ERR_JWKS_INVALID";class F extends w{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}F.code="ERR_JWKS_NO_MATCHING_KEY";class M extends w{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator,M.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class D extends w{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}D.code="ERR_JWKS_TIMEOUT";class R extends w{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}R.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const P=o.getRandomValues.bind(o);function O(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}const z=(e,t)=>{if(t.length<<3!==O(e))throw new T("Invalid Initialization Vector length")},N=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new T(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},q=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let i=0,n=-1;for(;++n<r;)i|=e[n]^t[n];return 0===i};function U(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function L(e,t){return e.name===t}function j(e){return parseInt(e.name.slice(4),10)}function H(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function $(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!L(e.algorithm,"HMAC"))throw U("HMAC");const r=parseInt(t.slice(2),10);if(j(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!L(e.algorithm,"RSASSA-PKCS1-v1_5"))throw U("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(j(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!L(e.algorithm,"RSA-PSS"))throw U("RSA-PSS");const r=parseInt(t.slice(2),10);if(j(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw U("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!L(e.algorithm,"ECDSA"))throw U("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw U(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}H(e,r)}function G(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!L(e.algorithm,"AES-GCM"))throw U("AES-GCM");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw U(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!L(e.algorithm,"AES-KW"))throw U("AES-KW");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw U(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw U("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!L(e.algorithm,"PBKDF2"))throw U("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!L(e.algorithm,"RSA-OAEP"))throw U("RSA-OAEP");const r=parseInt(t.slice(9),10)||1;if(j(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}H(e,r)}function W(e,t,...r){if((r=r.filter(Boolean)).length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const K=(e,...t)=>W("Key must be ",e,...t);function V(e,t,...r){return W(`Key for the ${e} algorithm must be `,t,...r)}const J=e=>!!s(e)||"KeyObject"===e?.[Symbol.toStringTag],Y=["CryptoKey"];const Q=async(e,t,r,i,n,a)=>{if(!(s(t)||t instanceof Uint8Array))throw new TypeError(K(t,...Y,"Uint8Array"));if(!i)throw new T("JWE Initialization Vector missing");if(!n)throw new T("JWE Authentication Tag missing");switch(z(e,i),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&N(t,parseInt(e.slice(-3),10)),async function(e,t,r,i,n,s){if(!(t instanceof Uint8Array))throw new TypeError(K(t,"Uint8Array"));const a=parseInt(e.slice(1,4),10),l=await o.subtle.importKey("raw",t.subarray(a>>3),"AES-CBC",!1,["decrypt"]),d=await o.subtle.importKey("raw",t.subarray(0,a>>3),{hash:"SHA-"+(a<<1),name:"HMAC"},!1,["sign"]),c=u(s,i,r,h(s.length<<3)),p=new Uint8Array((await o.subtle.sign("HMAC",d,c)).slice(0,a>>3));let f,m;try{f=q(n,p)}catch{}if(!f)throw new E;try{m=new Uint8Array(await o.subtle.decrypt({iv:i,name:"AES-CBC"},l,r))}catch{}if(!m)throw new E;return m}(e,t,r,i,n,a);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&N(t,parseInt(e.slice(1,4),10)),async function(e,t,r,i,n,s){let a;t instanceof Uint8Array?a=await o.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(G(t,e,"decrypt"),a=t);try{return new Uint8Array(await o.subtle.decrypt({additionalData:s,iv:i,name:"AES-GCM",tagLength:128},a,u(r,n)))}catch{throw new E}}(e,t,r,i,n,a);default:throw new k("Unsupported JWE Content Encryption Algorithm")}},Z=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function X(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}const ee=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function te(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function re(e,t,r){if(s(e))return G(e,t,r),e;if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw new TypeError(K(e,...Y,"Uint8Array"))}const ie=async(e,t,r)=>{const i=await re(t,e,"wrapKey");te(i,e);const n=await o.subtle.importKey("raw",r,...ee);return new Uint8Array(await o.subtle.wrapKey("raw",n,i,"AES-KW"))},ne=async(e,t,r)=>{const i=await re(t,e,"unwrapKey");te(i,e);const n=await o.subtle.unwrapKey("raw",r,i,"AES-KW",...ee);return new Uint8Array(await o.subtle.exportKey("raw",n))};async function oe(e,t,r,i,n=new Uint8Array(0),d=new Uint8Array(0)){if(!s(e))throw new TypeError(K(e,...Y));if(G(e,"ECDH"),!s(t))throw new TypeError(K(t,...Y));G(t,"ECDH","deriveBits");const c=u(m(l.encode(r)),m(n),m(d),f(i));let p;p="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3;return async function(e,t,r){const i=Math.ceil((t>>3)/32),n=new Uint8Array(32*i);for(let t=0;t<i;t++){const i=new Uint8Array(4+e.length+r.length);i.set(f(t+1)),i.set(e,4),i.set(r,4+e.length),n.set(await a("sha256",i),32*t)}return n.slice(0,t>>3)}(new Uint8Array(await o.subtle.deriveBits({name:e.algorithm.name,public:e},t,p)),i,c)}function se(e){if(!s(e))throw new TypeError(K(e,...Y));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function ae(e,t,r,i){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new T("PBES2 Salt Input must be 8 or more octets")}(e);const n=function(e,t){return u(l.encode(e),new Uint8Array([0]),t)}(t,e),a=parseInt(t.slice(13,16),10),d={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:n},c={length:a,name:"AES-KW"},p=await function(e,t){if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(s(e))return G(e,t,"deriveBits","deriveKey"),e;throw new TypeError(K(e,...Y,"Uint8Array"))}(i,t);if(p.usages.includes("deriveBits"))return new Uint8Array(await o.subtle.deriveBits(d,p,a));if(p.usages.includes("deriveKey"))return o.subtle.deriveKey(d,p,c,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}function le(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const de=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function ce(e){return X(e)&&"string"==typeof e.kty}const ue=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:r}=function(e){let t,r;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new k('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),i=[t,e.ext??!1,e.key_ops??r],n={...e};return delete n.alg,delete n.use,o.subtle.importKey("jwk",n,...i)},pe=e=>b(e);let he,fe;const me=e=>"KeyObject"===e?.[Symbol.toStringTag],ge=async(e,t,r,i,n=!1)=>{let o=e.get(t);if(o?.[i])return o[i];const s=await ue({...r,alg:i});return n&&Object.freeze(t),o?o[i]=s:e.set(t,{[i]:s}),s},ye=(e,t)=>{if(me(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?pe(r.k):(fe||(fe=new WeakMap),ge(fe,e,r,t))}if(ce(e)){if(e.k)return b(e.k);fe||(fe=new WeakMap);return ge(fe,e,e,t,!0)}return e},ve=(e,t)=>{if(me(e)){let r=e.export({format:"jwk"});return r.k?pe(r.k):(he||(he=new WeakMap),ge(he,e,r,t))}if(ce(e)){if(e.k)return b(e.k);he||(he=new WeakMap);return ge(he,e,e,t,!0)}return e};function be(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new k(`Unsupported JWE Algorithm: ${e}`)}}const we=e=>P(new Uint8Array(be(e)>>3)),_e=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join("\n")}\n-----END ${t}-----`,xe=async(e,t,r)=>{if(!s(r))throw new TypeError(K(r,...Y));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==e)throw new TypeError(`key is not a ${e} key`);return _e(g(new Uint8Array(await o.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},Se=e=>xe("public","spki",e),ke=e=>xe("private","pkcs8",e),Ee=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));const i=e.indexOf(t[0],r);if(-1===i)return!1;const n=e.subarray(i,i+t.length);return n.length===t.length&&(n.every(((e,r)=>e===t[r]))||Ee(e,t,i+1))},Te=e=>{switch(!0){case Ee(e,[42,134,72,206,61,3,1,7]):return"P-256";case Ee(e,[43,129,4,0,34]):return"P-384";case Ee(e,[43,129,4,0,35]):return"P-521";case Ee(e,[43,101,110]):return"X25519";case Ee(e,[43,101,111]):return"X448";case Ee(e,[43,101,112]):return"Ed25519";case Ee(e,[43,101,113]):return"Ed448";default:throw new k("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},Be=async(e,t,r,i,n)=>{let s,a;const l=new Uint8Array(atob(r.replace(e,"")).split("").map((e=>e.charCodeAt(0)))),d="spki"===t;switch(i){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${i.slice(-3)}`},a=d?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.slice(-3)}`},a=d?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(i.slice(-3),10)||1}`},a=d?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},a=d?["verify"]:["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},a=d?["verify"]:["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},a=d?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const e=Te(l);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},a=d?[]:["deriveBits"];break}case"EdDSA":s={name:Te(l)},a=d?["verify"]:["sign"];break;default:throw new k('Invalid or unsupported "alg" (Algorithm) value')}return o.subtle.importKey(t,l,s,n?.extractable??!1,a)},Ce=(e,t,r)=>Be(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),Ie=(e,t,r)=>Be(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function Ae(e){const t=[];let r=0;for(;r<e.length;){const i=Fe(e.subarray(r));t.push(i),r+=i.byteLength}return t}function Fe(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let i=0;if(e[t]<128)i=e[t],t++;else{if(128===i){for(i=0;0!==e[t+i]||0!==e[t+i+1];){if(i>e.byteLength)throw new TypeError("invalid indefinite form length");i++}const r=t+i+2;return{byteLength:r,contents:e.subarray(t,t+i),raw:e.subarray(0,r)}}{const r=127&e[t];t++,i=0;for(let n=0;n<r;n++)i=256*i+e[t],t++}}const n=t+i;return{byteLength:n,contents:e.subarray(t,n),raw:e.subarray(0,n)}}function Me(e){const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=v(t);return _e(function(e){const t=Ae(Ae(Fe(e).contents)[0].contents);return g(t[160===t[0].raw[0]?6:5].raw)}(r),"PUBLIC KEY")}const De=(e,t,r)=>{let i;try{i=Me(e)}catch(e){throw new TypeError("Failed to parse the X.509 certificate",{cause:e})}return Ie(i,t,r)};async function Re(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw new TypeError('"spki" must be SPKI formatted string');return Ie(e,t,r)}async function Pe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw new TypeError('"x509" must be X.509 formatted string');return De(e,t,r)}async function Oe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return Ce(e,t,r)}async function ze(e,t){if(!X(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return b(e.k);case"RSA":if(void 0!==e.oth)throw new k('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return ue({...e,alg:t});default:throw new k('Unsupported "kty" (Key Type) Parameter value')}}const Ne=e=>e?.[Symbol.toStringTag],qe=(e,t,r)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(r))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},Ue=(e,t,r,i)=>{if(!(t instanceof Uint8Array)){if(i&&ce(t)){if(function(e){return ce(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&qe(e,t,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!J(t))throw new TypeError(V(e,t,...Y,"Uint8Array",i?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${Ne(t)} instances for symmetric algorithms must be of type "secret"`)}};function Le(e,t,r,i){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?Ue(t,r,i,e):((e,t,r,i)=>{if(i&&ce(t))switch(r){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&qe(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&qe(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!J(t))throw new TypeError(V(e,t,...Y,i?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${Ne(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${Ne(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${Ne(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${Ne(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${Ne(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,r,i,e)}const je=Le.bind(void 0,!1),He=Le.bind(void 0,!0);const $e=async(e,t,r,i,n)=>{if(!(s(r)||r instanceof Uint8Array))throw new TypeError(K(r,...Y,"Uint8Array"));switch(i?z(e,i):i=P(new Uint8Array(O(e)>>3)),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&N(r,parseInt(e.slice(-3),10)),async function(e,t,r,i,n){if(!(r instanceof Uint8Array))throw new TypeError(K(r,"Uint8Array"));const s=parseInt(e.slice(1,4),10),a=await o.subtle.importKey("raw",r.subarray(s>>3),"AES-CBC",!1,["encrypt"]),l=await o.subtle.importKey("raw",r.subarray(0,s>>3),{hash:"SHA-"+(s<<1),name:"HMAC"},!1,["sign"]),d=new Uint8Array(await o.subtle.encrypt({iv:i,name:"AES-CBC"},a,t)),c=u(n,i,d,h(n.length<<3));return{ciphertext:d,tag:new Uint8Array((await o.subtle.sign("HMAC",l,c)).slice(0,s>>3)),iv:i}}(e,t,r,i,n);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&N(r,parseInt(e.slice(1,4),10)),async function(e,t,r,i,n){let s;r instanceof Uint8Array?s=await o.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(G(r,e,"encrypt"),s=r);const a=new Uint8Array(await o.subtle.encrypt({additionalData:n,iv:i,name:"AES-GCM",tagLength:128},s,t)),l=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:l,iv:i}}(e,t,r,i,n);default:throw new k("Unsupported JWE Content Encryption Algorithm")}};const Ge=async function(e,t,r,i,n){switch(je(e,t,"decrypt"),t=await(ve?.(t,e))||t,e){case"dir":if(void 0!==r)throw new T("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new T("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!X(i.epk))throw new T('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!se(t))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");const n=await ze(i.epk,e);let o,s;if(void 0!==i.apu){if("string"!=typeof i.apu)throw new T('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{o=b(i.apu)}catch{throw new T("Failed to base64url decode the apu")}}if(void 0!==i.apv){if("string"!=typeof i.apv)throw new T('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{s=b(i.apv)}catch{throw new T("Failed to base64url decode the apv")}}const a=await oe(n,t,"ECDH-ES"===e?i.enc:e,"ECDH-ES"===e?be(i.enc):parseInt(e.slice(-5,-2),10),o,s);if("ECDH-ES"===e)return a;if(void 0===r)throw new T("JWE Encrypted Key missing");return ne(e.slice(-6),a,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new T("JWE Encrypted Key missing");return(async(e,t,r)=>{if(!s(t))throw new TypeError(K(t,...Y));if(G(t,e,"decrypt","unwrapKey"),de(e,t),t.usages.includes("decrypt"))return new Uint8Array(await o.subtle.decrypt(le(e),t,r));if(t.usages.includes("unwrapKey")){const i=await o.subtle.unwrapKey("raw",r,t,le(e),...ee);return new Uint8Array(await o.subtle.exportKey("raw",i))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')})(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new T("JWE Encrypted Key missing");if("number"!=typeof i.p2c)throw new T('JOSE Header "p2c" (PBES2 Count) missing or invalid');const o=n?.maxPBES2Count||1e4;if(i.p2c>o)throw new T('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof i.p2s)throw new T('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let s;try{s=b(i.p2s)}catch{throw new T("Failed to base64url decode the p2s")}return(async(e,t,r,i,n)=>{const o=await ae(n,e,i,t);return ne(e.slice(-6),o,r)})(e,t,r,i.p2c,s)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new T("JWE Encrypted Key missing");return ne(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(void 0===r)throw new T("JWE Encrypted Key missing");if("string"!=typeof i.iv)throw new T('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof i.tag)throw new T('JOSE Header "tag" (Authentication Tag) missing or invalid');let n,o;try{n=b(i.iv)}catch{throw new T("Failed to base64url decode the iv")}try{o=b(i.tag)}catch{throw new T("Failed to base64url decode the tag")}return async function(e,t,r,i,n){const o=e.slice(0,7);return Q(o,t,r,i,n,new Uint8Array(0))}(e,t,r,n,o)}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}};const We=function(e,t,r,i,n){if(void 0!==n.crit&&void 0===i?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return new Set;if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of i.crit){if(!o.has(t))throw new k(`Extension Header Parameter "${t}" is not recognized`);if(void 0===n[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(o.get(t)&&void 0===i[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(i.crit)},Ke=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function Ve(e,t,r){if(!X(e))throw new T("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new T("JOSE Header missing");if(void 0!==e.iv&&"string"!=typeof e.iv)throw new T("JWE Initialization Vector incorrect type");if("string"!=typeof e.ciphertext)throw new T("JWE Ciphertext missing or incorrect type");if(void 0!==e.tag&&"string"!=typeof e.tag)throw new T("JWE Authentication Tag incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new T("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new T("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new T("JWE AAD incorrect type");if(void 0!==e.header&&!X(e.header))throw new T("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!X(e.unprotected))throw new T("JWE Per-Recipient Unprotected Header incorrect type");let i;if(e.protected)try{const t=b(e.protected);i=JSON.parse(d.decode(t))}catch{throw new T("JWE Protected Header is invalid")}if(!Z(i,e.header,e.unprotected))throw new T("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const n={...i,...e.header,...e.unprotected};if(We(T,new Map,r?.crit,i,n),void 0!==n.zip)throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:s}=n;if("string"!=typeof o||!o)throw new T("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof s||!s)throw new T("missing JWE Encryption Algorithm (enc) in JWE Header");const a=r&&Ke("keyManagementAlgorithms",r.keyManagementAlgorithms),c=r&&Ke("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(a&&!a.has(o)||!a&&o.startsWith("PBES2"))throw new S('"alg" (Algorithm) Header Parameter value not allowed');if(c&&!c.has(s))throw new S('"enc" (Encryption Algorithm) Header Parameter value not allowed');let p;if(void 0!==e.encrypted_key)try{p=b(e.encrypted_key)}catch{throw new T("Failed to base64url decode the encrypted_key")}let h,f,m,g=!1;"function"==typeof t&&(t=await t(i,e),g=!0);try{h=await Ge(o,t,p,n,r)}catch(e){if(e instanceof TypeError||e instanceof T||e instanceof k)throw e;h=we(s)}if(void 0!==e.iv)try{f=b(e.iv)}catch{throw new T("Failed to base64url decode the iv")}if(void 0!==e.tag)try{m=b(e.tag)}catch{throw new T("Failed to base64url decode the tag")}const y=l.encode(e.protected??"");let v,w;v=void 0!==e.aad?u(y,l.encode("."),l.encode(e.aad)):y;try{w=b(e.ciphertext)}catch{throw new T("Failed to base64url decode the ciphertext")}const _={plaintext:await Q(s,h,w,f,m,v)};if(void 0!==e.protected&&(_.protectedHeader=i),void 0!==e.aad)try{_.additionalAuthenticatedData=b(e.aad)}catch{throw new T("Failed to base64url decode the aad")}return void 0!==e.unprotected&&(_.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(_.unprotectedHeader=e.header),g?{..._,key:t}:_}async function Je(e,t,r){if(e instanceof Uint8Array&&(e=d.decode(e)),"string"!=typeof e)throw new T("Compact JWE must be a string or Uint8Array");const{0:i,1:n,2:o,3:s,4:a,length:l}=e.split(".");if(5!==l)throw new T("Invalid Compact JWE");const c=await Ve({ciphertext:s,iv:o||void 0,protected:i,tag:a||void 0,encrypted_key:n||void 0},t,r),u={plaintext:c.plaintext,protectedHeader:c.protectedHeader};return"function"==typeof t?{...u,key:c.key}:u}async function Ye(e,t,r){if(!X(e))throw new T("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(X))throw new T("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new T("JWE Recipients has no members");for(const i of e.recipients)try{return await Ve({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:i.encrypted_key,header:i.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch{}throw new E}const Qe=Symbol(),Ze=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:y(e)};if(!s(e))throw new TypeError(K(e,...Y,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:i,use:n,...a}=await o.subtle.exportKey("jwk",e);return a};async function Xe(e){return Se(e)}async function et(e){return ke(e)}async function tt(e){return Ze(e)}const rt=async function(e,t,r,i,n={}){let a,l,d;switch(je(e,r,"encrypt"),r=await(ye?.(r,e))||r,e){case"dir":d=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!se(r))throw new k("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:c,apv:u}=n;let{epk:p}=n;p||(p=(await async function(e){if(!s(e))throw new TypeError(K(e,...Y));return o.subtle.generateKey(e.algorithm,!0,["deriveBits"])}(r)).privateKey);const{x:h,y:f,crv:m,kty:g}=await tt(p),v=await oe(r,p,"ECDH-ES"===e?t:e,"ECDH-ES"===e?be(t):parseInt(e.slice(-5,-2),10),c,u);if(l={epk:{x:h,crv:m,kty:g}},"EC"===g&&(l.epk.y=f),c&&(l.apu=y(c)),u&&(l.apv=y(u)),"ECDH-ES"===e){d=v;break}d=i||we(t);const b=e.slice(-6);a=await ie(b,v,d);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":d=i||we(t),a=await(async(e,t,r)=>{if(!s(t))throw new TypeError(K(t,...Y));if(G(t,e,"encrypt","wrapKey"),de(e,t),t.usages.includes("encrypt"))return new Uint8Array(await o.subtle.encrypt(le(e),t,r));if(t.usages.includes("wrapKey")){const i=await o.subtle.importKey("raw",r,...ee);return new Uint8Array(await o.subtle.wrapKey("raw",i,t,le(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')})(e,r,d);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{d=i||we(t);const{p2c:o,p2s:s}=n;({encryptedKey:a,...l}=await(async(e,t,r,i=2048,n=P(new Uint8Array(16)))=>{const o=await ae(n,e,i,t);return{encryptedKey:await ie(e.slice(-6),o,r),p2c:i,p2s:y(n)}})(e,r,d,o,s));break}case"A128KW":case"A192KW":case"A256KW":d=i||we(t),a=await ie(e,r,d);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{d=i||we(t);const{iv:o}=n;({encryptedKey:a,...l}=await async function(e,t,r,i){const n=e.slice(0,7),o=await $e(n,r,t,i,new Uint8Array(0));return{encryptedKey:o.ciphertext,iv:y(o.iv),tag:y(o.tag)}}(e,r,d,o));break}default:throw new k('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:d,encryptedKey:a,parameters:l}};class it{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new T("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Z(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new T("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(We(T,new Map,t?.crit,this._protectedHeader,r),void 0!==r.zip)throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:i,enc:n}=r;if("string"!=typeof i||!i)throw new T('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof n||!n)throw new T('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let o,s,a,c,p;if(this._cek&&("dir"===i||"ECDH-ES"===i))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${i}`);{let r;({cek:s,encryptedKey:o,parameters:r}=await rt(i,n,e,this._cek,this._keyManagementParameters)),r&&(t&&Qe in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...r}:this.setUnprotectedHeader(r):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...r}:this.setProtectedHeader(r))}c=this._protectedHeader?l.encode(y(JSON.stringify(this._protectedHeader))):l.encode(""),this._aad?(p=y(this._aad),a=u(c,l.encode("."),l.encode(p))):a=c;const{ciphertext:h,tag:f,iv:m}=await $e(n,this._plaintext,s,this._iv,a),g={ciphertext:y(h)};return m&&(g.iv=y(m)),f&&(g.tag=y(f)),o&&(g.encrypted_key=y(o)),p&&(g.aad=p),this._protectedHeader&&(g.protected=d.decode(c)),this._sharedUnprotectedHeader&&(g.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(g.header=this._unprotectedHeader),g}}class nt{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class ot{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){const r=new nt(this,e,{crit:t?.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(){if(!this._recipients.length)throw new T("at least one recipient must be added");if(1===this._recipients.length){const[e]=this._recipients,t=await new it(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(e.unprotectedHeader).encrypt(e.key,{...e.options}),r={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.aad&&(r.aad=t.aad),t.protected&&(r.protected=t.protected),t.unprotected&&(r.unprotected=t.unprotected),t.encrypted_key&&(r.recipients[0].encrypted_key=t.encrypted_key),t.header&&(r.recipients[0].header=t.header),r}let e;for(let t=0;t<this._recipients.length;t++){const r=this._recipients[t];if(!Z(this._protectedHeader,this._unprotectedHeader,r.unprotectedHeader))throw new T("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const i={...this._protectedHeader,...this._unprotectedHeader,...r.unprotectedHeader},{alg:n}=i;if("string"!=typeof n||!n)throw new T('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===n||"ECDH-ES"===n)throw new T('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof i.enc||!i.enc)throw new T('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(e){if(e!==i.enc)throw new T('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else e=i.enc;if(We(T,new Map,r.options.crit,this._protectedHeader,i),void 0!==i.zip)throw new k('JWE "zip" (Compression Algorithm) Header Parameter is not supported.')}const t=we(e),r={ciphertext:"",iv:"",recipients:[],tag:""};for(let i=0;i<this._recipients.length;i++){const n=this._recipients[i],o={};r.recipients.push(o);const s={...this._protectedHeader,...this._unprotectedHeader,...n.unprotectedHeader}.alg.startsWith("PBES2")?2048+i:void 0;if(0===i){const e=await new it(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(t).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(n.unprotectedHeader).setKeyManagementParameters({p2c:s}).encrypt(n.key,{...n.options,[Qe]:!0});r.ciphertext=e.ciphertext,r.iv=e.iv,r.tag=e.tag,e.aad&&(r.aad=e.aad),e.protected&&(r.protected=e.protected),e.unprotected&&(r.unprotected=e.unprotected),o.encrypted_key=e.encrypted_key,e.header&&(o.header=e.header);continue}const{encryptedKey:a,parameters:l}=await rt(n.unprotectedHeader?.alg||this._protectedHeader?.alg||this._unprotectedHeader?.alg,e,n.key,t,{p2c:s});o.encrypted_key=y(a),(n.unprotectedHeader||l)&&(o.header={...n.unprotectedHeader,...l})}return r}}function st(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new k(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function at(e,t,r){if("sign"===r&&(t=await ve(t,e)),"verify"===r&&(t=await ye(t,e)),s(t))return $(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(K(t,...Y));return o.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(K(t,...Y,"Uint8Array","JSON Web Key"))}const lt=async(e,t,r,i)=>{const n=await at(e,t,"verify");de(e,n);const s=st(e,n.algorithm);try{return await o.subtle.verify(s,n,r,i)}catch{return!1}};async function dt(e,t,r){if(!X(e))throw new B("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new B('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new B("JWS Protected Header incorrect type");if(void 0===e.payload)throw new B("JWS Payload missing");if("string"!=typeof e.signature)throw new B("JWS Signature missing or incorrect type");if(void 0!==e.header&&!X(e.header))throw new B("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=b(e.protected);i=JSON.parse(d.decode(t))}catch{throw new B("JWS Protected Header is invalid")}if(!Z(i,e.header))throw new B("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...i,...e.header};let o=!0;if(We(B,new Map([["b64",!0]]),r?.crit,i,n).has("b64")&&(o=i.b64,"boolean"!=typeof o))throw new B('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=n;if("string"!=typeof s||!s)throw new B('JWS "alg" (Algorithm) Header Parameter missing or invalid');const a=r&&Ke("algorithms",r.algorithms);if(a&&!a.has(s))throw new S('"alg" (Algorithm) Header Parameter value not allowed');if(o){if("string"!=typeof e.payload)throw new B("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new B("JWS Payload must be a string or an Uint8Array instance");let c=!1;"function"==typeof t?(t=await t(i,e),c=!0,He(s,t,"verify"),ce(t)&&(t=await ze(t,s))):He(s,t,"verify");const p=u(l.encode(e.protected??""),l.encode("."),"string"==typeof e.payload?l.encode(e.payload):e.payload);let h;try{h=b(e.signature)}catch{throw new B("Failed to base64url decode the signature")}if(!await lt(s,t,h,p))throw new R;let f;if(o)try{f=b(e.payload)}catch{throw new B("Failed to base64url decode the payload")}else f="string"==typeof e.payload?l.encode(e.payload):e.payload;const m={payload:f};return void 0!==e.protected&&(m.protectedHeader=i),void 0!==e.header&&(m.unprotectedHeader=e.header),c?{...m,key:t}:m}async function ct(e,t,r){if(e instanceof Uint8Array&&(e=d.decode(e)),"string"!=typeof e)throw new B("Compact JWS must be a string or Uint8Array");const{0:i,1:n,2:o,length:s}=e.split(".");if(3!==s)throw new B("Invalid Compact JWS");const a=await dt({payload:n,protected:i,signature:o},t,r),l={payload:a.payload,protectedHeader:a.protectedHeader};return"function"==typeof t?{...l,key:a.key}:l}async function ut(e,t,r){if(!X(e))throw new B("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(X))throw new B("JWS Signatures missing or incorrect type");for(const i of e.signatures)try{return await dt({header:i.header,payload:e.payload,protected:i.protected,signature:i.signature},t,r)}catch{}throw new R}const pt=e=>Math.floor(e.getTime()/1e3),ht=86400,ft=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,mt=e=>{const t=ft.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const r=parseFloat(t[2]);let i;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":i=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":i=Math.round(60*r);break;case"hour":case"hours":case"hr":case"hrs":case"h":i=Math.round(3600*r);break;case"day":case"days":case"d":i=Math.round(r*ht);break;case"week":case"weeks":case"w":i=Math.round(604800*r);break;default:i=Math.round(31557600*r)}return"-"===t[1]||"ago"===t[4]?-i:i},gt=e=>e.toLowerCase().replace(/^application\//,""),yt=(e,t,r={})=>{let i;try{i=JSON.parse(d.decode(t))}catch{}if(!X(i))throw new C("JWT Claims Set must be a top-level JSON object");const{typ:n}=r;if(n&&("string"!=typeof e.typ||gt(e.typ)!==gt(n)))throw new _('unexpected "typ" JWT header value',i,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:a,audience:l,maxTokenAge:c}=r,u=[...o];void 0!==c&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==a&&u.push("sub"),void 0!==s&&u.push("iss");for(const e of new Set(u.reverse()))if(!(e in i))throw new _(`missing required "${e}" claim`,i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new _('unexpected "iss" claim value',i,"iss","check_failed");if(a&&i.sub!==a)throw new _('unexpected "sub" claim value',i,"sub","check_failed");if(l&&(p=i.aud,h="string"==typeof l?[l]:l,!("string"==typeof p?h.includes(p):Array.isArray(p)&&h.some(Set.prototype.has.bind(new Set(p))))))throw new _('unexpected "aud" claim value',i,"aud","check_failed");var p,h;let f;switch(typeof r.clockTolerance){case"string":f=mt(r.clockTolerance);break;case"number":f=r.clockTolerance;break;case"undefined":f=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:m}=r,g=pt(m||new Date);if((void 0!==i.iat||c)&&"number"!=typeof i.iat)throw new _('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new _('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>g+f)throw new _('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new _('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=g-f)throw new x('"exp" claim timestamp check failed',i,"exp","check_failed")}if(c){const e=g-i.iat;if(e-f>("number"==typeof c?c:mt(c)))throw new x('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-f)throw new _('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i};async function vt(e,t,r){const i=await ct(e,t,r);if(i.protectedHeader.crit?.includes("b64")&&!1===i.protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");const n={payload:yt(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...n,key:i.key}:n}async function bt(e,t,r){const i=await Je(e,t,r),n=yt(i.protectedHeader,i.plaintext,r),{protectedHeader:o}=i;if(void 0!==o.iss&&o.iss!==n.iss)throw new _('replicated "iss" claim header parameter mismatch',n,"iss","mismatch");if(void 0!==o.sub&&o.sub!==n.sub)throw new _('replicated "sub" claim header parameter mismatch',n,"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(n.aud))throw new _('replicated "aud" claim header parameter mismatch',n,"aud","mismatch");const s={payload:n,protectedHeader:o};return"function"==typeof t?{...s,key:i.key}:s}class wt{constructor(e){this._flattened=new it(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){const r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}const _t=async(e,t,r)=>{const i=await at(e,t,"sign");de(e,i);const n=await o.subtle.sign(st(e,i.algorithm),i,r);return new Uint8Array(n)};class xt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new B("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Z(this._protectedHeader,this._unprotectedHeader))throw new B("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader};let i=!0;if(We(B,new Map([["b64",!0]]),t?.crit,this._protectedHeader,r).has("b64")&&(i=this._protectedHeader.b64,"boolean"!=typeof i))throw new B('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:n}=r;if("string"!=typeof n||!n)throw new B('JWS "alg" (Algorithm) Header Parameter missing or invalid');He(n,e,"sign");let o,s=this._payload;i&&(s=l.encode(y(s))),o=this._protectedHeader?l.encode(y(JSON.stringify(this._protectedHeader))):l.encode("");const a=u(o,l.encode("."),s),c=await _t(n,e,a),p={signature:y(c),payload:""};return i&&(p.payload=d.decode(s)),this._unprotectedHeader&&(p.header=this._unprotectedHeader),this._protectedHeader&&(p.protected=d.decode(o)),p}}class St{constructor(e){this._flattened=new xt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const r=await this._flattened.sign(e,t);if(void 0===r.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class kt{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class Et{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){const r=new kt(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new B("at least one signature must be added");const e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){const r=this._signatures[t],i=new xt(this._payload);i.setProtectedHeader(r.protectedHeader),i.setUnprotectedHeader(r.unprotectedHeader);const{payload:n,...o}=await i.sign(r.key,r.options);if(0===t)e.payload=n;else if(e.payload!==n)throw new B("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(o)}return e}}function Tt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class Bt{constructor(e={}){if(!X(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:Tt("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Tt("setNotBefore",pt(e))}:this._payload={...this._payload,nbf:pt(new Date)+mt(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:Tt("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Tt("setExpirationTime",pt(e))}:this._payload={...this._payload,exp:pt(new Date)+mt(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:pt(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Tt("setIssuedAt",pt(e))}:this._payload="string"==typeof e?{...this._payload,iat:Tt("setIssuedAt",pt(new Date)+mt(e))}:{...this._payload,iat:Tt("setIssuedAt",e)},this}}class Ct extends Bt{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const r=new St(l.encode(JSON.stringify(this._payload)));if(r.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");return r.sign(e,t)}}class It extends Bt{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){const r=new wt(l.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}const At=(e,t)=>{if("string"!=typeof e||!e)throw new I(`${t} missing or invalid`)};async function Ft(e,t){if(!X(e))throw new TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":At(e.crv,'"crv" (Curve) Parameter'),At(e.x,'"x" (X Coordinate) Parameter'),At(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":At(e.crv,'"crv" (Subtype of Key Pair) Parameter'),At(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":At(e.e,'"e" (Exponent) Parameter'),At(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":At(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new k('"kty" (Key Type) Parameter missing or unsupported')}const i=l.encode(JSON.stringify(r));return y(await a(t,i))}async function Mt(e,t){t??(t="sha256");const r=await Ft(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function Dt(e,t){const r={...e,...t?.header};if(!X(r.jwk))throw new B('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const i=await ze({...r.jwk,ext:!0},r.alg);if(i instanceof Uint8Array||"public"!==i.type)throw new B('"jwk" (JSON Web Key) Header Parameter must be a public key');return i}function Rt(e){return X(e)}function Pt(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class Ot{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Rt)}(e))throw new A("JSON Web Key Set malformed");this._jwks=Pt(e)}async getKey(e,t){const{alg:r,kid:i}={...e,...t?.header},n=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new k('Unsupported "alg" value for a JSON Web Key Set')}}(r),o=this._jwks.keys.filter((e=>{let t=n===e.kty;if(t&&"string"==typeof i&&(t=i===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t})),{0:s,length:a}=o;if(0===a)throw new F;if(1!==a){const e=new M,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of o)try{yield await zt(t,e,r)}catch{}},e}return zt(this._cached,s,r)}}async function zt(e,t,r){const i=e.get(t)||e.set(t,{}).get(t);if(void 0===i[r]){const e=await ze({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new A("JSON Web Key Set members must be public keys");i[r]=e}return i[r]}function Nt(e){const t=new Ot(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>Pt(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}const qt=async(e,t,r)=>{let i,n,o=!1;"function"==typeof AbortController&&(i=new AbortController,n=setTimeout((()=>{o=!0,i.abort()}),t));const s=await fetch(e.href,{signal:i?i.signal:void 0,redirect:"manual",headers:r.headers}).catch((e=>{if(o)throw new D;throw e}));if(void 0!==n&&clearTimeout(n),200!==s.status)throw new w("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch{throw new w("Failed to parse the JSON Web Key Set HTTP response as JSON")}};let Ut;if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){Ut=`${"jose"}/${"v5.9.4"}`}const Lt=Symbol();class jt{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var r,i;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[Lt]&&(this._cache=t?.[Lt],r=t?.[Lt],i=this._cacheMaxAge,"object"==typeof r&&null!==r&&"uat"in r&&"number"==typeof r.uat&&!(Date.now()-r.uat>=i)&&"jwks"in r&&X(r.jwks)&&Array.isArray(r.jwks.keys)&&Array.prototype.every.call(r.jwks.keys,X)&&(this._jwksTimestamp=this._cache.uat,this._local=Nt(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(r){if(r instanceof F&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw r}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);Ut&&!e.has("User-Agent")&&(e.set("User-Agent",Ut),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=qt(this._url,this._timeoutDuration,this._options).then((e=>{this._local=Nt(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function Ht(e,t){const r=new jt(e,t),i=async(e,t)=>r.getKey(e,t);return Object.defineProperties(i,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>r._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),i}const $t=Lt;class Gt extends Bt{encode(){return`${y(JSON.stringify({alg:"none"}))}.${y(JSON.stringify(this._payload))}.`}static decode(e,t){if("string"!=typeof e)throw new C("Unsecured JWT must be a string");const{0:r,1:i,2:n,length:o}=e.split(".");if(3!==o||""!==n)throw new C("Invalid Unsecured JWT");let s;try{if(s=JSON.parse(d.decode(b(r))),"none"!==s.alg)throw new Error}catch{throw new C("Invalid Unsecured JWT")}return{payload:yt(s,b(i),t),header:s}}}const Wt=y,Kt=b;function Vt(e){let t;if("string"==typeof e){const r=e.split(".");3!==r.length&&5!==r.length||([t]=r)}else if("object"==typeof e&&e){if(!("protected"in e))throw new TypeError("Token does not contain a Protected Header");t=e.protected}try{if("string"!=typeof t||!t)throw new Error;const e=JSON.parse(d.decode(Kt(t)));if(!X(e))throw new Error;return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}function Jt(e){if("string"!=typeof e)throw new C("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:r}=e.split(".");if(5===r)throw new C("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new C("Invalid JWT");if(!t)throw new C("JWTs must contain a payload");let i,n;try{i=Kt(t)}catch{throw new C("Failed to base64url decode the payload")}try{n=JSON.parse(d.decode(i))}catch{throw new C("Failed to parse the decoded payload as JSON")}if(!X(n))throw new C("Invalid JWT Claims Set");return n}function Yt(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new k("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function Qt(e,t){return async function(e,t){let r,i;switch(e){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Yt(t)},i=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Yt(t)},i=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Yt(t)},i=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":r={name:"ECDSA",namedCurve:"P-256"},i=["sign","verify"];break;case"ES384":r={name:"ECDSA",namedCurve:"P-384"},i=["sign","verify"];break;case"ES512":r={name:"ECDSA",namedCurve:"P-521"},i=["sign","verify"];break;case"EdDSA":{i=["sign","verify"];const e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":r={name:e};break;default:throw new k("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{i=["deriveKey","deriveBits"];const e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":r={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":r={name:e};break;default:throw new k("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(r,t?.extractable??!1,i)}(e,t)}async function Zt(e,t){return async function(e,t){let r,i,n;switch(e){case"HS256":case"HS384":case"HS512":r=parseInt(e.slice(-3),10),i={name:"HMAC",hash:`SHA-${r}`,length:r},n=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r=parseInt(e.slice(-3),10),P(new Uint8Array(r>>3));case"A128KW":case"A192KW":case"A256KW":r=parseInt(e.slice(1,4),10),i={name:"AES-KW",length:r},n=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":r=parseInt(e.slice(1,4),10),i={name:"AES-GCM",length:r},n=["encrypt","decrypt"];break;default:throw new k('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(i,t?.extractable??!1,n)}(e,t)}const Xt="WebCryptoAPI"},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},62951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},64589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},23241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:e=>{"use strict";e.exports={rE:"6.5.7"}},81813:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},15579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>jH});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{AccessPolicy:()=>go,AppendBlobAppendBlockExceptionHeaders:()=>Qa,AppendBlobAppendBlockFromUrlExceptionHeaders:()=>Xa,AppendBlobAppendBlockFromUrlHeaders:()=>Za,AppendBlobAppendBlockHeaders:()=>Ya,AppendBlobCreateExceptionHeaders:()=>Ja,AppendBlobCreateHeaders:()=>Va,AppendBlobSealExceptionHeaders:()=>tl,AppendBlobSealHeaders:()=>el,ArrowConfiguration:()=>Oo,ArrowField:()=>zo,BlobAbortCopyFromURLExceptionHeaders:()=>ba,BlobAbortCopyFromURLHeaders:()=>va,BlobAcquireLeaseExceptionHeaders:()=>ia,BlobAcquireLeaseHeaders:()=>ra,BlobBreakLeaseExceptionHeaders:()=>ua,BlobBreakLeaseHeaders:()=>ca,BlobChangeLeaseExceptionHeaders:()=>da,BlobChangeLeaseHeaders:()=>la,BlobCopyFromURLExceptionHeaders:()=>ya,BlobCopyFromURLHeaders:()=>ga,BlobCreateSnapshotExceptionHeaders:()=>ha,BlobCreateSnapshotHeaders:()=>pa,BlobDeleteExceptionHeaders:()=>Ls,BlobDeleteHeaders:()=>Us,BlobDeleteImmutabilityPolicyExceptionHeaders:()=>Qs,BlobDeleteImmutabilityPolicyHeaders:()=>Ys,BlobDownloadExceptionHeaders:()=>zs,BlobDownloadHeaders:()=>Os,BlobFlatListSegment:()=>vo,BlobGetAccountInfoExceptionHeaders:()=>Sa,BlobGetAccountInfoHeaders:()=>xa,BlobGetPropertiesExceptionHeaders:()=>qs,BlobGetPropertiesHeaders:()=>Ns,BlobGetTagsExceptionHeaders:()=>Ba,BlobGetTagsHeaders:()=>Ta,BlobHierarchyListSegment:()=>So,BlobItemInternal:()=>bo,BlobName:()=>wo,BlobPrefix:()=>ko,BlobPropertiesInternal:()=>_o,BlobQueryExceptionHeaders:()=>Ea,BlobQueryHeaders:()=>ka,BlobReleaseLeaseExceptionHeaders:()=>oa,BlobReleaseLeaseHeaders:()=>na,BlobRenewLeaseExceptionHeaders:()=>aa,BlobRenewLeaseHeaders:()=>sa,BlobServiceProperties:()=>Yn,BlobServiceStatistics:()=>io,BlobSetExpiryExceptionHeaders:()=>Gs,BlobSetExpiryHeaders:()=>$s,BlobSetHttpHeadersExceptionHeaders:()=>Ks,BlobSetHttpHeadersHeaders:()=>Ws,BlobSetImmutabilityPolicyExceptionHeaders:()=>Js,BlobSetImmutabilityPolicyHeaders:()=>Vs,BlobSetLegalHoldExceptionHeaders:()=>Xs,BlobSetLegalHoldHeaders:()=>Zs,BlobSetMetadataExceptionHeaders:()=>ta,BlobSetMetadataHeaders:()=>ea,BlobSetTagsExceptionHeaders:()=>Ia,BlobSetTagsHeaders:()=>Ca,BlobSetTierExceptionHeaders:()=>_a,BlobSetTierHeaders:()=>wa,BlobStartCopyFromURLExceptionHeaders:()=>ma,BlobStartCopyFromURLHeaders:()=>fa,BlobTag:()=>fo,BlobTags:()=>ho,BlobUndeleteExceptionHeaders:()=>Hs,BlobUndeleteHeaders:()=>js,Block:()=>Bo,BlockBlobCommitBlockListExceptionHeaders:()=>ul,BlockBlobCommitBlockListHeaders:()=>cl,BlockBlobGetBlockListExceptionHeaders:()=>hl,BlockBlobGetBlockListHeaders:()=>pl,BlockBlobPutBlobFromUrlExceptionHeaders:()=>ol,BlockBlobPutBlobFromUrlHeaders:()=>nl,BlockBlobStageBlockExceptionHeaders:()=>al,BlockBlobStageBlockFromURLExceptionHeaders:()=>dl,BlockBlobStageBlockFromURLHeaders:()=>ll,BlockBlobStageBlockHeaders:()=>sl,BlockBlobUploadExceptionHeaders:()=>il,BlockBlobUploadHeaders:()=>rl,BlockList:()=>To,BlockLookupList:()=>Eo,ClearRange:()=>Ao,ContainerAcquireLeaseExceptionHeaders:()=>_s,ContainerAcquireLeaseHeaders:()=>ws,ContainerBreakLeaseExceptionHeaders:()=>Bs,ContainerBreakLeaseHeaders:()=>Ts,ContainerChangeLeaseExceptionHeaders:()=>Is,ContainerChangeLeaseHeaders:()=>Cs,ContainerCreateExceptionHeaders:()=>ts,ContainerCreateHeaders:()=>es,ContainerDeleteExceptionHeaders:()=>os,ContainerDeleteHeaders:()=>ns,ContainerFilterBlobsExceptionHeaders:()=>bs,ContainerFilterBlobsHeaders:()=>vs,ContainerGetAccessPolicyExceptionHeaders:()=>ds,ContainerGetAccessPolicyHeaders:()=>ls,ContainerGetAccountInfoExceptionHeaders:()=>Ps,ContainerGetAccountInfoHeaders:()=>Rs,ContainerGetPropertiesExceptionHeaders:()=>is,ContainerGetPropertiesHeaders:()=>rs,ContainerItem:()=>so,ContainerListBlobFlatSegmentExceptionHeaders:()=>Fs,ContainerListBlobFlatSegmentHeaders:()=>As,ContainerListBlobHierarchySegmentExceptionHeaders:()=>Ds,ContainerListBlobHierarchySegmentHeaders:()=>Ms,ContainerProperties:()=>ao,ContainerReleaseLeaseExceptionHeaders:()=>Ss,ContainerReleaseLeaseHeaders:()=>xs,ContainerRenameExceptionHeaders:()=>ms,ContainerRenameHeaders:()=>fs,ContainerRenewLeaseExceptionHeaders:()=>Es,ContainerRenewLeaseHeaders:()=>ks,ContainerRestoreExceptionHeaders:()=>hs,ContainerRestoreHeaders:()=>ps,ContainerSetAccessPolicyExceptionHeaders:()=>us,ContainerSetAccessPolicyHeaders:()=>cs,ContainerSetMetadataExceptionHeaders:()=>as,ContainerSetMetadataHeaders:()=>ss,ContainerSubmitBatchExceptionHeaders:()=>ys,ContainerSubmitBatchHeaders:()=>gs,CorsRule:()=>eo,DelimitedTextConfiguration:()=>Ro,FilterBlobItem:()=>po,FilterBlobSegment:()=>uo,GeoReplication:()=>no,JsonTextConfiguration:()=>Po,KeyInfo:()=>lo,ListBlobsFlatSegmentResponse:()=>yo,ListBlobsHierarchySegmentResponse:()=>xo,ListContainersSegmentResponse:()=>oo,Logging:()=>Qn,Metrics:()=>Xn,PageBlobClearPagesExceptionHeaders:()=>Pa,PageBlobClearPagesHeaders:()=>Ra,PageBlobCopyIncrementalExceptionHeaders:()=>Ka,PageBlobCopyIncrementalHeaders:()=>Wa,PageBlobCreateExceptionHeaders:()=>Fa,PageBlobCreateHeaders:()=>Aa,PageBlobGetPageRangesDiffExceptionHeaders:()=>La,PageBlobGetPageRangesDiffHeaders:()=>Ua,PageBlobGetPageRangesExceptionHeaders:()=>qa,PageBlobGetPageRangesHeaders:()=>Na,PageBlobResizeExceptionHeaders:()=>Ha,PageBlobResizeHeaders:()=>ja,PageBlobUpdateSequenceNumberExceptionHeaders:()=>Ga,PageBlobUpdateSequenceNumberHeaders:()=>$a,PageBlobUploadPagesExceptionHeaders:()=>Da,PageBlobUploadPagesFromURLExceptionHeaders:()=>za,PageBlobUploadPagesFromURLHeaders:()=>Oa,PageBlobUploadPagesHeaders:()=>Ma,PageList:()=>Co,PageRange:()=>Io,QueryFormat:()=>Do,QueryRequest:()=>Fo,QuerySerialization:()=>Mo,RetentionPolicy:()=>Zn,ServiceFilterBlobsExceptionHeaders:()=>Xo,ServiceFilterBlobsHeaders:()=>Zo,ServiceGetAccountInfoExceptionHeaders:()=>Jo,ServiceGetAccountInfoHeaders:()=>Vo,ServiceGetPropertiesExceptionHeaders:()=>Lo,ServiceGetPropertiesHeaders:()=>Uo,ServiceGetStatisticsExceptionHeaders:()=>Ho,ServiceGetStatisticsHeaders:()=>jo,ServiceGetUserDelegationKeyExceptionHeaders:()=>Ko,ServiceGetUserDelegationKeyHeaders:()=>Wo,ServiceListContainersSegmentExceptionHeaders:()=>Go,ServiceListContainersSegmentHeaders:()=>$o,ServiceSetPropertiesExceptionHeaders:()=>qo,ServiceSetPropertiesHeaders:()=>No,ServiceSubmitBatchExceptionHeaders:()=>Qo,ServiceSubmitBatchHeaders:()=>Yo,SignedIdentifier:()=>mo,StaticWebsite:()=>to,StorageError:()=>ro,UserDelegationKey:()=>co});function t(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function r(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function i(e,t){var r,i,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e){return this instanceof o?(this.v=e,this):new o(e)}function s(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),s=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),i[Symbol.asyncIterator]=function(){return this},i;function a(e,t){n[e]&&(i[e]=function(t){return new Promise((function(r,i){s.push([e,t,r,i])>1||l(e,t)}))},t&&(i[e]=t(i[e])))}function l(e,t){try{!function(e){e.value instanceof o?Promise.resolve(e.value.v).then(d,c):u(s[0][2],e)}(n[e](t))}catch(e){u(s[0][3],e)}}function d(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),s.shift(),s.length&&l(s[0][0],s[0][1])}}function a(e){var t,r;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:o(e[i](t)),done:!1}:n?n(t):t}:n}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=n(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const d=()=>"",c=/\s+at.*[(\s](.*)\)?/,u=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function p(e,{pretty:t=!1,basePath:r,pathFilter:i}={}){const n=r&&new RegExp(`(file://)?${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(r.replace(/\\/g,"/"))}/?`,"g"),o=t?d():"";if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(c);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar"))&&(i?!u.test(r)&&i(r):!u.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"")),t&&(e=e.replace(c,((e,t)=>e.replace(t,t.replace(o,"~"))))),e))).join("\n")}class h extends Error{#e;name="AggregateError";constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=e.map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>"string"==typeof e.stack&&e.stack.length>0?p(e.stack).replaceAll(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""):String(e))).join("\n");t="\n"+function(e,t=1,r={}){const{indent:i=" ",includeEmptyLines:n=!1}=r;if("string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if("string"!=typeof i)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof i}\``);if(0===t)return e;const o=n?/^/gm:/^(?!\s*$)/gm;return e.replace(o,i.repeat(t))}(t,4),super(t),this.#e=e}get errors(){return[...this.#e]}}var f=__webpack_require__(88055),m=__webpack_require__.n(f),g=__webpack_require__(7350),y=__webpack_require__.n(g);
|
||
/**
|
||
* @license lucide v0.416.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/
|
||
const v=(e,t,r=[])=>{const i=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.keys(t).forEach((e=>{i.setAttribute(e,String(t[e]))})),r.length&&r.forEach((e=>{const t=v(...e);i.appendChild(t)})),i};var b=([e,t,r])=>v(e,t,r);
|
||
/**
|
||
* @license lucide v0.416.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/
|
||
const w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},_=["svg",w,[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]]],x=["svg",w,[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}],["path",{d:"M16 16h5v5"}]]],S=["svg",w,[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]]],k=require("obsidian");let E=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};const T="uwxv4ofkrmc4zzf",B="3729fc1c-0af2-4bec-9376-d7ac4f0ff806",C="https://login.microsoftonline.com/common",I="application/octet-stream",A="remotely-save",F="remotely-save-cb-onedrive",M="remotely-save-cb-dropbox",D=6912e6,R="_debug_remotely_save/",P="remotely-save-cb-pro",O="cli-RcskZDNbskll95WHJ3rNa8G34YlD3DML3cmwGOpEpbpvm82rIVGWmQMKJ60NjjGJKB6H_fOeHicW9W0H",z="573787634452-5301p7h0r85rpc03hbnrn5k9qqt3bulf.apps.googleusercontent.com",N="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",q="remotely-save-cb-box",U="o0ohclnln6xf7fpd1pnomqpl42v0w3hl",L="oDrcpdgifz24NJMN6OmgC2kvYCChbYMX",j="remotely-save-cb-pcloud",H="zrDphYT1giQ",$="TqjVEEaXlsHwCOczzm0R9SBmxf2y",G="remotely-save-cb-yandexdisk",W="01d8aee92915469dba50b70965d77323",K="71da4965f9124deab95444df46afa651",V="remotely-save-cb-koofr",J="LUOCNJ27DECBGKZRG22RHPBAMVK3CUWF",Y="WJH6XQF2AXK6UINDM2T3STD7OAYCX6H4ZL3T4KPYSTW4R5AKI4W26Q6C76WZQ5DT",Q="remotely-save-cb-onedrivefull";function Z(e,t,r){var i;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var n=0;n<t.chars.length;++n)t.codes[t.chars[n]]=n}if(!r.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var o=e.length;"="===e[o-1];)if(--o,!(r.loose||(e.length-o)*t.bits&7))throw new SyntaxError("Invalid padding");for(var s=new(null!=(i=r.out)?i:Uint8Array)(o*t.bits/8|0),a=0,l=0,d=0,c=0;c<o;++c){var u=t.codes[e[c]];if(void 0===u)throw new SyntaxError("Invalid character "+e[c]);l=l<<t.bits|u,(a+=t.bits)>=8&&(a-=8,s[d++]=255&l>>a)}if(a>=t.bits||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return s}function X(e,t,r){void 0===r&&(r={});for(var i=r.pad,n=void 0===i||i,o=(1<<t.bits)-1,s="",a=0,l=0,d=0;d<e.length;++d)for(l=l<<8|255&e[d],a+=8;a>t.bits;)a-=t.bits,s+=t.chars[o&l>>a];if(a&&(s+=t.chars[o&l<<t.bits-a]),n)for(;s.length*t.bits&7;)s+="=";return s}var ee={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},te={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},re=function(e,t){return void 0===t&&(t={}),Z(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,ee,t)},ie=function(e,t){return Z(e,te,t)},ne=function(e,t){return X(e,te,t)};const oe="https://remotelysave.com";console.debug(`remotelysave official website: ${oe}`);const se={accessToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,refreshToken:"",enabledProFeatures:[],email:""},ae=e=>r(void 0,void 0,void 0,(function*(){const t=O,i=E(128),n=yield function(e){return r(this,void 0,void 0,(function*(){if(void 0===e||""===e)return"";try{return ne(new Uint8Array(yield crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e))),{pad:!1})}catch(e){return""}}))}(i);let o=`${oe}/oauth2/authorize?response_type=code&client_id=${t}&token_access_type=offline&code_challenge_method=S256&code_challenge=${n}&scope=pro.list.read`;return e&&(o+=`&redirect_uri=obsidian://${P}`),{authUrl:o,codeVerifier:i,codeChallenge:n}})),le=(e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=O;try{const i={code:t,grant_type:"authorization_code",code_verifier:e,client_id:r,scope:"pro.list.read"},n=yield fetch(`${oe}/api/v1/oauth2/token`,{method:"POST",body:new URLSearchParams(i)});return yield n.json()}catch(e){console.error(e),void 0!==i&&(yield i(e))}})),de=(e,t,i)=>r(void 0,void 0,void 0,(function*(){if(void 0!==t.error)throw Error(`remotely save account auth failed, please auth again: ${t.error}`);e.accessToken=t.access_token,e.accessTokenExpiresAtTimeMs=Date.now()+1e3*t.expires_in-3e5,e.accessTokenExpiresInMs=1e3*t.expires_in,e.refreshToken=t.refresh_token||e.refreshToken,e.credentialsShouldBeDeletedAtTimeMs=Date.now()+D,yield null==i?void 0:i(),console.info("finish updating local info of Remotely Save official website token")})),ce=(e,t)=>r(void 0,void 0,void 0,(function*(){var i,n,o;const s=Date.now();if(void 0!==e.accessToken&&""!==e.accessToken&&e.accessTokenExpiresAtTimeMs>s&&(null!==(i=e.credentialsShouldBeDeletedAtTimeMs)&&void 0!==i?i:s+1e6)>s)return e.accessToken;console.debug(`currently, accessToken=${e.accessToken}, accessTokenExpiresAtTimeMs=${e.accessTokenExpiresAtTimeMs}, credentialsShouldBeDeletedAtTimeMs=${e.credentialsShouldBeDeletedAtTimeMs},comp1=${e.accessTokenExpiresAtTimeMs>s}, comp2=${(null!==(n=e.credentialsShouldBeDeletedAtTimeMs)&&void 0!==n?n:s+1e6)>s}`);const a=yield(l=null!==(o=e.refreshToken)&&void 0!==o?o:"refresh-",r(void 0,void 0,void 0,(function*(){const e=O;try{console.info("start auto getting refreshed Remotely Save access token.");const t=yield fetch(`${oe}/api/v1/oauth2/token`,{method:"POST",body:new URLSearchParams({grant_type:"refresh_token",refresh_token:l,client_id:e,scope:"pro.list.read"})}),r=yield t.json();return console.info("finish auto getting refreshed Remotely Save access token."),r}catch(e){throw console.error(e),e}})));var l;if(yield de(e,a,t),void 0!==a.error)throw Error("cannot update accessToken");return a.access_token})),ue=(e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=yield ce(e,i),n=yield fetch(`${oe}/api/v1/pro/list`,{method:"GET",headers:{Authorization:`Bearer ${r}`,"REMOTELYSAVE-API-Plugin-Ver":t}}),o=yield n.json();return e.enabledProFeatures=o.proFeatures,yield null==i?void 0:i(),o})),pe=(e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=yield ce(e,i),n=yield fetch(`${oe}/api/v1/profile/list`,{method:"GET",headers:{Authorization:`Bearer ${r}`,"REMOTELYSAVE-API-Plugin-Ver":t}}),o=yield n.json();return e.email=o.email,yield null==i?void 0:i(),o}));var he=__webpack_require__(57975);const fe=new Set(["Deserialize","Serialize","Retry","Sign"]);class me{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!fe.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!fe.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((r=>!(e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase)||(t.push(r.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>r=>t.sendRequest(r,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new me(this._policies)}static create(){return new me}orderPolicies(){const e=[],t=new Map;function r(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const i=r("Serialize"),n=r("None"),o=r("Deserialize"),s=r("Retry"),a=r("Sign"),l=[i,n,o,s,a];function d(e){return"Retry"===e?s:"Serialize"===e?i:"Deserialize"===e?o:"Sign"===e?a:n}for(const e of this._policies){const r=e.policy,i=e.options,n=r.name;if(t.has(n))throw new Error("Duplicate policy names not allowed in pipeline");const o={policy:r,dependsOn:new Set,dependants:new Set};i.afterPhase&&(o.afterPhase=d(i.afterPhase),o.afterPhase.hasAfterPolicies=!0),t.set(n,o);d(i.phase).policies.add(o)}for(const e of this._policies){const{policy:r,options:i}=e,n=r.name,o=t.get(n);if(!o)throw new Error(`Missing node for policy ${n}`);if(i.afterPolicies)for(const e of i.afterPolicies){const r=t.get(e);r&&(o.dependsOn.add(r),r.dependants.add(o))}if(i.beforePolicies)for(const e of i.beforePolicies){const r=t.get(e);r&&(r.dependsOn.add(o),o.dependants.add(r))}}function c(r){r.hasRun=!0;for(const i of r.policies)if((!i.afterPhase||i.afterPhase.hasRun&&!i.afterPhase.policies.size)&&0===i.dependsOn.size){e.push(i.policy);for(const e of i.dependants)e.dependsOn.delete(i);t.delete(i.policy.name),r.policies.delete(i)}}function u(){for(const e of l){if(c(e),e.policies.size>0&&e!==n)return void(n.hasRun||c(n));e.hasAfterPolicies&&c(n)}}let p=0;for(;t.size>0;){p++;const t=e.length;if(u(),e.length<=t&&p>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}function ge(){return me.create()}var ye=__webpack_require__(65606);const ve=void(void 0!==ye&&ye.env);let be,we=[],_e=[];const xe=[];ve&&ke(ve);const Se=Object.assign((e=>Te(e)),{enable:ke,enabled:Ee,disable:function(){const e=be||"";return ke(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function ke(e){be=e,we=[],_e=[];const t=/\*/g,r=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of r)e.startsWith("-")?_e.push(new RegExp(`^${e.substr(1)}$`)):we.push(new RegExp(`^${e}$`));for(const e of xe)e.enabled=Ee(e.namespace)}function Ee(e){if(e.endsWith("*"))return!0;for(const t of _e)if(t.test(e))return!1;for(const t of we)if(t.test(e))return!0;return!1}function Te(e){const t=Object.assign((function(...r){if(!t.enabled)return;r.length>0&&(r[0]=`${e} ${r[0]}`);t.log(...r)}),{enabled:Ee(e),destroy:Be,log:Se.log,namespace:e,extend:Ce});return xe.push(t),t}function Be(){const e=xe.indexOf(this);return e>=0&&(xe.splice(e,1),!0)}function Ce(e){const t=Te(`${this.namespace}:${e}`);return t.log=this.log,t}const Ie=Se;var Ae=__webpack_require__(65606);const Fe=new Set,Me=void 0!==Ae&&Ae.env&&Ae.env.AZURE_LOG_LEVEL||void 0;let De;const Re=Ie("azure");Re.log=(...e)=>{Ie.log(...e)};const Pe=["verbose","info","warning","error"];Me&&(Le(Me)?function(e){if(e&&!Le(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Pe.join(",")}`);De=e;const t=[];for(const e of Fe)Ue(e)&&t.push(e.namespace);Ie.enable(t.join(","))}(Me):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Me}'; logging is not enabled. Acceptable values: ${Pe.join(", ")}.`));const Oe={verbose:400,info:300,warning:200,error:100};function ze(e){const t=Re.extend(e);return Ne(Re,t),{error:qe(t,"error"),warning:qe(t,"warning"),info:qe(t,"info"),verbose:qe(t,"verbose")}}function Ne(e,t){t.log=(...t)=>{e.log(...t)}}function qe(e,t){const r=Object.assign(e.extend(t),{level:t});if(Ne(e,r),Ue(r)){const e=Ie.disable();Ie.enable(e+","+r.namespace)}return Fe.add(r),r}function Ue(e){return Boolean(De&&Oe[e.level]<=Oe[De])}function Le(e){return Pe.includes(e)}const je=ze("core-rest-pipeline");class He extends Error{constructor(e){super(e),this.name="AbortError"}}function $e(e,t){let r;const{abortSignal:i,abortErrorMsg:n}=null!=t?t:{};return function(e,t){const{cleanupBeforeAbort:r,abortSignal:i,abortErrorMsg:n}=null!=t?t:{};return new Promise(((t,o)=>{function s(){o(new He(null!=n?n:"The operation was aborted."))}function a(){null==i||i.removeEventListener("abort",l)}function l(){null==r||r(),a(),s()}if(null==i?void 0:i.aborted)return s();try{e((e=>{a(),t(e)}),(e=>{a(),o(e)}))}catch(e){o(e)}null==i||i.addEventListener("abort",l)}))}((t=>{r=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:null!=n?n:"The delay was aborted."})}function Ge(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function We(e){if(Ge(e)){const t="string"==typeof e.name,r="string"==typeof e.message;return t&&r}return!1}function Ke(e){if(We(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Ve(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Je(e);case"base64url":return function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return Je(t)}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let r=0;r<e.length/2;++r){const i=e[2*r],n=e[2*r+1];if(!Ye.has(i)||!Ye.has(n))return t.slice(0,r);t[r]=parseInt(`${i}${n}`,16)}return t}(e)}}function Je(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Ye=new Set("0123456789abcdefABCDEF");function Qe(){let e="";for(let t=0;t<32;t++){const r=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&r|8:r.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e}var Ze;const Xe="function"==typeof(null===(Ze=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Ze?void 0:Ze.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):Qe;function et(){return Xe()}var tt,rt,it;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(tt=self.constructor)||void 0===tt?void 0:tt.name)||"ServiceWorkerGlobalScope"===(null===(rt=self.constructor)||void 0===rt?void 0:rt.name)||null===(it=self.constructor)||void 0===it||it.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const nt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(void 0),ot=nt,st=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),at=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],lt=["api-version"];class dt{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=at.concat(e),t=lt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,r)=>{if(r instanceof Error)return Object.assign(Object.assign({},r),{name:r.name,message:r.message});if("headers"===e)return this.sanitizeHeaders(r);if("url"===e)return this.sanitizeUrl(r);if("query"===e)return this.sanitizeQuery(r);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(r)||Ge(r)){if(t.has(r))return"[Circular]";t.add(r)}return r}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,st);return t.toString()}sanitizeHeaders(e){const t={};for(const r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?t[r]=e[r]:t[r]=st;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?t[r]=e[r]:t[r]=st;return t}}const ct="redirectPolicy",ut=["GET","HEAD"];function pt(e={}){const{maxRetries:t=20}=e;return{name:ct,async sendRequest(e,r){const i=await r(e);return ht(r,i,t)}}}async function ht(e,t,r,i=0){const{request:n,status:o,headers:s}=t,a=s.get("location");if(a&&(300===o||301===o&&ut.includes(n.method)||302===o&&ut.includes(n.method)||303===o&&"POST"===n.method||307===o)&&i<r){const t=new URL(a,n.url);n.url=t.toString(),303===o&&(n.method="GET",n.headers.delete("Content-Length"),delete n.body),n.headers.delete("Authorization");const s=await e(n);return ht(e,s,r,i+1)}return t}const ft="1.17.0";async function mt(e){const t=new Map;t.set("core-rest-pipeline",ft),await async function(e){const t=globalThis.navigator;let r="unknown";if(null==t?void 0:t.userAgentData){const i=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);r=`${i.architecture}-${i.platform}-${i.platformVersion}`;const n=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const r of t){const t=e.find((e=>e.brand===r));if(t)return t}}(t.userAgentData.brands);n&&e.set(n.brand,n.version)}else if(null==t?void 0:t.platform){r=t.platform;const i=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const r of t){const t=e.match(r.regex);if(t)return{brand:r.name,version:t[1]}}}(t.userAgent);i&&e.set(i.brand,i.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",r)}(t);const r=function(e){const t=[];for(const[r,i]of e){const e=i?`${r}/${i}`:r;t.push(e)}return t.join(" ")}(t);return e?`${e} ${r}`:r}const gt="x-ms-useragent";const yt=Symbol("rawContent");function vt(e){return function(e){return"function"==typeof e[yt]}(e)?e[yt]():e.stream()}function bt(e){return Boolean(e&&"function"==typeof e.pipe)}function wt(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function _t(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(wt(e))return new Response(e).blob();const t=vt(e);if(bt(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return _t(t)}function xt(e){let t="";for(const[r,i]of e)t+=`${r}: ${i}\r\n`;return t}function St(e){return e instanceof Uint8Array?e.byteLength:function(e){return"function"==typeof e.stream}(e)?-1===e.size?void 0:e.size:void 0}async function kt(e,t,r){const i=[Ve(`--${r}`,"utf-8"),...t.flatMap((e=>[Ve("\r\n","utf-8"),Ve(xt(e.headers),"utf-8"),Ve("\r\n","utf-8"),e.body,Ve(`\r\n--${r}`,"utf-8")])),Ve("--\r\n\r\n","utf-8")],n=function(e){let t=0;for(const r of e){const e=St(r);if(void 0===e)return;t+=e}return t}(i);n&&e.headers.set("Content-Length",n),e.body=await async function(e){const t=[];for(const r of e)t.push(await _t("function"==typeof r?r():r));return new Blob(t)}(i)}const Et="multipartPolicy",Tt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Bt(){return{name:Et,async sendRequest(e,t){var r;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let i=e.multipartBody.boundary;const n=null!==(r=e.headers.get("Content-Type"))&&void 0!==r?r:"multipart/mixed",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);const[,s,a]=o;if(a&&i&&a!==i)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${i} in the request body`);return null!=i||(i=a),i?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!Tt.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(i):i=`----AzSDKFormBoundary${et()}`,e.headers.set("Content-Type",`${s}; boundary=${i}`),await kt(e,e.multipartBody.parts,i),e.multipartBody=void 0,t(e)}}}function Ct(e,t,r){return new Promise(((i,n)=>{let o,s;const a=()=>n(new He((null==r?void 0:r.abortErrorMsg)?null==r?void 0:r.abortErrorMsg:"The operation was aborted.")),l=()=>{(null==r?void 0:r.abortSignal)&&s&&r.abortSignal.removeEventListener("abort",s)};if(s=()=>(o&&clearTimeout(o),l(),a()),(null==r?void 0:r.abortSignal)&&r.abortSignal.aborted)return a();o=setTimeout((()=>{l(),i(t)}),e),(null==r?void 0:r.abortSignal)&&r.abortSignal.addEventListener("abort",s)}))}function It(e,t){const r=e.headers.get(t);if(!r)return;const i=Number(r);return Number.isNaN(i)?void 0:i}const At="Retry-After",Ft=["retry-after-ms","x-ms-retry-after-ms",At];function Mt(e){if(e&&[429,503].includes(e.status))try{for(const t of Ft){const r=It(e,t);if(0===r||r){return r*(t===At?1e3:1)}}const t=e.headers.get(At);if(!t)return;const r=Date.parse(t)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch(e){return}}function Dt(e={}){var t,r;const i=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,n=null!==(r=e.maxRetryDelayInMs)&&void 0!==r?r:64e3;let o=i;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:r,responseError:i}){const s=function(e){if(!e)return!1;return"ETIMEDOUT"===e.code||"ESOCKETTIMEDOUT"===e.code||"ECONNREFUSED"===e.code||"ECONNRESET"===e.code||"ENOENT"===e.code||"ENOTFOUND"===e.code}(i),a=s&&e.ignoreSystemErrors,l=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(r),d=l&&e.ignoreHttpStatusCodes,c=r&&(function(e){return Number.isFinite(Mt(e))}(r)||!l);if(c||d||a)return{skipStrategy:!0};if(i&&!s&&!l)return{errorToThrow:i};const u=o*Math.pow(2,t),p=Math.min(n,u);var h,f;return o=p/2+(h=0,f=p/2,h=Math.ceil(h),f=Math.floor(f),Math.floor(Math.random()*(f-h+1))+h),{retryAfterInMs:o}}}}const Rt=ze("core-rest-pipeline retryPolicy");function Pt(e,t={maxRetries:3}){const r=t.logger||Rt;return{name:"retryPolicy",async sendRequest(i,n){var o,s;let a,l,d=-1;e:for(;;){d+=1,a=void 0,l=void 0;try{r.info(`Retry ${d}: Attempting to send request`,i.requestId),a=await n(i),r.info(`Retry ${d}: Received a response from request`,i.requestId)}catch(e){if(r.error(`Retry ${d}: Received an error from request`,i.requestId),l=e,!e||"RestError"!==l.name)throw e;a=l.response}if(null===(o=i.abortSignal)||void 0===o?void 0:o.aborted){r.error(`Retry ${d}: Request aborted.`);throw new He}if(d>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(r.info(`Retry ${d}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),l)throw l;if(a)return a;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${d}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||Rt;e.info(`Retry ${d}: Processing retry strategy ${t.name}.`);const r=t.retry({retryCount:d,response:a,responseError:l});if(r.skipStrategy){e.info(`Retry ${d}: Skipped.`);continue t}const{errorToThrow:n,retryAfterInMs:o,redirectTo:s}=r;if(n)throw e.error(`Retry ${d}: Retry strategy ${t.name} throws error:`,n),n;if(o||0===o){e.info(`Retry ${d}: Retry strategy ${t.name} retries after ${o}`),await Ct(o,void 0,{abortSignal:i.abortSignal});continue e}if(s){e.info(`Retry ${d}: Retry strategy ${t.name} redirects to ${s}`),i.url=s;continue e}}if(l)throw r.info("None of the retry strategies could work with the received error. Throwing it."),l;if(a)return r.info("None of the retry strategies could work with the received response. Returning it."),a}}}}function Ot(e){return e.toLowerCase()}class zt{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Ot(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Ot(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Ot(e))}delete(e){this._headersMap.delete(Ot(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,r]of this._headersMap)t[e]=r.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Nt(e){return new zt(e)}function qt(){return{name:"formDataPolicy",async sendRequest(e,t){if(nt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const r={};for(const[i,n]of e.entries())null!==(t=r[i])&&void 0!==t||(r[i]=[]),r[i].push(n);return r}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[r,i]of Object.entries(e))if(Array.isArray(i))for(const e of i)t.append(r,e.toString());else t.append(r,i.toString());return t.toString()}(e.formData):await async function(e,t){const r=t.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=r?r:"multipart/form-data");const i=[];for(const[t,r]of Object.entries(e))for(const e of Array.isArray(r)?r:[r])if("string"==typeof e)i.push({headers:Nt({"Content-Disposition":`form-data; name="${t}"`}),body:Ve(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const r=e.name||"blob",n=Nt();n.set("Content-Disposition",`form-data; name="${t}"; filename="${r}"`),n.set("Content-Type",e.type||"application/octet-stream"),i.push({headers:n,body:e})}}t.multipartBody={parts:i}}(e.formData,e),e.formData=void 0}return t(e)}}}const Ut="proxyPolicy is not supported in browser environment";function Lt(){throw new Error(Ut)}const jt={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ht(e={}){let t=new $t(e.parentContext);return e.span&&(t=t.setValue(jt.span,e.span)),e.namespace&&(t=t.setValue(jt.namespace,e.namespace)),t}class $t{constructor(e){this._contextMap=e instanceof $t?new Map(e._contextMap):new Map}setValue(e,t){const r=new $t(this);return r._contextMap.set(e,t),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new $t(this);return t._contextMap.delete(e),t}}const Gt={instrumenterImplementation:void 0};function Wt(){return Gt.instrumenterImplementation||(Gt.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Ht({parentContext:t.tracingContext})}),withContext:(e,t,...r)=>t(...r)}),Gt.instrumenterImplementation}function Kt(e){const{namespace:t,packageName:r,packageVersion:i}=e;function n(e,n,o){var s;const a=Wt().startSpan(e,Object.assign(Object.assign({},o),{packageName:r,packageVersion:i,tracingContext:null===(s=null==n?void 0:n.tracingOptions)||void 0===s?void 0:s.tracingContext}));let l=a.tracingContext;const d=a.span;l.getValue(jt.namespace)||(l=l.setValue(jt.namespace,t)),d.setAttribute("az.namespace",l.getValue(jt.namespace));return{span:d,updatedOptions:Object.assign({},n,{tracingOptions:Object.assign(Object.assign({},null==n?void 0:n.tracingOptions),{tracingContext:l})})}}function o(e,t,...r){return Wt().withContext(e,t,...r)}return{startSpan:n,withSpan:async function(e,t,r,i){const{span:s,updatedOptions:a}=n(e,t,i);try{const e=await o(a.tracingOptions.tracingContext,(()=>Promise.resolve(r(a,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:o,parseTraceparentHeader:function(e){return Wt().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Wt().createRequestHeaders(e)}}}const Vt={},Jt=new dt;class Yt extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Yt.prototype)}[Vt](){return`RestError: ${this.message} \n ${Jt.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function Qt(e){return e instanceof Yt||We(e)&&"RestError"===e.name}Yt.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Yt.PARSE_ERROR="PARSE_ERROR";function Zt(e={}){const t=mt(e.userAgentPrefix),r=new dt({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),i=function(){try{return Kt({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:ft})}catch(e){return void je.warning(`Error when creating the TracingClient: ${Ke(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,n){var o;if(!i)return n(e);const s=await t,a={"http.url":r.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(a["http.user_agent"]=s);const{span:l,tracingContext:d}=null!==(o=function(e,t,r){try{const{span:i,updatedOptions:n}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:r});if(!i.isRecording())return void i.end();const o=e.createRequestHeaders(n.tracingOptions.tracingContext);for(const[e,r]of Object.entries(o))t.headers.set(e,r);return{span:i,tracingContext:n.tracingOptions.tracingContext}}catch(e){return void je.warning(`Skipping creating a tracing span due to an error: ${Ke(e)}`)}}(i,e,a))&&void 0!==o?o:{};if(!l||!d)return n(e);try{const t=await i.withContext(d,n,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const r=t.headers.get("x-ms-request-id");r&&e.setAttribute("serviceRequestId",r),e.setStatus({status:"success"}),e.end()}catch(e){je.warning(`Skipping tracing span processing due to an error: ${Ke(e)}`)}}(l,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:We(t)?t:void 0}),Qt(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){je.warning(`Skipping tracing span processing due to an error: ${Ke(e)}`)}}(l,e),e}}}}function Xt(e){var t;const r=ge();var i;return nt&&(e.tlsOptions&&r.addPolicy((i=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=i),t(e))})),r.addPolicy(function(){throw new Error(Ut)}(e.proxyOptions)),r.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),r.addPolicy(qt(),{beforePolicies:[Et]}),r.addPolicy(function(e={}){const t=mt(e.userAgentPrefix);return{name:"userAgentPolicy",sendRequest:async(e,r)=>(e.headers.has(gt)||e.headers.set(gt,await t),r(e))}}(e.userAgentOptions)),r.addPolicy(function(e="x-ms-client-request-id"){return{name:"setClientRequestIdPolicy",sendRequest:async(t,r)=>(t.headers.has(e)||t.headers.set(e,t.requestId),r(t))}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),r.addPolicy(Bt(),{afterPhase:"Deserialize"}),r.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:Pt([{name:"throttlingRetryStrategy",retry({response:e}){const t=Mt(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Dt(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),r.addPolicy(Zt(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),nt&&r.addPolicy(pt(e.redirectOptions),{afterPhase:"Retry"}),r.addPolicy(function(e={}){var t;const r=null!==(t=e.logger)&&void 0!==t?t:je.info,i=new dt({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!r.enabled)return t(e);r(`Request: ${i.sanitize(e)}`);const n=await t(e);return r(`Response status code: ${n.status}`),r(`Headers: ${i.sanitize(n.headers)}`),n}}}(e.loggingOptions),{afterPhase:"Sign"}),r}class er{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:r}=function(e){const t=new AbortController;let r,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new He("The operation was aborted.");i=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",i),r=()=>{var t;i&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",i))}}e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout);return{abortController:t,abortControllerCleanup:r}}(e);try{const i=function(e){const t=new Headers;for(const[r,i]of e)t.append(r,i);return t}(e.headers),{streaming:n,body:o}=function(e){const t="function"==typeof e.body?e.body():e.body;if(bt(t))throw new Error("Node streams are not supported in browser environment.");return wt(t)?{streaming:!0,body:tr(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:o,method:e.method,headers:i,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});n&&(s.duplex="half");const a=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,r){var i,n;const o=function(e){const t=Nt();for(const[r,i]of e.headers)t.set(r,i);return t}(e),s={request:t,headers:o,status:e.status},a=wt(e.body)?tr(e.body,{onProgress:t.onDownloadProgress,onEnd:r}):e.body;if((null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(Number.POSITIVE_INFINITY))||(null===(n=t.streamResponseStatusCodes)||void 0===n?void 0:n.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=a?a:void 0;else{const e=new Response(a);s.blobBody=e.blob(),null==r||r()}else{const e=new Response(a);s.bodyAsText=await e.text(),null==r||r()}return s}(a,e,r)}catch(e){throw null==r||r(),e}}(e)}catch(t){throw function(e,t){var r;return e&&"AbortError"===(null==e?void 0:e.name)?e:new Yt(`Error sending request: ${e.message}`,{code:null!==(r=null==e?void 0:e.code)&&void 0!==r?r:Yt.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function tr(e,t={}){let r=0;const{onProgress:i,onEnd:n}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),r+=e.length,i&&i({loadedBytes:r})):t.terminate()},flush(){null==n||n()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var o;const{done:s,value:a}=await t.read();if(s||!a)return null==n||n(),e.close(),void t.releaseLock();r+=null!==(o=null==a?void 0:a.length)&&void 0!==o?o:0,e.enqueue(a),i&&i({loadedBytes:r})},cancel:e=>(null==n||n(),t.cancel(e))})}}function rr(){return new er}class ir{constructor(e){var t,r,i,n,o,s,a;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Nt(),this.method=null!==(r=e.method)&&void 0!==r?r:"GET",this.timeout=null!==(i=e.timeout)&&void 0!==i?i:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(n=e.disableKeepAlive)&&void 0!==n&&n,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(o=e.withCredentials)&&void 0!==o&&o,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||et(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(a=e.enableBrowserStreams)&&void 0!==a&&a}}function nr(e){return new ir(e)}const or={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function sr(e,t){let r,i=null,n=null;const o=Object.assign(Object.assign({},or),t),s={get isRefreshing(){return null!==i},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==n?void 0:n.refreshAfterTimestamp)&&n.refreshAfterTimestamp<Date.now())||(null!==(e=null==n?void 0:n.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs<Date.now())},get mustRefresh(){return null===n||n.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function a(t,a){var l;if(!s.isRefreshing){i=async function(e,t,r){async function i(){if(!(Date.now()<r)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let n=await i();for(;null===n;)await Ct(t),n=await i();return n}((()=>e.getToken(t,a)),o.retryIntervalInMs,null!==(l=null==n?void 0:n.expiresOnTimestamp)&&void 0!==l?l:Date.now()).then((e=>(i=null,n=e,r=a.tenantId,n))).catch((e=>{throw i=null,n=null,r=void 0,e}))}return i}return async(e,t)=>{const i=Boolean(t.claims),o=r!==t.tenantId;i&&(n=null);return o||i||s.mustRefresh?a(e,t):(s.shouldRefresh&&a(e,t),n)}}async function ar(e){const{scopes:t,getAccessToken:r,request:i}=e,n={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions},o=await r(t,n);o&&e.request.headers.set("Authorization",`Bearer ${o.token}`)}function lr(e){var t;const{credential:r,scopes:i,challengeCallbacks:n}=e,o=e.logger||je,s=Object.assign({authorizeRequest:null!==(t=null==n?void 0:n.authorizeRequest)&&void 0!==t?t:ar,authorizeRequestOnChallenge:null==n?void 0:n.authorizeRequestOnChallenge},n),a=r?sr(r):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let r,n;await s.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:a,logger:o});try{r=await t(e)}catch(e){n=e,r=e.response}if(s.authorizeRequestOnChallenge&&401===(null==r?void 0:r.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(r)){if(await s.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:r,getAccessToken:a,logger:o}))return t(e)}if(n)throw n;return r}}}function dr(e){const t=e;return t&&"function"==typeof t.getToken&&(void 0===t.signRequest||t.getToken.length>0)}class cr{constructor(e,t){this._nextPolicy=e,this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class ur extends cr{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}class pr extends ur{constructor(e,t){super(e,t)}}class hr{create(e,t){throw new Error("Method should be implemented in children classes.")}}class fr extends hr{create(e,t){return new pr(e,t)}}class mr{}const gr="DisableKeepAlivePolicy";function yr(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function vr(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}const br="$",wr="_";const _r=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;const xr=/^[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}$/i;function Sr(e,t){var r,i;const n=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},n),{body:e.parsedBody});const o=t&&t.bodyMapper,s=Boolean(null==o?void 0:o.nullable),a=null==o?void 0:o.type.name;if("Stream"===a)return Object.assign(Object.assign({},n),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const l="Composite"===a&&o.type.modelProperties||{},d=Object.keys(l).some((e=>""===l[e].serializedName));if("Sequence"===a||d){const t=null!==(r=e.parsedBody)&&void 0!==r?r:[];for(const r of Object.keys(l))l[r].serializedName&&(t[r]=null===(i=e.parsedBody)||void 0===i?void 0:i[r]);if(n)for(const e of Object.keys(n))t[e]=n[e];return!s||e.parsedBody||n||0!==Object.getOwnPropertyNames(l).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:n,hasNullableType:s,shouldWrapBody:(c=e.parsedBody,u=a,"Composite"!==u&&"Dictionary"!==u&&("string"==typeof c||"number"==typeof c||"boolean"==typeof c||null!==(null==u?void 0:u.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==c))});var c,u}class kr{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,r){const i=(e,i)=>{throw new Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:r,ExclusiveMinimum:n,InclusiveMaximum:o,InclusiveMinimum:s,MaxItems:a,MaxLength:l,MinItems:d,MinLength:c,MultipleOf:u,Pattern:p,UniqueItems:h}=e.constraints;if(void 0!==r&&t>=r&&i("ExclusiveMaximum",r),void 0!==n&&t<=n&&i("ExclusiveMinimum",n),void 0!==o&&t>o&&i("InclusiveMaximum",o),void 0!==s&&t<s&&i("InclusiveMinimum",s),void 0!==a&&t.length>a&&i("MaxItems",a),void 0!==l&&t.length>l&&i("MaxLength",l),void 0!==d&&t.length<d&&i("MinItems",d),void 0!==c&&t.length<c&&i("MinLength",c),void 0!==u&&t%u!=0&&i("MultipleOf",u),p){const e="string"==typeof p?new RegExp(p):p;"string"==typeof t&&null!==t.match(e)||i("Pattern",p)}h&&t.some(((e,t,r)=>r.indexOf(e)!==t))&&i("UniqueItems",h)}}serialize(e,t,r,i={xml:{}}){var n,o,s;const a={xml:{rootName:null!==(n=i.xml.rootName)&&void 0!==n?n:"",includeRoot:null!==(o=i.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=i.xml.xmlCharKey)&&void 0!==s?s:wr}};let l={};const d=e.type.name;r||(r=e.serializedName),null!==d.match(/^Sequence$/i)&&(l=[]),e.isConstant&&(t=e.defaultValue);const{required:c,nullable:u}=e;if(c&&u&&void 0===t)throw new Error(`${r} cannot be undefined.`);if(c&&!u&&null==t)throw new Error(`${r} cannot be null or undefined.`);if(!c&&!1===u&&null===t)throw new Error(`${r} cannot be null.`);if(null==t)l=t;else if(null!==d.match(/^any$/i))l=t;else if(null!==d.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i))l=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/i)){if("number"!=typeof r)throw new Error(`${t} with value ${r} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof r.valueOf())throw new Error(`${t} with value "${r}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof r.valueOf()||(i=r,!xr.test(i)))throw new Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof r)throw new Error(`${t} with value ${r} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof r;if(!("string"===e||"function"==typeof r.pipe||"function"==typeof r.tee||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||("function"==typeof Blob||"object"==typeof Blob)&&r instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var i;return r}(d,r,t);else if(null!==d.match(/^Enum$/i)){l=function(e,t,r){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r)))throw new Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return r}(r,e.type.allowedValues,t)}else null!==d.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?l=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(!e)return;"string"==typeof e.valueOf()&&(e=new Date(e));return Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return _r.test(e)}(t))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(d,t,r):null!==d.match(/^ByteArray$/i)?l=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=yr(t)}return t}(r,t):null!==d.match(/^Base64Url$/i)?l=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(!e)return;if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");const t=yr(e);return function(e,t){let r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)}return t}(r,t):null!==d.match(/^Sequence$/i)?l=function(e,t,r,i,n,o){var s;if(!Array.isArray(r))throw new Error(`${i} must be of type Array.`);let a=t.type.element;if(!a||"object"!=typeof a)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}.`);"Composite"===a.type.name&&a.type.className&&(a=null!==(s=e.modelMappers[a.type.className])&&void 0!==s?s:a);const l=[];for(let t=0;t<r.length;t++){const s=e.serialize(a,r[t],i,o);if(n&&a.xmlNamespace){const e=a.xmlNamespacePrefix?`xmlns:${a.xmlNamespacePrefix}`:"xmlns";"Composite"===a.type.name?(l[t]=Object.assign({},s),l[t][br]={[e]:a.xmlNamespace}):(l[t]={},l[t][o.xml.xmlCharKey]=s,l[t][br]={[e]:a.xmlNamespace})}else l[t]=s}return l}(this,e,t,r,Boolean(this.isXML),a):null!==d.match(/^Dictionary$/i)?l=function(e,t,r,i,n,o){if("object"!=typeof r)throw new Error(`${i} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}.`);const a={};for(const t of Object.keys(r)){const l=e.serialize(s,r[t],i,o);a[t]=Ir(s,l,n,o)}if(n&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",r=a;return r[br]={[e]:t.xmlNamespace},r}return a}(this,e,t,r,Boolean(this.isXML),a):null!==d.match(/^Composite$/i)&&(l=function(e,t,r,i,n,o){Mr(e,t)&&(t=Fr(e,t,r,"clientName"));if(null!=r){const s={},a=Cr(e,t,i);for(const l of Object.keys(a)){const d=a[l];if(d.readOnly)continue;let c,u=s;if(e.isXML)c=d.xmlIsWrapped?d.xmlName:d.xmlElementName||d.xmlName;else{const e=Tr(d.serializedName);c=e.pop();for(const t of e){const e=u[t];null==e&&(void 0!==r[l]&&null!==r[l]||void 0!==d.defaultValue)&&(u[t]={}),u=u[t]}}if(null!=u){if(n&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";u[br]=Object.assign(Object.assign({},u[br]),{[e]:t.xmlNamespace})}const s=""!==d.serializedName?i+"."+d.serializedName:i;let a=r[l];const p=Mr(e,t);p&&p.clientName===l&&null==a&&(a=t.serializedName);const h=e.serialize(d,a,s,o);if(void 0!==h&&null!=c){const e=Ir(d,h,n,o);n&&d.xmlIsAttribute?(u[br]=u[br]||{},u[br][c]=h):n&&d.xmlIsWrapped?u[c]={[d.xmlElementName]:e}:u[c]=e}}}const l=function(e,t,r){const i=t.type.additionalProperties;if(!i&&t.type.className){const i=Br(e,t,r);return null==i?void 0:i.type.additionalProperties}return i}(e,t,i);if(l){const t=Object.keys(a);for(const n in r){const a=t.every((e=>e!==n));a&&(s[n]=e.serialize(l,r[n],i+'["'+n+'"]',o))}}return s}return r}(this,e,t,r,Boolean(this.isXML),a));return l}deserialize(e,t,r,i={xml:{}}){var n,o,s,a;const l={xml:{rootName:null!==(n=i.xml.rootName)&&void 0!==n?n:"",includeRoot:null!==(o=i.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=i.xml.xmlCharKey)&&void 0!==s?s:wr},ignoreUnknownProperties:null!==(a=i.ignoreUnknownProperties)&&void 0!==a&&a};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let d;const c=e.type.name;if(r||(r=e.serializedName),null!==c.match(/^Composite$/i))d=function(e,t,r,i,n){var o,s;const a=null!==(o=n.xml.xmlCharKey)&&void 0!==o?o:wr;Mr(e,t)&&(t=Fr(e,t,r,"serializedName"));const l=Cr(e,t,i);let d={};const c=[];for(const o of Object.keys(l)){const u=l[o],p=Tr(l[o].serializedName);c.push(p[0]);const{serializedName:h,xmlName:f,xmlElementName:m}=u;let g=i;""!==h&&void 0!==h&&(g=i+"."+h);const y=u.headerCollectionPrefix;if(y){const t={};for(const i of Object.keys(r))i.startsWith(y)&&(t[i.substring(y.length)]=e.deserialize(u.type.value,r[i],g,n)),c.push(i);d[o]=t}else if(e.isXML)if(u.xmlIsAttribute&&r[br])d[o]=e.deserialize(u,r[br][f],g,n);else if(u.xmlIsMsText)void 0!==r[a]?d[o]=r[a]:"string"==typeof r&&(d[o]=r);else{const t=m||f||h;if(u.xmlIsWrapped){const t=r[f],i=null!==(s=null==t?void 0:t[m])&&void 0!==s?s:[];d[o]=e.deserialize(u,i,g,n),c.push(f)}else{const i=r[t];d[o]=e.deserialize(u,i,g,n),c.push(t)}}else{let i,s=r,a=0;for(const e of p){if(!s)break;a++,s=s[e]}null===s&&a<p.length&&(s=void 0),i=s;const c=t.type.polymorphicDiscriminator;let h;if(c&&o===c.clientName&&null==i&&(i=t.serializedName),Array.isArray(r[o])&&""===l[o].serializedName){i=r[o];const t=e.deserialize(u,i,g,n);for(const[e,r]of Object.entries(d))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r);d=t}else void 0===i&&void 0===u.defaultValue||(h=e.deserialize(u,i,g,n),d[o]=h)}}const u=t.type.additionalProperties;if(u){const t=e=>{for(const t in l){if(Tr(l[t].serializedName)[0]===e)return!1}return!0};for(const o in r)t(o)&&(d[o]=e.deserialize(u,r[o],i+'["'+o+'"]',n))}else if(r&&!n.ignoreUnknownProperties)for(const e of Object.keys(r))void 0!==d[e]||c.includes(e)||Ar(e,n)||(d[e]=r[e]);return d}(this,e,t,r,l);else{if(this.isXML){const e=l.xml.xmlCharKey;void 0!==t[br]&&void 0!==t[e]&&(t=t[e])}null!==c.match(/^Number$/i)?(d=parseFloat(t),isNaN(d)&&(d=t)):null!==c.match(/^Boolean$/i)?d="true"===t||"false"!==t&&t:null!==c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?d=t:null!==c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?d=new Date(t):null!==c.match(/^UnixTime$/i)?d=function(e){if(!e)return;return new Date(1e3*e)}(t):null!==c.match(/^ByteArray$/i)?d=vr(t):null!==c.match(/^Base64Url$/i)?d=function(e){if(!e)return;if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return vr(e=e.replace(/-/g,"+").replace(/_/g,"/"))}(t):null!==c.match(/^Sequence$/i)?d=function(e,t,r,i,n){var o;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}`);if(r){Array.isArray(r)||(r=[r]),"Composite"===s.type.name&&s.type.className&&(s=null!==(o=e.modelMappers[s.type.className])&&void 0!==o?o:s);const t=[];for(let o=0;o<r.length;o++)t[o]=e.deserialize(s,r[o],`${i}[${o}]`,n);return t}return r}(this,e,t,r,l):null!==c.match(/^Dictionary$/i)&&(d=function(e,t,r,i,n){const o=t.type.value;if(!o||"object"!=typeof o)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}`);if(r){const t={};for(const s of Object.keys(r))t[s]=e.deserialize(o,r[s],i,n);return t}return r}(this,e,t,r,l))}return e.isConstant&&(d=e.defaultValue),d}}function Er(e={},t=!1){return new kr(e,t)}function Tr(e){const t=[];let r="";if(e){const i=e.split(".");for(const e of i)"\\"===e.charAt(e.length-1)?r+=e.substr(0,e.length-1)+".":(r+=e,t.push(r),r="")}return t}function Br(e,t,r){const i=t.type.className;if(!i)throw new Error(`Class name for model "${r}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[i]}function Cr(e,t,r){let i=t.type.modelProperties;if(!i){const n=Br(e,t,r);if(!n)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(i=null==n?void 0:n.type.modelProperties,!i)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(n)}" of type "${t.type.className}" for object "${r}".`)}return i}function Ir(e,t,r,i){if(!r||!e.xmlNamespace)return t;const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",o={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[br])return t;{const e=Object.assign({},t);return e[br]=o,e}}const s={};return s[i.xml.xmlCharKey]=t,s[br]=o,s}function Ar(e,t){return[br,t.xml.xmlCharKey].includes(e)}function Fr(e,t,r,i){var n;const o=Mr(e,t);if(o){let s=o[i];if(s){"serializedName"===i&&(s=s.replace(/\\/gi,""));const o=r[s],a=null!==(n=t.type.uberParent)&&void 0!==n?n:t.type.className;if("string"==typeof o&&a){const r=function(e,t,r){const i=[r];for(;i.length;){const r=i.shift(),n=t===r?t:r+"."+t;if(Object.prototype.hasOwnProperty.call(e,n))return e[n];for(const[t,n]of Object.entries(e))t.startsWith(r+".")&&n.type.uberParent===r&&n.type.className&&i.push(n.type.className)}}(e.modelMappers.discriminators,o,a);r&&(t=r)}}}return t}function Mr(e,t){return t.type.polymorphicDiscriminator||Dr(e,t.type.uberParent)||Dr(e,t.type.className)}function Dr(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Rr="Sequence",Pr="String",Or="Stream",zr={operationRequestMap:new WeakMap};function Nr(e,t,r){let i=t.parameterPath;const n=t.mapper;let o;if("string"==typeof i&&(i=[i]),Array.isArray(i)){if(i.length>0)if(n.isConstant)o=n.defaultValue;else{let t=qr(e,i);!t.propertyFound&&r&&(t=qr(r,i));let s=!1;t.propertyFound||(s=n.required||"options"===i[0]&&2===i.length),o=s?n.defaultValue:t.propertyValue}}else{n.required&&(o={});for(const t in i){const s=n.type.modelProperties[t],a=Nr(e,{parameterPath:i[t],mapper:s},r);void 0!==a&&(o||(o={}),o[t]=a)}}return o}function qr(e,t){const r={propertyFound:!1};let i=0;for(;i<t.length;++i){const r=t[i];if(!e||!(r in e))break;e=e[r]}return i===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}const Ur=Symbol.for("@azure/core-client original request");function Lr(e){if(function(e){return Ur in e}(e))return Lr(e[Ur]);let t=zr.operationRequestMap.get(e);return t||(t={},zr.operationRequestMap.set(e,t)),t}const jr=["application/json","text/json"],Hr=["application/xml","application/atom+xml"];function $r(e={}){var t,r,i,n,o,s,a;const l=null!==(r=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==r?r:jr,d=null!==(n=null===(i=e.expectedContentTypes)||void 0===i?void 0:i.xml)&&void 0!==n?n:Hr,c=e.parseXML,u=e.serializerOptions,p={xml:{rootName:null!==(o=null==u?void 0:u.xml.rootName)&&void 0!==o?o:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(a=null==u?void 0:u.xml.xmlCharKey)&&void 0!==a?a:wr}};return{name:"deserializationPolicy",async sendRequest(e,t){const r=await t(e);return async function(e,t,r,i,n){const o=await async function(e,t,r,i,n){var o;if(!(null===(o=r.request.streamResponseStatusCodes)||void 0===o?void 0:o.has(r.status))&&r.bodyAsText){const o=r.bodyAsText,s=r.headers.get("Content-Type")||"",a=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===a.length||a.some((t=>-1!==e.indexOf(t))))return r.parsedBody=JSON.parse(o),r;if(a.some((e=>-1!==t.indexOf(e)))){if(!n)throw new Error("Parsing XML not supported.");const e=await n(o,i.xml);return r.parsedBody=e,r}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${r.bodyAsText}.`,i=e.code||Yt.PARSE_ERROR;throw new Yt(t,{code:i,statusCode:r.status,request:r.request,response:r})}}return r}(e,t,r,i,n);if(!function(e){const t=e.request,r=Lr(t),i=null==r?void 0:r.shouldDeserialize;let n;n=void 0===i||("boolean"==typeof i?i:i(e));return n}(o))return o;const s=Lr(o.request),a=null==s?void 0:s.operationSpec;if(!a||!a.responses)return o;const l=function(e){let t;const r=e.request,i=Lr(r),n=null==i?void 0:i.operationSpec;n&&(t=(null==i?void 0:i.operationResponseGetter)?null==i?void 0:i.operationResponseGetter(n,e):n.responses[e.status]);return t}(o),{error:d,shouldReturnResponse:c}=function(e,t,r,i){var n;const o=200<=e.status&&e.status<300,s=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?o:!!r;if(s){if(!r)return{error:null,shouldReturnResponse:!1};if(!r.isError)return{error:null,shouldReturnResponse:!1}}const a=null!=r?r:t.responses.default,l=(null===(n=e.request.streamResponseStatusCodes)||void 0===n?void 0:n.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,d=new Yt(l,{statusCode:e.status,request:e.request,response:e});if(!a)throw d;const c=a.bodyMapper,u=a.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let n;if(c){let e=r;if(t.isXML&&c.type.name===Rr){e=[];const t=c.xmlElementName;"object"==typeof r&&t&&(e=r[t])}n=t.serializer.deserialize(c,e,"error.response.parsedBody",i)}const o=r.error||n||r;d.code=o.code,o.message&&(d.message=o.message),c&&(d.response.parsedBody=n)}e.headers&&u&&(d.response.parsedHeaders=t.serializer.deserialize(u,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){d.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}(o,a,l,i);if(d)throw d;if(c)return o;if(l){if(l.bodyMapper){let e=o.parsedBody;a.isXML&&l.bodyMapper.type.name===Rr&&(e="object"==typeof e?e[l.bodyMapper.xmlElementName]:[]);try{o.parsedBody=a.serializer.deserialize(l.bodyMapper,e,"operationRes.parsedBody",i)}catch(e){throw new Yt(`Error ${e} occurred in deserializing the responseBody - ${o.bodyAsText}`,{statusCode:o.status,request:o.request,response:o})}}else"HEAD"===a.httpMethod&&(o.parsedBody=r.status>=200&&r.status<300);l.headersMapper&&(o.parsedHeaders=a.serializer.deserialize(l.headersMapper,o.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return o}(l,d,r,p,c)}}}function Gr(e){const{parameterPath:t,mapper:r}=e;let i;return i="string"==typeof t?t:Array.isArray(t)?t.join("."):r.serializedName,i}function Wr(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,r){const i=Lr(e),n=null==i?void 0:i.operationSpec,o=null==i?void 0:i.operationArguments;return n&&o&&(function(e,t,r){var i,n;if(r.headerParameters)for(const i of r.headerParameters){let n=Nr(t,i);if(null!=n||i.mapper.required){n=r.serializer.serialize(i.mapper,n,Gr(i));const t=i.mapper.headerCollectionPrefix;if(t)for(const r of Object.keys(n))e.headers.set(t+r,n[r]);else e.headers.set(i.mapper.serializedName||Gr(i),n)}}const o=null===(n=null===(i=t.options)||void 0===i?void 0:i.requestOptions)||void 0===n?void 0:n.customHeaders;if(o)for(const t of Object.keys(o))e.headers.set(t,o[t])}(e,o,n),function(e,t,r,i=function(){throw new Error("XML serialization unsupported!")}){var n,o,s,a,l;const d=null===(n=t.options)||void 0===n?void 0:n.serializerOptions,c={xml:{rootName:null!==(o=null==d?void 0:d.xml.rootName)&&void 0!==o?o:"",includeRoot:null!==(s=null==d?void 0:d.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(a=null==d?void 0:d.xml.xmlCharKey)&&void 0!==a?a:wr}},u=c.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){e.body=Nr(t,r.requestBody);const n=r.requestBody.mapper,{required:o,serializedName:s,xmlName:a,xmlElementName:d,xmlNamespace:p,xmlNamespacePrefix:h,nullable:f}=n,m=n.type.name;try{if(void 0!==e.body&&null!==e.body||f&&null===e.body||o){const t=Gr(r.requestBody);e.body=r.serializer.serialize(n,e.body,t,c);const o=m===Or;if(r.isXML){const t=h?`xmlns:${h}`:"xmlns",r=function(e,t,r,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){const r={};return r[n.xml.xmlCharKey]=i,r[br]={[t]:e},r}return i}(p,t,m,e.body,c);m===Rr?e.body=i(function(e,t,r,i){Array.isArray(e)||(e=[e]);if(!r||!i)return{[t]:e};const n={[t]:e};return n[br]={[r]:i},n}(r,d||a||s,t,p),{rootName:a||s,xmlCharKey:u}):o||(e.body=i(r,{rootName:a||s,xmlCharKey:u}))}else{if(m===Pr&&((null===(l=r.contentType)||void 0===l?void 0:l.match("text/plain"))||"text"===r.mediaType))return;o||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){e.formData={};for(const i of r.formDataParameters){const n=Nr(t,i);if(null!=n){const t=i.mapper.serializedName||Gr(i);e.formData[t]=r.serializer.serialize(i.mapper,n,Gr(i),c)}}}}(e,o,n,t)),r(e)}}}function Kr(e={}){const t=Xt(null!=e?e:{});return e.credentialOptions&&t.addPolicy(lr({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(Wr(e.serializationOptions),{phase:"Serialize"}),t.addPolicy($r(e.deserializationOptions),{phase:"Deserialize"}),t}let Vr;const Jr={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function Yr(e,t,r,i){const n=function(e,t,r){var i;const n=new Map;if(null===(i=e.urlParameters)||void 0===i?void 0:i.length)for(const i of e.urlParameters){let o=Nr(t,i,r);const s=Gr(i);o=e.serializer.serialize(i.mapper,o,s),i.skipEncoding||(o=encodeURIComponent(o)),n.set(`{${i.mapper.serializedName||s}}`,o)}return n}(t,r,i);let o=!1,s=Qr(e,n);if(t.path){let e=Qr(t.path,n);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),!function(e){return e.includes("://")}(e)?s=function(e,t){if(!t)return e;const r=new URL(e);let i=r.pathname;i.endsWith("/")||(i=`${i}/`);t.startsWith("/")&&(t=t.substring(1));const n=t.indexOf("?");if(-1!==n){const e=t.substring(0,n),o=t.substring(n+1);i+=e,o&&(r.search=r.search?`${r.search}&${o}`:o)}else i+=t;return r.pathname=i,r.toString()}(s,e):(s=e,o=!0)}const{queryParams:a,sequenceParams:l}=function(e,t,r){var i;const n=new Map,o=new Set;if(null===(i=e.queryParameters)||void 0===i?void 0:i.length)for(const i of e.queryParameters){"Sequence"===i.mapper.type.name&&i.mapper.serializedName&&o.add(i.mapper.serializedName);let s=Nr(t,i,r);if(null!=s||i.mapper.required){s=e.serializer.serialize(i.mapper,s,Gr(i));const t=i.collectionFormat?Jr[i.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===i.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==i.collectionFormat&&"TSV"!==i.collectionFormat||(s=s.join(t)),i.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==i.collectionFormat&&"Pipes"!==i.collectionFormat||(s=s.join(t)),n.set(i.mapper.serializedName||Gr(i),s)}}return{queryParams:n,sequenceParams:o}}(t,r,i);return s=function(e,t,r,i=!1){if(0===t.size)return e;const n=new URL(e),o=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const r=(e=e.slice(1)).split("&");for(const e of r){const[r,i]=e.split("=",2),n=t.get(r);n?Array.isArray(n)?n.push(i):t.set(r,[n,i]):t.set(r,i)}return t}(n.search);for(const[e,n]of t){const t=o.get(e);if(Array.isArray(t))if(Array.isArray(n)){t.push(...n);const r=new Set(t);o.set(e,Array.from(r))}else t.push(n);else t?(Array.isArray(n)?n.unshift(t):r.has(e)&&o.set(e,[t,n]),i||o.set(e,n)):o.set(e,n)}const s=[];for(const[e,t]of o)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const r of t)s.push(`${e}=${r}`);else s.push(`${e}=${t}`);return n.search=s.length?`?${s.join("&")}`:"",n.toString()}(s,a,l,o),s}function Qr(e,t){let r=e;for(const[e,i]of t)r=r.split(e).join(i);return r}const Zr=ze("core-client");class Xr{constructor(e={}){var t,r;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&Zr.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(Vr||(Vr=rr()),Vr),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy");return}(e),r=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return Kr(Object.assign(Object.assign({},e),{credentialOptions:r}))}(e),null===(r=e.additionalPolicies)||void 0===r?void 0:r.length)for(const{policy:t,position:r}of e.additionalPolicies){const e="perRetry"===r?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const r=t.baseUrl||this._endpoint;if(!r)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const i=nr({url:Yr(r,t,e,this)});i.method=t.httpMethod;const n=Lr(i);n.operationSpec=t,n.operationArguments=e;const o=t.contentType||this._requestContentType;o&&t.requestBody&&i.headers.set("Content-Type",o);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(i.timeout=e.timeout),e.onUploadProgress&&(i.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(i.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(n.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(i.allowInsecureConnection=!0)),s.abortSignal&&(i.abortSignal=s.abortSignal),s.tracingOptions&&(i.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(i.allowInsecureConnection=!0),void 0===i.streamResponseStatusCodes&&(i.streamResponseStatusCodes=function(e){const t=new Set;for(const r in e.responses){const i=e.responses[r];i.bodyMapper&&i.bodyMapper.type.name===Or&&t.add(Number(r))}return t}(t));try{const e=await this.sendRequest(i),r=Sr(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,r),r}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const r=e.response,i=Sr(r,t.responses[e.statusCode]||t.responses.default);e.details=i,(null==s?void 0:s.onResponse)&&s.onResponse(r,i,e)}throw e}}}const ei="/.default",ti={AUTHORIZATION:"authorization"};const ri=async e=>{const t={abortSignal:(r=e.request).abortSignal,requestOptions:{timeout:r.timeout},tracingOptions:r.tracingOptions};var r;const i=function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t;return}(e.response);if(i){const r=function(e){const t=e.slice(7),r=`${t.trim()} `.split(" ").filter((e=>e));return r.map((e=>(([e,t])=>({[e]:t}))(e.trim().split("=")))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}(i),n=function(e,t){if(!t.resource_id)return e.scopes;const r=new URL(t.resource_id);r.pathname=ei;let i=r.toString();"https://disk.azure.com/.default"===i&&(i="https://disk.azure.com//.default");return[i]}(e,r),o=function(e){const t=new URL(e.authorization_uri),r=t.pathname.split("/")[1];if(r&&(i=r,/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(i)))return r;var i;return}(r);if(!o)return!1;const s=await e.getAccessToken(n,Object.assign(Object.assign({},t),{tenantId:o}));return!!s&&(e.request.headers.set(ti.AUTHORIZATION,`Bearer ${s.token}`),!0)}return!1};const ii=Symbol("Original PipelineRequest"),ni=Symbol.for("@azure/core-client original request");function oi(e,t={}){const r=e[ii],i=Nt(e.headers.toJson({preserveCase:!0}));if(r)return r.headers=i,r;{const r=nr({url:e.url,method:e.method,headers:i,withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,disableKeepAlive:!!e.keepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes});return t.originalRequest&&(r[ni]=t.originalRequest),r}}function si(e,t){var r;const i=null!==(r=null==t?void 0:t.originalRequest)&&void 0!==r?r:e,n={url:e.url,method:e.method,headers:ai(e.headers),withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.headers.get("x-ms-client-request-id")||e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,keepAlive:!!e.disableKeepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,clone(){throw new Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return(null==t?void 0:t.createProxy)?new Proxy(n,{get:(t,r,o)=>r===ii?e:"clone"===r?()=>si(oi(n,{originalRequest:i}),{createProxy:!0,originalRequest:i}):Reflect.get(t,r,o),set(t,r,i,n){"keepAlive"===r&&(e.disableKeepAlive=!i);return"string"==typeof r&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes"].includes(r)&&(e[r]=i),Reflect.set(t,r,i,n)}}):n}function ai(e){return new di(e.toJSON({preserveCase:!0}))}function li(e){return e.toLowerCase()}class di{constructor(e){if(this._headersMap={},e)for(const t in e)this.set(t,e[t])}set(e,t){this._headersMap[li(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[li(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[li(e)]}remove(e){const t=this.contains(e);return delete this._headersMap[li(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){const e=[];for(const t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){const e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].name);return e}headerValues(){const e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].value);return e}toJson(e={}){const t={};if(e.preserveCase)for(const e in this._headersMap){const r=this._headersMap[e];t[r.name]=r.value}else for(const e in this._headersMap){const r=this._headersMap[e];t[li(r.name)]=r.value}return t}toString(){return JSON.stringify(this.toJson({preserveCase:!0}))}clone(){const e={};for(const t in this._headersMap){const r=this._headersMap[t];e[r.name]=r.value}return new di(e)}}const ci=Symbol("Original FullOperationResponse");function ui(e,t){let r=si(e.request),i=ai(e.headers);return(null==t?void 0:t.createProxy)?new Proxy(e,{get:(t,n,o)=>"headers"===n?i:"request"===n?r:n===ci?e:Reflect.get(t,n,o),set:(e,t,n,o)=>("headers"===t?i=n:"request"===t&&(r=n),Reflect.set(e,t,n,o))}):Object.assign(Object.assign({},e),{request:r,headers:i})}function pi(e){const t=e[ci],r=Nt(e.headers.toJson({preserveCase:!0}));return t?(t.headers=r,t):Object.assign(Object.assign({},e),{headers:r,request:oi(e.request)})}class hi extends Xr{constructor(e){var t,r;super(e),!1!==(null===(t=e.keepAliveOptions)||void 0===t?void 0:t.enable)||this.pipeline.getOrderedPolicies().some((e=>e.name===gr))||this.pipeline.addPolicy({name:gr,sendRequest:async(e,t)=>(e.disableKeepAlive=!0,t(e))}),!1===(null===(r=e.redirectOptions)||void 0===r?void 0:r.handleRedirects)&&this.pipeline.removePolicy({name:ct})}async sendOperationRequest(e,t){var r;const i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.onResponse;let n;e.options=Object.assign(Object.assign({},e.options),{onResponse:function(e,t,r){n=e,i&&i(e,t,r)}});const o=await super.sendOperationRequest(e,t);return n&&Object.defineProperty(o,"_response",{value:ui(n)}),o}}var fi;!function(e){e[e.ERROR=1]="ERROR",e[e.INFO=3]="INFO",e[e.OFF=0]="OFF",e[e.WARNING=2]="WARNING"}(fi||(fi={}));const mi={log(e,t){},shouldLog:e=>!1};function gi(e){const t=e.slice().reverse();return{name:"RequestPolicyFactoryPolicy",async sendRequest(e,r){let i={sendRequest:async e=>ui(await r(oi(e)),{createProxy:!0})};for(const e of t)i=e.create(i,mi);const n=si(e,{createProxy:!0});return pi(await i.sendRequest(n))}}}const yi="$";if(!(document&&DOMParser&&Node&&XMLSerializer))throw new Error('This library depends on the following DOM objects: ["document", "DOMParser", "Node", "XMLSerializer"] to parse XML, but some of these are undefined. You may provide a polyfill to make these globally available in order to support your environment. For more information, please refer to https://aka.ms/azsdk/js/web-workers. ');let vi;try{void 0!==self.trustedTypes&&(vi=self.trustedTypes.createPolicy("@azure/core-xml#xml.browser",{createHTML:e=>e}))}catch(aI){console.warn('Could not create trusted types policy "@azure/core-xml#xml.browser"')}const bi=document.implementation.createDocument(null,null,null),wi=new DOMParser;function _i(e,t={}){var r,i,n,o,s,a;try{const l={rootName:null!==(r=t.rootName)&&void 0!==r?r:"",includeRoot:null!==(i=t.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(n=t.xmlCharKey)&&void 0!==n?n:"_",cdataPropName:null!==(o=t.cdataPropName)&&void 0!==o?o:"__cdata",stopNodes:null!==(s=t.stopNodes)&&void 0!==s?s:[]},d=wi.parseFromString(null!==(a=null==vi?void 0:vi.createHTML(e))&&void 0!==a?a:e,"application/xml");let c;return function(e){const t=e.getElementsByTagName("parsererror");if(t.length>0&&function(){var e,t;if(void 0===xi)try{const r=null!==(e=null==vi?void 0:vi.createHTML("INVALID"))&&void 0!==e?e:"INVALID";xi=null!==(t=wi.parseFromString(r,"text/xml").getElementsByTagName("parsererror")[0].namespaceURI)&&void 0!==t?t:""}catch(e){xi=""}return xi}())for(let e=0;e<t.length;e++)if(t[e].namespaceURI===xi)throw new Error(t[e].innerHTML)}(d),c=l.includeRoot?Si(d,l):Si(d.childNodes[0],l),Promise.resolve(c)}catch(e){return Promise.reject(e)}}let xi;function Si(e,t){var r;let i={};const n=e.childNodes.length,o=e.childNodes[0],s=o&&1===n&&o.nodeType===Node.TEXT_NODE&&o.nodeValue||void 0,a=function(e){return function(e){return!!e.attributes}(e)&&e.hasAttributes()?e:void 0}(e);if(a){i[yi]={};for(let e=0;e<a.attributes.length;e++){const t=a.attributes[e];i[yi][t.nodeName]=t.nodeValue}s&&(i[t.xmlCharKey]=s)}else 0===n?i="":s&&(i=s);if(!s)for(let o=0;o<n;o++){const n=e.childNodes[o];if((null==n?void 0:n.nodeType)===Node.CDATA_SECTION_NODE)i=n.textContent;else if((null===(r=null==n?void 0:n.firstChild)||void 0===r?void 0:r.nodeType)===Node.CDATA_SECTION_NODE)i[n.nodeName]=n.textContent;else if(n.nodeType!==Node.TEXT_NODE){const e=Si(n,t);i[n.nodeName]?Array.isArray(i[n.nodeName])?i[n.nodeName].push(e):i[n.nodeName]=[i[n.nodeName],e]:i[n.nodeName]=e}}return i}const ki=new XMLSerializer;function Ei(e,t={}){var r,i,n,o,s;const a={rootName:null!==(r=t.rootName)&&void 0!==r?r:"root",includeRoot:null!==(i=t.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(n=t.xmlCharKey)&&void 0!==n?n:"_",cdataPropName:null!==(o=t.cdataPropName)&&void 0!==o?o:"__cdata",stopNodes:null!==(s=t.stopNodes)&&void 0!==s?s:[]},l=Bi(e,a.rootName,a)[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+ki.serializeToString(l).replace(/ xmlns=""/g,"")}function Ti(e){const t=[];for(const r of Object.keys(e)){const i=bi.createAttribute(r);i.value=e[r].toString(),t.push(i)}return t}function Bi(e,t,r){var i;if(null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e){const r=bi.createElement(t);return r.textContent=null==e?"":e.toString(),[r]}if(Array.isArray(e)){const i=[];for(const n of e)for(const e of Bi(n,t,r))i.push(e);return i}if("object"==typeof e){let n;n=(null===(i=e[yi])||void 0===i?void 0:i.xmlns)?bi.createElementNS(e[yi].xmlns,t):bi.createElement(t);for(const t of Object.keys(e))if(t===yi)for(const r of Ti(e[t]))n.attributes.setNamedItem(r);else if(t===r.xmlCharKey)n.textContent=e[t].toString();else if(t===r.cdataPropName){const r=bi.createCDATASection(e[t].toString());n.appendChild(r)}else for(const i of Bi(e[t],t,r))n.appendChild(i);return[n]}throw new Error(`Illegal value passed to buildObject: ${e}`)}const Ci=ze("storage-blob"),Ii="12.25.0",Ai="2024-11-04",Fi=268435456,Mi=4194304e3,Di=5e4,Ri=4194304,Pi="https://storage.azure.com/.default",Oi={FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"},zi=202,Ni="Content-ID",qi="Content-Length",Ui="Content-Transfer-Encoding",Li="Content-Type",ji="Cookie",Hi="x-ms-error-code",$i="x-ms-version",Gi="",Wi="\r\n",Ki="HTTP/1.1",Vi=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],Ji=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Yi=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];var Qi,Zi=__webpack_require__(48287).Buffer;function Xi(e){const t=new URL(e);let r=t.pathname;return r=r||"/",r=encodeURIComponent(r).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%"),t.pathname=r,t.toString()}function en(e,t){const r=e.split(";");for(const e of r)if(e.trim().startsWith(t))return e.trim().match(t+"=(.*)")[1];return""}function tn(e){let t="";e.startsWith("UseDevelopmentStorage=true")&&(t=function(e){let t="";if(-1!==e.search("DevelopmentStorageProxyUri=")){const r=e.split(";");for(const e of r)e.trim().startsWith("DevelopmentStorageProxyUri=")&&(t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return t}(e),e="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;");let r=en(e,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,-1!==e.search("DefaultEndpointsProtocol=")&&-1!==e.search("AccountKey=")){let i="",n="",o=Zi.from("accountKey","base64"),s="";if(n=en(e,"AccountName"),o=Zi.from(en(e,"AccountKey"),"base64"),!r){i=en(e,"DefaultEndpointsProtocol");const t=i.toLowerCase();if("https"!==t&&"http"!==t)throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=en(e,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");r=`${i}://${n}.blob.${s}`}if(!n)throw new Error("Invalid AccountName in the provided Connection String");if(0===o.length)throw new Error("Invalid AccountKey in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:n,accountKey:o,proxyUri:t}}{let t=en(e,"SharedAccessSignature"),i=en(e,"AccountName");if(i||(i=fn(r)),!r)throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");if(!t)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String");return t.startsWith("?")&&(t=t.substring(1)),{kind:"SASConnString",url:r,accountName:i,accountSas:t}}}function rn(e,t){const r=new URL(e);let i=r.pathname;return i=i?i.endsWith("/")?`${i}${t}`:`${i}/${t}`:t,r.pathname=i,r.toString()}function nn(e,t,r){const i=new URL(e),n=encodeURIComponent(t),o=r?encodeURIComponent(r):void 0,s=""===i.search?"?":i.search,a=[];for(const e of s.slice(1).split("&"))if(e){const[t]=e.split("=",2);t!==n&&a.push(e)}return o&&a.push(`${n}=${o}`),i.search=a.length?`?${a.join("&")}`:"",i.toString()}function on(e,t){var r;return null!==(r=new URL(e).searchParams.get(t))&&void 0!==r?r:void 0}function sn(e,t){const r=new URL(e);return r.hostname=t,r.toString()}function an(e){try{return new URL(e).pathname}catch(e){return}}function ln(e){const t=new URL(e),r=t.pathname;if(!r)throw new RangeError("Invalid url without valid path.");let i=t.search||"";return i=i.trim(),""!==i&&(i=i.startsWith("?")?i:`?${i}`),`${r}${i}`}function dn(e,t){const r=new URL(e);let i=r.search;return i?i+="&"+t:i=t,r.search=i,r.toString()}function cn(e,t=!0){const r=e.toISOString();return t?r.substring(0,r.length-1)+"0000Z":r.substring(0,r.length-5)+"Z"}function un(e,t){e.length>42&&(e=e.slice(0,42));const r=e+function(e,t,r=" "){if(String.prototype.padStart)return e.padStart(t,r);return r=r||" ",e.length>t?e:((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),r.slice(0,t)+e)}(t.toString(),48-e.length,"0");return i=r,ot?Zi.from(i).toString("base64"):btoa(i);var i}async function pn(e,t,r){return new Promise(((i,n)=>{let o;const s=()=>{void 0!==o&&clearTimeout(o),n(r)};o=setTimeout((()=>{void 0!==t&&t.removeEventListener("abort",s),i()}),e),void 0!==t&&t.addEventListener("abort",s)}))}function hn(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function fn(e){const t=new URL(e);let r;try{return r="blob"===t.hostname.split(".")[1]?t.hostname.split(".")[0]:mn(t)?t.pathname.split("/")[1]:"",r}catch(e){throw new Error("Unable to extract accountName with provided information.")}}function mn(e){const t=e.host;return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||Boolean(e.port)&&Yi.includes(e.port)}function gn(e){if(void 0===e)return;const t=[];for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(i)}`)}return t.join("&")}function yn(e){if(void 0===e)return;const t={blobTagSet:[]};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.blobTagSet.push({key:r,value:i})}return t}function vn(e){if(void 0===e)return;const t={};for(const r of e.blobTagSet)t[r.key]=r.value;return t}function bn(e){if(void 0!==e)switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||!1}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function wn(e){if(!e)return;if("policy-id"in e)return;const t=[];for(const r in e){const i=r.split("_"),n="or-";i[0].startsWith(n)&&(i[0]=i[0].substring(n.length));const o={ruleId:i[1],replicationStatus:e[r]},s=t.findIndex((e=>e.policyId===i[0]));s>-1?t[s].rules.push(o):t.push({policyId:i[0],rules:[o]})}return t}function _n(e){return e?e.scheme+" "+e.value:void 0}function xn(e){return e.encoded?decodeURIComponent(e.content):e.content}function Sn(e){var t;return Object.assign(Object.assign({},e),{segment:{blobPrefixes:null===(t=e.segment.blobPrefixes)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name)}))),blobItems:e.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name)})))}})}function*kn(e){let t=[],r=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(r=e.clearRange);let i=0,n=0;for(;i<t.length&&n<r.length;)t[i].start<r[n].start?(yield{start:t[i].start,end:t[i].end,isClear:!1},++i):(yield{start:r[n].start,end:r[n].end,isClear:!0},++n);for(;i<t.length;++i)yield{start:t[i].start,end:t[i].end,isClear:!1};for(;n<r.length;++n)yield{start:r[n].start,end:r[n].end,isClear:!0}}function En(e){const t=e.split("/");for(let e=0;e<t.length;e++)t[e]=encodeURIComponent(t[e]);return t.join("/")}function Tn(e){if("_response"in e)return e;throw new TypeError(`Unexpected response object ${e}`)}!function(e){e[e.EXPONENTIAL=0]="EXPONENTIAL",e[e.FIXED=1]="FIXED"}(Qi||(Qi={}));const Bn={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:Qi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Cn=new He("The operation was aborted.");class In extends cr{constructor(e,t,r=Bn){super(e,t),this.retryOptions={retryPolicyType:r.retryPolicyType?r.retryPolicyType:Bn.retryPolicyType,maxTries:r.maxTries&&r.maxTries>=1?Math.floor(r.maxTries):Bn.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:Bn.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:Bn.maxRetryDelayInMs):Bn.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:Bn.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:Bn.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,r){const i=e.clone(),n=t||!this.retryOptions.secondaryHost||!("GET"===e.method||"HEAD"===e.method||"OPTIONS"===e.method)||r%2==1;let o;n||(i.url=sn(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=nn(i.url,Oi.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));try{if(Ci.info(`RetryPolicy: =====> Try=${r} ${n?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(i),!this.shouldRetry(n,r,o))return o;t=t||!n&&404===o.status}catch(e){if(Ci.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),!this.shouldRetry(n,r,o,e))throw e}return await this.delay(n,r,e.abortSignal),this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,i){if(t>=this.retryOptions.maxTries)return Ci.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;const n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i)for(const e of n)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return Ci.info(`RetryPolicy: Network error ${e} found, will retry.`),!0;if(r||i){const t=r?r.status:i?i.statusCode:0;if(!e&&404===t)return Ci.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return Ci.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!("PARSE_ERROR"!==(null==i?void 0:i.code)||!(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag')))&&(Ci.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0)}async delay(e,t,r){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case Qi.EXPONENTIAL:i=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Qi.FIXED:i=this.retryOptions.retryDelayInMs}else i=1e3*Math.random();return Ci.info(`RetryPolicy: Delay for ${i}ms`),pn(i,r,Cn)}}class An{constructor(e){this.retryOptions=e}create(e,t){return new In(e,t,this.retryOptions)}}let Fn;var Mn;!function(e){e[e.EXPONENTIAL=0]="EXPONENTIAL",e[e.FIXED=1]="FIXED"}(Mn||(Mn={}));const Dn={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:Mn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Rn=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Pn=new He("The operation was aborted.");class On extends cr{constructor(e,t){super(e,t)}async sendRequest(e){return ot||("GET"!==e.method.toUpperCase()&&"HEAD"!==e.method.toUpperCase()||(e.url=nn(e.url,Oi.FORCE_BROWSER_NO_CACHE,(new Date).getTime().toString())),e.headers.remove(ji),e.headers.remove(qi)),this._nextPolicy.sendRequest(e)}}class zn{create(e,t){return new On(e,t)}}function Nn(e){if(!e||"object"!=typeof e)return!1;const t=e;return Array.isArray(t.factories)&&"object"==typeof t.options&&"function"==typeof t.toServiceClientOptions}class qn{constructor(e,t={}){this.factories=e,this.options=t}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}function Un(e,t={}){e||(e=new fr);const r=new qn([],t);return r._credential=e,r}function Ln(e){var r;const i=e.options,{httpClient:n}=i,o=t(i,["httpClient"]);let s=e._coreHttpClient;var a;s||(s=n?(a=n,{sendRequest:async e=>pi(await a.sendRequest(si(e,{createProxy:!0})))}):(Fn||(Fn=rr()),Fn),e._coreHttpClient=s);let l=e._corePipeline;if(!l){const t=`azsdk-js-azure-storage-blob/${Ii}`,i=o.userAgentOptions&&o.userAgentOptions.userAgentPrefix?`${o.userAgentOptions.userAgentPrefix} ${t}`:`${t}`;l=Kr(Object.assign(Object.assign({},o),{loggingOptions:{additionalAllowedHeaderNames:Vi,additionalAllowedQueryParameters:Ji,logger:Ci.info},userAgentOptions:{userAgentPrefix:i},serializationOptions:{stringifyXML:Ei,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:_i,serializerOptions:{xml:{xmlCharKey:"#"}}}})),l.removePolicy({phase:"Retry"}),l.removePolicy({name:"decompressResponsePolicy"}),l.addPolicy({name:"StorageCorrectContentLengthPolicy",sendRequest:async(e,t)=>t(e)}),l.addPolicy(function(e={}){var t,r,i,n,o,s;const a=null!==(t=e.retryPolicyType)&&void 0!==t?t:Dn.retryPolicyType,l=null!==(r=e.maxTries)&&void 0!==r?r:Dn.maxTries,d=null!==(i=e.retryDelayInMs)&&void 0!==i?i:Dn.retryDelayInMs,c=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:Dn.maxRetryDelayInMs,u=null!==(o=e.secondaryHost)&&void 0!==o?o:Dn.secondaryHost,p=null!==(s=e.tryTimeoutInMs)&&void 0!==s?s:Dn.tryTimeoutInMs;function h({isPrimaryRetry:e,attempt:t,response:r,error:i}){var n,o;if(t>=l)return Ci.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${l}, no further try.`),!1;if(i){for(const e of Rn)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return Ci.info(`RetryPolicy: Network error ${e} found, will retry.`),!0;if("PARSE_ERROR"===(null==i?void 0:i.code)&&(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag')))return Ci.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(r||i){const t=null!==(o=null!==(n=null==r?void 0:r.status)&&void 0!==n?n:null==i?void 0:i.statusCode)&&void 0!==o?o:0;if(!e&&404===t)return Ci.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return Ci.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!1}function f(e,t){let r=0;if(e)switch(a){case Mn.EXPONENTIAL:r=Math.min((Math.pow(2,t-1)-1)*d,c);break;case Mn.FIXED:r=d}else r=1e3*Math.random();return Ci.info(`RetryPolicy: Delay for ${r}ms`),r}return{name:"storageRetryPolicy",async sendRequest(e,t){p&&(e.url=nn(e.url,Oi.TIMEOUT,String(Math.floor(p/1e3))));const r=e.url,i=u?sn(e.url,u):void 0;let n,o,s=!1,a=1,l=!0;for(;l;){const d=s||!i||!["GET","HEAD","OPTIONS"].includes(e.method)||a%2==1;e.url=d?r:i,n=void 0,o=void 0;try{Ci.info(`RetryPolicy: =====> Try=${a} ${d?"Primary":"Secondary"}`),n=await t(e),s=s||!d&&404===n.status}catch(e){if(!Qt(e))throw Ci.error(`RetryPolicy: Caught error, message: ${Ke(e)}`),e;Ci.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),o=e}l=h({isPrimaryRetry:d,attempt:a,response:n,error:o}),l&&await pn(f(d,a),e.abortSignal,Pn),a++}if(n)return n;throw null!=o?o:new Yt("RetryPolicy failed without known error.")}}}(o.retryOptions),{phase:"Retry"}),l.addPolicy({name:"storageBrowserPolicy",sendRequest:async(e,t)=>(ot||("GET"!==e.method&&"HEAD"!==e.method||(e.url=nn(e.url,Oi.FORCE_BROWSER_NO_CACHE,(new Date).getTime().toString())),e.headers.delete(ji),e.headers.delete(qi)),t(e))});const n=function(e){const t=[$n,Hn,Gn,Wn,Kn,Vn,Jn];if(e.factories.length){const r=e.factories.filter((e=>!t.some((t=>t(e)))));if(r.length){const e=r.some((e=>function(e){return"InjectorPolicyFactory"===e.constructor.name}(e)));return{wrappedPolicies:gi(r),afterRetry:e}}}}(e);n&&l.addPolicy(n.wrappedPolicies,n.afterRetry?{afterPhase:"Retry"}:void 0);const s=jn(e);dr(s)?l.addPolicy(lr({credential:s,scopes:null!==(r=o.audience)&&void 0!==r?r:Pi,challengeCallbacks:{authorizeRequestOnChallenge:ri}}),{phase:"Sign"}):s instanceof mr&&l.addPolicy((s.accountName,s.accountKey,{name:"storageSharedKeyCredentialPolicy",sendRequest:async(e,t)=>t(e)}),{phase:"Sign"}),e._corePipeline=l}return Object.assign(Object.assign({},o),{allowInsecureConnection:!0,httpClient:s,pipeline:l})}function jn(e){if(e._credential)return e._credential;let t=new fr;for(const r of e.factories)if(dr(r.credential))t=r.credential;else if(Hn(r))return r;return t}function Hn(e){return e instanceof mr||"StorageSharedKeyCredential"===e.constructor.name}function $n(e){return e instanceof fr||"AnonymousCredential"===e.constructor.name}function Gn(e){return dr(e.credential)}function Wn(e){return e instanceof zn||"StorageBrowserPolicyFactory"===e.constructor.name}function Kn(e){return e instanceof An||"StorageRetryPolicyFactory"===e.constructor.name}function Vn(e){return"TelemetryPolicyFactory"===e.constructor.name}function Jn(e){const t={log(e,t){},shouldLog:e=>!1},r=e.create({sendRequest:async e=>({request:e,headers:e.headers.clone(),status:500})},t).constructor.name;return["GenerateClientRequestIdPolicy","TracingPolicy","LogPolicy","ProxyPolicy","DisableResponseDecompressionPolicy","KeepAlivePolicy","DeserializationPolicy"].some((e=>r.startsWith(e)))}const Yn={serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:!0,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite"}}}}},Qn={serializedName:"Logging",type:{name:"Composite",className:"Logging",modelProperties:{version:{serializedName:"Version",required:!0,xmlName:"Version",type:{name:"String"}},deleteProperty:{serializedName:"Delete",required:!0,xmlName:"Delete",type:{name:"Boolean"}},read:{serializedName:"Read",required:!0,xmlName:"Read",type:{name:"Boolean"}},write:{serializedName:"Write",required:!0,xmlName:"Write",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},Zn={serializedName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy",modelProperties:{enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},days:{constraints:{InclusiveMinimum:1},serializedName:"Days",xmlName:"Days",type:{name:"Number"}}}}},Xn={serializedName:"Metrics",type:{name:"Composite",className:"Metrics",modelProperties:{version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},includeAPIs:{serializedName:"IncludeAPIs",xmlName:"IncludeAPIs",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},eo={serializedName:"CorsRule",type:{name:"Composite",className:"CorsRule",modelProperties:{allowedOrigins:{serializedName:"AllowedOrigins",required:!0,xmlName:"AllowedOrigins",type:{name:"String"}},allowedMethods:{serializedName:"AllowedMethods",required:!0,xmlName:"AllowedMethods",type:{name:"String"}},allowedHeaders:{serializedName:"AllowedHeaders",required:!0,xmlName:"AllowedHeaders",type:{name:"String"}},exposedHeaders:{serializedName:"ExposedHeaders",required:!0,xmlName:"ExposedHeaders",type:{name:"String"}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:"MaxAgeInSeconds",required:!0,xmlName:"MaxAgeInSeconds",type:{name:"Number"}}}}},to={serializedName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite",modelProperties:{enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},indexDocument:{serializedName:"IndexDocument",xmlName:"IndexDocument",type:{name:"String"}},errorDocument404Path:{serializedName:"ErrorDocument404Path",xmlName:"ErrorDocument404Path",type:{name:"String"}},defaultIndexDocumentPath:{serializedName:"DefaultIndexDocumentPath",xmlName:"DefaultIndexDocumentPath",type:{name:"String"}}}}},ro={serializedName:"StorageError",type:{name:"Composite",className:"StorageError",modelProperties:{message:{serializedName:"Message",xmlName:"Message",type:{name:"String"}},code:{serializedName:"Code",xmlName:"Code",type:{name:"String"}},authenticationErrorDetail:{serializedName:"AuthenticationErrorDetail",xmlName:"AuthenticationErrorDetail",type:{name:"String"}}}}},io={serializedName:"BlobServiceStatistics",xmlName:"StorageServiceStats",type:{name:"Composite",className:"BlobServiceStatistics",modelProperties:{geoReplication:{serializedName:"GeoReplication",xmlName:"GeoReplication",type:{name:"Composite",className:"GeoReplication"}}}}},no={serializedName:"GeoReplication",type:{name:"Composite",className:"GeoReplication",modelProperties:{status:{serializedName:"Status",required:!0,xmlName:"Status",type:{name:"Enum",allowedValues:["live","bootstrap","unavailable"]}},lastSyncOn:{serializedName:"LastSyncTime",required:!0,xmlName:"LastSyncTime",type:{name:"DateTimeRfc1123"}}}}},oo={serializedName:"ListContainersSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListContainersSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},containerItems:{serializedName:"ContainerItems",required:!0,xmlName:"Containers",xmlIsWrapped:!0,xmlElementName:"Container",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContainerItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},so={serializedName:"ContainerItem",xmlName:"Container",type:{name:"Composite",className:"ContainerItem",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},deleted:{serializedName:"Deleted",xmlName:"Deleted",type:{name:"Boolean"}},version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"ContainerProperties"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}},ao={serializedName:"ContainerProperties",type:{name:"Composite",className:"ContainerProperties",modelProperties:{lastModified:{serializedName:"Last-Modified",required:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,xmlName:"Etag",type:{name:"String"}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},publicAccess:{serializedName:"PublicAccess",xmlName:"PublicAccess",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"HasImmutabilityPolicy",xmlName:"HasImmutabilityPolicy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"HasLegalHold",xmlName:"HasLegalHold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"DefaultEncryptionScope",xmlName:"DefaultEncryptionScope",type:{name:"String"}},preventEncryptionScopeOverride:{serializedName:"DenyEncryptionScopeOverride",xmlName:"DenyEncryptionScopeOverride",type:{name:"Boolean"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},isImmutableStorageWithVersioningEnabled:{serializedName:"ImmutableStorageWithVersioningEnabled",xmlName:"ImmutableStorageWithVersioningEnabled",type:{name:"Boolean"}}}}},lo={serializedName:"KeyInfo",type:{name:"Composite",className:"KeyInfo",modelProperties:{startsOn:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",required:!0,xmlName:"Expiry",type:{name:"String"}}}}},co={serializedName:"UserDelegationKey",type:{name:"Composite",className:"UserDelegationKey",modelProperties:{signedObjectId:{serializedName:"SignedOid",required:!0,xmlName:"SignedOid",type:{name:"String"}},signedTenantId:{serializedName:"SignedTid",required:!0,xmlName:"SignedTid",type:{name:"String"}},signedStartsOn:{serializedName:"SignedStart",required:!0,xmlName:"SignedStart",type:{name:"String"}},signedExpiresOn:{serializedName:"SignedExpiry",required:!0,xmlName:"SignedExpiry",type:{name:"String"}},signedService:{serializedName:"SignedService",required:!0,xmlName:"SignedService",type:{name:"String"}},signedVersion:{serializedName:"SignedVersion",required:!0,xmlName:"SignedVersion",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}},uo={serializedName:"FilterBlobSegment",xmlName:"EnumerationResults",type:{name:"Composite",className:"FilterBlobSegment",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},where:{serializedName:"Where",required:!0,xmlName:"Where",type:{name:"String"}},blobs:{serializedName:"Blobs",required:!0,xmlName:"Blobs",xmlIsWrapped:!0,xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"FilterBlobItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},po={serializedName:"FilterBlobItem",xmlName:"Blob",type:{name:"Composite",className:"FilterBlobItem",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",type:{name:"String"}},tags:{serializedName:"Tags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}}}}},ho={serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags",modelProperties:{blobTagSet:{serializedName:"BlobTagSet",required:!0,xmlName:"TagSet",xmlIsWrapped:!0,xmlElementName:"Tag",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobTag"}}}}}}},fo={serializedName:"BlobTag",xmlName:"Tag",type:{name:"Composite",className:"BlobTag",modelProperties:{key:{serializedName:"Key",required:!0,xmlName:"Key",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}},mo={serializedName:"SignedIdentifier",xmlName:"SignedIdentifier",type:{name:"Composite",className:"SignedIdentifier",modelProperties:{id:{serializedName:"Id",required:!0,xmlName:"Id",type:{name:"String"}},accessPolicy:{serializedName:"AccessPolicy",xmlName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy"}}}}},go={serializedName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy",modelProperties:{startsOn:{serializedName:"Start",xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",xmlName:"Expiry",type:{name:"String"}},permissions:{serializedName:"Permission",xmlName:"Permission",type:{name:"String"}}}}},yo={serializedName:"ListBlobsFlatSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsFlatSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},vo={serializedName:"BlobFlatListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment",modelProperties:{blobItems:{serializedName:"BlobItems",required:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},bo={serializedName:"BlobItemInternal",xmlName:"Blob",type:{name:"Composite",className:"BlobItemInternal",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}},deleted:{serializedName:"Deleted",required:!0,xmlName:"Deleted",type:{name:"Boolean"}},snapshot:{serializedName:"Snapshot",required:!0,xmlName:"Snapshot",type:{name:"String"}},versionId:{serializedName:"VersionId",xmlName:"VersionId",type:{name:"String"}},isCurrentVersion:{serializedName:"IsCurrentVersion",xmlName:"IsCurrentVersion",type:{name:"Boolean"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},blobTags:{serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}},objectReplicationMetadata:{serializedName:"ObjectReplicationMetadata",xmlName:"OrMetadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},hasVersionsOnly:{serializedName:"HasVersionsOnly",xmlName:"HasVersionsOnly",type:{name:"Boolean"}}}}},wo={serializedName:"BlobName",type:{name:"Composite",className:"BlobName",modelProperties:{encoded:{serializedName:"Encoded",xmlName:"Encoded",xmlIsAttribute:!0,type:{name:"Boolean"}},content:{serializedName:"content",xmlName:"content",xmlIsMsText:!0,type:{name:"String"}}}}},_o={serializedName:"BlobPropertiesInternal",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal",modelProperties:{createdOn:{serializedName:"Creation-Time",xmlName:"Creation-Time",type:{name:"DateTimeRfc1123"}},lastModified:{serializedName:"Last-Modified",required:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,xmlName:"Etag",type:{name:"String"}},contentLength:{serializedName:"Content-Length",xmlName:"Content-Length",type:{name:"Number"}},contentType:{serializedName:"Content-Type",xmlName:"Content-Type",type:{name:"String"}},contentEncoding:{serializedName:"Content-Encoding",xmlName:"Content-Encoding",type:{name:"String"}},contentLanguage:{serializedName:"Content-Language",xmlName:"Content-Language",type:{name:"String"}},contentMD5:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}},contentDisposition:{serializedName:"Content-Disposition",xmlName:"Content-Disposition",type:{name:"String"}},cacheControl:{serializedName:"Cache-Control",xmlName:"Cache-Control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"BlobType",xmlName:"BlobType",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},copyId:{serializedName:"CopyId",xmlName:"CopyId",type:{name:"String"}},copyStatus:{serializedName:"CopyStatus",xmlName:"CopyStatus",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},copySource:{serializedName:"CopySource",xmlName:"CopySource",type:{name:"String"}},copyProgress:{serializedName:"CopyProgress",xmlName:"CopyProgress",type:{name:"String"}},copyCompletedOn:{serializedName:"CopyCompletionTime",xmlName:"CopyCompletionTime",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"CopyStatusDescription",xmlName:"CopyStatusDescription",type:{name:"String"}},serverEncrypted:{serializedName:"ServerEncrypted",xmlName:"ServerEncrypted",type:{name:"Boolean"}},incrementalCopy:{serializedName:"IncrementalCopy",xmlName:"IncrementalCopy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"DestinationSnapshot",xmlName:"DestinationSnapshot",type:{name:"String"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},accessTier:{serializedName:"AccessTier",xmlName:"AccessTier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}},accessTierInferred:{serializedName:"AccessTierInferred",xmlName:"AccessTierInferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"ArchiveStatus",xmlName:"ArchiveStatus",type:{name:"Enum",allowedValues:["rehydrate-pending-to-hot","rehydrate-pending-to-cool","rehydrate-pending-to-cold"]}},customerProvidedKeySha256:{serializedName:"CustomerProvidedKeySha256",xmlName:"CustomerProvidedKeySha256",type:{name:"String"}},encryptionScope:{serializedName:"EncryptionScope",xmlName:"EncryptionScope",type:{name:"String"}},accessTierChangedOn:{serializedName:"AccessTierChangeTime",xmlName:"AccessTierChangeTime",type:{name:"DateTimeRfc1123"}},tagCount:{serializedName:"TagCount",xmlName:"TagCount",type:{name:"Number"}},expiresOn:{serializedName:"Expiry-Time",xmlName:"Expiry-Time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"Sealed",xmlName:"Sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"RehydratePriority",xmlName:"RehydratePriority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessedOn:{serializedName:"LastAccessTime",xmlName:"LastAccessTime",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"ImmutabilityPolicyUntilDate",xmlName:"ImmutabilityPolicyUntilDate",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"ImmutabilityPolicyMode",xmlName:"ImmutabilityPolicyMode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"LegalHold",xmlName:"LegalHold",type:{name:"Boolean"}}}}},xo={serializedName:"ListBlobsHierarchySegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsHierarchySegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},delimiter:{serializedName:"Delimiter",xmlName:"Delimiter",type:{name:"String"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},So={serializedName:"BlobHierarchyListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment",modelProperties:{blobPrefixes:{serializedName:"BlobPrefixes",xmlName:"BlobPrefixes",xmlElementName:"BlobPrefix",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobPrefix"}}}},blobItems:{serializedName:"BlobItems",required:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},ko={serializedName:"BlobPrefix",type:{name:"Composite",className:"BlobPrefix",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}}}}},Eo={serializedName:"BlockLookupList",xmlName:"BlockList",type:{name:"Composite",className:"BlockLookupList",modelProperties:{committed:{serializedName:"Committed",xmlName:"Committed",xmlElementName:"Committed",type:{name:"Sequence",element:{type:{name:"String"}}}},uncommitted:{serializedName:"Uncommitted",xmlName:"Uncommitted",xmlElementName:"Uncommitted",type:{name:"Sequence",element:{type:{name:"String"}}}},latest:{serializedName:"Latest",xmlName:"Latest",xmlElementName:"Latest",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},To={serializedName:"BlockList",type:{name:"Composite",className:"BlockList",modelProperties:{committedBlocks:{serializedName:"CommittedBlocks",xmlName:"CommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}},uncommittedBlocks:{serializedName:"UncommittedBlocks",xmlName:"UncommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}},Bo={serializedName:"Block",type:{name:"Composite",className:"Block",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},size:{serializedName:"Size",required:!0,xmlName:"Size",type:{name:"Number"}}}}},Co={serializedName:"PageList",type:{name:"Composite",className:"PageList",modelProperties:{pageRange:{serializedName:"PageRange",xmlName:"PageRange",xmlElementName:"PageRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"PageRange"}}}},clearRange:{serializedName:"ClearRange",xmlName:"ClearRange",xmlElementName:"ClearRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClearRange"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Io={serializedName:"PageRange",xmlName:"PageRange",type:{name:"Composite",className:"PageRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},Ao={serializedName:"ClearRange",xmlName:"ClearRange",type:{name:"Composite",className:"ClearRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},Fo={serializedName:"QueryRequest",xmlName:"QueryRequest",type:{name:"Composite",className:"QueryRequest",modelProperties:{queryType:{serializedName:"QueryType",required:!0,xmlName:"QueryType",type:{name:"String"}},expression:{serializedName:"Expression",required:!0,xmlName:"Expression",type:{name:"String"}},inputSerialization:{serializedName:"InputSerialization",xmlName:"InputSerialization",type:{name:"Composite",className:"QuerySerialization"}},outputSerialization:{serializedName:"OutputSerialization",xmlName:"OutputSerialization",type:{name:"Composite",className:"QuerySerialization"}}}}},Mo={serializedName:"QuerySerialization",type:{name:"Composite",className:"QuerySerialization",modelProperties:{format:{serializedName:"Format",xmlName:"Format",type:{name:"Composite",className:"QueryFormat"}}}}},Do={serializedName:"QueryFormat",type:{name:"Composite",className:"QueryFormat",modelProperties:{type:{serializedName:"Type",required:!0,xmlName:"Type",type:{name:"Enum",allowedValues:["delimited","json","arrow","parquet"]}},delimitedTextConfiguration:{serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration"}},jsonTextConfiguration:{serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration"}},arrowConfiguration:{serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration"}},parquetTextConfiguration:{serializedName:"ParquetTextConfiguration",xmlName:"ParquetTextConfiguration",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Ro={serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration",modelProperties:{columnSeparator:{serializedName:"ColumnSeparator",xmlName:"ColumnSeparator",type:{name:"String"}},fieldQuote:{serializedName:"FieldQuote",xmlName:"FieldQuote",type:{name:"String"}},recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}},escapeChar:{serializedName:"EscapeChar",xmlName:"EscapeChar",type:{name:"String"}},headersPresent:{serializedName:"HeadersPresent",xmlName:"HasHeaders",type:{name:"Boolean"}}}}},Po={serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration",modelProperties:{recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}}}}},Oo={serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration",modelProperties:{schema:{serializedName:"Schema",required:!0,xmlName:"Schema",xmlIsWrapped:!0,xmlElementName:"Field",type:{name:"Sequence",element:{type:{name:"Composite",className:"ArrowField"}}}}}}},zo={serializedName:"ArrowField",xmlName:"Field",type:{name:"Composite",className:"ArrowField",modelProperties:{type:{serializedName:"Type",required:!0,xmlName:"Type",type:{name:"String"}},name:{serializedName:"Name",xmlName:"Name",type:{name:"String"}},precision:{serializedName:"Precision",xmlName:"Precision",type:{name:"Number"}},scale:{serializedName:"Scale",xmlName:"Scale",type:{name:"Number"}}}}},No={serializedName:"Service_setPropertiesHeaders",type:{name:"Composite",className:"ServiceSetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},qo={serializedName:"Service_setPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceSetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Uo={serializedName:"Service_getPropertiesHeaders",type:{name:"Composite",className:"ServiceGetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Lo={serializedName:"Service_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},jo={serializedName:"Service_getStatisticsHeaders",type:{name:"Composite",className:"ServiceGetStatisticsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ho={serializedName:"Service_getStatisticsExceptionHeaders",type:{name:"Composite",className:"ServiceGetStatisticsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},$o={serializedName:"Service_listContainersSegmentHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Go={serializedName:"Service_listContainersSegmentExceptionHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Wo={serializedName:"Service_getUserDelegationKeyHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ko={serializedName:"Service_getUserDelegationKeyExceptionHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Vo={serializedName:"Service_getAccountInfoHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Jo={serializedName:"Service_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Yo={serializedName:"Service_submitBatchHeaders",type:{name:"Composite",className:"ServiceSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Qo={serializedName:"Service_submitBatchExceptionHeaders",type:{name:"Composite",className:"ServiceSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Zo={serializedName:"Service_filterBlobsHeaders",type:{name:"Composite",className:"ServiceFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Xo={serializedName:"Service_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ServiceFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},es={serializedName:"Container_createHeaders",type:{name:"Composite",className:"ContainerCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ts={serializedName:"Container_createExceptionHeaders",type:{name:"Composite",className:"ContainerCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},rs={serializedName:"Container_getPropertiesHeaders",type:{name:"Composite",className:"ContainerGetPropertiesHeaders",modelProperties:{metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"x-ms-has-immutability-policy",xmlName:"x-ms-has-immutability-policy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"x-ms-has-legal-hold",xmlName:"x-ms-has-legal-hold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}},denyEncryptionScopeOverride:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}},isImmutableStorageWithVersioningEnabled:{serializedName:"x-ms-immutable-storage-with-versioning-enabled",xmlName:"x-ms-immutable-storage-with-versioning-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},is={serializedName:"Container_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ContainerGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ns={serializedName:"Container_deleteHeaders",type:{name:"Composite",className:"ContainerDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},os={serializedName:"Container_deleteExceptionHeaders",type:{name:"Composite",className:"ContainerDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ss={serializedName:"Container_setMetadataHeaders",type:{name:"Composite",className:"ContainerSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},as={serializedName:"Container_setMetadataExceptionHeaders",type:{name:"Composite",className:"ContainerSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ls={serializedName:"Container_getAccessPolicyHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyHeaders",modelProperties:{blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ds={serializedName:"Container_getAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},cs={serializedName:"Container_setAccessPolicyHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},us={serializedName:"Container_setAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ps={serializedName:"Container_restoreHeaders",type:{name:"Composite",className:"ContainerRestoreHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},hs={serializedName:"Container_restoreExceptionHeaders",type:{name:"Composite",className:"ContainerRestoreExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},fs={serializedName:"Container_renameHeaders",type:{name:"Composite",className:"ContainerRenameHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ms={serializedName:"Container_renameExceptionHeaders",type:{name:"Composite",className:"ContainerRenameExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},gs={serializedName:"Container_submitBatchHeaders",type:{name:"Composite",className:"ContainerSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}}}}},ys={serializedName:"Container_submitBatchExceptionHeaders",type:{name:"Composite",className:"ContainerSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},vs={serializedName:"Container_filterBlobsHeaders",type:{name:"Composite",className:"ContainerFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},bs={serializedName:"Container_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ContainerFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ws={serializedName:"Container_acquireLeaseHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},_s={serializedName:"Container_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},xs={serializedName:"Container_releaseLeaseHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Ss={serializedName:"Container_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ks={serializedName:"Container_renewLeaseHeaders",type:{name:"Composite",className:"ContainerRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Es={serializedName:"Container_renewLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ts={serializedName:"Container_breakLeaseHeaders",type:{name:"Composite",className:"ContainerBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Bs={serializedName:"Container_breakLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Cs={serializedName:"Container_changeLeaseHeaders",type:{name:"Composite",className:"ContainerChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Is={serializedName:"Container_changeLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},As={serializedName:"Container_listBlobFlatSegmentHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Fs={serializedName:"Container_listBlobFlatSegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ms={serializedName:"Container_listBlobHierarchySegmentHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ds={serializedName:"Container_listBlobHierarchySegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Rs={serializedName:"Container_getAccountInfoHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}}}}},Ps={serializedName:"Container_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Os={serializedName:"Blob_downloadHeaders",type:{name:"Composite",className:"BlobDownloadHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",headerCollectionPrefix:"x-ms-or-",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}},zs={serializedName:"Blob_downloadExceptionHeaders",type:{name:"Composite",className:"BlobDownloadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ns={serializedName:"Blob_getPropertiesHeaders",type:{name:"Composite",className:"BlobGetPropertiesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",headerCollectionPrefix:"x-ms-or-",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},isIncrementalCopy:{serializedName:"x-ms-incremental-copy",xmlName:"x-ms-incremental-copy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"x-ms-copy-destination-snapshot",xmlName:"x-ms-copy-destination-snapshot",type:{name:"String"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},accessTier:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"String"}},accessTierInferred:{serializedName:"x-ms-access-tier-inferred",xmlName:"x-ms-access-tier-inferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"x-ms-archive-status",xmlName:"x-ms-archive-status",type:{name:"String"}},accessTierChangedOn:{serializedName:"x-ms-access-tier-change-time",xmlName:"x-ms-access-tier-change-time",type:{name:"DateTimeRfc1123"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},expiresOn:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},qs={serializedName:"Blob_getPropertiesExceptionHeaders",type:{name:"Composite",className:"BlobGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Us={serializedName:"Blob_deleteHeaders",type:{name:"Composite",className:"BlobDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ls={serializedName:"Blob_deleteExceptionHeaders",type:{name:"Composite",className:"BlobDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},js={serializedName:"Blob_undeleteHeaders",type:{name:"Composite",className:"BlobUndeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Hs={serializedName:"Blob_undeleteExceptionHeaders",type:{name:"Composite",className:"BlobUndeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},$s={serializedName:"Blob_setExpiryHeaders",type:{name:"Composite",className:"BlobSetExpiryHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Gs={serializedName:"Blob_setExpiryExceptionHeaders",type:{name:"Composite",className:"BlobSetExpiryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ws={serializedName:"Blob_setHttpHeadersHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ks={serializedName:"Blob_setHttpHeadersExceptionHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Vs={serializedName:"Blob_setImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiry:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}}}},Js={serializedName:"Blob_setImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ys={serializedName:"Blob_deleteImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},Qs={serializedName:"Blob_deleteImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Zs={serializedName:"Blob_setLegalHoldHeaders",type:{name:"Composite",className:"BlobSetLegalHoldHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}}},Xs={serializedName:"Blob_setLegalHoldExceptionHeaders",type:{name:"Composite",className:"BlobSetLegalHoldExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ea={serializedName:"Blob_setMetadataHeaders",type:{name:"Composite",className:"BlobSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ta={serializedName:"Blob_setMetadataExceptionHeaders",type:{name:"Composite",className:"BlobSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ra={serializedName:"Blob_acquireLeaseHeaders",type:{name:"Composite",className:"BlobAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},ia={serializedName:"Blob_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"BlobAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},na={serializedName:"Blob_releaseLeaseHeaders",type:{name:"Composite",className:"BlobReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},oa={serializedName:"Blob_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"BlobReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},sa={serializedName:"Blob_renewLeaseHeaders",type:{name:"Composite",className:"BlobRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},aa={serializedName:"Blob_renewLeaseExceptionHeaders",type:{name:"Composite",className:"BlobRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},la={serializedName:"Blob_changeLeaseHeaders",type:{name:"Composite",className:"BlobChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},da={serializedName:"Blob_changeLeaseExceptionHeaders",type:{name:"Composite",className:"BlobChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ca={serializedName:"Blob_breakLeaseHeaders",type:{name:"Composite",className:"BlobBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},ua={serializedName:"Blob_breakLeaseExceptionHeaders",type:{name:"Composite",className:"BlobBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},pa={serializedName:"Blob_createSnapshotHeaders",type:{name:"Composite",className:"BlobCreateSnapshotHeaders",modelProperties:{snapshot:{serializedName:"x-ms-snapshot",xmlName:"x-ms-snapshot",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ha={serializedName:"Blob_createSnapshotExceptionHeaders",type:{name:"Composite",className:"BlobCreateSnapshotExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},fa={serializedName:"Blob_startCopyFromURLHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ma={serializedName:"Blob_startCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ga={serializedName:"Blob_copyFromURLHeaders",type:{name:"Composite",className:"BlobCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{defaultValue:"success",isConstant:!0,serializedName:"x-ms-copy-status",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ya={serializedName:"Blob_copyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},va={serializedName:"Blob_abortCopyFromURLHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ba={serializedName:"Blob_abortCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},wa={serializedName:"Blob_setTierHeaders",type:{name:"Composite",className:"BlobSetTierHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},_a={serializedName:"Blob_setTierExceptionHeaders",type:{name:"Composite",className:"BlobSetTierExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},xa={serializedName:"Blob_getAccountInfoHeaders",type:{name:"Composite",className:"BlobGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}}}}},Sa={serializedName:"Blob_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"BlobGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ka={serializedName:"Blob_queryHeaders",type:{name:"Composite",className:"BlobQueryHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletionTime:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}},Ea={serializedName:"Blob_queryExceptionHeaders",type:{name:"Composite",className:"BlobQueryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ta={serializedName:"Blob_getTagsHeaders",type:{name:"Composite",className:"BlobGetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ba={serializedName:"Blob_getTagsExceptionHeaders",type:{name:"Composite",className:"BlobGetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ca={serializedName:"Blob_setTagsHeaders",type:{name:"Composite",className:"BlobSetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ia={serializedName:"Blob_setTagsExceptionHeaders",type:{name:"Composite",className:"BlobSetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Aa={serializedName:"PageBlob_createHeaders",type:{name:"Composite",className:"PageBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Fa={serializedName:"PageBlob_createExceptionHeaders",type:{name:"Composite",className:"PageBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ma={serializedName:"PageBlob_uploadPagesHeaders",type:{name:"Composite",className:"PageBlobUploadPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Da={serializedName:"PageBlob_uploadPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ra={serializedName:"PageBlob_clearPagesHeaders",type:{name:"Composite",className:"PageBlobClearPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Pa={serializedName:"PageBlob_clearPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobClearPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Oa={serializedName:"PageBlob_uploadPagesFromURLHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},za={serializedName:"PageBlob_uploadPagesFromURLExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Na={serializedName:"PageBlob_getPageRangesHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},qa={serializedName:"PageBlob_getPageRangesExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ua={serializedName:"PageBlob_getPageRangesDiffHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},La={serializedName:"PageBlob_getPageRangesDiffExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ja={serializedName:"PageBlob_resizeHeaders",type:{name:"Composite",className:"PageBlobResizeHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ha={serializedName:"PageBlob_resizeExceptionHeaders",type:{name:"Composite",className:"PageBlobResizeExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},$a={serializedName:"PageBlob_updateSequenceNumberHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ga={serializedName:"PageBlob_updateSequenceNumberExceptionHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Wa={serializedName:"PageBlob_copyIncrementalHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ka={serializedName:"PageBlob_copyIncrementalExceptionHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Va={serializedName:"AppendBlob_createHeaders",type:{name:"Composite",className:"AppendBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ja={serializedName:"AppendBlob_createExceptionHeaders",type:{name:"Composite",className:"AppendBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Ya={serializedName:"AppendBlob_appendBlockHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Qa={serializedName:"AppendBlob_appendBlockExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Za={serializedName:"AppendBlob_appendBlockFromUrlHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Xa={serializedName:"AppendBlob_appendBlockFromUrlExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},el={serializedName:"AppendBlob_sealHeaders",type:{name:"Composite",className:"AppendBlobSealHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}}}}},tl={serializedName:"AppendBlob_sealExceptionHeaders",type:{name:"Composite",className:"AppendBlobSealExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},rl={serializedName:"BlockBlob_uploadHeaders",type:{name:"Composite",className:"BlockBlobUploadHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},il={serializedName:"BlockBlob_uploadExceptionHeaders",type:{name:"Composite",className:"BlockBlobUploadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},nl={serializedName:"BlockBlob_putBlobFromUrlHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ol={serializedName:"BlockBlob_putBlobFromUrlExceptionHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},sl={serializedName:"BlockBlob_stageBlockHeaders",type:{name:"Composite",className:"BlockBlobStageBlockHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},al={serializedName:"BlockBlob_stageBlockExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ll={serializedName:"BlockBlob_stageBlockFromURLHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},dl={serializedName:"BlockBlob_stageBlockFromURLExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},cl={serializedName:"BlockBlob_commitBlockListHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ul={serializedName:"BlockBlob_commitBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},pl={serializedName:"BlockBlob_getBlockListHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},hl={serializedName:"BlockBlob_getBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},fl={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},ml={parameterPath:"blobServiceProperties",mapper:Yn},gl={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},yl={parameterPath:"url",mapper:{serializedName:"url",required:!0,xmlName:"url",type:{name:"String"}},skipEncoding:!0},vl={parameterPath:"restype",mapper:{defaultValue:"service",isConstant:!0,serializedName:"restype",type:{name:"String"}}},bl={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:!0,serializedName:"comp",type:{name:"String"}}},wl={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}},_l={parameterPath:"version",mapper:{defaultValue:"2024-11-04",isConstant:!0,serializedName:"x-ms-version",type:{name:"String"}}},xl={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}},Sl={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},kl={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:!0,serializedName:"comp",type:{name:"String"}}},El={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}},Tl={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}},Bl={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}},Cl={parameterPath:"keyInfo",mapper:lo},Il={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:!0,serializedName:"restype",type:{name:"String"}}},Al={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},Fl={parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Ml={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:!0,xmlName:"Content-Length",type:{name:"Number"}}},Dl={parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:!0,xmlName:"Content-Type",type:{name:"String"}}},Rl={parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Pl={parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}},Ol={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:!0,serializedName:"restype",type:{name:"String"}}},zl={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",type:{name:"Dictionary",value:{type:{name:"String"}}}}},Nl={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}},ql={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}},Ul={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}},Ll={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}},jl={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Hl={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:!0,serializedName:"comp",type:{name:"String"}}},$l={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Gl={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Wl={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Kl={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}},Vl={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},Jl={parameterPath:"action",mapper:{defaultValue:"release",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Yl={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:!0,xmlName:"x-ms-lease-id",type:{name:"String"}}},Ql={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Zl={parameterPath:"action",mapper:{defaultValue:"break",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Xl={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}},ed={parameterPath:"action",mapper:{defaultValue:"change",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},td={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:!0,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},rd={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListBlobsIncludeItem",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["copy","deleted","metadata","snapshots","uncommittedblobs","versions","tags","immutabilitypolicy","legalhold","deletedwithversions"]}}}},collectionFormat:"CSV"},id={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}},nd={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}},od={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}},sd={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}},ad={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}},ld={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}},dd={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}},cd={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}},ud={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}},pd={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}},hd={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}},fd={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}},md={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}},gd={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}},yd={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}},vd={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:!0,serializedName:"comp",type:{name:"String"}}},bd={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}},wd={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}},_d={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}},xd={parameterPath:["options","tier"],mapper:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}},Sd={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}},kd={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}},Ed={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}},Td={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}},Bd={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}},Cd={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}},Id={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},Ad={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}},Fd={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}},Md={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}},Dd={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}},Rd={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}},Pd={parameterPath:["options","queryRequest"],mapper:Fo},Od={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:!0,serializedName:"comp",type:{name:"String"}}},zd={parameterPath:["options","tags"],mapper:ho},Nd={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}},qd={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}},Ud={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:!0,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}},Ld={parameterPath:["options","blobSequenceNumber"],mapper:{defaultValue:0,serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}},jd={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Hd={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},$d={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Gd={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Wd={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}},Kd={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}},Vd={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}},Jd={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}},Yd={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},Qd={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}},Zd={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Xd={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:!0,serializedName:"comp",type:{name:"String"}}},ec={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}},tc={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}},rc={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}},ic={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},nc={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:!0,serializedName:"comp",type:{name:"String"}}},oc={parameterPath:"blockId",mapper:{serializedName:"blockid",required:!0,xmlName:"blockid",type:{name:"String"}}},sc={parameterPath:"blocks",mapper:Eo},ac={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:!0,serializedName:"comp",type:{name:"String"}}};class lc{constructor(e){this.client=e}setProperties(e,t){return this.client.sendOperationRequest({blobServiceProperties:e,options:t},cc)}getProperties(e){return this.client.sendOperationRequest({options:e},uc)}getStatistics(e){return this.client.sendOperationRequest({options:e},pc)}listContainersSegment(e){return this.client.sendOperationRequest({options:e},hc)}getUserDelegationKey(e,t){return this.client.sendOperationRequest({keyInfo:e,options:t},fc)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},mc)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},gc)}filterBlobs(e){return this.client.sendOperationRequest({options:e},yc)}}const dc=Er(e,!0),cc={path:"/",httpMethod:"PUT",responses:{202:{headersMapper:No},default:{bodyMapper:ro,headersMapper:qo}},requestBody:ml,queryParameters:[vl,bl,wl],urlParameters:[yl],headerParameters:[fl,gl,_l,xl],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:dc},uc={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:Yn,headersMapper:Uo},default:{bodyMapper:ro,headersMapper:Lo}},queryParameters:[vl,bl,wl],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:dc},pc={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:io,headersMapper:jo},default:{bodyMapper:ro,headersMapper:Ho}},queryParameters:[vl,wl,{parameterPath:"comp",mapper:{defaultValue:"stats",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:dc},hc={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:oo,headersMapper:$o},default:{bodyMapper:ro,headersMapper:Go}},queryParameters:[wl,kl,El,Tl,Bl,{parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListContainersIncludeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["metadata","deleted","system"]}}}},collectionFormat:"CSV"}],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:dc},fc={path:"/",httpMethod:"POST",responses:{200:{bodyMapper:co,headersMapper:Wo},default:{bodyMapper:ro,headersMapper:Ko}},requestBody:Cl,queryParameters:[vl,wl,{parameterPath:"comp",mapper:{defaultValue:"userdelegationkey",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[fl,gl,_l,xl],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:dc},mc={path:"/",httpMethod:"GET",responses:{200:{headersMapper:Vo},default:{bodyMapper:ro,headersMapper:Jo}},queryParameters:[bl,wl,Il],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:dc},gc={path:"/",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Yo},default:{bodyMapper:ro,headersMapper:Qo}},requestBody:Al,queryParameters:[wl,Fl],urlParameters:[yl],headerParameters:[gl,_l,xl,Ml,Dl],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:dc},yc={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:uo,headersMapper:Zo},default:{bodyMapper:ro,headersMapper:Xo}},queryParameters:[wl,Tl,Bl,Rl,Pl],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:dc};class vc{constructor(e){this.client=e}create(e){return this.client.sendOperationRequest({options:e},wc)}getProperties(e){return this.client.sendOperationRequest({options:e},_c)}delete(e){return this.client.sendOperationRequest({options:e},xc)}setMetadata(e){return this.client.sendOperationRequest({options:e},Sc)}getAccessPolicy(e){return this.client.sendOperationRequest({options:e},kc)}setAccessPolicy(e){return this.client.sendOperationRequest({options:e},Ec)}restore(e){return this.client.sendOperationRequest({options:e},Tc)}rename(e,t){return this.client.sendOperationRequest({sourceContainerName:e,options:t},Bc)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},Cc)}filterBlobs(e){return this.client.sendOperationRequest({options:e},Ic)}acquireLease(e){return this.client.sendOperationRequest({options:e},Ac)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},Fc)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},Mc)}breakLease(e){return this.client.sendOperationRequest({options:e},Dc)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},Rc)}listBlobFlatSegment(e){return this.client.sendOperationRequest({options:e},Pc)}listBlobHierarchySegment(e,t){return this.client.sendOperationRequest({delimiter:e,options:t},Oc)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},zc)}}const bc=Er(e,!0),wc={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:es},default:{bodyMapper:ro,headersMapper:ts}},queryParameters:[wl,Ol],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,Nl,{parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}},{parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}}],isXML:!0,serializer:bc},_c={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:rs},default:{bodyMapper:ro,headersMapper:is}},queryParameters:[wl,Ol],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql],isXML:!0,serializer:bc},xc={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:ns},default:{bodyMapper:ro,headersMapper:os}},queryParameters:[wl,Ol],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll],isXML:!0,serializer:bc},Sc={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ss},default:{bodyMapper:ro,headersMapper:as}},queryParameters:[wl,Ol,jl],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,ql,Ul],isXML:!0,serializer:bc},kc={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier"},headersMapper:ls},default:{bodyMapper:ro,headersMapper:ds}},queryParameters:[wl,Ol,Hl],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql],isXML:!0,serializer:bc},Ec={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:cs},default:{bodyMapper:ro,headersMapper:us}},requestBody:{parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}},queryParameters:[wl,Ol,Hl],urlParameters:[yl],headerParameters:[fl,gl,_l,xl,Nl,ql,Ul,Ll],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:bc},Tc={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ps},default:{bodyMapper:ro,headersMapper:hs}},queryParameters:[wl,Ol,$l],urlParameters:[yl],headerParameters:[_l,xl,Sl,{parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}},{parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}}],isXML:!0,serializer:bc},Bc={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:fs},default:{bodyMapper:ro,headersMapper:ms}},queryParameters:[wl,Ol,{parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,{parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:!0,xmlName:"x-ms-source-container-name",type:{name:"String"}}},{parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}}],isXML:!0,serializer:bc},Cc={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:gs},default:{bodyMapper:ro,headersMapper:ys}},requestBody:Al,queryParameters:[wl,Fl,Ol],urlParameters:[yl],headerParameters:[gl,_l,xl,Ml,Dl],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:bc},Ic={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:uo,headersMapper:vs},default:{bodyMapper:ro,headersMapper:bs}},queryParameters:[wl,Tl,Bl,Rl,Pl,Ol],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:bc},Ac={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ws},default:{bodyMapper:ro,headersMapper:_s}},queryParameters:[wl,Ol,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Wl,Kl,Vl],isXML:!0,serializer:bc},Fc={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:xs},default:{bodyMapper:ro,headersMapper:Ss}},queryParameters:[wl,Ol,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Jl,Yl],isXML:!0,serializer:bc},Mc={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ks},default:{bodyMapper:ro,headersMapper:Es}},queryParameters:[wl,Ol,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Yl,Ql],isXML:!0,serializer:bc},Dc={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:Ts},default:{bodyMapper:ro,headersMapper:Bs}},queryParameters:[wl,Ol,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Zl,Xl],isXML:!0,serializer:bc},Rc={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Cs},default:{bodyMapper:ro,headersMapper:Is}},queryParameters:[wl,Ol,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Yl,ed,td],isXML:!0,serializer:bc},Pc={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:yo,headersMapper:As},default:{bodyMapper:ro,headersMapper:Fs}},queryParameters:[wl,kl,El,Tl,Bl,Ol,rd],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:bc},Oc={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:xo,headersMapper:Ms},default:{bodyMapper:ro,headersMapper:Ds}},queryParameters:[wl,kl,El,Tl,Bl,Ol,rd,{parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:!0,xmlName:"delimiter",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:bc},zc={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:Rs},default:{bodyMapper:ro,headersMapper:Ps}},queryParameters:[bl,wl,Il],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:bc};class Nc{constructor(e){this.client=e}download(e){return this.client.sendOperationRequest({options:e},Uc)}getProperties(e){return this.client.sendOperationRequest({options:e},Lc)}delete(e){return this.client.sendOperationRequest({options:e},jc)}undelete(e){return this.client.sendOperationRequest({options:e},Hc)}setExpiry(e,t){return this.client.sendOperationRequest({expiryOptions:e,options:t},$c)}setHttpHeaders(e){return this.client.sendOperationRequest({options:e},Gc)}setImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},Wc)}deleteImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},Kc)}setLegalHold(e,t){return this.client.sendOperationRequest({legalHold:e,options:t},Vc)}setMetadata(e){return this.client.sendOperationRequest({options:e},Jc)}acquireLease(e){return this.client.sendOperationRequest({options:e},Yc)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},Qc)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},Zc)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},Xc)}breakLease(e){return this.client.sendOperationRequest({options:e},eu)}createSnapshot(e){return this.client.sendOperationRequest({options:e},tu)}startCopyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},ru)}copyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},iu)}abortCopyFromURL(e,t){return this.client.sendOperationRequest({copyId:e,options:t},nu)}setTier(e,t){return this.client.sendOperationRequest({tier:e,options:t},ou)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},su)}query(e){return this.client.sendOperationRequest({options:e},au)}getTags(e){return this.client.sendOperationRequest({options:e},lu)}setTags(e){return this.client.sendOperationRequest({options:e},du)}}const qc=Er(e,!0),Uc={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Os},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Os},default:{bodyMapper:ro,headersMapper:zs}},queryParameters:[wl,id,nd],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,od,{parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}},{parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}},sd,ad,ld,dd,cd,ud],isXML:!0,serializer:qc},Lc={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:Ns},default:{bodyMapper:ro,headersMapper:qs}},queryParameters:[wl,id,nd],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud],isXML:!0,serializer:qc},jc={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:Us},default:{bodyMapper:ro,headersMapper:Ls}},queryParameters:[wl,id,nd,{parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,dd,cd,ud,{parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapshots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}}],isXML:!0,serializer:qc},Hc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:js},default:{bodyMapper:ro,headersMapper:Hs}},queryParameters:[wl,$l],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:qc},$c={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:$s},default:{bodyMapper:ro,headersMapper:Gs}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,{parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:!0,xmlName:"x-ms-expiry-option",type:{name:"String"}}},{parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}}],isXML:!0,serializer:qc},Gc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Ws},default:{bodyMapper:ro,headersMapper:Ks}},queryParameters:[bl,wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,dd,cd,ud,pd,hd,fd,md,gd,yd],isXML:!0,serializer:qc},Wc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Vs},default:{bodyMapper:ro,headersMapper:Js}},queryParameters:[wl,vd],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ll,bd,wd],isXML:!0,serializer:qc},Kc={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:Ys},default:{bodyMapper:ro,headersMapper:Qs}},queryParameters:[wl,vd],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:qc},Vc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Zs},default:{bodyMapper:ro,headersMapper:Xs}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,{parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:!0,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}],isXML:!0,serializer:qc},Jc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ea},default:{bodyMapper:ro,headersMapper:ta}},queryParameters:[wl,jl],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d],isXML:!0,serializer:qc},Yc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:ra},default:{bodyMapper:ro,headersMapper:ia}},queryParameters:[wl,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Wl,Kl,Vl,dd,cd,ud],isXML:!0,serializer:qc},Qc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:na},default:{bodyMapper:ro,headersMapper:oa}},queryParameters:[wl,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Jl,Yl,dd,cd,ud],isXML:!0,serializer:qc},Zc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:sa},default:{bodyMapper:ro,headersMapper:aa}},queryParameters:[wl,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Yl,Ql,dd,cd,ud],isXML:!0,serializer:qc},Xc={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:la},default:{bodyMapper:ro,headersMapper:da}},queryParameters:[wl,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Yl,ed,td,dd,cd,ud],isXML:!0,serializer:qc},eu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:ca},default:{bodyMapper:ro,headersMapper:ua}},queryParameters:[wl,Gl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,Zl,Xl,dd,cd,ud],isXML:!0,serializer:qc},tu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:pa},default:{bodyMapper:ro,headersMapper:ha}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d],isXML:!0,serializer:qc},ru={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:fa},default:{bodyMapper:ro,headersMapper:ma}},queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,ql,Ul,Ll,dd,cd,ud,bd,wd,xd,Sd,kd,Ed,Td,Bd,Cd,Id,Ad,{parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}},Fd],isXML:!0,serializer:qc},iu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:ga},default:{bodyMapper:ro,headersMapper:ya}},queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,zl,ql,Ul,Ll,dd,cd,ud,bd,wd,_d,xd,kd,Ed,Td,Bd,Id,Ad,Fd,{parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:!0,serializedName:"x-ms-requires-sync",type:{name:"String"}}},Md,Dd,Rd],isXML:!0,serializer:qc},nu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:va},default:{bodyMapper:ro,headersMapper:ba}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:!0,serializedName:"comp",type:{name:"String"}}},{parameterPath:"copyId",mapper:{serializedName:"copyid",required:!0,xmlName:"copyid",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,{parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:!0,serializedName:"x-ms-copy-action",type:{name:"String"}}}],isXML:!0,serializer:qc},ou={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:wa},202:{headersMapper:wa},default:{bodyMapper:ro,headersMapper:_a}},queryParameters:[wl,id,nd,{parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,ud,Sd,{parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:!0,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}}],isXML:!0,serializer:qc},su={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:xa},default:{bodyMapper:ro,headersMapper:Sa}},queryParameters:[bl,wl,Il],urlParameters:[yl],headerParameters:[_l,xl,Sl],isXML:!0,serializer:qc},au={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ka},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ka},default:{bodyMapper:ro,headersMapper:Ea}},requestBody:Pd,queryParameters:[wl,id,{parameterPath:"comp",mapper:{defaultValue:"query",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[fl,gl,_l,xl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:qc},lu={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:ho,headersMapper:Ta},default:{bodyMapper:ro,headersMapper:Ba}},queryParameters:[wl,id,nd,Od],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,ud],isXML:!0,serializer:qc},du={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:Ca},default:{bodyMapper:ro,headersMapper:Ia}},requestBody:zd,queryParameters:[wl,nd,Od],urlParameters:[yl],headerParameters:[fl,gl,_l,xl,ql,ud,Nd,qd],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:qc};class cu{constructor(e){this.client=e}create(e,t,r){return this.client.sendOperationRequest({contentLength:e,blobContentLength:t,options:r},pu)}uploadPages(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},hu)}clearPages(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},fu)}uploadPagesFromURL(e,t,r,i,n){return this.client.sendOperationRequest({sourceUrl:e,sourceRange:t,contentLength:r,range:i,options:n},mu)}getPageRanges(e){return this.client.sendOperationRequest({options:e},gu)}getPageRangesDiff(e){return this.client.sendOperationRequest({options:e},yu)}resize(e,t){return this.client.sendOperationRequest({blobContentLength:e,options:t},vu)}updateSequenceNumber(e,t){return this.client.sendOperationRequest({sequenceNumberAction:e,options:t},bu)}copyIncremental(e,t){return this.client.sendOperationRequest({copySource:e,options:t},wu)}}const uu=Er(e,!0),pu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Aa},default:{bodyMapper:ro,headersMapper:Fa}},queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,pd,hd,fd,md,gd,yd,bd,wd,_d,xd,Ad,Fd,{parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},Ud,Ld],isXML:!0,serializer:uu},hu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Ma},default:{bodyMapper:ro,headersMapper:Da}},requestBody:Hd,queryParameters:[wl,Gd],urlParameters:[yl],headerParameters:[_l,xl,Ml,ql,Ul,Ll,od,sd,ad,ld,dd,cd,ud,_d,Nd,qd,jd,$d,Wd,Kd,Vd,Jd],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:uu},fu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Ra},default:{bodyMapper:ro,headersMapper:Pa}},queryParameters:[wl,Gd],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,ql,Ul,Ll,od,sd,ad,ld,dd,cd,ud,_d,Kd,Vd,Jd,{parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}}],isXML:!0,serializer:uu},mu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Oa},default:{bodyMapper:ro,headersMapper:za}},queryParameters:[wl,Gd],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d,kd,Ed,Td,Bd,Md,Dd,Wd,Kd,Vd,Jd,Yd,{parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:!0,xmlName:"x-ms-source-range",type:{name:"String"}}},Qd,{parameterPath:"range",mapper:{serializedName:"x-ms-range",required:!0,xmlName:"x-ms-range",type:{name:"String"}}}],isXML:!0,serializer:uu},gu={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Co,headersMapper:Na},default:{bodyMapper:ro,headersMapper:qa}},queryParameters:[wl,Tl,Bl,id,Zd],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,od,dd,cd,ud],isXML:!0,serializer:uu},yu={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Co,headersMapper:Ua},default:{bodyMapper:ro,headersMapper:La}},queryParameters:[wl,Tl,Bl,id,Zd,{parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,od,dd,cd,ud,{parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}}],isXML:!0,serializer:uu},vu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ja},default:{bodyMapper:ro,headersMapper:Ha}},queryParameters:[bl,wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d,Ud],isXML:!0,serializer:uu},bu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:$a},default:{bodyMapper:ro,headersMapper:Ga}},queryParameters:[bl,wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,dd,cd,ud,Ld,{parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:!0,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}}],isXML:!0,serializer:uu},wu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Wa},default:{bodyMapper:ro,headersMapper:Ka}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ul,Ll,dd,cd,ud,Id],isXML:!0,serializer:uu};class _u{constructor(e){this.client=e}create(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},Su)}appendBlock(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},ku)}appendBlockFromUrl(e,t,r){return this.client.sendOperationRequest({sourceUrl:e,contentLength:t,options:r},Eu)}seal(e){return this.client.sendOperationRequest({options:e},Tu)}}const xu=Er(e,!0),Su={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Va},default:{bodyMapper:ro,headersMapper:Ja}},queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,pd,hd,fd,md,gd,yd,bd,wd,_d,Ad,Fd,{parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}}],isXML:!0,serializer:xu},ku={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Ya},default:{bodyMapper:ro,headersMapper:Qa}},requestBody:Hd,queryParameters:[wl,Xd],urlParameters:[yl],headerParameters:[_l,xl,Ml,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d,Nd,qd,jd,$d,ec,tc],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:xu},Eu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Za},default:{bodyMapper:ro,headersMapper:Xa}},queryParameters:[wl,Xd],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,_d,kd,Ed,Td,Bd,Md,Dd,Nd,Yd,Qd,ec,tc,rc],isXML:!0,serializer:xu},Tu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:el},default:{bodyMapper:ro,headersMapper:tl}},queryParameters:[wl,{parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,Ul,Ll,dd,cd,tc],isXML:!0,serializer:xu};class Bu{constructor(e){this.client=e}upload(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},Iu)}putBlobFromUrl(e,t,r){return this.client.sendOperationRequest({contentLength:e,copySource:t,options:r},Au)}stageBlock(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,body:r,options:i},Fu)}stageBlockFromURL(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,sourceUrl:r,options:i},Mu)}commitBlockList(e,t){return this.client.sendOperationRequest({blocks:e,options:t},Du)}getBlockList(e,t){return this.client.sendOperationRequest({listType:e,options:t},Ru)}}const Cu=Er(e,!0),Iu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:rl},default:{bodyMapper:ro,headersMapper:il}},requestBody:Hd,queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Ml,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,pd,hd,fd,md,gd,yd,bd,wd,_d,xd,Ad,Fd,Nd,qd,jd,$d,ic],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:Cu},Au={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:nl},default:{bodyMapper:ro,headersMapper:ol}},queryParameters:[wl],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,pd,hd,fd,md,gd,yd,_d,xd,kd,Ed,Td,Bd,Cd,Id,Ad,Md,Dd,Rd,Nd,ic,{parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}}],isXML:!0,serializer:Cu},Fu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:sl},default:{bodyMapper:ro,headersMapper:al}},requestBody:Hd,queryParameters:[wl,nc,oc],urlParameters:[yl],headerParameters:[_l,xl,Ml,ql,sd,ad,ld,_d,Nd,qd,jd,$d],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:Cu},Mu={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:ll},default:{bodyMapper:ro,headersMapper:dl}},queryParameters:[wl,nc,oc],urlParameters:[yl],headerParameters:[_l,xl,Sl,Ml,ql,sd,ad,ld,_d,kd,Ed,Td,Bd,Md,Dd,Yd,Qd,rc],isXML:!0,serializer:Cu},Du={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:cl},default:{bodyMapper:ro,headersMapper:ul}},requestBody:sc,queryParameters:[wl,ac],urlParameters:[yl],headerParameters:[fl,gl,_l,xl,zl,ql,Ul,Ll,sd,ad,ld,dd,cd,ud,pd,hd,fd,md,gd,yd,bd,wd,_d,xd,Ad,Fd,Nd,qd],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Cu},Ru={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:To,headersMapper:pl},default:{bodyMapper:ro,headersMapper:hl}},queryParameters:[wl,id,ac,{parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:!0,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}}],urlParameters:[yl],headerParameters:[_l,xl,Sl,ql,ud],isXML:!0,serializer:Cu};class Pu extends hi{constructor(e,t){var r,i;if(void 0===e)throw new Error("'url' cannot be null");t||(t={});const n="azsdk-js-azure-storage-blob/12.25.0",o=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${n}`:`${n}`;super(Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8"}),t),{userAgentOptions:{userAgentPrefix:o},endpoint:null!==(i=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==i?i:"{url}"})),this.url=e,this.version=t.version||"2024-11-04",this.service=new lc(this),this.container=new vc(this),this.blob=new Nc(this),this.pageBlob=new cu(this),this.appendBlob=new _u(this),this.blockBlob=new Bu(this)}}class Ou extends Pu{async sendOperationRequest(e,t){const r=Object.assign({},t);return"/{containerName}"!==r.path&&"/{containerName}/{blob}"!==r.path||(r.path=""),super.sendOperationRequest(e,r)}}class zu{constructor(e,t){this.url=Xi(e),this.accountName=fn(e),this.pipeline=t,this.storageClientContext=new Ou(this.url,Ln(t)),this.isHttps=hn(function(e){try{const t=new URL(e);return t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol}catch(e){return}}(this.url)||"","https"),this.credential=jn(t);this.storageClientContext.requestContentType=void 0}}const Nu=Kt({packageName:"@azure/storage-blob",packageVersion:Ii,namespace:"Microsoft.Storage"});class qu{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){const t=new qu;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${r}`)}return t}static from(e){const t=new qu;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class Uu{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){const t=new Uu;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${r}`)}return t}static from(e){const t=new Uu;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}}class Lu{}function ju(e){return e.end?`${e.start}-${e.end}`:e.start}var Hu;!function(e){e.Https="https",e.HttpsAndHttp="https,http"}(Hu||(Hu={}));class $u{get ipRange(){if(this.ipRangeInner)return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}constructor(e,t,r,i,n,o,s,a,l,d,c,u,p,h,f,m,g,y,v,b){this.version=e,this.signature=t,void 0!==r&&"string"!=typeof r?(this.permissions=r.permissions,this.services=r.services,this.resourceTypes=r.resourceTypes,this.protocol=r.protocol,this.startsOn=r.startsOn,this.expiresOn=r.expiresOn,this.ipRangeInner=r.ipRange,this.identifier=r.identifier,this.encryptionScope=r.encryptionScope,this.resource=r.resource,this.cacheControl=r.cacheControl,this.contentDisposition=r.contentDisposition,this.contentEncoding=r.contentEncoding,this.contentLanguage=r.contentLanguage,this.contentType=r.contentType,r.userDelegationKey&&(this.signedOid=r.userDelegationKey.signedObjectId,this.signedTenantId=r.userDelegationKey.signedTenantId,this.signedStartsOn=r.userDelegationKey.signedStartsOn,this.signedExpiresOn=r.userDelegationKey.signedExpiresOn,this.signedService=r.userDelegationKey.signedService,this.signedVersion=r.userDelegationKey.signedVersion,this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId,this.correlationId=r.correlationId)):(this.services=i,this.resourceTypes=n,this.expiresOn=a,this.permissions=r,this.protocol=o,this.startsOn=s,this.ipRangeInner=l,this.encryptionScope=b,this.identifier=d,this.resource=c,this.cacheControl=u,this.contentDisposition=p,this.contentEncoding=h,this.contentLanguage=f,this.contentType=m,g&&(this.signedOid=g.signedObjectId,this.signedTenantId=g.signedTenantId,this.signedStartsOn=g.signedStartsOn,this.signedExpiresOn=g.signedExpiresOn,this.signedService=g.signedService,this.signedVersion=g.signedVersion,this.preauthorizedAgentObjectId=y,this.correlationId=v))}toString(){const e=["sv","ss","srt","spr","st","se","sip","si","ses","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"],t=[];for(const r of e)switch(r){case"sv":this.tryAppendQueryParameter(t,r,this.version);break;case"ss":this.tryAppendQueryParameter(t,r,this.services);break;case"srt":this.tryAppendQueryParameter(t,r,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,r,this.protocol);break;case"st":this.tryAppendQueryParameter(t,r,this.startsOn?cn(this.startsOn,!1):void 0);break;case"se":this.tryAppendQueryParameter(t,r,this.expiresOn?cn(this.expiresOn,!1):void 0);break;case"sip":this.tryAppendQueryParameter(t,r,this.ipRange?ju(this.ipRange):void 0);break;case"si":this.tryAppendQueryParameter(t,r,this.identifier);break;case"ses":this.tryAppendQueryParameter(t,r,this.encryptionScope);break;case"skoid":this.tryAppendQueryParameter(t,r,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,r,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,r,this.signedStartsOn?cn(this.signedStartsOn,!1):void 0);break;case"ske":this.tryAppendQueryParameter(t,r,this.signedExpiresOn?cn(this.signedExpiresOn,!1):void 0);break;case"sks":this.tryAppendQueryParameter(t,r,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,r,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,r,this.resource);break;case"sp":this.tryAppendQueryParameter(t,r,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,r,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,r,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,r,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,r,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,r,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,r,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,r,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,r,this.correlationId)}return t.join("&")}tryAppendQueryParameter(e,t,r){r&&(t=encodeURIComponent(t),r=encodeURIComponent(r),t.length>0&&r.length>0&&e.push(`${t}=${r}`))}}function Gu(e,t,r){return Wu(e,t,r).sasQueryParameters}function Wu(e,t,r){const i=e.version?e.version:Ai,n=t instanceof mr?t:void 0;let o;if(void 0===n&&void 0!==r&&(o=new Lu(r,t)),void 0===n&&void 0===o)throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");if(i>="2020-12-06")return void 0!==n?function(e,t){if(e=Vu(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId));e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),s=t.computeHMACSHA256(o);return{sasQueryParameters:new $u(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope),stringToSign:o}}(e,n):function(e,t){if(e=Vu(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId));e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?cn(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?cn(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return{sasQueryParameters:new $u(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope),stringToSign:o}}(e,o);if(i>="2018-11-09")return void 0!==n?function(e,t){if(e=Vu(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId));e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),s=t.computeHMACSHA256(o);return{sasQueryParameters:new $u(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:o}}(e,n):i>="2020-02-10"?function(e,t){if(e=Vu(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId));e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?cn(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?cn(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return{sasQueryParameters:new $u(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId),stringToSign:o}}(e,o):function(e,t){if(e=Vu(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId));e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?cn(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?cn(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return{sasQueryParameters:new $u(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey),stringToSign:o}}(e,o);if(i>="2015-04-05"){if(void 0!==n)return function(e,t){if(e=Vu(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,i="c";e.blobName&&(i="b");e.permissions&&(r=e.blobName?qu.parse(e.permissions.toString()).toString():Uu.parse(e.permissions.toString()).toString());const n=[r||"",e.startsOn?cn(e.startsOn,!1):"",e.expiresOn?cn(e.expiresOn,!1):"",Ku(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ju(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),o=t.computeHMACSHA256(n);return{sasQueryParameters:new $u(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:n}}(e,n);throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}throw new RangeError("'version' must be >= '2015-04-05'.")}function Ku(e,t,r){const i=[`/blob/${e}/${t}`];return r&&i.push(`/${r}`),i.join("")}function Vu(e){const t=e.version?e.version:Ai;if(e.snapshotTime&&t<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(void 0===e.blobName&&e.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(e.versionId&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(void 0===e.blobName&&e.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(e.permissions&&e.permissions.tag&&t<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(t<"2021-04-10"&&e.permissions&&e.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(e.encryptionScope&&t<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return e.version=t,e}class Ju{get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,t){const r=e.storageClientContext;this._url=e.url,void 0===e.name?(this._isContainer=!0,this._containerOrBlobOperation=r.container):(this._isContainer=!1,this._containerOrBlobOperation=r.blob),t||(t=et()),this._leaseId=t}async acquireLease(e,t={}){var r,i,n,o,s;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==Gi||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Gi||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Nu.withSpan("BlobLeaseClient-acquireLease",t,(async r=>{var i;return Tn(await this._containerOrBlobOperation.acquireLease({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),proposedLeaseId:this._leaseId,tracingOptions:r.tracingOptions}))}))}async changeLease(e,t={}){var r,i,n,o,s;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==Gi||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Gi||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Nu.withSpan("BlobLeaseClient-changeLease",t,(async r=>{var i;const n=Tn(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return this._leaseId=e,n}))}async releaseLease(e={}){var t,r,i,n,o;if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==Gi||(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)!==Gi||(null===(o=e.conditions)||void 0===o?void 0:o.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Nu.withSpan("BlobLeaseClient-releaseLease",e,(async t=>{var r;return Tn(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async renewLease(e={}){var t,r,i,n,o;if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==Gi||(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)!==Gi||(null===(o=e.conditions)||void 0===o?void 0:o.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Nu.withSpan("BlobLeaseClient-renewLease",e,(async t=>{var r;return this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions})}))}async breakLease(e,t={}){var r,i,n,o,s;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==Gi||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Gi||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Nu.withSpan("BlobLeaseClient-breakLease",t,(async r=>{var i;const n={abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions};return Tn(await this._containerOrBlobOperation.breakLease(n))}))}}class Yu{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){throw Error("Quick query in browser is not supported yet.")}get readableStreamBody(){}get _response(){return this.originalResponse._response}constructor(e,t={}){this.originalResponse=e}}var Qu,Zu,Xu;function ep(e){if(void 0!==e)return e}function tp(e,t){if(e&&!t)throw new RangeError("Customer-provided encryption key must be used over HTTPS.");e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm="AES256")}function rp(e){const t=(e._response.parsedBody.pageRange||[]).map((e=>({offset:e.start,count:e.end-e.start}))),r=(e._response.parsedBody.clearRange||[]).map((e=>({offset:e.start,count:e.end-e.start})));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}!function(e){e.Hot="Hot",e.Cool="Cool",e.Cold="Cold",e.Archive="Archive"}(Qu||(Qu={})),function(e){e.P4="P4",e.P6="P6",e.P10="P10",e.P15="P15",e.P20="P20",e.P30="P30",e.P40="P40",e.P50="P50",e.P60="P60",e.P70="P70",e.P80="P80"}(Zu||(Zu={})),function(e){e.StorageOAuthScopes="https://storage.azure.com/.default",e.DiskComputeOAuthScopes="https://disk.compute.azure.com/.default"}(Xu||(Xu={}));ze("core-lro");class ip extends Error{constructor(e){super(e),this.name="PollerStoppedError",Object.setPrototypeOf(this,ip.prototype)}}class np extends Error{constructor(e){super(e),this.name="PollerCancelledError",Object.setPrototypeOf(this,np.prototype)}}class op{constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.promise.catch((()=>{}))}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks)t(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){const e=new np("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new ip("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(this.cancelPromise){if(e.abortSignal)throw new Error("A cancel request is currently pending")}else this.cancelPromise=this.cancelOnce(e);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}}class sp extends op{constructor(e){const{blobClient:t,copySource:r,intervalInMs:i=15e3,onProgress:n,resumeFrom:o,startCopyFromURLOptions:s}=e;let a;o&&(a=JSON.parse(o).state);super(cp(Object.assign(Object.assign({},a),{blobClient:t,copySource:r,startCopyFromURLOptions:s}))),"function"==typeof n&&this.onProgress(n),this.intervalInMs=i}delay(){return $e(this.intervalInMs)}}const ap=async function(e={}){const t=this.state,{copyId:r}=t;return t.isCompleted?cp(t):r?(await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal}),t.isCancelled=!0,cp(t)):(t.isCancelled=!0,cp(t))},lp=async function(e={}){const t=this.state,{blobClient:r,copySource:i,startCopyFromURLOptions:n}=t;if(t.isStarted){if(!t.isCompleted)try{const r=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:i,copyProgress:n}=r,o=t.copyProgress;n&&(t.copyProgress=n),"pending"===i&&n!==o&&"function"==typeof e.fireProgress?e.fireProgress(t):"success"===i?(t.result=r,t.isCompleted=!0):"failed"===i&&(t.error=new Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`),t.isCompleted=!0)}catch(e){t.error=e,t.isCompleted=!0}}else{t.isStarted=!0;const e=await r.startCopyFromURL(i,n);t.copyId=e.copyId,"success"===e.copyStatus&&(t.result=e,t.isCompleted=!0)}return cp(t)},dp=function(){return JSON.stringify({state:this.state},((e,t)=>{if("blobClient"!==e)return t}))};function cp(e){return{state:Object.assign({},e),cancel:ap,toString:dp,update:lp}}function up(e){if(e.offset<0)throw new RangeError("Range.offset cannot be smaller than 0.");if(e.count&&e.count<=0)throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.");return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var pp,hp=__webpack_require__(37007);!function(e){e[e.Good=0]="Good",e[e.Error=1]="Error"}(pp||(pp={}));class fp{constructor(e=5){if(this.actives=0,this.completed=0,this.offset=0,this.operations=[],this.state=pp.Good,e<1)throw new RangeError("concurrency must be larger than 0");this.concurrency=e,this.emitter=new hp.EventEmitter}addOperation(e){this.operations.push((async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(e){this.emitter.emit("error",e)}}))}async do(){return 0===this.operations.length?Promise.resolve():(this.parallelExecute(),new Promise(((e,t)=>{this.emitter.on("finish",e),this.emitter.on("error",(e=>{this.state=pp.Error,t(e)}))})))}nextOperation(){return this.offset<this.operations.length?this.operations[this.offset++]:null}parallelExecute(){if(this.state!==pp.Error)if(this.completed>=this.operations.length)this.emitter.emit("finish");else for(;this.actives<this.concurrency;){const e=this.nextOperation();if(!e)return;e()}}}class mp{}var gp=__webpack_require__(48287).Buffer;class yp extends zu{get name(){return this._name}get containerName(){return this._containerName}constructor(e,t,r,i){let n,o;if(i=i||{},Nn(t))o=e,n=t;else if(ot&&t instanceof mr||t instanceof fr||dr(t))o=e,n=Un(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=tn(e);if("AccountConnString"===l.kind){if(!ot)throw new Error("Account connection string is only supported in Node.js environment");{const e=new mr(l.accountName,l.accountKey);o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a)),i.proxyOptions||(i.proxyOptions=Lt(l.proxyUri)),n=Un(e,i)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,n=Un(new fr,i)}}}else o=e,r&&"string"!=typeof r&&(i=r),n=Un(new fr,i);super(o,n),({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl()),this.blobContext=this.storageClientContext.blob,this._snapshot=on(this.url,Oi.SNAPSHOT),this._versionId=on(this.url,Oi.VERSIONID)}withSnapshot(e){return new yp(nn(this.url,Oi.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}withVersion(e){return new yp(nn(this.url,Oi.VERSIONID,0===e.length?void 0:e),this.pipeline)}getAppendBlobClient(){return new vp(this.url,this.pipeline)}getBlockBlobClient(){return new bp(this.url,this.pipeline)}getPageBlobClient(){return new wp(this.url,this.pipeline)}async download(e=0,t,r={}){return r.conditions=r.conditions||{},r.conditions=r.conditions||{},tp(r.customerProvidedKey,this.isHttps),Nu.withSpan("BlobClient-download",r,(async i=>{var n;const o=Tn(await this.blobContext.download({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:ot?void 0:r.onProgress},range:0!==e||t?up({offset:e,count:t}):void 0,rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey,tracingOptions:i.tracingOptions})),s=Object.assign(Object.assign({},o),{_response:o._response,objectReplicationDestinationPolicyId:o.objectReplicationPolicyId,objectReplicationSourceProperties:wn(o.objectReplicationRules)});if(!ot)return s;if((void 0===r.maxRetryRequests||r.maxRetryRequests<0)&&(r.maxRetryRequests=5),void 0===o.contentLength)throw new RangeError("File download response doesn't contain valid content length header");if(!o.etag)throw new RangeError("File download response doesn't contain valid etag header");return new 1(s,(async t=>{var i;const n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||o.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:null===(i=r.conditions)||void 0===i?void 0:i.tagConditions},range:up({count:e+o.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},n))).readableStreamBody}),e,o.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}))}async exists(e={}){return Nu.withSpan("BlobClient-exists",e,(async t=>{try{return tp(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions}),!0}catch(e){if(404===e.statusCode)return!1;if(409===e.statusCode&&("BlobUsesCustomerSpecifiedEncryption"===e.details.errorCode||"BlobDoesNotUseCustomerSpecifiedEncryption"===e.details.errorCode))return!0;throw e}}))}async getProperties(e={}){return e.conditions=e.conditions||{},tp(e.customerProvidedKey,this.isHttps),Nu.withSpan("BlobClient-getProperties",e,(async t=>{var r;const i=Tn(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:wn(i.objectReplicationRules)})}))}async delete(e={}){return e.conditions=e.conditions||{},Nu.withSpan("BlobClient-delete",e,(async t=>{var r;return Tn(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async deleteIfExists(e={}){return Nu.withSpan("BlobClient-deleteIfExists",e,(async e=>{var t,r;try{const t=Tn(await this.delete(e));return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if("BlobNotFound"===(null===(t=e.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=e.response)||void 0===r?void 0:r.parsedHeaders),{_response:e.response});throw e}}))}async undelete(e={}){return Nu.withSpan("BlobClient-undelete",e,(async t=>Tn(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async setHTTPHeaders(e,t={}){return t.conditions=t.conditions||{},tp(t.customerProvidedKey,this.isHttps),Nu.withSpan("BlobClient-setHTTPHeaders",t,(async r=>{var i;return Tn(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))}))}async setMetadata(e,t={}){return t.conditions=t.conditions||{},tp(t.customerProvidedKey,this.isHttps),Nu.withSpan("BlobClient-setMetadata",t,(async r=>{var i;return Tn(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))}))}async setTags(e,t={}){return Nu.withSpan("BlobClient-setTags",t,(async r=>{var i;return Tn(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions,tags:yn(e)}))}))}async getTags(e={}){return Nu.withSpan("BlobClient-getTags",e,(async t=>{var r;const i=Tn(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,tags:vn({blobTagSet:i.blobTagSet})||{}})}))}getBlobLeaseClient(e){return new Ju(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},tp(e.customerProvidedKey,this.isHttps),Nu.withSpan("BlobClient-createSnapshot",e,(async t=>{var r;return Tn(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions}))}))}async beginCopyFromURL(e,t={}){const r=new sp({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await r.poll(),r}async abortCopyFromURL(e,t={}){return Nu.withSpan("BlobClient-abortCopyFromURL",t,(async r=>Tn(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:r.tracingOptions}))))}async syncCopyFromURL(e,t={}){return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},Nu.withSpan("BlobClient-syncCopyFromURL",t,(async r=>{var i,n,o,s,a,l,d;return Tn(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(n=t.sourceConditions)||void 0===n?void 0:n.ifMatch,sourceIfModifiedSince:null===(o=t.sourceConditions)||void 0===o?void 0:o.ifModifiedSince,sourceIfNoneMatch:null===(s=t.sourceConditions)||void 0===s?void 0:s.ifNoneMatch,sourceIfUnmodifiedSince:null===(a=t.sourceConditions)||void 0===a?void 0:a.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:_n(t.sourceAuthorization),tier:ep(t.tier),blobTagsString:gn(t.tags),immutabilityPolicyExpiry:null===(l=t.immutabilityPolicy)||void 0===l?void 0:l.expiriesOn,immutabilityPolicyMode:null===(d=t.immutabilityPolicy)||void 0===d?void 0:d.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions}))}))}async setAccessTier(e,t={}){return Nu.withSpan("BlobClient-setAccessTier",t,(async r=>{var i;return Tn(await this.blobContext.setTier(ep(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),rehydratePriority:t.rehydratePriority,tracingOptions:r.tracingOptions}))}))}async downloadToBuffer(e,t,r,i={}){var n;let o,s=0,a=0,l=i;e instanceof gp?(o=e,s=t||0,a="number"==typeof r?r:0):(s="number"==typeof e?e:0,a="number"==typeof t?t:0,l=r||{});let d=null!==(n=l.blockSize)&&void 0!==n?n:0;if(d<0)throw new RangeError("blockSize option must be >= 0");if(0===d&&(d=Ri),s<0)throw new RangeError("offset option must be >= 0");if(a&&a<=0)throw new RangeError("count option must be greater than 0");return l.conditions||(l.conditions={}),Nu.withSpan("BlobClient-downloadToBuffer",l,(async e=>{if(!a){const t=await this.getProperties(Object.assign(Object.assign({},l),{tracingOptions:e.tracingOptions}));if(a=t.contentLength-s,a<0)throw new RangeError(`offset ${s} shouldn't be larger than blob size ${t.contentLength}`)}if(!o)try{o=gp.alloc(a)}catch(e){throw new Error(`Unable to allocate the buffer of size: ${a}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}if(o.length<a)throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${a}`);let t=0;const r=new fp(l.concurrency);for(let i=s;i<s+a;i+=d)r.addOperation((async()=>{let r=s+a;i+d<r&&(r=i+d);(await this.download(i,r-i,{abortSignal:l.abortSignal,conditions:l.conditions,maxRetryRequests:l.maxRetryRequestsPerBlock,customerProvidedKey:l.customerProvidedKey,tracingOptions:e.tracingOptions})).readableStreamBody;await void 0,t+=r-i,l.onProgress&&l.onProgress({loadedBytes:t})}));return await r.do(),o}))}async downloadToFile(e,t=0,r,i={}){return Nu.withSpan("BlobClient-downloadToFile",i,(async e=>{const n=await this.download(t,r,Object.assign(Object.assign({},i),{tracingOptions:e.tracingOptions}));return n.readableStreamBody&&await void n.readableStreamBody,n.blobDownloadStream=void 0,n}))}getBlobAndContainerNamesFromUrl(){let e,t;try{const r=new URL(this.url);if("blob"===r.host.split(".")[1]){const i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}else if(mn(r)){const i=r.pathname.match("/([^/]*)/([^/]*)(/(.*))?");e=i[2],t=i[4]}else{const i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}if(e=decodeURIComponent(e),t=decodeURIComponent(t),t=t.replace(/\\/g,"/"),!e)throw new Error("Provided containerName is invalid.");return{blobName:t,containerName:e}}catch(e){throw new Error("Unable to extract blobName and containerName with provided information.")}}async startCopyFromURL(e,t={}){return Nu.withSpan("BlobClient-startCopyFromURL",t,(async r=>{var i,n,o;return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},Tn(await this.blobContext.startCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(o=t.immutabilityPolicy)||void 0===o?void 0:o.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:ep(t.tier),blobTagsString:gn(t.tags),sealBlob:t.sealBlob,tracingOptions:r.tracingOptions}))}))}generateSasUrl(e){return new Promise((t=>{if(!(this.credential instanceof mr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");const r=Gu(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).toString();t(dn(this.url,r))}))}generateSasStringToSign(e){if(!(this.credential instanceof mr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");return Wu(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).stringToSign}async deleteImmutabilityPolicy(e={}){return Nu.withSpan("BlobClient-deleteImmutabilityPolicy",e,(async e=>Tn(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:e.tracingOptions}))))}async setImmutabilityPolicy(e,t={}){return Nu.withSpan("BlobClient-setImmutabilityPolicy",t,(async t=>Tn(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:t.tracingOptions}))))}async setLegalHold(e,t={}){return Nu.withSpan("BlobClient-setLegalHold",t,(async t=>Tn(await this.blobContext.setLegalHold(e,{tracingOptions:t.tracingOptions}))))}async getAccountInfo(e={}){return Nu.withSpan("BlobClient-getAccountInfo",e,(async t=>Tn(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}}class vp extends yp{constructor(e,t,r,i){let n,o;if(i=i||{},Nn(t))o=e,n=t;else if(ot&&t instanceof mr||t instanceof fr||dr(t))o=e,n=Un(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=tn(e);if("AccountConnString"===l.kind){if(!ot)throw new Error("Account connection string is only supported in Node.js environment");{const e=new mr(l.accountName,l.accountKey);o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a)),i.proxyOptions||(i.proxyOptions=Lt(l.proxyUri)),n=Un(e,i)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,n=Un(new fr,i)}}}else o=e,n=Un(new fr,i);super(o,n),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(e){return new vp(nn(this.url,Oi.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},tp(e.customerProvidedKey,this.isHttps),Nu.withSpan("AppendBlobClient-create",e,(async t=>{var r,i,n;return Tn(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:null===(i=e.immutabilityPolicy)||void 0===i?void 0:i.expiriesOn,immutabilityPolicyMode:null===(n=e.immutabilityPolicy)||void 0===n?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:gn(e.tags),tracingOptions:t.tracingOptions}))}))}async createIfNotExists(e={}){const t={ifNoneMatch:"*"};return Nu.withSpan("AppendBlobClient-createIfNotExists",e,(async e=>{var r,i;try{const r=Tn(await this.create(Object.assign(Object.assign({},e),{conditions:t})));return Object.assign(Object.assign({succeeded:!0},r),{_response:r._response})}catch(e){if("BlobAlreadyExists"===(null===(r=e.details)||void 0===r?void 0:r.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(i=e.response)||void 0===i?void 0:i.parsedHeaders),{_response:e.response});throw e}}))}async seal(e={}){return e.conditions=e.conditions||{},Nu.withSpan("AppendBlobClient-seal",e,(async t=>{var r;return Tn(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async appendBlock(e,t,r={}){return r.conditions=r.conditions||{},tp(r.customerProvidedKey,this.isHttps),Nu.withSpan("AppendBlobClient-appendBlock",r,(async i=>{var n;return Tn(await this.appendBlobContext.appendBlock(t,e,{abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))}))}async appendBlockFromURL(e,t,r,i={}){return i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{},tp(i.customerProvidedKey,this.isHttps),Nu.withSpan("AppendBlobClient-appendBlockFromURL",i,(async n=>{var o,s,a,l,d;return Tn(await this.appendBlobContext.appendBlockFromUrl(e,0,{abortSignal:i.abortSignal,sourceRange:up({offset:t,count:r}),sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,appendPositionAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(s=i.sourceConditions)||void 0===s?void 0:s.ifMatch,sourceIfModifiedSince:null===(a=i.sourceConditions)||void 0===a?void 0:a.ifModifiedSince,sourceIfNoneMatch:null===(l=i.sourceConditions)||void 0===l?void 0:l.ifNoneMatch,sourceIfUnmodifiedSince:null===(d=i.sourceConditions)||void 0===d?void 0:d.ifUnmodifiedSince},copySourceAuthorization:_n(i.sourceAuthorization),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))}))}}class bp extends yp{constructor(e,t,r,i){let n,o;if(i=i||{},Nn(t))o=e,n=t;else if(ot&&t instanceof mr||t instanceof fr||dr(t))o=e,n=Un(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=tn(e);if("AccountConnString"===l.kind){if(!ot)throw new Error("Account connection string is only supported in Node.js environment");{const e=new mr(l.accountName,l.accountKey);o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a)),i.proxyOptions||(i.proxyOptions=Lt(l.proxyUri)),n=Un(e,i)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,n=Un(new fr,i)}}}else o=e,r&&"string"!=typeof r&&(i=r),n=Un(new fr,i);super(o,n),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(e){return new bp(nn(this.url,Oi.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async query(e,t={}){if(tp(t.customerProvidedKey,this.isHttps),!ot)throw new Error("This operation currently is only supported in Node.js.");return Nu.withSpan("BlockBlobClient-query",t,(async r=>{var i;const n=Tn(await this._blobContext.query({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:bn(t.inputTextConfiguration),outputSerialization:bn(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,tracingOptions:r.tracingOptions}));return new Yu(n,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})}))}async upload(e,t,r={}){return r.conditions=r.conditions||{},tp(r.customerProvidedKey,this.isHttps),Nu.withSpan("BlockBlobClient-upload",r,(async i=>{var n,o,s;return Tn(await this.blockBlobContext.upload(t,e,{abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:null===(o=r.immutabilityPolicy)||void 0===o?void 0:o.expiriesOn,immutabilityPolicyMode:null===(s=r.immutabilityPolicy)||void 0===s?void 0:s.policyMode,legalHold:r.legalHold,tier:ep(r.tier),blobTagsString:gn(r.tags),tracingOptions:i.tracingOptions}))}))}async syncUploadFromURL(e,t={}){return t.conditions=t.conditions||{},tp(t.customerProvidedKey,this.isHttps),Nu.withSpan("BlockBlobClient-syncUploadFromURL",t,(async r=>{var i,n,o,s,a,l;return Tn(await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(n=t.sourceConditions)||void 0===n?void 0:n.ifMatch,sourceIfModifiedSince:null===(o=t.sourceConditions)||void 0===o?void 0:o.ifModifiedSince,sourceIfNoneMatch:null===(s=t.sourceConditions)||void 0===s?void 0:s.ifNoneMatch,sourceIfUnmodifiedSince:null===(a=t.sourceConditions)||void 0===a?void 0:a.ifUnmodifiedSince,sourceIfTags:null===(l=t.sourceConditions)||void 0===l?void 0:l.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:_n(t.sourceAuthorization),tier:ep(t.tier),blobTagsString:gn(t.tags),copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions})))}))}async stageBlock(e,t,r,i={}){return tp(i.customerProvidedKey,this.isHttps),Nu.withSpan("BlockBlobClient-stageBlock",i,(async n=>Tn(await this.blockBlobContext.stageBlock(e,r,t,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,requestOptions:{onUploadProgress:i.onProgress},transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))))}async stageBlockFromURL(e,t,r=0,i,n={}){return tp(n.customerProvidedKey,this.isHttps),Nu.withSpan("BlockBlobClient-stageBlockFromURL",n,(async o=>Tn(await this.blockBlobContext.stageBlockFromURL(e,0,t,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,sourceRange:0!==r||i?up({offset:r,count:i}):void 0,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:_n(n.sourceAuthorization),tracingOptions:o.tracingOptions}))))}async commitBlockList(e,t={}){return t.conditions=t.conditions||{},tp(t.customerProvidedKey,this.isHttps),Nu.withSpan("BlockBlobClient-commitBlockList",t,(async r=>{var i,n,o;return Tn(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(o=t.immutabilityPolicy)||void 0===o?void 0:o.policyMode,legalHold:t.legalHold,tier:ep(t.tier),blobTagsString:gn(t.tags),tracingOptions:r.tracingOptions}))}))}async getBlockList(e,t={}){return Nu.withSpan("BlockBlobClient-getBlockList",t,(async r=>{var i;const n=Tn(await this.blockBlobContext.getBlockList(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return n.committedBlocks||(n.committedBlocks=[]),n.uncommittedBlocks||(n.uncommittedBlocks=[]),n}))}async uploadData(e,t={}){return Nu.withSpan("BlockBlobClient-uploadData",t,(async t=>{if(ot){let r;return r=e instanceof gp?e:e instanceof ArrayBuffer?gp.from(e):gp.from(e.buffer,e.byteOffset,e.byteLength),this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.byteLength,t)}{const r=new Blob([e]);return this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.size,t)}}))}async uploadBrowserData(e,t={}){return Nu.withSpan("BlockBlobClient-uploadBrowserData",t,(async t=>{const r=new Blob([e]);return this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.size,t)}))}async uploadSeekableInternal(e,t,r={}){var i,n;let o=null!==(i=r.blockSize)&&void 0!==i?i:0;if(o<0||o>Mi)throw new RangeError("blockSize option must be >= 0 and <= 4194304000");const s=null!==(n=r.maxSingleShotSize)&&void 0!==n?n:Fi;if(s<0||s>Fi)throw new RangeError("maxSingleShotSize option must be >= 0 and <= 268435456");if(0===o){if(t>2097152e8)throw new RangeError(`${t} is too larger to upload to a block blob.`);t>s&&(o=Math.ceil(t/Di),o<Ri&&(o=Ri))}return r.blobHTTPHeaders||(r.blobHTTPHeaders={}),r.conditions||(r.conditions={}),Nu.withSpan("BlockBlobClient-uploadSeekableInternal",r,(async i=>{if(t<=s)return Tn(await this.upload(e(0,t),t,i));const n=Math.floor((t-1)/o)+1;if(n>Di)throw new RangeError("The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= 50000");const a=[],l=et();let d=0;const c=new fp(r.concurrency);for(let s=0;s<n;s++)c.addOperation((async()=>{const c=un(l,s),u=o*s,p=(s===n-1?t:u+o)-u;a.push(c),await this.stageBlock(c,e(u,p),p,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),d+=p,r.onProgress&&r.onProgress({loadedBytes:d})}));return await c.do(),this.commitBlockList(a,i)}))}async uploadFile(e,t={}){return Nu.withSpan("BlockBlobClient-uploadFile",t,(async e=>{const r=(await void 0).size;return this.uploadSeekableInternal(((e,t)=>()=>{}),r,Object.assign(Object.assign({},t),{tracingOptions:e.tracingOptions}))}))}async uploadStream(e,t=8388608,r=5,i={}){return i.blobHTTPHeaders||(i.blobHTTPHeaders={}),i.conditions||(i.conditions={}),Nu.withSpan("BlockBlobClient-uploadStream",i,(async n=>{let o=0;const s=et();let a=0;const l=[],d=new mp(e,t,r,(async(e,t)=>{const r=un(s,o);l.push(r),o++,await this.stageBlock(r,e,t,{customerProvidedKey:i.customerProvidedKey,conditions:i.conditions,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}),a+=t,i.onProgress&&i.onProgress({loadedBytes:a})}),Math.ceil(r/4*3));return await d.do(),Tn(await this.commitBlockList(l,Object.assign(Object.assign({},i),{tracingOptions:n.tracingOptions})))}))}}class wp extends yp{constructor(e,t,r,i){let n,o;if(i=i||{},Nn(t))o=e,n=t;else if(ot&&t instanceof mr||t instanceof fr||dr(t))o=e,n=Un(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=tn(e);if("AccountConnString"===l.kind){if(!ot)throw new Error("Account connection string is only supported in Node.js environment");{const e=new mr(l.accountName,l.accountKey);o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a)),i.proxyOptions||(i.proxyOptions=Lt(l.proxyUri)),n=Un(e,i)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=rn(rn(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,n=Un(new fr,i)}}}else o=e,n=Un(new fr,i);super(o,n),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(e){return new wp(nn(this.url,Oi.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e,t={}){return t.conditions=t.conditions||{},tp(t.customerProvidedKey,this.isHttps),Nu.withSpan("PageBlobClient-create",t,(async r=>{var i,n,o;return Tn(await this.pageBlobContext.create(0,e,{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(o=t.immutabilityPolicy)||void 0===o?void 0:o.policyMode,legalHold:t.legalHold,tier:ep(t.tier),blobTagsString:gn(t.tags),tracingOptions:r.tracingOptions}))}))}async createIfNotExists(e,t={}){return Nu.withSpan("PageBlobClient-createIfNotExists",t,(async r=>{var i,n;try{const i={ifNoneMatch:"*"},n=Tn(await this.create(e,Object.assign(Object.assign({},t),{conditions:i,tracingOptions:r.tracingOptions})));return Object.assign(Object.assign({succeeded:!0},n),{_response:n._response})}catch(e){if("BlobAlreadyExists"===(null===(i=e.details)||void 0===i?void 0:i.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(n=e.response)||void 0===n?void 0:n.parsedHeaders),{_response:e.response});throw e}}))}async uploadPages(e,t,r,i={}){return i.conditions=i.conditions||{},tp(i.customerProvidedKey,this.isHttps),Nu.withSpan("PageBlobClient-uploadPages",i,(async n=>{var o;return Tn(await this.pageBlobContext.uploadPages(r,e,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),requestOptions:{onUploadProgress:i.onProgress},range:up({offset:t,count:r}),sequenceNumberAccessConditions:i.conditions,transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))}))}async uploadPagesFromURL(e,t,r,i,n={}){return n.conditions=n.conditions||{},n.sourceConditions=n.sourceConditions||{},tp(n.customerProvidedKey,this.isHttps),Nu.withSpan("PageBlobClient-uploadPagesFromURL",n,(async o=>{var s,a,l,d,c;return Tn(await this.pageBlobContext.uploadPagesFromURL(e,up({offset:t,count:i}),0,up({offset:r,count:i}),{abortSignal:n.abortSignal,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,sequenceNumberAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(s=n.conditions)||void 0===s?void 0:s.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(a=n.sourceConditions)||void 0===a?void 0:a.ifMatch,sourceIfModifiedSince:null===(l=n.sourceConditions)||void 0===l?void 0:l.ifModifiedSince,sourceIfNoneMatch:null===(d=n.sourceConditions)||void 0===d?void 0:d.ifNoneMatch,sourceIfUnmodifiedSince:null===(c=n.sourceConditions)||void 0===c?void 0:c.ifUnmodifiedSince},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:_n(n.sourceAuthorization),tracingOptions:o.tracingOptions}))}))}async clearPages(e=0,t,r={}){return r.conditions=r.conditions||{},Nu.withSpan("PageBlobClient-clearPages",r,(async i=>{var n;return Tn(await this.pageBlobContext.clearPages(0,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:up({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))}))}async getPageRanges(e=0,t,r={}){return r.conditions=r.conditions||{},Nu.withSpan("PageBlobClient-getPageRanges",r,(async i=>{var n;return rp(Tn(await this.pageBlobContext.getPageRanges({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:up({offset:e,count:t}),tracingOptions:i.tracingOptions})))}))}async listPageRangesSegment(e=0,t,r,i={}){return Nu.withSpan("PageBlobClient-getPageRangesSegment",i,(async n=>{var o;return Tn(await this.pageBlobContext.getPageRanges({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),range:up({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize,tracingOptions:n.tracingOptions}))}))}listPageRangeItemSegments(){return s(this,arguments,(function*(e=0,t,r,i={}){let n;if(r||void 0===r)do{n=yield o(this.listPageRangesSegment(e,t,r,i)),r=n.continuationToken,yield yield o(yield o(n))}while(r)}))}listPageRangeItems(){return s(this,arguments,(function*(e=0,t,r={}){var i,n,s,d;try{for(var c,u=!0,p=l(this.listPageRangeItemSegments(e,t,undefined,r));!(i=(c=yield o(p.next())).done);u=!0){d=c.value,u=!1;const e=d;yield o(yield*a(l(kn(e))))}}catch(e){n={error:e}}finally{try{u||i||!(s=p.return)||(yield o(s.call(p)))}finally{if(n)throw n.error}}}))}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};const i=this.listPageRangeItems(e,t,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeItemSegments(e,t,i.continuationToken,Object.assign({maxPageSize:i.maxPageSize},r))}}async getPageRangesDiff(e,t,r,i={}){return i.conditions=i.conditions||{},Nu.withSpan("PageBlobClient-getPageRangesDiff",i,(async n=>{var o;return rp(Tn(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),prevsnapshot:r,range:up({offset:e,count:t}),tracingOptions:n.tracingOptions})))}))}async listPageRangesDiffSegment(e,t,r,i,n={}){return Nu.withSpan("PageBlobClient-getPageRangesDiffSegment",n,(async o=>{var s;return Tn(await this.pageBlobContext.getPageRangesDiff({abortSignal:null==n?void 0:n.abortSignal,leaseAccessConditions:null==n?void 0:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},null==n?void 0:n.conditions),{ifTags:null===(s=null==n?void 0:n.conditions)||void 0===s?void 0:s.tagConditions}),prevsnapshot:r,range:up({offset:e,count:t}),marker:i,maxPageSize:null==n?void 0:n.maxPageSize,tracingOptions:o.tracingOptions}))}))}listPageRangeDiffItemSegments(e,t,r,i,n){return s(this,arguments,(function*(){let s;if(i||void 0===i)do{s=yield o(this.listPageRangesDiffSegment(e,t,r,i,n)),i=s.continuationToken,yield yield o(yield o(s))}while(i)}))}listPageRangeDiffItems(e,t,r,i){return s(this,arguments,(function*(){var n,s,d,c;try{for(var u,p=!0,h=l(this.listPageRangeDiffItemSegments(e,t,r,undefined,i));!(n=(u=yield o(h.next())).done);p=!0){c=u.value,p=!1;const e=c;yield o(yield*a(l(kn(e))))}}catch(e){s={error:e}}finally{try{p||n||!(d=h.return)||(yield o(d.call(h)))}finally{if(s)throw s.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const n=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next:()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(n={})=>this.listPageRangeDiffItemSegments(e,t,r,n.continuationToken,Object.assign({maxPageSize:n.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){return i.conditions=i.conditions||{},Nu.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks",i,(async n=>{var o;return rp(Tn(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),prevSnapshotUrl:r,range:up({offset:e,count:t}),tracingOptions:n.tracingOptions})))}))}async resize(e,t={}){return t.conditions=t.conditions||{},Nu.withSpan("PageBlobClient-resize",t,(async r=>{var i;return Tn(await this.pageBlobContext.resize(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))}))}async updateSequenceNumber(e,t,r={}){return r.conditions=r.conditions||{},Nu.withSpan("PageBlobClient-updateSequenceNumber",r,(async i=>{var n;return Tn(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),tracingOptions:i.tracingOptions}))}))}async startCopyIncremental(e,t={}){return Nu.withSpan("PageBlobClient-startCopyIncremental",t,(async r=>{var i;return Tn(await this.pageBlobContext.copyIncremental(e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))}))}}async function _p(e){return async function(e){const t=new FileReader;return new Promise(((r,i)=>{t.onloadend=e=>{r(e.target.result)},t.onerror=i,t.readAsText(e)}))}(await e.blobBody)}const xp=": ";class Sp{constructor(e,t){if(!e||!e.contentType)throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.");if(!t||0===t.size)throw new RangeError("Invalid state: subRequests is not provided or size is 0.");this.batchResponse=e,this.subRequests=t,this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1],this.perResponsePrefix=`--${this.responseBatchBoundary}${Wi}`,this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==zi)throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);const e=(await _p(this.batchResponse)).split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1),t=e.length;if(t!==this.subRequests.size&&1!==t)throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.");const r=new Array(t);let i=0,n=0;for(let o=0;o<t;o++){const t=e[o],s={};s.headers=ai(Nt());const a=t.split(`${Wi}`);let l=!1,d=!1,c=!1,u=-1;for(const e of a)if(l)if(""!==e.trim())if(d)s.bodyAsText||(s.bodyAsText=""),s.bodyAsText+=e;else{if(-1===e.indexOf(xp))throw new Error(`Invalid state: find non-empty line '${e}' without HTTP header delimiter '${xp}'.`);const t=e.split(xp);s.headers.set(t[0],t[1]),t[0]===Hi&&(s.errorCode=t[1],c=!0)}else d||(d=!0);else if(e.startsWith(Ni)&&(u=parseInt(e.split(xp)[1])),e.startsWith(Ki)){l=!0;const t=e.split(" ");s.status=parseInt(t[1]),s.statusMessage=t.slice(2).join(" ")}-1!==u&&Number.isInteger(u)&&u>=0&&u<this.subRequests.size&&void 0===r[u]?(s._request=this.subRequests.get(u),r[u]=s):Ci.error(`subResponses[${o}] is dropped as the Content-ID is not found or invalid, Content-ID: ${u}`),c?n++:i++}return{subResponses:r,subResponsesSucceededCount:i,subResponsesFailedCount:n}}}var kp;!function(e){e[e.LOCKED=0]="LOCKED",e[e.UNLOCKED=1]="UNLOCKED"}(kp||(kp={}));class Ep{static async lock(e){return new Promise((t=>{void 0===this.keys[e]||this.keys[e]===kp.UNLOCKED?(this.keys[e]=kp.LOCKED,t()):this.onUnlockEvent(e,(()=>{this.keys[e]=kp.LOCKED,t()}))}))}static async unlock(e){return new Promise((t=>{this.keys[e]===kp.LOCKED&&this.emitUnlockEvent(e),delete this.keys[e],t()}))}static onUnlockEvent(e,t){void 0===this.listeners[e]?this.listeners[e]=[t]:this.listeners[e].push(t)}static emitUnlockEvent(e){if(void 0!==this.listeners[e]&&this.listeners[e].length>0){const t=this.listeners[e].shift();setImmediate((()=>{t.call(this)}))}}}Ep.keys={},Ep.listeners={};class Tp{constructor(){this.batch="batch",this.batchRequest=new Bp}getMultiPartContentType(){return this.batchRequest.getMultipartContentType()}getHttpRequestBody(){return this.batchRequest.getHttpRequestBody()}getSubRequests(){return this.batchRequest.getSubRequests()}async addSubRequestInternal(e,t){await Ep.lock(this.batch);try{this.batchRequest.preAddSubRequest(e),await t(),this.batchRequest.postAddSubRequest(e)}finally{await Ep.unlock(this.batch)}}setBatchType(e){if(this.batchType||(this.batchType=e),this.batchType!==e)throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`)}async deleteBlob(e,t,r){let i,n;if("string"==typeof e&&(ot&&t instanceof mr||t instanceof fr||dr(t)))i=e,n=t;else{if(!(e instanceof yp))throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");i=e.url,n=e.credential,r=t}return r||(r={}),Nu.withSpan("BatchDeleteRequest-addSubRequest",r,(async e=>{this.setBatchType("delete"),await this.addSubRequestInternal({url:i,credential:n},(async()=>{await new yp(i,this.batchRequest.createPipeline(n)).delete(e)}))}))}async setBlobAccessTier(e,t,r,i){let n,o,s;if("string"==typeof e&&(ot&&t instanceof mr||t instanceof fr||dr(t)))n=e,o=t,s=r;else{if(!(e instanceof yp))throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");n=e.url,o=e.credential,s=t,i=r}return i||(i={}),Nu.withSpan("BatchSetTierRequest-addSubRequest",i,(async e=>{this.setBatchType("setAccessTier"),await this.addSubRequestInternal({url:n,credential:o},(async()=>{await new yp(n,this.batchRequest.createPipeline(o)).setAccessTier(s,e)}))}))}}class Bp{constructor(){this.operationCount=0,this.body="";const e=et();this.boundary=`batch_${e}`,this.subRequestPrefix=`--${this.boundary}${Wi}${Li}: application/http${Wi}${Ui}: binary`,this.multipartContentType=`multipart/mixed; boundary=${this.boundary}`,this.batchRequestEnding=`--${this.boundary}--`,this.subRequests=new Map}createPipeline(e){const t=ge();var r;t.addPolicy(Wr({stringifyXML:Ei,serializerOptions:{xml:{xmlCharKey:"#"}}}),{phase:"Serialize"}),t.addPolicy({name:"batchHeaderFilterPolicy",async sendRequest(e,t){let r="";for(const[t]of e.headers)hn(t,$i)&&(r=t);return""!==r&&e.headers.delete(r),t(e)}}),t.addPolicy((r=this,{name:"batchRequestAssemblePolicy",sendRequest:async e=>(r.appendSubRequestToBody(e),{request:e,status:200,headers:Nt()})}),{afterPhase:"Sign"}),dr(e)?t.addPolicy(lr({credential:e,scopes:Pi,challengeCallbacks:{authorizeRequestOnChallenge:ri}}),{phase:"Sign"}):e instanceof mr&&t.addPolicy((e.accountName,e.accountKey,{name:"storageSharedKeyCredentialPolicy",sendRequest:async(e,t)=>t(e)}),{phase:"Sign"});const i=new qn([]);return i._credential=e,i._corePipeline=t,i}appendSubRequestToBody(e){this.body+=[this.subRequestPrefix,`${Ni}: ${this.operationCount}`,"",`${e.method.toString()} ${ln(e.url)} ${Ki}${Wi}`].join(Wi);for(const[t,r]of e.headers)this.body+=`${t}: ${r}${Wi}`;this.body+=Wi}preAddSubRequest(e){if(this.operationCount>=256)throw new RangeError("Cannot exceed 256 sub requests in a single batch");const t=an(e.url);if(!t||""===t)throw new RangeError(`Invalid url for sub request: '${e.url}'`)}postAddSubRequest(e){this.subRequests.set(this.operationCount,e),this.operationCount++}getHttpRequestBody(){return`${this.body}${this.batchRequestEnding}${Wi}`}getMultipartContentType(){return this.multipartContentType}getSubRequests(){return this.subRequests}}class Cp{constructor(e,t,r){let i;i=Nn(t)?t:Un(t||new fr,r);const n=new Ou(e,Ln(i)),o=an(e);this.serviceOrContainerContext=o&&"/"!==o?n.container:n.service}createBatch(){return new Tp}async deleteBlobs(e,t,r){const i=new Tp;for(const n of e)"string"==typeof n?await i.deleteBlob(n,t,r):await i.deleteBlob(n,t);return this.submitBatch(i)}async setBlobsAccessTier(e,t,r,i){const n=new Tp;for(const o of e)"string"==typeof o?await n.setBlobAccessTier(o,t,r,i):await n.setBlobAccessTier(o,t,r);return this.submitBatch(n)}async submitBatch(e,t={}){if(!e||0===e.getSubRequests().size)throw new RangeError("Batch request should contain one or more sub requests.");return Nu.withSpan("BlobBatchClient-submitBatch",t,(async t=>{const r=e.getHttpRequestBody(),i=Tn(await this.serviceOrContainerContext.submitBatch((n=r,new Blob([n]).size),e.getMultiPartContentType(),r,Object.assign({},t)));var n;const o=new Sp(i,e.getSubRequests()),s=await o.parseBatchResponse();return{_response:i._response,contentType:i.contentType,errorCode:i.errorCode,requestId:i.requestId,clientRequestId:i.clientRequestId,version:i.version,subResponses:s.subResponses,subResponsesSucceededCount:s.subResponsesSucceededCount,subResponsesFailedCount:s.subResponsesFailedCount}}))}}class Ip extends zu{get containerName(){return this._containerName}constructor(e,t,r){let i,n;if(r=r||{},Nn(t))n=e,i=t;else if(ot&&t instanceof mr||t instanceof fr||dr(t))n=e,i=Un(t,r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t)throw new Error("Expecting non-empty strings for containerName parameter");{const o=t,s=tn(e);if("AccountConnString"===s.kind){if(!ot)throw new Error("Account connection string is only supported in Node.js environment");{const e=new mr(s.accountName,s.accountKey);n=rn(s.url,encodeURIComponent(o)),r.proxyOptions||(r.proxyOptions=Lt(s.proxyUri)),i=Un(e,r)}}else{if("SASConnString"!==s.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");n=rn(s.url,encodeURIComponent(o))+"?"+s.accountSas,i=Un(new fr,r)}}}else n=e,i=Un(new fr,r);super(n,i),this._containerName=this.getContainerNameFromUrl(),this.containerContext=this.storageClientContext.container}async create(e={}){return Nu.withSpan("ContainerClient-create",e,(async e=>Tn(await this.containerContext.create(e))))}async createIfNotExists(e={}){return Nu.withSpan("ContainerClient-createIfNotExists",e,(async e=>{var t,r;try{const t=await this.create(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if("ContainerAlreadyExists"===(null===(t=e.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=e.response)||void 0===r?void 0:r.parsedHeaders),{_response:e.response});throw e}}))}async exists(e={}){return Nu.withSpan("ContainerClient-exists",e,(async t=>{try{return await this.getProperties({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}),!0}catch(e){if(404===e.statusCode)return!1;throw e}}))}getBlobClient(e){return new yp(rn(this.url,En(e)),this.pipeline)}getAppendBlobClient(e){return new vp(rn(this.url,En(e)),this.pipeline)}getBlockBlobClient(e){return new bp(rn(this.url,En(e)),this.pipeline)}getPageBlobClient(e){return new wp(rn(this.url,En(e)),this.pipeline)}async getProperties(e={}){return e.conditions||(e.conditions={}),Nu.withSpan("ContainerClient-getProperties",e,(async t=>Tn(await this.containerContext.getProperties(Object.assign(Object.assign({abortSignal:e.abortSignal},e.conditions),{tracingOptions:t.tracingOptions})))))}async delete(e={}){return e.conditions||(e.conditions={}),Nu.withSpan("ContainerClient-delete",e,(async t=>Tn(await this.containerContext.delete({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:e.conditions,tracingOptions:t.tracingOptions}))))}async deleteIfExists(e={}){return Nu.withSpan("ContainerClient-deleteIfExists",e,(async e=>{var t,r;try{const t=await this.delete(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if("ContainerNotFound"===(null===(t=e.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=e.response)||void 0===r?void 0:r.parsedHeaders),{_response:e.response});throw e}}))}async setMetadata(e,t={}){if(t.conditions||(t.conditions={}),t.conditions.ifUnmodifiedSince)throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service");return Nu.withSpan("ContainerClient-setMetadata",t,(async r=>Tn(await this.containerContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:t.conditions,tracingOptions:r.tracingOptions}))))}async getAccessPolicy(e={}){return e.conditions||(e.conditions={}),Nu.withSpan("ContainerClient-getAccessPolicy",e,(async t=>{const r=Tn(await this.containerContext.getAccessPolicy({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,tracingOptions:t.tracingOptions})),i={_response:r._response,blobPublicAccess:r.blobPublicAccess,date:r.date,etag:r.etag,errorCode:r.errorCode,lastModified:r.lastModified,requestId:r.requestId,clientRequestId:r.clientRequestId,signedIdentifiers:[],version:r.version};for(const e of r){let t;e.accessPolicy&&(t={permissions:e.accessPolicy.permissions},e.accessPolicy.expiresOn&&(t.expiresOn=new Date(e.accessPolicy.expiresOn)),e.accessPolicy.startsOn&&(t.startsOn=new Date(e.accessPolicy.startsOn))),i.signedIdentifiers.push({accessPolicy:t,id:e.id})}return i}))}async setAccessPolicy(e,t,r={}){return r.conditions=r.conditions||{},Nu.withSpan("ContainerClient-setAccessPolicy",r,(async i=>{const n=[];for(const e of t||[])n.push({accessPolicy:{expiresOn:e.accessPolicy.expiresOn?cn(e.accessPolicy.expiresOn):"",permissions:e.accessPolicy.permissions,startsOn:e.accessPolicy.startsOn?cn(e.accessPolicy.startsOn):""},id:e.id});return Tn(await this.containerContext.setAccessPolicy({abortSignal:r.abortSignal,access:e,containerAcl:n,leaseAccessConditions:r.conditions,modifiedAccessConditions:r.conditions,tracingOptions:i.tracingOptions}))}))}getBlobLeaseClient(e){return new Ju(this,e)}async uploadBlockBlob(e,t,r,i={}){return Nu.withSpan("ContainerClient-uploadBlockBlob",i,(async i=>{const n=this.getBlockBlobClient(e),o=await n.upload(t,r,i);return{blockBlobClient:n,response:o}}))}async deleteBlob(e,t={}){return Nu.withSpan("ContainerClient-deleteBlob",t,(async r=>{let i=this.getBlobClient(e);return t.versionId&&(i=i.withVersion(t.versionId)),i.delete(r)}))}async listBlobFlatSegment(e,t={}){return Nu.withSpan("ContainerClient-listBlobFlatSegment",t,(async r=>{const i=Tn(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({marker:e},t),{tracingOptions:r.tracingOptions})));var n;return Object.assign(Object.assign({},i),{_response:Object.assign(Object.assign({},i._response),{parsedBody:(n=i._response.parsedBody,Object.assign(Object.assign({},n),{segment:{blobItems:n.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name)})))}}))}),segment:Object.assign(Object.assign({},i.segment),{blobItems:i.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name),tags:vn(e.blobTags),objectReplicationSourceProperties:wn(e.objectReplicationMetadata)})))})})}))}async listBlobHierarchySegment(e,t,r={}){return Nu.withSpan("ContainerClient-listBlobHierarchySegment",r,(async i=>{var n;const o=Tn(await this.containerContext.listBlobHierarchySegment(e,Object.assign(Object.assign({marker:t},r),{tracingOptions:i.tracingOptions})));return Object.assign(Object.assign({},o),{_response:Object.assign(Object.assign({},o._response),{parsedBody:Sn(o._response.parsedBody)}),segment:Object.assign(Object.assign({},o.segment),{blobItems:o.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name),tags:vn(e.blobTags),objectReplicationSourceProperties:wn(e.objectReplicationMetadata)}))),blobPrefixes:null===(n=o.segment.blobPrefixes)||void 0===n?void 0:n.map((e=>Object.assign(Object.assign({},e),{name:xn(e.name)})))})})}))}listSegments(e){return s(this,arguments,(function*(e,t={}){let r;if(e||void 0===e)do{r=yield o(this.listBlobFlatSegment(e,t)),e=r.continuationToken,yield yield o(yield o(r))}while(e)}))}listItems(){return s(this,arguments,(function*(e={}){var t,r,i,n;try{for(var s,d=!0,c=l(this.listSegments(undefined,e));!(t=(s=yield o(c.next())).done);d=!0){n=s.value,d=!1;const e=n;yield o(yield*a(l(e.segment.blobItems)))}}catch(e){r={error:e}}finally{try{d||t||!(i=c.return)||(yield o(i.call(c)))}finally{if(r)throw r.error}}}))}listBlobsFlat(e={}){const t=[];e.includeCopy&&t.push("copy"),e.includeDeleted&&t.push("deleted"),e.includeMetadata&&t.push("metadata"),e.includeSnapshots&&t.push("snapshots"),e.includeVersions&&t.push("versions"),e.includeUncommitedBlobs&&t.push("uncommittedblobs"),e.includeTags&&t.push("tags"),e.includeDeletedWithVersions&&t.push("deletedwithversions"),e.includeImmutabilityPolicy&&t.push("immutabilitypolicy"),e.includeLegalHold&&t.push("legalhold"),""===e.prefix&&(e.prefix=void 0);const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{}),i=this.listItems(r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}listHierarchySegments(e,t){return s(this,arguments,(function*(e,t,r={}){let i;if(t||void 0===t)do{i=yield o(this.listBlobHierarchySegment(e,t,r)),t=i.continuationToken,yield yield o(yield o(i))}while(t)}))}listItemsByHierarchy(e){return s(this,arguments,(function*(e,t={}){var r,i,n,s;try{for(var a,d=!0,c=l(this.listHierarchySegments(e,undefined,t));!(r=(a=yield o(c.next())).done);d=!0){s=a.value,d=!1;const e=s.segment;if(e.blobPrefixes)for(const t of e.blobPrefixes)yield yield o(Object.assign({kind:"prefix"},t));for(const t of e.blobItems)yield yield o(Object.assign({kind:"blob"},t))}}catch(e){i={error:e}}finally{try{d||r||!(n=c.return)||(yield o(n.call(c)))}finally{if(i)throw i.error}}}))}listBlobsByHierarchy(e,t={}){if(""===e)throw new RangeError("delimiter should contain one or more characters");const r=[];t.includeCopy&&r.push("copy"),t.includeDeleted&&r.push("deleted"),t.includeMetadata&&r.push("metadata"),t.includeSnapshots&&r.push("snapshots"),t.includeVersions&&r.push("versions"),t.includeUncommitedBlobs&&r.push("uncommittedblobs"),t.includeTags&&r.push("tags"),t.includeDeletedWithVersions&&r.push("deletedwithversions"),t.includeImmutabilityPolicy&&r.push("immutabilitypolicy"),t.includeLegalHold&&r.push("legalhold"),""===t.prefix&&(t.prefix=void 0);const i=Object.assign(Object.assign({},t),r.length>0?{include:r}:{}),n=this.listItemsByHierarchy(e,i);return{next:async()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.listHierarchySegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},i))}}async findBlobsByTagsSegment(e,t,r={}){return Nu.withSpan("ContainerClient-findBlobsByTagsSegment",r,(async i=>{const n=Tn(await this.containerContext.filterBlobs({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions})),o=Object.assign(Object.assign({},n),{_response:n._response,blobs:n.blobs.map((e=>{var t;let r="";return 1===(null===(t=e.tags)||void 0===t?void 0:t.blobTagSet.length)&&(r=e.tags.blobTagSet[0].value),Object.assign(Object.assign({},e),{tags:vn(e.tags),tagValue:r})}))});return o}))}findBlobsByTagsSegments(e,t){return s(this,arguments,(function*(e,t,r={}){let i;if(t||void 0===t)do{i=yield o(this.findBlobsByTagsSegment(e,t,r)),i.blobs=i.blobs||[],t=i.continuationToken,yield yield o(i)}while(t)}))}findBlobsByTagsItems(e){return s(this,arguments,(function*(e,t={}){var r,i,n,s;try{for(var d,c=!0,u=l(this.findBlobsByTagsSegments(e,undefined,t));!(r=(d=yield o(u.next())).done);c=!0){s=d.value,c=!1;const e=s;yield o(yield*a(l(e.blobs)))}}catch(e){i={error:e}}finally{try{c||r||!(n=u.return)||(yield o(n.call(u)))}finally{if(i)throw i.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t),i=this.findBlobsByTagsItems(e,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}async getAccountInfo(e={}){return Nu.withSpan("ContainerClient-getAccountInfo",e,(async t=>Tn(await this.containerContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}getContainerNameFromUrl(){let e;try{const t=new URL(this.url);if(e="blob"===t.hostname.split(".")[1]?t.pathname.split("/")[1]:mn(t)?t.pathname.split("/")[2]:t.pathname.split("/")[1],e=decodeURIComponent(e),!e)throw new Error("Provided containerName is invalid.");return e}catch(e){throw new Error("Unable to extract containerName with provided information.")}}generateSasUrl(e){return new Promise((t=>{if(!(this.credential instanceof mr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");const r=Gu(Object.assign({containerName:this._containerName},e),this.credential).toString();t(dn(this.url,r))}))}generateSasStringToSign(e){if(!(this.credential instanceof mr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");return Wu(Object.assign({containerName:this._containerName},e),this.credential).stringToSign}getBlobBatchClient(){return new Cp(this.url,this.pipeline)}}var Ap=__webpack_require__(2404),Fp=__webpack_require__.n(Ap);class Mp{checkConnectCommonOps(e){return r(this,void 0,void 0,(function*(){try{console.info("check connect: create folder");const e=`rs-test-folder-${E()}/`;yield this.mkdir(e),console.info("check connect: upload file");const t=`${e}rs-test-file-${E()}`,r=Date.now(),i=Date.now(),n=new ArrayBuffer(100);yield this.writeFile(t,n,i,r),console.info("check connect: overwrite file");const o=Date.now(),s=new ArrayBuffer(200);yield this.writeFile(t,s,o,r),console.info("check connect: download file");const a=yield this.readFile(t);if(!Fp()(s,a))throw Error("downloaded file is not equal with uploaded file!");return console.info("check connect: delete file"),yield this.rm(t),console.info("check connect: delete folder"),yield this.rm(e),!0}catch(t){return console.error(t),null==e||e(t),!1}}))}}var Dp=__webpack_require__(53050),Rp=__webpack_require__.n(Dp),Pp=__webpack_require__(48287).Buffer;const Op=(e,t=!0,r=!0)=>{if(!t&&!r)throw Error("parameter error for isHiddenPath");const i=he.posix.normalize(e).split("/");for(const e of i)if("."!==e&&".."!==e&&""!==e){if(t&&"."===e[0])return!0;if(r&&"_"===e[0])return!0}return!1},zp=(e,t=!1)=>{const r=[];if(""===e||"/"===e)return r;const i=e.split("/");for(let e=0;e+1<i.length;e++){let n=i.slice(0,e+1).join("/");""!==n&&"/"!==n&&(t&&(n=`${n}/`),r.push(n))}return r},Np=(e,t)=>r(void 0,void 0,void 0,(function*(){const r=zp(e);for(const e of r){(yield t.adapter.exists(e))||(console.info(`mkdir ${e}`),yield t.adapter.mkdir(e))}})),qp=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Up=e=>Pp.from(e),Lp=e=>Up(e).toString("hex"),jp=e=>void 0!==e&&!Rp()("\\p{Cc}|\\p{Cf}|\\p{Co}|\\p{Cn}|\\p{Zl}|\\p{Zp}","A").test(e),Hp=e=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.test(e),$p=(e,t=!0)=>{const r={};return e.forEach(((e,i)=>{t?r[i.toLowerCase()]=e:r[i]=e})),r},Gp=e=>{const t=he.posix.dirname(e);return"."===t||"/"===t?"/":t.endsWith("/")?t:`${t}/`},Wp=e=>[...e].reverse().join(""),Kp=e=>{if(void 0===e||""===e||"."===e||".."===e||e.startsWith("/"))throw Error(`do not know which level for ${e}`);let t=e;return e.endsWith("/")&&(t=e.slice(0,-1)),t.split("/").length},Vp=(e,t=!1)=>{if(null!=e&&!Number.isNaN(e))return t?window.moment(e).toISOString(!0):window.moment(e).format()},Jp=(e,t)=>r(void 0,void 0,void 0,(function*(){const r=yield e.adapter.stat(t);if(null==r)throw Error(`${t} doesn't exist cannot run stat`);return(void 0===r.ctime||null===r.ctime||Number.isNaN(r.ctime))&&(r.ctime=void 0),(void 0===r.mtime||null===r.mtime||Number.isNaN(r.mtime))&&(r.mtime=void 0),void 0!==r.size&&null!==r.size&&!Number.isNaN(r.size)||"folder"!==r.type||(r.size=0),r})),Yp=(e,t)=>{const r=[".git",".github",".gitlab",".svn","node_modules",".DS_Store","__MACOSX ","Icon\r","desktop.ini","Desktop.ini","thumbs.db","Thumbs.db"].concat(void 0!==t?t:[]);for(const t of r)if(e===t||e===`${t}/`||e.endsWith(`/${t}`)||e.endsWith(`/${t}/`))return!0;const i=e.split("/");if(i.length>0){const e=i[i.length-1];if(e.startsWith("~$")){const t=["doc","docx","ppt","pptx","xls","xlsx"];for(const r of t)if(e.endsWith(`.${r}`))return!0}}return!1},Qp=e=>{const t=document.createElement("template");return t.innerHTML=e,t.content},Zp=e=>new Promise((t=>setTimeout(t,e))),Xp=(e,t)=>{const i=document.getElementsByClassName("app-container")[0],n=document.querySelector(".is-mobile .app-container .status-bar");if(void 0===i||void 0===n)return console.warn("give up watching appContainer for statusbar"),void console.warn(`appContainer=${i}, statusbar=${n}`);if("enable"===e){const e=(e,t)=>r(void 0,void 0,void 0,(function*(){for(const t of e)if("childList"===t.type&&t.addedNodes.length>0){const e=t.addedNodes[0];if(e.className.contains("mobile-navbar")||e.className.contains("mobile-toolbar")){yield Zp(300);const t=window.getComputedStyle(e).getPropertyValue("height");n.style.setProperty("display","flex"),n.style.setProperty("margin-bottom",t)}}})),t=new MutationObserver(e);t.observe(i,{attributes:!1,childList:!0,characterData:!1,subtree:!1});try{const e=document.getElementsByClassName("mobile-navbar")[0],t=window.getComputedStyle(e).getPropertyValue("height");n.style.setProperty("display","flex"),n.style.setProperty("margin-bottom",t)}catch(e){}return t}return void 0!==t&&(console.debug("disconnect oldAppContainerObserver"),t.disconnect(),t=void 0),n.style.removeProperty("display"),void n.style.removeProperty("margin-bottom")},eh=e=>{const t=[],r=[e];let i=0;for(;r.length;){const e=r.pop();switch(typeof e){case"boolean":i+=4;break;case"string":i+=2*e.length;break;case"number":i+=8;break;case"object":if(!t.includes(e)){t.push(e);for(const t in e)e.hasOwnProperty(t)&&r.push(e[t])}}}return i},th=(e,t)=>{if(e<0)throw Error("totalSize should not be negative");if(t<=0)throw Error("chunkSize should not be negative or zero");if(0===e)return[];if(e<=t)return[{start:0,end:e-1}];const r=[],i=Math.ceil(1*e/t);for(let n=0;n<i;++n)r.push({start:n*t,end:Math.min((n+1)*t-1,e-1)});return r},rh=(e,t)=>r(void 0,void 0,void 0,(function*(){const r=yield window.crypto.subtle.digest("SHA-1",e);if("base64"===t)return(e=>Up(e).toString("base64"))(r);if("hex"===t)return Lp(r);throw Error(`not supported stringify option = ${t}`)})),ih=e=>{if(void 0===e)return"";let t=he.posix.normalize(e.trim());return void 0===t||""===t||"/"===t||"."===t?"":(t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")||(t=`${t}/`),t)},nh={containerSasUrl:"",containerName:"",remotePrefix:"",generateFolderObject:!1,partsConcurrency:5,kind:"azureblobstorage"},oh=(e,t)=>{if(t.startsWith("/")||!t.endsWith("/"))throw Error(`remotePrefix should not have leading slash but should have tailing slash: ${t}`);return`${t}${e}`},sh=(e,t,r)=>{var i,n,o;const s=((e,t)=>{if(t.startsWith("/")||!t.endsWith("/"))throw Error(`remotePrefix should not have leading slash but should have tailing slash: ${t}`);if(!e.startsWith(t))throw Error(`${e} does not start with ${t}!`);return e.slice(t.length)})(e,r);let a=t.lastModified.valueOf();const l=null===(i=t.metadata)||void 0===i?void 0:i.mtime;if(void 0!==l&&""!==l)try{a=new Date(l).valueOf()}catch(e){}let d;void 0!==t.contentMD5&&(d=Lp(t.contentMD5.buffer));const c={key:s,keyRaw:s,mtimeCli:a,mtimeSvr:t.lastModified.valueOf(),size:null!==(n=t.contentLength)&&void 0!==n?n:0,sizeRaw:null!==(o=t.contentLength)&&void 0!==o?o:0,hash:d};return s.endsWith("/")&&(c.synthesizedFolder=!1),c};class ah extends Mp{constructor(e,t){super(),this.kind="azureblobstorage",this.config=e,this.vaultName=t,this.synthFoldersCache={},this.remotePrefix=`${t}/`;const r=ih(this.config.remotePrefix);""!==r&&(this.remotePrefix=r),this.containerClient=new Ip(this.config.containerSasUrl)}walk(){return r(this,void 0,void 0,(function*(){var e,t,r,i;const n=[],o=new Set;try{for(var s,a=!0,d=l(this.containerClient.listBlobsFlat({prefix:this.remotePrefix,includeMetadata:!0}));!(e=(s=yield d.next()).done);a=!0){i=s.value,a=!1;const e=i,t=this.containerClient.getBlockBlobClient(e.name),r=yield t.getProperties(),l=sh(e.name,r,this.remotePrefix);n.push(l),o.add(l.key);for(const e of zp(l.key,!0))o.has(e)?delete this.synthFoldersCache[e]:(!this.synthFoldersCache.hasOwnProperty(e)||l.mtimeSvr>=this.synthFoldersCache[e].mtimeSvr)&&(this.synthFoldersCache[e]={key:e,keyRaw:e,size:0,sizeRaw:0,sizeEnc:0,mtimeSvr:l.mtimeSvr,mtimeSvrFmt:l.mtimeSvrFmt,mtimeCli:l.mtimeCli,mtimeCliFmt:l.mtimeCliFmt,synthesizedFolder:!0})}}catch(e){t={error:e}}finally{try{a||e||!(r=d.return)||(yield r.call(d))}finally{if(t)throw t.error}}for(const e of Object.keys(this.synthFoldersCache))n.push(this.synthFoldersCache[e]);return n}))}walkPartial(){return r(this,void 0,void 0,(function*(){var e,t,r,i;const n=[];try{for(var o,s=!0,a=l(this.containerClient.listBlobsByHierarchy("/",{prefix:this.remotePrefix,includeMetadata:!0}));!(e=(o=yield a.next()).done);s=!0){i=o.value,s=!1;const e=i;if("prefix"===e.kind)continue;const t=this.containerClient.getBlockBlobClient(e.name),r=yield t.getProperties(),a=sh(e.name,r,this.remotePrefix);n.push(a)}}catch(e){t={error:e}}finally{try{s||e||!(r=a.return)||(yield r.call(a))}finally{if(t)throw t.error}}return n}))}stat(e){return r(this,void 0,void 0,(function*(){const t=oh(e,this.remotePrefix),r=this.containerClient.getBlockBlobClient(t),i=yield r.getProperties();return sh(t,i,this.remotePrefix)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){var r;if(!e.endsWith("/"))throw new Error(`You should not call mkdir on ${e}!`);if(!(null!==(r=this.config.generateFolderObject)&&void 0!==r&&r)){const r={key:e,keyRaw:e,size:0,sizeRaw:0,sizeEnc:0,mtimeSvr:t,mtimeCli:t,synthesizedFolder:!0};return this.synthFoldersCache[e]=r,r}return yield this.writeFile(e,new ArrayBuffer(0),null!=t?t:Date.now(),null!=i?i:Date.now())}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){var r,o;const s=oh(e,this.remotePrefix),a=this.containerClient.getBlockBlobClient(s),l={mtime:new Date(i).toISOString(),ctime:new Date(n).toISOString()};if(e.endsWith("/")){console.debug("yeah we have folder upload");if(!(null!==(r=this.config.generateFolderObject)&&void 0!==r&&r))throw Error("if not generate folder object, the func should not go here");l.hdi_isfolder="true"}const d=yield a.uploadData(t,{metadata:l,concurrency:null!==(o=this.config.partsConcurrency)&&void 0!==o?o:5});if(e.endsWith("/")&&(console.debug("yeah we have folder upload"),console.debug(d)),d._response.status>=300)throw Error(`upload ${e} failed with ${JSON.stringify(d)}`);return yield this.stat(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){const t=oh(e,this.remotePrefix),r=this.containerClient.getBlockBlobClient(t),i=yield r.download();if(i._response.status>=300)throw Error(`download ${e} failed with ${JSON.stringify(i)}`);return yield(yield i.blobBody).arrayBuffer()}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){const t=oh(e,this.remotePrefix);if(e.endsWith("/")){this.synthFoldersCache.hasOwnProperty(e)&&delete this.synthFoldersCache[e];try{const e=this.containerClient.getBlockBlobClient(t);yield e.deleteIfExists()}catch(e){}}else{const r=this.containerClient.getBlockBlobClient(t),i=yield r.deleteIfExists();if(!i.succeeded)throw Error(`something goes wrong while deleting ${e}: ${JSON.stringify(i)}`)}}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this.walkPartial()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}var lh=__webpack_require__(80070),dh=__webpack_require__(86049),ch=__webpack_require__(72322),uh=__webpack_require__(58686),ph=__webpack_require__(30228);class hh extends Error{constructor(e){super(e),this.name="TimeoutError"}}class fh extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const mh=e=>void 0===globalThis.DOMException?new fh(e):new DOMException(e),gh=e=>{const t=void 0===e.reason?mh("This operation was aborted."):e.reason;return t instanceof Error?t:mh(t)};class yh{#t=[];enqueue(e,t){const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&this.#t[this.size-1].priority>=t.priority)return void this.#t.push(r);const i=function(e,t,r){let i=0,n=e.length;for(;n>0;){const o=Math.trunc(n/2);let s=i+o;r(e[s],t)<=0?(i=++s,n-=o+1):n=o}return i}(this.#t,r,((e,t)=>t.priority-e.priority));this.#t.splice(i,0,r)}dequeue(){const e=this.#t.shift();return e?.run}filter(e){return this.#t.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this.#t.length}}class vh extends ph{#r;#i;#n=0;#o;#s;#a=0;#l;#d;#t;#c;#u=0;#p;#h;#f;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:yh,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#r=e.carryoverConcurrencyCount,this.#i=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this.#o=e.intervalCap,this.#s=e.interval,this.#t=new e.queueClass,this.#c=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#f=!0===e.throwOnTimeout,this.#h=!1===e.autoStart}get#m(){return this.#i||this.#n<this.#o}get#g(){return this.#u<this.#p}#y(){this.#u--,this.#v(),this.emit("next")}#b(){this.#w(),this.#_(),this.#d=void 0}get#x(){const e=Date.now();if(void 0===this.#l){const t=this.#a-e;if(!(t<0))return void 0===this.#d&&(this.#d=setTimeout((()=>{this.#b()}),t)),!0;this.#n=this.#r?this.#u:0}return!1}#v(){if(0===this.#t.size)return this.#l&&clearInterval(this.#l),this.#l=void 0,this.emit("empty"),0===this.#u&&this.emit("idle"),!1;if(!this.#h){const e=!this.#x;if(this.#m&&this.#g){const t=this.#t.dequeue();return!!t&&(this.emit("active"),t(),e&&this.#_(),!0)}}return!1}#_(){this.#i||void 0!==this.#l||(this.#l=setInterval((()=>{this.#w()}),this.#s),this.#a=Date.now()+this.#s)}#w(){0===this.#n&&0===this.#u&&this.#l&&(clearInterval(this.#l),this.#l=void 0),this.#n=this.#r?this.#u:0,this.#S()}#S(){for(;this.#v(););}get concurrency(){return this.#p}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#p=e,this.#S()}async#k(e){return new Promise(((t,r)=>{e.addEventListener("abort",(()=>{r(e.reason)}),{once:!0})}))}async add(e,t={}){return t={timeout:this.timeout,throwOnTimeout:this.#f,...t},new Promise(((r,i)=>{this.#t.enqueue((async()=>{this.#u++,this.#n++;try{t.signal?.throwIfAborted();let i=e({signal:t.signal});t.timeout&&(i=function(e,t){const{milliseconds:r,fallback:i,message:n,customTimers:o={setTimeout,clearTimeout}}=t;let s;const a=new Promise(((a,l)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:r}=t;r.aborted&&l(gh(r));const i=()=>{l(gh(r))};r.addEventListener("abort",i,{once:!0}),e.finally((()=>{r.removeEventListener("abort",i)}))}if(r===Number.POSITIVE_INFINITY)return void e.then(a,l);const d=new hh;s=o.setTimeout.call(void 0,(()=>{if(i)try{a(i())}catch(e){l(e)}else"function"==typeof e.cancel&&e.cancel(),!1===n?a():n instanceof Error?l(n):(d.message=n??`Promise timed out after ${r} milliseconds`,l(d))}),r),(async()=>{try{a(await e)}catch(e){l(e)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{o.clearTimeout.call(void 0,s),s=void 0},a}(Promise.resolve(i),{milliseconds:t.timeout})),t.signal&&(i=Promise.race([i,this.#k(t.signal)]));const n=await i;r(n),this.emit("completed",n)}catch(e){if(e instanceof hh&&!t.throwOnTimeout)return void r();i(e),this.emit("error",e)}finally{this.#y()}}),t),this.emit("add"),this.#v()}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this.#h?(this.#h=!1,this.#S(),this):this}pause(){this.#h=!0}clear(){this.#t=new this.#c}async onEmpty(){0!==this.#t.size&&await this.#E("empty")}async onSizeLessThan(e){this.#t.size<e||await this.#E("next",(()=>this.#t.size<e))}async onIdle(){0===this.#u&&0===this.#t.size||await this.#E("idle")}async#E(e,t){return new Promise((r=>{const i=()=>{t&&!t()||(this.off(e,i),r())};this.on(e,i)}))}get size(){return this.#t.size}sizeBy(e){return this.#t.filter(e).length}get pending(){return this.#u}get isPaused(){return this.#h}}const bh={accessToken:"",refreshToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,credentialsShouldBeDeletedAtTimeMs:0,kind:"box"},wh=(e,t,r)=>{var i,n,o,s,a,l,d,c;if(void 0===t||""===t||"0"===t)throw Error(`parentID=${t} should not be in fromBoxItemToEntity`);let u=e.name;if(void 0!==r&&""!==r&&"/"!==r){if(!r.endsWith("/"))throw Error(`parentFolderPath=${r} should not be in fromFileToBoxEntity`);u=`${r}${e.name}`}if("folder"===e.type){u=`${u}/`;const a=null!==(s=null!==(n=null===(i=e.contentModifiedAt)||void 0===i?void 0:i.value.valueOf())&&void 0!==n?n:null===(o=e.modifiedAt)||void 0===o?void 0:o.value.valueOf())&&void 0!==s?s:Date.now();return{key:u,keyRaw:u,mtimeCli:a,mtimeSvr:a,id:e.id,parentID:t,isFolder:!0,size:0,sizeRaw:0,hash:void 0,hashSha1:void 0,parentIDPath:r}}if("file"===e.type){const i=null!==(c=null!==(l=null===(a=e.contentModifiedAt)||void 0===a?void 0:a.value.valueOf())&&void 0!==l?l:null===(d=e.modifiedAt)||void 0===d?void 0:d.value.valueOf())&&void 0!==c?c:Date.now();return{key:u,keyRaw:u,mtimeCli:i,mtimeSvr:i,id:e.id,parentID:t,isFolder:!1,size:e.size,sizeRaw:e.size,hash:e.sha1,hashSha1:e.sha1,parentIDPath:r}}throw Error("we do not support web link Box item")},_h=(e,t,r)=>{var i,n,o,s,a;if(void 0===t||""===t||"0"===t)throw Error(`parentID=${t} should not be in fromRawResponseToEntity`);let l=e.name;if(void 0!==r&&""!==r&&"/"!==r){if(!r.endsWith("/"))throw Error(`parentFolderPath=${r} should not be in fromFileToBoxEntity`);l=`${r}${e.name}`}if("folder"===e.type)l=`${l}/`;else if("file"!==e.type)throw Error("we do not support web link Box item");const d=null!==(i=e.content_modified_at)&&void 0!==i?i:e.modified_at;let c=Date.now();return void 0!==d&&(c=new Date(d).valueOf()),{key:l,keyRaw:l,mtimeCli:c,mtimeSvr:c,id:e.id,parentID:t,isFolder:!1,size:null!==(n=e.size)&&void 0!==n?n:0,sizeRaw:null!==(o=e.size)&&void 0!==o?o:0,hash:null!==(s=e.sha1)&&void 0!==s?s:void 0,hashSha1:null!==(a=e.sha1)&&void 0!==a?a:void 0,parentIDPath:r}};class xh extends Mp{constructor(e,t,r){super(),this.kind="box",this.boxConfig=e,this.remoteBaseDir=this.boxConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.keyToBoxEntity={},this.baseDirID=""}_init(){return r(this,void 0,void 0,(function*(){var e,t,r,i,n;const o=yield this._getAccessToken();if(this.vaultFolderExists);else{const s=new ch.BoxDeveloperTokenAuth({token:o}),a=new uh.r({auth:s});let l,d=0;const c=1e3;for(;!this.vaultFolderExists;){if(l=yield a.folders.getFolderItems("0",{queryParams:{fields:["id","type","name","sha1","size","created_at","modified_at","expires_at","parent","content_created_at","content_modified_at","etag"],offset:d,limit:c}}),(null!==(t=null===(e=l.entries)||void 0===e?void 0:e.filter((e=>e.name===this.remoteBaseDir)).length)&&void 0!==t?t:0)>0){const e=null===(r=l.entries)||void 0===r?void 0:r.filter((e=>e.name===this.remoteBaseDir))[0];this.baseDirID=e.id,this.vaultFolderExists=!0;break}if((null!==(i=l.offset)&&void 0!==i?i:0)>=(null!==(n=l.totalCount)&&void 0!==n?n:0))break;d+=c}if(!this.vaultFolderExists){const e=yield a.folders.createFolder({name:this.remoteBaseDir,parent:{id:"0"}});this.baseDirID=e.id,this.vaultFolderExists=!0}}}))}_getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.boxConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.boxConfig.accessTokenExpiresAtTimeMs>e)return this.boxConfig.accessToken;const t=yield(i=this.boxConfig.refreshToken,r(void 0,void 0,void 0,(function*(){console.debug("refreshing token");const e=yield fetch("https://api.box.com/oauth2/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:U,client_secret:L,grant_type:"refresh_token",refresh_token:i}).toString()});if(200===e.status){const t=yield e.json();return console.debug("new token obtained"),t}throw Error("cannot refresh an access token")})));var i;return this.boxConfig.accessToken=t.access_token,this.boxConfig.accessTokenExpiresInMs=1e3*t.expires_in,this.boxConfig.accessTokenExpiresAtTimeMs=e+1e3*t.expires_in-12e4,this.boxConfig.refreshToken=t.refresh_token||this.boxConfig.refreshToken,yield this.saveUpdatedConfigFunc(),console.info("Box accessToken updated"),this.boxConfig.accessToken}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e=[],t=new vh({concurrency:5,autoStart:!0});t.on("error",(e=>{throw t.pause(),t.clear(),e}));let i=[{id:this.baseDirID,folderPath:""}];for(;0!==i.length;){const n=[];for(const{id:o,folderPath:s}of i)t.add((()=>r(this,void 0,void 0,(function*(){const t=yield this._walkFolder(o,s);for(const r of t)if(e.push(r),r.isFolder){const e={id:r.id,folderPath:r.keyRaw};n.push(e)}}))));yield t.onIdle(),i=n}return e}))}_walkFolder(e,t){return r(this,void 0,void 0,(function*(){var r,i;const n=[],o=yield this._getAccessToken(),s=new ch.BoxDeveloperTokenAuth({token:o}),a=new uh.r({auth:s});if(void 0===e||""===e||"root"===e)throw Error("something goes wrong walking folder");let l,d=0;do{l=yield a.folders.getFolderItems(e,{queryParams:{fields:["id","type","name","sha1","size","created_at","modified_at","expires_at","parent","content_created_at","content_modified_at","etag"],offset:d,limit:1e3}});for(const i of null!==(r=l.entries)&&void 0!==r?r:[]){const r=wh(i,e,t);this.keyToBoxEntity[r.keyRaw]=r,n.push(r)}d+=1e3}while(d<(null!==(i=null==l?void 0:l.totalCount)&&void 0!==i?i:0));return n}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();return yield this._walkFolder(this.baseDirID,"")}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToBoxEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);const i=yield this._getAccessToken(),n=new ch.BoxDeveloperTokenAuth({token:i}),o=new uh.r({auth:n});let s;s=t.isFolder?yield o.folders.getFolderById(r):yield o.files.getFileById(r);const a=wh(s,t.parentID,t.parentIDPath);return this.keyToBoxEntity[e]=a,a}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not mkdir on key=${e}`);yield this._init();const t=this.keyToBoxEntity[e],r=null==t?void 0:t.id;if(void 0!==t&&void 0!==r)return t;const i=zp(e);let n,o;if(0===i.length)throw Error(`cannot getFolderLevels of ${e}`);if(1===i.length)o=this.baseDirID,n="";else{if(n=`${i[i.length-2]}/`,!(n in this.keyToBoxEntity))throw Error(`parent of ${e}: ${n} is not created before??`);o=this.keyToBoxEntity[n].id}let s=i[i.length-1];s=s.split("/").pop();const a=yield this._getAccessToken(),l=new ch.BoxDeveloperTokenAuth({token:a}),d=new uh.r({auth:l}),c=yield d.folders.createFolder({name:s,parent:{id:o}}),u=wh(c,o,n);return this.keyToBoxEntity[e]=u,u}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`should not call writeFile on ${e}`);yield this._init();const r=this.keyToBoxEntity[e],o=null==r?void 0:r.id,s=dh.contentType(dh.lookup(e)||I)||I;let a,l;const d=zp(e);if(0===d.length)a=this.baseDirID,l="";else{if(l=`${d[d.length-1]}/`,!(l in this.keyToBoxEntity))throw Error(`parent of ${e}: ${l} is not created before??`);a=this.keyToBoxEntity[l].id}const c=e.split("/").pop();if(t.byteLength<=2e7){const r=new FormData,d={name:c,parent:{id:a},content_created_at:Vp(n),content_modified_at:Vp(i)};r.append("attributes",JSON.stringify(d)),r.append("file",new Blob([t],{type:s}));let u="";u=void 0===o?"https://upload.box.com/api/2.0/files/content":`https://upload.box.com/api/2.0/files/${o}/content`;const p=yield fetch(u,{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`},body:r});if(200!==p.status&&201!==p.status)throw Error(`create file ${e} failed! attributes=${JSON.stringify(d)}`);const h=yield p.json();if(void 0===h.entries)throw Error(`upload small file ${e} failed!`);const f=_h(h.entries[0],a,l);return this.keyToBoxEntity[e]=f,f}{let r="";r=void 0===o?"https://upload.box.com/api/2.0/files/upload_sessions":`https://upload.box.com/api/2.0/files/${o}/upload_sessions`;const s=yield fetch(r,{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Type":"application/json"},body:JSON.stringify({file_name:c,file_size:t.byteLength,folder_id:a})});if(200!==s.status&&201!==s.status)throw Error(`Create upload session for ${e} failed! Response header=${JSON.stringify(s.headers)}`);const d=yield s.json(),u=d.part_size,p=th(t.byteLength,u),h=[];for(const{start:r,end:i}of p){const n=t.slice(r,i+1),o=yield rh(n,"base64"),s=yield fetch(d.session_endpoints.upload_part,{method:"PUT",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Range":`bytes ${r}-${i}/${t.byteLength}`,"Content-Type":"application/octet-stream",digest:`sha=${o}`},body:n});if(200!==s.status&&201!==s.status)throw Error(`Upload chunk for ${e}, ${r}-${i} failed! Response header=${JSON.stringify(s.headers)}`);h.push(yield s.json())}const f=yield rh(t,"base64");let m=202,g=0;do{const t=yield fetch(d.session_endpoints.commit,{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Type":"application/json",digest:`sha=${f}`},body:JSON.stringify({parts:h.map((e=>e.part)),attributes:{content_modified_at:Vp(i,!1),content_created_at:Vp(n,!1)}})});if(m=t.status,200===m||201===m){const r=yield t.json();if(void 0===r.entries)throw Error(`Upload big file ${e} failed!`);const i=_h(r.entries[0],a,l);return this.keyToBoxEntity[e]=i,i}if(202!==m)throw Error(`Commit all chunks for ${e} failed! Response header=${JSON.stringify(t.headers)}`);yield Zp(500),g+=1}while(202===m&&g<4);throw Error(`Commit all chunks for ${e} failed! No idea what happened`)}}))}readFile(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToBoxEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);const i=yield fetch(`https://api.box.com/2.0/files/${r}/content`,{method:"GET",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`}});if(200!==i.status)throw Error(`Cannot download file ${e} with id ${r}. Response header=${JSON.stringify(i.headers)}`);return yield i.arrayBuffer()}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToBoxEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);const i=yield this._getAccessToken(),n=new ch.BoxDeveloperTokenAuth({token:i}),o=new uh.r({auth:n});t.isFolder?yield o.folders.deleteFolderById(r,{queryParams:{recursive:!0}}):yield o.files.deleteFileById(r)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){yield fetch("https://api.box.com/oauth2/revoke",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:U,client_secret:L,token:this.boxConfig.refreshToken}).toString()})}))}allowEmptyFile(){return!0}}const Sh={accessToken:"",refreshToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,credentialsShouldBeDeletedAtTimeMs:0,scope:"https://www.googleapis.com/auth/drive.file",kind:"googledrive"},kh="application/vnd.google-apps.folder",Eh=e=>r(void 0,void 0,void 0,(function*(){console.debug("refreshing token");const t=yield fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:z,client_secret:N,grant_type:"refresh_token",refresh_token:e}).toString()});if(200===t.status){const e=yield t.json();return console.debug("new token obtained"),e}throw Error("cannot refresh an access token")})),Th=(e,t,r)=>{if(void 0===t||""===t||"root"===t)throw Error(`parentID=${t} should not be in fromFileToGDEntity`);let i=e.name;if(void 0!==r&&""!==r&&"/"!==r){if(!r.endsWith("/"))throw Error(`parentFolderPath=${r} should not be in fromFileToGDEntity`);i=`${r}${e.name}`}const n=e.mimeType===kh;return n&&(i=`${i}/`),{key:i,keyRaw:i,mtimeCli:Date.parse(e.modifiedTime),mtimeSvr:Date.parse(e.modifiedTime),size:n?0:Number.parseInt(e.size),sizeRaw:n?0:Number.parseInt(e.size),hash:n?void 0:e.md5Checksum,id:e.id,parentID:t,isFolder:n}};class Bh extends Mp{constructor(e,t,r){super(),this.kind="googledrive",this.googleDriveConfig=e,this.remoteBaseDir=this.googleDriveConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.keyToGDEntity={},this.baseDirID=""}_init(){return r(this,void 0,void 0,(function*(){if(yield this._getAccessToken(),this.vaultFolderExists);else{const e=`https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(`name='${this.remoteBaseDir}' and mimeType='application/vnd.google-apps.folder' and trashed=false`)}&pageSize=1000&fields=kind,nextPageToken,files(kind,fileExtension,md5Checksum,mimeType,parents,size,spaces,id,name,trashed,createdTime,modifiedTime,quotaBytesUsed,originalFilename,fullFileExtension,sha1Checksum,sha256Checksum)`,t=yield fetch(e,{method:"GET",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`}}),r=yield t.json();if(r.files.length>0)this.baseDirID=r.files[0].id,this.vaultFolderExists=!0;else{console.debug(`we need to create the base dir ${this.remoteBaseDir}`);const e={mimeType:kh,name:this.remoteBaseDir},t=yield fetch("https://www.googleapis.com/drive/v3/files",{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Type":"application/json"},body:JSON.stringify(e)}),r=yield t.json();if(200!==t.status)throw Error(`cannot create base dir ${this.remoteBaseDir} in init func.`);console.debug(`succeed to create the base dir ${this.remoteBaseDir}`),this.baseDirID=r.id,this.vaultFolderExists=!0}}}))}_getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.googleDriveConfig.accessToken||""===this.googleDriveConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.googleDriveConfig.accessTokenExpiresAtTimeMs>e)return this.googleDriveConfig.accessToken;const t=yield Eh(this.googleDriveConfig.refreshToken);return this.googleDriveConfig.accessToken=t.access_token,this.googleDriveConfig.accessTokenExpiresInMs=1e3*t.expires_in,this.googleDriveConfig.accessTokenExpiresAtTimeMs=e+1e3*t.expires_in-12e4,yield this.saveUpdatedConfigFunc(),console.info("Google Drive accessToken updated"),this.googleDriveConfig.accessToken}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e=[],t=new vh({concurrency:5,autoStart:!0});t.on("error",(e=>{throw t.pause(),t.clear(),e}));let i=[{id:this.baseDirID,folderPath:""}];for(;0!==i.length;){const n=[];for(const{id:o,folderPath:s}of i)t.add((()=>r(this,void 0,void 0,(function*(){const t=yield this._walkFolder(o,s);for(const r of t)if(e.push(r),r.isFolder){const e={id:r.id,folderPath:r.keyRaw};n.push(e)}}))));yield t.onIdle(),i=n}return e}))}_walkFolder(e,t){return r(this,void 0,void 0,(function*(){const r=[];let i;if(void 0===e||""===e||"root"===e)throw Error("something goes wrong walking folder");do{const n=`https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(`'${e}' in parents and trashed=false`)}&pageSize=1000&fields=kind,nextPageToken,files(kind,fileExtension,md5Checksum,mimeType,parents,size,spaces,id,name,trashed,createdTime,modifiedTime,quotaBytesUsed,originalFilename,fullFileExtension,sha1Checksum,sha256Checksum)${void 0!==i?`&pageToken=${i}`:""}`,o=yield fetch(n,{method:"GET",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`}});if(200!==o.status)throw Error(`cannot walk for parentID=${e}`);const s=yield o.json();for(const i of s.files){const n=Th(i,e,t);this.keyToGDEntity[n.keyRaw]=n,r.push(n)}i=s.nextPageToken}while(void 0!==i);return r}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();return yield this._walkFolder(this.baseDirID,"")}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToGDEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);const i=`https://www.googleapis.com/drive/v3/files/${r}?fields=kind,fileExtension,md5Checksum,mimeType,parents,size,spaces,id,name,trashed,createdTime,modifiedTime,quotaBytesUsed,originalFilename,fullFileExtension,sha1Checksum,sha256Checksum`,n=yield fetch(i,{method:"GET",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`}});if(200!==n.status)throw Error(`cannot get file meta fileID=${r}, key=${e}`);const o=yield n.json(),s=Th(o,t.parentID,t.parentIDPath);return this.keyToGDEntity[e]=s,s}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not mkdir on key=${e}`);yield this._init();const r=zp(e);let n,o;if(0===r.length)throw Error(`cannot getFolderLevels of ${e}`);if(1===r.length)o=this.baseDirID,n="";else{if(n=`${r[r.length-2]}/`,!(n in this.keyToGDEntity))throw Error(`parent of ${e}: ${n} is not created before??`);o=this.keyToGDEntity[n].id}let s=r[r.length-1];s=s.split("/").pop();const a={mimeType:kh,modifiedTime:Vp(t,!0),createdTime:Vp(i,!0),name:s,parents:[o]},l=yield fetch("https://www.googleapis.com/drive/v3/files",{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(200!==l.status&&201!==l.status)throw Error(`create folder ${e} failed! meta=${JSON.stringify(a)}`);const d=yield l.json(),c=Th(d,o,n);return this.keyToGDEntity[e]=c,c}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`should not call writeFile on ${e}`);yield this._init();const r=dh.contentType(dh.lookup(e)||I)||I;let o,s;const a=zp(e);if(0===a.length)o=this.baseDirID,s="";else{if(s=`${a[a.length-1]}/`,!(s in this.keyToGDEntity))throw Error(`parent of ${e}: ${s} is not created before??`);o=this.keyToGDEntity[s].id}const l=e.split("/").pop();if(t.byteLength<=5242880){const a=new FormData,d={name:l,modifiedTime:Vp(i,!0),createdTime:Vp(n,!0),parents:[o]};a.append("metadata",new Blob([JSON.stringify(d)],{type:"application/json; charset=UTF-8"})),a.append("media",new Blob([t],{type:r}));const c=yield fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&fields=kind,fileExtension,md5Checksum,mimeType,parents,size,spaces,id,name,trashed,createdTime,modifiedTime,quotaBytesUsed,originalFilename,fullFileExtension,sha1Checksum,sha256Checksum",{method:"POST",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`},body:a});if(200!==c.status&&201!==c.status)throw Error(`create file ${e} failed! meta=${JSON.stringify(d)}`);const u=yield c.json();console.debug(`upload ${e} with ${JSON.stringify(d)}, res2=${JSON.stringify(u)}`);const p=Th(u,o,s);return this.keyToGDEntity[e]=p,p}{const a={name:l,modifiedTime:Vp(i,!0),createdTime:Vp(n,!0),parents:[o]},d=JSON.stringify(a),c={Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Type":"application/json","Content-Length":`${d.length}`,"X-Upload-Content-Type":r,"X-Upload-Content-Length":`${t.byteLength}`},u=yield fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=resumable&fields=kind,fileExtension,md5Checksum,mimeType,parents,size,spaces,id,name,trashed,createdTime,modifiedTime,quotaBytesUsed,originalFilename,fullFileExtension,sha1Checksum,sha256Checksum",{method:"POST",headers:c,body:d});if(200!==u.status)throw Error(`create resumable file ${e} failed! meta=${JSON.stringify(a)}, header=${JSON.stringify(c)}`);const p=u.headers.get("Location");if(null===p||!p.startsWith("http"))throw Error(`create resumable file ${e} failed! meta=${JSON.stringify(a)}, header=${JSON.stringify(c)}`);console.debug(`key=${e}, uploadLocaltion=${p}`);const h=5242880,f=th(t.byteLength,h);let m;for(const{start:r,end:i}of f){console.debug(`key=${e}, start upload chunk ${r}-${i}/${t.byteLength}`);const n=yield fetch(p,{method:"PUT",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`,"Content-Length":""+(i-r+1),"Content-Range":`bytes ${r}-${i}/${t.byteLength}`},body:t.slice(r,i+1)});if(n.status>=400&&n.status<=599)throw Error(`create resumable file ${e} failed! meta=${JSON.stringify(a)}, header=${JSON.stringify(c)}`);if(200===n.status||201===n.status){const t=yield n.json();console.debug(`upload ${e} with ${JSON.stringify(a)}, res2=${JSON.stringify(t)}`),void 0===t.id||null===t.id||""===t.id||(m=Th(t,o,s),this.keyToGDEntity[e]=m)}}if(void 0===m)throw Error(`something goes wrong while uploading large file ${e}`);return m}}))}readFile(e){return r(this,void 0,void 0,(function*(){var t;if(e.endsWith("/"))throw Error(`you should not call readFile on ${e}`);yield this._init();const r=null===(t=this.keyToGDEntity[e])||void 0===t?void 0:t.id;if(void 0===r)throw Error(`no fileID found for key=${e}`);const i=yield fetch(`https://www.googleapis.com/drive/v3/files/${r}?alt=media`,{method:"GET",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`}});if(200!==i.status)throw Error(`cannot download ${e} using fileID=${r}`);return yield i.arrayBuffer()}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){var t;yield this._init();const r=null===(t=this.keyToGDEntity[e])||void 0===t?void 0:t.id;if(void 0===r)throw Error(`no fileID found for key=${e}`);if(200!==(yield fetch(`https://www.googleapis.com/drive/v3/files/${r}`,{method:"PATCH",headers:{Authorization:`Bearer ${yield this._getAccessToken()}`},body:JSON.stringify({trashed:!0})})).status)throw Error(`cannot rm ${e} using fileID=${r}`)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){if(200===(yield fetch(`https://oauth2.googleapis.com/revoke?token=${this._getAccessToken()}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}})).status)return!0;throw Error("cannot revoke")}))}allowEmptyFile(){return!0}}const Ch={"Content-Type":"application/json"},Ih=/\{[^{}]+\}/g;class Ah extends Request{constructor(e,t){super(e,t);for(const e in t)e in this||(this[e]=t[e])}}function Fh(e){let{baseUrl:t="",fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:n,headers:o,...s}={...e};t.endsWith("/")&&(t=t.substring(0,t.length-1)),o=zh(Ch,o);const a=[];async function l(e,l){const{fetch:d=r,headers:c,params:u={},parseAs:p="json",querySerializer:h,bodySerializer:f=n??Oh,...m}=l||{};let g="function"==typeof i?i:Ph(i);h&&(g="function"==typeof h?h:Ph({..."object"==typeof i?i:{},...h}));const y={redirect:"follow",...s,...m,headers:zh(o,c,u.header)};let v,b;y.body&&(y.body=f(y.body),y.body instanceof FormData&&y.headers.delete("Content-Type"));let w=new Ah(function(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=function(e,t){let r=e;for(const i of e.match(Ih)??[]){let e=i.substring(1,i.length-1),n=!1,o="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(o="label",e=e.substring(1)):e.startsWith(";")&&(o="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const s=t[e];Array.isArray(s)?r=r.replace(i,Rh(e,s,{style:o,explode:n})):r="object"!=typeof s?"matrix"!==o?r.replace(i,"label"===o?`.${encodeURIComponent(s)}`:encodeURIComponent(s)):r.replace(i,`;${Mh(e,s)}`):r.replace(i,Dh(e,s,{style:o,explode:n}))}return r}(r,t.params.path));let i=t.querySerializer(t.params.query??{});i.startsWith("?")&&(i=i.substring(1));i&&(r+=`?${i}`);return r}(e,{baseUrl:t,params:u,querySerializer:g}),y);if(a.length){v=Math.random().toString(36).slice(2,11),b=Object.freeze({baseUrl:t,fetch:d,parseAs:p,querySerializer:g,bodySerializer:f});for(const t of a)if(t&&"object"==typeof t&&"function"==typeof t.onRequest){const r=await t.onRequest({request:w,schemaPath:e,params:u,options:b,id:v});if(r){if(!(r instanceof Request))throw new Error("onRequest: must return new Request() when modifying the request");w=r}}}let _=await d(w);if(a.length)for(let t=a.length-1;t>=0;t--){const r=a[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){const t=await r.onResponse({request:w,response:_,schemaPath:e,params:u,options:b,id:v});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");_=t}}}if(204===_.status||"0"===_.headers.get("Content-Length"))return _.ok?{data:{},response:_}:{error:{},response:_};if(_.ok)return"stream"===p?{data:_.body,response:_}:{data:await _[p](),response:_};let x=await _.text();try{x=JSON.parse(x)}catch{}return{error:x,response:_}}return{GET:(e,t)=>l(e,{...t,method:"GET"}),PUT:(e,t)=>l(e,{...t,method:"PUT"}),POST:(e,t)=>l(e,{...t,method:"POST"}),DELETE:(e,t)=>l(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>l(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>l(e,{...t,method:"HEAD"}),PATCH:(e,t)=>l(e,{...t,method:"PATCH"}),TRACE:(e,t)=>l(e,{...t,method:"TRACE"}),use(...e){for(const t of e)if(t){if("object"!=typeof t||!("onRequest"in t)&&!("onResponse"in t))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");a.push(t)}},eject(...e){for(const t of e){const e=a.indexOf(t);-1!==e&&a.splice(e,1)}}}}function Mh(e,t,r){if(null==t)return"";if("object"==typeof t)throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${!0===r?.allowReserved?t:encodeURIComponent(t)}`}function Dh(e,t,r){if(!t||"object"!=typeof t)return"";const i=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(const e in t)i.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));const n=i.join(",");switch(r.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(const n in t){const o="deepObject"===r.style?`${e}[${n}]`:n;i.push(Mh(o,t[n],r))}const o=i.join(n);return"label"===r.style||"matrix"===r.style?`${n}${o}`:o}function Rh(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){const i={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",n=(!0===r.allowReserved?t:t.map((e=>encodeURIComponent(e)))).join(i);switch(r.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}const i={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(const i of t)"simple"===r.style||"label"===r.style?n.push(!0===r.allowReserved?i:encodeURIComponent(i)):n.push(Mh(e,i,r));return"label"===r.style||"matrix"===r.style?`${i}${n.join(i)}`:n.join(i)}function Ph(e){return function(t){const r=[];if(t&&"object"==typeof t)for(const i in t){const n=t[i];null!=n&&(Array.isArray(n)?r.push(Rh(i,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1})):"object"!=typeof n?r.push(Mh(i,n,e)):r.push(Dh(i,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1})))}return r.join("&")}}function Oh(e){return e instanceof FormData?e:JSON.stringify(e)}function zh(...e){const t=new Headers;for(const r of e){if(!r||"object"!=typeof r)continue;const e=r instanceof Headers?r.entries():Object.entries(r);for(const[r,i]of e)if(null===i)t.delete(r);else if(Array.isArray(i))for(const e of i)t.append(r,e);else void 0!==i&&t.set(r,i)}return t}const Nh={accessToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,refreshToken:"",remoteBaseDir:"",credentialsShouldBeDeletedAtTimeMs:0,scope:"",api:"https://app.koofr.net",mountID:"",kind:"koofr"},qh=(e,t)=>{if("/"===e||""===e)throw Error(`do not know how to deal with path: ${e}`);if(!e.startsWith("/"))throw Error(`path returned by koofr should starts with slash: ${e}`);if("file"===t)return e.slice(1);if("dir"===t)return`${e.slice(1)}/`;throw Error(`do not know how to deal with path and type: ${e}, ${t}`)},Uh=(e,t)=>{let r=e;return"/"===e||""===e?r=`/${t}`:e.startsWith("/")?(console.warn(`why the path ${e} starts with '/'? but we just go on.`),r=`/${t}${e}`):r=`/${t}/${e}`,r.endsWith("/")&&(r=r.slice(0,r.length-1)),r},Lh=e=>{var t,r,i,n;if("error"===e.type)throw Error(`cannot understand ${JSON.stringify(e)}`);const o=qh(null!==(t=e.path)&&void 0!==t?t:"/",null===(r=e.file)||void 0===r?void 0:r.type);if("dir"===(null===(i=e.file)||void 0===i?void 0:i.type)||"file"===(null===(n=e.file)||void 0===n?void 0:n.type))return{key:o,keyRaw:o,mtimeCli:e.file.modified,mtimeSvr:e.file.modified,size:e.file.size,sizeRaw:e.file.size,hash:e.file.hash};throw Error(`cannot understand ${JSON.stringify(e)}`)},jh=(e,t)=>{const r=qh(`${t}/${e.name}`,e.type);if("dir"===e.type||"file"===e.type)return{key:r,keyRaw:r,mtimeCli:e.modified,mtimeSvr:e.modified,size:e.size,sizeRaw:e.size,hash:e.hash};throw Error(`cannot understand ${JSON.stringify(e)}`)},Hh=(e,t)=>{const i={onRequest(i){return r(this,arguments,void 0,(function*({request:i}){const n=yield(()=>r(this,void 0,void 0,(function*(){if(""===e.refreshToken)throw Error("The user has not manually auth yet.");const i=Date.now();if(e.accessTokenExpiresAtTimeMs>i)return e.accessToken;const n=yield(o=e.api,s=e.refreshToken,r(void 0,void 0,void 0,(function*(){console.debug("refreshing token");const e=yield fetch(`${o}/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:J,client_secret:Y,grant_type:"refresh_token",refresh_token:s}).toString()});if(200===e.status){const t=yield e.json();return console.debug("new token obtained"),t}{const t=yield e.json();throw Error(`cannot refresh an access token: ${JSON.stringify(t)}`)}})));var o,s;return e.accessToken=n.access_token,e.accessTokenExpiresInMs=1e3*n.expires_in,e.accessTokenExpiresAtTimeMs=i+1e3*n.expires_in-12e4,yield t(),console.info("Koofr accessToken updated"),e.accessToken})))();return i.headers.set("Authorization",`Bearer ${n}`),i}))}};return i};class $h extends Mp{constructor(e,t,r){super(),this.kind="koofr",this.koofrConfig=e,this.remoteBaseDir=this.koofrConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.placeID=this.koofrConfig.mountID;const i=Fh({baseUrl:this.koofrConfig.api});i.use(Hh(this.koofrConfig,r)),this.client=i}_init(){return r(this,void 0,void 0,(function*(){var e;if(""===this.koofrConfig.refreshToken)throw Error("You have not auth yet!");if(void 0===this.placeID||""===this.placeID){const{data:e,error:t}=yield this.client.GET("/api/v2.1/places"),r=null==e?void 0:e.places.filter((e=>e.isPrimary))[0].id;if(this.placeID=null!=r?r:"",""===this.placeID)throw Error("cannot find primary placeID")}if(this.vaultFolderExists);else{const{data:t,error:r}=yield this.client.GET("/api/v2.1/mounts/{mountId}/files/list",{params:{query:{path:"/"},path:{mountId:this.placeID}}}),i=null==t?void 0:t.files.filter((e=>e.name===this.remoteBaseDir));if((null!==(e=null==i?void 0:i.length)&&void 0!==e?e:0)>0)this.vaultFolderExists=!0;else{const{data:e,error:t}=yield this.client.POST("/api/v2.1/mounts/{mountId}/files/folder",{params:{query:{path:"/"},path:{mountId:this.placeID}},body:{name:this.remoteBaseDir}});if(void 0===e)throw Error(JSON.stringify(t));this.vaultFolderExists=!0}}}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const{data:e,error:t}=yield this.client.GET("/content/api/v2.1/mounts/{mountId}/files/listrecursive",{params:{query:{path:this.remoteBaseDir},path:{mountId:this.placeID}},parseAs:"text"});if(void 0!==t)throw Error(JSON.stringify(t));const r=JSON.parse(`[${e.trim().split("\n").join(",")}]`).filter((e=>"/"!==e.path)).map(Lh);return r}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();const{data:e,error:t}=yield this.client.GET("/api/v2.1/mounts/{mountId}/files/list",{params:{query:{path:this.remoteBaseDir},path:{mountId:this.placeID}}});if(void 0!==t)throw Error(JSON.stringify(t));const r=e.files.map((e=>jh(e,"")));return r}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const{data:t,error:r}=yield this.client.GET("/api/v2.1/mounts/{mountId}/files/info",{params:{query:{path:Uh(e,this.remoteBaseDir)},path:{mountId:this.placeID}}});if(void 0!==r)throw Error(JSON.stringify(r));return jh(t,Uh(Gp(e),this.remoteBaseDir))}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){yield this._init();const t=Gp(e),r=e.slice(0,-1).split("/").pop(),{data:i,error:n}=yield this.client.POST("/api/v2.1/mounts/{mountId}/files/folder",{params:{query:{path:Uh(t,this.remoteBaseDir)},path:{mountId:this.placeID}},body:{name:r}});if(void 0!==n)throw Error(JSON.stringify(n));return this.stat(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){yield this._init();const r=e.split("/").pop(),{data:n,error:o}=yield this.client.POST("/content/api/v2.1/mounts/{mountId}/files/put",{params:{query:{path:Uh(Gp(e),this.remoteBaseDir),filename:r,info:!0,overwrite:!0,autorename:!1,modified:i},path:{mountId:this.placeID}},body:t,bodySerializer:e=>e});if(void 0!==o)throw Error(JSON.stringify(o));return jh(n,Uh(Gp(e),this.remoteBaseDir))}))}readFile(e){return r(this,void 0,void 0,(function*(){yield this._init();const{data:t,error:r}=yield this.client.GET("/content/api/v2.1/mounts/{mountId}/files/get",{params:{query:{path:Uh(e,this.remoteBaseDir),force:!0},path:{mountId:this.placeID}},parseAs:"arrayBuffer"});if(void 0!==r)throw Error(JSON.stringify(r));return t}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){yield this._init();const{data:t,error:r}=yield this.client.DELETE("/api/v2.1/mounts/{mountId}/files/remove",{params:{query:{path:Uh(e,this.remoteBaseDir),force:!0},path:{mountId:this.placeID}}});if(void 0!==r)throw Error(JSON.stringify(r))}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Gh={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Wh=200,Kh=200,Vh=299,Jh=302,Yh=400,Qh=499,Zh=500,Xh=500,ef=599,tf=[Gh.OPENID_SCOPE,Gh.PROFILE_SCOPE,Gh.OFFLINE_ACCESS_SCOPE],rf=[...tf,Gh.EMAIL_SCOPE],nf="Content-Type",of="Retry-After",sf="X-AnchorMailbox",af="x-ms-request-id",lf="x-ms-httpver",df={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},cf="access_token",uf="xms_cc",pf={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},hf={PLAIN:"plain",S256:"S256"},ff={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},mf="authorization_code",gf="password",yf="refresh_token",vf="device_code",bf="MSSTS",wf="ADFS",_f="Generic",xf="-",Sf=".",kf={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Ef="appmetadata",Tf="1",Bf="authority-metadata",Cf=86400,If="config",Af="cache",Ff="network",Mf="hardcoded_values",Df={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Rf={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Pf=60,Of=3600,zf="throttling",Nf="retry-after, h429",qf="invalid_grant",Uf="client_mismatch",Lf="username",jf="password",Hf=200,$f=400,Gf="1",Wf="3",Kf="4",Vf="2",Jf="4",Yf="5",Qf="0",Zf="1",Xf="2",em="3",tm="4",rm="AZURE_POD_IDENTITY_AUTHORITY_HOST",im="IDENTITY_ENDPOINT",nm="IMDS_ENDPOINT",om="MSI_ENDPOINT",sm="user-assigned-client-id",am="user-assigned-resource-id",lm="user-assigned-object-id",dm="get",cm="post",um={SUCCESS:Wh,SUCCESS_RANGE_START:Kh,SUCCESS_RANGE_END:Vh,SERVER_ERROR:Zh},pm="sha256",hm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",fm="msal.js.node",mm="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",gm="authorization_pending",ym="http://",vm="localhost",bm=62,wm=371,_m=671,xm=871,Sm=872,km="RS256",Em="PS256",Tm="x5t#S256",Bm="x5t",Cm="x5c",Im="aud",Am="exp",Fm="iss",Mm="sub",Dm="nbf",Rm="jti",Pm=100,Om=5e3,zm="unexpected_error",Nm="post_request_failed",qm={[zm]:"Unexpected error in authentication.",[Nm]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class Um extends Error{constructor(e,t,r){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Um.prototype),this.errorCode=e||Gh.EMPTY_STRING,this.errorMessage=t||Gh.EMPTY_STRING,this.subError=r||Gh.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Lm(e){const{skus:t,libraryName:r,libraryVersion:i,extensionName:n,extensionVersion:o}=e,s=new Map([[0,[r,i]],[2,[n,o]]]);let a=[];if(t?.length){if(a=t.split(","),a.length<4)return t}else a=Array.from({length:4},(()=>"|"));return s.forEach(((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:r,skuName:i,skuVersion:n}=e;if(r>=t.length)return;t[r]=[i,n].join("|")}({skuArr:a,index:t,skuName:e[0],skuVersion:e[1]})})),a.join(",")}class jm{constructor(e,t){this.cacheOutcome=Qf,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Gh.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Gh.EMPTY_STRING,this.telemetryCacheKey=Df.CACHE_KEY+xf+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Df.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r?.length&&t.push(`broker_error=${r}`);const i=t.join(Df.VALUE_SEPARATOR),n=[e,this.getRegionDiscoveryFields()].join(Df.VALUE_SEPARATOR);return[Df.SCHEMA_VERSION,n,i].join(Df.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=jm.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(Df.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(Df.VALUE_SEPARATOR),n=e.errors.length,o=[n,t<n?Df.OVERFLOW_TRUE:Df.OVERFLOW_FALSE].join(Df.VALUE_SEPARATOR);return[Df.SCHEMA_VERSION,e.cacheHits,r,i,o].join(Df.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Df.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Um?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Df.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=jm.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{const r={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}}static maxErrorsToSend(e){let t,r=0,i=0;const n=e.errors.length;for(t=0;t<n;t++){const n=e.failedRequests[2*t]||Gh.EMPTY_STRING,o=e.failedRequests[2*t+1]||Gh.EMPTY_STRING,s=e.errors[t]||Gh.EMPTY_STRING;if(i+=n.toString().length+o.toString().length+s.length+3,!(i<Df.MAX_LAST_HEADER_BYTES))break;r+=1}return r}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||Gh.EMPTY_STRING),e.push(this.regionSource||Gh.EMPTY_STRING),e.push(this.regionOutcome||Gh.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return Lm(e)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Hm="client_id",$m="response_type",Gm="token_type",Wm="req_cnf",Km="return_spa_code",Vm="x-client-xtra-sku";
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Jm extends Um{constructor(e,t,r,i,n){super(e,t,r),this.name="ServerError",this.errorNo=i,this.status=n,Object.setPrototypeOf(this,Jm.prototype)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
var Ym;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(Ym||(Ym={}));class Qm{constructor(e,t,r){this.level=Ym.Info;const i=e||Qm.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level="number"==typeof i.logLevel?i.logLevel:Ym.Info,this.correlationId=i.correlationId||Gh.EMPTY_STRING,this.packageName=t||Gh.EMPTY_STRING,this.packageVersion=r||Gh.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info}}clone(e,t,r){return new Qm({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const r=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Ym[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,r,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:Ym.Error,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Ym.Error,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Ym.Warning,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Ym.Warning,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Ym.Info,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Ym.Info,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Ym.Verbose,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Ym.Verbose,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Ym.Trace,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Ym.Trace,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Zm=0,Xm=1,eg=2,tg=3;
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const rg="redirect_uri_empty",ig="claims_request_parsing_error",ng="authority_uri_insecure",og="url_parse_error",sg="empty_url_error",ag="empty_input_scopes_error",lg="invalid_prompt_value",dg="invalid_claims",cg="token_request_empty",ug="logout_request_empty",pg="invalid_code_challenge_method",hg="pkce_params_missing",fg="invalid_cloud_discovery_metadata",mg="invalid_authority_metadata",gg="untrusted_authority",yg="missing_ssh_jwk",vg="missing_ssh_kid",bg="missing_nonce_authentication_header",wg="invalid_authentication_header",_g="cannot_set_OIDCOptions",xg="cannot_allow_native_broker",Sg="authority_mismatch",kg={[rg]:"A redirect URI is required for all calls, and none has been set.",[ig]:"Could not parse the given claims request object.",[ng]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[og]:"URL could not be parsed into appropriate segments.",[sg]:"URL was empty or null.",[ag]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[lg]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[dg]:"Given claims parameter must be a stringified JSON object.",[cg]:"Token request was empty and not found in cache.",[ug]:"The logout request was null or undefined.",[pg]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[hg]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[fg]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[mg]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[gg]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[yg]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[vg]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[bg]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[wg]:"Invalid authentication header provided",[_g]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[xg]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Sg]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class Eg extends Um{constructor(e){super(e,kg[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Eg.prototype)}}function Tg(e){return new Eg(e)}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Bg{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),i=e=>decodeURIComponent(e.replace(/\+/g," "));return r.forEach((e=>{if(e.trim()){const[r,n]=e.split(/=(.+)/g,2);r&&n&&(t[i(r)]=i(n))}})),t}static trimArrayEntries(e){return e.map((e=>e.trim()))}static removeEmptyStringsFromArray(e){return e.filter((e=>!!e))}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Cg="client_info_decoding_error",Ig="client_info_empty_error",Ag="token_parsing_error",Fg="null_or_empty_token",Mg="endpoints_resolution_error",Dg="network_error",Rg="openid_config_error",Pg="hash_not_deserialized",Og="invalid_state",zg="state_mismatch",Ng="state_not_found",qg="nonce_mismatch",Ug="auth_time_not_found",Lg="max_age_transpired",jg="multiple_matching_tokens",Hg="multiple_matching_accounts",$g="multiple_matching_appMetadata",Gg="request_cannot_be_made",Wg="cannot_remove_empty_scope",Kg="cannot_append_scopeset",Vg="empty_input_scopeset",Jg="device_code_polling_cancelled",Yg="device_code_expired",Qg="device_code_unknown_error",Zg="no_account_in_silent_request",Xg="invalid_cache_record",ey="invalid_cache_environment",ty="no_account_found",ry="no_crypto_object",iy="unexpected_credential_type",ny="invalid_assertion",oy="invalid_client_credential",sy="token_refresh_required",ay="user_timeout_reached",ly="token_claims_cnf_required_for_signedjwt",dy="authorization_code_missing_from_server_response",cy="binding_key_not_removed",uy="end_session_endpoint_not_supported",py="key_id_missing",hy="no_network_connectivity",fy="user_canceled",my="missing_tenant_id_error",gy="method_not_implemented",yy="nested_app_auth_bridge_disabled",vy={[Cg]:"The client info could not be parsed/decoded correctly",[Ig]:"The client info was empty",[Ag]:"Token cannot be parsed",[Fg]:"The token is null or empty",[Mg]:"Endpoints cannot be resolved",[Dg]:"Network request failed",[Rg]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Pg]:"The hash parameters could not be deserialized",[Og]:"State was not the expected format",[zg]:"State mismatch error",[Ng]:"State not found",[qg]:"Nonce mismatch error",[Ug]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Lg]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[jg]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Hg]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[$g]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Gg]:"Token request cannot be made without authorization code or refresh token.",[Wg]:"Cannot remove null or empty scope from ScopeSet",[Kg]:"Cannot append ScopeSet",[Vg]:"Empty input ScopeSet cannot be processed",[Jg]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Yg]:"Device code is expired.",[Qg]:"Device code stopped polling for unknown reasons.",[Zg]:"Please pass an account object, silent flow is not supported without account information",[Xg]:"Cache record object was null or undefined.",[ey]:"Invalid environment when attempting to create cache entry",[ty]:"No account found in cache for given key.",[ry]:"No crypto object detected.",[iy]:"Unexpected credential type.",[ny]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[oy]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[sy]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[ay]:"User defined timeout for device code polling reached",[ly]:"Cannot generate a POP jwt if the token_claims are not populated",[dy]:"Server response does not contain an authorization code to proceed",[cy]:"Could not remove the credential's binding key from storage.",[uy]:"The provided authority does not support logout",[py]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[hy]:"No network connectivity. Check your internet connection.",[fy]:"User cancelled the flow.",[my]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[gy]:"This method has not been implemented",[yy]:"The nested app auth bridge is disabled"};class by extends Um{constructor(e,t){super(e,t?`${vy[e]}: ${t}`:vy[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,by.prototype)}}function wy(e,t){return new by(e,t)}function _y(e){if(!e||e.indexOf("=")<0)return null;try{const t=
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.error||r.error_description||r.state)return r}catch(e){throw wy(Pg)}return null}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class xy{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Tg(sg);e.includes("#")||(this._urlString=xy.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Bg.endsWith(t,"?")?t=t.slice(0,-1):Bg.endsWith(t,"?/")&&(t=t.slice(0,-2)),Bg.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Tg(og)}if(!e.HostNameAndPort||!e.PathSegments)throw Tg(og);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Tg(ng)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return xy.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return!e||0===r.length||r[0]!==df.COMMON&&r[0]!==df.ORGANIZATIONS||(r[0]=e),xy.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Tg(og);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=r.AbsolutePath.split("/");return i=i.filter((e=>e&&e.length>0)),r.PathSegments=i,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw Tg(og);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===Gh.FORWARD_SLASH){const r=new xy(t).getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new xy(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!_y(e)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Sy={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},ky={tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Ey=new Set;function Ty(e,t,r,i){if(i?.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const n=By(t,e);if(n)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),n.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function By(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(i.aliases.includes(t))return i}return null}ky.metadata.forEach((e=>{e.aliases.forEach((e=>{Ey.add(e)}))}));
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Cy="AAD",Iy="OIDC",Ay="none";
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Fy="refreshTokenClientExecutePostToTokenEndpoint",My="authorizationCodeClientExecutePostToTokenEndpoint",Dy="refreshTokenClientExecuteTokenRequest",Ry="refreshTokenClientAcquireToken",Py="refreshTokenClientAcquireTokenWithCachedRefreshToken",Oy="refreshTokenClientAcquireTokenByRefreshToken",zy="refreshTokenClientCreateTokenRequestBody",Ny="silentFlowClientAcquireCachedToken",qy="silentFlowClientGenerateResultFromCacheRecord",Uy="getAuthCodeUrl",Ly="updateTokenEndpointAuthority",jy="authClientAcquireToken",Hy="authClientExecuteTokenRequest",$y="authClientCreateTokenRequestBody",Gy="authClientCreateQueryString",Wy="popTokenGenerateCnf",Ky="popTokenGenerateKid",Vy="handleServerTokenResponse",Jy="authorityFactoryCreateDiscoveredInstance",Yy="authorityResolveEndpointsAsync",Qy="authorityGetCloudDiscoveryMetadataFromNetwork",Zy="authorityUpdateCloudDiscoveryMetadata",Xy="authorityGetEndpointMetadataFromNetwork",ev="authorityUpdateEndpointMetadata",tv="authorityUpdateMetadataWithRegionalInformation",rv="regionDiscoveryDetectRegion",iv="regionDiscoveryGetRegionFromIMDS",nv="regionDiscoveryGetCurrentVersion",ov="cacheManagerGetRefreshToken",sv=(new Map([["acquireTokenByCode","ATByCode"],["acquireTokenByRefreshToken","ATByRT"],["acquireTokenSilent","ATS"],["acquireTokenSilentAsync","ATSAsync"],["acquireTokenPopup","ATPopup"],["acquireTokenRedirect","ATRedirect"],["cryptoOptsGetPublicKeyThumbprint","CryptoGetPKThumb"],["cryptoOptsSignJwt","CryptoSignJwt"],["silentCacheClientAcquireToken","SltCacheClientAT"],["silentIframeClientAcquireToken","SltIframeClientAT"],["silentRefreshClientAcquireToken","SltRClientAT"],["ssoSilent","SsoSlt"],["standardInteractionClientGetDiscoveredAuthority","StdIntClientGetDiscAuth"],["fetchAccountIdWithNativeBroker","FetchAccIdWithNtvBroker"],["nativeInteractionClientAcquireToken","NtvIntClientAT"],["baseClientCreateTokenRequestHeaders","BaseClientCreateTReqHead"],[Fy,"RTClientExecPost"],[My,"AuthCodeClientExecPost"],["brokerHandshake","BrokerHandshake"],["acquireTokenByRefreshTokenInBroker","ATByRTInBroker"],["acquireTokenByBroker","ATByBroker"],[Dy,"RTClientExecTReq"],[Ry,"RTClientAT"],[Py,"RTClientATWithCachedRT"],[Oy,"RTClientATByRT"],[zy,"RTClientCreateTReqBody"],["acquireTokenFromCache","ATFromCache"],[Ny,"SltFlowClientATCached"],[qy,"SltFlowClientGenResFromCache"],["acquireTokenBySilentIframe","ATBySltIframe"],["initializeBaseRequest","InitBaseReq"],["initializeSilentRequest","InitSltReq"],["initializeClientApplication","InitClientApplication"],["silentIframeClientTokenHelper","SIClientTHelper"],["silentHandlerInitiateAuthRequest","SHandlerInitAuthReq"],["silentHandlerMonitorIframeForHash","SltHandlerMonitorIframeForHash"],["silentHandlerLoadFrame","SHandlerLoadFrame"],["silentHandlerLoadFrameSync","SHandlerLoadFrameSync"],["standardInteractionClientCreateAuthCodeClient","StdIntClientCreateAuthCodeClient"],["standardInteractionClientGetClientConfiguration","StdIntClientGetClientConf"],["standardInteractionClientInitializeAuthorizationRequest","StdIntClientInitAuthReq"],["standardInteractionClientInitializeAuthorizationCodeRequest","StdIntClientInitAuthCodeReq"],[Uy,"GetAuthCodeUrl"],["handleCodeResponseFromServer","HandleCodeResFromServer"],["handleCodeResponse","HandleCodeResp"],[Ly,"UpdTEndpointAuth"],[jy,"AuthClientAT"],[Hy,"AuthClientExecTReq"],[$y,"AuthClientCreateTReqBody"],[Gy,"AuthClientCreateQueryStr"],[Wy,"PopTGenCnf"],[Ky,"PopTGenKid"],[Vy,"HandleServerTRes"],["deserializeResponse","DeserializeRes"],[Jy,"AuthFactCreateDiscInst"],[Yy,"AuthResolveEndpointsAsync"],["authorityResolveEndpointsFromLocalSources","AuthResolveEndpointsFromLocal"],[Qy,"AuthGetCDMetaFromNet"],[Zy,"AuthUpdCDMeta"],[Xy,"AuthUpdCDMetaFromNet"],[ev,"AuthUpdEndpointMeta"],[tv,"AuthUpdMetaWithRegInfo"],[rv,"RegDiscDetectReg"],[iv,"RegDiscGetRegFromIMDS"],[nv,"RegDiscGetCurrentVer"],["acquireTokenByCodeAsync","ATByCodeAsync"],["getEndpointMetadataFromNetwork","GetEndpointMetaFromNet"],["getCloudDiscoveryMetadataFromNetworkMeasurement","GetCDMetaFromNet"],["handleRedirectPromise","HandleRedirectPromise"],["handleNativeRedirectPromise","HandleNtvRedirectPromise"],["updateCloudDiscoveryMetadataMeasurement","UpdateCDMeta"],["usernamePasswordClientAcquireToken","UserPassClientAT"],["nativeMessageHandlerHandshake","NtvMsgHandlerHandshake"],["nativeGenerateAuthResult","NtvGenAuthRes"],["removeHiddenIframe","RemoveHiddenIframe"],["clearTokensAndKeysWithClaims","ClearTAndKeysWithClaims"],[ov,"CacheManagerGetRT"],["generatePkceCodes","GenPkceCodes"],["generateCodeVerifier","GenCodeVerifier"],["generateCodeChallengeFromVerifier","GenCodeChallengeFromVerifier"],["sha256Digest","Sha256Digest"],["getRandomValues","GetRandomValues"]]),new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status","multiMatchedAT","multiMatchedID","multiMatchedRT"]),(e,t,r,i,n)=>(...o)=>{r.trace(`Executing function ${t}`);const s=i?.startMeasurement(t,n);if(n){const e=t+"CallCount";i?.incrementFields({[e]:1},n)}return i?.setPreQueueTime(t,n),e(...o).then((e=>(r.trace(`Returning result from ${t}`),s?.end({success:!0}),e))).catch((e=>{r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(e))}catch(e){r.trace("Unable to print error message.")}throw s?.end({success:!1},e),e}))});
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class av{constructor(e,t,r,i){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=i}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(rv,this.correlationId);let r=e;if(r)t.region_source=Wf;else{const e=av.IMDS_OPTIONS;try{const i=await sv(this.getRegionFromIMDS.bind(this),iv,this.logger,this.performanceClient,this.correlationId)(Gh.IMDS_VERSION,e);if(i.status===Hf&&(r=i.body,t.region_source=Kf),i.status===$f){const i=await sv(this.getCurrentVersion.bind(this),nv,this.logger,this.performanceClient,this.correlationId)(e);if(!i)return t.region_source=Gf,null;const n=await sv(this.getRegionFromIMDS.bind(this),iv,this.logger,this.performanceClient,this.correlationId)(i,e);n.status===Hf&&(r=n.body,t.region_source=Kf)}}catch(e){return t.region_source=Gf,null}}return r||(t.region_source=Gf),r||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(iv,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Gh.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Gh.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(nv,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Gh.IMDS_ENDPOINT}?format=json`,e);return t.status===$f&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function lv(e,t){const r=function(e){if(!e)throw wy(Fg);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw wy(Ag);return t[2]}(e);try{const e=t(r);return JSON.parse(e)}catch(e){throw wy(Ag)}}function dv(e,t){if(0===t||Date.now()-3e5>e+t)throw wy(Lg)}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function cv(){return Math.round((new Date).getTime()/1e3)}function uv(e,t){const r=Number(e)||0;return cv()+t>r}function pv(e,t){return new Promise((r=>setTimeout((()=>r(t)),e)))}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function hv(e){return[vv(e),bv(e),wv(e),_v(e),xv(e)].join(xf).toLowerCase()}function fv(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function mv(e){return!!e&&(fv(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===kf.ACCESS_TOKEN||e.credentialType===kf.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function gv(e){return!!e&&(fv(e)&&e.hasOwnProperty("realm")&&e.credentialType===kf.ID_TOKEN)}function yv(e){return!!e&&(fv(e)&&e.credentialType===kf.REFRESH_TOKEN)}function vv(e){return[e.homeAccountId,e.environment].join(xf).toLowerCase()}function bv(e){const t=e.credentialType===kf.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(xf).toLowerCase()}function wv(e){return(e.target||"").toLowerCase()}function _v(e){return(e.requestedClaimsHash||"").toLowerCase()}function xv(e){return e.tokenType&&e.tokenType.toLowerCase()!==Rf.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function Sv(e,t){return!!t&&(0===e.indexOf(Ef)&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("environment"))}function kv(){return cv()+Cf}function Ev(e,t,r){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=r,e.jwks_uri=t.jwks_uri}function Tv(e,t,r){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=r}function Bv(e){return e.expiresAt<=cv()}av.IMDS_OPTIONS={headers:{Metadata:"true"}};
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Cv{constructor(e,t,r,i,n,o,s,a){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=n,this.performanceClient=s,this.correlationId=o,this.managedIdentity=a||!1,this.regionDiscovery=new av(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Gh.CIAM_AUTH_URL))return tg;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Gh.ADFS:return Xm;case Gh.DSTS:return eg}return Zm}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new xy(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw wy(Mg)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw wy(Mg)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw wy(Mg)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw wy(uy);return this.replacePath(this.metadata.end_session_endpoint)}throw wy(Mg)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw wy(Mg)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw wy(Mg)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Cv.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Zm&&this.protocolMode===Cy}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new xy(this.metadata.canonical_authority).getUrlComponents(),i=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,n)=>{let o=i[n];if(0===n&&this.canReplaceTenant(r)){const e=new xy(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];o!==e&&(this.logger.verbose(`Replacing tenant domain name ${o} with id ${e}`),o=e)}e!==o&&(t=t.replace(`/${o}/`,`/${e}/`))})),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Xm||this.protocolMode!==Cy&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Yy,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await sv(this.updateCloudDiscoveryMetadata.bind(this),Zy,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await sv(this.updateEndpointMetadata.bind(this),ev,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:kv(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==Af&&r?.source!==Af&&(e.expiresAt=kv(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(ev,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Mf&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Ev(e,await sv(this.updateMetadataWithRegionalInformation.bind(this),tv,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let r=await sv(this.getEndpointMetadataFromNetwork.bind(this),Xy,this.logger,this.performanceClient,this.correlationId)();if(r)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(r=await sv(this.updateMetadataWithRegionalInformation.bind(this),tv,this.logger,this.performanceClient,this.correlationId)(r)),Ev(e,r,!0),Ff;throw wy(Rg,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Ev(e,t,!1),{source:If};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return Ev(e,t,!1),{source:Mf,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const r=Bv(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Af}):(r&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new xy(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Tg(mg)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Xy,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const r=await this.networkInterface.sendGetRequestAsync(t,e),i=
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(r.body);return i?r.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Sy?Sy[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(tv,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Gh.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Vf,this.regionDiscoveryMetadata.region_used=t,Cv.replaceWithRegionalInformation(e,t);const r=await sv(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),rv,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(r)return this.regionDiscoveryMetadata.region_outcome=Jf,this.regionDiscoveryMetadata.region_used=r,Cv.replaceWithRegionalInformation(e,r);this.regionDiscoveryMetadata.region_outcome=Yf}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Zy,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await sv(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Qy,this.logger,this.performanceClient,this.correlationId)();if(r)return Tv(e,r,!0),Ff;throw Tg(gg)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Gh.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Gh.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Gh.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Tv(e,t,!1),If;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(r=this.hostnameAndPort,By(ky.metadata,r));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Tv(e,t,!1),Mf;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var r;const i=Bv(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),Af):(i&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===tg)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Cv.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=By(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Tg(fg)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Cv.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Qy,this.correlationId);const e=`${Gh.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let r=null;try{const i=await this.networkInterface.sendGetRequestAsync(e,t);let n,o;if(
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}(i.body))n=i.body,o=n.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${n.tenant_discovery_endpoint}`);else{if(!
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(i.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${i.status}`),n=i.body,n.error===Gh.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${n.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${n.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),o=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=By(o,this.hostnameAndPort)}catch(e){if(e instanceof Um)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=Cv.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter((e=>e&&xy.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==Ay){const e=t.tenant?t.tenant:Gh.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${e}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Gh.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw wy(Mg)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Ey.has(e)}static isPublicCloudAuthority(e){return Gh.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const i=new xy(e);i.validateAsUri();const n=i.getUrlComponents();let o=`${t}.${n.HostNameAndPort}`;this.isPublicCloudAuthority(n.HostNameAndPort)&&(o=`${t}.${Gh.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const s=xy.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:o}).urlString;return r?`${s}?${r}`:s}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=Cv.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Cv.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Cv.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const r=new xy(e).getUrlComponents();if(0===r.PathSegments.length&&r.HostNameAndPort.endsWith(Gh.CIAM_AUTH_URL)){t=`${t}${r.HostNameAndPort.split(".")[0]}${Gh.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function Iv(e){return e.endsWith(Gh.FORWARD_SLASH)?e:`${e}${Gh.FORWARD_SLASH}`}Cv.reservedTenantDomains=new Set(["{tenant}","{tenantid}",df.COMMON,df.CONSUMERS,df.ORGANIZATIONS]);
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Av={createNewGuid:()=>{throw wy(gy)},base64Decode:()=>{throw wy(gy)},base64Encode:()=>{throw wy(gy)},base64UrlEncode:()=>{throw wy(gy)},encodeKid:()=>{throw wy(gy)},async getPublicKeyThumbprint(){throw wy(gy)},async removeTokenBindingKey(){throw wy(gy)},async clearKeystore(){throw wy(gy)},async signJwt(){throw wy(gy)},async hashString(){throw wy(gy)}},Fv="@azure/msal-common",Mv="14.15.0";
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Dv{constructor(e){const t=e?Bg.trimArrayEntries([...e]):[],r=t?Bg.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach((e=>this.scopes.add(e)))}static fromString(e){const t=(e||Gh.EMPTY_STRING).split(" ");return new Dv(t)}static createSearchScopes(e){const t=new Dv(e);return t.containsOnlyOIDCScopes()?t.removeScope(Gh.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Tg(ag)}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new Dv(t);return!!e&&r.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every((e=>this.containsScope(e))))}containsOnlyOIDCScopes(){let e=0;return rf.forEach((t=>{this.containsScope(t)&&(e+=1)})),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach((e=>this.appendScope(e)))}catch(e){throw wy(Kg)}}removeScope(e){if(!e)throw wy(Wg);this.scopes.delete(e.trim())}removeOIDCScopes(){rf.forEach((e=>{this.scopes.delete(e)}))}unionScopeSets(e){if(!e)throw wy(Vg);const t=new Set;return e.scopes.forEach((e=>t.add(e.toLowerCase()))),this.scopes.forEach((e=>t.add(e.toLowerCase()))),t}intersectingScopeSets(e){if(!e)throw wy(Vg);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),i=this.getScopeCount();return t.size<i+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach((t=>e.push(t))),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return Gh.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function Rv(e,t){if(!e)throw wy(Ig);try{const r=t(e);return JSON.parse(r)}catch(e){throw wy(Cg)}}function Pv(e){if(!e)throw wy(Cg);const t=e.split(Sf,2);return{uid:t[0],utid:t.length<2?Gh.EMPTY_STRING:t[1]}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function Ov(e,t){return!!e&&!!t&&e===t.split(".")[1]}function zv(e,t,r,i){if(i){const{oid:t,sub:r,tid:n,name:o,tfp:s,acr:a}=i,l=n||s||a||"";return{tenantId:l,localAccountId:t||r||"",name:o,isHomeTenant:Ov(l,e)}}return{tenantId:r,localAccountId:t,isHomeTenant:Ov(r,e)}}function Nv(e,t,r,i){let n=e;if(t){const{isHomeTenant:r,...i}=t;n={...e,...i}}if(r){const{isHomeTenant:t,...o}=zv(e.homeAccountId,e.localAccountId,e.tenantId,r);return n={...n,...o,idTokenClaims:r,idToken:i},n}return n}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function qv(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Uv{generateAccountId(){return[this.homeAccountId,this.environment].join(xf).toLowerCase()}generateAccountKey(){return Uv.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(xf).toLowerCase()}static createAccount(e,t,r){const i=new Uv;let n;t.authorityType===Xm?i.authorityType=wf:t.protocolMode===Cy?i.authorityType=bf:i.authorityType=_f,e.clientInfo&&r&&(n=Rv(e.clientInfo,r)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const o=e.environment||t&&t.getPreferredCache();if(!o)throw wy(ey);i.environment=o,i.realm=n?.utid||qv(e.idTokenClaims)||"",i.localAccountId=n?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const s=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,a=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(i.username=s||a||"",i.name=e.idTokenClaims?.name||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const t=zv(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[t]}return i}static createFromAccountInfo(e,t,r){const i=new Uv;return i.authorityType=e.authorityType||_f,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=r,i.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),i}static generateHomeAccountId(e,t,r,i,n){if(t!==Xm&&t!==eg){if(e)try{const t=Rv(e,i.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}r.warning("No client info in response")}return n?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let i=!0;if(r){const r=e.idTokenClaims||{},n=t.idTokenClaims||{};i=r.iat===n.iat&&r.nonce===n.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Lv="cache_quota_exceeded",jv="cache_error_unknown",Hv={[Lv]:"Exceeded cache storage capacity.",[jv]:"Unexpected error occurred when using cache storage."};class $v extends Error{constructor(e,t){const r=t||(Hv[e]?Hv[e]:Hv[jv]);super(`${e}: ${r}`),Object.setPrototypeOf(this,$v.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Gv{constructor(e,t,r,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(Fv,Mv),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);if(t.length>1){return t.sort((e=>e.idTokenClaims?-1:1))[0]}return 1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,t?.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,r,i){let n,o=null;if(i&&!this.tenantProfileMatchesFilter(r,i))return null;const s=this.getIdToken(e,t,r.tenantId);return s&&(n=lv(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,i))?null:(o=Nv(e,r,n,s?.secret),o)}getTenantProfilesFromAccountEntity(e,t,r){const i=e.getAccountInfo();let n=i.tenantProfiles||new Map;const o=this.getTokenKeys();if(t){const e=n.get(t);if(!e)return[];n=new Map([[t,e]])}const s=[];return n.forEach((e=>{const t=this.getTenantedAccountInfoByFilter(i,o,e,r);t&&s.push(t)})),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,r){if(!e)throw wy(Xg);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==t?.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==t?.accessToken&&await this.saveAccessToken(e.accessToken),e.refreshToken&&!1!==t?.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Error?(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e.message}`,r),"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?(this.commonLogger?.error("CacheManager.saveCacheRecord: exceeded storage quota",r),new $v(Lv)):new $v(e.name,e.message)):(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e}`,r),new $v(jv))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},r=this.getTokenKeys(),i=Dv.fromString(e.target),n=[];r.accessToken.forEach((e=>{if(!this.accessTokenKeyMatchesFilter(e,t,!1))return;const r=this.getAccessTokenCredential(e);if(r&&this.credentialMatchesFilter(r,t)){Dv.fromString(r.target).intersectingScopeSets(i)&&n.push(this.removeAccessToken(e))}})),await Promise.all(n),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach((t=>{if(!this.isAccountKey(t,e.homeAccountId))return;const i=this.getAccount(t,this.commonLogger);if(!i)return;if(e.homeAccountId&&!this.matchHomeAccountId(i,e.homeAccountId))return;if(e.username&&!this.matchUsername(i.username,e.username))return;if(e.environment&&!this.matchEnvironment(i,e.environment))return;if(e.realm&&!this.matchRealm(i,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(i,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(i,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},o=i.tenantProfiles?.filter((e=>this.tenantProfileMatchesFilter(e,n)));o&&0===o.length||r.push(i)})),r}isAccountKey(e,t,r){return!(e.split(xf).length<3)&&(!(t&&!e.toLowerCase().includes(t.toLowerCase()))&&!(r&&!e.toLowerCase().includes(r.toLowerCase())))}isCredentialKey(e){if(e.split(xf).length<6)return!1;const t=e.toLowerCase();if(-1===t.indexOf(kf.ID_TOKEN.toLowerCase())&&-1===t.indexOf(kf.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(kf.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(kf.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(kf.REFRESH_TOKEN.toLowerCase())>-1){const e=`${kf.REFRESH_TOKEN}${xf}${this.clientId}${xf}`,r=`${kf.REFRESH_TOKEN}${xf}${Tf}${xf}`;if(-1===t.indexOf(e.toLowerCase())&&-1===t.indexOf(r.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===kf.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===Rf.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach((t=>{if(!this.isAppMetadata(t))return;const i=this.getAppMetadata(t);i&&(e.environment&&!this.matchEnvironment(i,e.environment)||e.clientId&&!this.matchClientId(i,e.clientId)||(r[t]=i))})),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach((t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const i=this.getAuthorityMetadata(t);i&&-1!==i.aliases.indexOf(e)&&(r=i)})),r}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach((e=>{t.push(this.removeAccount(e))})),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),r=e.generateAccountId(),i=[];t.idToken.forEach((e=>{0===e.indexOf(r)&&this.removeIdToken(e)})),t.accessToken.forEach((e=>{0===e.indexOf(r)&&i.push(this.removeAccessToken(e))})),t.refreshToken.forEach((e=>{0===e.indexOf(r)&&this.removeRefreshToken(e)})),await Promise.all(i)}updateOutdatedCachedAccount(e,t,r){if(t&&t.isSingleTenant()){this.commonLogger?.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const i=this.getAccountKeys().filter((e=>e.startsWith(t.homeAccountId))),n=[];i.forEach((e=>{const t=this.getCachedAccountEntity(e);t&&n.push(t)}));const o=n.find((e=>Ov(e.realm,e.homeAccountId)))||n[0];o.tenantProfiles=n.map((e=>({tenantId:e.realm,localAccountId:e.localAccountId,name:e.name,isHomeTenant:Ov(e.realm,e.homeAccountId)})));const s=Gv.toObject(new Uv,{...o}),a=s.generateAccountKey();return i.forEach((t=>{t!==a&&this.removeOutdatedAccount(e)})),this.setAccount(s),r?.verbose("Updated an outdated account entity in the cache"),s}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===kf.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===Rf.POP){const e=t.keyId;if(e)try{await this.cryptoImpl.removeTokenBindingKey(e)}catch(e){throw wy(cy)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach((e=>{this.isAppMetadata(e)&&this.removeItem(e)})),!0}readAccountFromCache(e){const t=Uv.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,r,i,n){this.commonLogger.trace("CacheManager - getIdToken called");const o={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:kf.ID_TOKEN,clientId:this.clientId,realm:r},s=this.getIdTokensByFilter(o,t),a=s.size;if(a<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(a>1){let t=s;if(!r){const r=new Map;s.forEach(((t,i)=>{t.realm===e.tenantId&&r.set(i,t)}));const i=r.size;if(i<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),s.values().next().value;if(1===i)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),r.values().next().value;t=r}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),t.forEach(((e,t)=>{this.removeIdToken(t)})),i&&n&&i.addFields({multiMatchedID:s.size},n),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),s.values().next().value}getIdTokensByFilter(e,t){const r=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return r.forEach((t=>{if(!this.idTokenKeyMatchesFilter(t,{clientId:this.clientId,...e}))return;const r=this.getIdTokenCredential(t);r&&this.credentialMatchesFilter(r,e)&&i.set(t,r)})),i}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return(!t.clientId||-1!==r.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==r.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,r,i,n,o){this.commonLogger.trace("CacheManager - getAccessToken called");const s=Dv.createSearchScopes(t.scopes),a=t.authenticationScheme||Rf.BEARER,l=a&&a.toLowerCase()!==Rf.BEARER.toLowerCase()?kf.ACCESS_TOKEN_WITH_AUTH_SCHEME:kf.ACCESS_TOKEN,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:l,clientId:this.clientId,realm:i||e.tenantId,target:s,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},c=r&&r.accessToken||this.getTokenKeys().accessToken,u=[];c.forEach((e=>{if(this.accessTokenKeyMatchesFilter(e,d,!0)){const t=this.getAccessTokenCredential(e);t&&this.credentialMatchesFilter(t,d)&&u.push(t)}}));const p=u.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):p>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),u.forEach((e=>{this.removeAccessToken(hv(e))})),n&&o&&n.addFields({multiMatchedAT:u.length},o),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),u[0])}accessTokenKeyMatchesFilter(e,t,r){const i=e.toLowerCase();if(t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===i.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===i.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===i.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(r&&!i.includes(e[t].toLowerCase()))return!1;if(!r&&i.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),r=[];return t.accessToken.forEach((t=>{if(!this.accessTokenKeyMatchesFilter(t,e,!0))return;const i=this.getAccessTokenCredential(t);i&&this.credentialMatchesFilter(i,e)&&r.push(i)})),r}getRefreshToken(e,t,r,i,n){this.commonLogger.trace("CacheManager - getRefreshToken called");const o=t?Tf:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:kf.REFRESH_TOKEN,clientId:this.clientId,familyId:o},a=r&&r.refreshToken||this.getTokenKeys().refreshToken,l=[];a.forEach((e=>{if(this.refreshTokenKeyMatchesFilter(e,s)){const t=this.getRefreshTokenCredential(e);t&&this.credentialMatchesFilter(t,s)&&l.push(t)}}));const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&i&&n&&i.addFields({multiMatchedRT:d},n),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return(!t.familyId||-1!==r.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===r.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==r.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),i=Object.keys(r).map((e=>r[e])),n=i.length;if(n<1)return null;if(n>1)throw wy($g);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Tf)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const r=function(e,t){let r;const i=e.canonicalAuthority;if(i){const n=new xy(i).getUrlComponents().HostNameAndPort;r=Ty(n,e.cloudDiscoveryMetadata?.metadata,If,t)||Ty(n,ky.metadata,Mf,t)||e.knownAuthorities}return r||[]}(this.staticAuthorityOptions,this.commonLogger);if(r.includes(t)&&r.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==kf.ACCESS_TOKEN&&e.credentialType!==kf.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return Dv.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(Ef)}isAuthorityMetadata(e){return-1!==e.indexOf(Bf)}generateAuthorityMetadataCacheKey(e){return`${Bf}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}}class Wv extends Gv{setAccount(){throw wy(gy)}getAccount(){throw wy(gy)}getCachedAccountEntity(){throw wy(gy)}setIdTokenCredential(){throw wy(gy)}getIdTokenCredential(){throw wy(gy)}setAccessTokenCredential(){throw wy(gy)}getAccessTokenCredential(){throw wy(gy)}setRefreshTokenCredential(){throw wy(gy)}getRefreshTokenCredential(){throw wy(gy)}setAppMetadata(){throw wy(gy)}getAppMetadata(){throw wy(gy)}setServerTelemetry(){throw wy(gy)}getServerTelemetry(){throw wy(gy)}setAuthorityMetadata(){throw wy(gy)}getAuthorityMetadata(){throw wy(gy)}getAuthorityMetadataKeys(){throw wy(gy)}setThrottlingCache(){throw wy(gy)}getThrottlingCache(){throw wy(gy)}removeItem(){throw wy(gy)}getKeys(){throw wy(gy)}getAccountKeys(){throw wy(gy)}getTokenKeys(){throw wy(gy)}async clear(){throw wy(gy)}updateCredentialCacheKey(){throw wy(gy)}removeOutdatedAccount(){throw wy(gy)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const Kv={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},Vv={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info,correlationId:Gh.EMPTY_STRING},Jv={claimsBasedCachingEnabled:!1},Yv={async sendGetRequestAsync(){throw wy(gy)},async sendPostRequestAsync(){throw wy(gy)}},Qv={sku:Gh.SKU,version:Mv,cpu:Gh.EMPTY_STRING,os:Gh.EMPTY_STRING},Zv={clientSecret:Gh.EMPTY_STRING,clientAssertion:void 0},Xv={azureCloudInstance:Ay,tenant:`${Gh.DEFAULT_COMMON_TENANT}`},eb={application:{appName:"",appVersion:""}};function tb(e){return e.authOptions.authority.options.protocolMode===Iy}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class rb{static generateThrottlingStorageKey(e){return`${zf}.${JSON.stringify(e)}`}static preProcess(e,t){const r=rb.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r);if(i){if(i.throttleTime<Date.now())return void e.removeItem(r);throw new Jm(i.errorCodes?.join(" ")||Gh.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,r){if(rb.checkResponseStatus(r)||rb.checkResponseForRetryAfter(r)){const i={throttleTime:rb.calculateThrottleTime(parseInt(r.headers[of])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(rb.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(of)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(1e3*Math.min(r+(t||Pf),r+Of))}static removeThrottle(e,t,r,i){const n={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:i,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},o=this.generateThrottlingStorageKey(n);e.removeItem(o)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class ib{constructor(e,t){this.networkClient=e,this.cacheManager=t}async sendPostRequest(e,t,r){let i;rb.preProcess(this.cacheManager,e);try{i=await this.networkClient.sendPostRequestAsync(t,r)}catch(e){throw e instanceof Um?e:wy(Dg)}return rb.postProcess(this.cacheManager,e,i),i}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const nb="home_account_id",ob="UPN";
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class sb{static validateRedirectUri(e){if(!e)throw Tg(rg)}static validatePrompt(e){const t=[];for(const e in pf)t.push(pf[e]);if(t.indexOf(e)<0)throw Tg(lg)}static validateClaims(e){try{JSON.parse(e)}catch(e){throw Tg(dg)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Tg(hg);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([hf.PLAIN,hf.S256].indexOf(e)<0)throw Tg(pg)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class ab{constructor(){this.parameters=new Map}addResponseTypeCode(){this.parameters.set($m,encodeURIComponent(Gh.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set($m,encodeURIComponent(`${Gh.TOKEN_RESPONSE_TYPE} ${Gh.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set("response_mode",encodeURIComponent(e||ff.QUERY))}addNativeBroker(){this.parameters.set("nativebroker",encodeURIComponent("1"))}addScopes(e,t=!0,r=tf){!t||r.includes("openid")||e.includes("openid")||r.push("openid");const i=t?[...e||[],...r]:e||[],n=new Dv(i);this.parameters.set("scope",encodeURIComponent(n.printScopes()))}addClientId(e){this.parameters.set(Hm,encodeURIComponent(e))}addRedirectUri(e){sb.validateRedirectUri(e),this.parameters.set("redirect_uri",encodeURIComponent(e))}addPostLogoutRedirectUri(e){sb.validateRedirectUri(e),this.parameters.set("post_logout_redirect_uri",encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set("id_token_hint",encodeURIComponent(e))}addDomainHint(e){this.parameters.set("domain_hint",encodeURIComponent(e))}addLoginHint(e){this.parameters.set("login_hint",encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(sf,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(sf,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set("sid",encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);sb.validateClaims(r),this.parameters.set("claims",encodeURIComponent(r))}addCorrelationId(e){this.parameters.set("client-request-id",encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set("x-client-SKU",e.sku),this.parameters.set("x-client-VER",e.version),e.os&&this.parameters.set("x-client-OS",e.os),e.cpu&&this.parameters.set("x-client-CPU",e.cpu)}addApplicationTelemetry(e){e?.appName&&this.parameters.set("x-app-name",e.appName),e?.appVersion&&this.parameters.set("x-app-ver",e.appVersion)}addPrompt(e){sb.validatePrompt(e),this.parameters.set("prompt",encodeURIComponent(e))}addState(e){e&&this.parameters.set("state",encodeURIComponent(e))}addNonce(e){this.parameters.set("nonce",encodeURIComponent(e))}addCodeChallengeParams(e,t){if(sb.validateCodeChallengeParams(e,t),!e||!t)throw Tg(hg);this.parameters.set("code_challenge",encodeURIComponent(e)),this.parameters.set("code_challenge_method",encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set("code",encodeURIComponent(e))}addDeviceCode(e){this.parameters.set("device_code",encodeURIComponent(e))}addRefreshToken(e){this.parameters.set("refresh_token",encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set("code_verifier",encodeURIComponent(e))}addClientSecret(e){this.parameters.set("client_secret",encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set("client_assertion",encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set("client_assertion_type",encodeURIComponent(e))}addOboAssertion(e){this.parameters.set("assertion",encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set("requested_token_use",encodeURIComponent(e))}addGrantType(e){this.parameters.set("grant_type",encodeURIComponent(e))}addClientInfo(){this.parameters.set("client_info","1")}addExtraQueryParameters(e){Object.entries(e).forEach((([e,t])=>{!this.parameters.has(e)&&t&&this.parameters.set(e,t)}))}addClientCapabilitiesToClaims(e,t){let r;if(e)try{r=JSON.parse(e)}catch(e){throw Tg(dg)}else r={};return t&&t.length>0&&(r.hasOwnProperty(cf)||(r[cf]={}),r[cf][uf]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(Lf,encodeURIComponent(e))}addPassword(e){this.parameters.set(jf,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Gm,Rf.POP),this.parameters.set(Wm,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Gm,Rf.SSH),this.parameters.set(Wm,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set("x-client-current-telemetry",e.generateCurrentRequestHeaderValue()),this.parameters.set("x-client-last-telemetry",e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set("x-ms-lib-capability",Nf)}addLogoutHint(e){this.parameters.set("logout_hint",encodeURIComponent(e))}createQueryString(){const e=new Array;return this.parameters.forEach(((t,r)=>{e.push(`${r}=${t}`)})),e.join("&")}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
async function lb(e,t,r,i,n,o,s){s?.addQueueMeasurement(Jy,o);const a=Cv.transformCIAMAuthority(Iv(e)),l=new Cv(a,t,r,i,n,o,s);try{return await sv(l.resolveEndpointsAsync.bind(l),Yy,n,s,o)(),l}catch(e){throw wy(Mg)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class db{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:i,storageInterface:n,networkInterface:o,cryptoInterface:s,clientCredentials:a,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){const h={...Vv,...r};return{authOptions:(f=e,{clientCapabilities:[],azureCloudOptions:Xv,skipAuthorityMetadataCache:!1,instanceAware:!1,...f}),systemOptions:{...Kv,...t},loggerOptions:h,cacheOptions:{...Jv,...i},storageInterface:n||new Wv(e.clientId,Av,new Qm(h)),networkInterface:o||Yv,cryptoInterface:s||Av,clientCredentials:a||Zv,libraryInfo:{...Qv,...l},telemetry:{...eb,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};var f}(e),this.logger=new Qm(this.config.loggerOptions,Fv,Mv),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new ib(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[nf]=Gh.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case nb:try{const r=Pv(e.credential);t[sf]=`Oid:${r.uid}@${r.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case ob:t[sf]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,r,i,n,o){o&&this.performanceClient?.addQueueMeasurement(o,n);const s=await this.networkManager.sendPostRequest(i,e,{body:t,headers:r});return this.performanceClient?.addFields({refreshTokenSize:s.body.refresh_token?.length||0,httpVerToken:s.headers?.[lf]||""},n),this.config.serverTelemetryManager&&s.status<500&&429!==s.status&&this.config.serverTelemetryManager.clearTelemetryCache(),s}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Ly,t);const r=`https://${e}/${this.authority.tenant}/`,i=await lb(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new ab;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const cb="no_tokens_found",ub="native_account_unavailable",pb="refresh_token_expired",hb="bad_token",fb=["interaction_required","consent_required","login_required",hb],mb=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],gb={[cb]:"No refresh token found in the cache. Please sign-in.",[ub]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[pb]:"Refresh token has expired.",[hb]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class yb extends Um{constructor(e,t,r,i,n,o,s,a){super(e,t,r),Object.setPrototypeOf(this,yb.prototype),this.timestamp=i||Gh.EMPTY_STRING,this.traceId=n||Gh.EMPTY_STRING,this.correlationId=o||Gh.EMPTY_STRING,this.claims=s||Gh.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=a}}function vb(e,t,r){const i=!!e&&fb.indexOf(e)>-1,n=!!r&&mb.indexOf(r)>-1,o=!!t&&fb.some((e=>t.indexOf(e)>-1));return i||o||n}function bb(e){return new yb(e,gb[e])}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class wb{static setRequestState(e,t,r){const i=wb.generateLibraryState(e,r);return t?`${i}${Gh.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw wy(ry);const r={id:e.createNewGuid()};t&&(r.meta=t);const i=JSON.stringify(r);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw wy(ry);if(!t)throw wy(Og);try{const r=t.split(Gh.RESOURCE_DELIM),i=r[0],n=r.length>1?r.slice(1).join(Gh.RESOURCE_DELIM):Gh.EMPTY_STRING,o=e.base64Decode(i),s=JSON.parse(o);return{userRequestState:n||Gh.EMPTY_STRING,libraryState:s}}catch(e){throw wy(Og)}}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
const _b="sw";class xb{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Wy,e.correlationId);const r=await sv(this.generateKid.bind(this),Wy,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:i}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Ky,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:_b}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,i){const{resourceRequestMethod:n,resourceRequestUri:o,shrClaims:s,shrNonce:a,shrOptions:l}=r,d=o?new xy(o):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:cv(),m:n?.toUpperCase(),u:c?.HostNameAndPort,nonce:a||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:s||void 0,...i},t,l,r.correlationId)}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Sb{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}class kb{constructor(e,t,r,i,n,o,s){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=i,this.serializableCache=n,this.persistencePlugin=o,this.performanceClient=s}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?wy(Ng,"Cached State"):wy(Ng,"Server State");let r,i;try{r=decodeURIComponent(e.state)}catch(t){throw wy(Og,e.state)}try{i=decodeURIComponent(t)}catch(t){throw wy(Og,e.state)}if(r!==i)throw wy(zg);if(e.error||e.error_description||e.suberror){const t=
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
function(e){const t="code=",r=e.error_uri?.lastIndexOf(t);return r&&r>=0?e.error_uri?.substring(r+5):void 0}(e);if(vb(e.error,e.error_description,e.suberror))throw new yb(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Jm(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const r=`Error(s): ${e.error_codes||Gh.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Gh.NOT_AVAILABLE} - Description: ${e.error_description||Gh.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Gh.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Gh.NOT_AVAILABLE}`,i=e.error_codes?.length?e.error_codes[0]:void 0,n=new Jm(e.error,r,e.suberror,i,e.status);if(t&&e.status&&e.status>=Xh&&e.status<=ef)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${n}`);if(t&&e.status&&e.status>=Yh&&e.status<=Qh)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${n}`);if(vb(e.error,e.error_description,e.suberror))throw new yb(e.error,e.error_description,e.suberror,e.timestamp||Gh.EMPTY_STRING,e.trace_id||Gh.EMPTY_STRING,e.correlation_id||Gh.EMPTY_STRING,e.claims||Gh.EMPTY_STRING,i);throw n}}async handleServerTokenResponse(e,t,r,i,n,o,s,a,l){let d,c;if(this.performanceClient?.addQueueMeasurement(Vy,e.correlation_id),e.id_token){if(d=lv(e.id_token||Gh.EMPTY_STRING,this.cryptoObj.base64Decode),n&&n.nonce&&d.nonce!==n.nonce)throw wy(qg);if(i.maxAge||0===i.maxAge){const e=d.auth_time;if(!e)throw wy(Ug);dv(e,i.maxAge)}}this.homeAccountIdentifier=Uv.generateHomeAccountId(e.client_info||Gh.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),n&&n.state&&(c=wb.parseRequestState(this.cryptoObj,n.state)),e.key_id=e.key_id||i.sshKid||void 0;const u=this.generateCacheRecord(e,t,r,i,d,o,n);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Sb(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),s&&!a&&u.account){const e=u.account.generateAccountKey();if(!this.cacheStorage.getAccount(e,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await kb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return kb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,e,l)}generateCacheRecord(e,t,r,i,n,o,s){const a=t.getPreferredCache();if(!a)throw wy(ey);const l=qv(n);let d,c;var u,p,h,f,m;e.id_token&&n&&(u=this.homeAccountIdentifier,p=a,h=e.id_token,f=this.clientId,m=l||"",d={credentialType:kf.ID_TOKEN,homeAccountId:u,environment:p,clientId:f,secret:h,realm:m},c=function(e,t,r,i,n,o,s,a,l,d,c){c?.verbose("setCachedAccount called");const u=e.getAccountKeys().find((e=>e.startsWith(r)));let p=null;u&&(p=e.getAccount(u,c));const h=p||Uv.createAccount({homeAccountId:r,idTokenClaims:n,clientInfo:o,environment:s,cloudGraphHostName:l?.cloud_graph_host_name,msGraphHost:l?.msgraph_host,nativeAccountId:d},t,i),f=h.tenantProfiles||[],m=a||h.realm;if(m&&!f.find((e=>e.tenantId===m))){const e=zv(r,h.localAccountId,m,n);f.push(e)}return h.tenantProfiles=f,h}(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,n,e.client_info,a,l,s,void 0,this.logger));let g=null;if(e.access_token){const n=e.scope?Dv.fromString(e.scope):new Dv(i.scopes||[]),s=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=r+s,p=u+d,h=c&&c>0?r+c:void 0;g=function(e,t,r,i,n,o,s,a,l,d,c,u,p,h,f){const m={homeAccountId:e,credentialType:kf.ACCESS_TOKEN,secret:r,cachedAt:cv().toString(),expiresOn:s.toString(),extendedExpiresOn:a.toString(),environment:t,clientId:i,realm:n,target:o,tokenType:c||Rf.BEARER};if(u&&(m.userAssertionHash=u),d&&(m.refreshOn=d.toString()),h&&(m.requestedClaims=h,m.requestedClaimsHash=f),m.tokenType?.toLowerCase()!==Rf.BEARER.toLowerCase())switch(m.credentialType=kf.ACCESS_TOKEN_WITH_AUTH_SCHEME,m.tokenType){case Rf.POP:const e=lv(r,l);if(!e?.cnf?.kid)throw wy(ly);m.keyId=e.cnf.kid;break;case Rf.SSH:m.keyId=p}return m}(this.homeAccountIdentifier,a,e.access_token,this.clientId,l||t.tenant||"",n.printScopes(),u,p,this.cryptoObj.base64Decode,h,e.token_type,o,e.key_id,i.claims,i.requestedClaimsHash)}let y=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=r+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}y=function(e,t,r,i,n,o,s){const a={credentialType:kf.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:i,secret:r};return o&&(a.userAssertionHash=o),n&&(a.familyId=n),s&&(a.expiresOn=s.toString()),a}(this.homeAccountIdentifier,a,e.refresh_token,this.clientId,e.foci,o,t)}let v=null;return e.foci&&(v={clientId:this.clientId,environment:a,familyId:e.foci}),{account:c,idToken:d,accessToken:g,refreshToken:y,appMetadata:v}}static async generateAuthenticationResult(e,t,r,i,n,o,s,a,l){let d,c,u=Gh.EMPTY_STRING,p=[],h=null,f=Gh.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType!==Rf.POP||n.popKid)u=r.accessToken.secret;else{const t=new xb(e),{secret:i,keyId:o}=r.accessToken;if(!o)throw wy(py);u=await t.signPopToken(i,o,n)}p=Dv.fromString(r.accessToken.target).asArray(),h=new Date(1e3*Number(r.accessToken.expiresOn)),d=new Date(1e3*Number(r.accessToken.extendedExpiresOn)),r.accessToken.refreshOn&&(c=new Date(1e3*Number(r.accessToken.refreshOn)))}r.appMetadata&&(f=r.appMetadata.familyId===Tf?Tf:"");const m=o?.oid||o?.sub||"",g=o?.tid||"";a?.spa_accountid&&r.account&&(r.account.nativeAccountId=a?.spa_accountid);const y=r.account?Nv(r.account.getAccountInfo(),void 0,o,r.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:m,tenantId:g,scopes:p,account:y,idToken:r?.idToken?.secret||"",idTokenClaims:o||{},accessToken:u,fromCache:i,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:n.correlationId,requestId:l||Gh.EMPTY_STRING,familyId:f,tokenType:r.accessToken?.tokenType||Gh.EMPTY_STRING,state:s?s.userRequestState:Gh.EMPTY_STRING,cloudGraphHostName:r.account?.cloudGraphHostName||Gh.EMPTY_STRING,msGraphHost:r.account?.msGraphHost||Gh.EMPTY_STRING,code:a?.spa_code,fromNativeBroker:!1}}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
async function Eb(e,t,r){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:r})}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Tb extends db{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async getAuthCodeUrl(e){this.performanceClient?.addQueueMeasurement(Uy,e.correlationId);const t=await sv(this.createAuthCodeUrlQueryString.bind(this),Gy,this.logger,this.performanceClient,e.correlationId)(e);return xy.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(jy,e.correlationId),!e.code)throw wy(Gg);const r=cv(),i=await sv(this.executeTokenRequest.bind(this),Hy,this.logger,this.performanceClient,e.correlationId)(this.authority,e),n=i.headers?.[af],o=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return o.validateTokenResponse(i.body),sv(o.handleServerTokenResponse.bind(o),Vy,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,t,void 0,void 0,void 0,n)}handleFragmentResponse(e,t){if(new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw wy(dy);return e}getLogoutUri(e){if(!e)throw Tg(ug);const t=this.createLogoutUrlQueryString(e);return xy.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Hy,t.correlationId);const r=this.createTokenQueryParameters(t),i=xy.appendQueryString(e.tokenEndpoint,r),n=await sv(this.createTokenRequestBody.bind(this),$y,this.logger,this.performanceClient,t.correlationId)(t);let o;if(t.clientInfo)try{const e=Rv(t.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${e.uid}${Sf}${e.utid}`,type:nb}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const s=this.createTokenRequestHeaders(o||t.ccsCredential),a={clientId:t.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return sv(this.executePostToTokenEndpoint.bind(this),My,this.logger,this.performanceClient,t.correlationId)(i,n,s,a,t.correlationId,My)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement($y,e.correlationId);const t=new ab;if(t.addClientId(e.tokenBodyParameters?.[Hm]||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):sb.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!tb(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const r=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Eb(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(r.assertionType)}if(t.addGrantType(mf),t.addClientInfo(),e.authenticationScheme===Rf.POP){const r=new xb(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await sv(r.generateCnf.bind(r),Wy,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}t.addPopToken(i)}else if(e.authenticationScheme===Rf.SSH){if(!e.sshJwk)throw Tg(yg);t.addSshJwk(e.sshJwk)}const r=e.correlationId||this.config.cryptoInterface.createNewGuid();let i;if(t.addCorrelationId(r),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Rv(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${Sf}${t.utid}`,type:nb}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case nb:try{const e=Pv(i.credential);t.addCcsOid(e)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case ob:t.addCcsUpn(i.credential)}return e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[Km]||t.addExtraQueryParameters({[Km]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){this.performanceClient?.addQueueMeasurement(Gy,e.correlationId);const t=new ab;t.addClientId(e.extraQueryParameters?.[Hm]||this.config.authOptions.clientId);const r=[...e.scopes||[],...e.extraScopesToConsent||[]];t.addScopes(r,!0,this.oidcDefaultScopes),t.addRedirectUri(e.redirectUri);const i=e.correlationId||this.config.cryptoInterface.createNewGuid();if(t.addCorrelationId(i),t.addResponseMode(e.responseMode),t.addResponseTypeCode(),t.addLibraryInfo(this.config.libraryInfo),tb(this.config)||t.addApplicationTelemetry(this.config.telemetry.application),t.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&t.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&t.addPrompt(e.prompt),e.domainHint&&t.addDomainHint(e.domainHint),e.prompt!==pf.SELECT_ACCOUNT)if(e.sid&&e.prompt===pf.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),t.addSid(e.sid);else if(e.account){const r=this.extractAccountSid(e.account);let i=this.extractLoginHint(e.account);if(i&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),i=null),i){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),t.addLoginHint(i);try{const r=Pv(e.account.homeAccountId);t.addCcsOid(r)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(r&&e.prompt===pf.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),t.addSid(r);try{const r=Pv(e.account.homeAccountId);t.addCcsOid(r)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),t.addLoginHint(e.loginHint),t.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),t.addLoginHint(e.account.username);try{const r=Pv(e.account.homeAccountId);t.addCcsOid(r)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),t.addLoginHint(e.loginHint),t.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&t.addNonce(e.nonce),e.state&&t.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.addExtraQueryParams(e,t),e.nativeBroker&&(t.addNativeBroker(),e.authenticationScheme===Rf.POP)){const r=new xb(this.cryptoUtils);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await sv(r.generateCnf.bind(r),Wy,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}t.addPopToken(i)}return t.createQueryString()}createLogoutUrlQueryString(e){const t=new ab;return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){return e.idTokenClaims?.sid||null}extractLoginHint(e){return e.idTokenClaims?.login_hint||null}}class Bb extends db{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(Ry,e.correlationId);const t=cv(),r=await sv(this.executeTokenRequest.bind(this),Dy,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=r.headers?.[af],n=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return n.validateTokenResponse(r.body),sv(n.handleServerTokenResponse.bind(n),Vy,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){if(!e)throw Tg(cg);if(this.performanceClient?.addQueueMeasurement(Oy,e.correlationId),!e.account)throw wy(Zg);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await sv(this.acquireTokenWithCachedRefreshToken.bind(this),Py,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const r=t instanceof yb&&t.errorCode===cb,i=t instanceof Jm&&t.errorCode===qf&&t.subError===Uf;if(r||i)return sv(this.acquireTokenWithCachedRefreshToken.bind(this),Py,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return sv(this.acquireTokenWithCachedRefreshToken.bind(this),Py,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Py,e.correlationId);const r=((e,t,r,i,n)=>(...o)=>{r.trace(`Executing function ${t}`);const s=i?.startMeasurement(t,n);if(n){const e=t+"CallCount";i?.incrementFields({[e]:1},n)}try{const i=e(...o);return s?.end({success:!0}),r.trace(`Returning result from ${t}`),i}catch(e){r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(e))}catch(e){r.trace("Unable to print error message.")}throw s?.end({success:!1},e),e}})(this.cacheManager.getRefreshToken.bind(this.cacheManager),ov,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw bb(cb);if(r.expiresOn&&uv(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw bb(pb);const i={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||Rf.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:nb}};try{return await sv(this.acquireToken.bind(this),Ry,this.logger,this.performanceClient,e.correlationId)(i)}catch(e){if(e instanceof yb&&e.subError===hb){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const e=hv(r);this.cacheManager.removeRefreshToken(e)}throw e}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Dy,e.correlationId);const r=this.createTokenQueryParameters(e),i=xy.appendQueryString(t.tokenEndpoint,r),n=await sv(this.createTokenRequestBody.bind(this),zy,this.logger,this.performanceClient,e.correlationId)(e),o=this.createTokenRequestHeaders(e.ccsCredential),s={clientId:e.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return sv(this.executePostToTokenEndpoint.bind(this),Fy,this.logger,this.performanceClient,e.correlationId)(i,n,o,s,e.correlationId,Fy)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(zy,e.correlationId);const t=e.correlationId,r=new ab;if(r.addClientId(e.tokenBodyParameters?.[Hm]||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),r.addGrantType(yf),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!tb(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addCorrelationId(t),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await Eb(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(t.assertionType)}if(e.authenticationScheme===Rf.POP){const t=new xb(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await sv(t.generateCnf.bind(t),Wy,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}r.addPopToken(i)}else if(e.authenticationScheme===Rf.SSH){if(!e.sshJwk)throw Tg(yg);r.addSshJwk(e.sshJwk)}if((!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case nb:try{const t=Pv(e.ccsCredential.credential);r.addCcsOid(t)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case ob:r.addCcsUpn(e.ccsCredential.credential)}return e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}
|
||
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
||
class Cb extends db{constructor(e,t){super(e,t)}async acquireToken(e){try{const[t,r]=await this.acquireCachedToken({...e,scopes:e.scopes?.length?e.scopes:[...tf]});if(r===tm){this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");new Bb(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch((()=>{}))}return t}catch(t){if(t instanceof by&&t.errorCode===sy){return new Bb(this.config,this.performanceClient).acquireTokenByRefreshToken(e)}throw t}}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Ny,e.correlationId);let t=Qf;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bg.isEmptyObj(e.claims))throw this.setCacheOutcome(Zf,e.correlationId),wy(sy);if(!e.account)throw wy(Zg);const r=e.account.tenantId||function(e){const t=new xy(e).getUrlComponents(),r=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(r){case df.COMMON:case df.ORGANIZATIONS:case df.CONSUMERS:return;default:return r}}(e.authority),i=this.cacheManager.getTokenKeys(),n=this.cacheManager.getAccessToken(e.account,e,i,r,this.performanceClient,e.correlationId);if(!n)throw this.setCacheOutcome(Xf,e.correlationId),wy(sy);if(o=n.cachedAt,Number(o)>cv()||uv(n.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(em,e.correlationId),wy(sy);var o;n.refreshOn&&uv(n.refreshOn,0)&&(t=tm);const s=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.readAccountFromCache(e.account),accessToken:n,idToken:this.cacheManager.getIdToken(e.account,i,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await sv(this.generateResultFromCacheRecord.bind(this),qy,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Qf&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let r;if(this.performanceClient?.addQueueMeasurement(qy,t.correlationId),e.idToken&&(r=lv(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=r?.auth_time;if(!e)throw wy(Ug);dv(e,t.maxAge)}return kb.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Ib{static getNetworkResponse(e,t,r){return{headers:e,body:t,status:r}}static urlToHttpOptions(e){const t={protocol:e.protocol,hostname:e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname||""}${e.search||""}`,href:e.href};return""!==e.port&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`),t}}var Ab=__webpack_require__(35265),Fb=__webpack_require__(70440),Mb=__webpack_require__(48287).Buffer;
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Db{constructor(e,t){this.proxyUrl=e||"",this.customAgentOptions=t||{}}async sendGetRequestAsync(e,t,r){return this.proxyUrl?Rb(e,this.proxyUrl,dm,t,this.customAgentOptions,r):Pb(e,dm,t,this.customAgentOptions,r)}async sendPostRequestAsync(e,t){return this.proxyUrl?Rb(e,this.proxyUrl,cm,t,this.customAgentOptions):Pb(e,cm,t,this.customAgentOptions)}}const Rb=(e,t,r,i,n,o)=>{const s=new URL(e),a=new URL(t),l=i?.headers||{},d={host:a.hostname,port:a.port,method:"CONNECT",path:s.hostname,headers:l};n&&Object.keys(n).length&&(d.agent=new Ab.Agent(n));let c="";if(r===cm){const e=i?.body||"";c=`Content-Type: application/x-www-form-urlencoded\r\nContent-Length: ${e.length}\r\n\r\n${e}`}else o&&(d.timeout=o);const u=`${r.toUpperCase()} ${s.href} HTTP/1.1\r\nHost: ${s.host}\r\nConnection: close\r\n`+c+"\r\n";return new Promise(((e,t)=>{const r=Ab.request(d);o&&r.on("timeout",(()=>{r.destroy(),t(new Error("Request time out"))})),r.end(),r.on("connect",((i,n)=>{const o=i?.statusCode||um.SERVER_ERROR;(o<um.SUCCESS_RANGE_START||o>um.SUCCESS_RANGE_END)&&(r.destroy(),n.destroy(),t(new Error(`Error connecting to proxy. Http status code: ${i.statusCode}. Http status message: ${i?.statusMessage||"Unknown"}`))),n.write(u);const s=[];n.on("data",(e=>{s.push(e)})),n.on("end",(()=>{const t=Mb.concat([...s]).toString().split("\r\n"),i=parseInt(t[0].split(" ")[1]),n=t[0].split(" ").slice(2).join(" "),o=t[t.length-1],a=t.slice(1,t.length-2),l=new Map;a.forEach((e=>{const t=e.split(new RegExp(/:\s(.*)/s)),r=t[0];let i=t[1];try{const e=JSON.parse(i);e&&"object"==typeof e&&(i=e)}catch(e){}l.set(r,i)}));const d=Object.fromEntries(l),c=Ib.getNetworkResponse(d,Ob(i,n,d,o),i);(i<Kh||i>Vh)&&c.body.error!==gm&&r.destroy(),e(c)})),n.on("error",(e=>{r.destroy(),n.destroy(),t(new Error(e.toString()))}))})),r.on("error",(e=>{r.destroy(),t(new Error(e.toString()))}))}))},Pb=(e,t,r,i,n)=>{const o=t===cm,s=r?.body||"",a=new URL(e),l={method:t,headers:r?.headers||{},...Ib.urlToHttpOptions(a)};return i&&Object.keys(i).length&&(l.agent=new Fb.Agent(i)),o?l.headers={...l.headers,"Content-Length":s.length}:n&&(l.timeout=n),new Promise(((e,t)=>{let r;r="http:"===l.protocol?Ab.request(l):Fb.request(l),o&&r.write(s),n&&r.on("timeout",(()=>{r.destroy(),t(new Error("Request time out"))})),r.end(),r.on("response",(t=>{const i=t.headers,n=t.statusCode,o=t.statusMessage,s=[];t.on("data",(e=>{s.push(e)})),t.on("end",(()=>{const t=Mb.concat([...s]).toString(),a=i,l=Ib.getNetworkResponse(a,Ob(n,o,a,t),n);(n<Kh||n>Vh)&&l.body.error!==gm&&r.destroy(),e(l)}))})),r.on("error",(e=>{r.destroy(),t(new Error(e.toString()))}))}))},Ob=(e,t,r,i)=>{let n;try{n=JSON.parse(i)}catch(i){let o,s;e>=Yh&&e<=Qh?(o="client_error",s="A client"):e>=Xh&&e<=ef?(o="server_error",s="A server"):(o="unknown_error",s="An unknown"),n={error:o,error_description:`${s} error occured.\nHttp status code: ${e}\nHttp status message: ${t||"Unknown"}\nHeaders: ${JSON.stringify(r)}`}}return n},zb="invalid_file_extension",Nb="invalid_file_path",qb="invalid_managed_identity_id_type",Ub="invalid_secret",Lb="missing_client_id",jb="network_unavailable",Hb="platform_not_supported",$b="unable_to_create_azure_arc",Gb="unable_to_create_cloud_shell",Wb="unable_to_create_source",Kb="unable_to_read_secret_file",Vb="user_assigned_not_available_at_runtime",Jb="www_authenticate_header_missing",Yb="www_authenticate_header_unsupported_format",Qb={[rm]:"azure_pod_identity_authority_host_url_malformed",[im]:"identity_endpoint_url_malformed",[nm]:"imds_endpoint_url_malformed",[om]:"msi_endpoint_url_malformed"},Zb={[zb]:"The file path in the WWW-Authenticate header does not contain a .key file.",[Nb]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[qb]:"More than one ManagedIdentityIdType was provided.",[Ub]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[Hb]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[Lb]:"A ManagedIdentityId id was not provided.",[Qb.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The Managed Identity's '${rm}' environment variable is malformed.`,[Qb.IDENTITY_ENDPOINT]:`The Managed Identity's '${im}' environment variable is malformed.`,[Qb.IMDS_ENDPOINT]:`The Managed Identity's '${nm}' environment variable is malformed.`,[Qb.MSI_ENDPOINT]:`The Managed Identity's '${om}' environment variable is malformed.`,[jb]:"Authentication unavailable. The request to the managed identity endpoint timed out.",[$b]:"Azure Arc Managed Identities can only be system assigned.",[Gb]:"Cloud Shell Managed Identities can only be system assigned.",[Wb]:"Unable to create a Managed Identity source based on environment variables.",[Kb]:"Unable to read the secret file.",[Vb]:"Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",[Jb]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",[Yb]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format."};class Xb extends Um{constructor(e){super(e,Zb[e]),this.name="ManagedIdentityError",Object.setPrototypeOf(this,Xb.prototype)}}function ew(e){return new Xb(e)}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
const tw={code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},rw={code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},iw={code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},nw={code:"no_loopback_server_exists",desc:"No loopback server exists yet."},ow={code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},sw={code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},aw={code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},lw={code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."};class dw extends Um{constructor(e,t){super(e,t),this.name="NodeAuthError"}static createInvalidLoopbackAddressTypeError(){return new dw(tw.code,`${tw.desc}`)}static createUnableToLoadRedirectUrlError(){return new dw(rw.code,`${rw.desc}`)}static createNoAuthCodeInResponseError(){return new dw(iw.code,`${iw.desc}`)}static createNoLoopbackServerExistsError(){return new dw(nw.code,`${nw.desc}`)}static createLoopbackServerAlreadyExistsError(){return new dw(ow.code,`${ow.desc}`)}static createLoopbackServerTimeoutError(){return new dw(sw.code,`${sw.desc}`)}static createStateNotFoundError(){return new dw(aw.code,aw.desc)}static createThumbprintMissingError(){return new dw(lw.code,lw.desc)}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
const cw={clientId:Gh.EMPTY_STRING,authority:Gh.DEFAULT_AUTHORITY,clientSecret:Gh.EMPTY_STRING,clientAssertion:Gh.EMPTY_STRING,clientCertificate:{thumbprint:Gh.EMPTY_STRING,thumbprintSha256:Gh.EMPTY_STRING,privateKey:Gh.EMPTY_STRING,x5c:Gh.EMPTY_STRING},knownAuthorities:[],cloudDiscoveryMetadata:Gh.EMPTY_STRING,authorityMetadata:Gh.EMPTY_STRING,clientCapabilities:[],protocolMode:Cy,azureCloudOptions:{azureCloudInstance:Ay,tenant:Gh.EMPTY_STRING},skipAuthorityMetadataCache:!1},uw={claimsBasedCachingEnabled:!1},pw={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info},hw={loggerOptions:pw,networkClient:new Db,proxyUrl:Gh.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},fw={application:{appName:Gh.EMPTY_STRING,appVersion:Gh.EMPTY_STRING}};var mw,gw=new Uint8Array(16);function yw(){if(!mw&&!(mw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mw(gw)}const vw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const bw=function(e){return"string"==typeof e&&vw.test(e)};for(var ww=[],_w=0;_w<256;++_w)ww.push((_w+256).toString(16).substr(1));const xw=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(ww[e[t+0]]+ww[e[t+1]]+ww[e[t+2]]+ww[e[t+3]]+"-"+ww[e[t+4]]+ww[e[t+5]]+"-"+ww[e[t+6]]+ww[e[t+7]]+"-"+ww[e[t+8]]+ww[e[t+9]]+"-"+ww[e[t+10]]+ww[e[t+11]]+ww[e[t+12]]+ww[e[t+13]]+ww[e[t+14]]+ww[e[t+15]]).toLowerCase();if(!bw(r))throw TypeError("Stringified UUID is invalid");return r};const Sw=function(e,t,r){var i=(e=e||{}).random||(e.rng||yw)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=i[n];return t}return xw(i)};
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class kw{generateGuid(){return Sw()}isGuid(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}}var Ew=__webpack_require__(48287).Buffer;
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */class Tw{static base64Encode(e,t){return Ew.from(e,t).toString("base64")}static base64EncodeUrl(e,t){return Tw.base64Encode(e,t).replace(/=/g,Gh.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(e){return Ew.from(e,"base64").toString("utf8")}static base64DecodeUrl(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return Tw.base64Decode(t)}}var Bw=__webpack_require__(91565);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Cw{sha256(e){return Bw.createHash(pm).update(e).digest()}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Iw{constructor(){this.hashUtils=new Cw}async generatePkceCodes(){const e=this.generateCodeVerifier();return{verifier:e,challenge:this.generateCodeChallengeFromVerifier(e)}}generateCodeVerifier(){const e=[],t=256-256%hm.length;for(;e.length<=32;){const r=Bw.randomBytes(1)[0];if(r>=t)continue;const i=r%hm.length;e.push(hm[i])}const r=e.join(Gh.EMPTY_STRING);return Tw.base64EncodeUrl(r)}generateCodeChallengeFromVerifier(e){return Tw.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Aw{constructor(){this.pkceGenerator=new Iw,this.guidGenerator=new kw,this.hashUtils=new Cw}base64UrlEncode(){throw new Error("Method not implemented.")}encodeKid(){throw new Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(e){return Tw.base64Encode(e)}base64Decode(e){return Tw.base64Decode(e)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw new Error("Method not implemented.")}removeTokenBindingKey(){throw new Error("Method not implemented.")}clearKeystore(){throw new Error("Method not implemented.")}signJwt(){throw new Error("Method not implemented.")}async hashString(e){return Tw.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Fw{static deserializeJSONBlob(e){return e?JSON.parse(e):{}}static deserializeAccounts(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,realm:i.realm,localAccountId:i.local_account_id,username:i.username,authorityType:i.authority_type,name:i.name,clientInfo:i.client_info,lastModificationTime:i.last_modification_time,lastModificationApp:i.last_modification_app,tenantProfiles:i.tenantProfiles?.map((e=>JSON.parse(e)))},o=new Uv;Gv.toObject(o,n),t[r]=o})),t}static deserializeIdTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm};t[r]=n})),t}static deserializeAccessTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm,target:i.target,cachedAt:i.cached_at,expiresOn:i.expires_on,extendedExpiresOn:i.extended_expires_on,refreshOn:i.refresh_on,keyId:i.key_id,tokenType:i.token_type,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash};t[r]=n})),t}static deserializeRefreshTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,familyId:i.family_id,target:i.target,realm:i.realm};t[r]=n})),t}static deserializeAppMetadata(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r];t[r]={clientId:i.client_id,environment:i.environment,familyId:i.family_id}})),t}static deserializeAllCache(e){return{accounts:e.Account?this.deserializeAccounts(e.Account):{},idTokens:e.IdToken?this.deserializeIdTokens(e.IdToken):{},accessTokens:e.AccessToken?this.deserializeAccessTokens(e.AccessToken):{},refreshTokens:e.RefreshToken?this.deserializeRefreshTokens(e.RefreshToken):{},appMetadata:e.AppMetadata?this.deserializeAppMetadata(e.AppMetadata):{}}}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Mw{static serializeJSONBlob(e){return JSON.stringify(e)}static serializeAccounts(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,realm:i.realm,local_account_id:i.localAccountId,username:i.username,authority_type:i.authorityType,name:i.name,client_info:i.clientInfo,last_modification_time:i.lastModificationTime,last_modification_app:i.lastModificationApp,tenantProfiles:i.tenantProfiles?.map((e=>JSON.stringify(e)))}})),t}static serializeIdTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm}})),t}static serializeAccessTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm,target:i.target,cached_at:i.cachedAt,expires_on:i.expiresOn,extended_expires_on:i.extendedExpiresOn,refresh_on:i.refreshOn,key_id:i.keyId,token_type:i.tokenType,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash}})),t}static serializeRefreshTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,family_id:i.familyId,target:i.target,realm:i.realm}})),t}static serializeAppMetadata(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={client_id:i.clientId,environment:i.environment,family_id:i.familyId}})),t}static serializeAllCache(e){return{Account:this.serializeAccounts(e.accounts),IdToken:this.serializeIdTokens(e.idTokens),AccessToken:this.serializeAccessTokens(e.accessTokens),RefreshToken:this.serializeRefreshTokens(e.refreshTokens),AppMetadata:this.serializeAppMetadata(e.appMetadata)}}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Dw extends Gv{constructor(e,t,r,i){super(t,r,e,i),this.cache={},this.changeEmitters=[],this.logger=e}registerChangeEmitter(e){this.changeEmitters.push(e)}emitChange(){this.changeEmitters.forEach((e=>e.call(null)))}cacheToInMemoryCache(e){const t={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(const r in e){const i=e[r];if("object"==typeof i)if(i instanceof Uv)t.accounts[r]=i;else if(gv(i))t.idTokens[r]=i;else if(mv(i))t.accessTokens[r]=i;else if(yv(i))t.refreshTokens[r]=i;else{if(!Sv(r,i))continue;t.appMetadata[r]=i}}return t}inMemoryCacheToCache(e){let t=this.getCache();return t={...t,...e.accounts,...e.idTokens,...e.accessTokens,...e.refreshTokens,...e.appMetadata},t}getInMemoryCache(){this.logger.trace("Getting in-memory cache");return this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache");const t=this.inMemoryCacheToCache(e);this.setCache(t),this.emitChange()}getCache(){return this.logger.trace("Getting cache key-value store"),this.cache}setCache(e){this.logger.trace("Setting cache key value store"),this.cache=e,this.emitChange()}getItem(e){this.logger.tracePii(`Item key: ${e}`);return this.getCache()[e]}setItem(e,t){this.logger.tracePii(`Item key: ${e}`);const r=this.getCache();r[e]=t,this.setCache(r)}getAccountKeys(){const e=this.getInMemoryCache();return Object.keys(e.accounts)}getTokenKeys(){const e=this.getInMemoryCache();return{idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){const t=this.getCachedAccountEntity(e);return t&&Uv.isAccountEntity(t)?this.updateOutdatedCachedAccount(e,t):null}getCachedAccountEntity(e){return this.getItem(e)?Object.assign(new Uv,this.getItem(e)):null}setAccount(e){const t=e.generateAccountKey();this.setItem(t,e)}getIdTokenCredential(e){const t=this.getItem(e);return gv(t)?t:null}setIdTokenCredential(e){const t=hv(e);this.setItem(t,e)}getAccessTokenCredential(e){const t=this.getItem(e);return mv(t)?t:null}setAccessTokenCredential(e){const t=hv(e);this.setItem(t,e)}getRefreshTokenCredential(e){const t=this.getItem(e);return yv(t)?t:null}setRefreshTokenCredential(e){const t=hv(e);this.setItem(t,e)}getAppMetadata(e){const t=this.getItem(e);return Sv(e,t)?t:null}setAppMetadata(e){const t=function({environment:e,clientId:t}){return[Ef,e,t].join(xf).toLowerCase()}(e);this.setItem(t,e)}getServerTelemetry(e){const t=this.getItem(e);return t&&function(e,t){const r=0===e.indexOf(Df.CACHE_KEY);let i=!0;return t&&(i=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),r&&i}(e,t)?t:null}setServerTelemetry(e,t){this.setItem(e,t)}getAuthorityMetadata(e){const t=this.getItem(e);return t&&function(e,t){return!!t&&0===e.indexOf(Bf)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,t)?t:null}getAuthorityMetadataKeys(){return this.getKeys().filter((e=>this.isAuthorityMetadata(e)))}setAuthorityMetadata(e,t){this.setItem(e,t)}getThrottlingCache(e){const t=this.getItem(e);return t&&function(e,t){let r=!1;e&&(r=0===e.indexOf(zf));let i=!0;return t&&(i=t.hasOwnProperty("throttleTime")),r&&i}(e,t)?t:null}setThrottlingCache(e,t){this.setItem(e,t)}removeItem(e){this.logger.tracePii(`Item key: ${e}`);let t=!1;const r=this.getCache();return r[e]&&(delete r[e],t=!0),t&&(this.setCache(r),this.emitChange()),t}removeOutdatedAccount(e){this.removeItem(e)}containsKey(e){return this.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys");const e=this.getCache();return[...Object.keys(e)]}async clear(){this.logger.trace("Clearing cache entries created by MSAL");this.getKeys().forEach((e=>{this.removeItem(e)})),this.emitChange()}static generateInMemoryCache(e){return Fw.deserializeAllCache(Fw.deserializeJSONBlob(e))}static generateJsonCache(e){return Mw.serializeAllCache(e)}updateCredentialCacheKey(e,t){const r=hv(t);if(e!==r){const i=this.getItem(e);if(i)return this.removeItem(e),this.setItem(r,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),r;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
const Rw={},Pw={},Ow={},zw={},Nw={};class qw{constructor(e,t,r){this.cacheHasChanged=!1,this.storage=e,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),r&&(this.persistence=r),this.logger=t}hasChanged(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");let e=Mw.serializeAllCache(this.storage.getInMemoryCache());return this.cacheSnapshot?(this.logger.trace("Reading cache snapshot from disk"),e=this.mergeState(JSON.parse(this.cacheSnapshot),e)):this.logger.trace("No cache snapshot to merge"),this.cacheHasChanged=!1,JSON.stringify(e)}deserialize(e){if(this.logger.trace("Deserializing JSON to in-memory cache"),this.cacheSnapshot=e,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk");const e=Fw.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(e)}else this.logger.trace("No cache snapshot to deserialize")}getKVStore(){return this.storage.getCache()}async getAllAccounts(){let e;this.logger.trace("getAllAccounts called");try{return this.persistence&&(e=new Sb(this,!0),await this.persistence.beforeCacheAccess(e)),this.storage.getAllAccounts()}finally{this.persistence&&e&&await this.persistence.afterCacheAccess(e)}}async getAccountByHomeId(e){const t=await this.getAllAccounts();return e&&t&&t.length&&t.filter((t=>t.homeAccountId===e))[0]||null}async getAccountByLocalId(e){const t=await this.getAllAccounts();return e&&t&&t.length&&t.filter((t=>t.localAccountId===e))[0]||null}async removeAccount(e){let t;this.logger.trace("removeAccount called");try{this.persistence&&(t=new Sb(this,!0),await this.persistence.beforeCacheAccess(t)),await this.storage.removeAccount(Uv.generateAccountCacheKey(e))}finally{this.persistence&&t&&await this.persistence.afterCacheAccess(t)}}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(e,t){this.logger.trace("Merging in-memory cache with cache snapshot");const r=this.mergeRemovals(e,t);return this.mergeUpdates(r,t)}mergeUpdates(e,t){return Object.keys(t).forEach((r=>{const i=t[r];if(e.hasOwnProperty(r)){const t=null!==i,n="object"==typeof i,o=!Array.isArray(i),s=void 0!==e[r]&&null!==e[r];t&&n&&o&&s?this.mergeUpdates(e[r],i):e[r]=i}else null!==i&&(e[r]=i)})),e}mergeRemovals(e,t){this.logger.trace("Remove updated entries in cache");const r=e.Account?this.mergeRemovalsDict(e.Account,t.Account):e.Account,i=e.AccessToken?this.mergeRemovalsDict(e.AccessToken,t.AccessToken):e.AccessToken,n=e.RefreshToken?this.mergeRemovalsDict(e.RefreshToken,t.RefreshToken):e.RefreshToken,o=e.IdToken?this.mergeRemovalsDict(e.IdToken,t.IdToken):e.IdToken,s=e.AppMetadata?this.mergeRemovalsDict(e.AppMetadata,t.AppMetadata):e.AppMetadata;return{...e,Account:r,AccessToken:i,RefreshToken:n,IdToken:o,AppMetadata:s}}mergeRemovalsDict(e,t){const r={...e};return Object.keys(e).forEach((e=>{t&&t.hasOwnProperty(e)||delete r[e]})),r}overlayDefaults(e){return this.logger.trace("Overlaying input cache with the default cache"),{Account:{...Rw,...e.Account},IdToken:{...Pw,...e.IdToken},AccessToken:{...Ow,...e.AccessToken},RefreshToken:{...zw,...e.RefreshToken},AppMetadata:{...Nw,...e.AppMetadata}}}}var Uw=__webpack_require__(44040);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Lw{static fromAssertion(e){const t=new Lw;return t.jwt=e,t}static fromCertificate(e,t,r){const i=new Lw;return i.privateKey=t,i.thumbprint=e,i.useSha256=!1,r&&(i.publicCertificate=this.parseCertificate(r)),i}static fromCertificateWithSha256Thumbprint(e,t,r){const i=new Lw;return i.privateKey=t,i.thumbprint=e,i.useSha256=!0,r&&(i.publicCertificate=this.parseCertificate(r)),i}getJwt(e,t,r){if(this.privateKey&&this.thumbprint)return this.jwt&&!this.isExpired()&&t===this.issuer&&r===this.jwtAudience?this.jwt:this.createJwt(e,t,r);if(this.jwt)return this.jwt;throw wy(ny)}createJwt(e,t,r){this.issuer=t,this.jwtAudience=r;const i=cv();this.expirationTime=i+600;const n={alg:this.useSha256?Em:km},o=this.useSha256?Tm:Bm;Object.assign(n,{[o]:Tw.base64EncodeUrl(this.thumbprint,"hex")}),this.publicCertificate&&Object.assign(n,{[Cm]:this.publicCertificate});const s={[Im]:this.jwtAudience,[Am]:this.expirationTime,[Fm]:this.issuer,[Mm]:this.issuer,[Dm]:i,[Rm]:e.createNewGuid()};return this.jwt=Uw.sign(s,this.privateKey,{header:n}),this.jwt}isExpired(){return this.expirationTime<cv()}static parseCertificate(e){const t=/-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs,r=[];let i;for(;null!==(i=t.exec(e));)r.push(i[1].replace(/\r*\n/g,Gh.EMPTY_STRING));return r}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
const jw="2.15.0";
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Hw extends db{constructor(e){super(e)}async acquireToken(e){this.logger.info("in acquireToken call in username-password client");const t=cv(),r=await this.executeTokenRequest(this.authority,e),i=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);i.validateTokenResponse(r.body);return i.handleServerTokenResponse(r.body,this.authority,t,e)}async executeTokenRequest(e,t){const r=this.createTokenQueryParameters(t),i=xy.appendQueryString(e.tokenEndpoint,r),n=await this.createTokenRequestBody(t),o=this.createTokenRequestHeaders({credential:t.username,type:ob}),s={clientId:this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return this.executePostToTokenEndpoint(i,n,o,s,t.correlationId)}async createTokenRequestBody(e){const t=new ab;t.addClientId(this.config.authOptions.clientId),t.addUsername(e.username),t.addPassword(e.password),t.addScopes(e.scopes),t.addResponseTypeForTokenAndIdToken(),t.addGrantType(gf),t.addClientInfo(),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&t.addServerTelemetry(this.serverTelemetryManager);const r=e.correlationId||this.config.cryptoInterface.createNewGuid();t.addCorrelationId(r),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret);const i=this.config.clientCredentials.clientAssertion;return i&&(t.addClientAssertion(await Eb(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(i.assertionType)),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.username&&t.addCcsUpn(e.username),t.createQueryString()}}var $w=__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */class Gw{constructor(e){this.config=function({auth:e,broker:t,cache:r,system:i,telemetry:n}){const o={...hw,networkClient:new Db(i?.proxyUrl,i?.customAgentOptions),loggerOptions:i?.loggerOptions||pw,disableInternalRetries:i?.disableInternalRetries||!1};if(e.clientCertificate&&!e.clientCertificate.thumbprint&&!e.clientCertificate.thumbprintSha256)throw dw.createStateNotFoundError();return{auth:{...cw,...e},broker:{...t},cache:{...uw,...r},system:{...o,...i},telemetry:{...fw,...n}}}(e),this.cryptoProvider=new Aw,this.logger=new Qm(this.config.system.loggerOptions,"@azure/msal-node",jw),this.storage=new Dw(this.logger,this.config.auth.clientId,this.cryptoProvider,function(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch(e){throw Tg(fg)}return{canonicalAuthority:e.authority?Iv(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}(this.config.auth)),this.tokenCache=new qw(this.storage,this.logger,this.config.cache.cachePlugin)}async getAuthCodeUrl(e){this.logger.info("getAuthCodeUrl called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e),responseMode:e.responseMode||ff.QUERY,authenticationScheme:Rf.BEARER},r=await this.buildOauthClientConfiguration(t.authority,t.correlationId,void 0,void 0,e.azureCloudOptions),i=new Tb(r);return this.logger.verbose("Auth code client created",t.correlationId),i.getAuthCodeUrl(t)}async acquireTokenByCode(e,t){this.logger.info("acquireTokenByCode called"),e.state&&t&&(this.logger.info("acquireTokenByCode - validating state"),this.validateState(e.state,t.state||""),t={...t,state:""});const r={...e,...await this.initializeBaseRequest(e),authenticationScheme:Rf.BEARER},i=this.initializeServerTelemetryManager(xm,r.correlationId);try{const n=await this.buildOauthClientConfiguration(r.authority,r.correlationId,i,void 0,e.azureCloudOptions),o=new Tb(n);return this.logger.verbose("Auth code client created",r.correlationId),await o.acquireToken(r,t)}catch(e){throw e instanceof Um&&e.setCorrelationId(r.correlationId),i.cacheFailedRequest(e),e}}async acquireTokenByRefreshToken(e){this.logger.info("acquireTokenByRefreshToken called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e),authenticationScheme:Rf.BEARER},r=this.initializeServerTelemetryManager(Sm,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Bb(i);return this.logger.verbose("Refresh token client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenSilent(e){const t={...e,...await this.initializeBaseRequest(e),forceRefresh:e.forceRefresh||!1},r=this.initializeServerTelemetryManager(bm,t.correlationId,t.forceRefresh);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Cb(i);return this.logger.verbose("Silent flow client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenByUsernamePassword(e){this.logger.info("acquireTokenByUsernamePassword called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e)},r=this.initializeServerTelemetryManager(wm,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Hw(i);return this.logger.verbose("Username password client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}getTokenCache(){return this.logger.info("getTokenCache called"),this.tokenCache}validateState(e,t){if(!e)throw dw.createStateNotFoundError();if(e!==t)throw wy(zg)}getLogger(){return this.logger}setLogger(e){this.logger=e}async buildOauthClientConfiguration(e,t,r,i,n){this.logger.verbose("buildOauthClientConfiguration called",t);const o=n||this.config.auth.azureCloudOptions,s=await this.createAuthority(e,t,i,o);this.logger.info(`Building oauth client configuration with the following authority: ${s.tokenEndpoint}.`,t),r?.updateRegionDiscoveryMetadata(s.regionDiscoveryMetadata);return{authOptions:{clientId:this.config.auth.clientId,authority:s,clientCapabilities:this.config.auth.clientCapabilities},loggerOptions:{logLevel:this.config.system.loggerOptions.logLevel,loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,correlationId:t},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.cryptoProvider,networkInterface:this.config.system.networkClient,storageInterface:this.storage,serverTelemetryManager:r,clientCredentials:{clientSecret:this.clientSecret,clientAssertion:await this.getClientAssertion(s)},libraryInfo:{sku:fm,version:jw,cpu:$w.arch||Gh.EMPTY_STRING,os:$w.platform||Gh.EMPTY_STRING},telemetry:this.config.telemetry,persistencePlugin:this.config.cache.cachePlugin,serializableCache:this.tokenCache}}async getClientAssertion(e){return this.developerProvidedClientAssertion&&(this.clientAssertion=Lw.fromAssertion(await Eb(this.developerProvidedClientAssertion,this.config.auth.clientId,e.tokenEndpoint))),this.clientAssertion&&{assertion:this.clientAssertion.getJwt(this.cryptoProvider,this.config.auth.clientId,e.tokenEndpoint),assertionType:mm}}async initializeBaseRequest(e){return this.logger.verbose("initializeRequestScopes called",e.correlationId),e.authenticationScheme&&e.authenticationScheme===Rf.POP&&this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request",e.correlationId),e.authenticationScheme=Rf.BEARER,this.config.cache.claimsBasedCachingEnabled&&e.claims&&!Bg.isEmptyObj(e.claims)&&(e.requestedClaimsHash=await this.cryptoProvider.hashString(e.claims)),{...e,scopes:[...e&&e.scopes||[],...tf],correlationId:e&&e.correlationId||this.cryptoProvider.createNewGuid(),authority:e.authority||this.config.auth.authority}}initializeServerTelemetryManager(e,t,r){const i={clientId:this.config.auth.clientId,correlationId:t,apiId:e,forceRefresh:r||!1};return new jm(i,this.storage)}async createAuthority(e,t,r,i){this.logger.verbose("createAuthority called",t);const n=Cv.generateAuthority(e,i),o={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,azureRegionConfiguration:r,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};return lb(n,this.config.system.networkClient,this.storage,o,this.logger,t)}clearCache(){this.storage.clear()}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Ww{async listenForAuthCode(e,t){if(this.server)throw dw.createLoopbackServerAlreadyExistsError();return new Promise(((r,i)=>{this.server=Ab.createServer(((n,o)=>{const s=n.url;if(!s)return o.end(t||"Error occurred loading redirectUrl"),void i(dw.createUnableToLoadRedirectUrlError());if(s===Gh.FORWARD_SLASH)return void o.end(e||"Auth code was successfully acquired. You can close this window now.");const a=this.getRedirectUri(),l=_y(new URL(s,a).search)||{};l.code&&(o.writeHead(Jh,{location:a}),o.end()),l.error&&o.end(t||`Error occurred: ${l.error}`),r(l)})),this.server.listen(0,"127.0.0.1")}))}getRedirectUri(){if(!this.server||!this.server.listening)throw dw.createNoLoopbackServerExistsError();const e=this.server.address();if(!e||"string"==typeof e||!e.port)throw this.closeServer(),dw.createInvalidLoopbackAddressTypeError();const t=e&&e.port;return`${ym}${vm}:${t}`}closeServer(){this.server&&(this.server.close(),"function"==typeof this.server.closeAllConnections&&this.server.closeAllConnections(),this.server.unref(),this.server=void 0)}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Kw extends db{constructor(e){super(e)}async acquireToken(e){const t=await this.getDeviceCode(e);e.deviceCodeCallback(t);const r=cv(),i=await this.acquireTokenWithDeviceCode(e,t),n=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return n.validateTokenResponse(i),n.handleServerTokenResponse(i,this.authority,r,e)}async getDeviceCode(e){const t=this.createExtraQueryParameters(e),r=xy.appendQueryString(this.authority.deviceCodeEndpoint,t),i=this.createQueryString(e),n=this.createTokenRequestHeaders(),o={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return this.executePostRequestToDeviceCodeEndpoint(r,i,n,o)}createExtraQueryParameters(e){const t=new ab;return e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),t.createQueryString()}async executePostRequestToDeviceCodeEndpoint(e,t,r,i){const{body:{user_code:n,device_code:o,verification_uri:s,expires_in:a,interval:l,message:d}}=await this.networkManager.sendPostRequest(i,e,{body:t,headers:r});return{userCode:n,deviceCode:o,verificationUri:s,expiresIn:a,interval:l,message:d}}createQueryString(e){const t=new ab;return t.addScopes(e.scopes),t.addClientId(this.config.authOptions.clientId),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),t.createQueryString()}continuePolling(e,t,r){if(r)throw this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"),wy(Jg);if(t&&t<e&&cv()>t)throw this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${t}`),wy(ay);if(cv()>e)throw t&&this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${t}`),this.logger.error(`Device code expired. Expiration time of device code was ${e}`),wy(Yg);return!0}async acquireTokenWithDeviceCode(e,t){const r=this.createTokenQueryParameters(e),i=xy.appendQueryString(this.authority.tokenEndpoint,r),n=this.createTokenRequestBody(e,t),o=this.createTokenRequestHeaders(),s=e.timeout?cv()+e.timeout:void 0,a=cv()+t.expiresIn,l=1e3*t.interval;for(;this.continuePolling(a,s,e.cancel);){const t={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},r=await this.executePostToTokenEndpoint(i,n,o,t,e.correlationId);if(!r.body||!r.body.error)return this.logger.verbose("Authorization completed successfully. Polling stopped."),r.body;if(r.body.error!==Gh.AUTHORIZATION_PENDING)throw this.logger.info("Unexpected error in polling from the server"),d=Nm,c=r.body.error,new Um(d,c?`${qm[d]} ${c}`:qm[d]);this.logger.info("Authorization pending. Continue polling."),await pv(l)}var d,c;throw this.logger.error("Polling stopped for unknown reasons."),wy(Qg)}createTokenRequestBody(e,t){const r=new ab;r.addScopes(e.scopes),r.addClientId(this.config.authOptions.clientId),r.addGrantType(vf),r.addDeviceCode(t.deviceCode);const i=e.correlationId||this.config.cryptoInterface.createNewGuid();return r.addCorrelationId(i),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&r.addServerTelemetry(this.serverTelemetryManager),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),r.createQueryString()}}
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
class Vw extends Gw{constructor(e){super(e),this.config.broker.nativeBrokerPlugin&&(this.config.broker.nativeBrokerPlugin.isBrokerAvailable?(this.nativeBrokerPlugin=this.config.broker.nativeBrokerPlugin,this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions)):this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.")),this.skus=jm.makeExtraSkuString({libraryName:fm,libraryVersion:jw})}async acquireTokenByDeviceCode(e){this.logger.info("acquireTokenByDeviceCode called",e.correlationId);const t=Object.assign(e,await this.initializeBaseRequest(e)),r=this.initializeServerTelemetryManager(_m,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Kw(i);return this.logger.verbose("Device code client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenInteractive(e){const t=e.correlationId||this.cryptoProvider.createNewGuid();this.logger.trace("acquireTokenInteractive called",t);const{openBrowser:r,successTemplate:i,errorTemplate:n,windowHandle:o,loopbackClient:s,...a}=e;if(this.nativeBrokerPlugin){const r={...a,clientId:this.config.auth.clientId,scopes:e.scopes||tf,redirectUri:`${ym}${vm}`,authority:e.authority||this.config.auth.authority,correlationId:t,extraParameters:{...a.extraQueryParameters,...a.tokenQueryParameters,[Vm]:this.skus},accountId:a.account?.nativeAccountId};return this.nativeBrokerPlugin.acquireTokenInteractive(r,o)}const{verifier:l,challenge:d}=await this.cryptoProvider.generatePkceCodes(),c=s||new Ww;let u={},p=null;try{const o=c.listenForAuthCode(i,n).then((e=>{u=e})).catch((e=>{p=e})),s=await this.waitForRedirectUri(c),h={...a,correlationId:t,scopes:e.scopes||tf,redirectUri:s,responseMode:ff.QUERY,codeChallenge:d,codeChallengeMethod:hf.S256},f=await this.getAuthCodeUrl(h);if(await r(f),await o,p)throw p;if(u.error)throw new Jm(u.error,u.error_description,u.suberror);if(!u.code)throw dw.createNoAuthCodeInResponseError();const m=u.client_info,g={code:u.code,codeVerifier:l,clientInfo:m||Gh.EMPTY_STRING,...h};return await this.acquireTokenByCode(g)}finally{c.closeServer()}}async acquireTokenSilent(e){const t=e.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",t),this.nativeBrokerPlugin){const r={...e,clientId:this.config.auth.clientId,scopes:e.scopes||tf,redirectUri:`${ym}${vm}`,authority:e.authority||this.config.auth.authority,correlationId:t,extraParameters:{...e.tokenQueryParameters,[Vm]:this.skus},accountId:e.account.nativeAccountId,forceRefresh:e.forceRefresh||!1};return this.nativeBrokerPlugin.acquireTokenSilent(r)}return super.acquireTokenSilent(e)}async signOut(e){if(this.nativeBrokerPlugin&&e.account.nativeAccountId){const t={clientId:this.config.auth.clientId,accountId:e.account.nativeAccountId,correlationId:e.correlationId||this.cryptoProvider.createNewGuid()};await this.nativeBrokerPlugin.signOut(t)}await this.getTokenCache().removeAccount(e.account)}async getAllAccounts(){if(this.nativeBrokerPlugin){const e=this.cryptoProvider.createNewGuid();return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,e)}return this.getTokenCache().getAllAccounts()}async waitForRedirectUri(e){return new Promise(((t,r)=>{let i=0;const n=setInterval((()=>{if(Om/Pm<i)return clearInterval(n),void r(dw.createLoopbackServerTimeoutError());try{const r=e.getRedirectUri();return clearInterval(n),void t(r)}catch(e){return e instanceof Um&&e.errorCode===nw.code?void i++:(clearInterval(n),void r(e))}}),Pm)}))}}__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
const Jw="client_id",Yw="object_id",Qw="mi_res_id";class Zw{constructor(e,t,r,i){this.logger=e,this.nodeStorage=t,this.networkClient=r,this.cryptoProvider=i}async getServerTokenResponseAsync(e,t,r,i){return this.getServerTokenResponse(e)}getServerTokenResponse(e){let t,r;e.body.expires_on&&(r=e.body.expires_on-cv(),r>7200&&(t=r/2));return{status:e.status,access_token:e.body.access_token,expires_in:r,scope:e.body.resource,token_type:e.body.token_type,refresh_in:t,correlation_id:e.body.correlation_id||e.body.correlationId,error:"string"==typeof e.body.error?e.body.error:e.body.error?.code,error_description:e.body.message||("string"==typeof e.body.error?e.body.error_description:e.body.error?.message),error_codes:e.body.error_codes,timestamp:e.body.timestamp,trace_id:e.body.trace_id}}async acquireTokenWithManagedIdentity(e,t,r,i){const n=this.createRequest(e.resource,t),o=n.headers;o[nf]=Gh.URL_FORM_CONTENT_TYPE;const s={headers:o};Object.keys(n.bodyParameters).length&&(s.body=n.computeParametersBodyString());const a=cv();let l;try{l=n.httpMethod===cm?await this.networkClient.sendPostRequestAsync(n.computeUri(),s):await this.networkClient.sendGetRequestAsync(n.computeUri(),s)}catch(e){throw e instanceof Um?e:wy(Dg)}const d=new kb(t.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),c=await this.getServerTokenResponseAsync(l,this.networkClient,n,s);return d.validateTokenResponse(c,i),d.handleServerTokenResponse(c,r,a,e)}getManagedIdentityUserAssignedIdQueryParameterKey(e){switch(e){case sm:return this.logger.info("[Managed Identity] Adding user assigned client id to the request."),Jw;case am:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request."),Qw;case lm:return this.logger.info("[Managed Identity] Adding user assigned object id to the request."),Yw;default:throw ew(qb)}}}Zw.getValidatedEnvVariableUrlString=(e,t,r,i)=>{try{return new xy(t).urlString}catch(t){throw i.info(`[Managed Identity] ${r} managed identity is unavailable because the '${e}' environment variable is malformed.`),ew(Qb[e])}};__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */__webpack_require__(23313);var Xw=__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */
|
||
Xw.env.ProgramData,Xw.env.ProgramFiles;__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */__webpack_require__(65606);
|
||
/*! @azure/msal-node v2.15.0 2024-10-03 */const e_="1.0.0",t_=!k.Platform.isAndroidApp&&(0,k.requireApiVersion)("0.13.26")||k.Platform.isAndroidApp&&(0,k.requireApiVersion)("0.14.6"),r_=["User.Read","Files.ReadWrite","offline_access"],i_=`obsidian://${Q}`,n_={accessToken:"",clientID:B,authority:C,refreshToken:"",accessTokenExpiresInSeconds:0,accessTokenExpiresAtTime:0,deltaLink:"",username:"",credentialsShouldBeDeletedAtTime:0,emptyFile:"skip",kind:"onedrivefull"};const o_=(e,t)=>{const r=`/drive/root:/${t}`;let i=e;return"/"===e||""===e?r:(i.endsWith("/")&&(i=i.slice(0,i.length-1)),i.startsWith("/")?(console.warn(`why the path ${i} starts with '/'? but we just go on.`),i=`${r}${i}`):i=`${r}/${i}`,i)},s_=(e,t)=>{var r,i,n;let o="";const s=`/drive/root:/${t}`,a=`/drive/root:/${encodeURIComponent(t)}`;if(void 0===e.parentReference||null===e.parentReference||void 0===e.parentReference.path||null===e.parentReference.path)throw Error("x.parentReference.path is undefinded or null");const l=`${null===(r=e.parentReference)||void 0===r?void 0:r.path}/${e.name}`,d=l.startsWith(s),c=l.startsWith(a);if(d)o=l.substring(s.length+1);else{if(!c)throw Error(`we meet file/folder and do not know how to deal with it:\n${(e=>{var t,r,i;return null===(t=e.parentReference)||void 0===t||t.path,e.name,`parentPath="${null!==(i=null===(r=e.parentReference)||void 0===r?void 0:r.path)&&void 0!==i?i:"(no parentReference or path)"}", selfName="${e.name}"`})(e)}`);o=l.substring(a.length+1)}const u="folder"in e;u&&(o=`${o}/`);const p=null===(i=null==e?void 0:e.fileSystemInfo)||void 0===i?void 0:i.lastModifiedDateTime;if(null==p)throw Error(`onedrive cannot parse mtime: ${JSON.stringify(e,null,2)}`);let h=null===(n=null==e?void 0:e.fileSystemInfo)||void 0===n?void 0:n.createdDateTime;null==h&&(h=p);return{key:o,keyRaw:o,mtimeSvr:Date.parse(p),mtimeCli:Date.parse(p),ctimeCli:Date.parse(h),size:u?0:e.size,sizeRaw:u?0:e.size,synthesizedFile:!1}};class a_{constructor(e,t){this.onedriveFullConfig=e,this.saveUpdatedConfigFunc=t}getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.onedriveFullConfig.accessTokenExpiresAtTime>e)return this.onedriveFullConfig.accessToken;{const o=yield(t=this.onedriveFullConfig.clientID,i=this.onedriveFullConfig.authority,n=this.onedriveFullConfig.refreshToken,r(void 0,void 0,void 0,(function*(){try{const e=yield(0,k.request)({url:`${i}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:new URLSearchParams({tenant:"consumers",client_id:t,scope:r_.join(" "),refresh_token:n,grant_type:"refresh_token"}).toString()}),r=JSON.parse(e);return r.error,r}catch(e){throw console.error(e),e}})));if(void 0!==o.error){const e=o;throw Error(`Error while refreshing accessToken: ${e.error}, ${e.error_codes}: ${e.error_description}`)}const s=o;return this.onedriveFullConfig.accessToken=s.access_token,this.onedriveFullConfig.refreshToken=s.refresh_token,this.onedriveFullConfig.accessTokenExpiresInSeconds=s.expires_in,this.onedriveFullConfig.accessTokenExpiresAtTime=e+1e3*s.expires_in-12e4,yield this.saveUpdatedConfigFunc(),console.info("Onedrive accessToken updated"),this.onedriveFullConfig.accessToken}var t,i,n}))}}const l_=e=>{const t=m()(e);return t.accessToken="x",t.accessTokenExpiresInSeconds=1,t.accessTokenExpiresAtTime=1,t};class d_ extends Mp{constructor(e,t,r){super(),this.kind="onedrivefull",this.onedriveFullConfig=e,this.remoteBaseDir=this.onedriveFullConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.authGetter=new a_(e,r),this.foldersCreatedBefore=new Set}_init(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throw Error("The user has not manually auth yet.");if(this.vaultFolderExists);else{const e=yield this._getJson("/drive/root/children");this.vaultFolderExists=e.value.filter((e=>e.name===this.remoteBaseDir)).length>0,this.vaultFolderExists||(console.info(`remote does not have folder /${this.remoteBaseDir}`),yield this._postJson("/drive/root/children",{name:`${this.remoteBaseDir}`,folder:{},"@microsoft.graph.conflictBehavior":"replace"}),console.info(`remote folder /${this.remoteBaseDir} created`),this.vaultFolderExists=!0)}}))}_buildUrl(e){let t="";if(e.startsWith("http://")||e.startsWith("https://"))t=e;else{t=`https://graph.microsoft.com/v1.0${encodeURI(e)}`}return t=t.replace(/#/g,"%23"),t}_getJson(e){return r(this,void 0,void 0,(function*(){const t=this._buildUrl(e);return console.debug(`getJson, theUrl=${t}`),JSON.parse(yield(0,k.request)({url:t,method:"GET",contentType:"application/json",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`,"Cache-Control":"no-cache"}}))}))}_postJson(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);return console.debug(`postJson, theUrl=${r}`),JSON.parse(yield(0,k.request)({url:r,method:"POST",contentType:"application/json",body:JSON.stringify(t),headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}))}))}_patchJson(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);return console.debug(`patchJson, theUrl=${r}`),JSON.parse(yield(0,k.request)({url:r,method:"PATCH",contentType:"application/json",body:JSON.stringify(t),headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}))}))}_deleteJson(e){return r(this,void 0,void 0,(function*(){const t=this._buildUrl(e);console.debug(`deleteJson, theUrl=${t}`),t_?yield(0,k.requestUrl)({url:t,method:"DELETE",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}):yield fetch(t,{method:"DELETE",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}})}))}_putArrayBuffer(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);console.debug(`putArrayBuffer, theUrl=${r}`);{const e=yield fetch(r,{method:"PUT",body:t,headers:{"Content-Type":I,Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}});return yield e.json()}}))}_putUint8ArrayByRange(e,t,i,n,o){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);console.debug(`putUint8ArrayByRange, theUrl=${r}, range=${i}-${n-1}, len=${n-i}, size=${o}`);{const e=yield fetch(r,{method:"PUT",body:t.subarray(i,n),headers:{"Content-Length":""+(n-i),"Content-Range":`bytes ${i}-${n-1}/${o}`,"Content-Type":I}});return yield e.json()}}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e="@odata.nextLink",t="@odata.deltaLink";let r=yield this._getJson(`/drive/root:/${this.remoteBaseDir}:/delta`);const i=r.value;for(;e in r;)r=yield this._getJson(r[e]),i.push(...m()(r.value));t in r&&(this.onedriveFullConfig.deltaLink=r[t],yield this.saveUpdatedConfigFunc());const n=i.map((e=>s_(e,this.remoteBaseDir))).filter((e=>"/"!==e.key));return n}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();const e="@odata.deltaLink",t=yield this._getJson(`/drive/root:/${this.remoteBaseDir}:/delta`),r=t.value;e in t&&(this.onedriveFullConfig.deltaLink=t[e],yield this.saveUpdatedConfigFunc());const i=r.map((e=>s_(e,this.remoteBaseDir))).filter((e=>"/"!==e.key));return i}))}stat(e){return r(this,void 0,void 0,(function*(){return yield this._init(),yield this._statFromRoot(o_(e,this.remoteBaseDir))}))}_statFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield this._getJson(`${e}?$select=cTag,eTag,fileSystemInfo,folder,file,name,parentReference,size`);return s_(t,this.remoteBaseDir)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not call mkdir on ${e}`);yield this._init();const r=o_(e,this.remoteBaseDir);return console.debug(`mkdir uploadFolder=${r}`),yield this._mkdirFromRoot(r,t,i)}))}_mkdirFromRoot(e,t,i){return r(this,void 0,void 0,(function*(){if(this.foldersCreatedBefore.has(e));else{const r={folder:{},"@microsoft.graph.conflictBehavior":"replace"},n={};if(void 0!==t&&0!==t){const e=new Date(t).toISOString();n.lastModifiedDateTime=e}if(void 0!==i&&0!==i){const e=new Date(i).toISOString();n.createdDateTime=e}Object.keys(n).length>0&&(r.fileSystemInfo=n),yield this._patchJson(e,r)}return yield this._statFromRoot(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`you should not call writeFile on ${e}`);yield this._init();const r=o_(e,this.remoteBaseDir);return console.debug(`uploadFile=${r}`),yield this._writeFileFromRoot(r,t,i,n,e,this.onedriveFullConfig.emptyFile)}))}_writeFileFromRoot(e,t,i,n,o,s){return r(this,void 0,void 0,(function*(){if(0===t.byteLength){if("error"===s)throw Error(`${o}: Empty file is not allowed in OneDrive, and please write something in it.`);return{key:o,keyRaw:o,mtimeSvr:i,mtimeCli:i,ctimeCli:n,size:0,sizeRaw:0,synthesizedFile:!0}}const r=new Date(n).toISOString(),a=new Date(i).toISOString(),l=6553600;if(t.byteLength<4e6)yield this._putArrayBuffer(`${e}:/content?${new URLSearchParams({"@microsoft.graph.conflictBehavior":"replace"})}`,t),0!==i&&0!==n&&(yield this._patchJson(e,{fileSystemInfo:{lastModifiedDateTime:a,createdDateTime:r}}));else{let o={item:{"@microsoft.graph.conflictBehavior":"replace"}};0!==i&&0!==n&&(o={item:{"@microsoft.graph.conflictBehavior":"replace",fileSystemInfo:{lastModifiedDateTime:a,createdDateTime:r}}});const s=yield this._postJson(`${e}:/createUploadSession`,o),d=s.uploadUrl;console.debug("uploadSession = "),console.debug(s);const c=new Uint8Array(t);let u=0;for(;u<c.byteLength;)yield this._putUint8ArrayByRange(d,c,u,Math.min(u+l,c.byteLength),c.byteLength),u+=l}return yield this._statFromRoot(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){if(yield this._init(),e.endsWith("/"))throw new Error(`you should not call readFile on folder ${e}`);const t=o_(e,this.remoteBaseDir);return yield this._readFileFromRoot(t)}))}_readFileFromRoot(e){return r(this,void 0,void 0,(function*(){const t=(yield this._getJson(`${e}?$select=@microsoft.graph.downloadUrl`))["@microsoft.graph.downloadUrl"];return yield(yield fetch(t,{cache:"no-store"})).arrayBuffer()}))}rename(e,t){return r(this,void 0,void 0,(function*(){if(""===e||"/"===e||""===t||"/"===t)return;const r=o_(e,this.remoteBaseDir),i=o_(t,this.remoteBaseDir);yield this._init(),yield this._patchJson(r,{name:i})}))}rm(e){return r(this,void 0,void 0,(function*(){if(""===e||"/"===e)return;const t=o_(e,this.remoteBaseDir);yield this._init(),yield this._deleteJson(t)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{if("<unknown display name>"===(yield this.getUserDisplayName()))throw Error("unknown display name!")}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){yield this._init();return(yield this._getJson("/me?$select=displayName")).displayName||"<unknown display name>"}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}getRevokeAddr(){return r(this,void 0,void 0,(function*(){return"https://account.live.com/consent/Manage"}))}allowEmptyFile(){return!1}}var c_=__webpack_require__(85403),u_=__webpack_require__.n(c_);const p_={accessToken:"",hostname:"eapi.pcloud.com",locationid:2,credentialsShouldBeDeletedAtTimeMs:0,emptyFile:"skip",kind:"pcloud"},h_=(e,t)=>{if(void 0===e.parentfolderid||0===e.parentfolderid)throw Error(`parentfolderid=${e.parentfolderid} should not be in fromRawResponseToEntity`);let r,i,n,o=e.name,s=0;if(void 0!==t&&""!==t&&"/"!==t){if(!t.endsWith("/"))throw Error(`parentFolderPath=${t} should not be in fromRawResponseToEntity`);o=`${t}${e.name}`}e.isfolder?(o=`${o}/`,n=e.folderid):(s=e.size,r=e.hash,i=`${e.hash}`,n=e.fileid);const a=new Date(e.modified).valueOf();return{key:o,keyRaw:o,mtimeCli:a,mtimeSvr:a,id:n,parentID:e.parentfolderid,isFolder:e.isfolder,size:s,sizeRaw:s,hash:i,hashPCloud:r,parentIDPath:t}},f_=e=>{var t;const r=[],i={};if(void 0===e.contents||0===e.contents.length)return{entities:r,key2Entity:i};let n=[];for(const r of null!==(t=e.contents)&&void 0!==t?t:[])n.push({folderPath:"",itself:r});for(;0!==n.length;){const t=[];for(const{folderPath:o,itself:s}of n){if(s.isfolder&&s.folderid===e.folderid);else{const e=h_(s,o);r.push(e),i[e.keyRaw]=e}if(s.isfolder&&void 0!==s.contents&&s.contents.length>0)for(const e of s.contents)if(""===o||"/"===o){const r={itself:e,folderPath:`${s.name}/`};t.push(r)}else{const r={itself:e,folderPath:`${o}${s.name}/`};t.push(r)}}n=t}return{entities:r,key2Entity:i}};class m_ extends Mp{constructor(e,t,r){super(),this.kind="pcloud",this.pCloudConfig=e,this.remoteBaseDir=this.pCloudConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.keyToPCloudEntity={},this.baseDirID=0,__webpack_require__.g.locationid=e.locationid,this.client=u_().createClient(e.accessToken)}_init(){return r(this,void 0,void 0,(function*(){if(this.vaultFolderExists);else{const e=yield this.client.listfolder(0,{recursive:!1});if(void 0===e.contents)throw Error("cannot listfolder of root!");const t=e.contents.filter((e=>e.isfolder&&e.name===this.remoteBaseDir));if(t.length>0){const e=t[0];this.baseDirID=e.folderid,this.vaultFolderExists=!0}else{const e=yield this.client.createfolder(this.remoteBaseDir,0);this.baseDirID=e.folderid,this.vaultFolderExists=!0}}}))}_getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.pCloudConfig.accessToken)throw Error("The user has not manually auth yet.");return this.pCloudConfig.accessToken}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e=yield this.client.listfolder(this.baseDirID,{recursive:!0}),{entities:t,key2Entity:r}=f_(e);return this.keyToPCloudEntity=Object.assign(this.keyToPCloudEntity,r),t}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();const e=yield this.client.listfolder(this.baseDirID,{recursive:!1}),{entities:t,key2Entity:r}=f_(e);return this.keyToPCloudEntity=Object.assign(this.keyToPCloudEntity,r),t}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToPCloudEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);return t}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not mkdir on key=${e}`);yield this._init();const t=this.keyToPCloudEntity[e],r=null==t?void 0:t.id;if(void 0!==t&&void 0!==r)return t;const i=zp(e);let n,o;if(0===i.length)throw Error(`cannot getFolderLevels of ${e}`);if(1===i.length)o=this.baseDirID,n="";else{if(n=`${i[i.length-2]}/`,!(n in this.keyToPCloudEntity))throw Error(`parent of ${e}: ${n} is not created before??`);o=this.keyToPCloudEntity[n].id}let s=i[i.length-1];s=s.split("/").pop();const a=yield this.client.createfolder(s,o),l=h_(a,n);return this.keyToPCloudEntity[e]=l,l}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`should not call writeFile on ${e}`);yield this._init();const r=this.keyToPCloudEntity[e];null==r||r.id;let o,s;const a=zp(e);if(0===a.length)o=this.baseDirID,s="";else{if(s=`${a[a.length-1]}/`,!(s in this.keyToPCloudEntity))throw Error(`parent of ${e}: ${s} is not created before??`);o=this.keyToPCloudEntity[s].id}const l=e.split("/").pop(),d=new URLSearchParams({access_token:yield this._getAccessToken(),folderid:`${o}`,filename:l,nopartial:"1",renameifexists:"0",mtime:`${Math.floor(i/1e3)}`,ctime:`${Math.floor(n/1e3)}`}),c=`https://${this.pCloudConfig.hostname}/uploadfile?${d}`;if(t.byteLength>0){const r=yield fetch(c,{method:"PUT",body:t}),i=yield r.json(),n=h_(i.metadata[0],s);return this.keyToPCloudEntity[e]=n,n}{const r=new AbortController,i=setTimeout((()=>r.abort()),300);try{yield fetch(c,{method:"PUT",body:t,signal:r.signal})}catch(e){}finally{clearTimeout(i)}const n=new URLSearchParams({access_token:yield this._getAccessToken(),path:(u=e,p=this.remoteBaseDir,`/${p}/${u}`)}),o=`https://${this.pCloudConfig.hostname}/stat?${n}`,a=yield fetch(o),l=yield a.json(),d=h_(l.metadata,s);return this.keyToPCloudEntity[e]=d,d}var u,p}))}readFile(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToPCloudEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);const i=new URLSearchParams({access_token:yield this._getAccessToken(),forcedownload:"1",fileid:`${r}`}),n=`https://${this.pCloudConfig.hostname}/getfilelink?${i}`,o=(yield(0,k.requestUrl)(n)).json,s=`https://${o.hosts[0]}${o.path}`;return(yield(0,k.requestUrl)(s)).arrayBuffer}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=this.keyToPCloudEntity[e],r=null==t?void 0:t.id;if(void 0===t||void 0===r)throw Error(`no fileID found for key=${e}`);e.endsWith("/")?yield this.client.deletefolder(r):yield this.client.deletefile(r)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}class g_{constructor(e){this.accessToken=e,this.apiVersion=1,this.host="https://cloud-api.yandex.net"}_api(e,t,i,n,o,s){return r(this,void 0,void 0,(function*(){let r="";void 0!==n&&(r=`?${new URLSearchParams(n)}`);const a=`${this.host}/v${this.apiVersion}/${t}${r}`,l={Authorization:`OAuth ${this.accessToken}`};void 0!==s&&(l["Content-Type"]=s);const d=yield fetch(a,{method:e,headers:l,body:o});if(!(d.status>=200&&d.status<300))throw Error(JSON.stringify(yield d.json()));return"json"===i?yield d.json():"arrayBuffer"===i?yield d.arrayBuffer():"raw"===i?d:void 0}))}disk(){return r(this,void 0,void 0,(function*(){return yield this._api("GET","disk/","json")}))}diskResources(e,t,i,n){return r(this,void 0,void 0,(function*(){const r={path:e};return void 0!==t&&(r.fields=t.join(",")),void 0!==i&&(r.limit=`${i}`),void 0!==n&&(r.offset=`${n}`),yield this._api("GET","disk/resources","json",r)}))}diskResourcesFiles(e,t,i){return r(this,void 0,void 0,(function*(){const r={};return void 0!==e&&(r.fields=e.join(",")),void 0!==t&&(r.limit=`${t}`),void 0!==i&&(r.offset=`${i}`),yield this._api("GET","disk/resources/files","json",r)}))}diskResourcesPatch(e,t,i){return r(this,void 0,void 0,(function*(){const r={path:e};return void 0!==i&&(r.fields=i.join(",")),yield this._api("PATCH","disk/resources","json",r,JSON.stringify({custom_properties:t}),"application/json")}))}diskResoucesUpload(e,t,i){return r(this,void 0,void 0,(function*(){const r={path:e,overwrite:`${null!=i&&i}`},n=yield this._api("GET","disk/resources/upload","json",r);if(n.templated)throw Error(`do not know how to deal with upload link with templated: ${JSON.stringify(n)}`);const o=yield fetch(n.href,{method:n.method,body:t});if(200===o.status||201===o.status||202===o.status)return!0;throw Error(`upload failed. status=${o.status}, link=${n.href}`)}))}diskResoucesDownload(e){return r(this,void 0,void 0,(function*(){const t={path:e},r=yield this._api("GET","disk/resources/download","json",t);if(r.templated)throw Error(`do not know how to deal with download link with templated: ${JSON.stringify(r)}`);const i=yield fetch(r.href,{method:r.method});if(200===i.status||201===i.status||202===i.status)return yield i.arrayBuffer();throw Error(`download failed. status=${i.status}, link=${r.href}`)}))}diskResourcesDelete(e,t){return r(this,void 0,void 0,(function*(){const r={path:e,permanently:`${null!=t&&t}`},i=yield this._api("DELETE","disk/resources","raw",r);if(204!==i.status){if(202===i.status)return yield i.json();throw Error(`do not know how to deal with delete response ${i}`)}}))}diskResourcesPut(e,t){return r(this,void 0,void 0,(function*(){const r={path:e};return void 0!==t&&(r.fields=t.join(",")),yield this._api("PUT","disk/resources","json",r)}))}}const y_={accessToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,refreshToken:"",scope:"",kind:"yandexdisk"},v_=(e,t)=>{let r=e;return"/"===e||""===e?r=`disk:/${t}`:e.startsWith("/")?(console.warn(`why the path ${e} starts with '/'? but we just go on.`),r=`disk:/${t}${e}`):r=`disk:/${t}/${e}`,r.endsWith("/")&&(r=r.slice(0,r.length-1)),r},b_=(e,t)=>{var r,i;const n=((e,t,r)=>{if(e!==`disk:/${t}`&&!e.startsWith(`disk:/${t}/`))throw Error(`"${e}" doesn't starts with "disk:/${t}/"`);let i=e.slice(`disk:/${t}/`.length);return"dir"===r&&(i=`${i}/`),i})(e.path,t,e.type);if("dir"===e.type)return{key:n,keyRaw:n,size:0,sizeRaw:0};return{key:n,keyRaw:n,mtimeCli:Date.parse(null!==(i=null===(r=null==e?void 0:e.custom_properties)||void 0===r?void 0:r.rclone_modified)&&void 0!==i?i:e.modified).valueOf(),mtimeSvr:Date.parse(e.modified).valueOf(),size:e.size,sizeRaw:e.size,hash:e.sha256}},w_=["name","created","modified","path","type","size","sha256","md5","_embedded.limit","_embedded.offset","_embedded.total","_embedded.items.created","_embedded.items.modified","_embedded.items.path","_embedded.items.name","_embedded.items.type","_embedded.items.size","_embedded.items.sha256","_embedded.items.md5","_embedded.items.mime_type","_embedded.items.file","_embedded.items.custom_properties"];class __ extends Mp{constructor(e,t,r){super(),this.kind="yandexdisk",this.yandexDiskConfig=e,this.remoteBaseDir=this.yandexDiskConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r}_init(){return r(this,void 0,void 0,(function*(){var e,t,r,i;const n=yield this._getAccessToken(),o=new g_(n);if(this.vaultFolderExists);else{const n=[];let s=0;const a=100;let l=100;do{const d=yield o.diskResources("disk:/",w_,a,s);n.push(...null!==(t=null===(e=d._embedded)||void 0===e?void 0:e.items)&&void 0!==t?t:[]),l=null!==(i=null===(r=d._embedded)||void 0===r?void 0:r.total)&&void 0!==i?i:0,s+=a}while(s<l);n.filter((e=>e.name===this.remoteBaseDir)).length>0||(yield o.diskResourcesPut(`disk:/${this.remoteBaseDir}`)),this.vaultFolderExists=!0}}))}_getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.yandexDiskConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.yandexDiskConfig.accessTokenExpiresAtTimeMs>e)return this.yandexDiskConfig.accessToken;const t=yield(i=this.yandexDiskConfig.refreshToken,r(void 0,void 0,void 0,(function*(){console.debug("refreshing token");const e=yield fetch("https://oauth.yandex.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:W,client_secret:K,grant_type:"refresh_token",refresh_token:i}).toString()});if(200===e.status){const t=yield e.json();return console.debug("new token obtained"),t}{const t=yield e.json();throw Error(`cannot refresh an access token: ${JSON.stringify(t)}`)}})));var i;return this.yandexDiskConfig.accessToken=t.access_token,this.yandexDiskConfig.accessTokenExpiresInMs=1e3*t.expires_in,this.yandexDiskConfig.accessTokenExpiresAtTimeMs=e+1e3*t.expires_in-12e4,yield this.saveUpdatedConfigFunc(),console.info("Yandex Disk accessToken updated"),this.yandexDiskConfig.accessToken}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e=new vh({concurrency:5,autoStart:!0});e.on("error",(t=>{throw e.pause(),e.clear(),t}));const t=[];let i=["/"];for(;0!==i.length;){const n=[];for(const o of i)e.add((()=>r(this,void 0,void 0,(function*(){const e=yield this._walkFolder(o);for(const r of e)t.push(r),r.keyRaw.endsWith("/")&&n.push(r.keyRaw)}))));yield e.onIdle(),i=n}return t}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();return yield this._walkFolder("/")}))}_walkFolder(e){return r(this,void 0,void 0,(function*(){var t,r,i,n;if(!e.endsWith("/"))throw Error(`should not call _walkFolder on ${e}`);const o=new g_(yield this._getAccessToken()),s=v_(e,this.remoteBaseDir),a=[];let l=0;let d=100;do{const e=yield o.diskResources(s,w_,100,l);a.push(...(null!==(r=null===(t=e._embedded)||void 0===t?void 0:t.items)&&void 0!==r?r:[]).map((e=>b_(e,this.remoteBaseDir)))),d=null!==(n=null===(i=e._embedded)||void 0===i?void 0:i.total)&&void 0!==n?n:0,l+=100}while(l<d);return a}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=new g_(yield this._getAccessToken()),r=v_(e,this.remoteBaseDir),i=yield t.diskResources(r,w_);return b_(i,this.remoteBaseDir)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){yield this._init();const r=new g_(yield this._getAccessToken()),n=v_(e,this.remoteBaseDir);yield r.diskResourcesPut(n,w_);const o={};void 0!==t&&(o.rclone_modified=Vp(t,!0)),void 0!==i&&(o.rclone_created=Vp(i,!0)),Object.keys(o).length>0&&(yield r.diskResourcesPatch(n,o));return yield this.stat(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){yield this._init();const r=new g_(yield this._getAccessToken()),o=v_(e,this.remoteBaseDir);yield r.diskResoucesUpload(o,t,!0);const s={};void 0!==i&&(s.rclone_modified=Vp(i,!0)),void 0!==n&&(s.rclone_created=Vp(n,!0)),Object.keys(s).length>0&&(yield r.diskResourcesPatch(o,s));return yield this.stat(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=new g_(yield this._getAccessToken()),r=v_(e,this.remoteBaseDir);return yield t.diskResoucesDownload(r)}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}rm(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=new g_(yield this._getAccessToken()),r=v_(e,this.remoteBaseDir);yield t.diskResourcesDelete(r,!1)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init()}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw yield this._init(),new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){yield fetch("https://oauth.yandex.com/revoke_token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:W,client_secret:K,access_token:this.yandexDiskConfig.refreshToken}).toString()})}))}allowEmptyFile(){return!0}}function x_(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`should not call ${e} in copyFolder`);const r=yield t.stat(e);return{entity:yield i.mkdir(e,r.mtimeCli),content:void 0}}))}function S_(e,t,i){return r(this,void 0,void 0,(function*(){var r;if(e.endsWith("/"))throw Error(`should not call ${e} in copyFile`);const n=yield t.stat(e),o=yield t.readFile(e);if(void 0===n.size||0===n.size)n.size=o.byteLength;else if(n.size!==o.byteLength)throw Error(`error copying ${t.kind}=>${i.kind}: size not matched`);if(void 0===n.mtimeCli)throw Error(`error copying ${t.kind}=>${i.kind}, no mtimeCli`);return{entity:yield i.writeFile(e,o,n.mtimeCli,null!==(r=n.ctimeCli)&&void 0!==r?r:n.mtimeCli),content:o}}))}var k_=__webpack_require__(73790),E_=__webpack_require__.n(k_),T_=__webpack_require__(98860),B_=__webpack_require__(66604);(0,T_.extendPrototype)(E_()),(0,B_.extendPrototype)(E_());const C_=20240220,I_="remotelysavedb",A_=(e,t,i,n,o)=>r(void 0,void 0,void 0,(function*(){if(t!==i){if(t<20220326)throw Error("You are using a very old version of Remotely Save. No way to auto update internal DB. Please install and enable 0.3.40 firstly, then install a later version.");if(20220326===t&&20240220===i)return yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=20240220;console.debug("start upgrading internal db from 20220326 to 20240220");const n=(e=>{const t=[];for(const r of e){const e={key:r.localKey,keyEnc:r.remoteKey,keyRaw:void 0!==r.remoteKey&&""!==r.remoteKey?r.remoteKey:r.localKey,mtimeCli:r.localMtime,mtimeSvr:r.remoteMtime,size:r.localSize,sizeEnc:r.remoteSize,sizeRaw:void 0!==r.remoteKey&&""!==r.remoteKey?r.remoteSize:r.localSize,etag:r.remoteExtraKey};t.push(e)}return t})(yield F_(e,t));for(const r of n)yield D_(e,t,i,r);yield e.versionTbl.setItem(`${t}\tversion`,r),console.debug("finish upgrading internal db from 20220326 to 20240220")})))(e,n,o);if(i<t)throw Error("You've installed a new version, but then downgrade to an old version. Stop working!");throw Error(`not supported internal db changes from ${t} to ${i}`)}})),F_=(e,t)=>r(void 0,void 0,void 0,(function*(){var i;return yield Promise.all((null!==(i=yield e.syncMappingTbl.keys())&&void 0!==i?i:[]).filter((e=>e.startsWith(`${t}\t`))).map((t=>r(void 0,void 0,void 0,(function*(){return yield e.syncMappingTbl.getItem(t)})))))})),M_=e=>r(void 0,void 0,void 0,(function*(){const t=Date.now()-864e5;let r=(yield e.syncPlansTbl.keys()).map((e=>{const r=Number.parseInt(e.split("\t")[1]);return{ts:r,key:e,expired:r<=t}}));const i=new Set(r.filter((e=>e.expired)).map((e=>e.key)));r.length-i.size>20&&(r=r.filter((e=>!e.expired)),r.sort(((e,t)=>-(e.ts-t.ts))),r.slice(20).forEach((e=>{i.add(e.key)}))),yield e.syncPlansTbl.removeItems(Array.from(i))})),D_=(e,t,i,n)=>r(void 0,void 0,void 0,(function*(){yield e.prevSyncRecordsTbl.setItem(`${t}\t${i}\t${n.key}`,n)})),R_=(e,t,i,n)=>r(void 0,void 0,void 0,(function*(){yield e.prevSyncRecordsTbl.removeItem(`${t}\t${i}\t${n}`)})),P_=(e,t,i)=>r(void 0,void 0,void 0,(function*(){yield e.simpleKVForMiscTbl.setItem(`${t}-lastSuccessSyncMillis`,i)})),O_=(e,t)=>r(void 0,void 0,void 0,(function*(){return yield e.simpleKVForMiscTbl.getItem(`${t}-lastSuccessSyncMillis`)})),z_=(e,t,i)=>r(void 0,void 0,void 0,(function*(){yield e.simpleKVForMiscTbl.setItem(`${t}-lastFailedSyncMillis`,i)})),N_=(e,t)=>r(void 0,void 0,void 0,(function*(){return yield e.simpleKVForMiscTbl.getItem(`${t}-lastFailedSyncMillis`)}));__webpack_require__(48287).Buffer;function q_(e,t){let r={};for(let e=0;e<t.length;e++){const i=t[e];r[i]?r[i].push(e):r[i]=[e]}let i=[{buffer1index:-1,buffer2index:-1,chain:null}];for(let t=0;t<e.length;t++){const n=r[e[t]]||[];let o=0,s=i[0];for(let e=0;e<n.length;e++){const r=n[e];let a;for(a=o;a<i.length&&!(i[a].buffer2index<r&&(a===i.length-1||i[a+1].buffer2index>r));a++);if(a<i.length){const e={buffer1index:t,buffer2index:r,chain:i[a]};if(o===i.length?i.push(s):i[o]=s,o=a+1,s=e,o===i.length)break}}i[o]=s}return i[i.length-1]}function U_(e,t){const r=q_(e,t);let i=[],n=e.length,o=t.length;for(let s=r;null!==s;s=s.chain){const r=n-s.buffer1index-1,a=o-s.buffer2index-1;n=s.buffer1index,o=s.buffer2index,(r||a)&&i.push({buffer1:[n+1,r],buffer1Content:e.slice(n+1,n+1+r),buffer2:[o+1,a],buffer2Content:t.slice(o+1,o+1+a)})}return i.reverse(),i}function L_(e,t,r,i){i=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/},i),"string"==typeof e&&(e=e.split(i.stringSeparator)),"string"==typeof t&&(t=t.split(i.stringSeparator)),"string"==typeof r&&(r=r.split(i.stringSeparator));let n=[];const o=function(e,t,r){let i=[];function n(e,t){i.push({ab:t,oStart:e.buffer1[0],oLength:e.buffer1[1],abStart:e.buffer2[0],abLength:e.buffer2[1]})}U_(t,e).forEach((e=>n(e,"a"))),U_(t,r).forEach((e=>n(e,"b"))),i.sort(((e,t)=>e.oStart-t.oStart));let o=[],s=0;function a(e){e>s&&(o.push({stable:!0,buffer:"o",bufferStart:s,bufferLength:e-s,bufferContent:t.slice(s,e)}),s=e)}for(;i.length;){let n=i.shift(),l=n.oStart,d=n.oStart+n.oLength,c=[n];for(a(l);i.length;){const e=i[0],t=e.oStart;if(t>d)break;d=Math.max(d,t+e.oLength),c.push(i.shift())}if(1===c.length){if(n.abLength>0){const t="a"===n.ab?e:r;o.push({stable:!0,buffer:n.ab,bufferStart:n.abStart,bufferLength:n.abLength,bufferContent:t.slice(n.abStart,n.abStart+n.abLength)})}}else{let i={a:[e.length,-1,t.length,-1],b:[r.length,-1,t.length,-1]};for(;c.length;){n=c.shift();const e=n.oStart,t=e+n.oLength,r=n.abStart,o=r+n.abLength;let s=i[n.ab];s[0]=Math.min(r,s[0]),s[1]=Math.max(o,s[1]),s[2]=Math.min(e,s[2]),s[3]=Math.max(t,s[3])}const s=i.a[0]+(l-i.a[2]),a=i.a[1]+(d-i.a[3]),u=i.b[0]+(l-i.b[2]),p=i.b[1]+(d-i.b[3]);let h={stable:!1,aStart:s,aLength:a-s,aContent:e.slice(s,a),oStart:l,oLength:d-l,oContent:t.slice(l,d),bStart:u,bLength:p-u,bContent:r.slice(u,p)};o.push(h)}s=d}return a(t.length),o}(e,t,r);let s=[];function a(){s.length&&n.push({ok:s}),s=[]}return o.forEach((e=>{e.stable?s.push(...e.bufferContent):i.excludeFalseConflicts&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(e.aContent,e.bContent)?s.push(...e.aContent):(a(),n.push({conflict:{a:e.aContent,aIndex:e.aStart,o:e.oContent,oIndex:e.oStart,b:e.bContent,bIndex:e.bStart}}))})),a(),n}function j_(e,t,r,i){const n="<<<<<<<"+((i=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/,label:{}},i)).label.a?` ${i.label.a}`:""),o=">>>>>>>"+(i.label.b?` ${i.label.b}`:""),s=L_(e,t,r,i);let a=!1,l=[];return s.forEach((e=>{if(e.ok)l=l.concat(e.ok);else{const t=function(e,t){const r=q_(e,t);let i=[],n=e.length,o=t.length,s={common:[]};function a(){s.common.length&&(s.common.reverse(),i.push(s),s={common:[]})}for(let l=r;null!==l;l=l.chain){let r={buffer1:[],buffer2:[]};for(;--n>l.buffer1index;)r.buffer1.push(e[n]);for(;--o>l.buffer2index;)r.buffer2.push(t[o]);(r.buffer1.length||r.buffer2.length)&&(a(),r.buffer1.reverse(),r.buffer2.reverse(),i.push(r)),n>=0&&s.common.push(e[n])}return a(),i.reverse(),i}(e.conflict.a,e.conflict.b);for(let e=0;e<t.length;e++){let r=t[e];r.common?l=l.concat(r.common):(a=!0,l=l.concat([n],r.buffer1,["======="],r.buffer2,[o]))}}})),{conflict:a,result:l}}function H_(e,t){return(void 0===t||e.key===t.key)&&(!e.key.endsWith("/")&&e.sizeRaw<=1e6&&(e.key.endsWith(".md")||e.key.endsWith(".markdown")))}function $_(e,t,r){const{conflict:i,result:n}=j_(e,t,r,{stringSeparator:/\n/});for(let e=0;e<n.length;++e)["<<<<<<<","=======",">>>>>>>"].includes(n[e])&&(n[e]="`"+n[e]+"`");return{conflict:i,result:n}}function G_(e,t){const r=e.trim(),i=t.trim();if(""===r&&""===i)return r.length>=i.length?e:t;if(""===i)return e;if(""===r)return t;const n=function(e,t){const r=e.split("\n");let i=q_(r,t.split("\n"));const n=[];do{n.unshift(r[i.buffer1index]),i=i.chain}while(null!=i&&-1!==i.buffer1index);return n.join("\n")}(e,t);return $_(e,n,t).result.join("\n")}function W_(e,t,i,n){return r(this,void 0,void 0,(function*(){var r,o,s;if(e.endsWith("/"))throw Error(`should not call ${e} in mergeFile`);if(!e.endsWith(".md")&&!e.endsWith(".markdown"))throw Error("currently only support markdown files in mergeFile");const[a,l]=yield Promise.all([t.readFile(e),i.readFile(e)]);let d;const c=new TextDecoder("utf-8");if(Fp()(a,l))d=a;else if(null==n){const e=G_(c.decode(a),c.decode(l));d=(new TextEncoder).encode(e).buffer}else{const e=function(e,t,r){return $_(e,r,t).result.join("\n")}(c.decode(a),c.decode(l),c.decode(n));d=(new TextEncoder).encode(e).buffer}const u=Date.now(),p=yield i.writeFile(e,d,u,u);yield t.writeFile(e,d,null!==(r=p.mtimeCli)&&void 0!==r?r:u,null!==(s=null!==(o=p.ctimeCli)&&void 0!==o?o:p.mtimeCli)&&void 0!==s?s:u);return{entity:p,content:d}}))}function K_(e){if(""===e||"."===e||".."===e||"/"===e||e.endsWith("/"))throw Error(`we cannot rename key=${e}`);const t=e.split("/"),r=t[t.length-1],i=r.split(".");if(0===i.length)throw Error(`we cannot rename key=${e}`);if(1===i.length)t[t.length-1]=`${r}.dup`;else if(2===i.length)""===i[0]?t[t.length-1]=`${r}.dup`:""===i[1]?t[t.length-1]=`${i[0]}.dup`:t[t.length-1]=`${i[0]}.dup.${i[1]}`;else{const e=i.slice(0,i.length-1).join("."),r=i[i.length-1];t[t.length-1]=`${e}.dup.${r}`}return t.join("/")}function V_(e,t,i,n,o,s){return r(this,void 0,void 0,(function*(){var r,a,l,d,c,u;console.debug(`tryDuplicateFileForSameSizes: ${e}`);const p=yield n.readFile(e),h=yield i.readFile(e),f=function(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),i=new Uint8Array(t);for(let e=0;e<r.byteLength;++e)if(r[e]!==i[e])return!1;return!0}(h,p);if(f){console.debug(`tryDuplicateFileForSameSizes: ${e} content equal`);const t=yield n.stat(e),o=yield i.writeFile(e,p,null!==(r=t.mtimeCli)&&void 0!==r?r:Date.now(),null!==(a=t.mtimeCli)&&void 0!==a?a:Date.now());yield s(o)}else{console.debug(`tryDuplicateFileForSameSizes: ${e} content not equal`),yield i.rename(e,t);const r=yield n.stat(e),a=yield i.writeFile(e,p,null!==(l=r.mtimeCli)&&void 0!==l?l:Date.now(),null!==(d=r.mtimeCli)&&void 0!==d?d:Date.now());yield s(a);const f=yield i.stat(t),m=yield n.writeFile(t,h,null!==(c=f.mtimeCli)&&void 0!==c?c:Date.now(),null!==(u=f.mtimeCli)&&void 0!==u?u:Date.now());yield o(m)}}))}function J_(e,t,i,n,o){return r(this,void 0,void 0,(function*(){let s=K_(e),a=!1;do{try{const e=yield t.stat(s);if(null==e)throw Error(`not exist $${s}`);console.debug(`key2=${s} exists, cannot use for new file`),s=K_(s),console.debug(`key2=${s} is prepared for next try`)}catch(e){console.debug(`key2=${s} doesn't exist, usable for new file`),a=!0}}while(!a);const l=yield t.stat(e),d=yield i.stat(e);return void 0!==l&&void 0!==d&&l.sizeRaw===d.sizeRaw?yield V_(e,s,t,i,n,o):yield function(e,t,i,n,o,s){return r(this,void 0,void 0,(function*(){console.debug(`tryDuplicateFileForDiffSizes: ${e}`),yield i.rename(e,t);const[a,l]=yield Promise.all([function(){return r(this,void 0,void 0,(function*(){const e=yield S_(t,i,n);return yield o(e.entity),e.entity}))}(),function(){return r(this,void 0,void 0,(function*(){const t=yield S_(e,n,i);return yield s(t.entity),t.entity}))}()]);return{upload:a,download:l}}))}(e,s,t,i,n,o)}))}const Y_=(e,t,i,n,o)=>r(void 0,void 0,void 0,(function*(){yield e.fileContentHistoryTbl.setItem(`${t}\t${i}\t${n.key}`,o)})),Q_=(e,t,i,n)=>r(void 0,void 0,void 0,(function*(){return yield e.fileContentHistoryTbl.getItem(`${t}\t${i}\t${n.key}`)})),Z_=(e,t,i,n)=>r(void 0,void 0,void 0,(function*(){yield e.fileContentHistoryTbl.removeItem(`${t}\t${i}\t${n}`)})),X_=(e,t)=>{const r=Object.assign({},e);return void 0!==r.mtimeCli&&(0===r.mtimeCli?r.mtimeCli=void 0:("s3"!==t&&"dropbox"!==t||(r.mtimeCli=1e3*Math.floor(r.mtimeCli/1e3)),r.mtimeCliFmt=Vp(r.mtimeCli))),void 0!==r.ctimeCli&&(0===r.ctimeCli?r.ctimeCli=void 0:("s3"!==t&&"dropbox"!==t||(r.ctimeCli=1e3*Math.floor(r.ctimeCli/1e3)),r.ctimeCliFmt=Vp(r.ctimeCli))),void 0!==r.mtimeSvr&&(0===r.mtimeSvr?r.mtimeSvr=void 0:("s3"!==t&&"dropbox"!==t||(r.mtimeSvr=1e3*Math.floor(r.mtimeSvr/1e3)),r.mtimeSvrFmt=Vp(r.mtimeSvr))),void 0!==r.prevSyncTime&&(0===r.prevSyncTime?r.prevSyncTime=void 0:("s3"!==t&&"dropbox"!==t||(r.prevSyncTime=1e3*Math.floor(r.prevSyncTime/1e3)),r.prevSyncTimeFmt=Vp(r.prevSyncTime))),r},ex=e=>{if(!e.key.endsWith("/")&&void 0===e.mtimeCli&&void 0===e.mtimeSvr)throw e.key===e.keyEnc?Error(`Your remote file ${e.key} has last modified time 0, don't know how to deal with it.`):Error(`Your remote file ${e.key} (encrypted as ${e.keyEnc}) has last modified time 0, don't know how to deal with it.`);return e},tx=(e,t)=>{if(!t.startsWith("."))throw Error(`configDir should starts with . but we get ${t}`);return e===t||e.startsWith(`${t}/`)},rx=(e,t,r,i,n,o,s)=>{if(void 0===e)throw Error("checkIsSkipItemOrNotByName meets undefinded key!");let a,l=!1,d=!1;if(void 0!==s&&s.length>0)for(const t of s)""!==t.trim()&&(l=!0,Rp()(t,"A").test(e)&&(d=!0));l&&!d&&(a=!0);let c=!1;if(void 0!==o&&o.length>0)for(const t of o)""!==t.trim()&&Rp()(t,"A").test(e)&&void 0===a&&(c=!0,a=!0);void 0===a&&(t?tx(e,n)&&(a=!1):r&&((e,t)=>{if(!t.startsWith("."))throw Error(`configDir should starts with . but we get ${t}`);return e===t||e===`${t}/`||e===`${t}/bookmarks.json`})(e,n)?a=!1:tx(e,n)&&(a=!0)),Yp(e,[])&&void 0===a&&(c=!0,a=!0);const u=Op(e,!0,!1)||!i&&Op(e,!1,!0)||"/"===e||"_remotely-save-metadata-on-remote.json"===e||"_remotely-save-metadata-on-remote.bin"===e;if(void 0===a&&(c=u,a=u),void 0===a)throw Error(`no finalIsIgnored in checkIsSkipItemOrNotByName for ${e}`);return{enableAllowMode:l,isExplictlyAllowed:d,isExplictlyIgnored:c,finalIsIgnored:a}},ix=(e,t,i,n,o,s,a,l,d,c,u,p)=>r(void 0,void 0,void 0,(function*(){null==p||p.addIndent(),null==p||p.insert("ensembleMixedEnties: enter"),null==p||p.insertSize("sizeof localEntityList",e),null==p||p.insertSize("sizeof prevSyncEntityList",t),null==p||p.insertSize("sizeof remoteEntityList",i);const r={},h={};let f=0;for(const e of i){const t=ex(X_(e,u)),i=t.key,c=rx(i,n,o,a,s,l,d);h[i]=c,c.finalIsIgnored&&!i.startsWith(s)&&(f+=1),r[i]={key:i,remote:t}}if(null==p||p.insert("ensembleMixedEnties: finish remote"),null==p||p.insertSize("sizeof finalMappings",r),Object.keys(r).filter((e=>!e.startsWith(s))).length-f==0||0===e.filter((e=>{var t;return!(null===(t=e.key)||void 0===t?void 0:t.startsWith(s))})).length);else for(const e of t){const t=e.key;if(!(t in h)){const e=rx(t,n,o,a,s,l,d);h[t]=e}const i=yield c.encryptEntity(X_(e,u));r.hasOwnProperty(t)?r[t].prevSync=i:r[t]={key:t,prevSync:i}}null==p||p.insert("ensembleMixedEnties: finish prevSync"),null==p||p.insertSize("sizeof finalMappings",r);for(const t of e){const e=t.key;if(!(e in h)){const t=rx(e,n,o,a,s,l,d);h[e]=t}const i=yield c.encryptEntity(X_(t,u));r.hasOwnProperty(e)?r[e].local=i:r[e]={key:e,local:i}}null==p||p.insert("ensembleMixedEnties: finish local"),null==p||p.insertSize("sizeof finalMappings",r);const m=(e=>{const t=Object.keys(e),r=t.sort(((e,t)=>e.length-t.length)),i=new Set;for(const t of r)if(e[t].isExplictlyIgnored)e[t].finalIsIgnored=!0,i.add(t);else{const r=zp(t,!0).reverse();for(const n of r)if(i.has(n)){e[t].isExplictlyIgnored=!0,e[t].finalIsIgnored=!0,i.add(t);break}}let n=!1;if(t.length>0&&void 0!==t[0]&&void 0!==e[t[0]]&&(n=e[t[0]].enableAllowMode),n)for(let t=0;t<r.length;t++){const n=r[r.length-t-1];if(!e[n].isExplictlyIgnored&&e[n].isExplictlyAllowed){const t=zp(n,!0).reverse();for(const r of t){if(!(r in e)||e[r].isExplictlyIgnored||i.has(r))throw Error(`${n}'s parent ${r} in abnormal state: ${JSON.stringify(e[r])}`);e[r].isExplictlyAllowed=!0,e[r].finalIsIgnored=!1}}}const o=[];for(const t of r)e[t].finalIsIgnored&&o.push(t);return console.debug(`finalIsIgnored list= ${JSON.stringify(o)}`),o})(h);for(const e of m)delete r[e];return null==p||p.insert("ensembleMixedEnties: finish parsing all skip items"),null==p||p.insertSize("sizeof finalMappings",r),null==p||p.insert("ensembleMixedEnties: exit"),null==p||p.removeIndent(),r})),nx=(e,t)=>(void 0!==t&&t>0&&(e.mtimeCli=t),e),ox=(e,t,i,n,o,s,a,l)=>r(void 0,void 0,void 0,(function*(){var d;if("only_history"===n.decision)yield R_(a,t,i,e),"smart_conflict"===l&&(yield Z_(a,t,i,e));else if("local_is_created_too_large_then_do_nothing"===n.decision||"remote_is_created_too_large_then_do_nothing"===n.decision||"folder_to_skip"===n.decision);else if("equal"===n.decision||"conflict_created_then_do_nothing"===n.decision||"folder_existed_both_then_do_nothing"===n.decision){if(void 0!==n.prevSync){if("smart_conflict"===l&&H_(n.local)){const e=yield Q_(a,t,i,n.local);null==e&&(yield Y_(a,t,i,n.local,yield o.readFile(n.local.keyRaw)))}}else if(void 0!==n.remote){let e=n.remote;e=nx(e,null===(d=n.local)||void 0===d?void 0:d.mtimeCli),void 0!==e&&(yield D_(a,t,i,e),"smart_conflict"===l&&H_(e)&&(yield Y_(a,t,i,e,yield o.readFile(e.keyRaw))))}}else if("local_is_modified_then_push"===n.decision||"local_is_created_then_push"===n.decision||"folder_existed_local_then_also_create_remote"===n.decision||"conflict_created_then_keep_local"===n.decision||"conflict_modified_then_keep_local"===n.decision){const e=(yield o.stat(n.key)).mtimeCli,{entity:d,content:c}=yield function(e,t,i){return r(this,void 0,void 0,(function*(){return e.endsWith("/")?yield x_(e,t,i):yield S_(e,t,i)}))}(n.key,o,s);nx(d,e),yield D_(a,t,i,d),"smart_conflict"===l&&H_(d)&&(yield Y_(a,t,i,d,c))}else if("remote_is_modified_then_pull"===n.decision||"remote_is_created_then_pull"===n.decision||"conflict_created_then_keep_remote"===n.decision||"conflict_modified_then_keep_remote"===n.decision||"folder_existed_remote_then_also_create_local"===n.decision){let e,r;if(n.key.endsWith("/"))yield o.mkdir(n.key);else{const{entity:t,content:i}=yield S_(n.key,s,o);e=t,r=i}yield D_(a,t,i,n.remote),"smart_conflict"===l&&H_(n.remote)&&(yield Y_(a,t,i,n.remote,r))}else if("local_is_deleted_thus_also_delete_remote"===n.decision)yield s.rm(n.key),yield R_(a,t,i,n.key),"smart_conflict"===l&&H_(n.remote)&&(yield Z_(a,t,i,n.key));else if("remote_is_deleted_thus_also_delete_local"===n.decision)yield o.rm(n.key),yield R_(a,t,i,n.key),"smart_conflict"===l&&H_(n.local)&&(yield Z_(a,t,i,n.key));else if("conflict_created_then_smart_conflict"===n.decision||"conflict_modified_then_smart_conflict"===n.decision)if(H_(n.local,n.remote)){const e=yield Q_(a,t,i,n.local),{entity:r,content:l}=yield W_(n.key,o,s,e);yield D_(a,t,i,r),yield Y_(a,t,i,r,l)}else{yield R_(a,t,i,n.key);const e=(yield o.stat(n.key)).mtimeCli;yield J_(n.key,o,s,(n=>r(void 0,void 0,void 0,(function*(){void 0!==n&&(nx(n,e),yield D_(a,t,i,n))}))),(e=>r(void 0,void 0,void 0,(function*(){void 0!==e&&(yield D_(a,t,i,e))}))))}else if("folder_to_be_created"===n.decision){yield o.mkdir(n.key);const{entity:e}=yield x_(n.key,o,s);yield D_(a,t,i,e)}else{if("folder_to_be_deleted_on_both"!==n.decision&&"folder_to_be_deleted_on_local"!==n.decision&&"folder_to_be_deleted_on_remote"!==n.decision)throw Error(`don't know how to dispatch decision: ${JSON.stringify(n)}`);"folder_to_be_deleted_on_both"!==n.decision&&"folder_to_be_deleted_on_local"!==n.decision||(yield o.rm(n.key)),"folder_to_be_deleted_on_both"!==n.decision&&"folder_to_be_deleted_on_remote"!==n.decision||(yield s.rm(n.key)),yield R_(a,t,i,n.key)}})),sx=(e,t,i,n,o,s,a,l,d,c,u,p,f)=>r(void 0,void 0,void 0,(function*(){null==c||c.addIndent(),null==c||c.insert("doActualSync: enter"),console.debug(`concurrency === ${s}`);const{onlyMarkSyncedOps:m,folderCreationOps:g,deletionOps:y,uploadDownloads:v,allFilesCount:b,realModifyDeleteCount:w,realTotalCount:_}=(e=>{const t=[],r=[],i=[],n=[],o=Object.keys(e).sort(((e,t)=>t.length-e.length));let s=0,a=0,l=0;for(let d=0;d<o.length;++d){const c=o[d];if("/$@meta"===c)continue;const u=e[c];if(c.endsWith("/")||(s+=1),"local_is_created_too_large_then_do_nothing"===u.decision||"remote_is_created_too_large_then_do_nothing"===u.decision||"folder_to_skip"===u.decision);else if("equal"===u.decision||"conflict_created_then_do_nothing"===u.decision||"folder_existed_both_then_do_nothing"===u.decision)0===t.length||void 0===t[0]||null===t[0]?t[0]=[u]:t[0].push(u);else if("folder_existed_local_then_also_create_remote"===u.decision||"folder_existed_remote_then_also_create_local"===u.decision||"folder_to_be_created"===u.decision){const e=Kp(c),t=r[e-1];null==t?r[e-1]=[u]:t.push(u),l+=1}else if("only_history"===u.decision||"local_is_deleted_thus_also_delete_remote"===u.decision||"remote_is_deleted_thus_also_delete_local"===u.decision||"folder_to_be_deleted_on_both"===u.decision||"folder_to_be_deleted_on_local"===u.decision||"folder_to_be_deleted_on_remote"===u.decision){const e=Kp(c),t=i[e-1];null==t?i[e-1]=[u]:t.push(u),l+=1,u.decision.includes("deleted")&&!u.decision.includes("folder")&&(a+=1)}else{if("local_is_modified_then_push"!==u.decision&&"remote_is_modified_then_pull"!==u.decision&&"local_is_created_then_push"!==u.decision&&"remote_is_created_then_pull"!==u.decision&&"conflict_created_then_keep_local"!==u.decision&&"conflict_created_then_keep_remote"!==u.decision&&"conflict_created_then_smart_conflict"!==u.decision&&"conflict_modified_then_keep_local"!==u.decision&&"conflict_modified_then_keep_remote"!==u.decision&&"conflict_modified_then_smart_conflict"!==u.decision)throw Error(`unknown decision ${u.decision} for ${c}`);0===n.length||void 0===n[0]||null===n[0]?n[0]=[u]:n[0].push(u),l+=1,(u.decision.includes("modified")||u.decision.includes("conflict"))&&(a+=1)}}return i.reverse(),{onlyMarkSyncedOps:t,folderCreationOps:r,deletionOps:i,uploadDownloads:n,allFilesCount:s,realModifyDeleteCount:a,realTotalCount:l}})(e);if(console.debug(`allFilesCount: ${b}`),console.debug(`realModifyDeleteCount: ${w}`),console.debug(`realTotalCount: ${_}`),null==c||c.insert("doActualSync: finish splitting steps"),null==c||c.insertSize("doActualSync: sizeof onlyMarkSyncedOps",m),null==c||c.insertSize("doActualSync: sizeof folderCreationOps",g),null==c||c.insertSize("doActualSync: sizeof realTotalCount",y),console.debug(`protectModifyPercentage: ${a}`),a>=0&&w>=0&&b>0)if(100===a&&w===b);else if(100*w>=b*a){const e=l(a,w,b);throw null==c||c.insert("doActualSync: error branch"),null==c||c.removeIndent(),Error(e)}const x=[m,g,y,v],S=["1. record the items already being synced","2. create all folders from shadowest to deepest","3. delete files and folders from deepest to shadowest",`4. upload or download files in parallel, with the desired concurrency=${s}`];let k=0;for(let e=0;e<x.length;++e){null==c||c.addIndent(),null==c||c.insert(`doActualSync: step ${e} start`),console.debug(S[e]);const a=x[e];for(let e=0;e<a.length;++e){const l=a[e];if(null==l)continue;const c=new vh({concurrency:s,autoStart:!0}),m=[];let g=!1;for(let e=0;e<l.length;++e){const s=l[e],a=s.key,h=()=>r(void 0,void 0,void 0,(function*(){yield null==f?void 0:f(p,k,_,a,s.decision),(void 0===s.change||s.change)&&(k+=1),yield ox(a,n,o,s,t,i,d,u)}));c.add(h).catch((e=>{const t=`${a}: ${e.message}`;m.push(new Error(t)),m.length>=3&&(g=!0,c.pause(),c.clear())}))}if(yield c.onIdle(),m.length>0)throw g&&m.push(new Error("too many errors, stop the remaining tasks")),new h(m)}null==c||c.insert(`doActualSync: step ${e} end`),null==c||c.removeIndent()}null==c||c.insert("doActualSync: exit"),null==c||c.removeIndent()}));function ax(e,t,i,n,o,s,a,l,d,c,u,p,h,f,m,g,y,v,b){return r(this,void 0,void 0,(function*(){var w,_,x,S,k,E,T,B,C,I,A;console.info("startting sync."),f(!0);let F=!0,M=0;try{if(yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){if(console.debug("checkProRunnableAndFixInplace"),void 0===e.pro||void 0===e.pro.refreshToken)throw Error('you need to "connect" to your account to use PRO features');for(const r of e.pro.enabledProFeatures){const n=r.expireAtTimeMs>=Date.now()+3456e6,o=r.expireAtTimeMs<=Date.now();if(n||o){console.info("the pro feature is too far in the future and has expired, check again."),yield ue(e.pro,t,i);break}}const r=[];"smart_conflict"===e.conflictAction&&(1===e.pro.enabledProFeatures.filter((e=>"feature-smart_conflict"===e.featureName)).length||r.push("You're trying to use \"smart conflict\" PRO feature but you haven't subscribe to it."));const n=[{feature:"feature-google_drive",service:"googledrive",name:"Google Drive"},{feature:"feature-onedrive_full",service:"onedrivefull",name:"Onedrive (Full)"},{feature:"feature-box",service:"box",name:"Box"},{feature:"feature-pcloud",service:"pcloud",name:"pCloud"},{feature:"feature-yandex_disk",service:"yandexdisk",name:"Yandex Disk"},{feature:"feature-koofr",service:"koofr",name:"Koofr"},{feature:"feature-azure_blob_storage",service:"azureblobstorage",name:"Azure Blob Storage"}];for(const{feature:t,service:i,name:o}of n)console.debug(`checking "${t}", serviceType=${e.serviceType}`),e.serviceType===i&&(1===e.pro.enabledProFeatures.filter((e=>e.featureName===t)).length||r.push(`You're trying to use "sync with ${o}" PRO feature but you haven't subscribe to it.`));if(0!==r.length)throw Error(r.join("\n\n"));return!0})))(c,u,p),yield null==m?void 0:m(s,M),M=1,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F),null==n||n.insert("start big sync func"),M=2,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F),i.innerFs!==t)throw Error("your enc should has inner of the remote");const f=yield i.isPasswordOk();if(!f.ok)throw Error(f.reason);null==n||n.insert(`finish step${M} (list partial remote and check password)`),M=3,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F);const g=yield i.walk();null==n||n.insert(`finish step${M} (list remote)`),M=4,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F);const D=yield e.walk();null==n||n.insert(`finish step${M} (list local)`),M=5,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F);const R=yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=[],n=yield e.prevSyncRecordsTbl.getItems();for(const e of Object.getOwnPropertyNames(n))if(e.startsWith(`${t}\t${i}\t`)){const t=n[e];null!==t&&r.push(t)}return r})))(o,l,a);null==n||n.insert(`finish step${M} (prev sync)`),M=6,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F);let P=yield ix(D,R,g,null!==(w=c.syncConfigDir)&&void 0!==w&&w,null!==(_=c.syncBookmarks)&&void 0!==_&&_,d,null!==(x=c.syncUnderscoreItems)&&void 0!==x&&x,null!==(S=c.ignorePaths)&&void 0!==S?S:[],null!==(k=c.onlyAllowPaths)&&void 0!==k?k:[],i,c.serviceType,n);null==n||n.insert(`finish step${M} (build partial mixedEntity)`),P=yield((e,t,i,n,o,s,a,l)=>r(void 0,void 0,void 0,(function*(){var r,d,c,u,p,h,f,m;null==o||o.addIndent(),null==o||o.insert("getSyncPlanInplace: enter");const g=Object.keys(e).sort(((e,t)=>t.length-e.length));null==o||o.insert("getSyncPlanInplace: finish sorting"),null==o||o.insertSize("sizeof sortedKeys",g);const y=new Set;for(let s=0;s<g.length;++s){s%100==0&&(null==o||o.insertSize(`sizeof sortedKeys in the beginning of i=${s}`,e));const a=g[s],v=e[a],{local:b,prevSync:w,remote:_}=v;if(a.endsWith("/"))y.has(a)?(y.add(Gp(a)),void 0!==b&&void 0!==_?(v.decisionBranch=101,v.decision="folder_existed_both_then_do_nothing",v.change=!1):void 0!==b&&void 0===_?"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=107,v.decision="folder_to_skip",v.change=!1):(v.decisionBranch=102,v.decision="folder_existed_local_then_also_create_remote",v.change=!0):void 0===b&&void 0!==_?"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=108,v.decision="folder_to_skip",v.change=!1):(v.decisionBranch=103,v.decision="folder_existed_remote_then_also_create_local",v.change=!0):(v.decisionBranch=104,v.decision="folder_to_be_created",v.change=!0),y.delete(a)):void 0!==b&&void 0!==_?(v.decisionBranch=121,v.decision="folder_existed_both_then_do_nothing",v.change=!1,y.add(Gp(a))):void 0!==b&&void 0===_?void 0!==w?"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=122,v.decision="folder_to_skip",y.add(Gp(a)),v.change=!1):"incremental_pull_only"===n?(v.decisionBranch=123,v.decision="folder_to_skip",v.change=!1,y.add(Gp(a))):"incremental_pull_and_delete_only"===n?a===`${l}/`||a===`${l}/bookmarks.json`?(v.decisionBranch=137,v.decision="folder_existed_both_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=135,v.decision="folder_to_be_deleted_on_local",v.change=!0):a===`${l}/`||a===`${l}/bookmarks.json`?(v.decisionBranch=138,v.decision="folder_existed_both_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=124,v.decision="folder_to_be_deleted_on_local",v.change=!0):"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=125,v.decision="folder_existed_local_then_also_create_remote",v.change=!0,y.add(Gp(a))):"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=126,v.decision="folder_to_skip",v.change=!1,y.add(Gp(a))):(v.decisionBranch=127,v.decision="folder_existed_local_then_also_create_remote",v.change=!0,y.add(Gp(a))):void 0===b&&void 0!==_?void 0!==w?"incremental_push_only"===n?(v.decisionBranch=128,v.decision="folder_to_skip",v.change=!1,y.add(Gp(a))):"incremental_push_and_delete_only"===n?(v.decisionBranch=136,v.decision="folder_to_be_deleted_on_remote",v.change=!0):"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=129,v.decision="folder_to_skip",v.change=!1,y.add(Gp(a))):(v.decisionBranch=130,v.decision="folder_to_be_deleted_on_remote",v.change=!0):"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=131,v.decision="folder_to_skip",v.change=!1,y.add(Gp(a))):"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=132,v.decision="folder_existed_remote_then_also_create_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=133,v.decision="folder_existed_remote_then_also_create_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=134,v.decision="folder_to_skip",v.change=!1);else{if(void 0===b&&void 0===_)v.decisionBranch=1,v.decision="only_history",v.change=!1;else if(void 0!==b&&void 0!==_)if(b.mtimeCli!==_.mtimeCli&&b.mtimeCli!==_.mtimeSvr||b.sizeEnc!==_.sizeEnc){const e=(null==w?void 0:w.mtimeCli)===b.mtimeCli&&(null==w?void 0:w.sizeEnc)===b.sizeEnc,o=((null==w?void 0:w.mtimeSvr)===_.mtimeCli||(null==w?void 0:w.mtimeSvr)===_.mtimeSvr)&&(null==w?void 0:w.sizeEnc)===_.sizeEnc;if(e&&!o){if(!(t<=0||_.sizeEnc<=t))throw Error(`remote is modified (branch 9) but size larger than ${t}, don't know what to do: ${JSON.stringify(v)}`);"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=26,v.decision="conflict_modified_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=9,v.decision="remote_is_modified_then_pull",v.change=!0,y.add(Gp(a)))}else if(!e&&o){if(!(t<=0||b.sizeEnc<=t))throw Error(`local is modified (branch 10) but size larger than ${t}, don't know what to do: ${JSON.stringify(v)}`);"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=27,v.decision="conflict_modified_then_keep_remote",v.change=!0,y.add(Gp(a))):(v.decisionBranch=10,v.decision="local_is_modified_then_push",v.change=!0,y.add(Gp(a)))}else if(e||o)v.decisionBranch=21,v.decision="equal",v.change=!1,y.add(Gp(a));else if(void 0===w)if("bidirectional"===n)"keep_newer"===i||"smart_conflict"===i&&a.startsWith(`${l}/`)?(null!==(d=null!==(r=b.mtimeCli)&&void 0!==r?r:b.mtimeSvr)&&void 0!==d?d:0)>=(null!==(u=null!==(c=_.mtimeCli)&&void 0!==c?c:_.mtimeSvr)&&void 0!==u?u:0)?(v.decisionBranch=11,v.decision="conflict_created_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=12,v.decision="conflict_created_then_keep_remote",v.change=!0,y.add(Gp(a))):"keep_larger"===i?b.sizeEnc>=_.sizeEnc?(v.decisionBranch=13,v.decision="conflict_created_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=14,v.decision="conflict_created_then_keep_remote",v.change=!0,y.add(Gp(a))):"smart_conflict"===i&&(v.decisionBranch=302,v.decision="conflict_created_then_smart_conflict",v.change=!0,y.add(Gp(a)));else if("incremental_pull_only"===n||"incremental_pull_and_delete_only"===n)v.decisionBranch=22,v.decision="conflict_created_then_keep_remote",v.change=!0,y.add(Gp(a));else{if("incremental_push_only"!==n&&"incremental_push_and_delete_only"!==n)throw Error(`no idea how to deal with syncDirection=${n} while conflict created`);v.decisionBranch=23,v.decision="conflict_created_then_keep_local",v.change=!0,y.add(Gp(a))}else if("bidirectional"===n)"keep_newer"===i||"smart_conflict"===i&&a.startsWith(`${l}/`)?(null!==(h=null!==(p=b.mtimeCli)&&void 0!==p?p:b.mtimeSvr)&&void 0!==h?h:0)>=(null!==(m=null!==(f=_.mtimeCli)&&void 0!==f?f:_.mtimeSvr)&&void 0!==m?m:0)?(v.decisionBranch=16,v.decision="conflict_modified_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=17,v.decision="conflict_modified_then_keep_remote",v.change=!0,y.add(Gp(a))):"keep_larger"===i?b.sizeEnc>=_.sizeEnc?(v.decisionBranch=18,v.decision="conflict_modified_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=19,v.decision="conflict_modified_then_keep_remote",v.change=!0,y.add(Gp(a))):"smart_conflict"===i&&(v.decisionBranch=301,v.decision="conflict_modified_then_smart_conflict",v.change=!0,y.add(Gp(a)));else if("incremental_pull_only"===n||"incremental_pull_and_delete_only"===n)v.decisionBranch=24,v.decision="conflict_modified_then_keep_remote",v.change=!0,y.add(Gp(a));else{if("incremental_push_only"!==n&&"incremental_push_and_delete_only"!==n)throw Error(`no idea how to deal with syncDirection=${n} while conflict modified`);v.decisionBranch=25,v.decision="conflict_modified_then_keep_local",v.change=!0,y.add(Gp(a))}}else v.decisionBranch=2,v.decision="equal",v.change=!1,y.add(Gp(a));else if(void 0===b&&void 0!==_)if(void 0===w)t<=0||_.sizeEnc<=t?"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=28,v.decision="conflict_created_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=3,v.decision="remote_is_created_then_pull",v.change=!0,y.add(Gp(a))):(v.decisionBranch=36,v.decision="remote_is_created_too_large_then_do_nothing",v.change=!1,y.add(Gp(a)));else if(w.mtimeSvr!==_.mtimeCli&&w.mtimeSvr!==_.mtimeSvr||w.sizeEnc!==_.sizeEnc){if(!(t<=0||_.sizeEnc<=t))throw Error(`remote is modified (branch 5) but size larger than ${t}, don't know what to do: ${JSON.stringify(v)}`);"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=30,v.decision="conflict_created_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=5,v.decision="remote_is_modified_then_pull",v.change=!0,y.add(Gp(a)))}else"incremental_push_only"===n?(v.decisionBranch=29,v.decision="conflict_created_then_do_nothing",v.change=!1,y.add(Gp(a))):"incremental_push_and_delete_only"===n?(v.decisionBranch=38,v.decision="local_is_deleted_thus_also_delete_remote",v.change=!0):"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=35,v.decision="conflict_created_then_keep_remote",v.change=!0,y.add(Gp(a))):(v.decisionBranch=4,v.decision="local_is_deleted_thus_also_delete_remote",v.change=!0);else{if(void 0===b||void 0!==_)throw Error(`should not reach branch -1 while getting sync plan: ${JSON.stringify(v)}`);if(void 0===w)t<=0||b.sizeEnc<=t?"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=31,v.decision="conflict_created_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=6,v.decision="local_is_created_then_push",v.change=!0,y.add(Gp(a))):(v.decisionBranch=37,v.decision="local_is_created_too_large_then_do_nothing",v.change=!1,y.add(Gp(a)));else if(w.mtimeSvr!==b.mtimeCli&&w.mtimeCli!==b.mtimeCli||w.sizeEnc!==b.sizeEnc){if(!(t<=0||b.sizeEnc<=t))throw Error(`local is modified (branch 8) but size larger than ${t}, don't know what to do: ${JSON.stringify(v)}`);"incremental_pull_only"===n||"incremental_pull_and_delete_only"===n?(v.decisionBranch=34,v.decision="conflict_created_then_do_nothing",v.change=!1,y.add(Gp(a))):(v.decisionBranch=8,v.decision="local_is_modified_then_push",v.change=!0,y.add(Gp(a)))}else"incremental_push_only"===n||"incremental_push_and_delete_only"===n?(v.decisionBranch=32,v.decision="conflict_created_then_keep_local",v.change=!0):"incremental_pull_only"===n?(v.decisionBranch=33,v.decision="conflict_created_then_do_nothing",v.change=!1):"incremental_pull_and_delete_only"===n?a===`${l}/`||a===`${l}/bookmarks.json`?(v.decisionBranch=139,v.decision="conflict_created_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=39,v.decision="remote_is_deleted_thus_also_delete_local",v.change=!0):a===`${l}/`||a===`${l}/bookmarks.json`?(v.decisionBranch=140,v.decision="conflict_created_then_keep_local",v.change=!0,y.add(Gp(a))):(v.decisionBranch=7,v.decision="remote_is_deleted_thus_also_delete_local",v.change=!0)}if(void 0===v.decision)throw Error(`unexpectedly no decision of file in the end: ${JSON.stringify(v)}`)}}if(null==o||o.insert("getSyncPlanInplace: finish looping"),y.delete("/"),y.delete(""),y.size>0)throw console.error(g),console.error(e),Error(`unexpectedly keptFolder no decisions: ${[...y]}`);const v=Date.now(),b=Vp(v),w=eh(e);return e["/$@meta"]={key:"/$@meta",sideNotes:{version:"20240714 fs version",generateTime:v,generateTimeFmt:b,service:s.serviceType,concurrency:s.concurrency,hasPassword:""!==s.password,syncConfigDir:s.syncConfigDir,syncBookmarks:s.syncBookmarks,syncUnderscoreItems:s.syncUnderscoreItems,skipSizeLargerThan:s.skipSizeLargerThan,protectModifyPercentage:s.protectModifyPercentage,conflictAction:i,syncDirection:n,triggerSource:a,sizeof:w}},null==o||o.insert("getSyncPlanInplace: exit"),null==o||o.insertSize("sizeof mixedEntityMappings in the end of getSyncPlanInplace",e),null==o||o.removeIndent(),e})))(P,null!==(E=c.skipSizeLargerThan)&&void 0!==E?E:-1,null!==(T=c.conflictAction)&&void 0!==T?T:"keep_newer",null!==(B=c.syncDirection)&&void 0!==B?B:"bidirectional",n,c,s,d),console.debug("mixedEntityMappings:"),console.debug(P),null==n||n.insert("finish building full sync plan"),yield((e,t,i,n)=>r(void 0,void 0,void 0,(function*(){const r=Date.now(),o={ts:r,tsFmt:Vp(r),vaultRandomID:i,remoteType:n,syncPlan:JSON.stringify(t,null,2)};yield e.syncPlansTbl.setItem(`${i}\t${r}`,o)})))(o,P,l,c.serviceType),null==n||n.insert("finish writing sync plan"),null==n||n.insert(`finish step${M} (make plan)`),M=7,"dry"!==s?(yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F),yield sx(P,e,i,l,a,null!==(C=c.concurrency)&&void 0!==C?C:5,null!==(I=c.protectModifyPercentage)&&void 0!==I?I:50,h,o,n,null!==(A=c.conflictAction)&&void 0!==A?A:"keep_newer",s,b),null==n||n.insert(`finish step${M} (actual sync)`)):(yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F),null==n||n.insert(`finish step${M} (skip actual sync because of dry run)`))}catch(e){null==n||n.insert("start error branch"),F=!1,yield null==g?void 0:g(s,e),null==n||n.insert("finish error branch")}null==n||n.insert("finish syncRun"),yield null==n?void 0:n.save(o,l,c.serviceType),M=8,yield null==m?void 0:m(s,M),yield null==y?void 0:y(s,M),yield null==v?void 0:v(s,M,F),console.info("endding sync."),f(!1)}))}var lx=__webpack_require__(48287).Buffer;const dx=e=>{if(null==e)return console.debug("the messy config is null or undefined, skip"),e;if("readme"in e&&"d"in e){return JSON.parse(ie(Wp(e.d),{out:lx.allocUnsafe,loose:!0}).toString("utf-8"))}return e},cx=(e,t)=>{if(!t)return e;const r=JSON.parse(e),i=Object.fromEntries(Object.entries(r).filter((([e,t])=>"/$@meta"===e||(void 0===t.change||!0===t.change))));return JSON.stringify(i,null,2)},ux=(e,t,i,n,o)=>r(void 0,void 0,void 0,(function*(){console.info("exporting sync plans"),yield Np(R,t);const s=yield((e,t)=>r(void 0,void 0,void 0,(function*(){const r=[];return yield e.syncPlansTbl.iterate(((e,i,n)=>{i.startsWith(`${t}\t`)&&r.push(e)})),r.sort(((e,t)=>-(e.ts-t.ts))),void 0===r?[]:r.map((e=>e.syncPlan))})))(e,i);let a="";a=0===s.length?"No sync plans history found":n<=0?"Sync plans found:\n\n"+s.map((e=>"```json\n"+cx(e,o)+"\n```\n")).join("\n"):"Sync plans found:\n\n"+s.map((e=>"```json\n"+cx(e,o)+"\n```\n")).slice(0,n).join("\n");const l=Date.now(),d=`${R}sync_plans_hist_exported_on_${l}.md`;yield t.create(d,a,{mtime:l}),console.info("finish exporting sync plans")})),px=(e,t,i)=>r(void 0,void 0,void 0,(function*(){console.info("exporting profiler results"),yield Np(R,t);const n=yield((e,t)=>r(void 0,void 0,void 0,(function*(){const r=[];return yield e.profilerResultsTbl.iterate(((e,i,n)=>{i.startsWith(`${t}\t`)&&r.push({val:e,ts:Number.parseInt(i.split("\t")[1])})})),r.sort(((e,t)=>-(e.ts-t.ts))),void 0===r?[]:r.map((e=>e.val))})))(e,i);let o="";o=0===n.length?"No profiler results found":"Profiler results found:\n\n"+n.map((e=>"```\n"+e+"\n```\n")).join("\n");const s=Date.now(),a=`${R}profiler_results_exported_on_${s}.md`;yield t.create(a,o,{mtime:s}),console.info("finish exporting profiler results")}));var hx=__webpack_require__(34783),fx=__webpack_require__(58253),mx=__webpack_require__.n(fx);const gx={accessToken:"",clientID:T,refreshToken:"",accessTokenExpiresInSeconds:0,accessTokenExpiresAtTime:0,accountID:"",username:"",credentialsShouldBeDeletedAtTime:0},yx=(e,t)=>{let r=e;return"/"===e||""===e?r=`/${t}`:e.startsWith("/")?(console.warn(`why the path ${e} starts with '/'? but we just go on.`),r=`/${t}${e}`):r=`/${t}/${e}`,r.endsWith("/")&&(r=r.slice(0,r.length-1)),r},vx=(e,t)=>{let r=((e,t)=>{if(e!==`/${t}`&&!e.startsWith(`/${t}/`))throw Error(`"${e}" doesn't starts with "/${t}/"`);return e.slice(`/${t}/`.length)})(e.path_display,t);if("folder"!==e[".tag"]||r.endsWith("/")||(r=`${r}/`),"folder"===e[".tag"])return{key:r,keyRaw:r,size:0,sizeRaw:0};if("file"===e[".tag"]){return{key:r,keyRaw:r,mtimeCli:Date.parse(e.client_modified).valueOf(),mtimeSvr:Date.parse(e.server_modified).valueOf(),size:e.size,sizeRaw:e.size,hash:e.content_hash}}throw Error("do not support deleted tag")};function bx(e){return r(this,arguments,void 0,(function*(e,t=""){const r=[1,2,4,8];for(let i=0;i<r.length;++i)try{return 0!==i&&console.warn(`${""===t?"":t+": "}The ${i+1}-th try starts at time ${Date.now()}`),yield e()}catch(e){const n=e;if(void 0===n.status)throw n;if(429!==n.status)throw n;if(i===r.length-1)throw new Error(`${""===t?"":t+": "}"429 too many requests", after retrying for ${i+1} times still failed.`);const o=$p(n.headers),s=n.error.error.retry_after||Number.parseInt(o["retry-after"]||"1")||1,a=r[i],l=Math.max(s,a),d=Math.max(1.8*l,2);console.warn(`${""===t?"":t+": "}We have "429 too many requests" error of ${i+1}-th try, at time ${Date.now()}, and wait for ${l} ~ ${d} seconds to retry. Original info: ${JSON.stringify(n.error,null,2)}`),yield Zp(mx()(1e3*l,1e3*d))}}))}const wx=(e,t,i,n)=>r(void 0,void 0,void 0,(function*(){try{const r=yield fetch("https://api.dropboxapi.com/oauth2/token",{method:"POST",body:new URLSearchParams({code:i,grant_type:"authorization_code",code_verifier:t,client_id:e,redirect_uri:`obsidian://${M}`})});return yield r.json()}catch(e){console.error(e),void 0!==n&&(yield n(e))}})),_x=(e,t,i)=>r(void 0,void 0,void 0,(function*(){console.info("start updating local info of Dropbox token"),e.accessToken=t.access_token,e.accessTokenExpiresInSeconds=Number.parseInt(t.expires_in),e.accessTokenExpiresAtTime=Date.now()+1e3*Number.parseInt(t.expires_in)-1e4,e.credentialsShouldBeDeletedAtTime=Date.now()+D,void 0!==t.refresh_token&&(e.refreshToken=t.refresh_token,e.accountID=t.account_id),void 0!==i&&(yield i()),console.info("finish updating local info of Dropbox token")}));class xx extends Mp{constructor(e,t,r){super(),this.kind="dropbox",this.dropboxConfig=e,this.remoteBaseDir=this.dropboxConfig.remoteBaseDir||t||"",this.saveUpdatedConfigFunc=r,this.vaultFolderExists=!1,this.foldersCreatedBefore=new Set}_init(){return r(this,void 0,void 0,(function*(){if(""===this.dropboxConfig.accessToken||""===this.dropboxConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now(),t={"Cache-Control":"no-cache"};if(this.dropboxConfig.accessTokenExpiresAtTime>e)this.dropbox=new hx.Dropbox({accessToken:this.dropboxConfig.accessToken,customHeaders:t});else{if(""===this.dropboxConfig.refreshToken)throw Error("We need to automatically refresh token but none is stored.");const e=yield(i=this.dropboxConfig.clientID,n=this.dropboxConfig.refreshToken,r(void 0,void 0,void 0,(function*(){try{console.info("start auto getting refreshed Dropbox access token.");const e=yield fetch("https://api.dropboxapi.com/oauth2/token",{method:"POST",body:new URLSearchParams({grant_type:"refresh_token",refresh_token:n,client_id:i})}),t=yield e.json();return console.info("finish auto getting refreshed Dropbox access token."),t}catch(e){throw console.error(e),e}})));_x(this.dropboxConfig,e,this.saveUpdatedConfigFunc),this.dropbox=new hx.Dropbox({accessToken:this.dropboxConfig.accessToken,customHeaders:t})}var i,n;if(this.vaultFolderExists);else{const e=yield this.dropbox.filesListFolder({path:"",recursive:!1});for(const t of e.result.entries)if(t.path_display===`/${this.remoteBaseDir}`){this.vaultFolderExists=!0;break}if(!this.vaultFolderExists){if(console.info(`remote does not have folder /${this.remoteBaseDir}`),Hp(`/${this.remoteBaseDir}`))throw new Error(`/${this.remoteBaseDir}: Error: Dropbox does not support emoji in folder names.`);yield this.dropbox.filesCreateFolderV2({path:`/${this.remoteBaseDir}`}),console.info(`remote folder /${this.remoteBaseDir} created`),this.vaultFolderExists=!0}}return this}))}walk(){return r(this,void 0,void 0,(function*(){return yield this._walk(!1)}))}walkPartial(){return r(this,void 0,void 0,(function*(){return yield this._walk(!0)}))}_walk(e){return r(this,void 0,void 0,(function*(){yield this._init();let t=yield this.dropbox.filesListFolder({path:`/${this.remoteBaseDir}`,recursive:!e,include_deleted:!1,limit:e?10:1e3});if(200!==t.status)throw Error(JSON.stringify(t));const r=t.result.entries.filter((e=>"deleted"!==e[".tag"])).filter((e=>e.path_display!==`/${this.remoteBaseDir}`)).map((e=>vx(e,this.remoteBaseDir)));if(!e)for(;t.result.has_more;){if(t=yield this.dropbox.filesListFolderContinue({cursor:t.result.cursor}),200!==t.status)throw Error(JSON.stringify(t));const e=t.result.entries.filter((e=>"deleted"!==e[".tag"])).filter((e=>e.path_display!==`/${this.remoteBaseDir}`)).map((e=>vx(e,this.remoteBaseDir)));r.push(...e)}return(e=>{for(const t of e)if(void 0===t.key)throw Error("dropbox list should all have key, but meet undefined");e.sort(((e,t)=>e.key.length-t.key.length));const t={"":""};for(const r of e){let e=Gp(r.key);"/"===e&&(e="");const i=e.toLocaleLowerCase(),n=r.key.split("/");if(r.key.endsWith("/")){if(!t.hasOwnProperty(i))throw Error(`${e} doesn't have cases record??`);{const e=`${t[i]}${n.slice(-2).join("/")}`;t[e.toLocaleLowerCase()]=e,r.key=e}}else{if(!t.hasOwnProperty(i))throw Error(`${e} doesn't have cases record??`);{const e=`${t[i]}${n.slice(-1).join("/")}`;r.key=e}}}})(r),r}))}stat(e){return r(this,void 0,void 0,(function*(){return yield this._init(),yield this._statFromRoot(yx(e,this.remoteBaseDir))}))}_statFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield bx((()=>this.dropbox.filesGetMetadata({path:e})));if(void 0===t)throw Error("dropbox.filesGetMetadata undefinded");if(200!==t.status)throw Error(JSON.stringify(t));return vx(t.result,this.remoteBaseDir)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not call mkdir on ${e}`);yield this._init();const r=yx(e,this.remoteBaseDir);return yield this._mkdirFromRoot(r,t,i)}))}_mkdirFromRoot(e,t,i){return r(this,void 0,void 0,(function*(){var t,r,i;if(Hp(e))throw new Error(`${e}: Error: Dropbox does not support emoji in file / folder names.`);if(null===(t=this.foldersCreatedBefore)||void 0===t?void 0:t.has(e));else try{yield bx((()=>this.dropbox.filesCreateFolderV2({path:e})),e),null===(r=this.foldersCreatedBefore)||void 0===r||r.add(e)}catch(t){const r=t;if(void 0===r.status)throw r;if(409!==r.status)throw r;null===(i=this.foldersCreatedBefore)||void 0===i||i.add(e)}return yield this._statFromRoot(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`you should not call writeFile on ${e}`);yield this._init();const r=yx(e,this.remoteBaseDir);return yield this._writeFileFromRoot(r,t,i,n,e)}))}_writeFileFromRoot(e,t,i,n,o){return r(this,void 0,void 0,(function*(){var r;if(Hp(o))throw new Error(`${o}: Error: Dropbox does not support emoji in file / folder names.`);const s=1e3*Math.floor(i/1e3),a=(Math.floor(n/1e3),new Date(s).toISOString().replace(/\.\d{3}Z$/,"Z"));if(yield bx((()=>this.dropbox.filesUpload({path:e,contents:t,mode:{".tag":"overwrite"},client_modified:a})),o),void 0!==this.foldersCreatedBefore){const e=zp(o).map((e=>yx(e,this.remoteBaseDir)));for(const t of e)null===(r=this.foldersCreatedBefore)||void 0===r||r.add(t)}return yield this._statFromRoot(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){if(yield this._init(),e.endsWith("/"))throw new Error(`you should not call readFile on folder ${e}`);const t=yx(e,this.remoteBaseDir);return yield this._readFileFromRoot(t)}))}_readFileFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield bx((()=>this.dropbox.filesDownload({path:e})),`downloadFromRemoteRaw=${e}`);if(void 0===t)throw Error(`unknown rsp from dropbox download: ${t}`);if(void 0!==t.result.fileBlob){const e=t.result.fileBlob;return yield e.arrayBuffer()}if(void 0!==t.result.fileBinary){const e=t.result.fileBinary;return qp(e)}throw Error(`unknown rsp from dropbox download: ${t}`)}))}rename(e,t){return r(this,void 0,void 0,(function*(){const r=yx(e,this.remoteBaseDir),i=yx(t,this.remoteBaseDir);yield this._init();try{yield bx((()=>this.dropbox.filesMoveV2({from_path:r,to_path:i})),`${e}=>${t}`)}catch(e){console.error("some error while moving"),console.error(e)}}))}rm(e){return r(this,void 0,void 0,(function*(){if("/"===e)return;const t=yx(e,this.remoteBaseDir);yield this._init();try{yield bx((()=>this.dropbox.filesDeleteV2({path:t})),e)}catch(e){console.error("some error while deleting"),console.error(e)}}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{yield this._init();if(void 0===(yield this._statFromRoot(`/${this.remoteBaseDir}`)))throw Error("cannot check root vault folder!")}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){yield this._init();return(yield this.dropbox.usersGetCurrentAccount()).result.name.display_name}))}revokeAuth(){return r(this,void 0,void 0,(function*(){try{return yield this._init(),yield this.dropbox.authTokenRevoke(),!0}catch(e){return!1}}))}allowEmptyFile(){return!0}}const Sx="KNQWY5DFMRPV",kx="U2FsdGVkX",Ex=(e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4){const i=yield window.crypto.subtle.importKey("raw",(new TextEncoder).encode(t),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);return yield window.crypto.subtle.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:"SHA-256"},i,384)})),Tx=(e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4,i=""){let n;n=""!==i?(e=>{const t=e.match(/[\da-f]{2}/gi);if(null===t)throw Error(`input ${e} is not hex, no way to transform`);return new Uint8Array(t.map((e=>Number.parseInt(e,16))))})(i):window.crypto.getRandomValues(new Uint8Array(8));const o=yield Ex(n,t,r),s=o.slice(0,32),a=o.slice(32,48),l=yield window.crypto.subtle.importKey("raw",s,{name:"AES-CBC"},!1,["encrypt","decrypt"]),d=yield window.crypto.subtle.encrypt({name:"AES-CBC",iv:a},l,e),c=(new TextEncoder).encode("Salted__"),u=new Uint8Array([...c,...n,...new Uint8Array(d)]);return qp(u)})),Bx=(e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4){e.slice(0,8);const i=e.slice(8,16),n=yield Ex(new Uint8Array(i),t,r),o=n.slice(0,32),s=n.slice(32,48),a=yield window.crypto.subtle.importKey("raw",o,{name:"AES-CBC"},!1,["encrypt","decrypt"]);return yield window.crypto.subtle.decrypt({name:"AES-CBC",iv:s},a,e.slice(16))}));var Cx=__webpack_require__(88563),Ix=__webpack_require__(55512),Ax=__webpack_require__.n(Ix);function Fx(){return Ax()('(()=>{var t={114:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.AESCipherBlock=e.EMECipher=void 0;const o=r(469);function s(t,e){if(16!==e.length)throw Error("len must be 16");const r=new Uint8Array(16);r[0]=2*e[0],e[15]>=128&&(r[0]=135^r[0]);for(let t=1;t<16;t++)r[t]=2*e[t],e[t-1]>=128&&(r[t]=r[t]+1);t.set(r)}function i(t,e,r){if(e.length!==r.length)throw Error(`input1.length=${e.length} is not equal to input2.length=${r.length}`);for(let n=0;n<e.length;++n)t[n]=e[n]^r[n]}function c(t,e,r,o){return n(this,void 0,void 0,(function*(){r?yield o.encrypt(t,e):yield o.decrypt(t,e)}))}function a(t,e,r,o){return n(this,void 0,void 0,(function*(){const a=e,l=r;if(16!==t.blockSize())throw Error("Using a block size other than 16 is not implemented");if(16!==a.length)throw Error(`Tweak must be 16 bytes long, is ${a.length}`);if(l.length%16!=0)throw Error(`Data P must be a multiple of 16 long, is ${l.length}`);const u=l.length/16;if(0===u||u>128)throw Error(`EME operates on 1 to 128 block-cipher blocks, you passed ${u}`);const h=new Uint8Array(l.length),f=yield function(t,e){return n(this,void 0,void 0,(function*(){const r=new Uint8Array(16),n=new Uint8Array(16);yield t.encrypt(n,r);const o=new Array(e);for(let t=0;t<e;t++)s(n,n),o[t]=new Uint8Array(n);return o}))}(t,u),y=new Uint8Array(16);for(let e=0;e<u;e++){i(y,l.subarray(16*e,16*(e+1)),f[e]),yield c(h.subarray(16*e,16*(e+1)),y,o,t)}const d=new Uint8Array(16);i(d,h.subarray(0,16),a);for(let t=1;t<u;t++)i(d,d,h.subarray(16*t,16*(t+1)));const p=new Uint8Array(16);yield c(p,d,o,t);const g=new Uint8Array(16);i(g,d,p);const b=new Uint8Array(16);for(let t=1;t<u;t++)s(g,g),i(b,h.subarray(16*t,16*(t+1)),g),h.subarray(16*t,16*(t+1)).set(b);const w=new Uint8Array(16);i(w,p,a);for(let t=1;t<u;t++)i(w,w,h.subarray(16*t,16*(t+1)));h.subarray(0,16).set(w);for(let e=0;e<u;e++)yield c(h.subarray(16*e,16*(e+1)),h.subarray(16*e,16*(e+1)),o,t),i(h.subarray(16*e,16*(e+1)),h.subarray(16*e,16*(e+1)),f[e]);return h}))}e.EMECipher=class{constructor(t){this.bc=t}encrypt(t,e){return n(this,void 0,void 0,(function*(){return yield a(this.bc,t,e,!0)}))}decrypt(t,e){return n(this,void 0,void 0,(function*(){return yield a(this.bc,t,e,!1)}))}};e.AESCipherBlock=class{constructor(t){if(this.keyRaw=t,this.iv=new Uint8Array(16),16===t.length)this.algo="aes128";else if(24===t.length)this.algo="aes192";else{if(32!==t.length)throw Error(`invalid key length = ${t.length}`);this.algo="aes256"}}encrypt(t,e){return n(this,void 0,void 0,(function*(){const r=(0,o.ecb)(this.keyRaw,{disablePadding:!0});t.set([...r.encrypt(e)])}))}decrypt(t,e){return n(this,void 0,void 0,(function*(){const r=(0,o.ecb)(this.keyRaw,{disablePadding:!0});t.set([...r.decrypt(e)])}))}blockSize(){return 16}}},563:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.decryptedSize=e.encryptedSize=e.add=e.increment=e.carry=e.Cipher=e.msgErrorSuffixMissingDot=e.msgErrorBadSeek=e.msgErrorNotAnEncryptedFile=e.msgErrorFileClosed=e.msgErrorBadBase32Encoding=e.msgErrorEncryptedBadBlock=e.msgErrorEncryptedBadMagic=e.msgErrorEncryptedFileBadHeader=e.msgErrorEncryptedFileTooShort=e.msgErrorBadDecryptControlChar=e.msgErrorBadDecryptUTF8=void 0;const c=r(663),a=r(190),l=r(489),u=r(819),h=r(114),f=r(211),y=s(r(718)),d="RCLONE\\0\\0",p=(new TextEncoder).encode(d),g=a.xsalsa20poly1305.tagLength,b=65536,w=g+b,m=new Uint8Array([168,13,244,58,143,189,3,8,167,202,184,62,88,31,134,177]);e.msgErrorBadDecryptUTF8="bad decryption - utf-8 invalid",e.msgErrorBadDecryptControlChar="bad decryption - contains control chars",e.msgErrorEncryptedFileTooShort="file is too short to be encrypted",e.msgErrorEncryptedFileBadHeader="file has truncated block header",e.msgErrorEncryptedBadMagic="not an encrypted file - bad magic string",e.msgErrorEncryptedBadBlock="failed to authenticate decrypted block - bad password?",e.msgErrorBadBase32Encoding="bad base32 filename encoding",e.msgErrorFileClosed="file already closed",e.msgErrorNotAnEncryptedFile="not an encrypted file - does not match suffix",e.msgErrorBadSeek="Seek beyond end of file",e.msgErrorSuffixMissingDot="suffix config setting should include a \'.\'";function E(t,e){for(;t<e.length;t++){const r=e[t],n=r+1&255;if(e[t]=n,n>=r)break}}function v(t){return E(0,t)}function x(t){const e=Math.floor(t/b),r=t%b;let n=32+e*(g+b);return 0!==r&&(n+=g+r),n}function A(t){let r=t;if(r-=32,r<0)throw new Error(e.msgErrorEncryptedFileTooShort);const n=Math.floor(r/w);let o=r%w,s=n*b;if(0!==o&&(o-=g,o<=0))throw new Error(e.msgErrorEncryptedFileBadHeader);return s+=o,s}e.Cipher=class{constructor(t){this.dataKey=new Uint8Array(32),this.nameKey=new Uint8Array(32),this.nameTweak=new Uint8Array(16),this.dirNameEncrypt=!0,this.fileNameEnc=t}toString(){return`\\ndataKey=${this.dataKey} \\nnameKey=${this.nameKey}\\nnameTweak=${this.nameTweak}\\ndirNameEncrypt=${this.dirNameEncrypt}\\nfileNameEnc=${this.fileNameEnc}\\n`}encodeToString(t){if("base32"===this.fileNameEnc)return f.base32hex.stringify(t,{pad:!1}).toLowerCase();if("base64"===this.fileNameEnc)return f.base64url.stringify(t,{pad:!1});if("base32768"===this.fileNameEnc)return y.encode(t);throw Error(`unknown fileNameEnc=${this.fileNameEnc}`)}decodeString(t){if("base32"===this.fileNameEnc){if(t.endsWith("="))throw new Error(e.msgErrorBadBase32Encoding);return f.base32hex.parse(t.toUpperCase(),{loose:!0})}if("base64"===this.fileNameEnc)return f.base64url.parse(t,{loose:!0});if("base32768"===this.fileNameEnc)return y.decode(t);throw Error(`unknown fileNameEnc=${this.fileNameEnc}`)}key(t,e){return i(this,void 0,void 0,(function*(){const r=this.dataKey.length+this.nameKey.length+this.nameTweak.length;let n,o=m;return""!==e&&(o=(new TextEncoder).encode(e)),n=""===t?new Uint8Array(r):yield(0,c.scryptAsync)((new TextEncoder).encode(t),o,{N:16384,r:8,p:1,dkLen:r}),this.dataKey.set(n.slice(0,this.dataKey.length)),this.nameKey.set(n.slice(this.dataKey.length,this.dataKey.length+this.nameKey.length)),this.nameTweak.set(n.slice(this.dataKey.length+this.nameKey.length)),this}))}updateInternalKey(t,e,r){return this.dataKey=t,this.nameKey=e,this.nameTweak=r,this}getInternalKey(){return{dataKey:this.dataKey,nameKey:this.nameKey,nameTweak:this.nameTweak}}encryptSegment(t){return i(this,void 0,void 0,(function*(){if(""===t)return"";const e=(0,u.pad)((new TextEncoder).encode(t),16),r=new h.AESCipherBlock(this.nameKey),n=new h.EMECipher(r),o=yield n.encrypt(this.nameTweak,e);return this.encodeToString(o)}))}encryptFileName(t){return i(this,void 0,void 0,(function*(){const e=t.split("/");for(let t=0;t<e.length;++t)(this.dirNameEncrypt||t===e.length-1)&&(e[t]=yield this.encryptSegment(e[t]));return e.join("/")}))}decryptSegment(t){return i(this,void 0,void 0,(function*(){if(""===t)return"";const e=this.decodeString(t),r=new h.AESCipherBlock(this.nameKey),n=new h.EMECipher(r),o=yield n.decrypt(this.nameTweak,e),s=(0,u.unpad)(o);return(new TextDecoder).decode(s)}))}decryptFileName(t){return i(this,void 0,void 0,(function*(){const e=t.split("/");for(let t=0;t<e.length;++t)(this.dirNameEncrypt||t===e.length-1)&&(e[t]=yield this.decryptSegment(e[t]));return e.join("/")}))}encryptData(t,e){return i(this,void 0,void 0,(function*(){let r;r=void 0!==e?e:(0,l.randomBytes)(a.xsalsa20poly1305.nonceLength);const n=new Uint8Array(x(t.byteLength));n.set(p),n.set(r,8);for(let e=0,o=0;e<t.byteLength;e+=b,o+=1){const s=t.slice(e,e+b),i=(0,a.xsalsa20poly1305)(this.dataKey,r).encrypt(s);v(r),n.set(i,32+e+o*g)}return n}))}decryptData(t){return i(this,void 0,void 0,(function*(){if(t.byteLength<32)throw Error(e.msgErrorEncryptedFileTooShort);if(!function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}(t.slice(0,8),p))throw Error(e.msgErrorEncryptedBadMagic);const r=t.slice(8,32),n=new Uint8Array(A(t.byteLength));for(let o=32,s=0,i=0;o<t.byteLength;o+=w,s+=b,i+=1){const i=t.slice(o,o+w),c=(0,a.xsalsa20poly1305)(this.dataKey,r).decrypt(i);if(null===c)throw Error(e.msgErrorEncryptedBadBlock);v(r),n.set(c,s)}return n}))}},e.carry=E,e.increment=v,e.add=function(t,e){let r=BigInt(0);"bigint"==typeof t?r=BigInt.asUintN(64,t):"number"==typeof t&&(r=BigInt.asUintN(64,BigInt(t)));let n=BigInt.asUintN(16,BigInt(0));for(let t=0;t<8;t++){const o=e[t],s=r&BigInt(255);r>>=BigInt(8),n=n+BigInt(o)+BigInt(s),e[t]=Number(n),n>>=BigInt(8)}n!==BigInt(0)&&E(8,e)},e.encryptedSize=x,e.decryptedSize=A},506:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCipher=e.rotl=e.sigma=void 0;const n=r(605),o=r(527),s=t=>Uint8Array.from(t.split("").map((t=>t.charCodeAt(0)))),i=s("expand 16-byte k"),c=s("expand 32-byte k"),a=(0,o.u32)(i),l=(0,o.u32)(c);function u(t){return t.byteOffset%4==0}e.sigma=l.slice(),e.rotl=function(t,e){return t<<e|t>>>32-e};const h=2**32-1,f=new Uint32Array;e.createCipher=function(t,e){const{allowShortKeys:r,extendNonceFn:s,counterLength:i,counterRight:c,rounds:y}=(0,o.checkOpts)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if("function"!=typeof t)throw new Error("core must be a function");return(0,n.number)(i),(0,n.number)(y),(0,n.bool)(c),(0,n.bool)(r),(e,d,p,g,b=0)=>{(0,n.bytes)(e),(0,n.bytes)(d),(0,n.bytes)(p);const w=p.length;if(g||(g=new Uint8Array(w)),(0,n.bytes)(g),(0,n.number)(b),b<0||b>=h)throw new Error("arx: counter overflow");if(g.length<w)throw new Error(`arx: output (${g.length}) is shorter than data (${w})`);const m=[];let E,v,x=e.length;if(32===x)E=e.slice(),m.push(E),v=l;else{if(16!==x||!r)throw new Error(`arx: invalid 32-byte key, got length=${x}`);E=new Uint8Array(32),E.set(e),E.set(e,16),v=a,m.push(E)}u(d)||(d=d.slice(),m.push(d));const A=(0,o.u32)(E);if(s){if(24!==d.length)throw new Error("arx: extended nonce must be 24 bytes");s(v,A,(0,o.u32)(d.subarray(0,16)),A),d=d.subarray(16)}const k=16-i;if(k!==d.length)throw new Error(`arx: nonce must be ${k} or 16 bytes`);if(12!==k){const t=new Uint8Array(12);t.set(d,c?0:12-d.length),d=t,m.push(d)}const U=(0,o.u32)(d);for(!function(t,e,r,n,s,i,c,a){const l=s.length,y=new Uint8Array(64),d=(0,o.u32)(y),p=u(s)&&u(i),g=p?(0,o.u32)(s):f,b=p?(0,o.u32)(i):f;for(let o=0;o<l;c++){if(t(e,r,n,d,c,a),c>=h)throw new Error("arx: counter overflow");const u=Math.min(64,l-o);if(p&&64===u){const t=o/4;if(o%4!=0)throw new Error("arx: invalid block position");for(let e,r=0;r<16;r++)e=t+r,b[e]=g[e]^d[r];o+=64}else{for(let t,e=0;e<u;e++)t=o+e,i[t]=s[t]^y[e];o+=u}}}(t,v,A,U,p,g,b,y);m.length>0;)m.pop().fill(0);return g}}},605:(t,e)=>{"use strict";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if("boolean"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function o(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function s(t,...e){if(!o(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function i(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("hash must be wrapped by utils.wrapConstructor");r(t.outputLen),r(t.blockLen)}function c(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function a(t,e){s(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0,e.number=r,e.bool=n,e.isBytes=o,e.bytes=s,e.hash=i,e.exists=c,e.output=a;const l={number:r,bool:n,bytes:s,hash:i,exists:c,output:a};e.default=l},210:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.poly1305=e.wrapConstructorWithKey=void 0;const n=r(605),o=r(527),s=(t,e)=>255&t[e++]|(255&t[e++])<<8;class i{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=(0,o.toBytes)(t),(0,n.bytes)(t,32);const e=s(t,0),r=s(t,2),i=s(t,4),c=s(t,6),a=s(t,8),l=s(t,10),u=s(t,12),h=s(t,14);this.r[0]=8191&e,this.r[1]=8191&(e>>>13|r<<3),this.r[2]=7939&(r>>>10|i<<6),this.r[3]=8191&(i>>>7|c<<9),this.r[4]=255&(c>>>4|a<<12),this.r[5]=a>>>1&8190,this.r[6]=8191&(a>>>14|l<<2),this.r[7]=8065&(l>>>11|u<<5),this.r[8]=8191&(u>>>8|h<<8),this.r[9]=h>>>5&127;for(let e=0;e<8;e++)this.pad[e]=s(t,16+2*e)}process(t,e,r=!1){const n=r?0:2048,{h:o,r:i}=this,c=i[0],a=i[1],l=i[2],u=i[3],h=i[4],f=i[5],y=i[6],d=i[7],p=i[8],g=i[9],b=s(t,e+0),w=s(t,e+2),m=s(t,e+4),E=s(t,e+6),v=s(t,e+8),x=s(t,e+10),A=s(t,e+12),k=s(t,e+14);let U=o[0]+(8191&b),B=o[1]+(8191&(b>>>13|w<<3)),L=o[2]+(8191&(w>>>10|m<<6)),S=o[3]+(8191&(m>>>7|E<<9)),C=o[4]+(8191&(E>>>4|v<<12)),_=o[5]+(v>>>1&8191),T=o[6]+(8191&(v>>>14|x<<2)),M=o[7]+(8191&(x>>>11|A<<5)),N=o[8]+(8191&(A>>>8|k<<8)),O=o[9]+(k>>>5|n),I=0,K=I+U*c+B*(5*g)+L*(5*p)+S*(5*d)+C*(5*y);I=K>>>13,K&=8191,K+=_*(5*f)+T*(5*h)+M*(5*u)+N*(5*l)+O*(5*a),I+=K>>>13,K&=8191;let H=I+U*a+B*c+L*(5*g)+S*(5*p)+C*(5*d);I=H>>>13,H&=8191,H+=_*(5*y)+T*(5*f)+M*(5*h)+N*(5*u)+O*(5*l),I+=H>>>13,H&=8191;let j=I+U*l+B*a+L*c+S*(5*g)+C*(5*p);I=j>>>13,j&=8191,j+=_*(5*d)+T*(5*y)+M*(5*f)+N*(5*h)+O*(5*u),I+=j>>>13,j&=8191;let P=I+U*u+B*l+L*a+S*c+C*(5*g);I=P>>>13,P&=8191,P+=_*(5*p)+T*(5*d)+M*(5*y)+N*(5*f)+O*(5*h),I+=P>>>13,P&=8191;let $=I+U*h+B*u+L*l+S*a+C*c;I=$>>>13,$&=8191,$+=_*(5*g)+T*(5*p)+M*(5*d)+N*(5*y)+O*(5*f),I+=$>>>13,$&=8191;let D=I+U*f+B*h+L*u+S*l+C*a;I=D>>>13,D&=8191,D+=_*c+T*(5*g)+M*(5*p)+N*(5*d)+O*(5*y),I+=D>>>13,D&=8191;let F=I+U*y+B*f+L*h+S*u+C*l;I=F>>>13,F&=8191,F+=_*a+T*c+M*(5*g)+N*(5*p)+O*(5*d),I+=F>>>13,F&=8191;let V=I+U*d+B*y+L*f+S*h+C*u;I=V>>>13,V&=8191,V+=_*l+T*a+M*c+N*(5*g)+O*(5*p),I+=V>>>13,V&=8191;let R=I+U*p+B*d+L*y+S*f+C*h;I=R>>>13,R&=8191,R+=_*u+T*l+M*a+N*c+O*(5*g),I+=R>>>13,R&=8191;let z=I+U*g+B*p+L*d+S*y+C*f;I=z>>>13,z&=8191,z+=_*h+T*u+M*l+N*a+O*c,I+=z>>>13,z&=8191,I=(I<<2)+I|0,I=I+K|0,K=8191&I,I>>>=13,H+=I,o[0]=K,o[1]=H,o[2]=j,o[3]=P,o[4]=$,o[5]=D,o[6]=F,o[7]=V,o[8]=R,o[9]=z}finalize(){const{h:t,pad:e}=this,r=new Uint16Array(10);let n=t[1]>>>13;t[1]&=8191;for(let e=2;e<10;e++)t[e]+=n,n=t[e]>>>13,t[e]&=8191;t[0]+=5*n,n=t[0]>>>13,t[0]&=8191,t[1]+=n,n=t[1]>>>13,t[1]&=8191,t[2]+=n,r[0]=t[0]+5,n=r[0]>>>13,r[0]&=8191;for(let e=1;e<10;e++)r[e]=t[e]+n,n=r[e]>>>13,r[e]&=8191;r[9]-=8192;let o=(1^n)-1;for(let t=0;t<10;t++)r[t]&=o;o=~o;for(let e=0;e<10;e++)t[e]=t[e]&o|r[e];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let s=t[0]+e[0];t[0]=65535&s;for(let r=1;r<8;r++)s=(t[r]+e[r]|0)+(s>>>16)|0,t[r]=65535&s}update(t){(0,n.exists)(this);const{buffer:e,blockLen:r}=this,s=(t=(0,o.toBytes)(t)).length;for(let n=0;n<s;){const o=Math.min(r-this.pos,s-n);if(o!==r)e.set(t.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===r&&(this.process(e,0,!1),this.pos=0);else for(;r<=s-n;n+=r)this.process(t,n)}return this}destroy(){this.h.fill(0),this.r.fill(0),this.buffer.fill(0),this.pad.fill(0)}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,h:r}=this;let{pos:o}=this;if(o){for(e[o++]=1;o<16;o++)e[o]=0;this.process(e,0,!0)}this.finalize();let s=0;for(let e=0;e<8;e++)t[s++]=r[e]>>>0,t[s++]=r[e]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}}function c(t){const e=(e,r)=>t(r).update((0,o.toBytes)(e)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}e.wrapConstructorWithKey=c,e.poly1305=c((t=>new i(t)))},22:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.polyval=e.ghash=e._toGHASHKey=void 0;const n=r(527),o=r(605),s=16,i=new Uint8Array(16),c=(0,n.u32)(i),a=t=>(t>>>0&255)<<24|(t>>>8&255)<<16|(t>>>16&255)<<8|t>>>24&255;function l(t){t.reverse();const e=1&t[15];let r=0;for(let e=0;e<t.length;e++){const n=t[e];t[e]=n>>>1|r,r=(1&n)<<7}return t[0]^=225&-e,t}e._toGHASHKey=l;class u{constructor(t,e){this.blockLen=s,this.outputLen=s,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,t=(0,n.toBytes)(t),(0,o.bytes)(t,16);const r=(0,n.createView)(t);let i=r.getUint32(0,!1),c=r.getUint32(4,!1),l=r.getUint32(8,!1),u=r.getUint32(12,!1);const h=[];for(let t=0;t<128;t++)h.push({s0:a(i),s1:a(c),s2:a(l),s3:a(u)}),({s0:i,s1:c,s2:l,s3:u}={s3:(d=l)<<31|(p=u)>>>1,s2:(y=c)<<31|d>>>1,s1:(f=i)<<31|y>>>1,s0:f>>>1^225<<24&-(1&p)});var f,y,d,p;const g=(b=e||1024)>65536?8:b>1024?4:2;var b;if(![1,2,4,8].includes(g))throw new Error(`ghash: wrong window size=${g}, should be 2, 4 or 8`);this.W=g;const w=128/g,m=this.windowSize=2**g,E=[];for(let t=0;t<w;t++)for(let e=0;e<m;e++){let r=0,n=0,o=0,s=0;for(let i=0;i<g;i++){if(!(e>>>g-i-1&1))continue;const{s0:c,s1:a,s2:l,s3:u}=h[g*t+i];r^=c,n^=a,o^=l,s^=u}E.push({s0:r,s1:n,s2:o,s3:s})}this.t=E}_updateBlock(t,e,r,n){t^=this.s0,e^=this.s1,r^=this.s2,n^=this.s3;const{W:o,t:s,windowSize:i}=this;let c=0,a=0,l=0,u=0;const h=(1<<o)-1;let f=0;for(const y of[t,e,r,n])for(let t=0;t<4;t++){const e=y>>>8*t&255;for(let t=8/o-1;t>=0;t--){const r=e>>>o*t&h,{s0:n,s1:y,s2:d,s3:p}=s[f*i+r];c^=n,a^=y,l^=d,u^=p,f+=1}}this.s0=c,this.s1=a,this.s2=l,this.s3=u}update(t){t=(0,n.toBytes)(t),(0,o.exists)(this);const e=(0,n.u32)(t),r=Math.floor(t.length/s),a=t.length%s;for(let t=0;t<r;t++)this._updateBlock(e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]);return a&&(i.set(t.subarray(r*s)),this._updateBlock(c[0],c[1],c[2],c[3]),c.fill(0)),this}destroy(){const{t}=this;for(const e of t)e.s0=0,e.s1=0,e.s2=0,e.s3=0}digestInto(t){(0,o.exists)(this),(0,o.output)(t,this),this.finished=!0;const{s0:e,s1:r,s2:s,s3:i}=this,c=(0,n.u32)(t);return c[0]=e,c[1]=r,c[2]=s,c[3]=i,t}digest(){const t=new Uint8Array(s);return this.digestInto(t),this.destroy(),t}}class h extends u{constructor(t,e){const r=l((t=(0,n.toBytes)(t)).slice());super(r,e),r.fill(0)}update(t){t=(0,n.toBytes)(t),(0,o.exists)(this);const e=(0,n.u32)(t),r=t.length%s,l=Math.floor(t.length/s);for(let t=0;t<l;t++)this._updateBlock(a(e[4*t+3]),a(e[4*t+2]),a(e[4*t+1]),a(e[4*t+0]));return r&&(i.set(t.subarray(l*s)),this._updateBlock(a(c[3]),a(c[2]),a(c[1]),a(c[0])),c.fill(0)),this}digestInto(t){(0,o.exists)(this),(0,o.output)(t,this),this.finished=!0;const{s0:e,s1:r,s2:s,s3:i}=this,c=(0,n.u32)(t);return c[0]=e,c[1]=r,c[2]=s,c[3]=i,t.reverse()}}function f(t){const e=(e,r)=>t(r,e.length).update((0,n.toBytes)(e)).digest(),r=t(new Uint8Array(16),0);return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=(e,r)=>t(e,r),e}e.ghash=f(((t,e)=>new u(t,e))),e.polyval=f(((t,e)=>new h(t,e)))},469:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsafe=e.siv=e.gcm=e.cfb=e.cbc=e.ecb=e.ctr=e.expandKeyDecLE=e.expandKeyLE=void 0;const n=r(527),o=r(22),s=r(605),i=16,c=new Uint8Array(i);function a(t){return t<<1^283&-(t>>7)}function l(t,e){let r=0;for(;e>0;e>>=1)r^=t&-(1&e),t=a(t);return r}const u=(()=>{let t=new Uint8Array(256);for(let e=0,r=1;e<256;e++,r^=a(r))t[e]=r;const e=new Uint8Array(256);e[0]=99;for(let r=0;r<255;r++){let n=t[255-r];n|=n<<8,e[t[r]]=255&(n^n>>4^n>>5^n>>6^n>>7^99)}return e})(),h=u.map(((t,e)=>u.indexOf(e))),f=t=>t<<8|t>>>24;function y(t,e){if(256!==t.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map(((r,n)=>e(t[n]))),n=r.map(f),o=n.map(f),s=o.map(f),i=new Uint32Array(65536),c=new Uint32Array(65536),a=new Uint16Array(65536);for(let e=0;e<256;e++)for(let l=0;l<256;l++){const u=256*e+l;i[u]=r[e]^n[l],c[u]=o[e]^s[l],a[u]=t[e]<<8|t[l]}return{sbox:t,sbox2:a,T0:r,T1:n,T2:o,T3:s,T01:i,T23:c}}const d=y(u,(t=>l(t,3)<<24|t<<16|t<<8|l(t,2))),p=y(h,(t=>l(t,11)<<24|l(t,13)<<16|l(t,9)<<8|l(t,14))),g=(()=>{const t=new Uint8Array(16);for(let e=0,r=1;e<16;e++,r=a(r))t[e]=r;return t})();function b(t){(0,s.bytes)(t);const e=t.length;if(![16,24,32].includes(e))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${e}`);const{sbox2:r}=d,o=(0,n.u32)(t),i=o.length,c=t=>E(r,t,t,t,t),a=new Uint32Array(e+28);a.set(o);for(let t=i;t<a.length;t++){let e=a[t-1];t%i==0?e=c((l=e)<<24|l>>>8)^g[t/i-1]:i>6&&t%i==4&&(e=c(e)),a[t]=a[t-i]^e}var l;return a}function w(t){const e=b(t),r=e.slice(),n=e.length,{sbox2:o}=d,{T0:s,T1:i,T2:c,T3:a}=p;for(let t=0;t<n;t+=4)for(let o=0;o<4;o++)r[t+o]=e[n-t-4+o];e.fill(0);for(let t=4;t<n-4;t++){const e=r[t],n=E(o,e,e,e,e);r[t]=s[255&n]^i[n>>>8&255]^c[n>>>16&255]^a[n>>>24]}return r}function m(t,e,r,n,o,s){return t[r<<8&65280|n>>>8&255]^e[o>>>8&65280|s>>>24&255]}function E(t,e,r,n,o){return t[255&e|65280&r]|t[n>>>16&255|o>>>16&65280]<<16}function v(t,e,r,n,o){const{sbox2:s,T01:i,T23:c}=d;let a=0;e^=t[a++],r^=t[a++],n^=t[a++],o^=t[a++];const l=t.length/4-2;for(let s=0;s<l;s++){const s=t[a++]^m(i,c,e,r,n,o),l=t[a++]^m(i,c,r,n,o,e),u=t[a++]^m(i,c,n,o,e,r),h=t[a++]^m(i,c,o,e,r,n);e=s,r=l,n=u,o=h}return{s0:t[a++]^E(s,e,r,n,o),s1:t[a++]^E(s,r,n,o,e),s2:t[a++]^E(s,n,o,e,r),s3:t[a++]^E(s,o,e,r,n)}}function x(t,e,r,n,o){const{sbox2:s,T01:i,T23:c}=p;let a=0;e^=t[a++],r^=t[a++],n^=t[a++],o^=t[a++];const l=t.length/4-2;for(let s=0;s<l;s++){const s=t[a++]^m(i,c,e,o,n,r),l=t[a++]^m(i,c,r,e,o,n),u=t[a++]^m(i,c,n,r,e,o),h=t[a++]^m(i,c,o,n,r,e);e=s,r=l,n=u,o=h}return{s0:t[a++]^E(s,e,o,n,r),s1:t[a++]^E(s,r,e,o,n),s2:t[a++]^E(s,n,r,e,o),s3:t[a++]^E(s,o,n,r,e)}}function A(t,e){if(!e)return new Uint8Array(t);if((0,s.bytes)(e),e.length<t)throw new Error(`aes: wrong destination length, expected at least ${t}, got: ${e.length}`);return e}function k(t,e,r,o){(0,s.bytes)(e,i),(0,s.bytes)(r);const c=r.length;o=A(c,o);const a=e,l=(0,n.u32)(a);let{s0:u,s1:h,s2:f,s3:y}=v(t,l[0],l[1],l[2],l[3]);const d=(0,n.u32)(r),p=(0,n.u32)(o);for(let e=0;e+4<=d.length;e+=4){p[e+0]=d[e+0]^u,p[e+1]=d[e+1]^h,p[e+2]=d[e+2]^f,p[e+3]=d[e+3]^y;let r=1;for(let t=a.length-1;t>=0;t--)r=r+(255&a[t])|0,a[t]=255&r,r>>>=8;({s0:u,s1:h,s2:f,s3:y}=v(t,l[0],l[1],l[2],l[3]))}const g=i*Math.floor(d.length/4);if(g<c){const t=new Uint32Array([u,h,f,y]),e=(0,n.u8)(t);for(let t=g,n=0;t<c;t++,n++)o[t]=r[t]^e[n]}return o}function U(t,e,r,o,c){(0,s.bytes)(r,i),(0,s.bytes)(o),c=A(o.length,c);const a=r,l=(0,n.u32)(a),u=(0,n.createView)(a),h=(0,n.u32)(o),f=(0,n.u32)(c),y=e?0:12,d=o.length;let p=u.getUint32(y,e),{s0:g,s1:b,s2:w,s3:m}=v(t,l[0],l[1],l[2],l[3]);for(let r=0;r+4<=h.length;r+=4)f[r+0]=h[r+0]^g,f[r+1]=h[r+1]^b,f[r+2]=h[r+2]^w,f[r+3]=h[r+3]^m,p=p+1>>>0,u.setUint32(y,p,e),({s0:g,s1:b,s2:w,s3:m}=v(t,l[0],l[1],l[2],l[3]));const E=i*Math.floor(h.length/4);if(E<d){const t=new Uint32Array([g,b,w,m]),e=(0,n.u8)(t);for(let t=E,r=0;t<d;t++,r++)c[t]=o[t]^e[r]}return c}function B(t){if((0,s.bytes)(t),t.length%i!=0)throw new Error("aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size 16")}function L(t,e,r){let o=t.length;const s=o%i;if(!e&&0!==s)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const c=(0,n.u32)(t);if(e){let t=i-s;t||(t=i),o+=t}const a=A(o,r);return{b:c,o:(0,n.u32)(a),out:a}}function S(t,e){if(!e)return t;const r=t.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const n=t[r-1];if(n<=0||n>16)throw new Error(`aes/pcks5: wrong padding byte: ${n}`);const o=t.subarray(0,-n);for(let e=0;e<n;e++)if(t[r-e-1]!==n)throw new Error("aes/pcks5: wrong padding");return o}function C(t){const e=new Uint8Array(16),r=(0,n.u32)(e);e.set(t);const o=i-t.length;for(let t=i-o;t<i;t++)e[t]=o;return r}function _(t,e,r,o,s){const i=t.create(r,o.length+(s?.length||0));s&&i.update(s),i.update(o);const c=new Uint8Array(16),a=(0,n.createView)(c);return s&&(0,n.setBigUint64)(a,0,BigInt(8*s.length),e),(0,n.setBigUint64)(a,8,BigInt(8*o.length),e),i.update(c),i.digest()}e.expandKeyLE=b,e.expandKeyDecLE=w,e.ctr=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(t,e){function r(r,n){const o=b(t),s=e.slice(),i=k(o,s,r,n);return o.fill(0),s.fill(0),i}return(0,s.bytes)(t),(0,s.bytes)(e,i),{encrypt:(t,e)=>r(t,e),decrypt:(t,e)=>r(t,e)}})),e.ecb=(0,n.wrapCipher)({blockSize:16},(function(t,e={}){(0,s.bytes)(t);const r=!e.disablePadding;return{encrypt:(e,n)=>{(0,s.bytes)(e);const{b:o,o:i,out:c}=L(e,r,n),a=b(t);let l=0;for(;l+4<=o.length;){const{s0:t,s1:e,s2:r,s3:n}=v(a,o[l+0],o[l+1],o[l+2],o[l+3]);i[l++]=t,i[l++]=e,i[l++]=r,i[l++]=n}if(r){const t=C(e.subarray(4*l)),{s0:r,s1:n,s2:o,s3:s}=v(a,t[0],t[1],t[2],t[3]);i[l++]=r,i[l++]=n,i[l++]=o,i[l++]=s}return a.fill(0),c},decrypt:(e,o)=>{B(e);const s=w(t),i=A(e.length,o),c=(0,n.u32)(e),a=(0,n.u32)(i);for(let t=0;t+4<=c.length;){const{s0:e,s1:r,s2:n,s3:o}=x(s,c[t+0],c[t+1],c[t+2],c[t+3]);a[t++]=e,a[t++]=r,a[t++]=n,a[t++]=o}return s.fill(0),S(i,r)}}})),e.cbc=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(t,e,r={}){(0,s.bytes)(t),(0,s.bytes)(e,16);const o=!r.disablePadding;return{encrypt:(r,s)=>{const i=b(t),{b:c,o:a,out:l}=L(r,o,s),u=(0,n.u32)(e);let h=u[0],f=u[1],y=u[2],d=u[3],p=0;for(;p+4<=c.length;)h^=c[p+0],f^=c[p+1],y^=c[p+2],d^=c[p+3],({s0:h,s1:f,s2:y,s3:d}=v(i,h,f,y,d)),a[p++]=h,a[p++]=f,a[p++]=y,a[p++]=d;if(o){const t=C(r.subarray(4*p));h^=t[0],f^=t[1],y^=t[2],d^=t[3],({s0:h,s1:f,s2:y,s3:d}=v(i,h,f,y,d)),a[p++]=h,a[p++]=f,a[p++]=y,a[p++]=d}return i.fill(0),l},decrypt:(r,s)=>{B(r);const i=w(t),c=(0,n.u32)(e),a=A(r.length,s),l=(0,n.u32)(r),u=(0,n.u32)(a);let h=c[0],f=c[1],y=c[2],d=c[3];for(let t=0;t+4<=l.length;){const e=h,r=f,n=y,o=d;h=l[t+0],f=l[t+1],y=l[t+2],d=l[t+3];const{s0:s,s1:c,s2:a,s3:p}=x(i,h,f,y,d);u[t++]=s^e,u[t++]=c^r,u[t++]=a^n,u[t++]=p^o}return i.fill(0),S(a,o)}}})),e.cfb=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(t,e){function r(r,o,s){const c=b(t),a=r.length;s=A(a,s);const l=(0,n.u32)(r),u=(0,n.u32)(s),h=o?u:l,f=(0,n.u32)(e);let y=f[0],d=f[1],p=f[2],g=f[3];for(let t=0;t+4<=l.length;){const{s0:e,s1:r,s2:n,s3:o}=v(c,y,d,p,g);u[t+0]=l[t+0]^e,u[t+1]=l[t+1]^r,u[t+2]=l[t+2]^n,u[t+3]=l[t+3]^o,y=h[t++],d=h[t++],p=h[t++],g=h[t++]}const w=i*Math.floor(l.length/4);if(w<a){({s0:y,s1:d,s2:p,s3:g}=v(c,y,d,p,g));const t=(0,n.u8)(new Uint32Array([y,d,p,g]));for(let e=w,n=0;e<a;e++,n++)s[e]=r[e]^t[n];t.fill(0)}return c.fill(0),s}return(0,s.bytes)(t),(0,s.bytes)(e,16),{encrypt:(t,e)=>r(t,!0,e),decrypt:(t,e)=>r(t,!1,e)}})),e.gcm=(0,n.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(t,e,r){if((0,s.bytes)(e),0===e.length)throw new Error("aes/gcm: empty nonce");const i=16;function a(t,e,n){const s=_(o.ghash,!1,t,n,r);for(let t=0;t<e.length;t++)s[t]^=e[t];return s}function l(){const r=b(t),s=c.slice(),i=c.slice();if(U(r,!1,i,i,s),12===e.length)i.set(e);else{const t=c.slice(),r=(0,n.createView)(t);(0,n.setBigUint64)(r,8,BigInt(8*e.length),!1),o.ghash.create(s).update(e).update(t).digestInto(i)}return{xk:r,authKey:s,counter:i,tagMask:U(r,!1,i,c)}}return{encrypt:t=>{(0,s.bytes)(t);const{xk:e,authKey:r,counter:n,tagMask:o}=l(),c=new Uint8Array(t.length+i);U(e,!1,n,t,c);const u=a(r,o,c.subarray(0,c.length-i));return c.set(u,t.length),e.fill(0),c},decrypt:t=>{if((0,s.bytes)(t),t.length<i)throw new Error("aes/gcm: ciphertext less than tagLen (16)");const{xk:e,authKey:r,counter:o,tagMask:c}=l(),u=t.subarray(0,-16),h=t.subarray(-16),f=a(r,c,u);if(!(0,n.equalBytes)(f,h))throw new Error("aes/gcm: invalid ghash tag");const y=U(e,!1,o,u);return r.fill(0),c.fill(0),e.fill(0),y}}}));const T=(t,e,r)=>n=>{if(!Number.isSafeInteger(n)||e>n||n>r)throw new Error(`${t}: invalid value=${n}, must be [${e}..${r}]`)};function M(t){return null!=t&&"object"==typeof t&&(t instanceof Uint32Array||"Uint32Array"===t.constructor.name)}e.siv=(0,n.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(t,e,r){const i=T("AAD",0,2**36),c=T("plaintext",0,2**36),a=T("nonce",12,12),l=T("ciphertext",16,2**36+16);function u(){const r=t.length;if(16!==r&&24!==r&&32!==r)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${r} bytes`);const o=b(t),s=new Uint8Array(r),i=new Uint8Array(16),c=(0,n.u32)(e);let a=0,l=c[0],u=c[1],h=c[2],f=0;for(const t of[i,s].map(n.u32)){const e=(0,n.u32)(t);for(let t=0;t<e.length;t+=2){const{s0:r,s1:n}=v(o,a,l,u,h);e[t+0]=r,e[t+1]=n,a=++f}}return o.fill(0),{authKey:i,encKey:b(s)}}function h(t,s,i){const c=_(o.polyval,!0,s,i,r);for(let t=0;t<12;t++)c[t]^=e[t];c[15]&=127;const a=(0,n.u32)(c);let l=a[0],u=a[1],h=a[2],f=a[3];return({s0:l,s1:u,s2:h,s3:f}=v(t,l,u,h,f)),a[0]=l,a[1]=u,a[2]=h,a[3]=f,c}function f(t,e,r){let n=e.slice();return n[15]|=128,U(t,!0,n,r)}return(0,s.bytes)(e),a(e.length),r&&((0,s.bytes)(r),i(r.length)),{encrypt:t=>{(0,s.bytes)(t),c(t.length);const{encKey:e,authKey:r}=u(),n=h(e,r,t),o=new Uint8Array(t.length+16);return o.set(n,t.length),o.set(f(e,n,t)),e.fill(0),r.fill(0),o},decrypt:t=>{(0,s.bytes)(t),l(t.length);const e=t.subarray(-16),{encKey:r,authKey:o}=u(),i=f(r,e,t.subarray(0,-16)),c=h(r,o,i);if(r.fill(0),o.fill(0),!(0,n.equalBytes)(e,c))throw new Error("invalid polyval tag");return i}}})),e.unsafe={expandKeyLE:b,expandKeyDecLE:w,encrypt:v,decrypt:x,encryptBlock:function(t,e){if((0,s.bytes)(e,16),!M(t))throw new Error("_encryptBlock accepts result of expandKeyLE");const r=(0,n.u32)(e);let{s0:o,s1:i,s2:c,s3:a}=v(t,r[0],r[1],r[2],r[3]);return r[0]=o,r[1]=i,r[2]=c,r[3]=a,e},decryptBlock:function(t,e){if((0,s.bytes)(e,16),!M(t))throw new Error("_decryptBlock accepts result of expandKeyLE");const r=(0,n.u32)(e);let{s0:o,s1:i,s2:c,s3:a}=x(t,r[0],r[1],r[2],r[3]);return r[0]=o,r[1]=i,r[2]=c,r[3]=a,e},ctrCounter:k,ctr32:U}},297:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWebcryptoSubtle=e.randomBytes=void 0;const r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;e.randomBytes=function(t=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")},e.getWebcryptoSubtle=function(){if(r&&"object"==typeof r.subtle&&null!=r.subtle)return r.subtle;throw new Error("crypto.subtle must be defined")}},190:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.secretbox=e.xsalsa20poly1305=e.xsalsa20=e.salsa20=e.hsalsa=void 0;const n=r(605),o=r(506),s=r(210),i=r(527);function c(t,e,r,n,s,i=20){let c=t[0],a=e[0],l=e[1],u=e[2],h=e[3],f=t[1],y=r[0],d=r[1],p=s,g=t[2],b=e[4],w=e[5],m=e[6],E=e[7],v=t[3],x=c,A=a,k=l,U=u,B=h,L=f,S=y,C=d,_=p,T=0,M=g,N=b,O=w,I=m,K=E,H=v;for(let t=0;t<i;t+=2)B^=(0,o.rotl)(x+O|0,7),_^=(0,o.rotl)(B+x|0,9),O^=(0,o.rotl)(_+B|0,13),x^=(0,o.rotl)(O+_|0,18),T^=(0,o.rotl)(L+A|0,7),I^=(0,o.rotl)(T+L|0,9),A^=(0,o.rotl)(I+T|0,13),L^=(0,o.rotl)(A+I|0,18),K^=(0,o.rotl)(M+S|0,7),k^=(0,o.rotl)(K+M|0,9),S^=(0,o.rotl)(k+K|0,13),M^=(0,o.rotl)(S+k|0,18),U^=(0,o.rotl)(H+N|0,7),C^=(0,o.rotl)(U+H|0,9),N^=(0,o.rotl)(C+U|0,13),H^=(0,o.rotl)(N+C|0,18),A^=(0,o.rotl)(x+U|0,7),k^=(0,o.rotl)(A+x|0,9),U^=(0,o.rotl)(k+A|0,13),x^=(0,o.rotl)(U+k|0,18),S^=(0,o.rotl)(L+B|0,7),C^=(0,o.rotl)(S+L|0,9),B^=(0,o.rotl)(C+S|0,13),L^=(0,o.rotl)(B+C|0,18),N^=(0,o.rotl)(M+T|0,7),_^=(0,o.rotl)(N+M|0,9),T^=(0,o.rotl)(_+N|0,13),M^=(0,o.rotl)(T+_|0,18),O^=(0,o.rotl)(H+K|0,7),I^=(0,o.rotl)(O+H|0,9),K^=(0,o.rotl)(I+O|0,13),H^=(0,o.rotl)(K+I|0,18);let j=0;n[j++]=c+x|0,n[j++]=a+A|0,n[j++]=l+k|0,n[j++]=u+U|0,n[j++]=h+B|0,n[j++]=f+L|0,n[j++]=y+S|0,n[j++]=d+C|0,n[j++]=p+_|0,n[j++]=0+T|0,n[j++]=g+M|0,n[j++]=b+N|0,n[j++]=w+O|0,n[j++]=m+I|0,n[j++]=E+K|0,n[j++]=v+H|0}function a(t,e,r,n){let s=t[0],i=e[0],c=e[1],a=e[2],l=e[3],u=t[1],h=r[0],f=r[1],y=r[2],d=r[3],p=t[2],g=e[4],b=e[5],w=e[6],m=e[7],E=t[3];for(let t=0;t<20;t+=2)l^=(0,o.rotl)(s+b|0,7),y^=(0,o.rotl)(l+s|0,9),b^=(0,o.rotl)(y+l|0,13),s^=(0,o.rotl)(b+y|0,18),d^=(0,o.rotl)(u+i|0,7),w^=(0,o.rotl)(d+u|0,9),i^=(0,o.rotl)(w+d|0,13),u^=(0,o.rotl)(i+w|0,18),m^=(0,o.rotl)(p+h|0,7),c^=(0,o.rotl)(m+p|0,9),h^=(0,o.rotl)(c+m|0,13),p^=(0,o.rotl)(h+c|0,18),a^=(0,o.rotl)(E+g|0,7),f^=(0,o.rotl)(a+E|0,9),g^=(0,o.rotl)(f+a|0,13),E^=(0,o.rotl)(g+f|0,18),i^=(0,o.rotl)(s+a|0,7),c^=(0,o.rotl)(i+s|0,9),a^=(0,o.rotl)(c+i|0,13),s^=(0,o.rotl)(a+c|0,18),h^=(0,o.rotl)(u+l|0,7),f^=(0,o.rotl)(h+u|0,9),l^=(0,o.rotl)(f+h|0,13),u^=(0,o.rotl)(l+f|0,18),g^=(0,o.rotl)(p+d|0,7),y^=(0,o.rotl)(g+p|0,9),d^=(0,o.rotl)(y+g|0,13),p^=(0,o.rotl)(d+y|0,18),b^=(0,o.rotl)(E+m|0,7),w^=(0,o.rotl)(b+E|0,9),m^=(0,o.rotl)(w+b|0,13),E^=(0,o.rotl)(m+w|0,18);let v=0;n[v++]=s,n[v++]=u,n[v++]=p,n[v++]=E,n[v++]=h,n[v++]=f,n[v++]=y,n[v++]=d}e.hsalsa=a,e.salsa20=(0,o.createCipher)(c,{allowShortKeys:!0,counterRight:!0}),e.xsalsa20=(0,o.createCipher)(c,{counterRight:!0,extendNonceFn:a}),e.xsalsa20poly1305=(0,i.wrapCipher)({blockSize:64,nonceLength:24,tagLength:16},((t,r)=>{const o=16;return(0,n.bytes)(t,32),(0,n.bytes)(r,24),{encrypt:(i,c)=>{(0,n.bytes)(i);const a=i.length+32;c?(0,n.bytes)(c,a):c=new Uint8Array(a),c.set(i,32),(0,e.xsalsa20)(t,r,c,c);const l=c.subarray(0,32),u=(0,s.poly1305)(c.subarray(32),l);return c.set(u,o),c.subarray(0,o).fill(0),c.subarray(o)},decrypt:c=>{(0,n.bytes)(c);const a=c.length;if(a<o)throw new Error("encrypted data should be at least 16 bytes");const l=new Uint8Array(a+o);l.set(c,o);const u=(0,e.xsalsa20)(t,r,new Uint8Array(32)),h=(0,s.poly1305)(l.subarray(32),u);if(!(0,i.equalBytes)(l.subarray(16,32),h))throw new Error("invalid tag");const f=(0,e.xsalsa20)(t,r,l);return f.subarray(0,32).fill(0),u.fill(0),f.subarray(32)}}})),e.secretbox=function(t,r){const n=(0,e.xsalsa20poly1305)(t,r);return{seal:n.encrypt,open:n.decrypt}}},527:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.u64Lengths=e.setBigUint64=e.wrapCipher=e.Hash=e.equalBytes=e.checkOpts=e.concatBytes=e.toBytes=e.bytesToUtf8=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.numberToBytesBE=e.bytesToNumberBE=e.hexToNumber=e.hexToBytes=e.bytesToHex=e.isLE=e.createView=e.u32=e.u16=e.u8=void 0;\n/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */\nconst n=r(605);e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u16=t=>new Uint16Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/2));e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));if(e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!e.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function s(t){(0,n.bytes)(t);let e="";for(let r=0;r<t.length;r++)e+=o[t[r]];return e}e.bytesToHex=s;const i=48,c=57,a=65,l=70,u=97,h=102;function f(t){return t>=i&&t<=c?t-i:t>=a&&t<=l?t-(a-10):t>=u&&t<=h?t-(u-10):void 0}function y(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,o=0;e<r;e++,o+=2){const r=f(t.charCodeAt(o)),s=f(t.charCodeAt(o+1));if(void 0===r||void 0===s){const e=t[o]+t[o+1];throw new Error(\'hex string expected, got non-hex character "\'+e+\'" at index \'+o)}n[e]=16*r+s}return n}function d(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}e.hexToBytes=y,e.hexToNumber=d,e.bytesToNumberBE=function(t){return d(s(t))},e.numberToBytesBE=function(t,e){return y(t.toString(16).padStart(2*e,"0"))};function p(t){if("string"!=typeof t)throw new Error("string expected, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,n){let o=Date.now();for(let s=0;s<t;s++){n(s);const t=Date.now()-o;t>=0&&t<r||(await(0,e.nextTick)(),o+=t)}},e.utf8ToBytes=p,e.bytesToUtf8=function(t){return(new TextDecoder).decode(t)},e.toBytes=function(t){if("string"==typeof t)t=p(t);else{if(!(0,n.isBytes)(t))throw new Error("Uint8Array expected, got "+typeof t);t=t.slice()}return t},e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const o=t[r];(0,n.bytes)(o),e+=o.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const o=t[e];r.set(o,n),n+=o.length}return r},e.checkOpts=function(t,e){if(null==e||"object"!=typeof e)throw new Error("options must be defined");return Object.assign(t,e)},e.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r};e.Hash=class{};function g(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),c=Number(r&s),a=n?4:0,l=n?0:4;t.setUint32(e+a,i,n),t.setUint32(e+l,c,n)}e.wrapCipher=(t,e)=>(Object.assign(e,t),e),e.setBigUint64=g,e.u64Lengths=function(t,r){const n=new Uint8Array(16),o=(0,e.createView)(n);return g(o,0,BigInt(r?r.length:0),!0),g(o,8,BigInt(t.length),!0),n}},489:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gcm=e.ctr=e.cbc=e.utils=e.managedNonce=e.getWebcryptoSubtle=e.randomBytes=void 0;const n=r(297);Object.defineProperty(e,"randomBytes",{enumerable:!0,get:function(){return n.randomBytes}}),Object.defineProperty(e,"getWebcryptoSubtle",{enumerable:!0,get:function(){return n.getWebcryptoSubtle}});const o=r(527),s=r(605);e.managedNonce=function(t){return(0,s.number)(t.nonceLength),(e,...r)=>({encrypt:(s,...i)=>{const{nonceLength:c}=t,a=(0,n.randomBytes)(c),l=t(e,a,...r).encrypt(s,...i),u=(0,o.concatBytes)(a,l);return l.fill(0),u},decrypt:(n,...o)=>{const{nonceLength:s}=t,i=n.subarray(0,s),c=n.subarray(s);return t(e,i,...r).decrypt(c,...o)}})},e.utils={async encrypt(t,e,r,o){const s=(0,n.getWebcryptoSubtle)(),i=await s.importKey("raw",t,e,!0,["encrypt"]),c=await s.encrypt(r,i,o);return new Uint8Array(c)},async decrypt(t,e,r,o){const s=(0,n.getWebcryptoSubtle)(),i=await s.importKey("raw",t,e,!0,["decrypt"]),c=await s.decrypt(r,i,o);return new Uint8Array(c)}};const i="AES-CBC",c="AES-CTR",a="AES-GCM";function l(t){return(r,n,o)=>{(0,s.bytes)(r),(0,s.bytes)(n);const l={name:t,length:8*r.length},u=function(t,e,r){if(t===i)return{name:i,iv:e};if(t===c)return{name:c,counter:e,length:64};if(t===a)return r?{name:a,iv:e,additionalData:r}:{name:a,iv:e};throw new Error("unknown aes block mode")}(t,n,o);return{encrypt:t=>((0,s.bytes)(t),e.utils.encrypt(r,l,u,t)),decrypt:t=>((0,s.bytes)(t),e.utils.decrypt(r,l,u,t))}}}e.cbc=l(i),e.ctr=l(c),e.gcm=l(a)},557:(t,e)=>{"use strict";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if("boolean"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function o(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function s(t,...e){if(!o(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function i(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(t.outputLen),r(t.blockLen)}function c(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function a(t,e){s(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,"__esModule",{value:!0}),e.isBytes=o,e.number=r,e.bool=n,e.bytes=s,e.hash=i,e.exists=c,e.output=a;const l={number:r,bool:n,bytes:s,hash:i,exists:c,output:a};e.default=l},202:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;const n=r(557),o=r(175);e.Chi=(t,e,r)=>t&e^~t&r;e.Maj=(t,e,r)=>t&e^t&r^e&r;class s extends o.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,o.createView)(this.buffer)}update(t){(0,n.exists)(this);const{view:e,buffer:r,blockLen:s}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n<i;){const c=Math.min(s-this.pos,i-n);if(c!==s)r.set(t.subarray(n,n+c),this.pos),this.pos+=c,n+=c,this.pos===s&&(this.process(e,0),this.pos=0);else{const e=(0,o.createView)(t);for(;s<=i-n;n+=s)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:s,isLE:i}=this;let{pos:c}=this;e[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>s-c&&(this.process(r,0),c=0);for(let t=c;t<s;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),c=Number(r&s),a=n?4:0,l=n?0:4;t.setUint32(e+a,i,n),t.setUint32(e+l,c,n)}(r,s-8,BigInt(8*this.length),i),this.process(r,0);const a=(0,o.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<u;t++)a.setUint32(4*t,h[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return t.length=n,t.pos=i,t.finished=o,t.destroyed=s,n%e&&t.buffer.set(r),t}}e.HashMD=s},145:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},615:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(557),o=r(175);class s extends o.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(t);const r=(0,o.toBytes)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return(0,n.exists)(this),this.iHash.update(t),this}digestInto(t){(0,n.exists)(this),(0,n.bytes)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return t.finished=n,t.destroyed=o,t.blockLen=s,t.outputLen=i,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=s;e.hmac=(t,e,r)=>new s(t,e).update(r).digest(),e.hmac.create=(t,e)=>new s(t,e)},941:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pbkdf2=function(t,e,r,n){const{c:o,dkLen:a,DK:l,PRF:u,PRFSalt:h}=i(t,e,r,n);let f;const y=new Uint8Array(4),d=(0,s.createView)(y),p=new Uint8Array(u.outputLen);for(let t=1,e=0;e<a;t++,e+=u.outputLen){const r=l.subarray(e,e+u.outputLen);d.setInt32(0,t,!1),(f=h._cloneInto(f)).update(y).digestInto(p),r.set(p.subarray(0,r.length));for(let t=1;t<o;t++){u._cloneInto(f).update(p).digestInto(p);for(let t=0;t<r.length;t++)r[t]^=p[t]}}return c(u,h,l,f,p)},e.pbkdf2Async=async function(t,e,r,n){const{c:o,dkLen:a,asyncTick:l,DK:u,PRF:h,PRFSalt:f}=i(t,e,r,n);let y;const d=new Uint8Array(4),p=(0,s.createView)(d),g=new Uint8Array(h.outputLen);for(let t=1,e=0;e<a;t++,e+=h.outputLen){const r=u.subarray(e,e+h.outputLen);p.setInt32(0,t,!1),(y=f._cloneInto(y)).update(d).digestInto(g),r.set(g.subarray(0,r.length)),await(0,s.asyncLoop)(o-1,l,(()=>{h._cloneInto(y).update(g).digestInto(g);for(let t=0;t<r.length;t++)r[t]^=g[t]}))}return c(h,f,u,y,g)};const n=r(557),o=r(615),s=r(175);function i(t,e,r,i){(0,n.hash)(t);const c=(0,s.checkOpts)({dkLen:32,asyncTick:10},i),{c:a,dkLen:l,asyncTick:u}=c;if((0,n.number)(a),(0,n.number)(l),(0,n.number)(u),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const h=(0,s.toBytes)(e),f=(0,s.toBytes)(r),y=new Uint8Array(l),d=o.hmac.create(t,h),p=d._cloneInto().update(f);return{c:a,dkLen:l,asyncTick:u,DK:y,PRF:d,PRFSalt:p}}function c(t,e,r,n,o){return t.destroy(),e.destroy(),n&&n.destroy(),o.fill(0),r}},663:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scrypt=function(t,e,r){const{N:n,r:o,p:s,dkLen:c,blockSize32:h,V:f,B32:y,B:d,tmp:p,blockMixCb:g}=l(t,e,r);i.isLE||(0,i.byteSwap32)(y);for(let t=0;t<s;t++){const e=h*t;for(let t=0;t<h;t++)f[t]=y[e+t];for(let t=0,e=0;t<n-1;t++)a(f,e,f,e+=h,o),g();a(f,(n-1)*h,y,e,o),g();for(let t=0;t<n;t++){const t=y[e+h-16]%n;for(let r=0;r<h;r++)p[r]=y[e+r]^f[t*h+r];a(p,0,y,e,o),g()}}i.isLE||(0,i.byteSwap32)(y);return u(t,c,d,f,p)},e.scryptAsync=async function(t,e,r){const{N:n,r:o,p:s,dkLen:c,blockSize32:h,V:f,B32:y,B:d,tmp:p,blockMixCb:g,asyncTick:b}=l(t,e,r);i.isLE||(0,i.byteSwap32)(y);for(let t=0;t<s;t++){const e=h*t;for(let t=0;t<h;t++)f[t]=y[e+t];let r=0;await(0,i.asyncLoop)(n-1,b,(()=>{a(f,r,f,r+=h,o),g()})),a(f,(n-1)*h,y,e,o),g(),await(0,i.asyncLoop)(n,b,(()=>{const t=y[e+h-16]%n;for(let r=0;r<h;r++)p[r]=y[e+r]^f[t*h+r];a(p,0,y,e,o),g()}))}i.isLE||(0,i.byteSwap32)(y);return u(t,c,d,f,p)};const n=r(557),o=r(623),s=r(941),i=r(175);function c(t,e,r,n,o,s){let c=t[e++]^r[n++],a=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],h=t[e++]^r[n++],f=t[e++]^r[n++],y=t[e++]^r[n++],d=t[e++]^r[n++],p=t[e++]^r[n++],g=t[e++]^r[n++],b=t[e++]^r[n++],w=t[e++]^r[n++],m=t[e++]^r[n++],E=t[e++]^r[n++],v=t[e++]^r[n++],x=t[e++]^r[n++],A=c,k=a,U=l,B=u,L=h,S=f,C=y,_=d,T=p,M=g,N=b,O=w,I=m,K=E,H=v,j=x;for(let t=0;t<8;t+=2)L^=(0,i.rotl)(A+I|0,7),T^=(0,i.rotl)(L+A|0,9),I^=(0,i.rotl)(T+L|0,13),A^=(0,i.rotl)(I+T|0,18),M^=(0,i.rotl)(S+k|0,7),K^=(0,i.rotl)(M+S|0,9),k^=(0,i.rotl)(K+M|0,13),S^=(0,i.rotl)(k+K|0,18),H^=(0,i.rotl)(N+C|0,7),U^=(0,i.rotl)(H+N|0,9),C^=(0,i.rotl)(U+H|0,13),N^=(0,i.rotl)(C+U|0,18),B^=(0,i.rotl)(j+O|0,7),_^=(0,i.rotl)(B+j|0,9),O^=(0,i.rotl)(_+B|0,13),j^=(0,i.rotl)(O+_|0,18),k^=(0,i.rotl)(A+B|0,7),U^=(0,i.rotl)(k+A|0,9),B^=(0,i.rotl)(U+k|0,13),A^=(0,i.rotl)(B+U|0,18),C^=(0,i.rotl)(S+L|0,7),_^=(0,i.rotl)(C+S|0,9),L^=(0,i.rotl)(_+C|0,13),S^=(0,i.rotl)(L+_|0,18),O^=(0,i.rotl)(N+M|0,7),T^=(0,i.rotl)(O+N|0,9),M^=(0,i.rotl)(T+O|0,13),N^=(0,i.rotl)(M+T|0,18),I^=(0,i.rotl)(j+H|0,7),K^=(0,i.rotl)(I+j|0,9),H^=(0,i.rotl)(K+I|0,13),j^=(0,i.rotl)(H+K|0,18);o[s++]=c+A|0,o[s++]=a+k|0,o[s++]=l+U|0,o[s++]=u+B|0,o[s++]=h+L|0,o[s++]=f+S|0,o[s++]=y+C|0,o[s++]=d+_|0,o[s++]=p+T|0,o[s++]=g+M|0,o[s++]=b+N|0,o[s++]=w+O|0,o[s++]=m+I|0,o[s++]=E+K|0,o[s++]=v+H|0,o[s++]=x+j|0}function a(t,e,r,n,o){let s=n+0,i=n+16*o;for(let n=0;n<16;n++)r[i+n]=t[e+16*(2*o-1)+n];for(let n=0;n<o;n++,s+=16,e+=16)c(r,i,t,e,r,s),n>0&&(i+=16),c(r,s,t,e+=16,r,i)}function l(t,e,r){const c=(0,i.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:a,r:l,p:u,dkLen:h,asyncTick:f,maxmem:y,onProgress:d}=c;if((0,n.number)(a),(0,n.number)(l),(0,n.number)(u),(0,n.number)(h),(0,n.number)(f),(0,n.number)(y),void 0!==d&&"function"!=typeof d)throw new Error("progressCb should be function");const p=128*l,g=p/4;if(a<=1||a&a-1||a>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(u<0||u>137438953440/p)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(h<0||h>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const b=p*(a+u);if(b>y)throw new Error(`Scrypt: parameters too large, ${b} (128 * r * (N + p)) > ${y} (maxmem)`);const w=(0,s.pbkdf2)(o.sha256,t,e,{c:1,dkLen:p*u}),m=(0,i.u32)(w),E=(0,i.u32)(new Uint8Array(p*a)),v=(0,i.u32)(new Uint8Array(p));let x=()=>{};if(d){const t=2*a*u,e=Math.max(Math.floor(t/1e4),1);let r=0;x=()=>{r++,!d||r%e&&r!==t||d(r/t)}}return{N:a,r:l,p:u,dkLen:h,blockSize32:g,V:E,B32:m,B:w,tmp:v,blockMixCb:x,asyncTick:f}}function u(t,e,r,n,i){const c=(0,s.pbkdf2)(o.sha256,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),c}},623:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha224=e.sha256=e.SHA256=void 0;const n=r(202),o=r(175),s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class a extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|i[0],this.B=0|i[1],this.C=0|i[2],this.D=0|i[3],this.E=0|i[4],this.F=0|i[5],this.G=0|i[6],this.H=0|i[7]}get(){const{A:t,B:e,C:r,D:n,E:o,F:s,G:i,H:c}=this;return[t,e,r,n,o,s,i,c]}set(t,e,r,n,o,s,i,c){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|c}process(t,e){for(let r=0;r<16;r++,e+=4)c[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=c[t-15],r=c[t-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,s=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;c[t]=s+c[t-7]+n+c[t-16]|0}let{A:r,B:i,C:a,D:l,E:u,F:h,G:f,H:y}=this;for(let t=0;t<64;t++){const e=y+((0,o.rotr)(u,6)^(0,o.rotr)(u,11)^(0,o.rotr)(u,25))+(0,n.Chi)(u,h,f)+s[t]+c[t]|0,d=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+(0,n.Maj)(r,i,a)|0;y=f,f=h,h=u,u=l+e|0,l=a,a=i,i=r,r=e+d|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,l=l+this.D|0,u=u+this.E|0,h=h+this.F|0,f=f+this.G|0,y=y+this.H|0,this.set(r,i,a,l,u,h,f,y)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}e.SHA256=a;class l extends a{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,o.wrapConstructor)((()=>new a)),e.sha224=(0,o.wrapConstructor)((()=>new l))},175:(t,e,r)=>{"use strict";\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=void 0,e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name},e.byteSwap32=function(t){for(let r=0;r<t.length;r++)t[r]=(0,e.byteSwap)(t[r])},e.bytesToHex=function(t){(0,o.bytes)(t);let e="";for(let r=0;r<t.length;r++)e+=s[t[r]];return e},e.hexToBytes=function(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,o=0;e<r;e++,o+=2){const r=c(t.charCodeAt(o)),s=c(t.charCodeAt(o+1));if(void 0===r||void 0===s){const e=t[o]+t[o+1];throw new Error(\'hex string expected, got non-hex character "\'+e+\'" at index \'+o)}n[e]=16*r+s}return n},e.asyncLoop=async function(t,r,n){let o=Date.now();for(let s=0;s<t;s++){n(s);const t=Date.now()-o;t>=0&&t<r||(await(0,e.nextTick)(),o+=t)}},e.utf8ToBytes=a,e.toBytes=l,e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];(0,o.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const o=t[e];r.set(o,n),n+=o.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&"[object Object]"!==u.call(e))throw new Error("Options should be object or undefined");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(l(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(l(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(l(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")};const n=r(145),o=r(557);e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t<<32-e|t>>>e;e.rotl=(t,e)=>t<<e|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t);const s=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const i={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function c(t){return t>=i._0&&t<=i._9?t-i._0:t>=i._A&&t<=i._F?t-(i._A-10):t>=i._a&&t<=i._f?t-(i._a-10):void 0}function a(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function l(t){return"string"==typeof t&&(t=a(t)),(0,o.bytes)(t),t}e.nextTick=async()=>{};e.Hash=class{clone(){return this._cloneInto()}};const u={}.toString},819:t=>{t.exports={pad:function(t,e){var r=t;if("number"!=typeof e)e=16;else{if(e>255)throw new RangeError("pad(): PKCS#7 padding cannot be longer than 255 bytes");if(e<0)throw new RangeError("pad(): PKCS#7 padding size must be positive")}if("string"==typeof t){var n=e-t.length%e;isNaN(n)&&(n=0);for(var o=String.fromCharCode(n),s=0;s<n;s++)r+=o}else{if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray))throw new TypeError("pad(): data could not be padded");var i=t.byteLength;n=e-i%e,isNaN(n)&&(n=0);var c=i+n;for((r=new t.constructor(c)).set(t),s=i;s<c;s++)r[s]=n}return r},unpad:function(t){var e=t;if("string"==typeof t&&t.length>0){var r=t.charCodeAt(t.length-1);if(r>t.length)throw new Error("unpad(): cannot remove "+r+" bytes from a "+t.length+"-byte(s) string");for(var n=t.length-2,o=t.length-r;n>=o;n--)if(t.charCodeAt(n)!==r)throw new Error("unpad(): found a padding byte of "+t.charCodeAt(n)+" instead of "+r+" at position "+n);e=t.substring(0,o)}else if(t instanceof Uint8Array||t instanceof Uint8ClampedArray){var s=t.byteLength,i=s-(r=t[s-1]);if(i<0)throw new Error("unpad(): cannot remove "+r+" bytes from a "+s+"-byte(s) string");for(n=s-2;n>=i;n--)if(t[n]!==r)throw new Error("unpad(): found a padding byte of "+t[n]+" instead of "+r+" at position "+n);e=t.slice(0,i)}return e}}},211:(t,e)=>{"use strict";function r(t,e,r){var n;if(void 0===r&&(r={}),!e.codes){e.codes={};for(var o=0;o<e.chars.length;++o)e.codes[e.chars[o]]=o}if(!r.loose&&t.length*e.bits&7)throw new SyntaxError("Invalid padding");for(var s=t.length;"="===t[s-1];)if(--s,!(r.loose||(t.length-s)*e.bits&7))throw new SyntaxError("Invalid padding");for(var i=new(null!=(n=r.out)?n:Uint8Array)(s*e.bits/8|0),c=0,a=0,l=0,u=0;u<s;++u){var h=e.codes[t[u]];if(void 0===h)throw new SyntaxError("Invalid character "+t[u]);a=a<<e.bits|h,(c+=e.bits)>=8&&(c-=8,i[l++]=255&a>>c)}if(c>=e.bits||255&a<<8-c)throw new SyntaxError("Unexpected end of data");return i}function n(t,e,r){void 0===r&&(r={});for(var n=r.pad,o=void 0===n||n,s=(1<<e.bits)-1,i="",c=0,a=0,l=0;l<t.length;++l)for(a=a<<8|255&t[l],c+=8;c>e.bits;)c-=e.bits,i+=e.chars[s&a>>c];if(c&&(i+=e.chars[s&a<<e.bits-c]),o)for(;i.length*e.bits&7;)i+="=";return i}Object.defineProperty(e,"__esModule",{value:!0});var o={chars:"0123456789ABCDEF",bits:4},s={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},i={chars:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bits:5},c={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bits:6},a={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},l={parse:function(t,e){return r(t.toUpperCase(),o,e)},stringify:function(t,e){return n(t,o,e)}},u={parse:function(t,e){return void 0===e&&(e={}),r(e.loose?t.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):t,s,e)},stringify:function(t,e){return n(t,s,e)}},h={parse:function(t,e){return r(t,i,e)},stringify:function(t,e){return n(t,i,e)}},f={parse:function(t,e){return r(t,c,e)},stringify:function(t,e){return n(t,c,e)}},y={parse:function(t,e){return r(t,a,e)},stringify:function(t,e){return n(t,a,e)}},d={parse:r,stringify:n};e.base16=l,e.base32=u,e.base32hex=h,e.base64=f,e.base64url=y,e.codec=d},718:(t,e,r)=>{"use strict";r.r(e),r.d(e,{decode:()=>i,encode:()=>s});const n={},o={};["ҠҿԀԟڀڿݠޟ߀ߟကဟႠႿᄀᅟᆀᆟᇠሿበቿዠዿጠጿᎠᏟᐠᙟᚠᛟកសᠠᡟᣀᣟᦀᦟ᧠᧿ᨠᨿᯀᯟᰀᰟᴀᴟ⇠⇿⋀⋟⍀⏟␀␟─❟➀➿⠀⥿⦠⦿⨠⩟⪀⪿⫠⭟ⰀⰟⲀⳟⴀⴟⵀⵟ⺠⻟㇀㇟㐀䶟䷀龿ꀀꑿ꒠꒿ꔀꗿꙀꙟꚠꛟ꜀ꝟꞀꞟꡀꡟ","ƀƟɀʟ"].forEach(((t,e)=>{const r=[];t.match(/../gu).forEach((t=>{const e=t.codePointAt(0),n=t.codePointAt(1);for(let t=e;t<=n;t++)r.push(String.fromCodePoint(t))}));const s=15-8*e;n[s]=r,r.forEach(((t,e)=>{o[t]=[s,e]}))}));const s=t=>{const e=t.length;let r="",o=0,s=0;for(let i=0;i<e;i++){const e=t[i];for(let t=7;t>=0;t--){o=(o<<1)+(e>>t&1),s++,15===s&&(r+=n[s][o],o=0,s=0)}}if(0!==s){for(;!(s in n);)o=1+(o<<1),s++;r+=n[s][o]}return r},i=t=>{const e=t.length,r=new Uint8Array(Math.floor(15*e/8));let n=0,s=0,i=0;for(let c=0;c<e;c++){const a=t.charAt(c);if(!(a in o))throw new Error(`Unrecognised Base32768 character: ${a}`);const[l,u]=o[a];if(15!==l&&c!==e-1)throw new Error("Secondary character found before end of input at position "+String(c));for(let t=l-1;t>=0;t--){s=(s<<1)+(u>>t&1),i++,8===i&&(r[n]=s,n++,s=0,i=0)}}if(s!==(1<<i)-1)throw new Error("Padding mismatch");return new Uint8Array(r.buffer,0,n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";function t(t,e,r,n){return new(r||(r=Promise))((function(o,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}a((n=n.apply(t,e||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var e=r(563);const n=self,o=((t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[t]];return e})(),s=new e.Cipher("base64");n.addEventListener("message",(e=>t(void 0,void 0,void 0,(function*(){const r=e.ports[0],{action:n,dataKeyBuf:i,nameKeyBuf:c,nameTweakBuf:a,inputName:l,inputContent:u}=e.data;if("prepare"===n)try{if(void 0===i||void 0===c||void 0===a)throw Error(`worker [${o}]: prepare: internal keys not transferred to worker properly`);s.updateInternalKey(new Uint8Array(i),new Uint8Array(c),new Uint8Array(a)),r.postMessage({status:"ok"})}catch(t){console.error(t),r.postMessage({status:"error",error:t})}else if("encryptName"===n)try{if(void 0===l)throw Error(`worker [${o}]: encryptName: internal inputName not transferred to worker properly`);const e=yield function(e){return t(this,void 0,void 0,(function*(){return yield s.encryptFileName(e)}))}(l);r.postMessage({status:"ok",outputName:e})}catch(t){console.error(`worker [${o}]: encryptName=${l}`),console.error(t),r.postMessage({status:"error",error:t})}else if("decryptName"===n)try{if(void 0===l)throw Error(`worker [${o}]: decryptName: internal inputName not transferred to worker properly`);const e=yield function(e){return t(this,void 0,void 0,(function*(){return yield s.decryptFileName(e)}))}(l);r.postMessage({status:"ok",outputName:e})}catch(t){console.error(`worker [${o}]: decryptName=${l}`),console.error(t),r.postMessage({status:"error",error:t})}else if("encryptContent"===n)try{if(void 0===u)throw Error(`worker [${o}]: encryptContent: internal inputContent not transferred to worker properly`);const e=yield function(e){return t(this,void 0,void 0,(function*(){return(yield s.encryptData(new Uint8Array(e),void 0)).buffer}))}(u);r.postMessage({status:"ok",outputContent:e},[e])}catch(t){console.error(t),r.postMessage({status:"error",error:t})}else if("decryptContent"===n)try{if(void 0===u)throw Error(`worker [${o}]: decryptContent: internal inputContent not transferred to worker properly`);const e=yield function(e){return t(this,void 0,void 0,(function*(){return(yield s.decryptData(new Uint8Array(e))).buffer}))}(u);r.postMessage({status:"ok",outputContent:e},[e])}catch(t){console.error(t),r.postMessage({status:"error",error:t})}else r.postMessage({status:"error",error:`worker [${o}]: unknown action=${n}`})}))))})()})();',"Worker",void 0,void 0)}const Mx=Cx.encryptedSize;class Dx{constructor(e,t){this.password=e,this.init=!1,this.workerIdx=0,this.cipher=new Cx.Cipher("base64"),this.workers=[];for(let e=0;e<t;++e)this.workers.push(new Fx)}closeResources(){for(let e=0;e<this.workers.length;++e)this.workers[e].terminate()}prepareByCallingWorker(){return r(this,void 0,void 0,(function*(){if(this.init)return;yield this.cipher.key(this.password,"");const e=[];for(let t=0;t<this.workers.length;++t)e.push(new Promise(((e,r)=>{const i=new MessageChannel;i.port2.onmessage=t=>{const{status:i}=t.data;"ok"===i?(this.init=!0,e()):r("error after prepareByCallingWorker")},i.port2.onmessageerror=e=>{r(e)},this.workers[t].postMessage({action:"prepare",dataKeyBuf:this.cipher.dataKey.buffer,nameKeyBuf:this.cipher.nameKey.buffer,nameTweakBuf:this.cipher.nameTweak.buffer},[i.port1])})));yield Promise.all(e)}))}encryptNameByCallingWorker(e){return r(this,void 0,void 0,(function*(){yield this.prepareByCallingWorker(),++this.workerIdx;const t=this.workerIdx%this.workers.length;return yield new Promise(((r,i)=>{const n=new MessageChannel;n.port2.onmessage=e=>{const{outputName:t}=e.data;void 0===t?i("unknown outputName after encryptNameByCallingWorker"):r(t)},n.port2.onmessageerror=e=>{i(e)},this.workers[t].postMessage({action:"encryptName",inputName:e},[n.port1])}))}))}decryptNameByCallingWorker(e){return r(this,void 0,void 0,(function*(){yield this.prepareByCallingWorker(),++this.workerIdx;const t=this.workerIdx%this.workers.length;return yield new Promise(((r,i)=>{const n=new MessageChannel;n.port2.onmessage=e=>{const{outputName:t,status:n}=e.data;"error"===n?i("error"):void 0===t?i("unknown outputName after decryptNameByCallingWorker"):r(t)},n.port2.onmessageerror=e=>{i(e)},this.workers[t].postMessage({action:"decryptName",inputName:e},[n.port1])}))}))}encryptContentByCallingWorker(e){return r(this,void 0,void 0,(function*(){yield this.prepareByCallingWorker(),++this.workerIdx;const t=this.workerIdx%this.workers.length;return yield new Promise(((r,i)=>{const n=new MessageChannel;n.port2.onmessage=e=>{const{outputContent:t}=e.data;void 0===t?i("unknown outputContent after encryptContentByCallingWorker"):r(t)},n.port2.onmessageerror=e=>{i(e)},this.workers[t].postMessage({action:"encryptContent",inputContent:e},[n.port1])}))}))}decryptContentByCallingWorker(e){return r(this,void 0,void 0,(function*(){yield this.prepareByCallingWorker(),++this.workerIdx;const t=this.workerIdx%this.workers.length;return yield new Promise(((r,i)=>{const n=new MessageChannel;n.port2.onmessage=e=>{const{outputContent:t,status:n}=e.data;"error"===n?i("error"):void 0===t?i("unknown outputContent after decryptContentByCallingWorker"):r(t)},n.port2.onmessageerror=e=>{i(e)},this.workers[t].postMessage({action:"decryptContent",inputContent:e},[n.port1,e])}))}))}}function Rx(e){return!(!e.startsWith(Sx)&&!e.startsWith(kx))}function Px(e){const t=m()(e);return t.keyEnc=t.keyRaw,t.sizeEnc=t.sizeRaw,t}class Ox extends Mp{constructor(e,t,r){super(),this.innerFs=e,this.password=null!=t?t:"",this.method=r,this.cacheMapOrigToEnc={},this.hasCacheMap=!1,this.kind=`encrypt(${this.innerFs.kind},${""!==this.password?r:"no password"})`,""!==this.password&&"rclone-base64"===r&&(this.cipherRClone=new Dx(t,5))}isPasswordEmpty(){return""===this.password}isFolderAware(){if("openssl-base64"===this.method)return!1;if("rclone-base64"===this.method)return!0;throw Error(`no idea about isFolderAware for method=${this.method}`)}isPasswordOk(){return r(this,void 0,void 0,(function*(){const e=yield this.walkPartial();if(void 0===e||0===e.length)return{ok:!0,reason:"empty_remote"};const t=e[0].keyRaw;if(this.isPasswordEmpty())return function(e){return Rx(e)}(t)?{ok:!1,reason:"remote_encrypted_local_no_password"}:{ok:!0,reason:"likely_no_password_both_sides"};if("unknown"===this.method)return{ok:!1,reason:"unknown_encryption_method"};if(function(e,t){return!(!Rx(e)||"openssl-base64"===t)||!Rx(e)&&"openssl-base64"===t}(t,this.method))return{ok:!1,reason:"encryption_method_not_matched"};try{if(void 0===(yield this._decryptName(t)))throw Error("decryption failed");return{ok:!0,reason:"password_matched"}}catch(e){return{ok:!1,reason:"password_or_method_not_matched_or_remote_not_encrypted"}}}))}walk(){return r(this,void 0,void 0,(function*(){const e=yield this.innerFs.walk();return yield this._dealWithWalk(e)}))}walkPartial(){return r(this,void 0,void 0,(function*(){const e=yield this.innerFs.walkPartial();return yield this._dealWithWalk(e)}))}_dealWithWalk(e){return r(this,void 0,void 0,(function*(){const t=[];if(this.isPasswordEmpty()){for(const r of e)t.push(Px(r)),this.cacheMapOrigToEnc[r.key]=r.key;return this.hasCacheMap=!0,t}for(const r of e){if(Yp(r.keyRaw,[]))continue;const e=yield this._decryptName(r.keyRaw),i=e.endsWith("/")?0:void 0;t.push({key:e,keyRaw:r.keyRaw,keyEnc:r.key,mtimeCli:r.mtimeCli,mtimeSvr:r.mtimeSvr,size:i,sizeEnc:r.size,sizeRaw:r.sizeRaw,hash:void 0,synthesizedFolder:r.synthesizedFolder}),this.cacheMapOrigToEnc[e]=r.keyRaw}return this.hasCacheMap=!0,t}))}stat(e){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for stat");const t=this.cacheMapOrigToEnc[e];if(void 0===t)throw new Error(`no encrypted key ${e} before!`);const r=yield this.innerFs.stat(t);return this.isPasswordEmpty()?Px(r):{key:e,keyRaw:r.keyRaw,keyEnc:r.key,mtimeCli:r.mtimeCli,mtimeSvr:r.mtimeSvr,size:void 0,sizeEnc:r.size,sizeRaw:r.sizeRaw,hash:void 0,synthesizedFolder:r.synthesizedFolder}}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for mkdir");if(!e.endsWith("/"))throw new Error(`should not call mkdir on ${e}`);let r=this.cacheMapOrigToEnc[e];if(void 0===r&&(r=this.isPasswordEmpty()?e:yield this._encryptName(e),this.cacheMapOrigToEnc[e]=r),this.isPasswordEmpty()||this.isFolderAware()){return Px(yield this.innerFs.mkdir(r,t,i))}{const n=Date.now();let o=new ArrayBuffer(0);this.innerFs.allowEmptyFile()||(o=new ArrayBuffer(1));const s=yield this.innerFs.writeFile(r,o,null!=t?t:n,null!=i?i:n);return{key:e,keyRaw:s.keyRaw,keyEnc:s.key,mtimeCli:s.mtimeCli,mtimeSvr:s.mtimeSvr,size:0,sizeEnc:s.size,sizeRaw:s.sizeRaw,hash:void 0,synthesizedFolder:s.synthesizedFolder}}}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for readFile");let r=this.cacheMapOrigToEnc[e];if(void 0===r&&(r=this.isPasswordEmpty()?e:yield this._encryptName(e),this.cacheMapOrigToEnc[e]=r),this.isPasswordEmpty()){return Px(yield this.innerFs.writeFile(r,t,i,n))}{const o=yield this._encryptContent(t),s=yield this.innerFs.writeFile(r,o,i,n);return{key:e,keyRaw:s.keyRaw,keyEnc:s.key,mtimeCli:s.mtimeCli,mtimeSvr:s.mtimeSvr,size:void 0,sizeEnc:s.size,sizeRaw:s.sizeRaw,hash:void 0,synthesizedFolder:s.synthesizedFolder}}}))}readFile(e){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for readFile");const t=this.cacheMapOrigToEnc[e];if(void 0===t)throw new Error(`no encrypted key ${e} before! cannot readFile`);const r=yield this.innerFs.readFile(t);if(this.isPasswordEmpty())return r;return yield this._decryptContent(r)}))}rename(e,t){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for readFile");let r=this.cacheMapOrigToEnc[e];void 0===r&&(r=this.isPasswordEmpty()?e:yield this._encryptName(e),this.cacheMapOrigToEnc[e]=r);let i=this.cacheMapOrigToEnc[t];return void 0===i&&(i=this.isPasswordEmpty()?t:yield this._encryptName(t),this.cacheMapOrigToEnc[t]=i),yield this.innerFs.rename(r,i)}))}rm(e){return r(this,void 0,void 0,(function*(){if(!this.hasCacheMap)throw new Error("You have to build the cacheMap firstly for rm");const t=this.cacheMapOrigToEnc[e];if(void 0===t)throw new Error(`no encrypted key ${e} before! cannot rm`);return yield this.innerFs.rm(t)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){return yield this.innerFs.checkConnect(e)}))}closeResources(){return r(this,void 0,void 0,(function*(){"rclone-base64"===this.method&&void 0!==this.cipherRClone&&this.cipherRClone.closeResources()}))}encryptEntity(e){return r(this,void 0,void 0,(function*(){if(void 0===e.key)throw Error(`input ${e.keyRaw} is abnormal without key`);if(this.isPasswordEmpty())return Px(e);const t=m()(e);if(void 0===t.sizeEnc&&void 0!==t.size&&(t.sizeEnc=this._getSizeFromOrigToEnc(t.size)),void 0===t.keyEnc||""===t.keyEnc){let r=this.cacheMapOrigToEnc[e.key];void 0!==r&&""!==r&&r!==t.key?t.keyEnc=r:(r=yield this._encryptName(e.key),t.keyEnc=r,this.cacheMapOrigToEnc[e.key]=r)}return t}))}_encryptContent(e){return r(this,void 0,void 0,(function*(){if(""===this.password)return e;if("openssl-base64"===this.method){const t=yield Tx(e,this.password);if(void 0===t)throw Error("cannot encrypt content");return t}if("rclone-base64"===this.method){const t=yield this.cipherRClone.encryptContentByCallingWorker(e);if(void 0===t)throw Error("cannot encrypt content");return t}throw Error(`not supported encrypt method=${this.method}`)}))}_decryptContent(e){return r(this,void 0,void 0,(function*(){if(""===this.password)return e;if("openssl-base64"===this.method){const t=yield Bx(e,this.password);if(void 0===t)throw Error("cannot decrypt content");return t}if("rclone-base64"===this.method){const t=yield this.cipherRClone.decryptContentByCallingWorker(e);if(void 0===t)throw Error("cannot decrypt content");return t}throw Error(`not supported decrypt method=${this.method}`)}))}_encryptName(e){return r(this,void 0,void 0,(function*(){if(""===this.password)return e;if("openssl-base64"===this.method){const t=yield((e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4,i=""){const n=yield Tx(qp((new TextEncoder).encode(e)),t,r,i);return ne(new Uint8Array(n),{pad:!1})})))(e,this.password);if(void 0===t)throw Error(`cannot encrypt name=${e}`);return t}if("rclone-base64"===this.method){const t=yield this.cipherRClone.encryptNameByCallingWorker(e);if(void 0===t)throw Error(`cannot encrypt name=${e}`);return t}throw Error(`not supported encrypt method=${this.method}`)}))}_decryptName(e){return r(this,void 0,void 0,(function*(){if(""===this.password)return e;if("openssl-base64"!==this.method){if("rclone-base64"===this.method){const t=yield this.cipherRClone.decryptNameByCallingWorker(e);if(void 0===t)throw Error(`cannot decrypt name=${e}`);return t}throw Error(`not supported decrypt method=${this.method}`)}if(e.startsWith(Sx))try{const t=yield((e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4){return(new TextDecoder).decode(yield Bx(qp(re(e,{loose:!0})),t,r))})))(e,this.password);if(void 0!==t&&jp(t))return t;throw Error(`cannot decrypt name=${e}`)}catch(t){throw Error(`cannot decrypt name=${e}`)}else{if(!e.startsWith(kx))throw Error(`method=${this.method} but the name=${e}, likely mismatch`);try{const t=yield((e,t,...i)=>r(void 0,[e,t,...i],void 0,(function*(e,t,r=2e4){return(new TextDecoder).decode(yield Bx(qp(ie(e,{loose:!0})),t,r))})))(e,this.password);if(void 0!==t&&jp(t))return t;throw Error(`cannot decrypt name=${e}`)}catch(t){throw Error(`cannot decrypt name=${e}`)}}}))}_getSizeFromOrigToEnc(e){if(""===this.password)return e;if("openssl-base64"===this.method)return(e=>{if(e<0||Number.isNaN(e)||!Number.isInteger(e))throw Error(`getSizeFromOrigToEnc: x=${e} is not a valid size`);return 16*(Math.floor(e/16)+1)+16})(e);if("rclone-base64"===this.method)return Mx(e);throw Error(`not supported encrypt method=${this.method}`)}getUserDisplayName(){return r(this,void 0,void 0,(function*(){return yield this.innerFs.getUserDisplayName()}))}revokeAuth(){return r(this,void 0,void 0,(function*(){return yield this.innerFs.revokeAuth()}))}allowEmptyFile(){return!0}}const zx=["User.Read","Files.ReadWrite.AppFolder","offline_access"],Nx=`obsidian://${F}`,qx={accessToken:"",clientID:B,authority:C,refreshToken:"",accessTokenExpiresInSeconds:0,accessTokenExpiresAtTime:0,deltaLink:"",username:"",credentialsShouldBeDeletedAtTime:0,emptyFile:"skip",kind:"onedrive"};const Ux=(e,t)=>{const r=`/drive/special/approot:/${t}`;let i=e;return"/"===e||""===e?r:(i.endsWith("/")&&(i=i.slice(0,i.length-1)),i.startsWith("/")?(console.warn(`why the path ${i} starts with '/'? but we just go on.`),i=`${r}${i}`):i=`${r}/${i}`,i)},Lx=e=>{var t,r;return`parentPath="${null!==(r=null===(t=e.parentReference)||void 0===t?void 0:t.path)&&void 0!==r?r:"(no parentReference or path)"}", selfName="${e.name}"`},jx=(e,t)=>{var r,i;let n="";const o="/drive/items/",s=encodeURIComponent(t);if(void 0===e.parentReference||null===e.parentReference||void 0===e.parentReference.path||null===e.parentReference.path)throw Error("x.parentReference.path is undefinded or null");const a=`${e.parentReference.path}/${e.name}`,l=a.match(/^\/drive\/root:\/[^\/]+\/remotely-save\//g),d=a.match(/^\/drive\/root:\/[^\/]+\/Graph\//g),c=a.match(/^\/drive\/root:\/[^\/]+\/Graph 1\//g),u=a.match(/^\/drive\/root:\/[^\/]+\/Graph%201\//g),p=a.match(/^\/Livefolders\/[^\/]+\/remotely-save\//g),h=a.match(/^\/drive\/root:\/[^\/]+\/app\/remotely-save\//g);if(null!==l&&a.startsWith(`${l[0]}${t}`)){const e=`${l[0]}${t}`;n=a.substring(e.length+1)}else if(null!==l&&a.startsWith(`${l[0]}${s}`)){const e=`${l[0]}${s}`;n=a.substring(e.length+1)}else if(null!==d&&a.startsWith(`${d[0]}${t}`)){const e=`${d[0]}${t}`;n=a.substring(e.length+1)}else if(null!==d&&a.startsWith(`${d[0]}${s}`)){const e=`${d[0]}${s}`;n=a.substring(e.length+1)}else if(null!==c&&a.startsWith(`${c[0]}${t}`)){const e=`${c[0]}${t}`;n=a.substring(e.length+1)}else if(null!==c&&a.startsWith(`${c[0]}${s}`)){const e=`${c[0]}${s}`;n=a.substring(e.length+1)}else if(null!==u&&a.startsWith(`${u[0]}${t}`)){const e=`${u[0]}${t}`;n=a.substring(e.length+1)}else if(null!==u&&a.startsWith(`${u[0]}${s}`)){const e=`${u[0]}${s}`;n=a.substring(e.length+1)}else if(null!==p&&a.startsWith(`${p[0]}${t}`)){const e=`${p[0]}${t}`;n=a.substring(e.length+1)}else if(null!==p&&a.startsWith(`${p[0]}${s}`)){const e=`${p[0]}${s}`;n=a.substring(e.length+1)}else if(null!==h&&a.startsWith(`${h[0]}${t}`)){const e=`${h[0]}${t}`;n=a.substring(e.length+1)}else if(null!==h&&a.startsWith(`${h[0]}${s}`)){const e=`${h[0]}${s}`;n=a.substring(e.length+1)}else{if(!e.parentReference.path.startsWith(o))throw Error(`file/folder, no idea how to deal with it without known prefix:\nfullPathOriginal=${a}\nmatchFirstPrefixRes=${l}\nmatchFifthPrefixRes=${d}\nmatchSixthPrefixRes=${c}\nmatchSixthV2PrefixRes=${u}\nmatchSecondPrefixRes=${p}\nmatchThirdPrefixRes=${h}\n${Lx(e)}`);{if(void 0===e.name||null===e.name)throw Error(`OneDrive item no name variable while matching ${o}`);const r=decodeURIComponent(e.parentReference.path);if(n=r.substring(r.indexOf(":")+1),n.startsWith(`/${t}/`))n=n.substring(`/${t}/`.length),n=`${n}/${e.name}`;else{if(n!==`/${t}`)throw Error(`file/folder with /drive/items/, no idea how to deal with it:\nfullPathOriginal=${a}\nmatchFirstPrefixRes=${l}\nmatchFifthPrefixRes=${d}\nmatchSixthPrefixRes=${c}\nmatchSixthV2PrefixRes=${u}\nmatchSecondPrefixRes=${p}\nmatchThirdPrefixRes=${h}\n${Lx(e)}`);n=e.name}}}const f="folder"in e;f&&(n=`${n}/`);const m=null===(r=null==e?void 0:e.fileSystemInfo)||void 0===r?void 0:r.lastModifiedDateTime;if(null==m)throw Error(`onedrive cannot parse mtime: ${JSON.stringify(e,null,2)}`);let g=null===(i=null==e?void 0:e.fileSystemInfo)||void 0===i?void 0:i.createdDateTime;null==g&&(g=m);return{key:n,keyRaw:n,mtimeSvr:Date.parse(m),mtimeCli:Date.parse(m),ctimeCli:Date.parse(g),size:f?0:e.size,sizeRaw:f?0:e.size,synthesizedFile:!1}};class Hx{constructor(e,t){this.onedriveConfig=e,this.saveUpdatedConfigFunc=t}getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveConfig.accessToken||""===this.onedriveConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.onedriveConfig.accessTokenExpiresAtTime>e)return this.onedriveConfig.accessToken;{const o=yield(t=this.onedriveConfig.clientID,i=this.onedriveConfig.authority,n=this.onedriveConfig.refreshToken,r(void 0,void 0,void 0,(function*(){try{const e=yield(0,k.request)({url:`${i}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:new URLSearchParams({tenant:"consumers",client_id:t,scope:zx.join(" "),refresh_token:n,grant_type:"refresh_token"}).toString()}),r=JSON.parse(e);return r.error,r}catch(e){throw console.error(e),e}})));if(void 0!==o.error){const e=o;throw Error(`Error while refreshing accessToken: ${e.error}, ${e.error_codes}: ${e.error_description}`)}const s=o;return this.onedriveConfig.accessToken=s.access_token,this.onedriveConfig.refreshToken=s.refresh_token,this.onedriveConfig.accessTokenExpiresInSeconds=s.expires_in,this.onedriveConfig.accessTokenExpiresAtTime=e+1e3*s.expires_in-12e4,yield this.saveUpdatedConfigFunc(),console.info("Onedrive accessToken updated"),this.onedriveConfig.accessToken}var t,i,n}))}}const $x=e=>{const t=m()(e);return t.accessToken="x",t.accessTokenExpiresInSeconds=1,t.accessTokenExpiresAtTime=1,t};class Gx extends Mp{constructor(e,t,r){super(),this.kind="onedrive",this.onedriveConfig=e,this.remoteBaseDir=this.onedriveConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.authGetter=new Hx(e,r),this.foldersCreatedBefore=new Set}_init(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveConfig.accessToken||""===this.onedriveConfig.refreshToken)throw Error("The user has not manually auth yet.");if(this.vaultFolderExists);else{const e=yield this._getJson("/drive/special/approot/children");this.vaultFolderExists=e.value.filter((e=>e.name===this.remoteBaseDir)).length>0,this.vaultFolderExists||(console.info(`remote does not have folder /${this.remoteBaseDir}`),yield this._postJson("/drive/special/approot/children",{name:`${this.remoteBaseDir}`,folder:{},"@microsoft.graph.conflictBehavior":"replace"}),console.info(`remote folder /${this.remoteBaseDir} created`),this.vaultFolderExists=!0)}}))}_buildUrl(e){let t="";if(e.startsWith("http://")||e.startsWith("https://"))t=e;else{t=`https://graph.microsoft.com/v1.0${encodeURI(e)}`}return t=t.replace(/#/g,"%23"),t}_getJson(e){return r(this,void 0,void 0,(function*(){const t=this._buildUrl(e);return console.debug(`getJson, theUrl=${t}`),JSON.parse(yield(0,k.request)({url:t,method:"GET",contentType:"application/json",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`,"Cache-Control":"no-cache"}}))}))}_postJson(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);return console.debug(`postJson, theUrl=${r}`),JSON.parse(yield(0,k.request)({url:r,method:"POST",contentType:"application/json",body:JSON.stringify(t),headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}))}))}_patchJson(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);return console.debug(`patchJson, theUrl=${r}`),JSON.parse(yield(0,k.request)({url:r,method:"PATCH",contentType:"application/json",body:JSON.stringify(t),headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}))}))}_deleteJson(e){return r(this,void 0,void 0,(function*(){const t=this._buildUrl(e);console.debug(`deleteJson, theUrl=${t}`),t_?yield(0,k.requestUrl)({url:t,method:"DELETE",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}}):yield fetch(t,{method:"DELETE",headers:{Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}})}))}_putArrayBuffer(e,t){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);console.debug(`putArrayBuffer, theUrl=${r}`);{const e=yield fetch(r,{method:"PUT",body:t,headers:{"Content-Type":I,Authorization:`Bearer ${yield this.authGetter.getAccessToken()}`}});return yield e.json()}}))}_putUint8ArrayByRange(e,t,i,n,o){return r(this,void 0,void 0,(function*(){const r=this._buildUrl(e);console.debug(`putUint8ArrayByRange, theUrl=${r}, range=${i}-${n-1}, len=${n-i}, size=${o}`);{const e=yield fetch(r,{method:"PUT",body:t.subarray(i,n),headers:{"Content-Length":""+(n-i),"Content-Range":`bytes ${i}-${n-1}/${o}`,"Content-Type":I}});return yield e.json()}}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();const e="@odata.nextLink",t="@odata.deltaLink";let r=yield this._getJson(`/drive/special/approot:/${this.remoteBaseDir}:/delta`);const i=r.value;for(;e in r;)r=yield this._getJson(r[e]),i.push(...m()(r.value));t in r&&(this.onedriveConfig.deltaLink=r[t],yield this.saveUpdatedConfigFunc());const n=i.map((e=>jx(e,this.remoteBaseDir))).filter((e=>"/"!==e.key));return n}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();const e="@odata.deltaLink",t=yield this._getJson(`/drive/special/approot:/${this.remoteBaseDir}:/delta`),r=t.value;e in t&&(this.onedriveConfig.deltaLink=t[e],yield this.saveUpdatedConfigFunc());const i=r.map((e=>jx(e,this.remoteBaseDir))).filter((e=>"/"!==e.key));return i}))}stat(e){return r(this,void 0,void 0,(function*(){return yield this._init(),yield this._statFromRoot(Ux(e,this.remoteBaseDir))}))}_statFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield this._getJson(`${e}?$select=cTag,eTag,fileSystemInfo,folder,file,name,parentReference,size`);return jx(t,this.remoteBaseDir)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not call mkdir on ${e}`);yield this._init();const r=Ux(e,this.remoteBaseDir);return console.debug(`mkdir uploadFolder=${r}`),yield this._mkdirFromRoot(r,t,i)}))}_mkdirFromRoot(e,t,i){return r(this,void 0,void 0,(function*(){if(this.foldersCreatedBefore.has(e));else{const r={folder:{},"@microsoft.graph.conflictBehavior":"replace"},n={};if(void 0!==t&&0!==t){const e=new Date(t).toISOString();n.lastModifiedDateTime=e}if(void 0!==i&&0!==i){const e=new Date(i).toISOString();n.createdDateTime=e}Object.keys(n).length>0&&(r.fileSystemInfo=n),yield this._patchJson(e,r)}return yield this._statFromRoot(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`you should not call writeFile on ${e}`);yield this._init();const r=Ux(e,this.remoteBaseDir);return console.debug(`uploadFile=${r}`),yield this._writeFileFromRoot(r,t,i,n,e,this.onedriveConfig.emptyFile)}))}_writeFileFromRoot(e,t,i,n,o,s){return r(this,void 0,void 0,(function*(){if(0===t.byteLength){if("error"===s)throw Error(`${o}: Empty file is not allowed in OneDrive, and please write something in it.`);return{key:o,keyRaw:o,mtimeSvr:i,mtimeCli:i,ctimeCli:n,size:0,sizeRaw:0,synthesizedFile:!0}}const r=new Date(n).toISOString(),a=new Date(i).toISOString(),l=6553600;if(t.byteLength<4e6)yield this._putArrayBuffer(`${e}:/content?${new URLSearchParams({"@microsoft.graph.conflictBehavior":"replace"})}`,t),0!==i&&0!==n&&(yield this._patchJson(e,{fileSystemInfo:{lastModifiedDateTime:a,createdDateTime:r}}));else{let o={item:{"@microsoft.graph.conflictBehavior":"replace"}};0!==i&&0!==n&&(o={item:{"@microsoft.graph.conflictBehavior":"replace",fileSystemInfo:{lastModifiedDateTime:a,createdDateTime:r}}});const s=yield this._postJson(`${e}:/createUploadSession`,o),d=s.uploadUrl;console.debug("uploadSession = "),console.debug(s);const c=new Uint8Array(t);let u=0;for(;u<c.byteLength;)yield this._putUint8ArrayByRange(d,c,u,Math.min(u+l,c.byteLength),c.byteLength),u+=l}return yield this._statFromRoot(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){if(yield this._init(),e.endsWith("/"))throw new Error(`you should not call readFile on folder ${e}`);const t=Ux(e,this.remoteBaseDir);return yield this._readFileFromRoot(t)}))}_readFileFromRoot(e){return r(this,void 0,void 0,(function*(){const t=(yield this._getJson(`${e}?$select=@microsoft.graph.downloadUrl`))["@microsoft.graph.downloadUrl"];try{return yield(yield fetch(t,{cache:"no-store"})).arrayBuffer()}catch(e){return(yield(0,k.requestUrl)({url:t,headers:{"Cache-Control":"no-cache"}})).arrayBuffer}}))}rename(e,t){return r(this,void 0,void 0,(function*(){if(""===e||"/"===e||""===t||"/"===t)return;const r=Ux(e,this.remoteBaseDir),i=Ux(t,this.remoteBaseDir);yield this._init(),yield this._patchJson(r,{name:i})}))}rm(e){return r(this,void 0,void 0,(function*(){if(""===e||"/"===e)return;const t=Ux(e,this.remoteBaseDir);yield this._init(),yield this._deleteJson(t)}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{if("<unknown display name>"===(yield this.getUserDisplayName()))throw Error("unknown display name!")}catch(t){return console.debug(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){yield this._init();return(yield this._getJson("/me?$select=displayName")).displayName||"<unknown display name>"}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}getRevokeAddr(){return r(this,void 0,void 0,(function*(){return"https://account.live.com/consent/Manage"}))}allowEmptyFile(){return!1}}var Wx=__webpack_require__(48287),Kx=__webpack_require__(88310);const Vx=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,r){t.updateHttpClientConfig(e,r)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};var Jx,Yx,Qx,Zx;!function(e){e.HEADER="header",e.QUERY="query"}(Jx||(Jx={})),function(e){e.HEADER="header",e.QUERY="query"}(Yx||(Yx={})),function(e){e.HTTP="http",e.HTTPS="https"}(Qx||(Qx={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(Zx||(Zx={}));var Xx;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(Xx||(Xx={}));const eS="__smithy_context";var tS,rS;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(tS||(tS={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(rS||(rS={}));class iS{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new iS({...e,headers:{...e.headers}});var r;return t.query&&(t.query=(r=t.query,Object.keys(r).reduce(((e,t)=>{const i=r[t];return{...e,[t]:Array.isArray(i)?[...i]:i}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return iS.clone(this)}}class nS{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const oS={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},sS=e=>({applyToStack:t=>{t.add(function(e){return t=>async r=>{const{request:i}=r;return iS.isInstance(i)&&i.body&&"node"===e.runtime&&"FetchHttpHandler"!==e.requestHandler?.constructor?.name&&(i.headers={...i.headers,Expect:"100-continue"}),t({...r,request:i})}}(e),oS)}}),aS={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},lS=aS.WHEN_SUPPORTED,dS=aS.WHEN_SUPPORTED;var cS,uS;!function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.SHA1="SHA1",e.SHA256="SHA256"}(cS||(cS={})),function(e){e.HEADER="header",e.TRAILER="trailer"}(uS||(uS={}));const pS=cS.MD5,hS=cS.CRC32;var fS;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(fS||(fS={}));function mS(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}const gS=[cS.CRC32,cS.CRC32C,cS.SHA1,cS.SHA256],yS=[cS.SHA256,cS.SHA1,cS.CRC32,cS.CRC32C],vS=e=>e===cS.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,bS=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),wS=e=>void 0!==e&&"string"!=typeof e&&!ArrayBuffer.isView(e)&&!bS(e);var _S=__webpack_require__(48287).Buffer,xS=void 0!==_S&&_S.from?function(e){return _S.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function SS(e){return e instanceof Uint8Array?e:"string"==typeof e?xS(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function kS(e){return"string"==typeof e?0===e.length:0===e.byteLength}function ES(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}function TS(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var BS=function(){function e(){this.crc32=new CS}return e.prototype.update=function(e){kS(e)||this.crc32.update(SS(e))},e.prototype.digest=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,ES(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new CS},e}();var CS=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n(e),o=i.next();!o.done;o=i.next()){var s=o.value;this.checksum=this.checksum>>>8^IS[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),IS=TS([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),AS=function(){function e(){this.crc32c=new FS}return e.prototype.update=function(e){kS(e)||this.crc32c.update(SS(e))},e.prototype.digest=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,ES(this.crc32c.digest())]}))}))},e.prototype.reset=function(){this.crc32c=new FS},e}();var FS=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n(e),o=i.next();!o.done;o=i.next()){var s=o.value;this.checksum=this.checksum>>>8^MS[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),MS=TS([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]);const DS=(e,t)=>({[cS.MD5]:t.md5,[cS.CRC32]:BS,[cS.CRC32C]:AS,[cS.SHA1]:t.sha1,[cS.SHA256]:t.sha256}[e]),RS=e=>(new TextEncoder).encode(e),PS=e=>"string"==typeof e?RS(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),OS=(e,t)=>{const r=new e;return r.update(PS(t||"")),r.digest()},zS={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},NS=(e,t)=>(r,i)=>async n=>{if(!iS.isInstance(n.request))return r(n);const{request:o}=n,{body:s,headers:a}=o,{base64Encoder:l,streamHasher:d}=e,{input:c,requestChecksumRequired:u,requestAlgorithmMember:p}=t,h=((e,{requestChecksumRequired:t,requestAlgorithmMember:r},i)=>{const n=i?hS:pS;if(!r||!e[r])return t?n:void 0;const o=e[r];if(!gS.includes(o))throw new Error(`The checksum algorithm "${o}" is not supported by the client. Select one of ${gS}.`);return o})(c,{requestChecksumRequired:u,requestAlgorithmMember:p},!!i.isS3ExpressBucket);let f=s,m=a;if(h){switch(h){case cS.CRC32:mS(i,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case cS.CRC32C:mS(i,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case cS.SHA1:mS(i,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case cS.SHA256:mS(i,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y")}const t=vS(h),r=DS(h,e);if(wS(s)){const{getAwsChunkedEncodingStream:i,bodyLengthChecker:n}=e;f=i(s,{base64Encoder:l,bodyLengthChecker:n,checksumLocationName:t,checksumAlgorithmFn:r,streamHasher:d}),m={...a,"content-encoding":a["content-encoding"]?`${a["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":a["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":t},delete m["content-length"]}else if(!((e,t)=>{const r=e.toLowerCase();for(const e of Object.keys(t))if(r===e.toLowerCase())return!0;return!1})(t,a)){const e=await OS(r,s);m={...a,[t]:l(e)}}}return await r({...n,request:{...o,headers:m,body:f}})},qS=(e=[])=>{const t=[];for(const r of yS)e.includes(r)&&gS.includes(r)&&t.push(r);return t};function US(e){return new Blob([e]).stream()}const LS=async(e,{streamHasher:t,checksumAlgorithmFn:r,base64Encoder:i})=>{const n=wS(e)?t(r,e):OS(r,e);return i(await n)},jS={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},HS=(e,t)=>(r,i)=>async n=>{if(!iS.isInstance(n.request))return r(n);const o=n.input,s=await r(n),a=s.response;let l;const{requestValidationModeMember:d,responseAlgorithms:c}=t;if(d&&"ENABLED"===o[d]){const{clientName:t,commandName:r}=i;if("S3Client"===t&&"GetObjectCommand"===r&&qS(c).every((e=>{const t=vS(e),r=a.headers[t];return!r||(e=>{const t=e.lastIndexOf("-");if(-1!==t){const r=e.slice(t+1);if(!r.startsWith("0")){const e=parseInt(r,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1})(r)})))return s;const n=wS(a.body);n&&(l=await e.streamCollector(a.body),a.body=US(l)),await(async(e,{config:t,responseAlgorithms:r})=>{const i=qS(r),{body:n,headers:o}=e;for(const e of i){const r=vS(e),i=o[r];if(i){const o=DS(e,t),{streamHasher:s,base64Encoder:a}=t,l=await LS(n,{streamHasher:s,checksumAlgorithmFn:o,base64Encoder:a});if(l===i)break;throw new Error(`Checksum mismatch: expected "${l}" but received "${i}" in response header "${r}".`)}}})(s.response,{config:e,responseAlgorithms:c}),n&&l&&(a.body=US(l))}return s},$S=(e,t)=>({applyToStack:r=>{r.add(NS(e,t),zS),r.addRelativeTo(HS(e,t),jS)}}),GS=e=>e[eS]||(e[eS]={}),WS=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const KS={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},VS=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{if(!iS.isInstance(r.request))return t(r);const{request:i}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(r)})(e),KS)}}),JS={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var YS=__webpack_require__(65606);const QS="X-Amzn-Trace-Id",ZS={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},XS=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{const{request:i}=r;if(!iS.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(QS))return t(r);const n=YS.env.AWS_LAMBDA_FUNCTION_NAME,o=YS.env._X_AMZN_TRACE_ID,s=e=>"string"==typeof e&&e.length>0;return s(n)&&s(o)&&(i.headers[QS]=o),t({...r,request:i})})(e),ZS)}}),ek=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const e of t)r.push(e);return r},tk=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,rk=()=>{let e=[],t=[],r=!1;const i=new Set,n=r=>(e.forEach((e=>{r.add(e.middleware,{...e})})),t.forEach((e=>{r.addRelativeTo(e.middleware,{...e})})),r.identifyOnResolve?.(a.identifyOnResolve()),r),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(r=!1)=>{const i=[],n=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of ek(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of ek(t.name,t.aliases))s[e]=t;n.push(t)})),n.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(r)return;throw new Error(`${e.toMiddleware} is not found when adding ${tk(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(l=i,l.sort(((e,t)=>ik[t.step]-ik[e.step]||nk[t.priority||"normal"]-nk[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var l;return a},a={add:(t,r={})=>{const{name:n,override:o,aliases:s}=r,a={step:"initialize",priority:"normal",middleware:t,...r},l=ek(n,s);if(l.length>0){if(l.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${tk(n,s)}'`);for(const t of l){const r=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===r)continue;const i=e[r];if(i.step!==a.step||a.priority!==i.priority)throw new Error(`"${tk(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${tk(n,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(r,1)}}for(const e of l)i.add(e)}e.push(a)},addRelativeTo:(e,r)=>{const{name:n,override:o,aliases:s}=r,a={middleware:e,...r},l=ek(n,s);if(l.length>0){if(l.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${tk(n,s)}'`);for(const e of l){const r=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===r)continue;const i=t[r];if(i.toMiddleware!==a.toMiddleware||i.relation!==a.relation)throw new Error(`"${tk(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${tk(n,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(r,1)}}for(const e of l)i.add(e)}t.push(a)},clone:()=>n(rk()),use:e=>{e.applyToStack(a)},remove:r=>"string"==typeof r?(r=>{let n=!1;const o=e=>{const t=ek(e.name,e.aliases);if(t.includes(r)){n=!0;for(const e of t)i.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),n})(r):(r=>{let n=!1;const o=e=>{if(e.middleware===r){n=!0;for(const t of ek(e.name,e.aliases))i.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),n})(r),removeByTag:r=>{let n=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(r)){const e=ek(o,s);for(const t of e)i.delete(t);return n=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),n},concat:e=>{const t=n(rk());return t.use(e),t.identifyOnResolve(r||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:n,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return tk(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(r=e),r),resolve:(e,t)=>{for(const r of s().map((e=>e.middleware)).reverse())e=r(e,t);return r&&console.log(a.identify()),e}};return a},ik={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},nk={high:3,normal:2,low:1};class ok{constructor(e){this.config=e,this.middlewareStack=rk()}send(e,t,r){const i="function"!=typeof t?t:void 0,n="function"==typeof t?t:r;let o;if(void 0===i&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(!n)return o(e).then((e=>e.output));o(e).then((e=>n(null,e.output)),(e=>n(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const sk={},ak=new Array(64);for(let e=0,t="A".charCodeAt(0),r="Z".charCodeAt(0);e+t<=r;e++){const r=String.fromCharCode(e+t);sk[r]=e,ak[e]=r}for(let e=0,t="a".charCodeAt(0),r="z".charCodeAt(0);e+t<=r;e++){const r=String.fromCharCode(e+t),i=e+26;sk[r]=i,ak[i]=r}for(let e=0;e<10;e++){sk[e.toString(10)]=e+52;const t=e.toString(10),r=e+52;sk[t]=r,ak[r]=t}sk["+"]=62,ak[62]="+",sk["/"]=63,ak[63]="/";const lk=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const r=new ArrayBuffer(t),i=new DataView(r);for(let t=0;t<e.length;t+=4){let r=0,n=0;for(let i=t,o=t+3;i<=o;i++)if("="!==e[i]){if(!(e[i]in sk))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);r|=sk[e[i]]<<6*(o-i),n+=6}else r>>=6;const o=t/4*3;r>>=n%8;const s=Math.floor(n/8);for(let e=0;e<s;e++){const t=8*(s-e-1);i.setUint8(o+e,(r&255<<t)>>t)}}return new Uint8Array(r)};function dk(e){let t;t="string"==typeof e?RS(e):e;const r="object"==typeof t&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!i)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let n="";for(let e=0;e<t.length;e+=3){let r=0,i=0;for(let n=e,o=Math.min(e+3,t.length);n<o;n++)r|=t[n]<<8*(o-n-1),i+=8;const o=Math.ceil(i/6);r<<=6*o-i;for(let e=1;e<=o;e++){const t=6*(o-e);n+=ak[(r&63<<t)>>t]}n+="==".slice(0,4-o)}return n}const ck=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class uk extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?uk.mutate(lk(e)):uk.mutate(RS(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,uk.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?dk(e):ck(e)}(this,e)}}const pk=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:i,checksumAlgorithmFn:n,checksumLocationName:o,streamHasher:s}=t,a=void 0!==r&&void 0!==i&&void 0!==n&&void 0!==o&&void 0!==s,l=a?s(n,e):void 0,d=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:n}=await d.read();if(n){if(e.enqueue("0\r\n"),a){const t=r(await l);e.enqueue(`${o}:${t}\r\n`),e.enqueue("\r\n")}e.close()}else e.enqueue(`${(i(t)||0).toString(16)}\r\n${t}\r\n`)}})},hk=e=>encodeURIComponent(e).replace(/[!'()*]/g,fk),fk=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function mk(e){const t=[];for(let r of Object.keys(e).sort()){const i=e[r];if(r=hk(r),Array.isArray(i))for(let e=0,n=i.length;e<n;e++)t.push(`${r}=${hk(i[e])}`);else{let e=r;(i||"string"==typeof i)&&(e+=`=${hk(i)}`),t.push(e)}}return t.join("&")}function gk(e=0){return new Promise(((t,r)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",r(t)}),e)}))}const yk={supported:void 0};class vk{static create(e){return"function"==typeof e?.handle?e:new vk(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===yk.supported&&(yk.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const r=this.config.requestTimeout,i=!0===this.config.keepAlive,n=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=mk(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:l,method:d}=e,c=`${e.protocol}//${a}${e.hostname}${l?`:${l}`:""}${o}`,u="GET"===d||"HEAD"===d?void 0:e.body,p={body:u,headers:new Headers(e.headers),method:d,credentials:n};this.config?.cache&&(p.cache=this.config.cache),u&&(p.duplex="half"),"undefined"!=typeof AbortController&&(p.signal=t),yk.supported&&(p.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let h=()=>{};const f=new Request(c,p),m=[fetch(f).then((e=>{const t=e.headers,r={};for(const e of t.entries())r[e[0]]=e[1];return null!=e.body?{response:new nS({headers:r,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new nS({headers:r,reason:e.statusText,statusCode:e.status,body:t})})))})),gk(r)];return t&&m.push(new Promise(((e,r)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",r(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),h=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(m).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r=>(r[e]=t,r)))}httpHandlerConfigs(){return this.config??{}}}const bk=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,r)=>{const i=new FileReader;i.onloadend=()=>{if(2!==i.readyState)return r(new Error("Reader aborted too early"));const e=i.result??"",n=e.indexOf(","),o=n>-1?n+1:e.length;t(e.substring(o))},i.onabort=()=>r(new Error("Read aborted")),i.onerror=()=>r(i.error),i.readAsDataURL(e)}))}(e),r=lk(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let i=!1,n=0;for(;!i;){const{done:e,value:o}=await r.read();o&&(t.push(o),n+=o.length),i=e}const o=new Uint8Array(n);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const wk={},_k={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),wk[e]=t,_k[t]=e}function xk(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const i=e.slice(r,r+2).toLowerCase();if(!(i in _k))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[r/2]=_k[i]}return t}function Sk(e){let t="";for(let r=0;r<e.byteLength;r++)t+=wk[e[r]];return t}const kk=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),Ek="The stream has already been transformed.",Tk=e=>{if(!Bk(e)&&!kk(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(Ek);return t=!0,await bk(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return dk(t);if("hex"===e)return Sk(t);if(void 0===e||"utf8"===e||"utf-8"===e)return ck(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Ek);if(t=!0,Bk(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(kk(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Bk=e=>"function"==typeof Blob&&e instanceof Blob;const Ck=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return uk.mutate(e);if(!e)return uk.mutate(new Uint8Array);const r=t.streamCollector(e);return uk.mutate(await r)};class Ik{constructor(){this.middlewareStack=rk()}static classBuilder(){return new Ak}resolveMiddlewareWithContext(e,t,r,{middlewareFn:i,clientName:n,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:l,additionalContext:d,CommandCtor:c}){for(const n of i.bind(this)(c,e,t,r))this.middlewareStack.use(n);const u=e.concat(this.middlewareStack),{logger:p}=t,h={logger:p,clientName:n,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[eS]:{commandInstance:this,...l},...d},{requestHandler:f}=t;return u.resolve((e=>f.handle(e.request,r||{})),h)}}class Ak{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Ik{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(r,i,n){return this.resolveMiddlewareWithContext(r,i,n,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Fk="***SensitiveInformation***",Mk=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Dk=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Qk.warn(Yk(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Rk=Math.ceil(2**127*(2-2**-23)),Pk=e=>{const t=Dk(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Rk)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Ok=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},zk=e=>Uk(e,32),Nk=e=>Uk(e,16),qk=e=>Uk(e,8),Uk=(e,t)=>{const r=Ok(e);if(void 0!==r&&Lk(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Lk=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},jk=(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Hk=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},$k=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Qk.warn(Yk(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Gk=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Wk=e=>{const t=e.match(Gk);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},Kk=e=>Ok("string"==typeof e?Wk(e):e),Vk=e=>zk("string"==typeof e?Wk(e):e),Jk=e=>Nk("string"==typeof e?Wk(e):e),Yk=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Qk={warn:console.warn},Zk=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xk=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function eE(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),i=e.getUTCDay(),n=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),l=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,c=a<10?`0${a}`:`${a}`;return`${Zk[i]}, ${n<10?`0${n}`:`${n}`} ${Xk[r]} ${t} ${l}:${d}:${c} GMT`}const tE=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),rE=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=tE.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,i,n,o,s,a,l,d,c]=t,u=Jk(yE(i)),p=fE(n,"month",1,12),h=fE(o,"day",1,31),f=aE(u,p,h,{hours:s,minutes:a,seconds:l,fractionalMilliseconds:d});return"Z"!=c.toUpperCase()&&f.setTime(f.getTime()-gE(c)),f},iE=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),nE=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),oE=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),sE=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=iE.exec(e);if(t){const[e,r,i,n,o,s,a,l]=t;return aE(Jk(yE(n)),cE(i),fE(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l})}if(t=nE.exec(e),t){const[e,r,i,n,o,s,a,l]=t;return dE(aE(lE(n),cE(i),fE(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l}))}if(t=oE.exec(e),t){const[e,r,i,n,o,s,a,l]=t;return aE(Jk(yE(l)),cE(r),fE(i.trimLeft(),"day",1,31),{hours:n,minutes:o,seconds:s,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")},aE=(e,t,r,i)=>{const n=t-1;return pE(e,n,r),new Date(Date.UTC(e,n,r,fE(i.hours,"hour",0,23),fE(i.minutes,"minute",0,59),fE(i.seconds,"seconds",0,60),mE(i.fractionalMilliseconds)))},lE=e=>{const t=(new Date).getUTCFullYear(),r=100*Math.floor(t/100)+Jk(yE(e));return r<t?r+100:r},dE=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,cE=e=>{const t=Xk.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},uE=[31,28,31,30,31,30,31,31,30,31,30,31],pE=(e,t,r)=>{let i=uE[t];if(1===t&&hE(e)&&(i=29),r>i)throw new TypeError(`Invalid day for ${Xk[t]} in ${e}: ${r}`)},hE=e=>e%4==0&&(e%100!=0||e%400==0),fE=(e,t,r,i)=>{const n=(e=>qk("string"==typeof e?Wk(e):e))(yE(e));if(n<r||n>i)throw new TypeError(`${t} must be between ${r} and ${i}, inclusive`);return n},mE=e=>null==e?0:1e3*(e=>Pk("string"==typeof e?Wk(e):e))("0."+e),gE=e=>{const t=e[0];let r=1;if("+"==t)r=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);r=-1}return r*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},yE=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};class vE extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,vE.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const bE=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,r])=>{null!=e[t]&&""!==e[t]||(e[t]=r)}));const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},wE=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),_E=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};function xE(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const SE=e=>{const t=[];for(const r in Zx){const i=Zx[r];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},kE=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},EE=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},TE=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},BE=e=>({...SE(e),...EE(e)}),CE=e=>Array.isArray(e)?e:[e],IE=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&void 0!==e[r][t]?e[r]=e[r][t]:"object"==typeof e[r]&&null!==e[r]&&(e[r]=IE(e[r]));return e},AE=e=>null!=e,FE=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};FE.prototype=Object.create(String.prototype,{constructor:{value:FE,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(FE,String);class ME{trace(){}debug(){}info(){}warn(){}error(){}}function DE(e,t,r){let i,n,o;if(void 0===t&&void 0===r)i={},o=e;else{if(i=e,"function"==typeof t)return n=t,o=r,RE(i,n,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?PE(i,null,o,e):i[e]=o[e];return i}const RE=(e,t,r)=>DE(e,Object.entries(r).reduce(((e,[r,i])=>(Array.isArray(i)?e[r]=i:e[r]="function"==typeof i?[t,i()]:[t,i],e)),{})),PE=(e,t,r,i)=>{if(null!==t){let n=r[i];"function"==typeof n&&(n=[,n]);const[o=OE,s=zE,a=i]=n;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[i]=s(t[a])))}let[n,o]=r[i];if("function"==typeof o){let t;const r=void 0===n&&null!=(t=o()),s="function"==typeof n&&!!n(void 0)||"function"!=typeof n&&!!n;r?e[i]=t:s&&(e[i]=o())}else{const t=void 0===n&&null!=o,r="function"==typeof n&&!!n(o)||"function"!=typeof n&&!!n;(t||r)&&(e[i]=o)}},OE=e=>null!=e,zE=e=>e;function NE(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const qE=e=>e.toISOString().replace(".000Z","Z");const UE={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},LE=e=>({applyToStack:e=>{e.add(((e,t)=>async r=>{const{request:i}=r;if(iS.isInstance(i)&&!("content-length"in i.headers)){const e="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";"function"!=typeof t?.logger?.warn||t.logger instanceof ME?console.warn(e):t.logger.warn(e)}return e({...r})}),UE)}}),jE={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};const HE={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},$E=e=>({applyToStack:t=>{var r;t.add(function(e){return(t,r)=>async i=>{try{return await t(i)}catch(n){if(e.followRegionRedirects&&(301===n?.$metadata?.httpStatusCode||400===n?.$metadata?.httpStatusCode&&"IllegalLocationConstraintException"===n?.name)){try{const t=n.$response.headers["x-amz-bucket-region"];r.logger?.debug(`Redirecting from ${await e.region()} to ${t}`),r.__s3RegionRedirect=t}catch(e){throw new Error("Region redirect failed: "+e)}return t(i)}throw n}}}(e),HE),t.addRelativeTo((r=e,(e,t)=>async i=>{const n=await r.region(),o=r.region;let s=()=>{};t.__s3RegionRedirect&&(Object.defineProperty(r,"region",{writable:!1,value:async()=>t.__s3RegionRedirect}),s=()=>Object.defineProperty(r,"region",{writable:!0,value:o}));try{const o=await e(i);if(t.__s3RegionRedirect&&(s(),n!==await r.region()))throw new Error("Region was not restored following S3 region redirect.");return o}catch(e){throw s(),e}}),jE)}}),GE={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},WE=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async r=>{const i=await e(r),{response:n}=i;if(nS.isInstance(n)&&n.headers.expires){n.headers.expiresstring=n.headers.expires;try{sE(n.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${n.headers.expires}): ${e}`),delete n.headers.expires}}return i}),GE)}});class KE{constructor(e={}){this.data=e,this.lastPurgeTime=Date.now()}get(e){const t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){const e=Date.now();if(!(this.lastPurgeTime+KE.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>e))for(const t in this.data){const r=this.data[t];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()<e&&delete this.data[t]}}}}KE.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;class VE{constructor(e,t=!1,r=Date.now()){this._identity=e,this.isRefreshing=t,this.accessed=r}get identity(){return this.accessed=Date.now(),this._identity}}class JE{constructor(e,t=new KE){this.createSessionFn=e,this.cache=t}async getS3ExpressIdentity(e,t){const r=t.Bucket,{cache:i}=this,n=i.get(r);return n?n.identity.then((e=>{if((e.expiration?.getTime()??0)<Date.now())return i.set(r,new VE(this.getIdentity(r))).identity;return(e.expiration?.getTime()??0)<Date.now()+JE.REFRESH_WINDOW_MS&&!n.isRefreshing&&(n.isRefreshing=!0,this.getIdentity(r).then((e=>{i.set(r,new VE(Promise.resolve(e)))}))),e})):i.set(r,new VE(this.getIdentity(r))).identity}async getIdentity(e){await this.cache.purgeExpired().catch((e=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+e)}));const t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}}JE.REFRESH_WINDOW_MS=6e4;const YE="X-Amz-Date",QE="X-Amz-Signature",ZE="X-Amz-Security-Token",XE="authorization",eT=YE.toLowerCase(),tT=[XE,eT,"date"],rT=QE.toLowerCase(),iT="x-amz-content-sha256",nT=ZE.toLowerCase(),oT={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},sT=/^proxy-/,aT=/^sec-/,lT="AWS4-HMAC-SHA256",dT="AWS4-HMAC-SHA256-PAYLOAD",cT="aws4_request",uT={},pT=[],hT=(e,t,r)=>`${e}/${t}/${r}/${cT}`,fT=(e,t,r)=>{const i=new e(t);return i.update(PS(r)),i.digest()},mT=({headers:e},t,r)=>{const i={};for(const n of Object.keys(e).sort()){if(null==e[n])continue;const o=n.toLowerCase();(o in oT||t?.has(o)||sT.test(o)||aT.test(o))&&(!r||r&&!r.has(o))||(i[o]=e[n].trim().replace(/\s+/g," "))}return i},gT=async({headers:e,body:t},r)=>{for(const t of Object.keys(e))if(t.toLowerCase()===iT)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||bS(t)){const e=new r;return e.update(PS(t)),Sk(await e.digest())}return"UNSIGNED-PAYLOAD"};class yT{format(e){const t=[];for(const r of Object.keys(e)){const i=RS(r);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)r.set(e,i),i+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const n=new DataView(new ArrayBuffer(3+e.value.byteLength));n.setUint8(0,6),n.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(n.buffer);return o.set(e.value,3),o;case"string":const s=RS(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const l=new Uint8Array(a.buffer);return l.set(s,3),l;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(wT.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!bT.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(xk(e.value.replace(/\-/g,"")),1),c}}}var vT;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(vT||(vT={}));const bT=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class wT{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(e));r>-1&&i>0;r--,i/=256)t[r]=i;return e<0&&_T(t),new wT(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&_T(e),parseInt(Sk(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function _T(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const xT=e=>{e=iS.clone(e);for(const t of Object.keys(e.headers))tT.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ST=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class kT{constructor({applyChecksum:e,credentials:t,region:r,service:i,sha256:n,uriEscapePath:o=!0}){this.headerFormatter=new yT,this.service=i,this.sha256=n,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=WS(r),this.credentialProvider=WS(t)}async presign(e,t={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:n,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:l,signingService:d}=t,c=await this.credentialProvider();this.validateResolvedCredentials(c);const u=l??await this.regionProvider(),{longDate:p,shortDate:h}=ET(r);if(i>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=hT(h,u,d??this.service),m=((e,t={})=>{const{headers:r,query:i={}}=iS.clone(e);for(const e of Object.keys(r)){const n=e.toLowerCase();("x-amz-"===n.slice(0,6)&&!t.unhoistableHeaders?.has(n)||t.hoistableHeaders?.has(n))&&(i[e]=r[e],delete r[e])}return{...e,headers:r,query:i}})(xT(e),{unhoistableHeaders:o,hoistableHeaders:a});c.sessionToken&&(m.query[ZE]=c.sessionToken),m.query["X-Amz-Algorithm"]=lT,m.query["X-Amz-Credential"]=`${c.accessKeyId}/${f}`,m.query[YE]=p,m.query["X-Amz-Expires"]=i.toString(10);const g=mT(m,n,s);return m.query["X-Amz-SignedHeaders"]=TT(g),m.query[QE]=await this.getSignature(p,f,this.getSigningKey(c,u,h,d),this.createCanonicalRequest(m,g,await gT(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:i,signingRegion:n,signingService:o}){const s=n??await this.regionProvider(),{shortDate:a,longDate:l}=ET(r),d=hT(a,s,o??this.service),c=await gT({headers:{},body:t},this.sha256),u=new this.sha256;u.update(e);const p=Sk(await u.digest()),h=[dT,l,d,i,p,c].join("\n");return this.signString(h,{signingDate:r,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:i}={}){const n=await this.credentialProvider();this.validateResolvedCredentials(n);const o=r??await this.regionProvider(),{shortDate:s}=ET(t),a=new this.sha256(await this.getSigningKey(n,o,s,i));return a.update(PS(e)),Sk(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:n,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=n??await this.regionProvider(),l=xT(e),{longDate:d,shortDate:c}=ET(t),u=hT(c,a,o??this.service);l.headers[eT]=d,s.sessionToken&&(l.headers[nT]=s.sessionToken);const p=await gT(l,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1})(iT,l.headers)&&this.applyChecksum&&(l.headers[iT]=p);const h=mT(l,i,r),f=await this.getSignature(d,u,this.getSigningKey(s,a,c,o),this.createCanonicalRequest(l,h,p));return l.headers[XE]=`${lT} Credential=${s.accessKeyId}/${u}, SignedHeaders=${TT(h)}, Signature=${f}`,l}createCanonicalRequest(e,t,r){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],r={};for(const i of Object.keys(e)){if(i.toLowerCase()===rT)continue;const n=hk(i);t.push(n);const o=e[i];"string"==typeof o?r[n]=`${n}=${hk(o)}`:Array.isArray(o)&&(r[n]=o.slice(0).reduce(((e,t)=>e.concat([`${n}=${hk(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>r[e])).filter((e=>e)).join("&")})(e)}\n${i.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${i.join(";")}\n${r}`}async createStringToSign(e,t,r){const i=new this.sha256;i.update(PS(r));const n=await i.digest();return`${lT}\n${e}\n${t}\n${Sk(n)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const r of e.split("/"))0!==r?.length&&"."!==r&&(".."===r?t.pop():t.push(r));const r=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return hk(r).replace(/%2F/g,"/")}return e}async getSignature(e,t,r,i){const n=await this.createStringToSign(e,t,i),o=new this.sha256(await r);return o.update(PS(n)),Sk(await o.digest())}getSigningKey(e,t,r,i){return(async(e,t,r,i,n)=>{const o=`${r}:${i}:${n}:${Sk(await fT(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in uT)return uT[o];for(pT.push(o);pT.length>50;)delete uT[pT.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[r,i,n,cT])s=await fT(e,s,t);return uT[o]=s})(this.sha256,e,r,t,i||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const ET=e=>{const t=(r=e,ST(r).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var r;return{longDate:t,shortDate:t.slice(0,8)}},TT=e=>Object.keys(e).sort().join(";");var BT;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(BT||(BT={}));const CT="X-Amz-S3session-Token",IT=CT.toLowerCase();class AT extends kT{async signWithCredentials(e,t,r){const i=FT(t);e.headers[IT]=t.sessionToken;return MT(this,i),this.signRequest(e,r??{})}async presignWithCredentials(e,t,r){const i=FT(t);delete e.headers[IT],e.headers[CT]=t.sessionToken,e.query=e.query??{},e.query[CT]=t.sessionToken;return MT(this,i),this.presign(e,r)}}function FT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function MT(e,t){const r=setTimeout((()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")}),10),i=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(r),e.credentialProvider=i,Promise.resolve(t))}const DT={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},RT=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async i=>{if(r.endpointV2){const t=r.endpointV2,n="sigv4-s3express"===t.properties?.authSchemes?.[0]?.name;if(("S3Express"===t.properties?.backend||"Directory"===t.properties?.bucketType)&&(mS(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),n){const t=i.input.Bucket;if(t){const n=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:t});r.s3ExpressIdentity=n,iS.isInstance(i.request)&&n.sessionToken&&(i.request.headers[IT]=n.sessionToken)}}}return t(i)})(e),DT)}});const PT=(e,t)=>(r,i)=>async n=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,n.input)),s=function(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),a=GS(i),l=[];for(const r of o){const n=s.get(r.schemeId);if(!n){l.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}const o=n.identityProvider(await t.identityProviderConfigProvider(e));if(!o){l.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:d={},signingProperties:c={}}=r.propertiesExtractor?.(e,i)||{};r.identityProperties=Object.assign(r.identityProperties||{},d),r.signingProperties=Object.assign(r.signingProperties||{},c),a.selectedHttpAuthScheme={httpAuthOption:r,identity:await o(r.identityProperties),signer:n.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(l.join("\n"));return r(n)},OT=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,zT=/(\d+\.){3}\d+/,NT=/\.\./,qT=e=>OT.test(e)&&!zT.test(e)&&!NT.test(e),UT=e=>{const[t,r,i,,,n]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&r&&i&&n);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},LT=(e,t,r)=>{const i=async()=>{const i=r[e]??r[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:i,path:n}=e;return`${t}//${r}${i?":"+i:""}${n}`}}return e}:i},jT=async e=>{};const HT=e=>{if("string"==typeof e)return HT(new URL(e));const{hostname:t,pathname:r,port:i,protocol:n,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const r of e.split("&")){let[e,i=null]=r.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:n,path:r,query:s}},$T=e=>"object"==typeof e?"url"in e?HT(e.url):e:HT(e),GT=async(e,t,r,i)=>{if(!r.endpoint){let e;e=r.serviceConfiguredEndpoint?await r.serviceConfiguredEndpoint():await jT(r.serviceId),e&&(r.endpoint=()=>Promise.resolve($T(e)))}const n=await WT(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,i)},WT=async(e,t,r)=>{const i={},n=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(n))switch(o.type){case"staticContextParams":i[t]=o.value;break;case"contextParams":i[t]=e[o.name];break;case"clientContextParams":case"builtInParams":i[t]=await LT(o.name,t,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(n).length&&Object.assign(i,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),UT(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qT(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(i),i},KT={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},VT={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function JT(e,t,r){return{applyToStack:i=>{i.add(((e,t)=>r=>async i=>{const{response:n}=await r(i);try{return{response:n,output:await t(n,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:n}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,r),KT),i.add(((e,t)=>(r,i)=>async n=>{const o=i.endpointV2?.url&&e.urlParser?async()=>e.urlParser(i.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(n.input,{...e,endpoint:o});return r({...n,request:s})})(e,t),VT)}}}const YT={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:VT.name},QT=(e,t)=>({applyToStack:r=>{r.addRelativeTo((({config:e,instructions:t})=>(r,i)=>async n=>{const o=await GT(n.input,{getEndpointParameterInstructions:()=>t},{...e},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const s=i.authSchemes?.[0];if(s){i.signing_region=s.signingRegion,i.signing_service=s.signingName;const e=GS(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...n})})({config:e,instructions:t}),YT)}}),ZT={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:YT.name},XT=e=>e=>{throw e},eB=(e,t)=>{};var tB;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(tB||(tB={}));const rB=tB.STANDARD,iB=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],nB=["TimeoutError","RequestTimeout","RequestTimeoutException"],oB=[500,502,503,504],sB=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],aB=e=>429===e.$metadata?.httpStatusCode||iB.includes(e.name)||1==e.$retryable?.throttling,lB=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||nB.includes(e.name)||sB.includes(e?.code||"")||oB.includes(e.$metadata?.httpStatusCode||0);class dB{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),aB(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const cB=100,uB=2e4,pB="amz-sdk-invocation-id",hB="amz-sdk-request",fB=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(uB,e),getRetryCost:()=>r});class mB{constructor(e){this.maxAttempts=e,this.mode=tB.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=cB;return{computeNextBackoffDelay:t=>Math.floor(Math.min(uB,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return fB({retryDelay:cB,retryCount:0})}async refreshRetryTokenForRetry(e,t){const r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){const r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?500:cB);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),n=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(r);return this.capacity-=o,fB({retryDelay:n,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class gB{constructor(e,t){this.maxAttemptsProvider=e,this.mode=tB.ADAPTIVE;const{rateLimiter:r}=t??{};this.rateLimiter=r??new dB,this.standardRetryStrategy=new mB(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const yB={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let vB;const bB=new Uint8Array(16);function wB(){if(!vB&&(vB="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vB))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vB(bB)}const _B=[];for(let e=0;e<256;++e)_B.push((e+256).toString(16).slice(1));function xB(e,t=0){return _B[e[t+0]]+_B[e[t+1]]+_B[e[t+2]]+_B[e[t+3]]+"-"+_B[e[t+4]]+_B[e[t+5]]+"-"+_B[e[t+6]]+_B[e[t+7]]+"-"+_B[e[t+8]]+_B[e[t+9]]+"-"+_B[e[t+10]]+_B[e[t+11]]+_B[e[t+12]]+_B[e[t+13]]+_B[e[t+14]]+_B[e[t+15]]}const SB=function(e,t,r){if(yB.randomUUID&&!t&&!e)return yB.randomUUID();const i=(e=e||{}).random||(e.rng||wB)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return xB(i)},kB=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const EB=e=>e?.body instanceof ReadableStream,TB=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,BB=e=>{const t={error:e,errorType:CB(e)},r=FB(e.$response);return r&&(t.retryAfterHint=r),t},CB=e=>aB(e)?"THROTTLING":lB(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!lB(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",IB={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},AB=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async i=>{let n=await e.retryStrategy();const o=await e.maxAttempts();if(!TB(n))return n?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(t,i);{let e=await n.acquireInitialRetryToken(r.partition_id),s=new Error,a=0,l=0;const{request:d}=i,c=iS.isInstance(d);for(c&&(d.headers[pB]=SB());;)try{c&&(d.headers[hB]=`attempt=${a+1}; max=${o}`);const{response:r,output:s}=await t(i);return n.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=l,{response:r,output:s}}catch(t){const i=BB(t);if(s=kB(t),c&&EB(d))throw(r.logger instanceof ME?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await n.refreshRetryTokenForRetry(e,i)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=l,s}a=e.getRetryCount();const o=e.getRetryDelay();l+=o,await new Promise((e=>setTimeout(e,o)))}}})(e),IB)}}),FB=e=>{if(!nS.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const r=e.headers[t],i=Number(r);if(!Number.isNaN(i))return new Date(1e3*i);return new Date(r)},MB={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:IB.name},DB=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async r=>{if(!iS.isInstance(r.request))return e(r);const i=GS(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:n={}},identity:o,signer:s}=i,a=await e({...r,request:await s.sign(r.request,o,n)}).catch((s.errorHandler||XT)(n));return(s.successHandler||eB)(a.response,n),a}),MB)}});class RB{constructor(e){this.authSchemes=new Map;for(const[t,r]of Object.entries(e))void 0!==r&&this.authSchemes.set(t,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}const PB=(OB=3e5,e=>zB(e)&&e.expiration.getTime()-Date.now()<OB);var OB;const zB=e=>void 0!==e.expiration,NB=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function qB(e,t){return new UB(e,t)}class UB{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:r,path:i}=await this.context.endpoint();this.path=i;for(const e of this.resolvePathStack)e(this.path);return new iS({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,r,i){return this.resolvePathStack.push((n=>{this.path=((e,t,r,i,n,o)=>{if(null==t||void 0===t[r])throw new Error("No value provided for input HTTP label: "+r+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(n,o?t.split("/").map((e=>xE(e))).join("/"):xE(t))}return e})(n,this.input,e,t,r,i)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const LB=e=>e=>{throw e},jB=(e,t)=>{},HB=e=>(t,r)=>async i=>{if(!iS.isInstance(i.request))return t(i);const n=GS(r).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:s,signer:a}=n;let l;l=r.s3ExpressIdentity?await(async(e,t,r,i)=>{const n=await i.signWithCredentials(r,e,{});if(n.headers["X-Amz-Security-Token"]||n.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return n})(r.s3ExpressIdentity,0,i.request,await e.signer()):await a.sign(i.request,s,o);const d=await t({...i,request:l}).catch((a.errorHandler||LB)(o));return(a.successHandler||jB)(d.response,o),d},$B={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},GB=e=>(t,r)=>async i=>{const n=await t(i),{response:o}=n;if(!nS.isInstance(o))return n;const{statusCode:s,body:a}=o;if(s<200||s>=300)return n;if(!("function"==typeof a?.stream||"function"==typeof a?.pipe||"function"==typeof a?.tee))return n;let l=a,d=a;!a||"object"!=typeof a||a instanceof Uint8Array||([l,d]=await async function(e){return"function"==typeof e.stream&&(e=e.stream()),e.tee()}(a)),o.body=d;const c=await WB(l,{streamCollector:async e=>async function(e,t){let r=0;const i=[],n=e.getReader();let o=!1;for(;!o;){const{done:e,value:s}=await n.read();if(s&&(i.push(s),r+=s?.byteLength??0),r>=t)break;o=e}n.releaseLock();const s=new Uint8Array(Math.min(t,r));let a=0;for(const e of i){if(e.byteLength>s.byteLength-a){s.set(e.subarray(0,s.byteLength-a),a);break}s.set(e,a),a+=e.length}return s}(e,3e3)});"function"==typeof l?.destroy&&l.destroy();const u=e.utf8Encoder(c.subarray(c.length-16));if(0===c.length&&$B[r.commandName]){const e=new Error("S3 aborted request");throw e.name="InternalError",e}return u&&u.endsWith("</Error>")&&(o.statusCode=400),n},WB=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),KB={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},VB=e=>({applyToStack:t=>{t.addRelativeTo(GB(e),KB)}});const JB={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};const YB={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},QB=e=>({applyToStack:t=>{t.add(function({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:i}}=r;if(!e&&"string"==typeof i&&!("string"==typeof(n=i)&&0===n.indexOf("arn:")&&n.split(":").length>=6)&&i.indexOf("/")>=0){const e=new Error(`Bucket name shouldn't contain '/', received '${i}'`);throw e.name="InvalidBucketName",e}var n;return t({...r})}}(e),YB),t.addRelativeTo(function(e){return(t,r)=>async i=>{if(e.bucketEndpoint){const e=r.endpointV2;if(e){const t=i.input.Bucket;if("string"==typeof t)try{const i=new URL(t);r.endpointV2={...e,url:i}}catch(e){const i=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw"NoOpLogger"===r.logger?.constructor?.name?console.warn(i):r.logger?.warn?.(i),e}}}return t(i)}}(e),JB)}});const ZB=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),XB=e=>ZB.test(e)||e.startsWith("[")&&e.endsWith("]"),eC=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),tC=(e,t=!1)=>{if(!t)return eC.test(e);const r=e.split(".");for(const e of r)if(!tC(e))return!1;return!0},rC={},iC="endpoints";function nC(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${nC(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(nC).join(", ")})`:JSON.stringify(e,null,2)}class oC extends Error{constructor(e){super(e),this.name="EndpointError"}}const sC=(e,t)=>(e=>{const t=e.split("."),r=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new oC(`Path: '${e}' does not end with ']'`);const n=i.slice(t+1,-1);if(Number.isNaN(parseInt(n)))throw new oC(`Invalid array index: '${n}' in path: '${e}'`);0!==t&&r.push(i.slice(0,t)),r.push(n)}else r.push(i)}return r})(t).reduce(((r,i)=>{if("object"!=typeof r)throw new oC(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(i)]:r[i]}),e),aC={[Qx.HTTP]:80,[Qx.HTTPS]:443},lC={booleanEquals:(e,t)=>e===t,getAttr:sC,isSet:e=>null!=e,isValidHostLabel:tC,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:r,protocol:i="",path:n="",query:o={}}=e,s=new URL(`${i}//${t}${r?`:${r}`:""}${n}`);return s.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:i,hostname:n,pathname:o,protocol:s,search:a}=t;if(a)return null;const l=s.slice(0,-1);if(!Object.values(Qx).includes(l))return null;const d=XB(n);return{scheme:l,authority:`${i}${r.includes(`${i}:${aC[l]}`)||"string"==typeof e&&e.includes(`${i}:${aC[l]}`)?`:${aC[l]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},stringEquals:(e,t)=>e===t,substring:(e,t,r,i)=>t>=r||e.length<r?null:i?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},dC=(e,t)=>{const r=[],i={...t.endpointParams,...t.referenceRecord};let n=0;for(;n<e.length;){const t=e.indexOf("{",n);if(-1===t){r.push(e.slice(n));break}r.push(e.slice(n,t));const o=e.indexOf("}",t);if(-1===o){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(r.push(e.slice(t+1,o)),n=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");r.push(sC(i[e],t))}else r.push(i[s]);n=o+1}return r.join("")},cC=(e,t,r)=>{if("string"==typeof e)return dC(e,r);if(e.fn)return uC(e,r);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,r);throw new oC(`'${t}': ${String(e)} is not a string, function or reference.`)},uC=({fn:e,argv:t},r)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:cC(e,"arg",r))),n=e.split(".");return n[0]in rC&&null!=n[1]?rC[n[0]][n[1]](...i):lC[e](...i)},pC=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new oC(`'${e}' is already defined in Reference Record.`);const i=uC(t,r);return r.logger?.debug?.(`${iC} evaluateCondition: ${nC(t)} = ${nC(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},hC=(e=[],t)=>{const r={};for(const i of e){const{result:e,toAssign:n}=pC(i,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!e)return{result:e};n&&(r[n.name]=n.value,t.logger?.debug?.(`${iC} assign: ${n.name} := ${nC(n.value)}`))}return{result:!0,referenceRecord:r}},fC=(e,t)=>Object.entries(e).reduce(((e,[r,i])=>({...e,[r]:i.map((e=>{const i=cC(e,"Header value entry",t);if("string"!=typeof i)throw new oC(`Header '${r}' value '${i}' is not a string`);return i}))})),{}),mC=(e,t)=>{if(Array.isArray(e))return e.map((e=>mC(e,t)));switch(typeof e){case"string":return dC(e,t);case"object":if(null===e)throw new oC(`Unexpected endpoint property: ${e}`);return gC(e,t);case"boolean":return e;default:throw new oC("Unexpected endpoint property type: "+typeof e)}},gC=(e,t)=>Object.entries(e).reduce(((e,[r,i])=>({...e,[r]:mC(i,t)})),{}),yC=(e,t)=>{const r=cC(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(e){throw console.error(`Failed to construct URL with ${r}`,e),e}throw new oC("Endpoint URL must be a string, got "+typeof r)},vC=(e,t)=>{const{conditions:r,endpoint:i}=e,{result:n,referenceRecord:o}=hC(r,t);if(!n)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:l,headers:d}=i;return t.logger?.debug?.(`${iC} Resolving endpoint from template: ${nC(i)}`),{...null!=d&&{headers:fC(d,s)},...null!=l&&{properties:gC(l,s)},url:yC(a,s)}},bC=(e,t)=>{const{conditions:r,error:i}=e,{result:n,referenceRecord:o}=hC(r,t);if(n)throw new oC(cC(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},wC=(e,t)=>{const{conditions:r,rules:i}=e,{result:n,referenceRecord:o}=hC(r,t);if(n)return _C(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},_C=(e,t)=>{for(const r of e)if("endpoint"===r.type){const e=vC(r,t);if(e)return e}else if("error"===r.type)bC(r,t);else{if("tree"!==r.type)throw new oC(`Unknown endpoint rule: ${r}`);{const e=wC(r,t);if(e)return e}}throw new oC("Rules evaluation failed")},xC=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!xC(t))return!1;return!0}return!!tC(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!XB(e)))};let SC=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}'),kC="";const EC={isVirtualHostableS3Bucket:xC,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[r,i,n,o,s,...a]=t;if("arn"!==r||""===i||""===n||""===a.join(":"))return null;return{partition:i,service:n,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=SC;for(const r of t){const{regions:t,outputs:i}=r;for(const[r,n]of Object.entries(t))if(r===e)return{...i,...n}}for(const r of t){const{regionRegex:t,outputs:i}=r;if(new RegExp(t).test(e))return{...i}}const r=t.find((e=>"aws"===e.id));if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}}};rC.aws=EC;const TC=/\d{12}\.ddb/;const BC="user-agent",CC="x-amz-user-agent",IC=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,AC=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const FC=e=>(t,r)=>async i=>{const{request:n}=i;if(!iS.isInstance(n))return t(i);const{headers:o}=n,s=r?.userAgent?.map(MC)||[],a=(await e.defaultUserAgentProvider()).map(MC);await async function(e,t,r){const i=r.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&mS(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const r=await t.retryStrategy();"function"==typeof r.acquireInitialRetryToken?r.constructor?.name?.includes("Adaptive")?mS(e,"RETRY_MODE_ADAPTIVE","F"):mS(e,"RETRY_MODE_STANDARD","E"):mS(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const r=e.endpointV2;switch(String(r?.url?.hostname).match(TC)&&mS(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":mS(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":mS(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":mS(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const t=n;t.accountId&&mS(e,"RESOLVED_ACCOUNT_ID","T");for(const[r,i]of Object.entries(t.$source??{}))mS(e,r,i)}}(r,e,i);const l=r;a.push(`m/${function(e){let t="";for(const r in e){const i=e[r];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const d=e?.customUserAgent?.map(MC)||[],c=await e.userAgentAppId();c&&a.push(MC([`app/${c}`]));const u=(kC?[kC]:[]).concat([...a,...s,...d]).join(" "),p=[...a.filter((e=>e.startsWith("aws-sdk-"))),...d].join(" ");return"browser"!==e.runtime?(p&&(o[CC]=o[CC]?`${o[BC]} ${p}`:p),o[BC]=u):o[CC]=u,t({...i,request:n})},MC=e=>{const t=e[0].split("/").map((e=>e.replace(IC,"-"))).join("/"),r=e[1]?.replace(AC,"-"),i=t.indexOf("/"),n=t.substring(0,i);let o=t.substring(i+1);return"api"===n&&(o=o.toLowerCase()),[n,o,r].filter((e=>e&&e.length>0)).reduce(((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},DC={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},RC=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),PC=e=>RC(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,OC="content-length";const zC={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},NC=e=>({applyToStack:t=>{var r;t.add((r=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(iS.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(OC))try{const t=r(e);i.headers={...i.headers,[OC]:String(t)}}catch(e){}}return e({...t,request:i})}),zC)}});const qC=e=>{let t,r=!1;e.credentials&&(r=!0,t=((e,t,r)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let n,o,s,a=!1;const l=async e=>{o||(o=i(e));try{n=await o,s=!0,a=!1}finally{o=void 0}return n};return void 0===t?async e=>(s&&!e?.forceRefresh||(n=await l(e)),n):async e=>(s&&!e?.forceRefresh||(n=await l(e)),a?n:r(n)?t(n)?(await l(e),n):n:(a=!0,n))})(e.credentials,PB,zB)),t||(t=e.credentialDefaultProvider?NB(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:n=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?NB(e.signer):e.regionInfoProvider?()=>NB(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([r,n])=>{const{signingRegion:s,signingService:a}=r;e.signingRegion=e.signingRegion||s||n,e.signingName=e.signingName||a||e.serviceId;const l={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||kT)(l)})):async r=>{const n=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await NB(e.region)(),properties:{}},r)).signingRegion,s=r.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||kT)(a)},{...e,systemClockOffset:n,signingEscapePath:i,credentials:r?async()=>t().then((e=>{return r="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[r]=i,t;var t,r,i})):t,signer:s}};Error;const UC=null;class LC{constructor(e){this.sigv4Signer=new AT(e),this.signerOptions=e}async sign(e,t={}){if("*"===t.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(e,t)}return this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,r={}){if("*"===r.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(e,t,r)}return this.sigv4Signer.signWithCredentials(e,t,r)}async presign(e,t={}){if("*"===t.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(e,t)}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,r={}){if("*"===r.signingRegion)throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,r)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=null;try{if(e=UC,"function"!=typeof e)throw new Error}catch(e){throw e.message=`${e.message}\nPlease check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \nYou must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \nFor more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,e}this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const jC="required",HC="type",$C="conditions",GC="fn",WC="argv",KC="ref",VC="assign",JC="url",YC="properties",QC="backend",ZC="authSchemes",XC="disableDoubleEncoding",eI="signingName",tI="signingRegion",rI="headers",iI="signingRegionSet",nI=!0,oI="isSet",sI="booleanEquals",aI="error",lI="aws.partition",dI="stringEquals",cI="getAttr",uI="name",pI="substring",hI="bucketSuffix",fI="parseURL",mI="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",gI="endpoint",yI="tree",vI="aws.isVirtualHostableS3Bucket",bI="{url#scheme}://{Bucket}.{url#authority}{url#path}",wI="not",_I="{url#scheme}://{url#authority}{url#path}",xI="hardwareType",SI="regionPrefix",kI="bucketAliasSuffix",EI="outpostId",TI="isValidHostLabel",BI="sigv4a",CI="s3-outposts",II="s3",AI="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",FI="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",MI="https://{Bucket}.s3.{partitionResult#dnsSuffix}",DI="aws.parseArn",RI="bucketArn",PI="arnType",OI="s3-object-lambda",zI="accesspoint",NI="accessPointName",qI="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",UI="mrapPartition",LI="outpostType",jI="arnPrefix",HI="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",$I="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",GI="https://s3.{partitionResult#dnsSuffix}",WI={[jC]:!1,[HC]:"String"},KI={[jC]:!0,default:!1,[HC]:"Boolean"},VI={[jC]:!1,[HC]:"Boolean"},JI={[GC]:sI,[WC]:[{[KC]:"Accelerate"},!0]},YI={[GC]:sI,[WC]:[{[KC]:"UseFIPS"},!0]},QI={[GC]:sI,[WC]:[{[KC]:"UseDualStack"},!0]},ZI={[GC]:oI,[WC]:[{[KC]:"Endpoint"}]},XI={[GC]:lI,[WC]:[{[KC]:"Region"}],[VC]:"partitionResult"},eA={[GC]:dI,[WC]:[{[GC]:cI,[WC]:[{[KC]:"partitionResult"},uI]},"aws-cn"]},tA={[GC]:oI,[WC]:[{[KC]:"Bucket"}]},rA={[KC]:"Bucket"},iA={[GC]:fI,[WC]:[{[KC]:"Endpoint"}],[VC]:"url"},nA={[GC]:sI,[WC]:[{[GC]:cI,[WC]:[{[KC]:"url"},"isIp"]},!0]},oA={[KC]:"url"},sA={[GC]:"uriEncode",[WC]:[rA],[VC]:"uri_encoded_bucket"},aA={[QC]:"S3Express",[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:"s3express",[tI]:"{Region}"}]},lA={},dA={[GC]:vI,[WC]:[rA,!1]},cA={[aI]:"S3Express bucket name is not a valid virtual hostable name.",[HC]:aI},uA={[QC]:"S3Express",[ZC]:[{[XC]:!0,[uI]:"sigv4-s3express",[eI]:"s3express",[tI]:"{Region}"}]},pA={[GC]:oI,[WC]:[{[KC]:"UseS3ExpressControlEndpoint"}]},hA={[GC]:sI,[WC]:[{[KC]:"UseS3ExpressControlEndpoint"},!0]},fA={[GC]:wI,[WC]:[ZI]},mA={[aI]:"Unrecognized S3Express bucket name format.",[HC]:aI},gA={[GC]:wI,[WC]:[tA]},yA={[KC]:xI},vA={[$C]:[fA],[aI]:"Expected a endpoint to be specified but no endpoint was found",[HC]:aI},bA={[ZC]:[{[XC]:!0,[uI]:BI,[eI]:CI,[iI]:["*"]},{[XC]:!0,[uI]:"sigv4",[eI]:CI,[tI]:"{Region}"}]},wA={[GC]:sI,[WC]:[{[KC]:"ForcePathStyle"},!1]},_A={[KC]:"ForcePathStyle"},xA={[GC]:sI,[WC]:[{[KC]:"Accelerate"},!1]},SA={[GC]:dI,[WC]:[{[KC]:"Region"},"aws-global"]},kA={[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:II,[tI]:"us-east-1"}]},EA={[GC]:wI,[WC]:[SA]},TA={[GC]:sI,[WC]:[{[KC]:"UseGlobalEndpoint"},!0]},BA={[JC]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[YC]:{[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:II,[tI]:"{Region}"}]},[rI]:{}},CA={[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:II,[tI]:"{Region}"}]},IA={[GC]:sI,[WC]:[{[KC]:"UseGlobalEndpoint"},!1]},AA={[GC]:sI,[WC]:[{[KC]:"UseDualStack"},!1]},FA={[JC]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},MA={[GC]:sI,[WC]:[{[KC]:"UseFIPS"},!1]},DA={[JC]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},RA={[JC]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},PA={[GC]:sI,[WC]:[{[GC]:cI,[WC]:[oA,"isIp"]},!1]},OA={[JC]:AI,[YC]:CA,[rI]:{}},zA={[JC]:bI,[YC]:CA,[rI]:{}},NA={[gI]:zA,[HC]:gI},qA={[JC]:FI,[YC]:CA,[rI]:{}},UA={[JC]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},LA={[aI]:"Invalid region: region was not a valid DNS name.",[HC]:aI},jA={[KC]:RI},HA={[KC]:PI},$A={[GC]:cI,[WC]:[jA,"service"]},GA={[KC]:NI},WA={[$C]:[QI],[aI]:"S3 Object Lambda does not support Dual-stack",[HC]:aI},KA={[$C]:[JI],[aI]:"S3 Object Lambda does not support S3 Accelerate",[HC]:aI},VA={[$C]:[{[GC]:oI,[WC]:[{[KC]:"DisableAccessPoints"}]},{[GC]:sI,[WC]:[{[KC]:"DisableAccessPoints"},!0]}],[aI]:"Access points are not supported for this operation",[HC]:aI},JA={[$C]:[{[GC]:oI,[WC]:[{[KC]:"UseArnRegion"}]},{[GC]:sI,[WC]:[{[KC]:"UseArnRegion"},!1]},{[GC]:wI,[WC]:[{[GC]:dI,[WC]:[{[GC]:cI,[WC]:[jA,"region"]},"{Region}"]}]}],[aI]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[HC]:aI},YA={[GC]:cI,[WC]:[{[KC]:"bucketPartition"},uI]},QA={[GC]:cI,[WC]:[jA,"accountId"]},ZA={[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:OI,[tI]:"{bucketArn#region}"}]},XA={[aI]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[HC]:aI},eF={[aI]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[HC]:aI},tF={[aI]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[HC]:aI},rF={[aI]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[HC]:aI},iF={[aI]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[HC]:aI},nF={[aI]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[HC]:aI},oF={[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:II,[tI]:"{bucketArn#region}"}]},sF={[ZC]:[{[XC]:!0,[uI]:BI,[eI]:CI,[iI]:["*"]},{[XC]:!0,[uI]:"sigv4",[eI]:CI,[tI]:"{bucketArn#region}"}]},aF={[GC]:DI,[WC]:[rA]},lF={[JC]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:CA,[rI]:{}},dF={[JC]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:CA,[rI]:{}},cF={[JC]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:CA,[rI]:{}},uF={[JC]:HI,[YC]:CA,[rI]:{}},pF={[JC]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:CA,[rI]:{}},hF={[KC]:"UseObjectLambdaEndpoint"},fF={[ZC]:[{[XC]:!0,[uI]:"sigv4",[eI]:OI,[tI]:"{Region}"}]},mF={[JC]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},gF={[JC]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},yF={[JC]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},vF={[JC]:_I,[YC]:CA,[rI]:{}},bF={[JC]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[YC]:CA,[rI]:{}},wF=[{[KC]:"Region"}],_F=[{[KC]:"Endpoint"}],xF=[rA],SF=[QI],kF=[JI],EF=[ZI,iA],TF=[{[GC]:oI,[WC]:[{[KC]:"DisableS3ExpressSessionAuth"}]},{[GC]:sI,[WC]:[{[KC]:"DisableS3ExpressSessionAuth"},!0]}],BF=[nA],CF=[sA],IF=[dA],AF=[YI],FF=[{[GC]:pI,[WC]:[rA,6,14,!0],[VC]:"s3expressAvailabilityZoneId"},{[GC]:pI,[WC]:[rA,14,16,!0],[VC]:"s3expressAvailabilityZoneDelim"},{[GC]:dI,[WC]:[{[KC]:"s3expressAvailabilityZoneDelim"},"--"]}],MF=[{[$C]:[YI],[gI]:{[JC]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[YC]:aA,[rI]:{}},[HC]:gI},{[gI]:{[JC]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[YC]:aA,[rI]:{}},[HC]:gI}],DF=[{[GC]:pI,[WC]:[rA,6,15,!0],[VC]:"s3expressAvailabilityZoneId"},{[GC]:pI,[WC]:[rA,15,17,!0],[VC]:"s3expressAvailabilityZoneDelim"},{[GC]:dI,[WC]:[{[KC]:"s3expressAvailabilityZoneDelim"},"--"]}],RF=[{[$C]:[YI],[gI]:{[JC]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[YC]:uA,[rI]:{}},[HC]:gI},{[gI]:{[JC]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[YC]:uA,[rI]:{}},[HC]:gI}],PF=[tA],OF=[{[GC]:TI,[WC]:[{[KC]:EI},!1]}],zF=[{[GC]:dI,[WC]:[{[KC]:SI},"beta"]}],NF=[XI],qF=[{[GC]:TI,[WC]:[{[KC]:"Region"},!1]}],UF=[{[GC]:dI,[WC]:[{[KC]:"Region"},"us-east-1"]}],LF=[{[GC]:dI,[WC]:[HA,zI]}],jF=[{[GC]:cI,[WC]:[jA,"resourceId[1]"],[VC]:NI},{[GC]:wI,[WC]:[{[GC]:dI,[WC]:[GA,""]}]}],HF=[jA,"resourceId[1]"],$F=[{[GC]:wI,[WC]:[{[GC]:dI,[WC]:[{[GC]:cI,[WC]:[jA,"region"]},""]}]}],GF=[{[GC]:wI,[WC]:[{[GC]:oI,[WC]:[{[GC]:cI,[WC]:[jA,"resourceId[2]"]}]}]}],WF=[jA,"resourceId[2]"],KF=[{[GC]:lI,[WC]:[{[GC]:cI,[WC]:[jA,"region"]}],[VC]:"bucketPartition"}],VF=[{[GC]:dI,[WC]:[YA,{[GC]:cI,[WC]:[{[KC]:"partitionResult"},uI]}]}],JF=[{[GC]:TI,[WC]:[{[GC]:cI,[WC]:[jA,"region"]},!0]}],YF=[{[GC]:TI,[WC]:[QA,!1]}],QF=[{[GC]:TI,[WC]:[GA,!1]}],ZF=[{[GC]:TI,[WC]:[{[KC]:"Region"},!0]}],XF={version:"1.0",parameters:{Bucket:WI,Region:WI,UseFIPS:KI,UseDualStack:KI,Endpoint:WI,ForcePathStyle:KI,Accelerate:KI,UseGlobalEndpoint:KI,UseObjectLambdaEndpoint:VI,Key:WI,Prefix:WI,CopySource:WI,DisableAccessPoints:VI,DisableMultiRegionAccessPoints:KI,UseArnRegion:VI,UseS3ExpressControlEndpoint:VI,DisableS3ExpressSessionAuth:VI},rules:[{[$C]:[{[GC]:oI,[WC]:wF}],rules:[{[$C]:[JI,YI],error:"Accelerate cannot be used with FIPS",[HC]:aI},{[$C]:[QI,ZI],error:"Cannot set dual-stack in combination with a custom endpoint.",[HC]:aI},{[$C]:[ZI,YI],error:"A custom endpoint cannot be combined with FIPS",[HC]:aI},{[$C]:[ZI,JI],error:"A custom endpoint cannot be combined with S3 Accelerate",[HC]:aI},{[$C]:[YI,XI,eA],error:"Partition does not support FIPS",[HC]:aI},{[$C]:[tA,{[GC]:pI,[WC]:[rA,0,6,nI],[VC]:hI},{[GC]:dI,[WC]:[{[KC]:hI},"--x-s3"]}],rules:[{[$C]:SF,error:"S3Express does not support Dual-stack.",[HC]:aI},{[$C]:kF,error:"S3Express does not support S3 Accelerate.",[HC]:aI},{[$C]:EF,rules:[{[$C]:TF,rules:[{[$C]:BF,rules:[{[$C]:CF,rules:[{endpoint:{[JC]:mI,[YC]:aA,[rI]:lA},[HC]:gI}],[HC]:yI}],[HC]:yI},{[$C]:IF,rules:[{endpoint:{[JC]:bI,[YC]:aA,[rI]:lA},[HC]:gI}],[HC]:yI},cA],[HC]:yI},{[$C]:BF,rules:[{[$C]:CF,rules:[{endpoint:{[JC]:mI,[YC]:uA,[rI]:lA},[HC]:gI}],[HC]:yI}],[HC]:yI},{[$C]:IF,rules:[{endpoint:{[JC]:bI,[YC]:uA,[rI]:lA},[HC]:gI}],[HC]:yI},cA],[HC]:yI},{[$C]:[pA,hA],rules:[{[$C]:[sA,fA],rules:[{[$C]:AF,endpoint:{[JC]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[YC]:aA,[rI]:lA},[HC]:gI},{endpoint:{[JC]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[YC]:aA,[rI]:lA},[HC]:gI}],[HC]:yI}],[HC]:yI},{[$C]:IF,rules:[{[$C]:TF,rules:[{[$C]:FF,rules:MF,[HC]:yI},{[$C]:DF,rules:MF,[HC]:yI},mA],[HC]:yI},{[$C]:FF,rules:RF,[HC]:yI},{[$C]:DF,rules:RF,[HC]:yI},mA],[HC]:yI},cA],[HC]:yI},{[$C]:[gA,pA,hA],rules:[{[$C]:EF,endpoint:{[JC]:_I,[YC]:aA,[rI]:lA},[HC]:gI},{[$C]:AF,endpoint:{[JC]:"https://s3express-control-fips.{Region}.amazonaws.com",[YC]:aA,[rI]:lA},[HC]:gI},{endpoint:{[JC]:"https://s3express-control.{Region}.amazonaws.com",[YC]:aA,[rI]:lA},[HC]:gI}],[HC]:yI},{[$C]:[tA,{[GC]:pI,[WC]:[rA,49,50,nI],[VC]:xI},{[GC]:pI,[WC]:[rA,8,12,nI],[VC]:SI},{[GC]:pI,[WC]:[rA,0,7,nI],[VC]:kI},{[GC]:pI,[WC]:[rA,32,49,nI],[VC]:EI},{[GC]:lI,[WC]:wF,[VC]:"regionPartition"},{[GC]:dI,[WC]:[{[KC]:kI},"--op-s3"]}],rules:[{[$C]:OF,rules:[{[$C]:[{[GC]:dI,[WC]:[yA,"e"]}],rules:[{[$C]:zF,rules:[vA,{[$C]:EF,endpoint:{[JC]:"https://{Bucket}.ec2.{url#authority}",[YC]:bA,[rI]:lA},[HC]:gI}],[HC]:yI},{endpoint:{[JC]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[YC]:bA,[rI]:lA},[HC]:gI}],[HC]:yI},{[$C]:[{[GC]:dI,[WC]:[yA,"o"]}],rules:[{[$C]:zF,rules:[vA,{[$C]:EF,endpoint:{[JC]:"https://{Bucket}.op-{outpostId}.{url#authority}",[YC]:bA,[rI]:lA},[HC]:gI}],[HC]:yI},{endpoint:{[JC]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[YC]:bA,[rI]:lA},[HC]:gI}],[HC]:yI},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[HC]:aI}],[HC]:yI},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[HC]:aI}],[HC]:yI},{[$C]:PF,rules:[{[$C]:[ZI,{[GC]:wI,[WC]:[{[GC]:oI,[WC]:[{[GC]:fI,[WC]:_F}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[HC]:aI},{[$C]:[wA,dA],rules:[{[$C]:NF,rules:[{[$C]:qF,rules:[{[$C]:[JI,eA],error:"S3 Accelerate cannot be used in this region",[HC]:aI},{[$C]:[QI,YI,xA,fA,SA],endpoint:{[JC]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[QI,YI,xA,fA,EA,TA],rules:[{endpoint:BA,[HC]:gI}],[HC]:yI},{[$C]:[QI,YI,xA,fA,EA,IA],endpoint:BA,[HC]:gI},{[$C]:[AA,YI,xA,fA,SA],endpoint:{[JC]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,YI,xA,fA,EA,TA],rules:[{endpoint:FA,[HC]:gI}],[HC]:yI},{[$C]:[AA,YI,xA,fA,EA,IA],endpoint:FA,[HC]:gI},{[$C]:[QI,MA,JI,fA,SA],endpoint:{[JC]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[QI,MA,JI,fA,EA,TA],rules:[{endpoint:DA,[HC]:gI}],[HC]:yI},{[$C]:[QI,MA,JI,fA,EA,IA],endpoint:DA,[HC]:gI},{[$C]:[QI,MA,xA,fA,SA],endpoint:{[JC]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[QI,MA,xA,fA,EA,TA],rules:[{endpoint:RA,[HC]:gI}],[HC]:yI},{[$C]:[QI,MA,xA,fA,EA,IA],endpoint:RA,[HC]:gI},{[$C]:[AA,MA,xA,ZI,iA,nA,SA],endpoint:{[JC]:AI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,MA,xA,ZI,iA,PA,SA],endpoint:{[JC]:bI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,MA,xA,ZI,iA,nA,EA,TA],rules:[{[$C]:UF,endpoint:OA,[HC]:gI},{endpoint:OA,[HC]:gI}],[HC]:yI},{[$C]:[AA,MA,xA,ZI,iA,PA,EA,TA],rules:[{[$C]:UF,endpoint:zA,[HC]:gI},NA],[HC]:yI},{[$C]:[AA,MA,xA,ZI,iA,nA,EA,IA],endpoint:OA,[HC]:gI},{[$C]:[AA,MA,xA,ZI,iA,PA,EA,IA],endpoint:zA,[HC]:gI},{[$C]:[AA,MA,JI,fA,SA],endpoint:{[JC]:FI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,MA,JI,fA,EA,TA],rules:[{[$C]:UF,endpoint:qA,[HC]:gI},{endpoint:qA,[HC]:gI}],[HC]:yI},{[$C]:[AA,MA,JI,fA,EA,IA],endpoint:qA,[HC]:gI},{[$C]:[AA,MA,xA,fA,SA],endpoint:{[JC]:MI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,MA,xA,fA,EA,TA],rules:[{[$C]:UF,endpoint:{[JC]:MI,[YC]:CA,[rI]:lA},[HC]:gI},{endpoint:UA,[HC]:gI}],[HC]:yI},{[$C]:[AA,MA,xA,fA,EA,IA],endpoint:UA,[HC]:gI}],[HC]:yI},LA],[HC]:yI}],[HC]:yI},{[$C]:[ZI,iA,{[GC]:dI,[WC]:[{[GC]:cI,[WC]:[oA,"scheme"]},"http"]},{[GC]:vI,[WC]:[rA,nI]},wA,MA,AA,xA],rules:[{[$C]:NF,rules:[{[$C]:qF,rules:[NA],[HC]:yI},LA],[HC]:yI}],[HC]:yI},{[$C]:[wA,{[GC]:DI,[WC]:xF,[VC]:RI}],rules:[{[$C]:[{[GC]:cI,[WC]:[jA,"resourceId[0]"],[VC]:PI},{[GC]:wI,[WC]:[{[GC]:dI,[WC]:[HA,""]}]}],rules:[{[$C]:[{[GC]:dI,[WC]:[$A,OI]}],rules:[{[$C]:LF,rules:[{[$C]:jF,rules:[WA,KA,{[$C]:$F,rules:[VA,{[$C]:GF,rules:[JA,{[$C]:KF,rules:[{[$C]:NF,rules:[{[$C]:VF,rules:[{[$C]:JF,rules:[{[$C]:[{[GC]:dI,[WC]:[QA,""]}],error:"Invalid ARN: Missing account id",[HC]:aI},{[$C]:YF,rules:[{[$C]:QF,rules:[{[$C]:EF,endpoint:{[JC]:qI,[YC]:ZA,[rI]:lA},[HC]:gI},{[$C]:AF,endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:ZA,[rI]:lA},[HC]:gI},{endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:ZA,[rI]:lA},[HC]:gI}],[HC]:yI},XA],[HC]:yI},eF],[HC]:yI},tF],[HC]:yI},rF],[HC]:yI}],[HC]:yI}],[HC]:yI},iF],[HC]:yI},{error:"Invalid ARN: bucket ARN is missing a region",[HC]:aI}],[HC]:yI},nF],[HC]:yI},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[HC]:aI}],[HC]:yI},{[$C]:LF,rules:[{[$C]:jF,rules:[{[$C]:$F,rules:[{[$C]:LF,rules:[{[$C]:$F,rules:[VA,{[$C]:GF,rules:[JA,{[$C]:KF,rules:[{[$C]:NF,rules:[{[$C]:[{[GC]:dI,[WC]:[YA,"{partitionResult#name}"]}],rules:[{[$C]:JF,rules:[{[$C]:[{[GC]:dI,[WC]:[$A,II]}],rules:[{[$C]:YF,rules:[{[$C]:QF,rules:[{[$C]:kF,error:"Access Points do not support S3 Accelerate",[HC]:aI},{[$C]:[YI,QI],endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:oF,[rI]:lA},[HC]:gI},{[$C]:[YI,AA],endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:oF,[rI]:lA},[HC]:gI},{[$C]:[MA,QI],endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:oF,[rI]:lA},[HC]:gI},{[$C]:[MA,AA,ZI,iA],endpoint:{[JC]:qI,[YC]:oF,[rI]:lA},[HC]:gI},{[$C]:[MA,AA],endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:oF,[rI]:lA},[HC]:gI}],[HC]:yI},XA],[HC]:yI},eF],[HC]:yI},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[HC]:aI}],[HC]:yI},tF],[HC]:yI},rF],[HC]:yI}],[HC]:yI}],[HC]:yI},iF],[HC]:yI}],[HC]:yI}],[HC]:yI},{[$C]:[{[GC]:TI,[WC]:[GA,nI]}],rules:[{[$C]:SF,error:"S3 MRAP does not support dual-stack",[HC]:aI},{[$C]:AF,error:"S3 MRAP does not support FIPS",[HC]:aI},{[$C]:kF,error:"S3 MRAP does not support S3 Accelerate",[HC]:aI},{[$C]:[{[GC]:sI,[WC]:[{[KC]:"DisableMultiRegionAccessPoints"},nI]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[HC]:aI},{[$C]:[{[GC]:lI,[WC]:wF,[VC]:UI}],rules:[{[$C]:[{[GC]:dI,[WC]:[{[GC]:cI,[WC]:[{[KC]:UI},uI]},{[GC]:cI,[WC]:[jA,"partition"]}]}],rules:[{endpoint:{[JC]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[YC]:{[ZC]:[{[XC]:nI,name:BI,[eI]:II,[iI]:["*"]}]},[rI]:lA},[HC]:gI}],[HC]:yI},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[HC]:aI}],[HC]:yI}],[HC]:yI},{error:"Invalid Access Point Name",[HC]:aI}],[HC]:yI},nF],[HC]:yI},{[$C]:[{[GC]:dI,[WC]:[$A,CI]}],rules:[{[$C]:SF,error:"S3 Outposts does not support Dual-stack",[HC]:aI},{[$C]:AF,error:"S3 Outposts does not support FIPS",[HC]:aI},{[$C]:kF,error:"S3 Outposts does not support S3 Accelerate",[HC]:aI},{[$C]:[{[GC]:oI,[WC]:[{[GC]:cI,[WC]:[jA,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[HC]:aI},{[$C]:[{[GC]:cI,[WC]:HF,[VC]:EI}],rules:[{[$C]:OF,rules:[JA,{[$C]:KF,rules:[{[$C]:NF,rules:[{[$C]:VF,rules:[{[$C]:JF,rules:[{[$C]:YF,rules:[{[$C]:[{[GC]:cI,[WC]:WF,[VC]:LI}],rules:[{[$C]:[{[GC]:cI,[WC]:[jA,"resourceId[3]"],[VC]:NI}],rules:[{[$C]:[{[GC]:dI,[WC]:[{[KC]:LI},zI]}],rules:[{[$C]:EF,endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[YC]:sF,[rI]:lA},[HC]:gI},{endpoint:{[JC]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[YC]:sF,[rI]:lA},[HC]:gI}],[HC]:yI},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[HC]:aI}],[HC]:yI},{error:"Invalid ARN: expected an access point name",[HC]:aI}],[HC]:yI},{error:"Invalid ARN: Expected a 4-component resource",[HC]:aI}],[HC]:yI},eF],[HC]:yI},tF],[HC]:yI},rF],[HC]:yI}],[HC]:yI}],[HC]:yI},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[HC]:aI}],[HC]:yI},{error:"Invalid ARN: The Outpost Id was not set",[HC]:aI}],[HC]:yI},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[HC]:aI}],[HC]:yI},{error:"Invalid ARN: No ARN type specified",[HC]:aI}],[HC]:yI},{[$C]:[{[GC]:pI,[WC]:[rA,0,4,!1],[VC]:jI},{[GC]:dI,[WC]:[{[KC]:jI},"arn:"]},{[GC]:wI,[WC]:[{[GC]:oI,[WC]:[aF]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[HC]:aI},{[$C]:[{[GC]:sI,[WC]:[_A,nI]},aF],error:"Path-style addressing cannot be used with ARN buckets",[HC]:aI},{[$C]:CF,rules:[{[$C]:NF,rules:[{[$C]:[xA],rules:[{[$C]:[QI,fA,YI,SA],endpoint:{[JC]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[QI,fA,YI,EA,TA],rules:[{endpoint:lF,[HC]:gI}],[HC]:yI},{[$C]:[QI,fA,YI,EA,IA],endpoint:lF,[HC]:gI},{[$C]:[AA,fA,YI,SA],endpoint:{[JC]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,fA,YI,EA,TA],rules:[{endpoint:dF,[HC]:gI}],[HC]:yI},{[$C]:[AA,fA,YI,EA,IA],endpoint:dF,[HC]:gI},{[$C]:[QI,fA,MA,SA],endpoint:{[JC]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[QI,fA,MA,EA,TA],rules:[{endpoint:cF,[HC]:gI}],[HC]:yI},{[$C]:[QI,fA,MA,EA,IA],endpoint:cF,[HC]:gI},{[$C]:[AA,ZI,iA,MA,SA],endpoint:{[JC]:HI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,ZI,iA,MA,EA,TA],rules:[{[$C]:UF,endpoint:uF,[HC]:gI},{endpoint:uF,[HC]:gI}],[HC]:yI},{[$C]:[AA,ZI,iA,MA,EA,IA],endpoint:uF,[HC]:gI},{[$C]:[AA,fA,MA,SA],endpoint:{[JC]:$I,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[AA,fA,MA,EA,TA],rules:[{[$C]:UF,endpoint:{[JC]:$I,[YC]:CA,[rI]:lA},[HC]:gI},{endpoint:pF,[HC]:gI}],[HC]:yI},{[$C]:[AA,fA,MA,EA,IA],endpoint:pF,[HC]:gI}],[HC]:yI},{error:"Path-style addressing cannot be used with S3 Accelerate",[HC]:aI}],[HC]:yI}],[HC]:yI}],[HC]:yI},{[$C]:[{[GC]:oI,[WC]:[hF]},{[GC]:sI,[WC]:[hF,nI]}],rules:[{[$C]:NF,rules:[{[$C]:ZF,rules:[WA,KA,{[$C]:EF,endpoint:{[JC]:_I,[YC]:fF,[rI]:lA},[HC]:gI},{[$C]:AF,endpoint:{[JC]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[YC]:fF,[rI]:lA},[HC]:gI},{endpoint:{[JC]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[YC]:fF,[rI]:lA},[HC]:gI}],[HC]:yI},LA],[HC]:yI}],[HC]:yI},{[$C]:[gA],rules:[{[$C]:NF,rules:[{[$C]:ZF,rules:[{[$C]:[YI,QI,fA,SA],endpoint:{[JC]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[YI,QI,fA,EA,TA],rules:[{endpoint:mF,[HC]:gI}],[HC]:yI},{[$C]:[YI,QI,fA,EA,IA],endpoint:mF,[HC]:gI},{[$C]:[YI,AA,fA,SA],endpoint:{[JC]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[YI,AA,fA,EA,TA],rules:[{endpoint:gF,[HC]:gI}],[HC]:yI},{[$C]:[YI,AA,fA,EA,IA],endpoint:gF,[HC]:gI},{[$C]:[MA,QI,fA,SA],endpoint:{[JC]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[MA,QI,fA,EA,TA],rules:[{endpoint:yF,[HC]:gI}],[HC]:yI},{[$C]:[MA,QI,fA,EA,IA],endpoint:yF,[HC]:gI},{[$C]:[MA,AA,ZI,iA,SA],endpoint:{[JC]:_I,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[MA,AA,ZI,iA,EA,TA],rules:[{[$C]:UF,endpoint:vF,[HC]:gI},{endpoint:vF,[HC]:gI}],[HC]:yI},{[$C]:[MA,AA,ZI,iA,EA,IA],endpoint:vF,[HC]:gI},{[$C]:[MA,AA,fA,SA],endpoint:{[JC]:GI,[YC]:kA,[rI]:lA},[HC]:gI},{[$C]:[MA,AA,fA,EA,TA],rules:[{[$C]:UF,endpoint:{[JC]:GI,[YC]:CA,[rI]:lA},[HC]:gI},{endpoint:bF,[HC]:gI}],[HC]:yI},{[$C]:[MA,AA,fA,EA,IA],endpoint:bF,[HC]:gI}],[HC]:yI},LA],[HC]:yI}],[HC]:yI}],[HC]:yI},{error:"A region must be set when sending requests to S3.",[HC]:aI}]},eM=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const r=this.hash(e);if(!1===r)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:r,done:i}=e.next();if(this.data.delete(r),i||++t>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="";const{parameters:r}=this;if(0===r.length)return!1;for(const i of r){const r=String(e[i]??"");if(r.includes("|;"))return!1;t+=r+"|;"}return t}}({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),tM=(e,t={})=>eM.get(e,(()=>((e,t)=>{const{endpointParams:r,logger:i}=t,{parameters:n,rules:o}=e;t.logger?.debug?.(`${iC} Initial EndpointParams: ${nC(r)}`);const s=Object.entries(n).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(s.length>0)for(const[e,t]of s)r[e]=r[e]??t;const a=Object.entries(n).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==r[e])throw new oC(`Missing required parameter: '${e}'`);const l=_C(o,{endpointParams:r,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${iC} Resolved endpoint: ${nC(l)}`),l})(XF,{endpointParams:e,logger:t.logger})));rC.aws=EC;const rM=(iM=async(e,t,r)=>({operation:GS(t).operation,region:await WS(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),async(e,t,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await iM(e,t,r),n=GS(t)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!n)throw new Error(`getEndpointParameterInstructions() is not defined on \`${t.commandName}\``);const o=await WT(r,{getEndpointParameterInstructions:n},e);return Object.assign(i,o)});var iM;function nM(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function oM(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const sM=((e,t,r)=>i=>{const n=e(i),o=n.properties?.authSchemes;if(!o)return t(i);const s=[];for(const e of o){const{name:t,properties:n={},...a}=e,l=t.toLowerCase();let d;if(t!==l&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${t}\` to \`${l}\``),"sigv4a"===l){d="aws.auth#sigv4a";const e=o.find((e=>{const t=e.name.toLowerCase();return"sigv4a"!==t&&t.startsWith("sigv4")}));if(!UC&&e)continue}else{if(!l.startsWith("sigv4"))throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${l}\``);d="aws.auth#sigv4"}const c=r[d];if(!c)throw new Error(`Could not find HttpAuthOption create function for \`${d}\``);const u=c(i);u.schemeId=d,u.signingProperties={...u.signingProperties||{},...a,...n},s.push(u)}return s})(tM,(e=>{const t=[];return e.operation,t.push(nM(e)),t.push(oM(e)),t}),{"aws.auth#sigv4":nM,"aws.auth#sigv4a":oM}),aM=e=>{const t=(e=>(e.sigv4aSigningRegionSet=NB(e.sigv4aSigningRegionSet),e))(qC(e));return{...t}},lM={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class dM extends vE{constructor(e){super(e),Object.setPrototypeOf(this,dM.prototype)}}class cM extends dM{constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,cM.prototype)}}class uM extends dM{constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,uM.prototype)}}class pM extends dM{constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,pM.prototype)}}class hM extends dM{constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,hM.prototype)}}class fM extends dM{constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,fM.prototype)}}var mM;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(mM||(mM={}));var gM;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.AccessPointArn?t.AccessPointArn(e.AccessPointArn):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(gM||(gM={}));class yM extends dM{constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,yM.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class vM extends dM{constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,vM.prototype)}}class bM extends dM{constructor(e){super({name:"NotFound",$fault:"client",...e}),this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,bM.prototype)}}const wM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk}}),_M=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk}}),xM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk}}),SM=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk},...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk}}),kM=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:Fk},...e.SessionToken&&{SessionToken:Fk}}),EM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk},...e.Credentials&&{Credentials:kM(e.Credentials)}}),TM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk}}),BM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk}}),CM=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk}}),IM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk}}),AM=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk}});var FM=__webpack_require__(86454);const MM=(e,t)=>((e,t)=>Ck(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length){const t=new FM.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let r;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{r=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const i="#text",n=Object.keys(r)[0],o=r[n];return o[i]&&(o[n]=o[i],delete o[i]),IE(o)}return{}})),DM=async(e,t)=>{const r=await MM(e,t);return r.Error&&(r.Error.message=r.Error.message??r.Error.Message),r};class RM{constructor(e){this.value=e}toString(){return(""+this.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
").replace(/\n/g,"
").replace(/\u0085/g,"…").replace(/\u2028/,"
")}}class PM{static of(e,t,r){const i=new PM(e);return void 0!==t&&i.addChildNode(new RM(t)),void 0!==r&&i.withName(r),i}constructor(e,t=[]){this.name=e,this.children=t,this.attributes={}}withName(e){return this.name=e,this}addAttribute(e,t){return this.attributes[e]=t,this}addChildNode(e){return this.children.push(e),this}removeAttribute(e){return delete this.attributes[e],this}n(e){return this.name=e,this}c(e){return this.children.push(e),this}a(e,t){return null!=t&&(this.attributes[e]=t),this}cc(e,t,r=t){if(null!=e[t]){const i=PM.of(t,e[t]).withName(r);this.c(i)}}l(e,t,r,i){if(null!=e[t]){i().map((e=>{e.withName(r),this.c(e)}))}}lc(e,t,r,i){if(null!=e[t]){const e=i(),t=new PM(r);e.map((e=>{t.c(e)})),this.c(t)}}toString(){const e=Boolean(this.children.length);let t=`<${this.name}`;const r=this.attributes;for(const e of Object.keys(r)){const n=r[e];null!=n&&(t+=` ${e}="${i=""+n,i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}"`)}var i;return t+(e?`>${this.children.map((e=>e.toString())).join("")}</${this.name}>`:"/>")}}class OM extends dM{constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,OM.prototype)}}var zM;!function(e){e.visit=(e,t)=>void 0!==e.Records?t.Records(e.Records):void 0!==e.Stats?t.Stats(e.Stats):void 0!==e.Progress?t.Progress(e.Progress):void 0!==e.Cont?t.Cont(e.Cont):void 0!==e.End?t.End(e.End):t._(e.$unknown[0],e.$unknown[1])}(zM||(zM={}));const NM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk}}),qM=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk},...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Fk}}),UM=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Fk}}),LM=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Fk}}),jM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[HO]:e[oP],[IO]:e[fR]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[nz]:[,"AbortMultipartUpload"],[pO]:[,jk(e[EP],"UploadId")]});return r.m("DELETE").h(i).q(n).b(undefined),r.build()},HM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{"content-type":"application/xml",[_O]:e[KD],[xO]:e[VD],[kO]:e[oR],[EO]:e[sR],[HO]:e[oP],[IO]:e[fR],[KP]:e[BR],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[pO]:[,jk(e[EP],"UploadId")]});let o,s;return void 0!==e.MultipartUpload&&(s=xD(e.MultipartUpload,t),s=s.n("CompleteMultipartUpload"),o=fO,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),r.m("POST").h(i).q(n).b(o),r.build()},$M=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[mO]:e[RD],[AP]:e[WD],[FP]:e[JD],[MP]:e[YD],[DP]:e[QD],[zP]:e[aR],[UP]:[()=>AE(e[hR]),()=>eE(e[hR]).toString()],[AO]:e[wR],[FO]:e[_R],[MO]:e[xR],[DO]:e[SR],[KO]:e[hP],[GO]:e[uP],[iz]:e[CP],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP],[VO]:e[vP],[YO]:e[yP],[JO]:[()=>AE(e[HD]),()=>e[HD].toString()],[HO]:e[oP],[ez]:e[_P],[NO]:e[HR],[qO]:[()=>AE(e[$R]),()=>qE(e[$R]).toString()],[zO]:e[jR],[IO]:e[fR],[wO]:e[GD],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,r)=>(t[`x-amz-meta-${r.toLowerCase()}`]=e.Metadata[r],t)),{})});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[uO]:[,""]});return r.m("POST").h(i).q(n).b(undefined),r.build()},GM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[TO]:e[pP],[KO]:e[hP],[VO]:e[vP],[YO]:e[yP],[JO]:[()=>AE(e[HD]),()=>e[HD].toString()]});r.bp("/"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const n=DE({[lO]:[,""]});return r.m("GET").h(i).q(n).b(undefined),r.build()},WM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[RO]:e[PR],[HO]:e[oP],[bO]:[()=>AE(e[jD]),()=>e[jD].toString()],[IO]:e[fR]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[nz]:[,"DeleteObject"],[hO]:[,e[TP]]});return r.m("DELETE").h(i).q(n).b(undefined),r.build()},KM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[GP]:e[ER],[WP]:[()=>AE(e[TR]),()=>eE(e[TR]).toString()],[KP]:e[BR],[VP]:[()=>AE(e[AR]),()=>eE(e[AR]).toString()],[tO]:e[YR],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP],[HO]:e[oP],[IO]:e[fR],[SO]:e[XD]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[nz]:[,"GetObject"],[rO]:[,e[ZR]],[iO]:[,e[XR]],[nO]:[,e[eP]],[oO]:[,e[tP]],[sO]:[,e[rP]],[aO]:[()=>void 0!==e.ResponseExpires,()=>eE(e[iP]).toString()],[hO]:[,e[TP]],[XP]:[()=>void 0!==e.PartNumber,()=>e[VR].toString()]});return r.m("GET").h(i).q(n).b(undefined),r.build()},VM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[GP]:e[ER],[WP]:[()=>AE(e[TR]),()=>eE(e[TR]).toString()],[KP]:e[BR],[VP]:[()=>AE(e[AR]),()=>eE(e[AR]).toString()],[tO]:e[YR],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP],[HO]:e[oP],[IO]:e[fR],[SO]:e[XD]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[rO]:[,e[ZR]],[iO]:[,e[XR]],[nO]:[,e[eP]],[oO]:[,e[tP]],[sO]:[,e[rP]],[aO]:[()=>void 0!==e.ResponseExpires,()=>eE(e[iP]).toString()],[hO]:[,e[TP]],[XP]:[()=>void 0!==e.PartNumber,()=>e[VR].toString()]});return r.m("HEAD").h(i).q(n).b(undefined),r.build()},JM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[HO]:e[oP],[IO]:e[fR],[UO]:[()=>AE(e[GR]),()=>(e[GR]||[]).map(NE).join(", ")]});r.bp("/"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const n=DE({[YP]:[,"2"],[qP]:[,e[cR]],[LP]:[,e[gR]],[ZP]:[()=>void 0!==e.MaxKeys,()=>e[OR].toString()],[eO]:[,e[WR]],[NP]:[,e[lR]],[$P]:[()=>void 0!==e.FetchOwner,()=>e[bR].toString()],[dO]:[,e[dP]]});return r.m("GET").h(i).q(n).b(undefined),r.build()},YM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{[zP]:e[aR]||"application/octet-stream",[mO]:e[RD],[AP]:e[WD],[FP]:e[JD],[MP]:e[YD],[DP]:e[QD],[RP]:[()=>AE(e[ZD]),()=>e[ZD].toString()],[PP]:e[eR],[WO]:e[GD],[_O]:e[KD],[xO]:e[VD],[kO]:e[oR],[EO]:e[sR],[UP]:[()=>AE(e[hR]),()=>eE(e[hR]).toString()],[KP]:e[BR],[AO]:e[wR],[FO]:e[_R],[MO]:e[xR],[DO]:e[SR],[KO]:e[hP],[GO]:e[uP],[iz]:e[CP],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP],[VO]:e[vP],[YO]:e[yP],[JO]:[()=>AE(e[HD]),()=>e[HD].toString()],[HO]:e[oP],[ez]:e[_P],[NO]:e[HR],[qO]:[()=>AE(e[$R]),()=>qE(e[$R]).toString()],[zO]:e[jR],[IO]:e[fR],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,r)=>(t[`x-amz-meta-${r.toLowerCase()}`]=e.Metadata[r],t)),{})});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[nz]:[,"PutObject"]});let o,s;return void 0!==e.Body&&(s=e.Body,o=s),r.m("PUT").h(i).q(n).b(o),r.build()},QM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{"content-type":"application/xml",[PP]:e[eR],[WO]:e[GD],[IO]:e[fR],[HO]:e[oP]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[cO]:[,""],[hO]:[,e[TP]]});let o,s;return void 0!==e.Tagging&&(s=ED(e.Tagging,t),o=fO,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),r.m("PUT").h(i).q(n).b(o),r.build()},ZM=async(e,t)=>{const r=qB(e,t),i=DE({},AE,{"content-type":"application/octet-stream",[RP]:[()=>AE(e[ZD]),()=>e[ZD].toString()],[PP]:e[eR],[WO]:e[GD],[_O]:e[KD],[xO]:e[VD],[kO]:e[oR],[EO]:e[sR],[QO]:e[fP],[ZO]:e[mP],[XO]:e[gP],[HO]:e[oP],[IO]:e[fR]});r.bp("/{Key+}"),r.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),r.p("Key",(()=>e.Key),"{Key+}",!0);const n=DE({[nz]:[,"UploadPart"],[XP]:[null!=jk(e.PartNumber,"PartNumber"),()=>e[VR].toString()],[pO]:[,jk(e[EP],"UploadId")]});let o,s;return void 0!==e.Body&&(s=e.Body,o=s),r.m("PUT").h(i).q(n).b(o),r.build()},XM=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[QR]:[,e.headers[jO]]});return await Ck(e.body,t),r},eD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[vR]:[,e.headers[CO]],[hP]:[,e.headers[KO]],[TP]:[,e.headers[rz]],[vP]:[,e.headers[VO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[QR]:[,e.headers[jO]]}),i=jk(Hk(await MM(e.body,t)),"body");return null!=i[LD]&&(r[LD]=$k(i[LD])),null!=i[KD]&&(r[KD]=$k(i[KD])),null!=i[VD]&&(r[VD]=$k(i[VD])),null!=i[oR]&&(r[oR]=$k(i[oR])),null!=i[sR]&&(r[sR]=$k(i[sR])),null!=i[yR]&&(r[yR]=$k(i[yR])),null!=i[FR]&&(r[FR]=$k(i[FR])),null!=i[DR]&&(r[DR]=$k(i[DR])),r},tD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[PD]:[()=>void 0!==e.headers[gO],()=>jk(sE(e.headers[gO]))],[ND]:[,e.headers[yO]],[hP]:[,e.headers[KO]],[fP]:[,e.headers[QO]],[gP]:[,e.headers[XO]],[vP]:[,e.headers[VO]],[yP]:[,e.headers[YO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[QR]:[,e.headers[jO]],[GD]:[,e.headers[wO]]}),i=jk(Hk(await MM(e.body,t)),"body");return null!=i[LD]&&(r[LD]=$k(i[LD])),null!=i[FR]&&(r[FR]=$k(i[FR])),null!=i[EP]&&(r[EP]=$k(i[EP])),r},rD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[hP]:[,e.headers[KO]],[vP]:[,e.headers[VO]],[yP]:[,e.headers[YO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])]}),i=jk(Hk(await MM(e.body,t)),"body");return null!=i[$D]&&(r[$D]=MD(i[$D],t)),r},iD=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[uR]:[()=>void 0!==e.headers[BO],()=>Mk(e.headers[BO])],[TP]:[,e.headers[rz]],[QR]:[,e.headers[jO]]});return await Ck(e.body,t),r},nD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[uR]:[()=>void 0!==e.headers[BO],()=>Mk(e.headers[BO])],[zD]:[,e.headers[IP]],[vR]:[,e.headers[CO]],[lP]:[,e.headers[LO]],[RR]:[()=>void 0!==e.headers[JP],()=>jk(sE(e.headers[JP]))],[ZD]:[()=>void 0!==e.headers[RP],()=>Kk(e.headers[RP])],[yR]:[,e.headers[jP]],[KD]:[,e.headers[_O]],[VD]:[,e.headers[xO]],[oR]:[,e.headers[kO]],[sR]:[,e.headers[EO]],[zR]:[()=>void 0!==e.headers[PO],()=>Vk(e.headers[PO])],[TP]:[,e.headers[rz]],[WD]:[,e.headers[AP]],[JD]:[,e.headers[FP]],[YD]:[,e.headers[MP]],[QD]:[,e.headers[DP]],[nR]:[,e.headers[OP]],[aR]:[,e.headers[zP]],[hR]:[()=>void 0!==e.headers[UP],()=>jk(sE(e.headers[UP]))],[mR]:[,e.headers[HP]],[CP]:[,e.headers[iz]],[hP]:[,e.headers[KO]],[fP]:[,e.headers[QO]],[gP]:[,e.headers[XO]],[vP]:[,e.headers[VO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[uP]:[,e.headers[GO]],[QR]:[,e.headers[jO]],[sP]:[,e.headers[$O]],[KR]:[()=>void 0!==e.headers[OO],()=>Vk(e.headers[OO])],[xP]:[()=>void 0!==e.headers[tz],()=>Vk(e.headers[tz])],[HR]:[,e.headers[NO]],[$R]:[()=>void 0!==e.headers[qO],()=>jk(rE(e.headers[qO]))],[jR]:[,e.headers[zO]],Metadata:[,Object.keys(e.headers).filter((e=>e.startsWith("x-amz-meta-"))).reduce(((t,r)=>(t[r.substring(11)]=e.headers[r],t)),{})]}),i=e.body;return t.sdkStreamMixin(i),r.Body=i,r},oD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[uR]:[()=>void 0!==e.headers[BO],()=>Mk(e.headers[BO])],[zD]:[,e.headers[IP]],[vR]:[,e.headers[CO]],[lP]:[,e.headers[LO]],[qD]:[,e.headers[vO]],[RR]:[()=>void 0!==e.headers[JP],()=>jk(sE(e.headers[JP]))],[ZD]:[()=>void 0!==e.headers[RP],()=>Kk(e.headers[RP])],[KD]:[,e.headers[_O]],[VD]:[,e.headers[xO]],[oR]:[,e.headers[kO]],[sR]:[,e.headers[EO]],[yR]:[,e.headers[jP]],[zR]:[()=>void 0!==e.headers[PO],()=>Vk(e.headers[PO])],[TP]:[,e.headers[rz]],[WD]:[,e.headers[AP]],[JD]:[,e.headers[FP]],[YD]:[,e.headers[MP]],[QD]:[,e.headers[DP]],[aR]:[,e.headers[zP]],[hR]:[()=>void 0!==e.headers[UP],()=>jk(sE(e.headers[UP]))],[mR]:[,e.headers[HP]],[CP]:[,e.headers[iz]],[hP]:[,e.headers[KO]],[fP]:[,e.headers[QO]],[gP]:[,e.headers[XO]],[vP]:[,e.headers[VO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[uP]:[,e.headers[GO]],[QR]:[,e.headers[jO]],[sP]:[,e.headers[$O]],[KR]:[()=>void 0!==e.headers[OO],()=>Vk(e.headers[OO])],[HR]:[,e.headers[NO]],[$R]:[()=>void 0!==e.headers[qO],()=>jk(rE(e.headers[qO]))],[jR]:[,e.headers[zO]],Metadata:[,Object.keys(e.headers).filter((e=>e.startsWith("x-amz-meta-"))).reduce(((t,r)=>(t[r.substring(11)]=e.headers[r],t)),{})]});return await Ck(e.body,t),r},sD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[QR]:[,e.headers[jO]]}),i=jk(Hk(await MM(e.body,t)),"body");return""===i.CommonPrefixes?r[rR]=[]:null!=i[rR]&&(r[rR]=CD(CE(i[rR]),t)),""===i.Contents?r[dR]=[]:null!=i[dR]&&(r[dR]=ID(CE(i[dR]),t)),null!=i[lR]&&(r[lR]=$k(i[lR])),null!=i[cR]&&(r[cR]=$k(i[cR])),null!=i[gR]&&(r[gR]=$k(i[gR])),null!=i[IR]&&(r[IR]=Mk(i[IR])),null!=i[MR]&&(r[MR]=Vk(i[MR])),null!=i[OR]&&(r[OR]=Vk(i[OR])),null!=i[NR]&&(r[NR]=$k(i[NR])),null!=i[qR]&&(r[qR]=$k(i[qR])),null!=i[WR]&&(r[WR]=$k(i[WR])),null!=i[dP]&&(r[dP]=$k(i[dP])),r},aD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[vR]:[,e.headers[CO]],[yR]:[,e.headers[jP]],[KD]:[,e.headers[_O]],[VD]:[,e.headers[xO]],[oR]:[,e.headers[kO]],[sR]:[,e.headers[EO]],[hP]:[,e.headers[KO]],[TP]:[,e.headers[rz]],[fP]:[,e.headers[QO]],[gP]:[,e.headers[XO]],[vP]:[,e.headers[VO]],[yP]:[,e.headers[YO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[QR]:[,e.headers[jO]]});return await Ck(e.body,t),r},lD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[TP]:[,e.headers[rz]]});return await Ck(e.body,t),r},dD=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cD(e,t);const r=DE({$metadata:DD(e),[hP]:[,e.headers[KO]],[yR]:[,e.headers[jP]],[KD]:[,e.headers[_O]],[VD]:[,e.headers[xO]],[oR]:[,e.headers[kO]],[sR]:[,e.headers[EO]],[fP]:[,e.headers[QO]],[gP]:[,e.headers[XO]],[vP]:[,e.headers[VO]],[HD]:[()=>void 0!==e.headers[JO],()=>Mk(e.headers[JO])],[QR]:[,e.headers[jO]]});return await Ck(e.body,t),r},cD=async(e,t)=>{const r={...e,body:await DM(e.body,t)},i=((e,t)=>void 0!==t?.Error?.Code?t.Error.Code:void 0!==t?.Code?t.Code:404==e.statusCode?"NotFound":void 0)(e,r.body);switch(i){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await vD(r,t);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await _D(r,t);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await hD(r,t);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await fD(r,t);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await gD(r,t);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await mD(r,t);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await yD(r,t);case"NotFound":case"com.amazonaws.s3#NotFound":throw await bD(r,t);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await wD(r,t);default:const n=r.body;return uD({output:e,parsedBody:n,errorCode:i})}},uD=(pD=dM,({output:e,parsedBody:t,errorCode:r})=>{(({output:e,parsedBody:t,exceptionCtor:r,errorCode:i})=>{const n=wE(e),o=n.httpStatusCode?n.httpStatusCode+"":void 0,s=new r({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:n});throw bE(s,t)})({output:e,parsedBody:t,exceptionCtor:pD,errorCode:r})});var pD;const hD=async(e,t)=>{const r=DE({}),i=(e.body,new pM({$metadata:DD(e),...r}));return bE(i,e.body)},fD=async(e,t)=>{const r=DE({}),i=(e.body,new hM({$metadata:DD(e),...r}));return bE(i,e.body)},mD=async(e,t)=>{const r=DE({}),i=e.body;null!=i[UD]&&(r[UD]=$k(i[UD])),null!=i[uP]&&(r[uP]=$k(i[uP]));const n=new yM({$metadata:DD(e),...r});return bE(n,e.body)},gD=async(e,t)=>{const r=DE({}),i=(e.body,new fM({$metadata:DD(e),...r}));return bE(i,e.body)},yD=async(e,t)=>{const r=DE({}),i=(e.body,new vM({$metadata:DD(e),...r}));return bE(i,e.body)},vD=async(e,t)=>{const r=DE({}),i=(e.body,new cM({$metadata:DD(e),...r}));return bE(i,e.body)},bD=async(e,t)=>{const r=DE({}),i=(e.body,new bM({$metadata:DD(e),...r}));return bE(i,e.body)},wD=async(e,t)=>{const r=DE({}),i=(e.body,new OM({$metadata:DD(e),...r}));return bE(i,e.body)},_D=async(e,t)=>{const r=DE({}),i=(e.body,new uM({$metadata:DD(e),...r}));return bE(i,e.body)},xD=(e,t)=>{const r=new PM(tR);return r.l(e,"Parts","Part",(()=>SD(e[JR],t))),r},SD=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new PM(iR);return t.cc(e,yR),t.cc(e,KD),t.cc(e,VD),t.cc(e,oR),t.cc(e,sR),null!=e[VR]&&t.c(PM.of(VR,String(e[VR])).n(VR)),t})(e);return t.n(QP)})),kD=(e,t)=>{const r=new PM(kP);return null!=e[FR]&&r.c(PM.of(LR,e[FR]).n(FR)),r.cc(e,BP),r},ED=(e,t)=>{const r=new PM(_P);return r.lc(e,"TagSet","TagSet",(()=>TD(e[SP],t))),r},TD=(e,t)=>e.filter((e=>null!=e)).map((e=>kD(e,t).n(kP))),BD=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>$k(e))),CD=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[WR]&&(t[WR]=$k(e[WR])),t})(e))),ID=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const r={};return null!=e[FR]&&(r[FR]=$k(e[FR])),null!=e[RR]&&(r[RR]=jk(rE(e[RR]))),null!=e[yR]&&(r[yR]=$k(e[yR])),""===e.ChecksumAlgorithm?r[GD]=[]:null!=e[GD]&&(r[GD]=BD(CE(e[GD]))),null!=e[wP]&&(r[wP]=Kk(e[wP])),null!=e[uP]&&(r[uP]=$k(e[uP])),null!=e[UR]&&(r[UR]=AD(e[UR],t)),null!=e[aP]&&(r[aP]=FD(e[aP],t)),r})(e,t))),AD=(e,t)=>{const r={};return null!=e[pR]&&(r[pR]=$k(e[pR])),null!=e[kR]&&(r[kR]=$k(e[kR])),r},FD=(e,t)=>{const r={};return null!=e[CR]&&(r[CR]=Mk(e[CR])),null!=e[nP]&&(r[nP]=jk(rE(e[nP]))),r},MD=(e,t)=>{const r={};return null!=e[OD]&&(r[OD]=$k(e[OD])),null!=e[cP]&&(r[cP]=$k(e[cP])),null!=e[bP]&&(r[bP]=$k(e[bP])),null!=e[vR]&&(r[vR]=jk(rE(e[vR]))),r},DD=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),RD="ACL",PD="AbortDate",OD="AccessKeyId",zD="AcceptRanges",ND="AbortRuleId",qD="ArchiveStatus",UD="AccessTier",LD="Bucket",jD="BypassGovernanceRetention",HD="BucketKeyEnabled",$D="Credentials",GD="ChecksumAlgorithm",WD="CacheControl",KD="ChecksumCRC32",VD="ChecksumCRC32C",JD="ContentDisposition",YD="ContentEncoding",QD="ContentLanguage",ZD="ContentLength",XD="ChecksumMode",eR="ContentMD5",tR="CompletedMultipartUpload",rR="CommonPrefixes",iR="CompletedPart",nR="ContentRange",oR="ChecksumSHA1",sR="ChecksumSHA256",aR="ContentType",lR="ContinuationToken",dR="Contents",cR="Delimiter",uR="DeleteMarker",pR="DisplayName",hR="Expires",fR="ExpectedBucketOwner",mR="ExpiresString",gR="EncodingType",yR="ETag",vR="Expiration",bR="FetchOwner",wR="GrantFullControl",_R="GrantRead",xR="GrantReadACP",SR="GrantWriteACP",kR="ID",ER="IfMatch",TR="IfModifiedSince",BR="IfNoneMatch",CR="IsRestoreInProgress",IR="IsTruncated",AR="IfUnmodifiedSince",FR="Key",MR="KeyCount",DR="Location",RR="LastModified",PR="MFA",OR="MaxKeys",zR="MissingMeta",NR="Name",qR="NextContinuationToken",UR="Owner",LR="ObjectKey",jR="ObjectLockLegalHoldStatus",HR="ObjectLockMode",$R="ObjectLockRetainUntilDate",GR="OptionalObjectAttributes",WR="Prefix",KR="PartsCount",VR="PartNumber",JR="Parts",YR="Range",QR="RequestCharged",ZR="ResponseCacheControl",XR="ResponseContentDisposition",eP="ResponseContentEncoding",tP="ResponseContentLanguage",rP="ResponseContentType",iP="ResponseExpires",nP="RestoreExpiryDate",oP="RequestPayer",sP="ReplicationStatus",aP="RestoreStatus",lP="Restore",dP="StartAfter",cP="SecretAccessKey",uP="StorageClass",pP="SessionMode",hP="ServerSideEncryption",fP="SSECustomerAlgorithm",mP="SSECustomerKey",gP="SSECustomerKeyMD5",yP="SSEKMSEncryptionContext",vP="SSEKMSKeyId",bP="SessionToken",wP="Size",_P="Tagging",xP="TagCount",SP="TagSet",kP="Tag",EP="UploadId",TP="VersionId",BP="Value",CP="WebsiteRedirectLocation",IP="accept-ranges",AP="cache-control",FP="content-disposition",MP="content-encoding",DP="content-language",RP="content-length",PP="content-md5",OP="content-range",zP="content-type",NP="continuation-token",qP="delimiter",UP="expires",LP="encoding-type",jP="etag",HP="expiresstring",$P="fetch-owner",GP="if-match",WP="if-modified-since",KP="if-none-match",VP="if-unmodified-since",JP="last-modified",YP="list-type",QP="member",ZP="max-keys",XP="partNumber",eO="prefix",tO="range",rO="response-cache-control",iO="response-content-disposition",nO="response-content-encoding",oO="response-content-language",sO="response-content-type",aO="response-expires",lO="session",dO="start-after",cO="tagging",uO="uploads",pO="uploadId",hO="versionId",fO='<?xml version="1.0" encoding="UTF-8"?>',mO="x-amz-acl",gO="x-amz-abort-date",yO="x-amz-abort-rule-id",vO="x-amz-archive-status",bO="x-amz-bypass-governance-retention",wO="x-amz-checksum-algorithm",_O="x-amz-checksum-crc32",xO="x-amz-checksum-crc32c",SO="x-amz-checksum-mode",kO="x-amz-checksum-sha1",EO="x-amz-checksum-sha256",TO="x-amz-create-session-mode",BO="x-amz-delete-marker",CO="x-amz-expiration",IO="x-amz-expected-bucket-owner",AO="x-amz-grant-full-control",FO="x-amz-grant-read",MO="x-amz-grant-read-acp",DO="x-amz-grant-write-acp",RO="x-amz-mfa",PO="x-amz-missing-meta",OO="x-amz-mp-parts-count",zO="x-amz-object-lock-legal-hold",NO="x-amz-object-lock-mode",qO="x-amz-object-lock-retain-until-date",UO="x-amz-optional-object-attributes",LO="x-amz-restore",jO="x-amz-request-charged",HO="x-amz-request-payer",$O="x-amz-replication-status",GO="x-amz-storage-class",WO="x-amz-sdk-checksum-algorithm",KO="x-amz-server-side-encryption",VO="x-amz-server-side-encryption-aws-kms-key-id",JO="x-amz-server-side-encryption-bucket-key-enabled",YO="x-amz-server-side-encryption-context",QO="x-amz-server-side-encryption-customer-algorithm",ZO="x-amz-server-side-encryption-customer-key",XO="x-amz-server-side-encryption-customer-key-md5",ez="x-amz-tagging",tz="x-amz-tagging-count",rz="x-amz-version-id",iz="x-amz-website-redirect-location",nz="x-id";class oz extends(Ik.classBuilder().ep({...lM,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r)]})).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(TM,EM).ser(GM).de(rD).build()){}const sz="3.675.0";function az(e){return"string"==typeof e?0===e.length:0===e.byteLength}var lz={name:"SHA-1"},dz={name:"HMAC",hash:lz},cz=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const uz={};function pz(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:uz}var hz=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,r){pz().crypto.subtle.importKey("raw",fz(e),dz,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!az(e)){var t=fz(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return pz().crypto.subtle.sign(dz,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):az(this.toHash)?Promise.resolve(cz):Promise.resolve().then((function(){return pz().crypto.subtle.digest(lz,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e}();function fz(e){return"string"==typeof e?(t=e,(new TextEncoder).encode(t)):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e);var t}var mz=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function gz(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&yz(e.crypto.subtle)}function yz(e){return e&&mz.every((function(t){return"function"==typeof e[t]}))}var vz=function(){function e(e){if(!gz(pz()))throw new Error("SHA1 not supported");this.hash=new hz(e)}return e.prototype.update=function(e,t){this.hash.update(SS(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),bz={name:"SHA-256"},wz={name:"HMAC",hash:bz},_z=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),xz=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!kS(e)){var t=SS(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return pz().crypto.subtle.sign(wz,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):kS(this.toHash)?Promise.resolve(_z):Promise.resolve().then((function(){return pz().crypto.subtle.digest(bz,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,r){pz().crypto.subtle.importKey("raw",SS(e.secret),wz,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))},e}(),Sz=64,kz=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ez=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Tz=Math.pow(2,53)-1,Bz=function(){function e(){this.state=Int32Array.from(Ez),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>Tz)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===Sz&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%Sz>=56){for(var i=this.bufferLength;i<Sz;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)t.setUint8(i,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var n=new Uint8Array(32);for(i=0;i<8;i++)n[4*i]=this.state[i]>>>24&255,n[4*i+1]=this.state[i]>>>16&255,n[4*i+2]=this.state[i]>>>8&255,n[4*i+3]=this.state[i]>>>0&255;return n},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],l=t[6],d=t[7],c=0;c<Sz;c++){if(c<16)this.temp[c]=(255&e[4*c])<<24|(255&e[4*c+1])<<16|(255&e[4*c+2])<<8|255&e[4*c+3];else{var u=this.temp[c-2],p=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,h=((u=this.temp[c-15])>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;this.temp[c]=(p+this.temp[c-7]|0)+(h+this.temp[c-16]|0)}var f=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&l)|0)+(d+(kz[c]+this.temp[c]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&n^i&n)|0;d=l,l=a,a=s,s=o+f|0,o=n,n=i,i=r,r=f+m|0}t[0]+=r,t[1]+=i,t[2]+=n,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=l,t[7]+=d},e}(),Cz=function(){function e(e){this.secret=e,this.hash=new Bz,this.reset()}return e.prototype.update=function(e){if(!kS(e)&&!this.error)try{this.hash.update(SS(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new Bz,this.secret){this.outer=new Bz;var e=function(e){var t=SS(e);if(t.byteLength>Sz){var r=new Bz;r.update(t),t=r.digest()}var i=new Uint8Array(Sz);return i.set(t),i}(this.secret),t=new Uint8Array(Sz);t.set(e);for(var r=0;r<Sz;r++)e[r]^=54,t[r]^=92;this.hash.update(e),this.outer.update(t);for(r=0;r<e.byteLength;r++)e[r]=0}},e}();var Iz=function(){function e(e){gz(pz())?this.hash=new xz(e):this.hash=new Cz(e)}return e.prototype.update=function(e,t){this.hash.update(SS(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Az=__webpack_require__(46880),Fz=__webpack_require__.n(Az);const Mz=({serviceId:e,clientVersion:t})=>async r=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?Fz().parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&n.push([`api/${e}`,t]);const o=await(r?.userAgentAppId?.());return o&&n.push([`app/${o}`]),n};class Dz{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(e));r>-1&&i>0;r--,i/=256)t[r]=i;return e<0&&Rz(t),new Dz(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Rz(e),parseInt(Sk(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Rz(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Pz{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const r of Object.keys(e)){const i=this.fromUtf8(r);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)r.set(e,i),i+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const n=new DataView(new ArrayBuffer(3+e.value.byteLength));n.setUint8(0,6),n.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(n.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const l=new Uint8Array(a.buffer);return l.set(s,3),l;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Dz.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!Wz.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(xk(e.value.replace(/\-/g,"")),1),c}}parse(e){const t={};let r=0;for(;r<e.byteLength;){const i=e.getUint8(r++),n=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,i));switch(r+=i,e.getUint8(r++)){case 0:t[n]={type:zz,value:!0};break;case 1:t[n]={type:zz,value:!1};break;case 2:t[n]={type:Nz,value:e.getInt8(r++)};break;case 3:t[n]={type:qz,value:e.getInt16(r,!1)},r+=2;break;case 4:t[n]={type:Uz,value:e.getInt32(r,!1)},r+=4;break;case 5:t[n]={type:Lz,value:new Dz(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:const i=e.getUint16(r,!1);r+=2,t[n]={type:jz,value:new Uint8Array(e.buffer,e.byteOffset+r,i)},r+=i;break;case 7:const o=e.getUint16(r,!1);r+=2,t[n]={type:Hz,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,o))},r+=o;break;case 8:t[n]={type:$z,value:new Date(new Dz(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[n]={type:Gz,value:`${Sk(s.subarray(0,4))}-${Sk(s.subarray(4,6))}-${Sk(s.subarray(6,8))}-${Sk(s.subarray(8,10))}-${Sk(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}var Oz;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Oz||(Oz={}));const zz="boolean",Nz="byte",qz="short",Uz="integer",Lz="long",jz="binary",Hz="string",$z="timestamp",Gz="uuid",Wz=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Kz{constructor(e,t){this.headerMarshaller=new Pz(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const r=this.headerMarshaller.format(e),i=r.byteLength+t.byteLength+16,n=new Uint8Array(i),o=new DataView(n.buffer,n.byteOffset,n.byteLength),s=new CS;return o.setUint32(0,i,!1),o.setUint32(4,r.byteLength,!1),o.setUint32(8,s.update(n.subarray(0,8)).digest(),!1),n.set(r,12),n.set(t,r.byteLength+12),o.setUint32(i-4,s.update(n.subarray(8,i-4)).digest(),!1),n}decode(e){const{headers:t,body:r}=function({byteLength:e,byteOffset:t,buffer:r}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const i=new DataView(r,t,e),n=i.getUint32(0,!1);if(e!==n)throw new Error("Reported message length does not match received message length");const o=i.getUint32(4,!1),s=i.getUint32(8,!1),a=i.getUint32(e-4,!1),l=(new CS).update(new Uint8Array(r,t,8));if(s!==l.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${l.digest()})`);if(l.update(new Uint8Array(r,t+8,e-12)),a!==l.digest())throw new Error(`The message checksum (${l.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(r,t+8+4,o),body:new Uint8Array(r,t+8+4+o,n-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Vz{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Jz{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Yz{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Qz{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Zz(e,t){return async function(r){const{value:i}=r.headers[":message-type"];if("error"===i){const e=new Error(r.headers[":error-message"].value||"UnknownError");throw e.name=r.headers[":error-code"].value,e}if("exception"===i){const i=r.headers[":exception-type"].value,n={[i]:r},o=await e(n);if(o.$unknown){const e=new Error(t(r.body));throw e.name=i,e}throw o[i]}if("event"===i){const t={[r.headers[":event-type"].value]:r},i=await e(t);if(i.$unknown)return;return i}throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class Xz{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Kz(e,t),this.utfEncoder=e}deserialize(e,t){const r=function(e){let t=0,r=0,i=null,n=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,r=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==r)throw new Error("Truncated event message received.");return void(yield i)}const l=e.length;let d=0;for(;d<l;){if(!i){const t=l-d;n||(n=new Uint8Array(4));const i=Math.min(4-r,t);if(n.set(e.slice(d,d+i),r),r+=i,d+=i,r<4)break;o(new DataView(n.buffer).getUint32(0,!1)),n=null}const s=Math.min(t-r,l-d);i.set(e.slice(d,d+s),r),r+=s,d+=s,t&&t===r&&(yield i,i=null,t=0,r=0)}}}}}(e);return new Yz({messageStream:new Vz({inputStream:r,decoder:this.eventStreamCodec}),deserializer:Zz(t,this.utfEncoder)})}serialize(e,t){return new Jz({messageStream:new Qz({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class eN{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Xz({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const r=tN(e)?(i=e,{[Symbol.asyncIterator]:async function*(){const e=i.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}}):e;var i;return this.universalMarshaller.deserialize(r,t)}serialize(e,t){const r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:r,value:i}=await t.next();if(r)return e.close();e.enqueue(i)}})})(r):r}}const tN=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,rN=e=>new eN(e);const iN=async function(e,t){const r=new e;return await function(e,t,r=1048576){return new Promise(((i,n)=>{const o=new FileReader;o.addEventListener("error",n),o.addEventListener("abort",n);const s=e.size;let a=0;function l(){a>=s?i():o.readAsArrayBuffer(e.slice(a,Math.min(s,a+r)))}o.addEventListener("load",(e=>{const r=e.target.result;t(new Uint8Array(r)),a+=r.byteLength,l()})),l()}))}(t,(e=>{r.update(e)})),r.digest()},nN=64,oN=[1732584193,4023233417,2562383102,271733878];class sN{constructor(){this.reset()}update(e){if(function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const t=function(e){if("string"==typeof e)return RS(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}(e);let r=0,{byteLength:i}=t;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),i--,this.bufferLength===nN&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:e,bufferLength:t,bytesHashed:r}=this,i=8*r;if(e.setUint8(this.bufferLength++,128),t%nN>=56){for(let t=this.bufferLength;t<nN;t++)e.setUint8(t,0);this.hashBuffer(),this.bufferLength=0}for(let t=this.bufferLength;t<56;t++)e.setUint8(t,0);e.setUint32(56,i>>>0,!0),e.setUint32(60,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}const e=new DataView(new ArrayBuffer(16));for(let t=0;t<4;t++)e.setUint32(4*t,this.state[t],!0);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}hashBuffer(){const{buffer:e,state:t}=this;let r=t[0],i=t[1],n=t[2],o=t[3];r=lN(r,i,n,o,e.getUint32(0,!0),7,3614090360),o=lN(o,r,i,n,e.getUint32(4,!0),12,3905402710),n=lN(n,o,r,i,e.getUint32(8,!0),17,606105819),i=lN(i,n,o,r,e.getUint32(12,!0),22,3250441966),r=lN(r,i,n,o,e.getUint32(16,!0),7,4118548399),o=lN(o,r,i,n,e.getUint32(20,!0),12,1200080426),n=lN(n,o,r,i,e.getUint32(24,!0),17,2821735955),i=lN(i,n,o,r,e.getUint32(28,!0),22,4249261313),r=lN(r,i,n,o,e.getUint32(32,!0),7,1770035416),o=lN(o,r,i,n,e.getUint32(36,!0),12,2336552879),n=lN(n,o,r,i,e.getUint32(40,!0),17,4294925233),i=lN(i,n,o,r,e.getUint32(44,!0),22,2304563134),r=lN(r,i,n,o,e.getUint32(48,!0),7,1804603682),o=lN(o,r,i,n,e.getUint32(52,!0),12,4254626195),n=lN(n,o,r,i,e.getUint32(56,!0),17,2792965006),i=lN(i,n,o,r,e.getUint32(60,!0),22,1236535329),r=dN(r,i,n,o,e.getUint32(4,!0),5,4129170786),o=dN(o,r,i,n,e.getUint32(24,!0),9,3225465664),n=dN(n,o,r,i,e.getUint32(44,!0),14,643717713),i=dN(i,n,o,r,e.getUint32(0,!0),20,3921069994),r=dN(r,i,n,o,e.getUint32(20,!0),5,3593408605),o=dN(o,r,i,n,e.getUint32(40,!0),9,38016083),n=dN(n,o,r,i,e.getUint32(60,!0),14,3634488961),i=dN(i,n,o,r,e.getUint32(16,!0),20,3889429448),r=dN(r,i,n,o,e.getUint32(36,!0),5,568446438),o=dN(o,r,i,n,e.getUint32(56,!0),9,3275163606),n=dN(n,o,r,i,e.getUint32(12,!0),14,4107603335),i=dN(i,n,o,r,e.getUint32(32,!0),20,1163531501),r=dN(r,i,n,o,e.getUint32(52,!0),5,2850285829),o=dN(o,r,i,n,e.getUint32(8,!0),9,4243563512),n=dN(n,o,r,i,e.getUint32(28,!0),14,1735328473),i=dN(i,n,o,r,e.getUint32(48,!0),20,2368359562),r=cN(r,i,n,o,e.getUint32(20,!0),4,4294588738),o=cN(o,r,i,n,e.getUint32(32,!0),11,2272392833),n=cN(n,o,r,i,e.getUint32(44,!0),16,1839030562),i=cN(i,n,o,r,e.getUint32(56,!0),23,4259657740),r=cN(r,i,n,o,e.getUint32(4,!0),4,2763975236),o=cN(o,r,i,n,e.getUint32(16,!0),11,1272893353),n=cN(n,o,r,i,e.getUint32(28,!0),16,4139469664),i=cN(i,n,o,r,e.getUint32(40,!0),23,3200236656),r=cN(r,i,n,o,e.getUint32(52,!0),4,681279174),o=cN(o,r,i,n,e.getUint32(0,!0),11,3936430074),n=cN(n,o,r,i,e.getUint32(12,!0),16,3572445317),i=cN(i,n,o,r,e.getUint32(24,!0),23,76029189),r=cN(r,i,n,o,e.getUint32(36,!0),4,3654602809),o=cN(o,r,i,n,e.getUint32(48,!0),11,3873151461),n=cN(n,o,r,i,e.getUint32(60,!0),16,530742520),i=cN(i,n,o,r,e.getUint32(8,!0),23,3299628645),r=uN(r,i,n,o,e.getUint32(0,!0),6,4096336452),o=uN(o,r,i,n,e.getUint32(28,!0),10,1126891415),n=uN(n,o,r,i,e.getUint32(56,!0),15,2878612391),i=uN(i,n,o,r,e.getUint32(20,!0),21,4237533241),r=uN(r,i,n,o,e.getUint32(48,!0),6,1700485571),o=uN(o,r,i,n,e.getUint32(12,!0),10,2399980690),n=uN(n,o,r,i,e.getUint32(40,!0),15,4293915773),i=uN(i,n,o,r,e.getUint32(4,!0),21,2240044497),r=uN(r,i,n,o,e.getUint32(32,!0),6,1873313359),o=uN(o,r,i,n,e.getUint32(60,!0),10,4264355552),n=uN(n,o,r,i,e.getUint32(24,!0),15,2734768916),i=uN(i,n,o,r,e.getUint32(52,!0),21,1309151649),r=uN(r,i,n,o,e.getUint32(16,!0),6,4149444226),o=uN(o,r,i,n,e.getUint32(44,!0),10,3174756917),n=uN(n,o,r,i,e.getUint32(8,!0),15,718787259),i=uN(i,n,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=i+t[1]&4294967295,t[2]=n+t[2]&4294967295,t[3]=o+t[3]&4294967295}reset(){this.state=Uint32Array.from(oN),this.buffer=new DataView(new ArrayBuffer(nN)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function aN(e,t,r,i,n,o){return((t=(t+e&4294967295)+(i+o&4294967295)&4294967295)<<n|t>>>32-n)+r&4294967295}function lN(e,t,r,i,n,o,s){return aN(t&r|~t&i,e,t,n,o,s)}function dN(e,t,r,i,n,o,s){return aN(t&i|r&~i,e,t,n,o,s)}function cN(e,t,r,i,n,o,s){return aN(t^r^i,e,t,n,o,s)}function uN(e,t,r,i,n,o,s){return aN(r^(t|~i),e,t,n,o,s)}const pN="function"==typeof TextEncoder?new TextEncoder:null,hN=e=>{if("string"==typeof e){if(pN)return pN.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const i=e.charCodeAt(r);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&r--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},fN=e=>new Date(Date.now()+e),mN=e=>nS.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,gN=(e,t)=>{const r=Date.parse(e);return((e,t)=>Math.abs(fN(t).getTime()-e)>=3e5)(r,t)?r-Date.now():t},yN=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},vN=async e=>{const t=yN("context",e.context),r=yN("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],n=yN("signer",r.signer),o=await n(i),s=e?.signingRegion,a=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:s,signingRegionSet:a,signingName:l}};class bN{async sign(e,t,r){if(!iS.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await vN(r),{config:n,signer:o}=i;let{signingRegion:s,signingName:a}=i;const l=r.context;if(l?.authSchemes?.length){const[e,t]=l.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:fN(n.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const r=t.ServerTime??mN(t.$response);if(r){const i=yN("config",e.config),n=i.systemClockOffset;i.systemClockOffset=gN(r,i.systemClockOffset);i.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=mN(e);if(r){const e=yN("config",t.config);e.systemClockOffset=gN(r,e.systemClockOffset)}}}class wN extends bN{async sign(e,t,r){if(!iS.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:n,signingRegion:o,signingRegionSet:s,signingName:a}=await vN(r),l=(await(i.sigv4aSigningRegionSet?.())??s??[o]).join(",");return await n.sign(e,{signingDate:fN(i.systemClockOffset),signingRegion:l,signingService:a})}}const _N=["in-region","cross-region","mobile","standard","legacy"],xN=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?Fz().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},SN=e=>{const t=(({defaultsMode:e}={})=>((e,t,r)=>{let i,n,o,s=!1;const a=async()=>{n||(n=e());try{i=await n,o=!0,s=!1}finally{n=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await a()),i):async e=>(o&&!e?.forceRefresh||(i=await a()),s?i:r&&!r(i)?(s=!0,i):t(i)?(await a(),i):i)})((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(xN()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${_N.join(", ")}, got ${t}`)}})))(e),r=()=>t().then(_E),i=(e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??lk,base64Encoder:e?.base64Encoder??dk,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??tM,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??pk,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??sM,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new bN},{schemeId:"aws.auth#sigv4a",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4a"),signer:new wN}],logger:e?.logger??new ME,sdkStreamMixin:e?.sdkStreamMixin??Tk,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??LC,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??HT,useArnRegion:e?.useArnRegion??!1,utf8Decoder:e?.utf8Decoder??RS,utf8Encoder:e?.utf8Encoder??ck}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??hN,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Mz({serviceId:i.serviceId,clientVersion:sz}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??rN,maxAttempts:e?.maxAttempts??3,md5:e?.md5??sN,region:e?.region??(n="Region is missing",()=>Promise.reject(n)),requestHandler:vk.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||rB),sha1:e?.sha1??vz,sha256:e?.sha256??Iz,streamCollector:e?.streamCollector??bk,streamHasher:e?.streamHasher??iN,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var n},kN=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},EN=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex((t=>t.schemeId===e.schemeId));-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){i=e},credentials:()=>i}},TN=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class BN extends ok{constructor(...[e]){const t=SN(e||{});var r;const i=function(e){const t=NB(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const r=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(r)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof r?t?.warn("userAgentAppId must be a string or undefined."):r.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}}}((r=t,{...r,useFipsEndpoint:r.useFipsEndpoint??!1,useDualstackEndpoint:r.useDualstackEndpoint??!1,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}));var n;const o=(e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}))((e=>{const t=e.tls??!0,{endpoint:r}=e,i=null!=r?async()=>$T(await WS(r)()):void 0,n=!!r,o={...e,endpoint:i,tls:t,isCustomEndpoint:n,useDualstackEndpoint:WS(e.useDualstackEndpoint??!1),useFipsEndpoint:WS(e.useFipsEndpoint??!1)};let s;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!s&&(s=jT(e.serviceId)),s),o})((e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return PC(t);const e=await t();return PC(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!RC(e)||("function"!=typeof r?Promise.resolve(!!r):r())}}})((e=>{const{retryStrategy:t}=e,r=WS(e.maxAttempts??3);return{...e,maxAttempts:r,retryStrategy:async()=>t||(await WS(e.retryMode)()===tB.ADAPTIVE?new gB(r):new mB(r))}})((n=i,{...n,requestChecksumCalculation:WS(n.requestChecksumCalculation??lS),responseChecksumValidation:WS(n.responseChecksumValidation??dS)}))))),s=((e,{session:t})=>{const[r,i]=t;return{...e,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,followRegionRedirects:e.followRegionRedirects??!1,s3ExpressIdentityProvider:e.s3ExpressIdentityProvider??new JE((async e=>r().send(new i({Bucket:e,SessionMode:"ReadWrite"})))),bucketEndpoint:e.bucketEndpoint??!1}})(aM(o),{session:[()=>this,oz]}),a=((e,t)=>{const r={...kN(e),...BE(e),...Vx(e),...EN(e)};return t.forEach((e=>e.configure(r))),{...e,...(o=r,{region:o.region()}),...(n=r,{...kE(n),...TE(n)}),...(i=r,{httpHandler:i.httpHandler()}),...TN(r)};var i,n,o})(s,e?.extensions||[]);var l;super(a),this.config=a,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(FC(l),DC)}})),this.middlewareStack.use(AB(this.config)),this.middlewareStack.use(NC(this.config)),this.middlewareStack.use(VS(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async r=>{try{const i=await e(r),{clientName:n,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:d}=a,c=l??t.inputFilterSensitiveLog,u=d??t.outputFilterSensitiveLog,{$metadata:p,...h}=i.output;return s?.info?.({clientName:n,commandName:o,input:c(r.input),output:u(h),metadata:p}),i}catch(e){const{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,l=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:n,input:l(r.input),error:e,metadata:e.$metadata}),e}}),JS)}})),this.middlewareStack.use(XS(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i=>{i.addRelativeTo(PT(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),ZT)}}))(this.config,{httpAuthSchemeParametersProvider:rM,identityProviderConfigProvider:async e=>new RB({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(DB(this.config)),this.middlewareStack.use(QB(this.config)),this.middlewareStack.use(sS(this.config)),this.middlewareStack.use($E(this.config)),this.middlewareStack.use(RT(this.config)),this.middlewareStack.use((e=>({applyToStack:t=>{t.addRelativeTo(HB(e),MB)}}))(this.config))}destroy(){super.destroy()}}class CN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r)]})).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(JM).de(sD).build()){}const IN={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},AN=e=>({applyToStack:t=>{var r;t.add((r=e,e=>async t=>{const i={...t.input},n=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const e of n){const t=i[e.target];if(t){let n;"string"==typeof t?FN(t,r)?n=r.base64Decoder(t):(n=r.utf8Decoder(t),i[e.target]=r.base64Encoder(n)):(n=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t),i[e.target]=r.base64Encoder(n));const o=new r.md5;o.update(n),i[e.hash]=r.base64Encoder(await o.digest())}}return e({...t,input:i})}),IN)}});function FN(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return 32===t.base64Decoder(e).length}catch{return!1}}class MN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r),AN(r),WE()]})).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").f(AM,IM).ser(VM).de(oD).build()){}class DN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),$S(r,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),LE(),VB(r),AN(r)]})).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(qM,NM).ser(YM).de(aD).build()){}class RN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),$S(r,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),AN(r),WE()]})).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(CM,BM).ser(KM).de(nD).build()){}class PN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r)]})).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").f(void 0,void 0).ser(WM).de(iD).build()){}class ON extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r),AN(r)]})).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").f(SM,xM).ser($M).de(tD).build()){}class zN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r)]})).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").f(void 0,void 0).ser(jM).de(XM).build()){}class NN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),$S(r,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),VB(r),AN(r)]})).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").f(LM,UM).ser(ZM).de(dD).build()){}class qN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),VB(r),AN(r)]})).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").f(_M,wM).ser(HM).de(eD).build()){}class UN extends(Ik.classBuilder().ep({...lM,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,r,i){return[JT(r,this.serialize,this.deserialize),QT(r,e.getEndpointParameterInstructions()),$S(r,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0}),VB(r)]})).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").f(void 0,void 0).ser(QM).de(lD).build()){}class LN{constructor(){this.onabort=null,this._aborted=!1,Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class jN{constructor(){this.signal=new LN}abort(){this.signal.abort()}}var HN=__webpack_require__(66339);const $N={lstatSync:()=>{},runtime:"browser"},GN=e=>{if(null==e)return 0;if("string"==typeof e)return HN.hp.byteLength(e);if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"==typeof e.path)try{return $N.lstatSync(e.path).size}catch(e){return}};async function*WN(e,t,r){let i=1;const n={chunks:[],length:0};for await(const o of r(e))for(n.chunks.push(o),n.length+=o.byteLength;n.length>t;){const e=n.chunks.length>1?HN.hp.concat(n.chunks):n.chunks[0];yield{partNumber:i,data:e.subarray(0,t)},n.chunks=[e.subarray(t)],n.length=n.chunks[0].byteLength,i+=1}yield{partNumber:i,data:1!==n.chunks.length?HN.hp.concat(n.chunks):n.chunks[0],lastPart:!0}}async function*KN(e,t){let r=1,i=0,n=t;for(;n<e.byteLength;)yield{partNumber:r,data:e.subarray(i,n)},r+=1,i=n,n=i+t;yield{partNumber:r,data:e.subarray(i),lastPart:!0}}async function*VN(e){for await(const t of e)HN.hp.isBuffer(t)||t instanceof Uint8Array?yield t:yield HN.hp.from(t)}async function*JN(e){const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)return;HN.hp.isBuffer(r)||r instanceof Uint8Array?yield r:yield HN.hp.from(r)}}catch(e){throw e}finally{t.releaseLock()}}const YN=5242880;class QN extends hp.EventEmitter{constructor(e){super(),this.MAX_PARTS=1e4,this.queueSize=4,this.partSize=YN,this.leavePartsOnError=!1,this.tags=[],this.concurrentUploaders=[],this.abortMultipartUploadCommand=null,this.uploadedParts=[],this.uploadEnqueuedPartsCount=0,this.isMultiPart=!0,this.sent=!1,this.queueSize=e.queueSize||this.queueSize,this.partSize=e.partSize||this.partSize,this.leavePartsOnError=e.leavePartsOnError||this.leavePartsOnError,this.tags=e.tags||this.tags,this.client=e.client,this.params=e.params,this.__validateInput(),this.totalBytes=GN(this.params.Body),this.bytesUploadedSoFar=0,this.abortController=e.abortController??new jN}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(e,t){return this.uploadEvent=e,super.on(e,t)}async __uploadUsingPut(e){this.isMultiPart=!1;const t={...this.params,Body:e.data},r=this.client.config,i=r.requestHandler,n=i instanceof hp.EventEmitter?i:null,o=t=>{this.bytesUploadedSoFar=t.loaded,this.totalBytes=t.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:e.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};null!==n&&n.on("xhr.upload.progress",o);const s=await Promise.all([this.client.send(new DN(t)),r?.endpoint?.()]),a=s[0];let l=s[1];if(l||(l=$T(await GT(t,DN,{...r}))),!l)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');null!==n&&n.off("xhr.upload.progress",o);const d=this.params.Key.split("/").map((e=>xE(e))).join("/"),c=xE(this.params.Bucket),u=(()=>{const e=l.hostname.startsWith(`${c}.`),t=this.client.config.forcePathStyle,r=l.port?`:${l.port}`:"";return t?`${l.protocol}//${l.hostname}${r}/${c}/${d}`:e?`${l.protocol}//${l.hostname}${r}/${d}`:`${l.protocol}//${c}.${l.hostname}${r}/${d}`})();this.singleUploadResult={...a,Bucket:this.params.Bucket,Key:this.params.Key,Location:u};const p=GN(e.data);this.__notifyProgress({loaded:p,total:p,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){if(!this.createMultiPartPromise){const e={...this.params,Body:void 0};this.createMultiPartPromise=this.client.send(new ON(e)).then((e=>(this.abortMultipartUploadCommand=new zN({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e.UploadId}),e)))}return this.createMultiPartPromise}async __doConcurrentUpload(e){for await(const t of e){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(1===t.partNumber&&t.lastPart)return await this.__uploadUsingPut(t);if(!this.uploadId){const{UploadId:e}=await this.__createMultipartUpload();if(this.uploadId=e,this.abortController.signal.aborted)return}const e=GN(t.data)||0,r=this.client.config.requestHandler,i=r instanceof hp.EventEmitter?r:null;let n=0;const o=(r,i)=>{(Number(i.query.partNumber)||-1)===t.partNumber&&(r.total&&e&&(this.bytesUploadedSoFar+=r.loaded-n,n=r.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};null!==i&&i.on("xhr.upload.progress",o),this.uploadEnqueuedPartsCount+=1;const s=await this.client.send(new NN({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:t.data,PartNumber:t.partNumber}));if(null!==i&&i.off("xhr.upload.progress",o),this.abortController.signal.aborted)return;if(!s.ETag)throw new Error(`Part ${t.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:t.partNumber,ETag:s.ETag,...s.ChecksumCRC32&&{ChecksumCRC32:s.ChecksumCRC32},...s.ChecksumCRC32C&&{ChecksumCRC32C:s.ChecksumCRC32C},...s.ChecksumSHA1&&{ChecksumSHA1:s.ChecksumSHA1},...s.ChecksumSHA256&&{ChecksumSHA256:s.ChecksumSHA256}}),null===i&&(this.bytesUploadedSoFar+=e),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const e=((e,t)=>{if(e instanceof Uint8Array)return KN(e,t);if(e instanceof Kx.Readable)return WN(e,t,VN);if(e instanceof String||"string"==typeof e)return KN(HN.hp.from(e),t);if("function"==typeof e.stream)return WN(e.stream(),t,JN);if(e instanceof ReadableStream)return WN(e,t,JN);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")})(this.params.Body,this.partSize),t=[];for(let r=0;r<this.queueSize;r++){const r=this.__doConcurrentUpload(e).catch((e=>{t.push(e)}));this.concurrentUploaders.push(r)}if(await Promise.all(this.concurrentUploaders),t.length>=1)throw await this.markUploadAsAborted(),t[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let r;if(this.isMultiPart){this.uploadedParts.sort(((e,t)=>e.PartNumber-t.PartNumber));const e={...this.params,Body:void 0,UploadId:this.uploadId,MultipartUpload:{Parts:this.uploadedParts}};r=await this.client.send(new qN(e)),"string"==typeof r?.Location&&r.Location.includes("%2F")&&(r.Location=r.Location.replace(/%2F/g,"/"))}else r=this.singleUploadResult;return this.abortMultipartUploadCommand=null,this.tags.length&&await this.client.send(new UN({...this.params,Tagging:{TagSet:this.tags}})),r}async markUploadAsAborted(){this.uploadId&&!this.leavePartsOnError&&null!==this.abortMultipartUploadCommand&&(await this.client.send(this.abortMultipartUploadCommand),this.abortMultipartUploadCommand=null)}__notifyProgress(e){this.uploadEvent&&this.emit(this.uploadEvent,e)}async __abortTimeout(e){return new Promise(((t,r)=>{e.onabort=()=>{const e=new Error("Upload aborted.");e.name="AbortError",r(e)}}))}__validateInput(){if(!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");if(!this.client)throw new Error("InputError: Upload requires a AWS client to do uploads with.");if(this.partSize<YN)throw new Error(`EntityTooSmall: Your proposed upload partsize [${this.partSize}] is smaller than the minimum allowed size [5242880] (5MB)`);if(this.queueSize<1)throw new Error("Queue size: Must have at least one uploading queue.")}}class ZN extends vk{constructor(e,t){super(e),this.requestTimeoutInMs=void 0===e?void 0:e.requestTimeout,this.reverseProxyNoSignUrl=t}handle(e){return r(this,arguments,void 0,(function*(e,{abortSignal:t}={}){if(null==t?void 0:t.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let r=e.path;if(e.query){const t=mk(e.query);t&&(r+=`?${t}`)}const{port:i,method:n}=e;let o=`${e.protocol}//${e.hostname}${i?`:${i}`:""}${r}`;if(void 0!==this.reverseProxyNoSignUrl&&""!==this.reverseProxyNoSignUrl){const e=new URL(o);e.host=this.reverseProxyNoSignUrl,o=e.href}const s="GET"===n||"HEAD"===n?void 0:e.body,a={};for(const t of Object.keys(e.headers)){const r=t.toLowerCase();"host"!==r&&"content-length"!==r&&(a[r]=e.headers[t])}let l;void 0!==a["content-type"]&&(l=a["content-type"]);let d=s;ArrayBuffer.isView(s)&&(d=qp(s));const c={body:d,headers:a,method:n,url:o,contentType:l},u=[(0,k.requestUrl)(c).then((e=>{const t=e.headers,r={};for(const e of Object.keys(t))r[e.toLowerCase()]=t[e];const i=new ReadableStream({start(t){t.enqueue(new Uint8Array(e.arrayBuffer)),t.close()}});return{response:new nS({headers:r,statusCode:e.status,body:i})}})),gk(this.requestTimeoutInMs)];return t&&u.push(new Promise(((e,r)=>{t.onabort=()=>{const e=new Error("Request aborted");e.name="AbortError",r(e)}}))),Promise.race(u)}))}}const XN=e=>{if(void 0===e)return"";let t=he.posix.normalize(e.trim());return void 0===t||""===t||"/"===t||"."===t?"":(t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")||(t=`${t}/`),t)},eq=(e,t)=>{if(e!==`${t}`&&!e.startsWith(`${t}`))throw Error(`"${e}" doesn't starts with "${t}"`);return e.slice(`${t}`.length)},tq=(e,t)=>{if(void 0===t||""===t)return e;let r=e;return"/"!==e&&""!==e||(r=t),e.startsWith("/")||(r=`${t}${e}`),r},rq=(e,t,r,i)=>{if(void 0===e.LastModified)throw Error(`s3 object ${e.Key} doesn't have LastModified value: ${JSON.stringify(e)}`);const n=1e3*Math.floor(e.LastModified.valueOf()/1e3);let o=n;if(e.Key in r){const t=r[e.Key];0!==t&&(o=t>=1e12?t:1e3*t)}const s=eq(e.Key,t);return{key:s,keyRaw:s,mtimeSvr:n,mtimeCli:o,sizeRaw:e.Size,size:e.Size,etag:e.ETag,synthesizedFolder:!1}};class iq extends Mp{constructor(e){super(),this.s3Config=e,this.s3Client=(e=>{let t,r=e.s3Endpoint;return r.startsWith("http://")||r.startsWith("https://")||(r=`https://${r}`),t=t_&&e.bypassCorsLocally?new BN({region:e.s3Region,endpoint:r,forcePathStyle:e.forcePathStyle,credentials:{accessKeyId:e.s3AccessKeyID,secretAccessKey:e.s3SecretAccessKey},requestHandler:new ZN(void 0,e.reverseProxyNoSignUrl)}):new BN({region:e.s3Region,endpoint:r,forcePathStyle:e.forcePathStyle,credentials:{accessKeyId:e.s3AccessKeyID,secretAccessKey:e.s3SecretAccessKey}}),t.middlewareStack.add(((e,t)=>t=>(t.request.headers["cache-control"]="no-cache",e(t))),{step:"build"}),t})(e),this.kind="s3",this.synthFoldersCache={}}walk(){return r(this,void 0,void 0,(function*(){const e=(yield this._walkFromRoot(this.s3Config.remotePrefix,!1)).filter((e=>""!==e.key&&"/"!==e.key));return e}))}walkPartial(){return r(this,void 0,void 0,(function*(){const e=(yield this._walkFromRoot(this.s3Config.remotePrefix,!0)).filter((e=>""!==e.key&&"/"!==e.key));return e}))}_walkFromRoot(e,t){return r(this,void 0,void 0,(function*(){var i,n;const o={Bucket:this.s3Config.s3BucketName};void 0!==e&&""!==e&&(o.Prefix=e),t&&(o.MaxKeys=10);const s=[],a={},l={},d=t?1:this.s3Config.partsConcurrency,c=new vh({concurrency:d,autoStart:!0});c.on("error",(e=>{throw c.pause(),c.clear(),e}));let u=!0;do{const e=yield this.s3Client.send(new CN(o));if(200!==e.$metadata.httpStatusCode)throw Error("some thing bad while listing remote!");if(void 0===e.Contents)break;if(s.push(...e.Contents),this.s3Config.useAccurateMTime)for(const t of e.Contents)c.add((()=>r(this,void 0,void 0,(function*(){const e=yield this.s3Client.send(new MN({Bucket:this.s3Config.s3BucketName,Key:t.Key}));if(200!==e.$metadata.httpStatusCode)throw Error("some thing bad while heading single object!");void 0===e.Metadata||(a[t.Key]=Math.floor(Number.parseFloat(e.Metadata.mtime||e.Metadata.MTime||"0")),l[t.Key]=Math.floor(Number.parseFloat(e.Metadata.ctime||e.Metadata.CTime||"0")))}))));if(t)u=!1;else if(u=null!==(i=e.IsTruncated)&&void 0!==i&&i,o.ContinuationToken=e.NextContinuationToken,u&&(void 0===o.ContinuationToken||""===o.ContinuationToken))throw Error("isTruncated is true but no continuationToken provided")}while(u);yield c.onIdle();const p=[],h=new Set;for(const e of s){const t=rq(e,null!==(n=this.s3Config.remotePrefix)&&void 0!==n?n:"",a);h.add(t.key),p.push(t);for(const e of zp(t.key,!0))h.has(e)?delete this.synthFoldersCache[e]:(!this.synthFoldersCache.hasOwnProperty(e)||t.mtimeSvr>=this.synthFoldersCache[e].mtimeSvr)&&(this.synthFoldersCache[e]={key:e,keyRaw:e,size:0,sizeRaw:0,sizeEnc:0,mtimeSvr:t.mtimeSvr,mtimeSvrFmt:t.mtimeSvrFmt,mtimeCli:t.mtimeCli,mtimeCliFmt:t.mtimeCliFmt,synthesizedFolder:!0})}for(const e of Object.keys(this.synthFoldersCache))p.push(this.synthFoldersCache[e]);return p}))}stat(e){return r(this,void 0,void 0,(function*(){var t;if(this.synthFoldersCache.hasOwnProperty(e))return this.synthFoldersCache[e];let r=e;return r=tq(r,null!==(t=this.s3Config.remotePrefix)&&void 0!==t?t:""),yield this._statFromRoot(r)}))}_statFromRoot(e){return r(this,void 0,void 0,(function*(){var t,r;if(void 0!==this.s3Config.remotePrefix&&""!==this.s3Config.remotePrefix&&!e.startsWith(this.s3Config.remotePrefix))throw Error("_statFromRoot should only accept prefix-ed path");const i=yield this.s3Client.send(new MN({Bucket:this.s3Config.s3BucketName,Key:e}));return((e,t,r,i)=>{if(void 0===t.LastModified)throw Error(`s3 object ${e} doesn't have LastModified value: ${JSON.stringify(t)}`);const n=1e3*Math.floor(t.LastModified.valueOf()/1e3);let o=n;if(i&&void 0!==t.Metadata){const e=Math.floor(Number.parseFloat(t.Metadata.mtime||t.Metadata.MTime||"0"));0!==e&&(o=e>=1e12?e:1e3*e)}const s=eq(e,r);return{key:s,keyRaw:s,mtimeSvr:n,mtimeCli:o,sizeRaw:t.ContentLength,size:t.ContentLength,etag:t.ETag,synthesizedFolder:!1}})(e,i,null!==(t=this.s3Config.remotePrefix)&&void 0!==t?t:"",null!==(r=this.s3Config.useAccurateMTime)&&void 0!==r&&r)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){var r,n;if(!e.endsWith("/"))throw new Error(`You should not call mkdir on ${e}!`);if(!(null!==(r=this.s3Config.generateFolderObject)&&void 0!==r&&r)){const r={key:e,keyRaw:e,size:0,sizeRaw:0,sizeEnc:0,mtimeSvr:t,mtimeCli:t,synthesizedFolder:!0};return this.synthFoldersCache[e]=r,r}const o=tq(e,null!==(n=this.s3Config.remotePrefix)&&void 0!==n?n:"");return yield this._mkdirFromRoot(o,t,i)}))}_mkdirFromRoot(e,t,i){return r(this,void 0,void 0,(function*(){if(void 0!==this.s3Config.remotePrefix&&""!==this.s3Config.remotePrefix&&!e.startsWith(this.s3Config.remotePrefix))throw Error("_mkdirFromRoot should only accept prefix-ed path");const r=I,n={Bucket:this.s3Config.s3BucketName,Key:e,Body:"",ContentType:r,ContentLength:0},o={};return void 0!==t&&0!==t&&(o.MTime=""+t/1e3),void 0!==i&&0!==i&&(o.CTime=""+i/1e3),Object.keys(o).length>0&&(n.Metadata=o),yield this.s3Client.send(new DN(n)),yield this._statFromRoot(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){var r;const o=tq(e,null!==(r=this.s3Config.remotePrefix)&&void 0!==r?r:"");return yield this._writeFileFromRoot(o,t,i,n)}))}_writeFileFromRoot(e,t,i,n){return r(this,void 0,void 0,(function*(){if(void 0!==this.s3Config.remotePrefix&&""!==this.s3Config.remotePrefix&&!e.startsWith(this.s3Config.remotePrefix))throw Error("_writeFileFromRoot should only accept prefix-ed path");const r=new Uint8Array(t);let o=I;o=dh.contentType(dh.lookup(e)||I)||I;const s=new QN({client:this.s3Client,queueSize:this.s3Config.partsConcurrency,partSize:5242880,leavePartsOnError:!1,params:{Bucket:this.s3Config.s3BucketName,Key:e,Body:r,ContentType:o,Metadata:{MTime:""+i/1e3,CTime:""+n/1e3}}});return s.on("httpUploadProgress",(e=>{})),yield s.done(),yield this._statFromRoot(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){var t;if(e.endsWith("/"))throw new Error(`you should not call readFile on folder ${e}`);const r=tq(e,null!==(t=this.s3Config.remotePrefix)&&void 0!==t?t:"");return yield this._readFileFromRoot(r)}))}_readFileFromRoot(e){return r(this,void 0,void 0,(function*(){if(void 0!==this.s3Config.remotePrefix&&""!==this.s3Config.remotePrefix&&!e.startsWith(this.s3Config.remotePrefix))throw Error("_readFileFromRoot should only accept prefix-ed path");const t=yield this.s3Client.send(new RN({Bucket:this.s3Config.s3BucketName,Key:e})),i=yield(e=>r(void 0,void 0,void 0,(function*(){if(void 0===e)throw Error("ObjectBody is undefined and don't know how to deal with it");if(e instanceof Kx.Readable)return yield new Promise(((t,r)=>{const i=[];e.on("data",(e=>i.push(e))),e.on("error",r),e.on("end",(()=>t(qp(Wx.Buffer.concat(i)))))}));if(e instanceof ReadableStream)return yield new Response(e,{}).arrayBuffer();if(e instanceof Blob)return yield e.arrayBuffer();throw TypeError(`The type of ${e} is not one of the supported types`)})))(t.Body);return i}))}rename(e,t){return r(this,void 0,void 0,(function*(){throw Error("rename not implemented for s3")}))}rm(e){return r(this,void 0,void 0,(function*(){var t,r;if("/"!==e)if(e.endsWith("/")){if(this.synthFoldersCache.hasOwnProperty(e))return void delete this.synthFoldersCache[e];try{const r=tq(e,null!==(t=this.s3Config.remotePrefix)&&void 0!==t?t:"");yield this.s3Client.send(new PN({Bucket:this.s3Config.s3BucketName,Key:r}))}catch(e){}}else{const t=tq(e,null!==(r=this.s3Config.remotePrefix)&&void 0!==r?r:"");yield this.s3Client.send(new PN({Bucket:this.s3Config.s3BucketName,Key:t}))}}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{const e={Bucket:this.s3Config.s3BucketName},t=yield this.s3Client.send(new CN(e));if(void 0===t||void 0===t.$metadata||void 0===t.$metadata.httpStatusCode)throw Error("results or $metadata or httStatusCode is undefined");if(200!==t.$metadata.httpStatusCode)throw Error("not 200 httpStatusCode")}catch(t){if(console.debug(t),void 0!==e)if(this.s3Config.s3Endpoint.contains(this.s3Config.s3BucketName)){const r=new h([t,new Error("Maybe you've included the bucket name inside the endpoint setting. Please remove the bucket name and try again.")]);e(r)}else e(t);return!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}var nq=__webpack_require__(19409),oq=__webpack_require__(26794),sq=__webpack_require__(21013),aq=__webpack_require__.n(sq),lq=__webpack_require__(35970),dq=__webpack_require__.n(lq),cq=__webpack_require__(65606),uq={2:e=>{function t(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var o=i(e,t,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+e.length,o[1]),post:n.slice(o[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function i(e,t,r){var i,n,o,s,a,l=r.indexOf(e),d=r.indexOf(t,l+1),c=l;if(l>=0&&d>0){for(i=[],o=r.length;c>=0&&!a;)c==l?(i.push(c),l=r.indexOf(e,c+1)):1==i.length?a=[i.pop(),d]:((n=i.pop())<o&&(o=n,s=d),d=r.indexOf(t,c+1)),c=l<d&&l>=0?l:d;i.length&&(a=[o,s])}return a}e.exports=t,t.range=i},101:function(e,t,r){var i;e=r.nmd(e),function(){var n=(e&&e.exports,"object"==typeof global&&global);n.global!==n&&n.window;var o=function(e){this.message=e};(o.prototype=new Error).name="InvalidCharacterError";var s=function(e){throw new o(e)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,d={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,i,n,o=e.length%3,l="",d=-1,c=e.length-o;++d<c;)t=e.charCodeAt(d)<<16,r=e.charCodeAt(++d)<<8,i=e.charCodeAt(++d),l+=a.charAt((n=t+r+i)>>18&63)+a.charAt(n>>12&63)+a.charAt(n>>6&63)+a.charAt(63&n);return 2==o?(t=e.charCodeAt(d)<<8,r=e.charCodeAt(++d),l+=a.charAt((n=t+r)>>10)+a.charAt(n>>4&63)+a.charAt(n<<2&63)+"="):1==o&&(n=e.charCodeAt(d),l+=a.charAt(n>>2)+a.charAt(n<<4&63)+"=="),l},decode:function(e){var t=(e=String(e).replace(l,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var r,i,n=0,o="",d=-1;++d<t;)i=a.indexOf(e.charAt(d)),r=n%4?64*r+i:i,n++%4&&(o+=String.fromCharCode(255&r>>(-2*n&6)));return o},version:"1.0.0"};void 0===(i=function(){return d}.call(t,r,t,e))||(e.exports=i)}()},172:(e,t)=>{t.d=function(e){if(!e)return 0;for(var t=(e=e.toString()).length,r=e.length;r--;){var i=e.charCodeAt(r);56320<=i&&i<=57343&&r--,127<i&&i<=2047?t++:2047<i&&i<=65535&&(t+=2)}return t}},526:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},298:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,i=0;r<e.length;r++,i+=8)t[i>>>5]|=e[r]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],i=0;i<e.length;i+=3)for(var n=e[i]<<16|e[i+1]<<8|e[i+2],o=0;o<4;o++)8*i+6*o<=8*e.length?r.push(t.charAt(n>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],i=0,n=0;i<e.length;n=++i%4)0!=n&&r.push((t.indexOf(e.charAt(i-1))&Math.pow(2,-2*n+8)-1)<<2*n|t.indexOf(e.charAt(i))>>>6-2*n);return r}},e.exports=r},635:(e,t,r)=>{const i=r(31),n=r(338),o=r(221);e.exports={XMLParser:n,XMLValidator:i,XMLBuilder:o}},705:(e,t)=>{const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const i=Object.keys(t),n=i.length;for(let o=0;o<n;o++)e[i[o]]="strict"===r?[t[i[o]]]:t[i[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return!(null==n.exec(e))},t.getAllMatches=function(e,t){const r=[];let i=t.exec(e);for(;i;){const n=[];n.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e<o;e++)n.push(i[e]);r.push(n),i=t.exec(e)}return r},t.nameRegexp=i},31:(e,t,r)=>{const i=r(705),n={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function s(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(r,t-r);if(t>5&&"xml"===i)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},n,t);const r=[];let l=!1,d=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let n=0;n<e.length;n++)if("<"===e[n]&&"?"===e[n+1]){if(n+=2,n=s(e,n),n.err)return n}else{if("<"!==e[n]){if(o(e[n]))continue;return f("InvalidChar","char '"+e[n]+"' is not expected.",g(e,n))}{let m=n;if(n++,"!"===e[n]){n=a(e,n);continue}{let y=!1;"/"===e[n]&&(y=!0,n++);let v="";for(;n<e.length&&">"!==e[n]&&" "!==e[n]&&"\t"!==e[n]&&"\n"!==e[n]&&"\r"!==e[n];n++)v+=e[n];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),n--),u=v,!i.isName(u)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",f("InvalidTag",t,g(e,n))}const b=c(e,n);if(!1===b)return f("InvalidAttr","Attributes for '"+v+"' have open quote.",g(e,n));let w=b.value;if(n=b.index,"/"===w[w.length-1]){const r=n-w.length;w=w.substring(0,w.length-1);const i=p(w,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,r+i.err.line));l=!0}else if(y){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",g(e,n));if(w.trim().length>0)return f("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",g(e,m));if(0===r.length)return f("InvalidTag","Closing tag '"+v+"' has not been opened.",g(e,m));{const t=r.pop();if(v!==t.tagName){let r=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+v+"'.",g(e,m))}0==r.length&&(d=!0)}}else{const i=p(w,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,n-w.length+i.err.line));if(!0===d)return f("InvalidXml","Multiple possible root nodes found.",g(e,n));-1!==t.unpairedTags.indexOf(v)||r.push({tagName:v,tagStartPos:m}),l=!0}for(n++;n<e.length;n++)if("<"===e[n]){if("!"===e[n+1]){n++,n=a(e,n);continue}if("?"!==e[n+1])break;if(n=s(e,++n),n.err)return n}else if("&"===e[n]){const t=h(e,n);if(-1==t)return f("InvalidChar","char '&' is not expected.",g(e,n));n=t}else if(!0===d&&!o(e[n]))return f("InvalidXml","Extra text at the end",g(e,n));"<"===e[n]&&n--}}}var u;return l?1==r.length?f("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(e,r[0].tagStartPos)):!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const l='"',d="'";function c(e,t){let r="",i="",n=!1;for(;t<e.length;t++){if(e[t]===l||e[t]===d)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){n=!0;break}r+=e[t]}return""===i&&{value:r,index:t,tagClosed:n}}const u=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=i.getAllMatches(e,u),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return f("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",y(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return f("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",y(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",y(r[e]));const i=r[e][2];if(!m(i))return f("InvalidAttr","Attribute '"+i+"' is an invalid name.",y(r[e]));if(n.hasOwnProperty(i))return f("InvalidAttr","Attribute '"+i+"' is repeated.",y(r[e]));n[i]=1}return!0}function h(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function m(e){return i.isName(e)}function g(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function y(e){return e.startIndex+e[1].length}},221:(e,t,r)=>{const i=r(87),n={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function o(e){this.options=Object.assign({},n,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=s,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,r){const i=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}o.prototype.build=function(e){return this.options.preserveOrder?i(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},o.prototype.j2x=function(e,t){let r="",i="";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n])this.isAttribute(n)&&(i+="");else if(null===e[n])this.isAttribute(n)?i+="":"?"===n[0]?i+=this.indentate(t)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+n+"/"+this.tagEndChar;else if(e[n]instanceof Date)i+=this.buildTextValNode(e[n],n,"",t);else if("object"!=typeof e[n]){const o=this.isAttribute(n);if(o)r+=this.buildAttrPairStr(o,""+e[n]);else if(n===this.options.textNodeName){let t=this.options.tagValueProcessor(n,""+e[n]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[n],n,"",t)}else if(Array.isArray(e[n])){const r=e[n].length;let o="",s="";for(let a=0;a<r;a++){const r=e[n][a];if(void 0===r);else if(null===r)"?"===n[0]?i+=this.indentate(t)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+n+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1);o+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(r,n,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(n,r);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(r,n,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,n,s,t)),i+=o}else if(this.options.attributesGroupName&&n===this.options.attributesGroupName){const t=Object.keys(e[n]),i=t.length;for(let o=0;o<i;o++)r+=this.buildAttrPairStr(t[o],""+e[n][t[o]])}else i+=this.processTextOrObjNode(e[n],n,t);return{attrStr:r,val:i}},o.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},o.prototype.buildObjectNode=function(e,t,r,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+r+"?"+this.tagEndChar:this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",n=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+r+o+this.tagEndChar+e+this.indentate(i)+n:this.indentate(i)+"<"+t+r+o+">"+e+n}},o.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},o.prototype.buildTextValNode=function(e,t,r,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+r+">"+n+"</"+t+this.tagEndChar}},o.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},e.exports=o},87:e=>{function t(e,s,a,l){let d="",c=!1;for(let u=0;u<e.length;u++){const p=e[u],h=r(p);if(void 0===h)continue;let f="";if(f=0===a.length?h:`${a}.${h}`,h===s.textNodeName){let e=p[h];n(f,s)||(e=s.tagValueProcessor(h,e),e=o(e,s)),c&&(d+=l),d+=e,c=!1;continue}if(h===s.cdataPropName){c&&(d+=l),d+=`<![CDATA[${p[h][0][s.textNodeName]}]]>`,c=!1;continue}if(h===s.commentPropName){d+=l+`\x3c!--${p[h][0][s.textNodeName]}--\x3e`,c=!0;continue}if("?"===h[0]){const e=i(p[":@"],s),t="?xml"===h?"":l;let r=p[h][0][s.textNodeName];r=0!==r.length?" "+r:"",d+=t+`<${h}${r}${e}?>`,c=!0;continue}let m=l;""!==m&&(m+=s.indentBy);const g=l+`<${h}${i(p[":@"],s)}`,y=t(p[h],s,f,m);-1!==s.unpairedTags.indexOf(h)?s.suppressUnpairedNode?d+=g+">":d+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?d+=g+`>${y}${l}</${h}>`:(d+=g+">",y&&""!==l&&(y.includes("/>")||y.includes("</"))?d+=l+s.indentBy+y+l:d+=y,d+=`</${h}>`):d+=g+"/>",c=!0}return d}function r(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const i=t[r];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function i(e,t){let r="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let n=t.attributeValueProcessor(i,e[i]);n=o(n,t),!0===n&&t.suppressBooleanAttributes?r+=` ${i.substr(t.attributeNamePrefix.length)}`:r+=` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return r}function n(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+r)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const i=t.entities[r];e=e.replace(i.regex,i.val)}return e}e.exports=function(e,r){let i="";return r.format&&r.indentBy.length>0&&(i="\n"),t(e,r,"",i)}},193:(e,t,r)=>{const i=r(705);function n(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const i=e[t++];let n="";for(;t<e.length&&e[t]!==i;t++)n+=e[t];return[r,n,t]}function o(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function d(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function c(e){if(i.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,u=!1,p=!1,h="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,i--):i--,0===i)break}else"["===e[t]?u=!0:h+=e[t];else{if(u&&s(e,t))t+=7,[entityName,val,t]=n(e,t+1),-1===val.indexOf("&")&&(r[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(u&&a(e,t))t+=8;else if(u&&l(e,t))t+=8;else if(u&&d(e,t))t+=9;else{if(!o)throw new Error("Invalid DOCTYPE");p=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},63:(e,t)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};t.buildOptions=function(e){return Object.assign({},r,e)},t.defaultOptions=r},299:(e,t,r)=>{const i=r(705),n=r(365),o=r(193),s=r(494);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const i=t[r];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:e[i]}}}function l(e,t,r,i,n,o,s){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,r,n,o);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?w(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function d(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const c=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function u(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=i.getAllMatches(e,c),n=r.length,o={};for(let e=0;e<n;e++){const i=this.resolveNameSpace(r[e][1]);let n=r[e][4],s=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==n){this.options.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n);const e=this.options.attributeValueProcessor(i,n,t);o[s]=null==e?n:typeof e!=typeof n||e!==n?e:w(n,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new n("!xml");let r=t,i="",s="";for(let a=0;a<e.length;a++)if("<"===e[a])if("/"===e[a+1]){const t=y(e,">",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(i=this.saveTextToParentTag(i,r,s));const o=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let l=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),r=this.tagsNodeStack.pop(),i="",a=t}else if("?"===e[a+1]){let t=v(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new n(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=y(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);i=this.saveTextToParentTag(i,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=o(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=y(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);i=this.saveTextToParentTag(i,r,s);let o=this.parseTextData(n,r.tagname,s,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,o),a=t+2}else{let o=v(e,a,this.options.removeNSPrefix),l=o.tagName;const d=o.rawTagName;let c=o.tagExp,u=o.attrExpPresent,p=o.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,s,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==t.tagname&&(s+=s?"."+l:l),this.isItStopNode(this.options.stopNodes,s,l)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),c=l):c=c.substr(0,c.length-1),a=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=o.closeIndex;else{const r=this.readStopNodeData(e,d,p+1);if(!r)throw new Error(`Unexpected end of ${d}`);a=r.i,t=r.tagContent}const i=new n(l);l!==c&&u&&(i[":@"]=this.buildAttributesMap(c,s,l)),t&&(t=this.parseTextData(t,l,s,!0,u,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(r,i,s)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new n(l);l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,s,l)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new n(l);this.tagsNodeStack.push(r),l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,s,l)),this.addChild(r,e,s),r=e}i="",a=p}}else i+=e[a];return t.child};function h(e,t,r){const i=this.options.updateTag(t.tagname,r,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,r,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,r){const i="*."+r;for(const r in e){const n=e[r];if(i===n||t===n)return!0}return!1}function y(e,t,r,i){const n=e.indexOf(t,r);if(-1===n)throw new Error(i);return n+t.length-1}function v(e,t,r){const i=function(e,t){let r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",n="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===i[0]){if(!i[1])return{data:n,index:o};if(e[o+1]===i[1])return{data:n,index:o}}else"\t"===t&&(t=" ");n+=t}}(e,t+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!i)return;let n=i.data;const o=i.index,s=n.search(/\s/);let a=n,l=!0;-1!==s&&(a=n.substring(0,s),n=n.substring(s+1).trimStart());const d=a;if(r){const e=a.indexOf(":");-1!==e&&(a=a.substr(e+1),l=a!==i.data.substr(e+1))}return{tagName:a,tagExp:n,closeIndex:o,attrExpPresent:l,rawTagName:d}}function b(e,t,r){const i=r;let n=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const o=y(e,">",r,`${t} is not closed`);if(e.substring(r+2,o).trim()===t&&(n--,0===n))return{tagContent:e.substring(i,r),i:o};r=o}else if("?"===e[r+1])r=y(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=y(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=y(e,"]]>",r,"StopNode is not closed.")-2;else{const i=v(e,r,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&n++,r=i.closeIndex)}}function w(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&s(e,r)}return i.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=l,this.resolveNameSpace=d,this.buildAttributesMap=u,this.isItStopNode=g,this.replaceEntitiesValue=f,this.readStopNodeData=b,this.saveTextToParentTag=m,this.addChild=h}}},338:(e,t,r)=>{const{buildOptions:i}=r(63),n=r(299),{prettify:o}=r(728),s=r(31);e.exports=class{constructor(e){this.externalEntities={},this.options=i(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=s.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new n(this.options);r.addExternalEntities(this.externalEntities);const i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:o(i,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},728:(e,t)=>{function r(e,t,s){let a;const l={};for(let d=0;d<e.length;d++){const c=e[d],u=i(c);let p="";if(p=void 0===s?u:s+"."+u,u===t.textNodeName)void 0===a?a=c[u]:a+=""+c[u];else{if(void 0===u)continue;if(c[u]){let e=r(c[u],t,p);const i=o(e,t);c[":@"]?n(e,c[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==l[u]&&l.hasOwnProperty(u)?(Array.isArray(l[u])||(l[u]=[l[u]]),l[u].push(e)):t.isArray(u,p,i)?l[u]=[e]:l[u]=e}}}return"string"==typeof a?a.length>0&&(l[t.textNodeName]=a):void 0!==a&&(l[t.textNodeName]=a),l}function i(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function n(e,t,r,i){if(t){const n=Object.keys(t),o=n.length;for(let s=0;s<o;s++){const o=n[s];i.isArray(o,r+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function o(e,t){const{textNodeName:r}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}t.prettify=function(e,t){return r(e,t)}},365:e=>{e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},542:(e,t,r)=>{!function(){var t=r(298),i=r(526).utf8,n=r(135),o=r(526).bin,s=function(e,r){e.constructor==String?e=r&&"binary"===r.encoding?o.stringToBytes(e):i.stringToBytes(e):n(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var a=t.bytesToWords(e),l=8*e.length,d=1732584193,c=-271733879,u=-1732584194,p=271733878,h=0;h<a.length;h++)a[h]=16711935&(a[h]<<8|a[h]>>>24)|4278255360&(a[h]<<24|a[h]>>>8);a[l>>>5]|=128<<l%32,a[14+(l+64>>>9<<4)]=l;var f=s._ff,m=s._gg,g=s._hh,y=s._ii;for(h=0;h<a.length;h+=16){var v=d,b=c,w=u,_=p;d=f(d,c,u,p,a[h+0],7,-680876936),p=f(p,d,c,u,a[h+1],12,-389564586),u=f(u,p,d,c,a[h+2],17,606105819),c=f(c,u,p,d,a[h+3],22,-1044525330),d=f(d,c,u,p,a[h+4],7,-176418897),p=f(p,d,c,u,a[h+5],12,1200080426),u=f(u,p,d,c,a[h+6],17,-1473231341),c=f(c,u,p,d,a[h+7],22,-45705983),d=f(d,c,u,p,a[h+8],7,1770035416),p=f(p,d,c,u,a[h+9],12,-1958414417),u=f(u,p,d,c,a[h+10],17,-42063),c=f(c,u,p,d,a[h+11],22,-1990404162),d=f(d,c,u,p,a[h+12],7,1804603682),p=f(p,d,c,u,a[h+13],12,-40341101),u=f(u,p,d,c,a[h+14],17,-1502002290),d=m(d,c=f(c,u,p,d,a[h+15],22,1236535329),u,p,a[h+1],5,-165796510),p=m(p,d,c,u,a[h+6],9,-1069501632),u=m(u,p,d,c,a[h+11],14,643717713),c=m(c,u,p,d,a[h+0],20,-373897302),d=m(d,c,u,p,a[h+5],5,-701558691),p=m(p,d,c,u,a[h+10],9,38016083),u=m(u,p,d,c,a[h+15],14,-660478335),c=m(c,u,p,d,a[h+4],20,-405537848),d=m(d,c,u,p,a[h+9],5,568446438),p=m(p,d,c,u,a[h+14],9,-1019803690),u=m(u,p,d,c,a[h+3],14,-187363961),c=m(c,u,p,d,a[h+8],20,1163531501),d=m(d,c,u,p,a[h+13],5,-1444681467),p=m(p,d,c,u,a[h+2],9,-51403784),u=m(u,p,d,c,a[h+7],14,1735328473),d=g(d,c=m(c,u,p,d,a[h+12],20,-1926607734),u,p,a[h+5],4,-378558),p=g(p,d,c,u,a[h+8],11,-2022574463),u=g(u,p,d,c,a[h+11],16,1839030562),c=g(c,u,p,d,a[h+14],23,-35309556),d=g(d,c,u,p,a[h+1],4,-1530992060),p=g(p,d,c,u,a[h+4],11,1272893353),u=g(u,p,d,c,a[h+7],16,-155497632),c=g(c,u,p,d,a[h+10],23,-1094730640),d=g(d,c,u,p,a[h+13],4,681279174),p=g(p,d,c,u,a[h+0],11,-358537222),u=g(u,p,d,c,a[h+3],16,-722521979),c=g(c,u,p,d,a[h+6],23,76029189),d=g(d,c,u,p,a[h+9],4,-640364487),p=g(p,d,c,u,a[h+12],11,-421815835),u=g(u,p,d,c,a[h+15],16,530742520),d=y(d,c=g(c,u,p,d,a[h+2],23,-995338651),u,p,a[h+0],6,-198630844),p=y(p,d,c,u,a[h+7],10,1126891415),u=y(u,p,d,c,a[h+14],15,-1416354905),c=y(c,u,p,d,a[h+5],21,-57434055),d=y(d,c,u,p,a[h+12],6,1700485571),p=y(p,d,c,u,a[h+3],10,-1894986606),u=y(u,p,d,c,a[h+10],15,-1051523),c=y(c,u,p,d,a[h+1],21,-2054922799),d=y(d,c,u,p,a[h+8],6,1873313359),p=y(p,d,c,u,a[h+15],10,-30611744),u=y(u,p,d,c,a[h+6],15,-1560198380),c=y(c,u,p,d,a[h+13],21,1309151649),d=y(d,c,u,p,a[h+4],6,-145523070),p=y(p,d,c,u,a[h+11],10,-1120210379),u=y(u,p,d,c,a[h+2],15,718787259),c=y(c,u,p,d,a[h+9],21,-343485551),d=d+v>>>0,c=c+b>>>0,u=u+w>>>0,p=p+_>>>0}return t.endian([d,c,u,p])};s._ff=function(e,t,r,i,n,o,s){var a=e+(t&r|~t&i)+(n>>>0)+s;return(a<<o|a>>>32-o)+t},s._gg=function(e,t,r,i,n,o,s){var a=e+(t&i|r&~i)+(n>>>0)+s;return(a<<o|a>>>32-o)+t},s._hh=function(e,t,r,i,n,o,s){var a=e+(t^r^i)+(n>>>0)+s;return(a<<o|a>>>32-o)+t},s._ii=function(e,t,r,i,n,o,s){var a=e+(r^(t|~i))+(n>>>0)+s;return(a<<o|a>>>32-o)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,r){if(null==e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(s(e,r));return r&&r.asBytes?i:r&&r.asString?o.bytesToString(i):t.bytesToHex(i)}}()},285:(e,t,r)=>{var i=r(2);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(n).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(l)}(e),!0).map(c)):[]};var n="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function d(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(e){return e.split(n).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(l).join(".")}function u(e){if(!e)return[""];var t=[],r=i("{","}",e);if(!r)return e.split(",");var n=r.pre,o=r.body,s=r.post,a=n.split(",");a[a.length-1]+="{"+o+"}";var l=u(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function p(e){return"{"+e+"}"}function h(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function m(e,t){return e>=t}function g(e,t){var r=[],n=i("{","}",e);if(!n)return[e];var o=n.pre,a=n.post.length?g(n.post,!1):[""];if(/\$$/.test(n.pre))for(var l=0;l<a.length;l++){var c=o+"{"+n.body+"}"+a[l];r.push(c)}else{var y,v,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),_=b||w,x=n.body.indexOf(",")>=0;if(!_&&!x)return n.post.match(/,.*\}/)?g(e=n.pre+"{"+n.body+s+n.post):[e];if(_)y=n.body.split(/\.\./);else if(1===(y=u(n.body)).length&&1===(y=g(y[0],!1).map(p)).length)return a.map((function(e){return n.pre+y[0]+e}));if(_){var S=d(y[0]),k=d(y[1]),E=Math.max(y[0].length,y[1].length),T=3==y.length?Math.abs(d(y[2])):1,B=f;k<S&&(T*=-1,B=m);var C=y.some(h);v=[];for(var I=S;B(I,k);I+=T){var A;if(w)"\\"===(A=String.fromCharCode(I))&&(A="");else if(A=String(I),C){var F=E-A.length;if(F>0){var M=new Array(F+1).join("0");A=I<0?"-"+M+A.slice(1):M+A}}v.push(A)}}else{v=[];for(var D=0;D<y.length;D++)v.push.apply(v,g(y[D],!1))}for(D=0;D<v.length;D++)for(l=0;l<a.length;l++)c=o+v[D]+a[l],(!t||_||c)&&r.push(c)}return r}},829:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,s)}function s(){return i(e,arguments,o(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),n(s,e)},r(e)}function i(e,t,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&n(o,r.prototype),o},i.apply(null,arguments)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=function(e){function r(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=function(e,r){return!r||"object"!==t(r)&&"function"!=typeof r?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):r}(this,o(r).call(this,e))).name="ObjectPrototypeMutationError",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}(r,e),r}(r(Error));function a(e,r){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=r.split("."),o=n.length,s=function(t){var r=n[t];if(!e)return{v:void 0};if("+"===r){if(Array.isArray(e))return{v:e.map((function(r,o){var s=n.slice(t+1);return s.length>0?a(r,s.join("."),i):i(e,o,n,t)}))};var o=n.slice(0,t).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}e=i(e,r,n,t)},l=0;l<o;l++){var d=s(l);if("object"===t(d))return d.v}return e}function l(e,t){return e.length===t+1}e.exports={set:function(e,r,i){if("object"!=t(e)||null===e)return e;if(void 0===r)return e;if("number"==typeof r)return e[r]=i,e[r];try{return a(e,r,(function(e,t,r,n){if(e===Reflect.getPrototypeOf({}))throw new s("Attempting to mutate Object.prototype");if(!e[t]){var o=Number.isInteger(Number(r[n+1])),a="+"===r[n+1];e[t]=o||a?[]:{}}return l(r,n)&&(e[t]=i),e[t]}))}catch(t){if(t instanceof s)throw t;return e}},get:function(e,r){if("object"!=t(e)||null===e)return e;if(void 0===r)return e;if("number"==typeof r)return e[r];try{return a(e,r,(function(e,t){return e[t]}))}catch(t){return e}},has:function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=t(e)||null===e)return!1;if(void 0===r)return!1;if("number"==typeof r)return r in e;try{var n=!1;return a(e,r,(function(e,t,r,o){if(!l(r,o))return e&&e[t];n=i.own?e.hasOwnProperty(t):t in e})),n}catch(e){return!1}},hasOwn:function(e,t,r){return this.has(e,t,r||{own:!0})},isIn:function(e,r,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=t(e)||null===e)return!1;if(void 0===r)return!1;try{var o=!1,s=!1;return a(e,r,(function(e,r,n,a){return o=o||e===i||!!e&&e[r]===i,s=l(n,a)&&"object"===t(e)&&r in e,e&&e[r]})),n.validPath?o&&s:o}catch(e){return!1}},ObjectPrototypeMutationError:s}},47:(e,t,r)=>{var i=r(410),n=function(e){return"string"==typeof e};function o(e,t){for(var r=[],i=0;i<e.length;i++){var n=e[i];n&&"."!==n&&(".."===n?r.length&&".."!==r[r.length-1]?r.pop():t&&r.push(".."):r.push(n))}return r}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function l(e){return s.exec(e).slice(1)}a.resolve=function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:cq.cwd();if(!n(i))throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i.charAt(0))}return(t?"/":"")+(e=o(e.split("/"),!t).join("/"))||"."},a.normalize=function(e){var t=a.isAbsolute(e),r="/"===e.substr(-1);return(e=o(e.split("/"),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},a.isAbsolute=function(e){return"/"===e.charAt(0)},a.join=function(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];if(!n(r))throw new TypeError("Arguments to path.join must be strings");r&&(e+=e?"/"+r:r)}return a.normalize(e)},a.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r+1)}e=a.resolve(e).substr(1),t=a.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),s=o,l=0;l<o;l++)if(i[l]!==n[l]){s=l;break}var d=[];for(l=s;l<i.length;l++)d.push("..");return(d=d.concat(n.slice(s))).join("/")},a._makeLong=function(e){return e},a.dirname=function(e){var t=l(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},a.basename=function(e,t){var r=l(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},a.extname=function(e){return l(e)[3]},a.format=function(e){if(!i.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!n(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+a.sep:"")+(e.base||"")},a.parse=function(e){if(!n(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=l(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},a.sep="/",a.delimiter=":",e.exports=a},647:(e,t)=>{var r=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var i,o,s=[];for(o in"string"!=typeof t&&(t="?"),e)if(r.call(e,o)){if((i=e[o])||null!=i&&!isNaN(i)||(i=""),o=n(o),i=n(i),null===o||null===i)continue;s.push(o+"="+i)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var o=i(t[1]),s=i(t[2]);null===o||null===s||o in n||(n[o]=s)}return n}},670:e=>{e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},494:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n=Object.assign({},i,n),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==n.skipLike&&n.skipLike.test(o))return e;if(n.hex&&t.test(o))return Number.parseInt(o,16);{const t=r.exec(o);if(t){const r=t[1],i=t[2];let a=(s=t[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const l=t[4]||t[6];if(!n.leadingZeros&&i.length>0&&r&&"."!==o[2])return e;if(!n.leadingZeros&&i.length>0&&!r&&"."!==o[1])return e;{const t=Number(o),s=""+t;return-1!==s.search(/[eE]/)||l?n.eNotation?t:e:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||r&&s==="-"+a?t:e:i?a===s||r+a===s?t:e:o===s||o===r+s?t:e}}return e}var s}},737:(e,t,r)=>{var i=r(670),n=r(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,d=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function u(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(e){var t,r=("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).location||{},i={},n=typeof(e=e||r);if("blob:"===e.protocol)i=new y(unescape(e.pathname),{});else if("string"===n)for(t in i=new y(e,{}),h)delete i[t];else if("object"===n){for(t in e)t in h||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=a.test(e.href))}return i}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=u(e)).replace(s,""),t=t||{};var r,i=d.exec(e),n=i[1]?i[1].toLowerCase():"",o=!!i[2],a=!!i[3],l=0;return o?a?(r=i[2]+i[3]+i[4],l=i[2].length+i[3].length):(r=i[2]+i[4],l=i[2].length):a?(r=i[3]+i[4],l=i[3].length):r=i[4],"file:"===n?l>=2&&(r=r.slice(2)):m(n)?r=i[4]:n?o&&(r=r.slice(2)):l>=2&&m(t.protocol)&&(r=i[4]),{protocol:n,slashes:o||m(n),slashesCount:l,rest:r}}function y(e,t,r){if(e=(e=u(e)).replace(s,""),!(this instanceof y))return new y(e,t,r);var o,a,l,d,h,v,b=p.slice(),w=typeof t,_=this,x=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=n.parse),o=!(a=g(e||"",t=f(t))).protocol&&!a.slashes,_.slashes=a.slashes||o&&t.slashes,_.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(_.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(d=b[x])?(l=d[0],v=d[1],l!=l?_[v]=e:"string"==typeof l?~(h="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof d[2]?(_[v]=e.slice(0,h),e=e.slice(h+d[2])):(_[v]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(_[v]=h[1],e=e.slice(0,h.index)),_[v]=_[v]||o&&d[3]&&t[v]||"",d[4]&&(_[v]=_[v].toLowerCase())):e=d(e,_);r&&(_.query=r(_.query)),o&&t.slashes&&"/"!==_.pathname.charAt(0)&&(""!==_.pathname||""!==t.pathname)&&(_.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),i=r.length,n=r[i-1],o=!1,s=0;i--;)"."===r[i]?r.splice(i,1):".."===r[i]?(r.splice(i,1),s++):s&&(0===i&&(o=!0),r.splice(i,1),s--);return o&&r.unshift(""),"."!==n&&".."!==n||r.push(""),r.join("/")}(_.pathname,t.pathname)),"/"!==_.pathname.charAt(0)&&m(_.protocol)&&(_.pathname="/"+_.pathname),i(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(~(h=_.auth.indexOf(":"))?(_.username=_.auth.slice(0,h),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=_.auth.slice(h+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(_.auth)),_.auth=_.password?_.username+":"+_.password:_.username),_.origin="file:"!==_.protocol&&m(_.protocol)&&_.host?_.protocol+"//"+_.host:"null",_.href=_.toString()}y.prototype={set:function(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||n.parse)(t)),o[e]=t;break;case"port":o[e]=t,i(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,l.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";o[e]=t.charAt(0)!==s?s+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var d=0;d<p.length;d++){var c=p[d];c[4]&&(o[c[1]]=o[c[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=n.stringify);var t,r=this,i=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&m(r.protocol)&&!i&&"/"!==r.pathname&&(s+="@"),(":"===i[i.length-1]||l.test(r.hostname)&&!r.port)&&(i+=":"),s+=i+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(s+=r.hash),s}},y.extractProtocol=g,y.location=f,y.trimLeft=u,y.qs=n,e.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},pq={};function hq(e){var t=pq[e];if(void 0!==t)return t.exports;var r=pq[e]={id:e,loaded:!1,exports:{}};return uq[e].call(r.exports,r,r.exports,hq),r.loaded=!0,r.exports}hq.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return hq.d(t,{a:t}),t},hq.d=(e,t)=>{for(var r in t)hq.o(t,r)&&!hq.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},hq.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hq.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var fq={};hq.d(fq,{hT:()=>Lq,O4:()=>jq,Kd:()=>qq,YK:()=>Uq,UU:()=>uj,Gu:()=>Jq,ky:()=>fL,h4:()=>pL,ch:()=>hL,hq:()=>nL,i5:()=>mL});var mq=hq(737),gq=hq.n(mq);function yq(e){if(!vq(e))throw new Error("Parameter was not an error")}function vq(e){return!!e&&"object"==typeof e&&"[object Error]"===(t=e,Object.prototype.toString.call(t))||e instanceof Error;var t}class bq extends Error{constructor(e,t){const r=[...arguments],{options:i,shortMessage:n}=function(e){let t,r="";if(0===e.length)t={};else if(vq(e[0]))t={cause:e[0]},r=e.slice(1).join(" ")||"";else if(e[0]&&"object"==typeof e[0])t=Object.assign({},e[0]),r=e.slice(1).join(" ")||"";else{if("string"!=typeof e[0])throw new Error("Invalid arguments passed to Layerr");t={},r=r=e.join(" ")||""}return{options:t,shortMessage:r}}(r);let o=n;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&"string"==typeof i.name?this.name=i.name:this.name="Layerr",i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&"object"==typeof i.info&&Object.assign(this._info,i.info),Error.captureStackTrace){const e=i.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return yq(e),e._cause&&vq(e._cause)?e._cause:null}static fullStack(e){yq(e);const t=bq.cause(e);return t?`${e.stack}\ncaused by: ${bq.fullStack(t)}`:e.stack??""}static info(e){yq(e);const t={},r=bq.cause(e);return r&&Object.assign(t,bq.info(r)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var wq=hq(47),_q=hq.n(wq);const xq="__PATH_SEPARATOR_POSIX__",Sq="__PATH_SEPARATOR_WINDOWS__";function kq(e){try{const t=e.replace(/\//g,xq).replace(/\\\\/g,Sq);return encodeURIComponent(t).split(Sq).join("\\\\").split(xq).join("/")}catch(e){throw new bq(e,"Failed encoding path")}}function Eq(e){return e.startsWith("/")?e:"/"+e}function Tq(e){let t=e;return"/"!==t[0]&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Bq(e){let t=new(gq())(e).pathname;return t.length<=0&&(t="/"),Tq(t)}function Cq(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<e.length;i++){var n=e[i];if("string"!=typeof n)throw new TypeError("Url must be a string. Received "+n);""!==n&&(i>0&&(n=n.replace(/^[\/]+/,"")),n=i<e.length-1?n.replace(/[\/]+$/,""):n.replace(/[\/]+$/,"/"),t.push(n))}var o=t.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(t.reduce(((e,t,r)=>((0===r||"/"!==t||"/"===t&&"/"!==e[e.length-1])&&e.push(t),e)),[]))}var Iq=hq(542),Aq=hq.n(Iq);function Fq(e,t){const r=e.url.replace("//",""),i=-1==r.indexOf("/")?"/":r.slice(r.indexOf("/")),n=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",s=`00000000${t.nc}`.slice(-8),a=function(e,t,r,i,n,o,s){const a=s||Aq()(`${t}:${r}:${i}`);return e&&"md5-sess"===e.toLowerCase()?Aq()(`${a}:${n}:${o}`):a}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=Aq()(`${n}:${i}`),d=o?Aq()(`${a}:${t.nonce}:${s}:${t.cnonce}:${o}:${l}`):Aq()(`${a}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:i,qop:o,response:d,nc:s,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?u.push(`${e}=${c[e]}`):u.push(`${e}="${c[e]}"`));return`Digest ${u.join(", ")}`}function Mq(e){return"digest"===(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var Dq=hq(101),Rq=hq.n(Dq);function Pq(e){return Rq().decode(e)}function Oq(e,t){var r;return`Basic ${r=`${e}:${t}`,Rq().encode(r)}`}const zq="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Nq=zq.fetch.bind(zq),qq=(zq.Headers,zq.Request),Uq=zq.Response;let Lq=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),jq=function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e}({});function Hq(e,t,r,i,n){switch(e.authType){case Lq.Auto:t&&r&&(e.headers.Authorization=Oq(t,r));break;case Lq.Digest:e.digest=function(e,t,r){return{username:e,password:t,ha1:r,nc:0,algorithm:"md5",hasDigestAuth:!1}}(t,r,n);break;case Lq.None:break;case Lq.Password:e.headers.Authorization=Oq(t,r);break;case Lq.Token:e.headers.Authorization=`${(o=i).token_type} ${o.access_token}`;break;default:throw new bq({info:{code:jq.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var o}hq(345),hq(800);const $q="@@HOTPATCHER",Gq=()=>{};function Wq(e){return{original:e,methods:[e],final:!1}}class Kq{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=$q}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||e.__type__!==$q)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((r=>{this.configuration.registry.hasOwnProperty(r)?t&&(this.configuration.registry[r]=Object.assign({},e.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},e.configuration.registry[r])})),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||Gq;for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return t(...i)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)throw new Error("Failed creating sequence: No functions provided");return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];let n=r;const o=this;for(;t.length>0;)n=[t.shift().apply(o,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:i=!1}=r;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Wq(t);else if(this.isPatched(e)){const{original:r}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Wq(t),{original:r})}else this.configuration.registry[e]=Wq(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return this.execute(e,...i)}plugin(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let Vq=null;function Jq(){return Vq||(Vq=new Kq),Vq}function Yq(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Qq(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];let i=null,n=[...t];for(;n.length>0;){const e=n.shift();i=i?Zq(i,e):Yq(e)}return i}function Zq(e,t){const r=Yq(e);return Object.keys(t).forEach((e=>{r.hasOwnProperty(e)?Array.isArray(t[e])?r[e]=Array.isArray(r[e])?[...r[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?r[e]="object"==typeof r[e]&&r[e]?Zq(r[e],t[e]):Yq(t[e]):r[e]=t[e]:r[e]=t[e]})),r}function Xq(e){const t={};for(const r of e.keys())t[r]=e.get(r);return t}function eU(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)return{};const i={};return t.reduce(((e,t)=>(Object.keys(t).forEach((r=>{const n=r.toLowerCase();i.hasOwnProperty(n)?e[i[n]]=t[r]:(i[n]=r,e[r]=t[r])})),e)),{})}hq(805);const tU="function"==typeof ArrayBuffer,{toString:rU}=Object.prototype;function iU(e){return tU&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===rU.call(e))}function nU(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function oU(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function sU(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const aU=oU((function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Qq(e,{headers:{Authorization:Fq(e,t)}})),sU(uU(e),(function(r){let i=!1;return n=function(e){return i?e:r},(o=function(){if(401==r.status)return t.hasDigestAuth=function(e,t){if(!Mq(e))return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const i=e.headers&&e.headers.get("www-authenticate")||"",n=r.exec(i);if(!n)break;t[n[1]]=n[2]||n[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return e}(),!0}(r,t),function(){if(t.hasDigestAuth)return sU(uU(e=Qq(e,{headers:{Authorization:Fq(e,t)}})),(function(e){return 401==e.status?t.hasDigestAuth=!1:t.nc++,i=!0,e}))}();t.nc++}())&&o.then?o.then(n):n(o);var n,o}))})),lU=oU((function(e,t){return sU(uU(e),(function(r){return r.ok?(t.authType=Lq.Password,r):401==r.status&&Mq(r)?(t.authType=Lq.Digest,Hq(t,t.username,t.password,void 0,void 0),e._digest=t.digest,aU(e)):r}))})),dU=oU((function(e,t){return t.authType===Lq.Auto?lU(e,t):e._digest?aU(e):uU(e)}));function cU(e,t,r){const i=Yq(e);return i.headers=eU(t.headers,i.headers||{},r.headers||{}),void 0!==r.data&&(i.data=r.data),r.signal&&(i.signal=r.signal),t.httpAgent&&(i.httpAgent=t.httpAgent),t.httpsAgent&&(i.httpsAgent=t.httpsAgent),t.digest&&(i._digest=t.digest),"boolean"==typeof t.withCredentials&&(i.withCredentials=t.withCredentials),i}function uU(e){const t=Jq();return t.patchInline("request",(e=>t.patchInline("fetch",Nq,e.url,function(e){let t={};const r={method:e.method};if(e.headers&&(t=eU(t,e.headers)),void 0!==e.data){const[i,n]=function(e){if("string"==typeof e)return[e,{}];if(nU(e))return[e,{}];if(iU(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);r.body=i,t=eU(t,n)}return e.signal&&(r.signal=e.signal),e.withCredentials&&(r.credentials="include"),r.headers=t,r}(e))),e)}var pU=hq(285);const hU=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},fU={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},mU=e=>e.replace(/[[\]\\-]/g,"\\$&"),gU=e=>e.join(""),yU=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const i=[],n=[];let o=r+1,s=!1,a=!1,l=!1,d=!1,c=r,u="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==r+1){if("]"===t&&s&&!l){c=o+1;break}if(s=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[s,l,d]]of Object.entries(fU))if(e.startsWith(t,o)){if(u)return["$.",!1,e.length-r,!0];o+=t.length,d?n.push(s):i.push(s),a=a||l;continue e}l=!1,u?(t>u?i.push(mU(u)+"-"+mU(t)):t===u&&i.push(mU(t)),u="",o++):e.startsWith("-]",o+1)?(i.push(mU(t+"-")),o+=2):e.startsWith("-",o+1)?(u=t,o+=2):(i.push(mU(t)),o++)}else l=!0,o++}else d=!0,o++}if(c<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(0===n.length&&1===i.length&&/^\\?.$/.test(i[0])&&!d)return[(p=2===i[0].length?i[0].slice(-1):i[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,c-r,!1];var p;const h="["+(d?"^":"")+gU(i)+"]",f="["+(d?"":"^")+gU(n)+"]";return[i.length&&n.length?"("+h+"|"+f+")":i.length?h:f,a,c-r,!0]},vU=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},bU=new Set(["!","?","+","*","@"]),wU=e=>bU.has(e),_U="(?!\\.)",xU=new Set(["[","."]),SU=new Set(["..","."]),kU=new Set("().*{}+?[]^$\\!"),EU="[^/]",TU=EU+"*?",BU=EU+"+?";class CU{type;#T;#B;#C=!1;#I=[];#A;#F;#M;#D=!1;#R;#P;#O=!1;constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=e,e&&(this.#B=!0),this.#A=t,this.#T=this.#A?this.#A.#T:this,this.#R=this.#T===this?r:this.#T.#R,this.#M=this.#T===this?[]:this.#T.#M,"!"!==e||this.#T.#D||this.#M.push(this),this.#F=this.#A?this.#A.#I.length:0}get hasMagic(){if(void 0!==this.#B)return this.#B;for(const e of this.#I)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#B=!0;return this.#B}toString(){return void 0!==this.#P?this.#P:this.type?this.#P=this.type+"("+this.#I.map((e=>String(e))).join("|")+")":this.#P=this.#I.map((e=>String(e))).join("")}#z(){if(this!==this.#T)throw new Error("should only call on root");if(this.#D)return this;let e;for(this.toString(),this.#D=!0;e=this.#M.pop();){if("!"!==e.type)continue;let t=e,r=t.#A;for(;r;){for(let i=t.#F+1;!r.type&&i<r.#I.length;i++)for(const t of e.#I){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#I[i])}t=r,r=t.#A}}return this}push(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof CU&&e.#A===this))throw new Error("invalid part: "+e);this.#I.push(e)}}toJSON(){const e=null===this.type?this.#I.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#I.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#T||this.#T.#D&&"!"===this.#A?.type)&&e.push({}),e}isStart(){if(this.#T===this)return!0;if(!this.#A?.isStart())return!1;if(0===this.#F)return!0;const e=this.#A;for(let t=0;t<this.#F;t++){const r=e.#I[t];if(!(r instanceof CU&&"!"===r.type))return!1}return!0}isEnd(){if(this.#T===this)return!0;if("!"===this.#A?.type)return!0;if(!this.#A?.isEnd())return!1;if(!this.type)return this.#A?.isEnd();const e=this.#A?this.#A.#I.length:0;return this.#F===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new CU(this.type,e);for(const e of this.#I)t.copyIn(e);return t}static#N(e,t,r,i){let n=!1,o=!1,s=-1,a=!1;if(null===t.type){let l=r,d="";for(;l<e.length;){const r=e.charAt(l++);if(n||"\\"===r)n=!n,d+=r;else if(o)l===s+1?"^"!==r&&"!"!==r||(a=!0):"]"!==r||l===s+2&&a||(o=!1),d+=r;else if("["!==r)if(i.noext||!wU(r)||"("!==e.charAt(l))d+=r;else{t.push(d),d="";const n=new CU(r,t);l=CU.#N(e,n,l,i),t.push(n)}else o=!0,s=l,a=!1,d+=r}return t.push(d),l}let l=r+1,d=new CU(null,t);const c=[];let u="";for(;l<e.length;){const r=e.charAt(l++);if(n||"\\"===r)n=!n,u+=r;else if(o)l===s+1?"^"!==r&&"!"!==r||(a=!0):"]"!==r||l===s+2&&a||(o=!1),u+=r;else if("["!==r)if(wU(r)&&"("===e.charAt(l)){d.push(u),u="";const t=new CU(r,d);d.push(t),l=CU.#N(e,t,l,i)}else if("|"!==r){if(")"===r)return""===u&&0===t.#I.length&&(t.#O=!0),d.push(u),u="",t.push(...c,d),l;u+=r}else d.push(u),u="",c.push(d),d=new CU(null,t);else o=!0,s=l,a=!1,u+=r}return t.type=null,t.#B=void 0,t.#I=[e.substring(r-1)],l}static fromGlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new CU(null,void 0,t);return CU.#N(e,r,0,t),r}toMMPattern(){if(this!==this.#T)return this.#T.toMMPattern();const e=this.toString(),[t,r,i,n]=this.toRegExpSource();if(!(i||this.#B||this.#R.nocase&&!this.#R.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#R.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#R}toRegExpSource(e){const t=e??!!this.#R.dot;if(this.#T===this&&this.#z(),!this.type){const r=this.isStart()&&this.isEnd(),i=this.#I.map((t=>{const[i,n,o,s]="string"==typeof t?CU.#q(t,this.#B,r):t.toRegExpSource(e);return this.#B=this.#B||o,this.#C=this.#C||s,i})).join("");let n="";if(this.isStart()&&"string"==typeof this.#I[0]&&(1!==this.#I.length||!SU.has(this.#I[0]))){const r=xU,o=t&&r.has(i.charAt(0))||i.startsWith("\\.")&&r.has(i.charAt(2))||i.startsWith("\\.\\.")&&r.has(i.charAt(4)),s=!t&&!e&&r.has(i.charAt(0));n=o?"(?!(?:^|/)\\.\\.?(?:$|/))":s?_U:""}let o="";return this.isEnd()&&this.#T.#D&&"!"===this.#A?.type&&(o="(?:$|\\/)"),[n+i+o,vU(i),this.#B=!!this.#B,this.#C]}const r="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let n=this.#U(t);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){const e=this.toString();return this.#I=[e],this.type=null,this.#B=void 0,[e,vU(this.toString()),!1,!1]}let o=!r||e||t?"":this.#U(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let s="";return s="!"===this.type&&this.#O?(this.isStart()&&!t?_U:"")+BU:i+n+("!"===this.type?"))"+(!this.isStart()||t||e?"":_U)+TU+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`),[s,vU(n),this.#B=!!this.#B,this.#C]}#U(e){return this.#I.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,i,n,o]=t.toRegExpSource(e);return this.#C=this.#C||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#q(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!1,n="",o=!1;for(let s=0;s<e.length;s++){const a=e.charAt(s);if(i)i=!1,n+=(kU.has(a)?"\\":"")+a;else if("\\"!==a){if("["===a){const[r,i,a,l]=yU(e,s);if(a){n+=r,o=o||i,s+=a-1,t=t||l;continue}}"*"!==a?"?"!==a?n+=a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(n+=EU,t=!0):(n+=r&&"*"===e?BU:TU,t=!0)}else s===e.length-1?n+="\\\\":i=!0}return[n,vU(e),!!t,o]}}const IU=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return hU(t),!(!r.nocomment&&"#"===t.charAt(0))&&new tL(t,r).match(e)},AU=/^\*+([^+@!?\*\[\(]*)$/,FU=e=>t=>!t.startsWith(".")&&t.endsWith(e),MU=e=>t=>t.endsWith(e),DU=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),RU=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),PU=/^\*+\.\*+$/,OU=e=>!e.startsWith(".")&&e.includes("."),zU=e=>"."!==e&&".."!==e&&e.includes("."),NU=/^\.\*+$/,qU=e=>"."!==e&&".."!==e&&e.startsWith("."),UU=/^\*+$/,LU=e=>0!==e.length&&!e.startsWith("."),jU=e=>0!==e.length&&"."!==e&&".."!==e,HU=/^\?+([^+@!?\*\[\(]*)?$/,$U=e=>{let[t,r=""]=e;const i=VU([t]);return r?(r=r.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(r)):i},GU=e=>{let[t,r=""]=e;const i=JU([t]);return r?(r=r.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(r)):i},WU=e=>{let[t,r=""]=e;const i=JU([t]);return r?e=>i(e)&&e.endsWith(r):i},KU=e=>{let[t,r=""]=e;const i=VU([t]);return r?e=>i(e)&&e.endsWith(r):i},VU=e=>{let[t]=e;const r=t.length;return e=>e.length===r&&!e.startsWith(".")},JU=e=>{let[t]=e;const r=t.length;return e=>e.length===r&&"."!==e&&".."!==e},YU="object"==typeof cq&&cq?"object"==typeof cq.env&&cq.env&&cq.env.__MINIMATCH_TESTING_PLATFORM__||cq.platform:"posix";IU.sep="win32"===YU?"\\":"/";const QU=Symbol("globstar **");IU.GLOBSTAR=QU,IU.filter=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=>IU(r,e,t)};const ZU=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},e,t)};IU.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return IU;const t=IU;return Object.assign((function(r,i){return t(r,i,ZU(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(t){super(t,ZU(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(r){return t.defaults(ZU(e,r)).Minimatch}},AST:class extends t.AST{constructor(t,r){super(t,r,ZU(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.AST.fromGlob(r,ZU(e,i))}},unescape:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.unescape(r,ZU(e,i))},escape:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.escape(r,ZU(e,i))},filter:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filter(r,ZU(e,i))},defaults:r=>t.defaults(ZU(e,r)),makeRe:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.makeRe(r,ZU(e,i))},braceExpand:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.braceExpand(r,ZU(e,i))},match:function(r,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.match(r,i,ZU(e,n))},sep:t.sep,GLOBSTAR:QU})};const XU=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return hU(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:pU(e)};IU.braceExpand=XU,IU.makeRe=function(e){return new tL(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},IU.match=function(e,t){const r=new tL(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const eL=/[?*]|[+@!]\(.*?\)|\[|\]/;class tL{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};hU(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||YU,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&eL.test(e[2])||eL.test(e[3])),r=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(r)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,i),this.set=i.filter((e=>-1===e.indexOf(!1))),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let r=0;r<e[t].length;r++)"**"===e[t][r]&&(e[t][r]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let r=t;for(;"**"===e[r+1];)r++;r!==t&&e.splice(t,r-t)}return e}))}levelOneOptimize(e){return e.map((e=>0===(e=e.reduce(((e,t)=>{const r=e[e.length-1];return"**"===t&&"**"===r?e:".."===t&&r&&".."!==r&&"."!==r&&"**"!==r?(e.pop(),e):(e.push(t),e)}),[])).length?[""]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const i=e[r];1===r&&""===i&&""===e[0]||"."!==i&&""!==i||(t=!0,e.splice(r,1),r--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let r=0;for(;-1!==(r=e.indexOf("..",r+1));){const i=e[r-1];i&&"."!==i&&".."!==i&&"**"!==i&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let i=-1;for(;-1!==(i=r.indexOf("**",i+1));){let n=i;for(;"**"===r[n+1];)n++;n>i&&r.splice(i+1,n-i);let o=r[i+1];const s=r[i+2],a=r[i+3];if(".."!==o)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,r.splice(i,1);const l=r.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){const i=r[e];1===e&&""===i&&""===r[0]||"."!==i&&""!==i||(t=!0,r.splice(e,1),e--)}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(t=!0,r.pop())}let n=0;for(;-1!==(n=r.indexOf("..",n+1));){const e=r[n-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===n&&"**"===r[n+1]?["."]:[];r.splice(n-1,2,...e),0===r.length&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){const i=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(i){e[t]=[],e[r]=i;break}}return e.filter((e=>e.length))}partsMatch(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0,n=0,o=[],s="";for(;i<e.length&&n<t.length;)if(e[i]===t[n])o.push("b"===s?t[n]:e[i]),i++,n++;else if(r&&"**"===e[i]&&t[n]===e[i+1])o.push(e[i]),i++;else if(r&&"**"===t[n]&&e[i]===t[n+1])o.push(t[n]),n++;else if("*"!==e[i]||!t[n]||!this.options.dot&&t[n].startsWith(".")||"**"===t[n]){if("*"!==t[n]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i])return!1;if("a"===s)return!1;s="b",o.push(t[n]),i++,n++}else{if("b"===s)return!1;s="a",o.push(e[i]),i++,n++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let i=0;i<e.length&&"!"===e.charAt(i);i++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=this.options;if(this.isWindows){const r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),o=i?3:r?0:void 0,s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:n?0:void 0;if("number"==typeof o&&"number"==typeof s){const[r,i]=[e[o],t[s]];r.toLowerCase()===i.toLowerCase()&&(t[s]=r,s>o?t=t.slice(s):o>s&&(e=e.slice(o)))}}const{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,l=t.length;o<a&&s<l;o++,s++){this.debug("matchOne loop");var d=t[s],c=e[o];if(this.debug(t,d,c),!1===d)return!1;if(d===QU){this.debug("GLOBSTAR",[t,d,c]);var u=o,p=s+1;if(p===l){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!i.dot&&"."===e[o].charAt(0))return!1;return!0}for(;u<a;){var h=e[u];if(this.debug("\nglobstar while",e,u,t,p,h),this.matchOne(e.slice(u),t.slice(p),r))return this.debug("globstar found match!",u,a,h),!0;if("."===h||".."===h||!i.dot&&"."===h.charAt(0)){this.debug("dot detected!",e,u,t,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!r||(this.debug("\n>>> no match, partial?",e,u,t,p),u!==a))}let n;if("string"==typeof d?(n=c===d,this.debug("string match",d,c,n)):(n=d.test(c),this.debug("pattern match",d,c,n)),!n)return!1}if(o===a&&s===l)return!0;if(o===a)return r;if(s===l)return o===a-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return XU(this.pattern,this.options)}parse(e){hU(e);const t=this.options;if("**"===e)return QU;if(""===e)return"";let r,i=null;(r=e.match(UU))?i=t.dot?jU:LU:(r=e.match(AU))?i=(t.nocase?t.dot?RU:DU:t.dot?MU:FU)(r[1]):(r=e.match(HU))?i=(t.nocase?t.dot?GU:$U:t.dot?WU:KU)(r):(r=e.match(PU))?i=t.dot?zU:OU:(r=e.match(NU))&&(i=qU);const n=CU.fromGlob(e,this.options).toMMPattern();return i&&"object"==typeof n&&Reflect.defineProperty(n,"test",{value:i}),n}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(t.nocase?["i"]:[]);let n=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))i.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===QU?QU:e._src}));return t.forEach(((e,i)=>{const n=t[i+1],o=t[i-1];e===QU&&o!==QU&&(void 0===o?void 0!==n&&n!==QU?t[i+1]="(?:\\/|"+r+"\\/)?"+n:t[i]=r:void 0===n?t[i-1]=o+"(?:\\/|"+r+")?":n!==QU&&(t[i-1]=o+"(?:\\/|\\/"+r+"\\/)"+n,t[i+1]=QU))})),t.filter((e=>e!==QU)).join("/")})).join("|");const[o,s]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+s+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...i].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const n=this.set;this.debug(this.pattern,"set",n);let o=i[i.length-1];if(!o)for(let e=i.length-2;!o&&e>=0;e--)o=i[e];for(let e=0;e<n.length;e++){const s=n[e];let a=i;if(r.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return IU.defaults(e).Minimatch}}function rL(e){const t=new Error(`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:""}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function iL(e,t){const{status:r}=t;if(401===r&&e.digest)return t;if(r>=400)throw rL(t);return t}function nL(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:t,headers:e.headers?Xq(e.headers):{},status:e.status,statusText:e.statusText}:t}IU.AST=CU,IU.Minimatch=tL,IU.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},IU.unescape=vU;const oL=(sL=function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=cU({url:Cq(e.remoteURL,kq(t)),method:"COPY",headers:{Destination:Cq(e.remoteURL,kq(r)),Overwrite:!1===i.overwrite?"F":"T",Depth:i.shallow?"0":"infinity"}},e,i);return s=function(t){iL(e,t)},(o=dU(n,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(sL.apply(this,e))}catch(e){return Promise.reject(e)}});var sL,aL=hq(635),lL=hq(829),dL=hq.n(lL),cL=function(e){return e.Array="array",e.Object="object",e.Original="original",e}(cL||{});function uL(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cL.Original;const i=dL().get(e,t);return"array"===r&&!1===Array.isArray(i)?[i]:"object"===r&&Array.isArray(i)?i[0]:i}function pL(e){return new Promise((t=>{t(function(e){const{multistatus:t}=e;if(""===t)return{multistatus:{response:[]}};if(!t)throw new Error("Invalid response: No root multistatus found");const r={multistatus:Array.isArray(t)?t[0]:t};return dL().set(r,"multistatus.response",uL(r,"multistatus.response",cL.Array)),dL().set(r,"multistatus.response",dL().get(r,"multistatus.response").map((e=>function(e){const t=Object.assign({},e);return t.status?dL().set(t,"status",uL(t,"status",cL.Object)):(dL().set(t,"propstat",uL(t,"propstat",cL.Object)),dL().set(t,"propstat.prop",uL(t,"propstat.prop",cL.Object))),t}(e)))),r}(new aL.XMLParser({removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1}}).parse(e)))}))}function hL(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:i=null,getcontentlength:n="0",resourcetype:o=null,getcontenttype:s=null,getetag:a=null}=e,l=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",d={filename:t,basename:_q().basename(t),lastmod:i,size:parseInt(n,10),type:l,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===l&&(d.mime=s&&"string"==typeof s?s.split(";")[0]:""),r&&(void 0!==e.displayname&&(e.displayname=String(e.displayname)),d.props=e),d}function fL(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=null;try{e.multistatus.response[0].propstat&&(i=e.multistatus.response[0])}catch(e){}if(!i)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:n,status:o}}=i,[s,a,l]=o.split(" ",3),d=parseInt(a,10);if(d>=400){const e=new Error(`Invalid response: ${d} ${l}`);throw e.status=d,e}return hL(n,Tq(t),r)}function mL(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function gL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const yL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:i=!1}=r,n=cU({url:Cq(e.remoteURL,kq(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,r);return gL(dU(n,e),(function(r){return iL(e,r),gL(r.text(),(function(e){return gL(pL(e),(function(e){const n=fL(e,t,i);return nL(r,n,i)}))}))}))}));function vL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const bL=wL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=function(e){if(!e||"/"===e)return[];let t=e;const r=[];do{r.push(t),t=_q().dirname(t)}while(t&&"/"!==t);return r}(Tq(t));i.sort(((e,t)=>e.length>t.length?1:t.length>e.length?-1:0));let n=!1;return function(e,t){if("function"==typeof e[SL]){var r,i,n,o=e[SL]();function d(e){try{for(;!(r=o.next()).done;)if((e=t(r.value))&&e.then){if(!TL(e))return void e.then(d,n||(n=kL.bind(null,i=new EL,2)));e=e.v}i?kL(i,1,e):i=e}catch(e){kL(i||(i=new EL),2,e)}}if(d(),o.return){var s=function(e){try{r.done||o.return()}catch(e){}return e};if(i&&i.then)return i.then(s,(function(e){throw s(e)}));s()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var a=[],l=0;l<e.length;l++)a.push(e[l]);return function(e,t,r){var i,n,o=-1;return function s(a){try{for(;++o<e.length&&(!r||!r());)if((a=t(o))&&a.then){if(!TL(a))return void a.then(s,n||(n=kL.bind(null,i=new EL,2)));a=a.v}i?kL(i,1,a):i=a}catch(e){kL(i||(i=new EL),2,e)}}(),i}(a,(function(e){return t(a[e])}),(function(){return!1}))}(i,(function(i){return o=function(){return function(r,n){try{var o=vL(yL(e,i),(function(e){if("directory"!==e.type)throw new Error(`Path includes a file: ${t}`)}))}catch(e){return n(e)}return o&&o.then?o.then(void 0,n):o}(0,(function(t){const o=t;return function(){if(404===o.status)return n=!0,xL(BL(e,i,{...r,recursive:!1}));throw t}()}))},(s=function(){if(n)return xL(BL(e,i,{...r,recursive:!1}))}())&&s.then?s.then(o):o();var o,s}))}));function wL(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function _L(){}function xL(e,t){if(!t)return e&&e.then?e.then(_L):Promise.resolve()}const SL="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function kL(e,t,r){if(!e.s){if(r instanceof EL){if(!r.s)return void(r.o=kL.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(kL.bind(null,e,t),kL.bind(null,e,2));e.s=t,e.v=r;const i=e.o;i&&i(e)}}const EL=function(){function e(){}return e.prototype.then=function(t,r){const i=new e,n=this.s;if(n){const e=1&n?t:r;if(e){try{kL(i,1,e(this.v))}catch(e){kL(i,2,e)}return i}return this}return this.o=function(e){try{const n=e.v;1&e.s?kL(i,1,t?t(n):n):r?kL(i,1,r(n)):kL(i,2,n)}catch(e){kL(i,2,e)}},i},e}();function TL(e){return e instanceof EL&&1&e.s}const BL=wL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===r.recursive)return bL(e,t,r);const i=cU({url:Cq(e.remoteURL,(n=kq(t),n.endsWith("/")?n:n+"/")),method:"MKCOL"},e,r);var n;return vL(dU(i,e),(function(t){iL(e,t)}))}));var CL=hq(388),IL=hq.n(CL);const AL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={};if("object"==typeof r.range&&"number"==typeof r.range.start){let e=`bytes=${r.range.start}-`;"number"==typeof r.range.end&&(e=`${e}${r.range.end}`),i.Range=e}const n=cU({url:Cq(e.remoteURL,kq(t)),method:"GET",headers:i},e,r);return s=function(t){if(iL(e,t),i.Range&&206!==t.status){const e=new Error(`Invalid response code for partial request: ${t.status}`);throw e.status=t.status,e}return r.callback&&setTimeout((()=>{r.callback(t)}),0),t.body},(o=dU(n,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),FL=()=>{},ML=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,r){r.url||(r.url=Cq(e.remoteURL,kq(t)));const i=cU(r,e,{});return o=function(t){return iL(e,t),t},(n=dU(i,e))&&n.then||(n=Promise.resolve(n)),o?n.then(o):n;var n,o})),DL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=cU({url:Cq(e.remoteURL,kq(t)),method:"DELETE"},e,r);return o=function(t){iL(e,t)},(n=dU(i,e))&&n.then||(n=Promise.resolve(n)),o?n.then(o):n;var n,o})),RL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(i,n){try{var o=(s=yL(e,t,r),a=function(){return!0},s&&s.then||(s=Promise.resolve(s)),a?s.then(a):s)}catch(e){return n(e)}var s,a;return o&&o.then?o.then(void 0,n):o}(0,(function(e){if(404===e.status)return!1;throw e}))}));function PL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const OL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=cU({url:Cq(e.remoteURL,kq(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},e,r);return PL(dU(i,e),(function(i){return iL(e,i),PL(i.text(),(function(n){if(!n)throw new Error("Failed parsing directory contents: Empty response");return PL(pL(n),(function(n){const o=Eq(t);let s=function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=_q().join(t,"/"),{multistatus:{response:s}}=e,a=s.map((e=>{const t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,"")}catch(e){throw new bq(e,"Failed normalising HREF")}}(e.href),{propstat:{prop:r}}=e;return hL(r,"/"===o?decodeURIComponent(Tq(t)):Tq(_q().relative(decodeURIComponent(o),decodeURIComponent(t))),i)}));return n?a:a.filter((e=>e.basename&&("file"===e.type||e.filename!==r.replace(/\/$/,""))))}(n,Eq(e.remoteBasePath||e.remotePath),o,r.details,r.includeSelf);return r.glob&&(s=function(e,t){return e.filter((e=>IU(e.filename,t,{matchBase:!0})))}(s,r.glob)),nL(i,s,r.details)}))}))}))}));function zL(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const NL=zL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=cU({url:Cq(e.remoteURL,kq(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[jL]},e,r);return qL(dU(i,e),(function(t){return iL(e,t),qL(t.text(),(function(e){return nL(t,e,r.details)}))}))}));function qL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const UL=zL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=cU({url:Cq(e.remoteURL,kq(t)),method:"GET"},e,r);return qL(dU(i,e),(function(t){let i;return iL(e,t),function(e,t){var r=e();return r&&r.then?r.then(t):t()}((function(){return qL(t.arrayBuffer(),(function(e){i=e}))}),(function(){return nL(t,i,r.details)}))}))})),LL=zL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:i="binary"}=r;if("binary"!==i&&"text"!==i)throw new bq({info:{code:jq.InvalidOutputFormat}},`Invalid output format: ${i}`);return"text"===i?NL(e,t,r):UL(e,t,r)})),jL=e=>e;function HL(e){return new aL.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build($L({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function $L(e,t){const r={...e};for(const e in r)r.hasOwnProperty(e)&&(r[e]&&"object"==typeof r[e]&&-1===e.indexOf(":")?(r[`${t}:${e}`]=$L(r[e],t),delete r[e]):!1===/^@_/.test(e)&&(r[`${t}:${e}`]=r[e],delete r[e]));return r}function GL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function WL(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const KL=WL((function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=cU({url:Cq(e.remoteURL,kq(t)),method:"UNLOCK",headers:{"Lock-Token":r}},e,i);return GL(dU(n,e),(function(t){if(iL(e,t),204!==t.status&&200!==t.status)throw rL(t)}))})),VL=WL((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:i,timeout:n=JL}=r,o={Accept:"text/plain,application/xml",Timeout:n};i&&(o.If=i);const s=cU({url:Cq(e.remoteURL,kq(t)),method:"LOCK",headers:o,data:HL(e.contactHref)},e,r);return GL(dU(s,e),(function(t){return iL(e,t),GL(t.text(),(function(e){const r=(o=e,new aL.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),i=dL().get(r,"prop.lockdiscovery.activelock.locktoken.href"),n=dL().get(r,"prop.lockdiscovery.activelock.timeout");var o;if(!i)throw rL(t,"No lock token received: ");return{token:i,serverTimeout:n}}))}))})),JL="Infinite, Second-4100000000";function YL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const QL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=t.path||"/",i=cU({url:Cq(e.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return YL(dU(i,e),(function(r){return iL(e,r),YL(r.text(),(function(e){return YL(pL(e),(function(e){const i=function(e){try{const[t]=e.multistatus.response,{propstat:{prop:{"quota-used-bytes":r,"quota-available-bytes":i}}}=t;return void 0!==r&&void 0!==i?{used:parseInt(String(r),10),available:mL(i)}:null}catch(e){}return null}(e);return nL(r,i,t.details)}))}))}))}));function ZL(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const XL=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:i=!1}=r,n=cU({url:Cq(e.remoteURL,kq(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,r);return ZL(dU(n,e),(function(r){return iL(e,r),ZL(r.text(),(function(e){return ZL(pL(e),(function(e){const n=function(e,t,r){const i={truncated:!1,results:[]};return i.truncated=e.multistatus.response.some((e=>"507"===(e.status||e.propstat?.status).split(" ",3)?.[1]&&e.href.replace(/\/$/,"").endsWith(kq(t).replace(/\/$/,"")))),e.multistatus.response.forEach((e=>{if(void 0===e.propstat)return;const t=e.href.split("/").map(decodeURIComponent).join("/");i.results.push(hL(e.propstat.prop,t,r))})),i}(e,t,i);return nL(r,n,i)}))}))}))})),ej=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=cU({url:Cq(e.remoteURL,kq(t)),method:"MOVE",headers:{Destination:Cq(e.remoteURL,kq(r)),Overwrite:!1===i.overwrite?"F":"T"}},e,i);return s=function(t){iL(e,t)},(o=dU(n,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s}));var tj=hq(172);const rj=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:n=!0,overwrite:o=!0}=i,s={"Content-Type":"application/octet-stream"};!1===n||(s["Content-Length"]="number"==typeof n?`${n}`:`${function(e){if(iU(e))return e.byteLength;if(nU(e))return e.length;if("string"==typeof e)return(0,tj.d)(e);throw new bq({info:{code:jq.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(r)}`),o||(s["If-None-Match"]="*");const a=cU({url:Cq(e.remoteURL,kq(t)),method:"PUT",headers:s,data:r},e,i);return d=function(t){try{iL(e,t)}catch(e){const t=e;if(412!==t.status||o)throw t;return!1}return!0},(l=dU(a,e))&&l.then||(l=Promise.resolve(l)),d?l.then(d):l;var l,d})),ij=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=cU({url:Cq(e.remoteURL,kq(t)),method:"OPTIONS"},e,r);return o=function(t){try{iL(e,t)}catch(e){throw e}return{compliance:(t.headers.get("DAV")??"").split(",").map((e=>e.trim())),server:t.headers.get("Server")??""}},(n=dU(i,e))&&n.then||(n=Promise.resolve(n)),o?n.then(o):n;var n,o}));function nj(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const oj=lj((function(e,t,r,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(r>i||r<0)throw new bq({info:{code:jq.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const s={"Content-Type":"application/octet-stream","Content-Length":""+(i-r+1),"Content-Range":`bytes ${r}-${i}/*`},a=cU({url:Cq(e.remoteURL,kq(t)),method:"PUT",headers:s,data:n},e,o);return nj(dU(a,e),(function(t){iL(e,t)}))}));function sj(e,t){var r=e();return r&&r.then?r.then(t):t(r)}const aj=lj((function(e,t,r,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(r>i||r<0)throw new bq({info:{code:jq.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const s={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(i-r+1),"X-Update-Range":`bytes=${r}-${i}`},a=cU({url:Cq(e.remoteURL,kq(t)),method:"PATCH",headers:s,data:n},e,o);return nj(dU(a,e),(function(t){iL(e,t)}))}));function lj(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const dj=lj((function(e,t,r,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return nj(ij(e,t,o),(function(s){let a=!1;return sj((function(){if(s.compliance.includes("sabredav-partialupdate"))return nj(aj(e,t,r,i,n,o),(function(e){return a=!0,e}))}),(function(l){let d=!1;return a?l:sj((function(){if(s.server.includes("Apache")&&s.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return nj(oj(e,t,r,i,n,o),(function(e){return d=!0,e}))}),(function(e){if(d)return e;throw new bq({info:{code:jq.NotSupported}},"Not supported")}))}))}))})),cj="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function uj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:r=null,remoteBasePath:i,contactHref:n=cj,ha1:o,headers:s={},httpAgent:a,httpsAgent:l,password:d,token:c,username:u,withCredentials:p}=t;let h=r;h||(h=u||d?Lq.Password:Lq.None);const f={authType:h,remoteBasePath:i,contactHref:n,ha1:o,headers:Object.assign({},s),httpAgent:a,httpsAgent:l,password:d,remotePath:Bq(e),remoteURL:e,token:c,username:u,withCredentials:p};return Hq(f,u,d,c,o),{copyFile:(e,t,r)=>oL(f,e,t,r),createDirectory:(e,t)=>BL(f,e,t),createReadStream:(e,t)=>function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=new(0,IL().PassThrough);return AL(e,t,r).then((e=>{e.pipe(i)})).catch((e=>{i.emit("error",e)})),i}(f,e,t),createWriteStream:(e,t,r)=>function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:FL;const n=new(0,IL().PassThrough),o={};!1===r.overwrite&&(o["If-None-Match"]="*");const s=cU({url:Cq(e.remoteURL,kq(t)),method:"PUT",headers:o,data:n,maxRedirects:0},e,r);return dU(s,e).then((t=>iL(e,t))).then((e=>{setTimeout((()=>{i(e)}),0)})).catch((e=>{n.emit("error",e)})),n}(f,e,t,r),customRequest:(e,t)=>ML(f,e,t),deleteFile:(e,t)=>DL(f,e,t),exists:(e,t)=>RL(f,e,t),getDirectoryContents:(e,t)=>OL(f,e,t),getFileContents:(e,t)=>LL(f,e,t),getFileDownloadLink:e=>function(e,t){let r=Cq(e.remoteURL,kq(t));const i=/^https:/i.test(r)?"https":"http";switch(e.authType){case Lq.None:break;case Lq.Password:{const t=Pq(e.headers.Authorization.replace(/^Basic /i,"").trim());r=r.replace(/^https?:\/\//,`${i}://${t}@`);break}default:throw new bq({info:{code:jq.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return r}(f,e),getFileUploadLink:e=>function(e,t){let r=`${Cq(e.remoteURL,kq(t))}?Content-Type=application/octet-stream`;const i=/^https:/i.test(r)?"https":"http";switch(e.authType){case Lq.None:break;case Lq.Password:{const t=Pq(e.headers.Authorization.replace(/^Basic /i,"").trim());r=r.replace(/^https?:\/\//,`${i}://${t}@`);break}default:throw new bq({info:{code:jq.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return r}(f,e),getHeaders:()=>Object.assign({},f.headers),getQuota:e=>QL(f,e),lock:(e,t)=>VL(f,e,t),moveFile:(e,t,r)=>ej(f,e,t,r),putFileContents:(e,t,r)=>rj(f,e,t,r),partialUpdateFileContents:(e,t,r,i,n)=>dj(f,e,t,r,i,n),getDAVCompliance:e=>ij(f,e),search:(e,t)=>XL(f,e,t),setHeaders:e=>{f.headers=Object.assign({},e)},stat:(e,t)=>yL(f,e,t),unlock:(e,t,r)=>KL(f,e,t,r)}}var pj=fq.hT,hj=fq.UU;function fj(e){return!/[^\u0000-\u00ff]/g.test(e)}function mj(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}t_&&(0,fq.Gu)().patch("request",(e=>r(void 0,void 0,void 0,(function*(){var t;const r=mj(Object.assign({},e.headers));delete r.host,delete r["content-length"];const i=null!==(t=r.accept)&&void 0!==t?t:r["content-type"],n=Object.assign({},r);n.hasOwnProperty("authorization")&&(n.authorization="<retracted>");const o={url:e.url,method:e.method,body:e.data,headers:r,contentType:i,throw:!1};let s=yield(0,k.requestUrl)(o);401!==s.status||!k.Platform.isIosApp||e.url.endsWith("/")||e.url.endsWith(".md")||"PROPFIND"!==e.method.toUpperCase()||(console.debug("so we have 401, try appending request url with slash"),o.url=`${e.url}/`,s=yield(0,k.requestUrl)(o));const a=mj(Object.assign({},s.headers));for(const e in a)a.hasOwnProperty(e)&&(fj(a[e])||(a[e]=encodeURIComponent(a[e])));let l;const d=(0,oq.Us)(s.status);return l=[101,103,204,205,304].includes(s.status)?new Response(null,{status:s.status,statusText:d,headers:a}):new Response(s.arrayBuffer,{status:s.status,statusText:d,headers:a}),l}))));const gj=(e,t)=>{let r=e;return"/"===e||""===e?r=`/${t}/`:e.startsWith("/")?(console.warn(`why the path ${e} starts with '/'? but we just go on.`),r=`/${t}${e}`):r=`/${t}/${e}`,r},yj=e=>{let t=e;for(;t.startsWith("/..");)t=t.slice(3);return t},vj=(e,t)=>{let r=((e,t)=>{const r=yj(e);if(r!==`/${t}`&&!r.startsWith(`/${t}/`))throw Error(`"${e}" after stripping doesn't starts with "/${t}/"`);return r.slice(`/${t}/`.length)})(e.filename,t);"directory"!==e.type||r.endsWith("/")||(r=`${r}/`);const i=Date.parse(e.lastmod).valueOf();return{key:r,keyRaw:r,mtimeSvr:i,mtimeCli:i,size:e.size,sizeRaw:e.size}},bj=e=>fj(e)?e:unescape(encodeURIComponent(e));class wj extends Mp{constructor(e,t,r){super(),this._getnextcloudUploadServerAddress=()=>{let e=this.webdavConfig.address;e.endsWith("/")&&(e=e.substring(0,e.length-1));const t=e.split("/");if(t.length>3&&"dav"===t[t.length-3]&&"files"===t[t.length-2]&&""!==t[t.length-1])return t[t.length-2]="uploads",t.join("/");throw Error(`cannot construct upload address for ${t}`)},this.kind="webdav",this.webdavConfig=m()(e),this.webdavConfig.address=(e=>e.includes("%")?e:encodeURI(e))(this.webdavConfig.address),this.remoteBaseDir=this.webdavConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.supportApachePartial=!1,this.supportSabrePartial=!1,this.isNextcloud=!1,this.nextcloudUploadServerAddress=""}_init(){return r(this,void 0,void 0,(function*(){var e;if(void 0!==this.client)return;const t=(e=>{const t=e.trim();if(""===t)return{};const r=t.split("\n"),i={};for(const e of r){if(!e.includes(":"))continue;const[t,...r]=e.split(":"),n=t.trim(),o=r.join(":").trim();i[n]=o}return i})(null!==(e=this.webdavConfig.customHeaders)&&void 0!==e?e:""),r=Object.assign(Object.assign({},{"Cache-Control":"no-cache"}),t);if(""!==this.webdavConfig.username&&""!==this.webdavConfig.password?this.client=hj(this.webdavConfig.address,{username:bj(this.webdavConfig.username),password:bj(this.webdavConfig.password),headers:r,authType:"digest"===this.webdavConfig.authType?pj.Digest:pj.Password}):(console.info("no password"),this.client=hj(this.webdavConfig.address,{headers:r})),this.vaultFolderExists);else{(yield this.client.exists(`/${this.remoteBaseDir}/`))||(console.info("remote vault folder not exists, creating"),yield this.client.createDirectory(`/${this.remoteBaseDir}/`),console.info("remote vault folder created!")),this.vaultFolderExists=!0}"auto"!==this.webdavConfig.depth&&"auto_1"!==this.webdavConfig.depth&&"auto_infinity"!==this.webdavConfig.depth&&"auto_unknown"!==this.webdavConfig.depth||(this.webdavConfig.depth="manual_1",this.webdavConfig.manualRecursive=!0,void 0!==this.saveUpdatedConfigFunc&&(yield this.saveUpdatedConfigFunc(),console.info(`webdav depth="auto_???" is changed to ${this.webdavConfig.depth}`))),yield this._checkPartialSupport()}))}_checkPartialSupport(){return r(this,void 0,void 0,(function*(){const e=yield this.client.getDAVCompliance(`/${this.remoteBaseDir}/`);for(const t of e.compliance)if(t.toLocaleLowerCase().includes("nextcloud")&&""!==this.webdavConfig.username&&""!==this.webdavConfig.password){const e=this.webdavConfig.address.split("/");return e.length>3&&"dav"===e[e.length-3]&&"files"===e[e.length-2]&&""!==e[e.length-1]&&(this.isNextcloud=!0,this.nextcloudUploadServerAddress=this._getnextcloudUploadServerAddress(),console.debug(`isNextcloud=${this.isNextcloud}, uploadFolder=${this.nextcloudUploadServerAddress}`),!0)}return e.server.includes("Apache")&&e.compliance.includes("<http://apache.org/dav/propset/fs/1>")?(this.supportApachePartial=!0,console.debug(`supportApachePartial=true, compliance=${JSON.stringify(e)}`),!0):!!e.compliance.includes("sabredav-partialupdate")&&(this.supportSabrePartial=!0,console.debug(`supportSabrePartial=true, compliance=${JSON.stringify(e)}`),!0)}))}walk(){return r(this,void 0,void 0,(function*(){yield this._init();let e=[];if("auto"===this.webdavConfig.depth||"auto_unknown"===this.webdavConfig.depth||"auto_1"===this.webdavConfig.depth||"auto_infinity"===this.webdavConfig.depth||"manual_1"===this.webdavConfig.depth||this.webdavConfig.address.includes("jianguoyun.com")||this.webdavConfig.address.includes("teracloud.jp")){const t=new nq.op([`/${this.remoteBaseDir}`]),i=10;for(;t.length>0;){const n=[];for(;t.length>0;)n.push(t.pop());const o=aq()(n,i),s=[];for(const e of o){const t=e.map((e=>r(this,void 0,void 0,(function*(){let t=yield this.client.getDirectoryContents(e,{deep:!1,details:!1});return t=t.filter((t=>yj(t.filename)!==e)),t})))),i=yield Promise.all(t);for(const e of i)if(this.webdavConfig.address.includes("jianguoyun.com")&&e.length>=749)throw Error("出错:坚果云 api 有限制,文件列表加载不全。终止同步!");const n=dq()(i);s.push(...n)}for(let r=0;r<s.length;++r){const i=s[r];e.push(i),"directory"===i.type&&t.push(yj(i.filename))}}}else e=yield this.client.getDirectoryContents(`/${this.remoteBaseDir}`,{deep:!0,details:!1});const t=e.map((e=>vj(e,this.remoteBaseDir))).filter((e=>"/"!==e.keyRaw));return t}))}walkPartial(){return r(this,void 0,void 0,(function*(){yield this._init();return(yield this.client.getDirectoryContents(`/${this.remoteBaseDir}`,{deep:!1,details:!1})).map((e=>vj(e,this.remoteBaseDir))).filter((e=>"/"!==e.keyRaw))}))}stat(e){return r(this,void 0,void 0,(function*(){yield this._init();const t=gj(e,this.remoteBaseDir);return yield this._statFromRoot(t)}))}_statFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield this.client.stat(e,{details:!1});return vj(t,this.remoteBaseDir)}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){if(!e.endsWith("/"))throw Error(`you should not call mkdir on ${e}`);yield this._init();const r=gj(e,this.remoteBaseDir);return yield this._mkdirFromRoot(r,t,i)}))}_mkdirFromRoot(e,t,i){return r(this,void 0,void 0,(function*(){return yield this.client.createDirectory(e,{recursive:!1}),yield this._statFromRoot(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`you should not call writeFile on ${e}`);yield this._init();const r=gj(e,this.remoteBaseDir);return yield this._writeFileFromRoot(r,t,i,n,e)}))}_writeFileFromRoot(e,t,i,n,o){return r(this,void 0,void 0,(function*(){if(t.byteLength<=10485760)return yield this._writeFileFromRootFull(e,t,i,n,o);if(!this.isNextcloud&&!this.supportApachePartial&&!this.supportSabrePartial)return yield this._writeFileFromRootFull(e,t,i,n,o);try{if(this.isNextcloud)return yield this._writeFileFromRootNextcloud(e,t,i,n,o);if(this.supportApachePartial)return yield this._writeFileFromRootApachePartial(e,t,i,n,o);if(this.supportSabrePartial)return yield this._writeFileFromRootSabrePartial(e,t,i,n,o);throw Error("Error: partial upload / update method is not implemented??")}catch(e){throw console.error("we fail to write file partially for nextcloud or apache or sabre/dav, stop!"),console.error(e),e}}))}_writeFileFromRootFull(e,t,i,n,o){return r(this,void 0,void 0,(function*(){yield this.client.putFileContents(e,t,{overwrite:!0,onUploadProgress:e=>{console.info(`Uploaded ${e.loaded} bytes of ${e.total}`)}});return yield this._statFromRoot(e)}))}_writeFileFromRootNextcloud(e,t,i,n,o){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`key=${e} should not have tailing slash in _writeFileFromRootNextcloud`);const r=`${this.webdavConfig.address}/${encodeURI(e)}`;console.debug(`destUrl=${r}`);const i=this.nextcloudUploadServerAddress;console.debug(`uploadServerAddress=${i}`);const n=(e=>{if(e.endsWith("/"))throw Error("file to upload by chunk should not ends with /");const t=e.split("/");return encodeURI(`${t[t.length-1]}`)})(e);console.debug(`tmpFolderName=${n}`);const s=hj(i,{username:bj(this.webdavConfig.username),password:bj(this.webdavConfig.password),headers:{"Cache-Control":"no-cache"},authType:"digest"===this.webdavConfig.authType?pj.Digest:pj.Password});yield s.createDirectory(n,{method:"MKCOL",headers:{Destination:r}}),console.debug("finish creating folder");const a=th(t.byteLength,5242880);for(let e=0;e<a.length;++e){const{start:i,end:o}=a[e],l=`${n}/${`${e+1}`.padStart(5,"0")}`;console.debug(`start to upload chunk ${e+1} to ${l} with startInclusive=${i}, endInclusive=${o}`),yield s.putFileContents(l,t.slice(i,o+1),{headers:{Destination:r,"OC-Total-Length":`${t.byteLength}`}})}console.debug("finish upload all chunks");const l=`${n}/.file`;console.debug(`fakeFileToMoveUrl=${l}`),yield s.customRequest(l,{method:"MOVE",headers:{Destination:r,"OC-Total-Length":`${t.byteLength}`}}),console.debug("finish moving file"),console.debug(`before stat origKey=${o}`);const d=yield this.stat(o);if(console.debug("after stat"),d.sizeRaw!==t.byteLength){this.isNextcloud=!1;const t=`unable to upload file ${e} by chunks to nextcloud`;throw console.error(t),Error(t)}return console.debug(`after stat, k=${JSON.stringify(d,null,2)}`),d}))}_writeFileFromRootApachePartial(e,t,i,n,o){return r(this,void 0,void 0,(function*(){yield this._writeFileFromRootFull(e,new ArrayBuffer(0),i,n,o);const r=th(t.byteLength,5242880);for(let i=0;i<r.length;++i){const{start:n,end:o}=r[i];yield this.client.partialUpdateFileContents(e,n,o,t.slice(n,o+1))}return yield this.stat(o)}))}_writeFileFromRootSabrePartial(e,t,i,n,o){return r(this,void 0,void 0,(function*(){yield this._writeFileFromRootFull(e,new ArrayBuffer(0),i,n,o);const r=th(t.byteLength,5242880);for(let i=0;i<r.length;++i){const{start:n,end:o}=r[i];yield this.client.customRequest(e,{method:"PATCH",headers:{"X-Update-Range":"append","Content-Type":"application/x-sabredav-partialupdate"},data:t.slice(n,o+1)})}return yield this.stat(o)}))}readFile(e){return r(this,void 0,void 0,(function*(){if(e.endsWith("/"))throw Error(`you should not call readFile on ${e}`);yield this._init();const t=gj(e,this.remoteBaseDir);return yield this._readFileFromRoot(t)}))}_readFileFromRoot(e){return r(this,void 0,void 0,(function*(){const t=yield this.client.getFileContents(e);if(t instanceof ArrayBuffer)return t;if(t instanceof Wx.Buffer)return qp(t);throw Error("unexpected file content result with type "+typeof t)}))}rename(e,t){return r(this,void 0,void 0,(function*(){if("/"===e||"/"===t)return;const r=gj(e,this.remoteBaseDir),i=gj(t,this.remoteBaseDir);yield this._init(),yield this.client.moveFile(r,i)}))}rm(e){return r(this,void 0,void 0,(function*(){if("/"!==e){yield this._init();try{const t=gj(e,this.remoteBaseDir);yield this.client.deleteFile(t)}catch(e){console.error("some error while deleting"),console.error(e)}}}))}checkConnect(e){return r(this,void 0,void 0,(function*(){if(!this.webdavConfig.address.startsWith("http://")&&!this.webdavConfig.address.startsWith("https://")){const t="Error: the url should start with http(s):// but it does not!";return console.error(t),void 0!==e&&e(t),!1}try{yield this._init();if(void 0===(yield this._statFromRoot(`/${this.remoteBaseDir}/`)))throw Error("cannot stat root vault folder!")}catch(t){return console.error(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}var _j=__webpack_require__(2543);const xj=(e,t)=>{let r=e;return"/"===e||""===e?r=`${t}`:e.startsWith("/")?(console.warn(`why the path ${e} starts with '/'? but we just go on.`),r=`${t}${e}`):r=`${t}/${e}`,`rs:fs:v1:${encodeURIComponent(r)}`},Sj=(e,t)=>{const r=decodeURIComponent(e),i=`rs:fs:v1:${t}/`,n=":meta",o=":content";if(!r.startsWith(i))throw Error(`you should not call getOrigEntity on ${e}`);let s=r.slice(i.length);return s.endsWith(n)?s=s.slice(0,-5):s.endsWith(o)&&(s=s.slice(0,-8)),s};class kj extends Mp{constructor(e,t,r){super(),this.kind="webdis",this.webdisConfig=e,this.remoteBaseDir=this.webdisConfig.remoteBaseDir||t||"",this.saveUpdatedConfigFunc=r}_fetchCommand(e,t,i){return r(this,void 0,void 0,(function*(){var r,n;const o=this.webdisConfig.address;if(!o.startsWith("https://")&&!o.startsWith("http://"))throw Error("your webdis server address should start with https:// or http://");if(o.endsWith("/"))throw Error("your webdis server should not ends with /");if(void 0!==i&&"PUT"!==e)throw Error('you can only "POST" ArrayBuffer, not using other methods');const s=`${o}/${t}`,a=null!==(r=this.webdisConfig.username)&&void 0!==r?r:"",l=null!==(n=this.webdisConfig.password)&&void 0!==n?n:"";if(""!==a&&""!==l)return yield fetch(s,{method:e,headers:{Authorization:"Basic "+btoa(a+":"+l)},body:i});if(""===a&&""===l)return yield fetch(s,{method:e,body:i});throw Error("your username and password should both be empty or not empty!")}))}walk(){return r(this,void 0,void 0,(function*(){let e="0";const t=[];do{const r=`SCAN/${e}/MATCH/rs:fs:v1:${encodeURIComponent(this.remoteBaseDir+"/")}*:meta/COUNT/1000`,i=(yield(yield this._fetchCommand("GET",r)).json()).SCAN;e=i[0];for(const e of i[1]){const r=Sj(e,this.remoteBaseDir);t.push(yield this.stat(r))}}while("0"!==e);return t}))}walkPartial(){return r(this,void 0,void 0,(function*(){let e="0";const t=[],r=`SCAN/${e}/MATCH/rs:fs:v1:${encodeURIComponent(this.remoteBaseDir+"/")}*:meta/COUNT/10`,i=(yield(yield this._fetchCommand("GET",r)).json()).SCAN;e=i[0];for(const e of i[1]){const r=Sj(e,this.remoteBaseDir);t.push(yield this.stat(r))}return t}))}stat(e){return r(this,void 0,void 0,(function*(){const t=xj(e,this.remoteBaseDir);return yield this._statFromRaw(t)}))}_statFromRaw(e){return r(this,void 0,void 0,(function*(){const t=`HGETALL/${e}:meta`,r=(yield(yield this._fetchCommand("GET",t)).json()).HGETALL;if((0,_j.isEqual)(r,{}))throw Error(`key ${e} doesn't exist!`);const i=Sj(e,this.remoteBaseDir);return{key:i,keyRaw:i,mtimeCli:Number.parseInt(r.mtime),mtimeSvr:Number.parseInt(r.mtime),size:Number.parseInt(r.size),sizeRaw:Number.parseInt(r.size)}}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){let r=`HSET/${xj(e,this.remoteBaseDir)}:meta/size/0`;void 0!==t&&0!==t&&(r=`${r}/mtime/${t}`),void 0!==i&&0!==i&&(r=`${r}/ctime/${i}`);(yield(yield this._fetchCommand("GET",r)).json()).HSET;return yield this.stat(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){const r=xj(e,this.remoteBaseDir);let o=`HSET/${r}:meta/size/${t.byteLength}`;void 0!==i&&0!==i&&(o=`${o}/mtime/${i}`),void 0!==n&&0!==n&&(o=`${o}/ctime/${n}`);(yield(yield this._fetchCommand("GET",o)).json()).HSET;const s=`SET/${r}:content`;(yield(yield this._fetchCommand("PUT",s,t)).json()).SET;return yield this.stat(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){const t=`GET/${xj(e,this.remoteBaseDir)}:content?type=${I}`;return yield(yield this._fetchCommand("GET",t)).arrayBuffer()}))}rename(e,t){return r(this,void 0,void 0,(function*(){const r=xj(e,this.remoteBaseDir),i=xj(t,this.remoteBaseDir),n=`RENAME/${r}:content/${i}:content`;yield this._fetchCommand("POST",n);const o=`RENAME/${r}:meta/${i}:meta`;yield this._fetchCommand("POST",o)}))}rm(e){return r(this,void 0,void 0,(function*(){const t=xj(e,this.remoteBaseDir),r=`DEL/${t}:meta/${t}:content`;(yield(yield this._fetchCommand("PUT",r)).json()).DEL}))}checkConnect(e){return r(this,void 0,void 0,(function*(){try{const e=yield(yield this._fetchCommand("GET","PING/helloworld")).json();if(!(0,_j.isEqual)(e,{PING:"helloworld"}))throw Error("no correct ping response")}catch(t){return console.error(t),null==e||e(t),!1}return yield this.checkConnectCommonOps(e)}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){return this.webdisConfig.username||"<no usernme>"}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}function Ej(e,t,r){switch(e.serviceType){case"s3":return new iq(e.s3);case"webdav":return new wj(e.webdav,t,r);case"dropbox":return new xx(e.dropbox,t,r);case"onedrive":return new Gx(e.onedrive,t,r);case"onedrivefull":return new d_(e.onedrivefull,t,r);case"webdis":return new kj(e.webdis,t,r);case"googledrive":return new Bh(e.googledrive,t,r);case"box":return new xh(e.box,t,r);case"pcloud":return new m_(e.pcloud,t,r);case"yandexdisk":return new __(e.yandexdisk,t,r);case"koofr":return new $h(e.koofr,t,r);case"azureblobstorage":return new ah(e.azureblobstorage,t);default:throw Error(`cannot init client for serviceType=${e.serviceType}`)}}const Tj=(e,t)=>e===t||e===`${t}/`||e.endsWith(`/${t}`)||e.endsWith(`/${t}/`),Bj=e=>{const t=["data.json","main.js","manifest.json",".gitignore","styles.css"];for(const r of t)if(e===r||e.endsWith(`/${r}`))return!0;return!1};class Cj extends Mp{constructor(e,t,r,i,n,o,s){super(),this.vault=e,this.syncConfigDir=t,this.syncBookmarks=r,this.configDir=i,this.pluginID=n,this.profiler=o,this.deleteToWhere=s,this.kind="local"}walk(){return r(this,void 0,void 0,(function*(){var e,t,i,n,o,s,a,l;null===(e=this.profiler)||void 0===e||e.addIndent(),null===(t=this.profiler)||void 0===t||t.insert("enter walk for local");const d=[],c=this.vault.getAllLoadedFiles();null===(i=this.profiler)||void 0===i||i.insert("finish getting walk for local");for(const e of c){let t,r=e.path;if(r.startsWith("/")&&(r=r.slice(1)),"/"!==e.path&&""!==e.path){if(e instanceof k.TFile){let i=e.stat.mtime;if(i<=0&&(i=e.stat.ctime),0===i&&(i=void 0),void 0===i)throw Error(`Your file has last modified time 0: ${r}, don't know how to deal with it`);t={key:r,keyRaw:r,mtimeCli:i,mtimeSvr:i,size:e.stat.size,sizeRaw:e.stat.size}}else{if(!(e instanceof k.TFolder))throw Error(`unexpected ${e}`);r=`${r}/`,t={key:r,keyRaw:r,size:0,sizeRaw:0}}t.keyRaw.startsWith(R)||d.push(t)}}if(null===(n=this.profiler)||void 0===n||n.insert("finish transforming walk for local"),this.syncConfigDir||this.syncBookmarks){null===(o=this.profiler)||void 0===o||o.insert("into syncConfigDir or syncBookmarks");const e=!this.syncConfigDir,t=yield((e,t,i,n)=>r(void 0,void 0,void 0,(function*(){const o=new nq.op([e]);let s=[],a=0;for(;o.length>0;){const l=[];for(;o.length>0;)l.push(o.pop());const d=aq()(l,10);for(const n of d){const a=n.map((i=>r(void 0,void 0,void 0,(function*(){const r=yield Jp(t,i);if(null==r)throw Error("something goes wrong while listing hidden folder");const n="folder"===r.type;let o;if(n&&(o=yield t.adapter.list(i)),!n&&(void 0===r.mtime||null===r.mtime||0===r.mtime))throw Error(`File in Obsidian ${e} has last modified time 0: ${i}, don't know how to deal with it.`);return{itself:{key:n?`${i}/`:i,keyRaw:n?`${i}/`:i,mtimeCli:r.mtime,mtimeSvr:r.mtime,size:r.size,sizeRaw:r.size},children:o}})))),l=dq()(yield Promise.all(a));for(const e of l){s.push(e.itself);const t=Tj(e.itself.key,i);if(void 0!==e.children){for(const r of e.children.folders)Yp(r,["workspace","workspace.json"])||t&&!Bj(r)||o.push(r);for(const r of e.children.files)Yp(r,["workspace","workspace.json"])||t&&!Bj(r)||o.push(r)}}}if(n&&a>1)break;a+=1}return n&&(s=s.filter((t=>t.key===`${e}/`||t.key===`${e}/bookmarks.json`))),s})))(this.configDir,this.vault,this.pluginID,e);for(const e of t)d.push(e);null===(s=this.profiler)||void 0===s||s.insert("finish syncConfigDir")}return null===(a=this.profiler)||void 0===a||a.insert("finish walk for local"),null===(l=this.profiler)||void 0===l||l.removeIndent(),d}))}walkPartial(){return r(this,void 0,void 0,(function*(){return yield this.walk()}))}stat(e){return r(this,void 0,void 0,(function*(){const t=yield Jp(this.vault,e);if(null==t)throw Error(`${e} does not exist! cannot stat for local`);const r="folder"===t.type;return{key:r?`${e}/`:e,keyRaw:r?`${e}/`:e,ctimeCli:t.ctime,mtimeCli:t.mtime,mtimeSvr:t.mtime,ctimeCliFmt:Vp(t.ctime),mtimeCliFmt:Vp(t.mtime),mtimeSvrFmt:Vp(t.mtime),size:t.size,sizeRaw:t.size}}))}mkdir(e,t,i){return r(this,void 0,void 0,(function*(){return yield Np(e,this.vault),yield this.stat(e)}))}writeFile(e,t,i,n){return r(this,void 0,void 0,(function*(){return yield this.vault.adapter.writeBinary(e,t,{mtime:i,ctime:n}),yield this.stat(e)}))}readFile(e){return r(this,void 0,void 0,(function*(){return yield this.vault.adapter.readBinary(e)}))}rename(e,t){return r(this,void 0,void 0,(function*(){return yield this.vault.adapter.rename(e,t)}))}rm(e){return r(this,void 0,void 0,(function*(){"obsidian"===this.deleteToWhere?yield this.vault.adapter.trashLocal(e):(yield this.vault.adapter.trashSystem(e))||(yield this.vault.adapter.trashLocal(e))}))}checkConnect(e){return r(this,void 0,void 0,(function*(){return!0}))}getUserDisplayName(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}revokeAuth(){return r(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}allowEmptyFile(){return!0}}var Ij=__webpack_require__(55364),Aj=__webpack_require__.n(Ij),Fj=Object.prototype.toString,Mj=Array.isArray||function(e){return"[object Array]"===Fj.call(e)};function Dj(e){return"function"==typeof e}function Rj(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Pj(e,t){return null!=e&&"object"==typeof e&&t in e}var Oj=RegExp.prototype.test;var zj=/\S/;function Nj(e){return!function(e,t){return Oj.call(e,t)}(zj,e)}var qj={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var Uj=/\s*/,Lj=/\s+/,jj=/\s*=/,Hj=/\s*\}/,$j=/#|\^|\/|>|\{|&|=|!/;function Gj(e){this.string=e,this.tail=e,this.pos=0}function Wj(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function Kj(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Gj.prototype.eos=function(){return""===this.tail},Gj.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},Gj.prototype.scanUntil=function(e){var t,r=this.tail.search(e);switch(r){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=t.length,t},Wj.prototype.push=function(e){return new Wj(e,this)},Wj.prototype.lookup=function(e){var t,r,i,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var o,s,a,l=this,d=!1;l;){if(e.indexOf(".")>0)for(o=l.view,s=e.split("."),a=0;null!=o&&a<s.length;)a===s.length-1&&(d=Pj(o,s[a])||(r=o,i=s[a],null!=r&&"object"!=typeof r&&r.hasOwnProperty&&r.hasOwnProperty(i))),o=o[s[a++]];else o=l.view[e],d=Pj(l.view,e);if(d){t=o;break}l=l.parent}n[e]=t}return Dj(t)&&(t=t.call(this.view)),t},Kj.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},Kj.prototype.parse=function(e,t){var r=this.templateCache,i=e+":"+(t||Vj.tags).join(":"),n=void 0!==r,o=n?r.get(i):void 0;return null==o&&(o=function(e,t){if(!e)return[];var r,i,n,o=!1,s=[],a=[],l=[],d=!1,c=!1,u="",p=0;function h(){if(d&&!c)for(;l.length;)delete a[l.pop()];else l=[];d=!1,c=!1}function f(e){if("string"==typeof e&&(e=e.split(Lj,2)),!Mj(e)||2!==e.length)throw new Error("Invalid tags: "+e);r=new RegExp(Rj(e[0])+"\\s*"),i=new RegExp("\\s*"+Rj(e[1])),n=new RegExp("\\s*"+Rj("}"+e[1]))}f(t||Vj.tags);for(var m,g,y,v,b,w,_=new Gj(e);!_.eos();){if(m=_.pos,y=_.scanUntil(r))for(var x=0,S=y.length;x<S;++x)Nj(v=y.charAt(x))?(l.push(a.length),u+=v):(c=!0,o=!0,u+=" "),a.push(["text",v,m,m+1]),m+=1,"\n"===v&&(h(),u="",p=0,o=!1);if(!_.scan(r))break;if(d=!0,g=_.scan($j)||"name",_.scan(Uj),"="===g?(y=_.scanUntil(jj),_.scan(jj),_.scanUntil(i)):"{"===g?(y=_.scanUntil(n),_.scan(Hj),_.scanUntil(i),g="&"):y=_.scanUntil(i),!_.scan(i))throw new Error("Unclosed tag at "+_.pos);if(b=">"==g?[g,y,m,_.pos,u,p,o]:[g,y,m,_.pos],p++,a.push(b),"#"===g||"^"===g)s.push(b);else if("/"===g){if(!(w=s.pop()))throw new Error('Unopened section "'+y+'" at '+m);if(w[1]!==y)throw new Error('Unclosed section "'+w[1]+'" at '+m)}else"name"===g||"{"===g||"&"===g?c=!0:"="===g&&f(y)}if(h(),w=s.pop())throw new Error('Unclosed section "'+w[1]+'" at '+_.pos);return function(e){for(var t,r=[],i=r,n=[],o=0,s=e.length;o<s;++o)switch((t=e[o])[0]){case"#":case"^":i.push(t),n.push(t),i=t[4]=[];break;case"/":n.pop()[5]=t[2],i=n.length>0?n[n.length-1][4]:r;break;default:i.push(t)}return r}(function(e){for(var t,r,i=[],n=0,o=e.length;n<o;++n)(t=e[n])&&("text"===t[0]&&r&&"text"===r[0]?(r[1]+=t[1],r[3]=t[3]):(i.push(t),r=t));return i}(a))}(e,t),n&&r.set(i,o)),o},Kj.prototype.render=function(e,t,r,i){var n=this.getConfigTags(i),o=this.parse(e,n),s=t instanceof Wj?t:new Wj(t,void 0);return this.renderTokens(o,s,r,e,i)},Kj.prototype.renderTokens=function(e,t,r,i,n){for(var o,s,a,l="",d=0,c=e.length;d<c;++d)a=void 0,"#"===(s=(o=e[d])[0])?a=this.renderSection(o,t,r,i,n):"^"===s?a=this.renderInverted(o,t,r,i,n):">"===s?a=this.renderPartial(o,t,r,n):"&"===s?a=this.unescapedValue(o,t):"name"===s?a=this.escapedValue(o,t,n):"text"===s&&(a=this.rawValue(o)),void 0!==a&&(l+=a);return l},Kj.prototype.renderSection=function(e,t,r,i,n){var o=this,s="",a=t.lookup(e[1]);if(a){if(Mj(a))for(var l=0,d=a.length;l<d;++l)s+=this.renderTokens(e[4],t.push(a[l]),r,i,n);else if("object"==typeof a||"string"==typeof a||"number"==typeof a)s+=this.renderTokens(e[4],t.push(a),r,i,n);else if(Dj(a)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");null!=(a=a.call(t.view,i.slice(e[3],e[5]),(function(e){return o.render(e,t,r,n)})))&&(s+=a)}else s+=this.renderTokens(e[4],t,r,i,n);return s}},Kj.prototype.renderInverted=function(e,t,r,i,n){var o=t.lookup(e[1]);if(!o||Mj(o)&&0===o.length)return this.renderTokens(e[4],t,r,i,n)},Kj.prototype.indentPartial=function(e,t,r){for(var i=t.replace(/[^ \t]/g,""),n=e.split("\n"),o=0;o<n.length;o++)n[o].length&&(o>0||!r)&&(n[o]=i+n[o]);return n.join("\n")},Kj.prototype.renderPartial=function(e,t,r,i){if(r){var n=this.getConfigTags(i),o=Dj(r)?r(e[1]):r[e[1]];if(null!=o){var s=e[6],a=e[5],l=e[4],d=o;0==a&&l&&(d=this.indentPartial(o,l,s));var c=this.parse(d,n);return this.renderTokens(c,t,r,d,i)}}},Kj.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(null!=r)return r},Kj.prototype.escapedValue=function(e,t,r){var i=this.getConfigEscape(r)||Vj.escape,n=t.lookup(e[1]);if(null!=n)return"number"==typeof n&&i===Vj.escape?String(n):i(n)},Kj.prototype.rawValue=function(e){return e[1]},Kj.prototype.getConfigTags=function(e){return Mj(e)?e:e&&"object"==typeof e?e.tags:void 0},Kj.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!Mj(e)?e.escape:void 0};var Vj={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){Jj.templateCache=e},get templateCache(){return Jj.templateCache}},Jj=new Kj;Vj.clearCache=function(){return Jj.clearCache()},Vj.parse=function(e,t){return Jj.parse(e,t)},Vj.render=function(e,t,r,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((Mj(n=e)?"array":typeof n)+'" was given as the first argument for mustache#render(template, view, partials)'));var n;return Jj.render(e,t,r,i)},Vj.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return qj[e]}))},Vj.Scanner=Gj,Vj.Context=Wj,Vj.Writer=Kj;const Yj=Vj,Qj={en:JSON.parse('{"settings_conflictaction_smart_conflict":"Smart Conflict (PRO) (beta)","settings_conflictaction_smart_conflict_desc":"<p><strong>!!It\'s a PRO feature! You need an online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p><p><ul><li>For small markdown files, the plugin tries to merge them with diff3 algorithm.</li><li>For large files or not-markdown files, the plugin saves both files by renaming them.</li></ul></p><p><strong>Please manually backup your vaule before using this feature!</strong></p>","protocol_pro_connecting":"Connectting","protocol_pro_connect_manualinput_succ":"You\'ve connected","protocol_pro_connect_fail":"Something went wrong from response from Remotely Save official website. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_pro_connect_succ_revoke":"You\'ve connected as user {{email}}. If you want to disconnect, click this button.","protocol_onedrivefull_connecting":"Connecting to OneDrive...\\nPlease DO NOT close this modal.","protocol_onedrivefull_connect_succ_revoke":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","protocol_onedrivefull_connect_fail":"Something went wrong from response from OneDrive. Maybe you rejected the auth?","protocol_onedrivefull_connect_unknown":"Do not know how to deal with the callback: {{params}}","protocol_box_connecting":"Connectting","protocol_box_connect_manualinput_succ":"You\'ve connected","protocol_box_connect_fail":"Something went wrong from response from Box official website. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_box_connect_succ_revoke":"You\'ve connected. If you want to disconnect, click this button.","protocol_pcloud_connecting":"Connectting","protocol_pcloud_connect_manualinput_succ":"You\'ve connected","protocol_pcloud_connect_fail":"Something went wrong from response from pCloud website. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_pcloud_connect_succ_revoke":"You\'ve connected. If you want to disconnect, click this button.","protocol_yandexdisk_connecting":"Connectting","protocol_yandexdisk_connect_manualinput_succ":"You\'ve connected","protocol_yandexdisk_connect_fail":"Something went wrong from response from Yandex Disk website. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_yandexdisk_connect_succ_revoke":"You\'ve connected. If you want to disconnect, click this button.","protocol_koofr_connecting":"Connectting","protocol_koofr_connect_manualinput_succ":"You\'ve connected","protocol_koofr_connect_fail":"Something went wrong from response from Koofr website. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_koofr_connect_succ_revoke":"You\'ve connected. If you want to disconnect, click this button.","modal_onedrivefullauth_shortdesc":"Currently only OneDrive for personal is supported. OneDrive for Business is NOT supported (yet).\\nVisit the address in a browser, and follow the steps.\\nFinally you should be redirected to Obsidian.","modal_onedrivefullauth_shortdesc_linux":"It seems that you are using Obsidian on Linux, and you might not be able to jump back here properly. Please consider <a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">using</a> the flatpack version of Obsidian, or creating an <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> file</a>.","modal_onedrivefullauth_copybutton":"Click to copy the auth url","modal_onedrivefullauth_copynotice":"The auth url is copied to the clipboard!","modal_onedrivefullrevokeauth_step1":"Step 1: Go to the following address, click the \\"Edit\\" button for the plugin, then click \\"Remove these permissions\\" button on the page.","modal_onedrivefullrevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_onedrivefullrevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_onedrivefullrevokeauth_clean_desc":"You need to click the button.","modal_onedrivefullrevokeauth_clean_button":"Clean","modal_onedrivefullrevokeauth_clean_notice":"Cleaned!","modal_onedrivefullrevokeauth_clean_fail":"Something goes wrong while revoking.","modal_googledriveauth_tutorial":"<p>Please firstly go to the address, then go on the auth flow. In the end, you will see a code, please paste that code here and submit.</p>","modal_googledriveauth_copybutton":"Click to copy the auth url","modal_googledriveauth_copynotice":"The auth url is copied to the clipboard!","modal_googledrivce_maualinput":"The Code from the website","modal_googledrivce_maualinput_desc":"Please input the code here from the end of auth flow, and press confirm.","modal_googledrive_maualinput_notice":"We are trying to connect to Google and update the credentials...","modal_googledrive_maualinput_succ_notice":"Great! The credentials are updated!","modal_googledrive_maualinput_fail_notice":"Oops! Failed to update the credentials. Please try again later.","modal_googledriverevokeauth_step1":"Step 1: Go to the following address, you can remove the connection there.","modal_googledriverevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_googledriverevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_googledriverevokeauth_clean_desc":"You need to click the button.","modal_googledriverevokeauth_clean_button":"Clean","modal_googledriverevokeauth_clean_notice":"Cleaned!","modal_googledriverevokeauth_clean_fail":"Something goes wrong while revoking.","modal_boxauth_tutorial":"<p>Please firstly go to the address, then go on the auth flow. In the end, you will be redirected to here.</p>","modal_boxauth_copybutton":"Click to copy the auth url","modal_boxauth_copynotice":"The auth url is copied to the clipboard!","modal_box_maualinput":"The Code from the website","modal_box_maualinput_desc":"Please input the code here from the end of auth flow, and press confirm.","modal_box_maualinput_notice":"We are trying to connect to Box and update the credentials...","modal_box_maualinput_succ_notice":"Great! The credentials are updated!","modal_box_maualinput_fail_notice":"Oops! Failed to update the credentials. Please try again later.","modal_boxrevokeauth_step1":"Step 1: Go to the following address, you can remove the connection there.","modal_boxrevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_boxrevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_boxrevokeauth_clean_desc":"You need to click the button.","modal_boxrevokeauth_clean_button":"Clean","modal_boxrevokeauth_clean_notice":"Cleaned!","modal_boxrevokeauth_clean_fail":"Something goes wrong while revoking.","modal_pcloudauth_tutorial":"<p>Please firstly go to the address, then go on the auth flow. In the end, you will be redirected to here.</p>","modal_pcloudauth_copybutton":"Click to copy the auth url","modal_pcloudauth_copynotice":"The auth url is copied to the clipboard!","modal_pcloudrevokeauth_step1":"Step 1: Go to the following address, you can remove the connection there.","modal_pcloudrevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_pcloudrevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_pcloudrevokeauth_clean_desc":"You need to click the button.","modal_pcloudrevokeauth_clean_button":"Clean","modal_pcloudrevokeauth_clean_notice":"Cleaned!","modal_pcloudrevokeauth_clean_fail":"Something goes wrong while revoking.","modal_yandexdiskauth_tutorial":"<p>Please firstly go to the address, then go on the auth flow. In the end, you will be redirected to here.</p>","modal_yandexdiskauth_copybutton":"Click to copy the auth url","modal_yandexdiskauth_copynotice":"The auth url is copied to the clipboard!","modal_yandexdiskrevokeauth_step1":"Step 1: Go to the following address, you can remove the connection there.","modal_yandexdiskrevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_yandexdiskrevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_yandexdiskrevokeauth_clean_desc":"You need to click the button.","modal_yandexdiskrevokeauth_clean_button":"Clean","modal_yandexdiskrevokeauth_clean_notice":"Cleaned!","modal_yandexdiskrevokeauth_clean_fail":"Something goes wrong while revoking.","modal_koofrauth_tutorial":"<p>Please firstly go to the address, then go on the auth flow. In the end, you will be redirected to here.</p>","modal_koofrauth_copybutton":"Click to copy the auth url","modal_koofrauth_copynotice":"The auth url is copied to the clipboard!","modal_koofrrevokeauth_step1":"Step 1: Go to the following address, you can remove the connection there.","modal_koofrrevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_koofrrevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_koofrrevokeauth_clean_desc":"You need to click the button.","modal_koofrrevokeauth_clean_button":"Clean","modal_koofrrevokeauth_clean_notice":"Cleaned!","modal_koofrrevokeauth_clean_fail":"Something goes wrong while revoking.","modal_remoteprefix_azureblobstorage_title":"You are changing the remote prefix config","modal_remoteprefix_azureblobstorage_shortdesc":"1. The plugin would NOT automatically move the content from the old directory to the new one directly on the remote. Everything syncs from the beginning again.\\n2. If you set the string to the empty, the prefix will be the vault name.\\n3. The remote directory name itself would not be encrypted even you\'ve set an E2E password.\\n4. Some special char like \'?\', \'/\', \'\\\\\' are not allowed. Spaces in the beginning or in the end are also trimmed.","modal_remoteprefix_azureblobstorage_invaliddirhint":"Your input contains special characters like \'?\', \'/\', \'\\\\\' which are not allowed.","modal_remoteprefix_azureblobstorage_tosave":"The prefix to save is \\"{{{prefix}}}\\"","modal_remoteprefix_azureblobstorage_secondconfirm_change":"Confirm To Change","modal_remoteprefix_azureblobstorage_notice":"New remote prefix config saved!","modal_prorevokeauth":"Revoke auth by clicking here and follow the steps.","modal_prorevokeauth_clean":"Clean","modal_prorevokeauth_clean_desc":"Clean local auth record","modal_prorevokeauth_clean_button":"Clean","modal_prorevokeauth_clean_notice":"Local auth record is cleaned","modal_prorevokeauth_clean_fail":"Fail to clean local auth record.","modal_proauth_copybutton":"Click to copy the auth url","modal_proauth_copynotice":"The auth url is copied to the clipboard!","modal_proauth_maualinput":"The Code from the website","modal_proauth_maualinput_desc":"Please input the code here from the end of auth flow, and press confirm.","modal_proauth_maualinput_notice":"Trying to connect, wait...","modal_proauth_maualinput_conn_fail":"Failed to connect","modal_cleardupfiles_warning":"Warning: The plugin just stupidly finds all the file names that looks like duplicated files (.dup in file names). Also, this only deletes local files, so you need to trigger a sync to delete remote files.","modal_cleardupfiles_warning_confirm":"Confirm to delete","modal_cleardupfiles_warning_finished":"All the detected duplicated files are removed!","settings_onedrivefull":"Remote For Onedrive (for personal) (Full)","settings_chooseservice_onedrivefull":"OneDrive for personal (Full) (PRO)","settings_onedrivefull_disclaimer1":"Disclaimer: This app is NOT an official Microsoft / OneDrive product.","settings_onedrivefull_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Onedrive, please immediately disconnect this app on https://microsoft.com/consent .","settings_onedrivefull_folder":"We will create and sync inside the folder /{{remoteBaseDir}} on your OneDrive.","settings_onedrivefull_nobiz":"Currently only OneDrive for personal is supported. OneDrive for Business is NOT supported (yet).","settings_onedrivefull_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_onedrivefull_notshowuphint":"OneDrive for personal (Full) Settings Not Available","settings_onedrivefull_notshowuphint_desc":"OneDrive for personal (Full) settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_onedrivefull_notshowuphint_view_pro":"View PRO Settings","settings_onedrivefull_revoke":"Revoke Auth","settings_onedrivefull_revoke_desc":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","settings_onedrivefull_revoke_button":"Revoke Auth","settings_onedrivefull_auth":"Auth","settings_onedrivefull_auth_desc":"Auth.","settings_onedrivefull_auth_button":"Auth","settings_onedrivefull_connect_succ":"Great! We can connect to OneDrive!","settings_onedrivefull_connect_fail":"We cannot connect to OneDrive.","settings_onedrivefull_emptyfile":"Empty File Handling","settings_onedrivefull_emptyfile_desc":"OneDrive doesn\'t allow uploading empty file (even in its official website). Do you want to show up errors or silently skip the empty files?","settings_onedrivefull_emptyfile_skip":"Skip","settings_onedrivefull_emptyfile_error":"Error and abort","settings_googledrive":"Google Drive (PRO) (beta)","settings_chooseservice_googledrive":"Google Drive (PRO) (beta)","settings_googledrive_disclaimer1":"Disclaimer: This app is NOT an official Google product. The app just uses Google Drive\'s public api.","settings_googledrive_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Google Drive, please immediately disconnect this app on https://myaccount.google.com/permissions .","settings_googledrive_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_googledrive_notshowuphint":"Google Drive Settings Not Available","settings_googledrive_notshowuphint_desc":"Google Drive settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_googledrive_notshowuphint_view_pro":"View PRO Settings","settings_googledrive_folder":"We will create and sync inside the folder {{remoteBaseDir}} on your Google Drive. DO NOT create this folder by yourself manually.","settings_googledrive_revoke":"Revoke Auth","settings_googledrive_revoke_desc":"You\'ve connected. If you want to disconnect, click this button.","settings_googledrive_revoke_button":"Revoke Auth","settings_googledrive_auth":"Auth","settings_googledrive_auth_desc":"Auth.","settings_googledrive_auth_button":"Auth","settings_googledrive_connect_succ":"Great! We can connect to Google Drive!","settings_googledrive_connect_fail":"We cannot connect to Google Drive.","settings_box":"Box (PRO) (beta)","settings_chooseservice_box":"Box (PRO) (beta)","settings_box_disclaimer1":"Disclaimer: This app is NOT an official Box product. The app just uses Box\'s public api.","settings_box_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Box, please immediately disconnect this app on https://app.box.com/account/security .","settings_box_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_box_notshowuphint":"Box Settings Not Available","settings_box_notshowuphint_desc":"Box settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_box_notshowuphint_view_pro":"View PRO Settings","settings_box_folder":"We will create and sync inside the folder {{remoteBaseDir}} on your Box. DO NOT create this folder by yourself manually.","settings_box_revoke":"Revoke Auth","settings_box_revoke_desc":"You\'ve connected. If you want to disconnect, click this button.","settings_box_revoke_button":"Revoke Auth","settings_box_auth":"Auth","settings_box_auth_desc":"Auth.","settings_box_auth_button":"Auth","settings_box_connect_succ":"Great! We can connect to Box!","settings_box_connect_fail":"We cannot connect to Box.","settings_pcloud":"pCloud (PRO) (beta)","settings_chooseservice_pcloud":"pCloud (PRO) (beta)","settings_pcloud_disclaimer1":"Disclaimer: This app is NOT an official pCloud product. The app just uses pCloud\'s public api.","settings_pcloud_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your pCloud, please immediately disconnect this app on https://my.pcloud.com/#page=settings&settings=tab-apps .","settings_pcloud_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_pcloud_notshowuphint":"pCloud Settings Not Available","settings_pcloud_notshowuphint_desc":"pCloud settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_pcloud_notshowuphint_view_pro":"View PRO Settings","settings_pcloud_folder":"We will create and sync inside the folder {{remoteBaseDir}} on your pCloud. DO NOT create this folder by yourself manually.","settings_pcloud_revoke":"Revoke Auth","settings_pcloud_revoke_desc":"You\'ve connected. If you want to disconnect, click this button.","settings_pcloud_revoke_button":"Revoke Auth","settings_pcloud_auth":"Auth","settings_pcloud_auth_desc":"Auth.","settings_pcloud_auth_button":"Auth","settings_pcloud_emptyfile":"Empty File","settings_pcloud_emptyfile_desc":"pCloud API doesn\'t work with empty file. How to deal with it?","settings_pcloud_emptyfile_skip":"Skip","settings_pcloud_emptyfile_error":"Error","settings_pcloud_connect_succ":"Great! We can connect to pCloud!","settings_pcloud_connect_fail":"We cannot connect to pCloud.","settings_yandexdisk":"Yandex Disk (PRO) (beta)","settings_chooseservice_yandexdisk":"Yandex Disk (PRO) (beta)","settings_yandexdisk_disclaimer1":"Disclaimer: This app is NOT an official Yandex Disk product. The app just uses Yandex Disk\'s public api.","settings_yandexdisk_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Yandex Disk, please immediately disconnect this app on https://app.yandexdisk.com/account/security .","settings_yandexdisk_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_yandexdisk_notshowuphint":"Yandex Disk Settings Not Available","settings_yandexdisk_notshowuphint_desc":"Yandex Disk settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_yandexdisk_notshowuphint_view_pro":"View PRO Settings","settings_yandexdisk_folder":"We will create and sync inside the folder {{remoteBaseDir}} on your Yandex Disk. DO NOT create this folder by yourself manually.","settings_yandexdisk_revoke":"Revoke Auth","settings_yandexdisk_revoke_desc":"You\'ve connected. If you want to disconnect, click this button.","settings_yandexdisk_revoke_button":"Revoke Auth","settings_yandexdisk_auth":"Auth","settings_yandexdisk_auth_desc":"Auth.","settings_yandexdisk_auth_button":"Auth","settings_yandexdisk_connect_succ":"Great! We can connect to Yandex Disk!","settings_yandexdisk_connect_fail":"We cannot connect to Yandex Disk.","settings_koofr":"Koofr (PRO) (beta)","settings_chooseservice_koofr":"Koofr (PRO) (beta)","settings_koofr_disclaimer1":"Disclaimer: This app is NOT an official Koofr product. The app just uses Koofr\'s public api.","settings_koofr_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Koofr, please immediately disconnect this app on https://app.koofr.net/app/admin/preferences/security .","settings_koofr_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_koofr_notshowuphint":"Koofr Settings Not Available","settings_koofr_notshowuphint_desc":"Koofr settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_koofr_notshowuphint_view_pro":"View PRO Settings","settings_koofr_folder":"We will create and sync inside the folder {{remoteBaseDir}} on your Koofr. DO NOT create this folder by yourself manually.","settings_koofr_revoke":"Revoke Auth","settings_koofr_revoke_desc":"You\'ve connected. If you want to disconnect, click this button.","settings_koofr_revoke_button":"Revoke Auth","settings_koofr_auth":"Auth","settings_koofr_auth_desc":"Auth.","settings_koofr_auth_button":"Auth","settings_koofr_connect_succ":"Great! We can connect to Koofr!","settings_koofr_connect_fail":"We cannot connect to Koofr.","settings_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_chooseservice_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_azureblobstorage_disclaimer1":"Disclaimer: This app is NOT an official Microsoft / Azure product. The app just uses Azure Blob Storage\'s public api.","settings_azureblobstorage_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Azure Blob Storage, please immediately delete the SAS Url and <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">try to change your policy</a> or account info.","settings_azureblobstorage_pro_desc":"<p><strong>!!It\'s a PRO feature of Remotely Save! You need a Remotely Save online account for this feature!!</strong>(<a href=\\"#settings-pro\\">scroll down</a> for more info about PRO account.)</p>","settings_azureblobstorage_notshowuphint":"Azure Blob Storage Settings Not Available","settings_azureblobstorage_notshowuphint_desc":"Azure Blob Storage settings are not available, because you haven\'t subscribed to the PRO feature in your Remotely Save account.","settings_azureblobstorage_notshowuphint_view_pro":"View PRO Settings","settings_azureblobstorage_folder":"We will create and sync inside the prefix {{remoteBaseDir}} on your Azure Blob Storage.","settings_azureblobstorage_containersasurl":"Container SAS Url","settings_azureblobstorage_containersasurl_desc":"The only connction method is providing the Container SAS Url. Remember to configure CORS as well. Please read the <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">doc</a> for details.","settings_azureblobstorage_containername":"Container Name","settings_azureblobstorage_containername_desc":"Input your container name here.","settings_azureblobstorage_remoteprefix":"Remote Prefix","settings_azureblobstorage_remoteprefix_desc":"Input your remote prefix of blobs for this vault. If you set this value to empty, the <strong>vault name</strong> will be used as prefix. <strong>Empty prefix is not allowed and not settable here.</strong>","settings_azureblobstorage_parts":"Parts Concurrency","settings_azureblobstorage_parts_desc":"Large files are split into small parts to upload. How many parts do you want to upload in parallel at most?","settings_azureblobstorage_generatefolderobject":"Generate Folder Object Or Not","settings_azureblobstorage_generatefolderobject_desc":"Azure Blob Storage doesn\'t have \\"real\\" folder. If you set \\"Generate\\" here, the plugin will upload a zero-byte object endding with \\"/\\" to represent the folder. By default, the plugin skips generating folder object.","settings_azureblobstorage_generatefolderobject_notgenerate":"Not generate (default)","settings_azureblobstorage_generatefolderobject_generate":"Generate","settings_azureblobstorage_connect_succ":"Great! We can connect to Azure Blob Storage!","settings_azureblobstorage_connect_fail":"We cannot connect to Azure Blob Storage.","settings_export_onedrivefull_button":"Export Onedrive (Full) Part","settings_export_googledrive_button":"Export Google Drive Part","settings_export_box_button":"Export Box Part","settings_export_pcloud_button":"Export pCloud Part","settings_export_yandexdisk_button":"Export Yandex Disk Part","settings_export_koofr_button":"Export Koofr Part","settings_export_azureblobstorage_button":"Export Azure Blob Storage Part","settings_cleardupfiles":"Clear Duplicated Files By Smart Conflict","settings_cleardupfiles_desc":"If you have ever used Smart Conflict (PRO) feature, the plugin may generate duplicated files. <strong>IF YOU ARE SURE THE DUPLICATED FILES ARE NO LONGER NEEDED</strong>, you can clear <strong>ALL</strong> of them locally here.","settings_cleardupfiles_button":"Start Scanning","settings_pro":"Account (for PRO features)","settings_pro_tutorial":"<p>Using <stong>basic</strong> features of Remotely Save is <strong>FREE</strong> and do <strong>NOT</strong> need an account.</p><p>However, you will <strong>need</strong> an online account and <strong>PAY</strong> for the <strong>PRO</strong> features such as smart conflict.</p><p>Firstly please click the button to sign up and sign in to the website: <a href=\\"https://remotelysave.com\\">https://remotelysave.com</a>. Notice: It\'s different from, and NOT affiliated with Obsidian account.</p><p>Secondly please \\"connect\\" your local device to your online account.","settings_pro_features":"Features","settings_pro_features_desc":"Here are features you\'ve enabled:<br/>{{{features}}}","settings_pro_features_refresh_button":"Check again","settings_pro_features_refresh_fetch":"Fetching...","settings_pro_features_refresh_succ":"Refreshed!","settings_pro_revoke":"Disconnect","settings_pro_revoke_desc":"You\'ve connected as user {{email}}. If you want to disconnect, click this button.","settings_pro_revoke_button":"Disconnect","settings_pro_intro":"Remotely Save Online Account","settings_pro_intro_desc":"Click the button to jump to the website to sign up or sign in.","settings_pro_intro_button":"Sign Up / Sign In","settings_pro_auth":"Connect","settings_pro_auth_desc":"After you sign up and sign in the account on the website, you need to connect your plugin here to the online account. Please click the button to connect.","settings_pro_auth_button":"Connect"}'),zh_cn:JSON.parse('{"settings_conflictaction_smart_conflict":"智能处理冲突 (PRO) (beta)","settings_conflictaction_smart_conflict_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p><p><ul><li>小 markdown 文件,本插件尝试使用 diff3 算法合并它;</li><li>对于大文件或非 markdown 文件,本插件尝试改名字并均进行保存。</li></ul></p><p><strong>请注意先手动备份 vault 文件再用此功能!</strong></p>","protocol_pro_connecting":"正在连接","protocol_pro_connect_manualinput_succ":"连接成功","protocol_pro_connect_fail":"Remotely Save 官网返回错误。可能是网络连接不稳定。也可能是您拒绝了授权?","protocol_pro_connect_succ_revoke":"您已连接上账号 {{email}}。如果要取消连接,请点击此按钮。","protocol_onedrivefull_connecting":"正在连接 OneDrive……\\n请不要关闭此弹窗。","protocol_onedrivefull_connect_succ_revoke":"您已作为用户 {{username}} 连接上了。如果您想取消连接,请点击此按钮。","protocol_onedrivefull_connect_fail":"OneDrive 的回调请求有点异常。您是否拒绝了鉴权?","protocol_onedrivefull_connect_unknown":"不知道如何处理此 callback:{{params}}","protocol_box_connecting":"正在连接","protocol_box_connect_manualinput_succ":"连接成功","protocol_box_connect_fail":"Box 官网返回错误。可能是网络连接不稳定。也可能是您拒绝了授权?","protocol_box_connect_succ_revoke":"您已连接上账号。如果要取消连接,请点击此按钮。","protocol_pcloud_connecting":"正在连接","protocol_pcloud_connect_manualinput_succ":"连接成功","protocol_pcloud_connect_fail":"pCloud 官网返回错误。可能是网络连接不稳定。也可能是您拒绝了授权?","protocol_pcloud_connect_succ_revoke":"您已连接上账号。如果要取消连接,请点击此按钮。","protocol_yandexdisk_connecting":"正在连接","protocol_yandexdisk_connect_manualinput_succ":"连接成功","protocol_yandexdisk_connect_fail":"Yandex Disk 官网返回错误。可能是网络连接不稳定。也可能是您拒绝了授权?","protocol_yandexdisk_connect_succ_revoke":"您已连接上账号。如果要取消连接,请点击此按钮。","protocol_koofr_connecting":"正在连接","protocol_koofr_connect_manualinput_succ":"连接成功","protocol_koofr_connect_fail":"Yandex Disk 官网返回错误。可能是网络连接不稳定。也可能是您拒绝了授权?","protocol_koofr_connect_succ_revoke":"您已连接上账号。如果要取消连接,请点击此按钮。","modal_onedrivefullauth_shortdesc":"现在只支持个人版 OneDrive,(暂)不支持企业版。\\n在浏览器中访问以下地址,然后按照网页提示操作。\\n到了最后,您应该会被自动重定向回来 Obsidian。","modal_onedrivefullauth_shortdesc_linux":"您正在用 Linux,有可能无法跳转回来。请考虑<a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">使用</a> flatpack 版本的 Obsidian,或创建 <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> 文件</a>。","modal_onedrivefullauth_copybutton":"点击此按钮从而复制鉴权 url","modal_onedrivefullauth_copynotice":"鉴权 url 已复制到剪贴板!","modal_onedrivefullrevokeauth_step1":"第 1 步:用浏览器打开以下地址,点击本插件对应的“Edit”按钮,点击“Remove these permissions”按钮。","modal_onedrivefullrevokeauth_step2":"第 2 步:点击以下按钮,清理本地保存的登录信息。","modal_onedrivefullrevokeauth_clean":"清理本地保存的登录信息","modal_onedrivefullrevokeauth_clean_desc":"您需要点击“清理”按钮。","modal_onedrivefullrevokeauth_clean_button":"清理","modal_onedrivefullrevokeauth_clean_notice":"已清理!","modal_onedrivefullrevokeauth_clean_fail":"鉴权途中出错了。","modal_googledriveauth_tutorial":"<p>请访问此网址,然后会进入授权流程。最后,您会看到一个码,请复制粘贴到这里然后提交。</p>","modal_googledriveauth_copybutton":"点击以复制网址","modal_googledriveauth_copynotice":"网址已复制!","modal_googledrivce_maualinput":"网站上的码","modal_googledrivce_maualinput_desc":"请粘贴授权流程最后的那个码,然后点击确认。","modal_googledrive_maualinput_notice":"正在尝试连接 Google 并更新授权信息......","modal_googledrive_maualinput_succ_notice":"很好!授权信息已更新!","modal_googledrive_maualinput_fail_notice":"更新授权信息失败。请稍后重试。","modal_googledriverevokeauth_step1":"第 1 步:访问以下网址,可以删除连接。","modal_googledriverevokeauth_step2":"第 2 步:点击以下按钮,从而清理本地的登录信息。","modal_googledriverevokeauth_clean":"清理本地登录信息","modal_googledriverevokeauth_clean_desc":"您需要点击此按钮。","modal_googledriverevokeauth_clean_button":"清理","modal_googledriverevokeauth_clean_notice":"已清理!","modal_googledriverevokeauth_clean_fail":"清理授权时候发生了错误。","modal_boxauth_tutorial":"<p>请访问此网址,然后会进入授权流程。最后,您会被重定向回来。</p>","modal_boxauth_copybutton":"点击以复制网址","modal_boxauth_copynotice":"网址已复制!","modal_box_maualinput":"网站上的码","modal_box_maualinput_desc":"请粘贴授权流程最后的那个码,然后点击确认。","modal_box_maualinput_notice":"正在尝试连接 Box 并更新授权信息......","modal_box_maualinput_succ_notice":"很好!授权信息已更新!","modal_box_maualinput_fail_notice":"更新授权信息失败。请稍后重试。","modal_boxrevokeauth_step1":"第 1 步:访问以下网址,可以删除连接。","modal_boxrevokeauth_step2":"第 2 步:点击以下按钮,从而清理本地的登录信息。","modal_boxrevokeauth_clean":"清理本地登录信息","modal_boxrevokeauth_clean_desc":"您需要点击此按钮。","modal_boxrevokeauth_clean_button":"清理","modal_boxrevokeauth_clean_notice":"已清理!","modal_boxrevokeauth_clean_fail":"清理授权时候发生了错误。","modal_pcloudauth_tutorial":"<p>请访问此网址,然后会进入授权流程。最后,您会被重定向回来。</p>","modal_pcloudauth_copybutton":"点击以复制网址","modal_pcloudauth_copynotice":"网址已复制!","modal_pcloudrevokeauth_step1":"第 1 步:访问以下网址,可以删除连接。","modal_pcloudrevokeauth_step2":"第 2 步:点击以下按钮,从而清理本地的登录信息。","modal_pcloudrevokeauth_clean":"清理本地登录信息","modal_pcloudrevokeauth_clean_desc":"您需要点击此按钮。","modal_pcloudrevokeauth_clean_button":"清理","modal_pcloudrevokeauth_clean_notice":"已清理!","modal_pcloudrevokeauth_clean_fail":"清理授权时候发生了错误。","modal_yandexdiskauth_tutorial":"<p>请访问此网址,然后会进入授权流程。最后,您会被重定向回来。</p>","modal_yandexdiskauth_copybutton":"点击以复制网址","modal_yandexdiskauth_copynotice":"网址已复制!","modal_yandexdisk_maualinput":"网站上的码","modal_yandexdisk_maualinput_desc":"请粘贴授权流程最后的那个码,然后点击确认。","modal_yandexdisk_maualinput_notice":"正在尝试连接 Yandex Disk 并更新授权信息......","modal_yandexdisk_maualinput_succ_notice":"很好!授权信息已更新!","modal_yandexdisk_maualinput_fail_notice":"更新授权信息失败。请稍后重试。","modal_yandexdiskrevokeauth_step1":"第 1 步:访问以下网址,可以删除连接。","modal_yandexdiskrevokeauth_step2":"第 2 步:点击以下按钮,从而清理本地的登录信息。","modal_yandexdiskrevokeauth_clean":"清理本地登录信息","modal_yandexdiskrevokeauth_clean_desc":"您需要点击此按钮。","modal_yandexdiskrevokeauth_clean_button":"清理","modal_yandexdiskrevokeauth_clean_notice":"已清理!","modal_yandexdiskrevokeauth_clean_fail":"清理授权时候发生了错误。","modal_koofrauth_tutorial":"<p>请访问此网址,然后会进入授权流程。最后,您会被重定向回来。</p>","modal_koofrauth_copybutton":"点击以复制网址","modal_koofrauth_copynotice":"网址已复制!","modal_koofr_maualinput":"网站上的码","modal_koofr_maualinput_desc":"请粘贴授权流程最后的那个码,然后点击确认。","modal_koofr_maualinput_notice":"正在尝试连接 Yandex Disk 并更新授权信息......","modal_koofr_maualinput_succ_notice":"很好!授权信息已更新!","modal_koofr_maualinput_fail_notice":"更新授权信息失败。请稍后重试。","modal_koofrrevokeauth_step1":"第 1 步:访问以下网址,可以删除连接。","modal_koofrrevokeauth_step2":"第 2 步:点击以下按钮,从而清理本地的登录信息。","modal_koofrrevokeauth_clean":"清理本地登录信息","modal_koofrrevokeauth_clean_desc":"您需要点击此按钮。","modal_koofrrevokeauth_clean_button":"清理","modal_koofrrevokeauth_clean_notice":"已清理!","modal_koofrrevokeauth_clean_fail":"清理授权时候发生了错误。","modal_remoteprefix_azureblobstorage_title":"您正在修改远端路径前缀设置","modal_remoteprefix_azureblobstorage_shortdesc":"1. 本插件并不会自动在远端把内容从旧文件夹移动到新文件夹。所有内容都会重新同步。\\n2. 如果你使得文本输入框为空,那么本设置为保存为空,文件将会使用 Vault 名字作为前缀。\\n3. 即使您设置了端对端加密的密码,远端文件夹名称本身也不会被加密。\\n4. 某些特殊字符,如“?”、“/”、“\\\\”是不允许的。文本前后的空格也会被自动删去。","modal_remoteprefix_azureblobstorage_invaliddirhint":"您所输入的内容含有某些特殊字符,如“?”、“/”、“\\\\”,它们是不允许的。","modal_remoteprefix_azureblobstorage_tosave":"您设定的新前缀为:“{{{prefix}}}”","modal_remoteprefix_azureblobstorage_secondconfirm_empty":"前缀为空,文件会保存在根目录","modal_remoteprefix_azureblobstorage_secondconfirm_change":"确认修改","modal_remoteprefix_azureblobstorage_notice":"新的远端路径前缀设置已保存!","modal_prorevokeauth":"点击这里和按照步骤取消授权。","modal_prorevokeauth_clean":"清理","modal_prorevokeauth_clean_desc":"清理本地授权记录","modal_prorevokeauth_clean_button":"清理","modal_prorevokeauth_clean_notice":"清理本地授权记录完毕","modal_prorevokeauth_clean_fail":"清理本地授权记录粗错。","modal_proauth_copybutton":"点击从而复制授权网址","modal_proauth_copynotice":"授权网址已复制!","modal_proauth_maualinput":"网站的授权码","modal_proauth_maualinput_desc":"请输入授权流程最后一步的授权码,然后点击确认。","modal_proauth_maualinput_notice":"正在连接,请稍候......","modal_proauth_maualinput_conn_fail":"连接失败","modal_cleardupfiles_warning":"警告:插件只是简单地扫描所有文件名含有 .dup 的作为重复文件。另外,本操作只删除本地文件,因此您需要触发同步来删除远端文件。","modal_cleardupfiles_warning_confirm":"确认删除","modal_cleardupfiles_warning_finished":"所有检测到的重复文件已被删除!","settings_onedrivefull":"Onedrive(个人版)(Full)设置","settings_chooseservice_onedrivefull":"OneDrive(个人版)(Full)(PRO)","settings_onedrivefull_disclaimer1":"声明:此插件不是微软或 OneDrive 的官方产品。","settings_onedrivefull_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 OneDrive 有不符合预期的访问,请立刻从 https://microsoft.com/consent 删除记录于此插件的连接鉴权。","settings_onedrivefull_folder":"我们会在您的 OneDrive 上创建此文件夹并在里面同步:/{{remoteBaseDir}}。","settings_onedrivefull_nobiz":"现在只支持个人版 OneDrive。(暂时)并不支持企业版 OneDrive。","settings_onedrivefull_revoke":"撤回鉴权","settings_onedrivefull_revoke_desc":"您现在使用了用户名 {{username}} 来连接。如果想取消连接,请点击此按钮。","settings_onedrivefull_revoke_button":"撤回鉴权","settings_onedrivefull_auth":"鉴权","settings_onedrivefull_auth_desc":"鉴权。","settings_onedrivefull_auth_button":"鉴权","settings_onedrivefull_connect_succ":"很好!我们可连接上 OneDrive!","settings_onedrivefull_connect_fail":"我们未能连接上 OneDrive。","settings_onedrivefull_emptyfile":"空文件处理","settings_onedrivefull_emptyfile_desc":"OneDrive 不允许上传空文件(即使官网也是不允许的)。那么你想跳过空文件还是返回错误?","settings_onedrivefull_emptyfile_skip":"跳过","settings_onedrivefull_emptyfile_error":"返回错误和中断","settings_googledrive":"Google Drive (PRO) (beta)","settings_chooseservice_googledrive":"Google Drive (PRO) (beta)","settings_googledrive_disclaimer1":"声明:本插件不是 Google 的官方产品。只是用到了它的公开 API。","settings_googledrive_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 Google Drive 访问,请立刻在以下网站操作断开连接: https://myaccount.google.com/permissions 。","settings_googledrive_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_googledrive_notshowuphint":"Google Drive 设置不可用","settings_googledrive_notshowuphint_desc":"Google Drive 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_googledrive_notshowuphint_view_pro":"查看 PRO 相关设置","settings_googledrive_folder":"我们会在 Google Drive 创建此文件夹并同步内容进去: {{remoteBaseDir}} 。请不要手动在网站上创建。","settings_googledrive_revoke":"撤回鉴权","settings_googledrive_revoke_desc":"您现在已连接。如果想取消连接,请点击此按钮。","settings_googledrive_revoke_button":"撤回鉴权","settings_googledrive_auth":"鉴权","settings_googledrive_auth_desc":"鉴权.","settings_googledrive_auth_button":"鉴权","settings_googledrive_connect_succ":"很好!我们可连接上 Google Drive!","settings_googledrive_connect_fail":"我们未能连接上 Google Drive。","settings_box":"Box (PRO) (beta)","settings_chooseservice_box":"Box (PRO) (beta)","settings_box_disclaimer1":"声明:本插件不是 Box 的官方产品。只是用到了它的公开 API。","settings_box_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 Box 访问,请立刻在以下网站操作断开连接: https://app.box.com/account/security 。","settings_box_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_box_notshowuphint":"Box 设置不可用","settings_box_notshowuphint_desc":"Box 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_box_notshowuphint_view_pro":"查看 PRO 相关设置","settings_box_folder":"我们会在 Box 创建此文件夹并同步内容进去: {{remoteBaseDir}} 。请不要手动在网站上创建。","settings_box_revoke":"撤回鉴权","settings_box_revoke_desc":"您现在已连接。如果想取消连接,请点击此按钮。","settings_box_revoke_button":"撤回鉴权","settings_box_auth":"鉴权","settings_box_auth_desc":"鉴权.","settings_box_auth_button":"鉴权","settings_box_connect_succ":"很好!我们可连接上 Box!","settings_box_connect_fail":"我们未能连接上 Box。","settings_pcloud":"pCloud (PRO) (beta)","settings_chooseservice_pcloud":"pCloud (PRO) (beta)","settings_pcloud_disclaimer1":"声明:本插件不是 pCloud 的官方产品。只是用到了它的公开 API。","settings_pcloud_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 pCloud 访问,请立刻在以下网站操作断开连接: https://my.pcloud.com/#page=settings&settings=tab-apps 。","settings_pcloud_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_pcloud_notshowuphint":"pCloud 设置不可用","settings_pcloud_notshowuphint_desc":"pCloud 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_pcloud_notshowuphint_view_pro":"查看 PRO 相关设置","settings_pcloud_folder":"我们会在 pCloud 创建此文件夹并同步内容进去: {{remoteBaseDir}} 。请不要手动在网站上创建。","settings_pcloud_revoke":"撤回鉴权","settings_pcloud_revoke_desc":"您现在已连接。如果想取消连接,请点击此按钮。","settings_pcloud_revoke_button":"撤回鉴权","settings_pcloud_auth":"鉴权","settings_pcloud_auth_desc":"鉴权.","settings_pcloud_auth_button":"鉴权","settings_pcloud_emptyfile":"空文件","settings_pcloud_emptyfile_desc":"pCloud API 不支持上传空文件,怎么处理?","settings_pcloud_emptyfile_skip":"跳过","settings_pcloud_emptyfile_error":"提示错误","settings_pcloud_connect_succ":"很好!我们可连接上 pCloud!","settings_pcloud_connect_fail":"我们未能连接上 pCloud。","settings_yandexdisk":"Yandex Disk (PRO) (beta)","settings_chooseservice_yandexdisk":"Yandex Disk (PRO) (beta)","settings_yandexdisk_disclaimer1":"声明:本插件不是 Yandex Disk 的官方产品。只是用到了它的公开 API。","settings_yandexdisk_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 Yandex Disk 访问,请立刻在以下网站操作断开连接: https://id.yandex.com/profile/devices 。","settings_yandexdisk_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_yandexdisk_notshowuphint":"Yandex Disk 设置不可用","settings_yandexdisk_notshowuphint_desc":"Yandex Disk 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_yandexdisk_notshowuphint_view_pro":"查看 PRO 相关设置","settings_yandexdisk_folder":"我们会在 Yandex Disk 创建此文件夹并同步内容进去: {{remoteBaseDir}} 。请不要手动在网站上创建。","settings_yandexdisk_revoke":"撤回鉴权","settings_yandexdisk_revoke_desc":"您现在已连接。如果想取消连接,请点击此按钮。","settings_yandexdisk_revoke_button":"撤回鉴权","settings_yandexdisk_auth":"鉴权","settings_yandexdisk_auth_desc":"鉴权.","settings_yandexdisk_auth_button":"鉴权","settings_yandexdisk_connect_succ":"很好!我们可连接上 Yandex Disk!","settings_yandexdisk_connect_fail":"我们未能连接上 Yandex Disk。","settings_koofr":"Koofr (PRO) (beta)","settings_chooseservice_koofr":"Koofr (PRO) (beta)","settings_koofr_disclaimer1":"声明:本插件不是 Koofr 的官方产品。只是用到了它的公开 API。","settings_koofr_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 Koofr 访问,请立刻在以下网站操作断开连接: https://app.koofr.net/app/admin/preferences/security 。","settings_koofr_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_koofr_notshowuphint":"Koofr 设置不可用","settings_koofr_notshowuphint_desc":"Koofr 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_koofr_notshowuphint_view_pro":"查看 PRO 相关设置","settings_koofr_folder":"我们会在 Koofr 创建此文件夹并同步内容进去: {{remoteBaseDir}} 。请不要手动在网站上创建。","settings_koofr_revoke":"撤回鉴权","settings_koofr_revoke_desc":"您现在已连接。如果想取消连接,请点击此按钮。","settings_koofr_revoke_button":"撤回鉴权","settings_koofr_auth":"鉴权","settings_koofr_auth_desc":"鉴权.","settings_koofr_auth_button":"鉴权","settings_koofr_connect_succ":"很好!我们可连接上 Koofr!","settings_koofr_connect_fail":"我们未能连接上 Koofr。","settings_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_chooseservice_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_azureblobstorage_disclaimer1":"声明:本插件不是微软或 Azure 的官方产品。只是用到了 Azure 的公开 API。","settings_azureblobstorage_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现任何不符合预期的 Azure Blob Storage 访问,请立刻删除 SAS Url 然后<a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">修改预设的 policy</a> 或账号信息。","settings_azureblobstorage_pro_desc":"<p><strong>!!这是 PRO(付费)功能! 您需要在线账号来使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 账号的更多信息。)</p>","settings_azureblobstorage_notshowuphint":"Azure Blob Storage 设置不可用","settings_azureblobstorage_notshowuphint_desc":"Azure Blob Storage 设置不可用,因为您没有在 Remotely Save 账号里开启这个 PRO 功能。","settings_azureblobstorage_notshowuphint_view_pro":"查看 PRO 相关设置","settings_azureblobstorage_folder":"Azure Blob Storage 里,我们会用这个前缀保存你的文件: {{remoteBaseDir}} 。","settings_azureblobstorage_containersasurl":"Container SAS Url","settings_azureblobstorage_containersasurl_desc":"目前只支持通过 Container SAS Url 进行连接。请记得同时设置 CORS。可阅读<a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">文档</a>获取更多说明。","settings_azureblobstorage_containername":"Container 名字","settings_azureblobstorage_containername_desc":"输入 Container 名字。","settings_azureblobstorage_remoteprefix":"修改远端前缀路径","settings_azureblobstorage_remoteprefix_desc":"您可以在这里修改路径前缀。如果设置为空,那么<strong>库(vault)名字</strong>会作为前缀。<strong>不允许设置空前缀。</strong>您需要点击“确认”。","settings_azureblobstorage_parts":"分块并行度","settings_azureblobstorage_parts_desc":"大文件会被分块上传。您希望同一时间最多有多少个分块被上传?","settings_azureblobstorage_generatefolderobject":"是否生成文件夹 Object","settings_azureblobstorage_generatefolderobject_desc":"Azure Blob Storage 不存在“真正”的文件夹。如果您设置了“生成”,那么插件会上传 0 字节的以“/”结尾的 Object 来代表文件夹。默认跳过生成这种文件夹 Object。","settings_azureblobstorage_generatefolderobject_notgenerate":"不生成(默认)","settings_azureblobstorage_generatefolderobject_generate":"生成","settings_azureblobstorage_connect_succ":"很好!我们可连接上 Azure Blob Storage!","settings_azureblobstorage_connect_fail":"我们未能连接上 Azure Blob Storage。","settings_export_onedrivefull_button":"导出 OneDrive (Full) 部分","settings_export_googledrive_button":"导出 Google Drive 部分","settings_export_box_button":"导出 Box 部分","settings_export_pcloud_button":"导出 pCloud 部分","settings_export_yandexdisk_button":"导出 Yandex Disk 部分","settings_export_koofr_button":"导出 Koofr 部分","settings_export_azureblobstorage_button":"导出 Azure Blob Storage 部分","settings_cleardupfiles":"删除智能处理冲突生成的重复文件","settings_cleardupfiles_desc":"如果用过智能处理冲突 (PRO) 功能,插件可能会生成重复文件。<strong>如果您真的确认了所有重复文件都不需要了,</strong>那么可以删除本地的<strong>所有</strong>这些文件。","settings_cleardupfiles_button":"开始扫描","settings_pro":"账号(PRO 付费功能)","settings_pro_tutorial":"<p>使用 Remotely Save 的<stong>基本</strong>功能是<strong>免费的</strong>,而且<strong>不</strong>需要注册对应账号。</p><p>但是,您<strong>需要</strong>注册账号和对<strong>PRO</strong>功能<strong>付费</strong>使用,如智能处理冲突功能。</p><p>第一步:点击按钮从而注册和登录网站:<a href=\\"https://remotelysave.com\\">https://remotelysave.com</a>。注意:这和 Obsidian 官方账号无关,是不同的账号。</p><p>第二部:点击“连接”按钮,从而连接本设备和在线账号。","settings_pro_features":"功能","settings_pro_features_desc":"您开通了以下功能:<br/>{{{features}}}","settings_pro_features_refresh_button":"再次检查","settings_pro_features_refresh_fetch":"正在获取数据......","settings_pro_features_refresh_succ":"已刷新!","settings_pro_revoke":"断开连接","settings_pro_revoke_desc":"您已连接上账号 {{email}}。如果要取消连接,请点击此按钮。","settings_pro_revoke_button":"断开连接","settings_pro_intro":"Remotely Save 账号","settings_pro_intro_desc":"点击此按钮,从而到网站上注册和登录。","settings_pro_intro_button":"注册或登录","settings_pro_auth":"连接","settings_pro_auth_desc":"在网站上注册和登录后,您需要“连接”本设备和在线账号。请点击按钮开始连接。","settings_pro_auth_button":"连接"}'),zh_tw:JSON.parse('{"settings_conflictaction_smart_conflict":"智慧處理衝突 (PRO) (beta)","settings_conflictaction_smart_conflict_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p><p><ul><li>小 markdown 檔案,本外掛嘗試使用 diff3 演算法合併它;</li><li>對於大檔案或非 markdown 檔案,本外掛嘗試改名字並均進行儲存。</li></ul></p><p><strong>請注意先手動備份 vault 檔案再用此功能!</strong></p>","protocol_pro_connecting":"正在連線","protocol_pro_connect_manualinput_succ":"連線成功","protocol_pro_connect_fail":"Remotely Save 官網返回錯誤。可能是網路連線不穩定。也可能是您拒絕了授權?","protocol_pro_connect_succ_revoke":"您已連線上賬號 {{email}}。如果要取消連線,請點選此按鈕。","protocol_onedrivefull_connecting":"正在連線 OneDrive……\\n請不要關閉此彈窗。","protocol_onedrivefull_connect_succ_revoke":"您已作為使用者 {{username}} 連線上了。如果您想取消連線,請點選此按鈕。","protocol_onedrivefull_connect_fail":"OneDrive 的回撥請求有點異常。您是否拒絕了鑑權?","protocol_onedrivefull_connect_unknown":"不知道如何處理此 callback:{{params}}","protocol_box_connecting":"正在連線","protocol_box_connect_manualinput_succ":"連線成功","protocol_box_connect_fail":"Box 官網返回錯誤。可能是網路連線不穩定。也可能是您拒絕了授權?","protocol_box_connect_succ_revoke":"您已連線上賬號。如果要取消連線,請點選此按鈕。","protocol_pcloud_connecting":"正在連線","protocol_pcloud_connect_manualinput_succ":"連線成功","protocol_pcloud_connect_fail":"pCloud 官網返回錯誤。可能是網路連線不穩定。也可能是您拒絕了授權?","protocol_pcloud_connect_succ_revoke":"您已連線上賬號。如果要取消連線,請點選此按鈕。","protocol_yandexdisk_connecting":"正在連線","protocol_yandexdisk_connect_manualinput_succ":"連線成功","protocol_yandexdisk_connect_fail":"Yandex Disk 官網返回錯誤。可能是網路連線不穩定。也可能是您拒絕了授權?","protocol_yandexdisk_connect_succ_revoke":"您已連線上賬號。如果要取消連線,請點選此按鈕。","protocol_koofr_connecting":"正在連線","protocol_koofr_connect_manualinput_succ":"連線成功","protocol_koofr_connect_fail":"Yandex Disk 官網返回錯誤。可能是網路連線不穩定。也可能是您拒絕了授權?","protocol_koofr_connect_succ_revoke":"您已連線上賬號。如果要取消連線,請點選此按鈕。","modal_onedrivefullauth_shortdesc":"現在只支援個人版 OneDrive,(暫)不支援企業版。\\n在瀏覽器中訪問以下地址,然後按照網頁提示操作。\\n到了最後,您應該會被自動重定向回來 Obsidian。","modal_onedrivefullauth_shortdesc_linux":"您正在用 Linux,有可能無法跳轉回來。請考慮<a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">使用</a> flatpack 版本的 Obsidian,或建立 <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> 檔案</a>。","modal_onedrivefullauth_copybutton":"點選此按鈕從而複製鑑權 url","modal_onedrivefullauth_copynotice":"鑑權 url 已複製到剪貼簿!","modal_onedrivefullrevokeauth_step1":"第 1 步:用瀏覽器開啟以下地址,點選本外掛對應的“Edit”按鈕,點選“Remove these permissions”按鈕。","modal_onedrivefullrevokeauth_step2":"第 2 步:點選以下按鈕,清理本地儲存的登入資訊。","modal_onedrivefullrevokeauth_clean":"清理本地儲存的登入資訊","modal_onedrivefullrevokeauth_clean_desc":"您需要點選“清理”按鈕。","modal_onedrivefullrevokeauth_clean_button":"清理","modal_onedrivefullrevokeauth_clean_notice":"已清理!","modal_onedrivefullrevokeauth_clean_fail":"鑑權途中出錯了。","modal_googledriveauth_tutorial":"<p>請訪問此網址,然後會進入授權流程。最後,您會看到一個碼,請複製貼上到這裡然後提交。</p>","modal_googledriveauth_copybutton":"點選以複製網址","modal_googledriveauth_copynotice":"網址已複製!","modal_googledrivce_maualinput":"網站上的碼","modal_googledrivce_maualinput_desc":"請貼上授權流程最後的那個碼,然後點選確認。","modal_googledrive_maualinput_notice":"正在嘗試連線 Google 並更新授權資訊......","modal_googledrive_maualinput_succ_notice":"很好!授權資訊已更新!","modal_googledrive_maualinput_fail_notice":"更新授權資訊失敗。請稍後重試。","modal_googledriverevokeauth_step1":"第 1 步:訪問以下網址,可以刪除連線。","modal_googledriverevokeauth_step2":"第 2 步:點選以下按鈕,從而清理本地的登入資訊。","modal_googledriverevokeauth_clean":"清理本地登入資訊","modal_googledriverevokeauth_clean_desc":"您需要點選此按鈕。","modal_googledriverevokeauth_clean_button":"清理","modal_googledriverevokeauth_clean_notice":"已清理!","modal_googledriverevokeauth_clean_fail":"清理授權時候發生了錯誤。","modal_boxauth_tutorial":"<p>請訪問此網址,然後會進入授權流程。最後,您會被重定向回來。</p>","modal_boxauth_copybutton":"點選以複製網址","modal_boxauth_copynotice":"網址已複製!","modal_box_maualinput":"網站上的碼","modal_box_maualinput_desc":"請貼上授權流程最後的那個碼,然後點選確認。","modal_box_maualinput_notice":"正在嘗試連線 Box 並更新授權資訊......","modal_box_maualinput_succ_notice":"很好!授權資訊已更新!","modal_box_maualinput_fail_notice":"更新授權資訊失敗。請稍後重試。","modal_boxrevokeauth_step1":"第 1 步:訪問以下網址,可以刪除連線。","modal_boxrevokeauth_step2":"第 2 步:點選以下按鈕,從而清理本地的登入資訊。","modal_boxrevokeauth_clean":"清理本地登入資訊","modal_boxrevokeauth_clean_desc":"您需要點選此按鈕。","modal_boxrevokeauth_clean_button":"清理","modal_boxrevokeauth_clean_notice":"已清理!","modal_boxrevokeauth_clean_fail":"清理授權時候發生了錯誤。","modal_pcloudauth_tutorial":"<p>請訪問此網址,然後會進入授權流程。最後,您會被重定向回來。</p>","modal_pcloudauth_copybutton":"點選以複製網址","modal_pcloudauth_copynotice":"網址已複製!","modal_pcloudrevokeauth_step1":"第 1 步:訪問以下網址,可以刪除連線。","modal_pcloudrevokeauth_step2":"第 2 步:點選以下按鈕,從而清理本地的登入資訊。","modal_pcloudrevokeauth_clean":"清理本地登入資訊","modal_pcloudrevokeauth_clean_desc":"您需要點選此按鈕。","modal_pcloudrevokeauth_clean_button":"清理","modal_pcloudrevokeauth_clean_notice":"已清理!","modal_pcloudrevokeauth_clean_fail":"清理授權時候發生了錯誤。","modal_yandexdiskauth_tutorial":"<p>請訪問此網址,然後會進入授權流程。最後,您會被重定向回來。</p>","modal_yandexdiskauth_copybutton":"點選以複製網址","modal_yandexdiskauth_copynotice":"網址已複製!","modal_yandexdisk_maualinput":"網站上的碼","modal_yandexdisk_maualinput_desc":"請貼上授權流程最後的那個碼,然後點選確認。","modal_yandexdisk_maualinput_notice":"正在嘗試連線 Yandex Disk 並更新授權資訊......","modal_yandexdisk_maualinput_succ_notice":"很好!授權資訊已更新!","modal_yandexdisk_maualinput_fail_notice":"更新授權資訊失敗。請稍後重試。","modal_yandexdiskrevokeauth_step1":"第 1 步:訪問以下網址,可以刪除連線。","modal_yandexdiskrevokeauth_step2":"第 2 步:點選以下按鈕,從而清理本地的登入資訊。","modal_yandexdiskrevokeauth_clean":"清理本地登入資訊","modal_yandexdiskrevokeauth_clean_desc":"您需要點選此按鈕。","modal_yandexdiskrevokeauth_clean_button":"清理","modal_yandexdiskrevokeauth_clean_notice":"已清理!","modal_yandexdiskrevokeauth_clean_fail":"清理授權時候發生了錯誤。","modal_koofrauth_tutorial":"<p>請訪問此網址,然後會進入授權流程。最後,您會被重定向回來。</p>","modal_koofrauth_copybutton":"點選以複製網址","modal_koofrauth_copynotice":"網址已複製!","modal_koofr_maualinput":"網站上的碼","modal_koofr_maualinput_desc":"請貼上授權流程最後的那個碼,然後點選確認。","modal_koofr_maualinput_notice":"正在嘗試連線 Yandex Disk 並更新授權資訊......","modal_koofr_maualinput_succ_notice":"很好!授權資訊已更新!","modal_koofr_maualinput_fail_notice":"更新授權資訊失敗。請稍後重試。","modal_koofrrevokeauth_step1":"第 1 步:訪問以下網址,可以刪除連線。","modal_koofrrevokeauth_step2":"第 2 步:點選以下按鈕,從而清理本地的登入資訊。","modal_koofrrevokeauth_clean":"清理本地登入資訊","modal_koofrrevokeauth_clean_desc":"您需要點選此按鈕。","modal_koofrrevokeauth_clean_button":"清理","modal_koofrrevokeauth_clean_notice":"已清理!","modal_koofrrevokeauth_clean_fail":"清理授權時候發生了錯誤。","modal_remoteprefix_azureblobstorage_title":"您正在修改遠端路徑字首設定","modal_remoteprefix_azureblobstorage_shortdesc":"1. 本外掛並不會自動在遠端把內容從舊資料夾移動到新資料夾。所有內容都會重新同步。\\n2. 如果你使得文字輸入框為空,那麼本設定為儲存為空,檔案將會使用 Vault 名字作為字首。\\n3. 即使您設定了端對端加密的密碼,遠端資料夾名稱本身也不會被加密。\\n4. 某些特殊字元,如“?”、“/”、“\\\\”是不允許的。文字前後的空格也會被自動刪去。","modal_remoteprefix_azureblobstorage_invaliddirhint":"您所輸入的內容含有某些特殊字元,如“?”、“/”、“\\\\”,它們是不允許的。","modal_remoteprefix_azureblobstorage_tosave":"您設定的新字首為:“{{{prefix}}}”","modal_remoteprefix_azureblobstorage_secondconfirm_empty":"字首為空,檔案會儲存在根目錄","modal_remoteprefix_azureblobstorage_secondconfirm_change":"確認修改","modal_remoteprefix_azureblobstorage_notice":"新的遠端路徑字首設定已儲存!","modal_prorevokeauth":"點選這裡和按照步驟取消授權。","modal_prorevokeauth_clean":"清理","modal_prorevokeauth_clean_desc":"清理本地授權記錄","modal_prorevokeauth_clean_button":"清理","modal_prorevokeauth_clean_notice":"清理本地授權記錄完畢","modal_prorevokeauth_clean_fail":"清理本地授權記錄粗錯。","modal_proauth_copybutton":"點選從而複製授權網址","modal_proauth_copynotice":"授權網址已複製!","modal_proauth_maualinput":"網站的授權碼","modal_proauth_maualinput_desc":"請輸入授權流程最後一步的授權碼,然後點選確認。","modal_proauth_maualinput_notice":"正在連線,請稍候......","modal_proauth_maualinput_conn_fail":"連線失敗","modal_cleardupfiles_warning":"警告:外掛只是簡單地掃描所有檔名含有 .dup 的作為重複檔案。另外,本操作只刪除本地檔案,因此您需要觸發同步來刪除遠端檔案。","modal_cleardupfiles_warning_confirm":"確認刪除","modal_cleardupfiles_warning_finished":"所有檢測到的重複檔案已被刪除!","settings_onedrivefull":"Onedrive(個人版)(Full)設定","settings_chooseservice_onedrivefull":"OneDrive(個人版)(Full)(PRO)","settings_onedrivefull_disclaimer1":"宣告:此外掛不是微軟或 OneDrive 的官方產品。","settings_onedrivefull_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了 OneDrive 有不符合預期的訪問,請立刻從 https://microsoft.com/consent 刪除記錄於此外掛的連線鑑權。","settings_onedrivefull_folder":"我們會在您的 OneDrive 上建立此資料夾並在裡面同步:/{{remoteBaseDir}}。","settings_onedrivefull_nobiz":"現在只支援個人版 OneDrive。(暫時)並不支援企業版 OneDrive。","settings_onedrivefull_revoke":"撤回鑑權","settings_onedrivefull_revoke_desc":"您現在使用了使用者名稱 {{username}} 來連線。如果想取消連線,請點選此按鈕。","settings_onedrivefull_revoke_button":"撤回鑑權","settings_onedrivefull_auth":"鑑權","settings_onedrivefull_auth_desc":"鑑權。","settings_onedrivefull_auth_button":"鑑權","settings_onedrivefull_connect_succ":"很好!我們可連線上 OneDrive!","settings_onedrivefull_connect_fail":"我們未能連線上 OneDrive。","settings_onedrivefull_emptyfile":"空檔案處理","settings_onedrivefull_emptyfile_desc":"OneDrive 不允許上傳空檔案(即使官網也是不允許的)。那麼你想跳過空檔案還是返回錯誤?","settings_onedrivefull_emptyfile_skip":"跳過","settings_onedrivefull_emptyfile_error":"返回錯誤和中斷","settings_googledrive":"Google Drive (PRO) (beta)","settings_chooseservice_googledrive":"Google Drive (PRO) (beta)","settings_googledrive_disclaimer1":"宣告:本外掛不是 Google 的官方產品。只是用到了它的公開 API。","settings_googledrive_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 Google Drive 訪問,請立刻在以下網站操作斷開連線: https://myaccount.google.com/permissions 。","settings_googledrive_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_googledrive_notshowuphint":"Google Drive 設定不可用","settings_googledrive_notshowuphint_desc":"Google Drive 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_googledrive_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_googledrive_folder":"我們會在 Google Drive 建立此資料夾並同步內容進去: {{remoteBaseDir}} 。請不要手動在網站上建立。","settings_googledrive_revoke":"撤回鑑權","settings_googledrive_revoke_desc":"您現在已連線。如果想取消連線,請點選此按鈕。","settings_googledrive_revoke_button":"撤回鑑權","settings_googledrive_auth":"鑑權","settings_googledrive_auth_desc":"鑑權.","settings_googledrive_auth_button":"鑑權","settings_googledrive_connect_succ":"很好!我們可連線上 Google Drive!","settings_googledrive_connect_fail":"我們未能連線上 Google Drive。","settings_box":"Box (PRO) (beta)","settings_chooseservice_box":"Box (PRO) (beta)","settings_box_disclaimer1":"宣告:本外掛不是 Box 的官方產品。只是用到了它的公開 API。","settings_box_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 Box 訪問,請立刻在以下網站操作斷開連線: https://app.box.com/account/security 。","settings_box_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_box_notshowuphint":"Box 設定不可用","settings_box_notshowuphint_desc":"Box 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_box_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_box_folder":"我們會在 Box 建立此資料夾並同步內容進去: {{remoteBaseDir}} 。請不要手動在網站上建立。","settings_box_revoke":"撤回鑑權","settings_box_revoke_desc":"您現在已連線。如果想取消連線,請點選此按鈕。","settings_box_revoke_button":"撤回鑑權","settings_box_auth":"鑑權","settings_box_auth_desc":"鑑權.","settings_box_auth_button":"鑑權","settings_box_connect_succ":"很好!我們可連線上 Box!","settings_box_connect_fail":"我們未能連線上 Box。","settings_pcloud":"pCloud (PRO) (beta)","settings_chooseservice_pcloud":"pCloud (PRO) (beta)","settings_pcloud_disclaimer1":"宣告:本外掛不是 pCloud 的官方產品。只是用到了它的公開 API。","settings_pcloud_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 pCloud 訪問,請立刻在以下網站操作斷開連線: https://my.pcloud.com/#page=settings&settings=tab-apps 。","settings_pcloud_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_pcloud_notshowuphint":"pCloud 設定不可用","settings_pcloud_notshowuphint_desc":"pCloud 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_pcloud_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_pcloud_folder":"我們會在 pCloud 建立此資料夾並同步內容進去: {{remoteBaseDir}} 。請不要手動在網站上建立。","settings_pcloud_revoke":"撤回鑑權","settings_pcloud_revoke_desc":"您現在已連線。如果想取消連線,請點選此按鈕。","settings_pcloud_revoke_button":"撤回鑑權","settings_pcloud_auth":"鑑權","settings_pcloud_auth_desc":"鑑權.","settings_pcloud_auth_button":"鑑權","settings_pcloud_emptyfile":"空檔案","settings_pcloud_emptyfile_desc":"pCloud API 不支援上傳空檔案,怎麼處理?","settings_pcloud_emptyfile_skip":"跳過","settings_pcloud_emptyfile_error":"提示錯誤","settings_pcloud_connect_succ":"很好!我們可連線上 pCloud!","settings_pcloud_connect_fail":"我們未能連線上 pCloud。","settings_yandexdisk":"Yandex Disk (PRO) (beta)","settings_chooseservice_yandexdisk":"Yandex Disk (PRO) (beta)","settings_yandexdisk_disclaimer1":"宣告:本外掛不是 Yandex Disk 的官方產品。只是用到了它的公開 API。","settings_yandexdisk_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 Yandex Disk 訪問,請立刻在以下網站操作斷開連線: https://id.yandex.com/profile/devices 。","settings_yandexdisk_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_yandexdisk_notshowuphint":"Yandex Disk 設定不可用","settings_yandexdisk_notshowuphint_desc":"Yandex Disk 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_yandexdisk_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_yandexdisk_folder":"我們會在 Yandex Disk 建立此資料夾並同步內容進去: {{remoteBaseDir}} 。請不要手動在網站上建立。","settings_yandexdisk_revoke":"撤回鑑權","settings_yandexdisk_revoke_desc":"您現在已連線。如果想取消連線,請點選此按鈕。","settings_yandexdisk_revoke_button":"撤回鑑權","settings_yandexdisk_auth":"鑑權","settings_yandexdisk_auth_desc":"鑑權.","settings_yandexdisk_auth_button":"鑑權","settings_yandexdisk_connect_succ":"很好!我們可連線上 Yandex Disk!","settings_yandexdisk_connect_fail":"我們未能連線上 Yandex Disk。","settings_koofr":"Koofr (PRO) (beta)","settings_chooseservice_koofr":"Koofr (PRO) (beta)","settings_koofr_disclaimer1":"宣告:本外掛不是 Koofr 的官方產品。只是用到了它的公開 API。","settings_koofr_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 Koofr 訪問,請立刻在以下網站操作斷開連線: https://app.koofr.net/app/admin/preferences/security 。","settings_koofr_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_koofr_notshowuphint":"Koofr 設定不可用","settings_koofr_notshowuphint_desc":"Koofr 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_koofr_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_koofr_folder":"我們會在 Koofr 建立此資料夾並同步內容進去: {{remoteBaseDir}} 。請不要手動在網站上建立。","settings_koofr_revoke":"撤回鑑權","settings_koofr_revoke_desc":"您現在已連線。如果想取消連線,請點選此按鈕。","settings_koofr_revoke_button":"撤回鑑權","settings_koofr_auth":"鑑權","settings_koofr_auth_desc":"鑑權.","settings_koofr_auth_button":"鑑權","settings_koofr_connect_succ":"很好!我們可連線上 Koofr!","settings_koofr_connect_fail":"我們未能連線上 Koofr。","settings_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_chooseservice_azureblobstorage":"Azure Blob Storage (PRO) (alpha)","settings_azureblobstorage_disclaimer1":"宣告:本外掛不是微軟或 Azure 的官方產品。只是用到了 Azure 的公開 API。","settings_azureblobstorage_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現任何不符合預期的 Azure Blob Storage 訪問,請立刻刪除 SAS Url 然後<a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">修改預設的 policy</a> 或賬號資訊。","settings_azureblobstorage_pro_desc":"<p><strong>!!這是 PRO(付費)功能! 您需要線上賬號來使用此功能!!</strong>(<a href=\\"#settings-pro\\">向下滑</a>可以看到 PRO 賬號的更多資訊。)</p>","settings_azureblobstorage_notshowuphint":"Azure Blob Storage 設定不可用","settings_azureblobstorage_notshowuphint_desc":"Azure Blob Storage 設定不可用,因為您沒有在 Remotely Save 賬號裡開啟這個 PRO 功能。","settings_azureblobstorage_notshowuphint_view_pro":"檢視 PRO 相關設定","settings_azureblobstorage_folder":"Azure Blob Storage 裡,我們會用這個字首儲存你的檔案: {{remoteBaseDir}} 。","settings_azureblobstorage_containersasurl":"Container SAS Url","settings_azureblobstorage_containersasurl_desc":"目前只支援透過 Container SAS Url 進行連線。請記得同時設定 CORS。可閱讀<a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/remote_services/azureblobstorage/README.md\\">文件</a>獲取更多說明。","settings_azureblobstorage_containername":"Container 名字","settings_azureblobstorage_containername_desc":"輸入 Container 名字。","settings_azureblobstorage_remoteprefix":"修改遠端字首路徑","settings_azureblobstorage_remoteprefix_desc":"您可以在這裡修改路徑字首。如果設定為空,那麼<strong>庫(vault)名字</strong>會作為字首。<strong>不允許設定空字首。</strong>您需要點選“確認”。","settings_azureblobstorage_parts":"分塊並行度","settings_azureblobstorage_parts_desc":"大檔案會被分塊上傳。您希望同一時間最多有多少個分塊被上傳?","settings_azureblobstorage_generatefolderobject":"是否生成資料夾 Object","settings_azureblobstorage_generatefolderobject_desc":"Azure Blob Storage 不存在“真正”的資料夾。如果您設定了“生成”,那麼外掛會上傳 0 位元組的以“/”結尾的 Object 來代表資料夾。預設跳過生成這種資料夾 Object。","settings_azureblobstorage_generatefolderobject_notgenerate":"不生成(預設)","settings_azureblobstorage_generatefolderobject_generate":"生成","settings_azureblobstorage_connect_succ":"很好!我們可連線上 Azure Blob Storage!","settings_azureblobstorage_connect_fail":"我們未能連線上 Azure Blob Storage。","settings_export_onedrivefull_button":"匯出 OneDrive (Full) 部分","settings_export_googledrive_button":"匯出 Google Drive 部分","settings_export_box_button":"匯出 Box 部分","settings_export_pcloud_button":"匯出 pCloud 部分","settings_export_yandexdisk_button":"匯出 Yandex Disk 部分","settings_export_koofr_button":"匯出 Koofr 部分","settings_export_azureblobstorage_button":"匯出 Azure Blob Storage 部分","settings_cleardupfiles":"刪除智慧處理衝突生成的重複檔案","settings_cleardupfiles_desc":"如果用過智慧處理衝突 (PRO) 功能,外掛可能會生成重複檔案。<strong>如果您真的確認了所有重複檔案都不需要了,</strong>那麼可以刪除本地的<strong>所有</strong>這些檔案。","settings_cleardupfiles_button":"開始掃描","settings_pro":"賬號(PRO 付費功能)","settings_pro_tutorial":"<p>使用 Remotely Save 的<stong>基本</strong>功能是<strong>免費的</strong>,而且<strong>不</strong>需要註冊對應賬號。</p><p>但是,您<strong>需要</strong>註冊賬號和對<strong>PRO</strong>功能<strong>付費</strong>使用,如智慧處理衝突功能。</p><p>第一步:點選按鈕從而註冊和登入網站:<a href=\\"https://remotelysave.com\\">https://remotelysave.com</a>。注意:這和 Obsidian 官方賬號無關,是不同的賬號。</p><p>第二部:點選“連線”按鈕,從而連線本裝置和線上賬號。","settings_pro_features":"功能","settings_pro_features_desc":"您開通了以下功能:<br/>{{{features}}}","settings_pro_features_refresh_button":"再次檢查","settings_pro_features_refresh_fetch":"正在獲取資料......","settings_pro_features_refresh_succ":"已重新整理!","settings_pro_revoke":"斷開連線","settings_pro_revoke_desc":"您已連線上賬號 {{email}}。如果要取消連線,請點選此按鈕。","settings_pro_revoke_button":"斷開連線","settings_pro_intro":"Remotely Save 賬號","settings_pro_intro_desc":"點選此按鈕,從而到網站上註冊和登入。","settings_pro_intro_button":"註冊或登入","settings_pro_auth":"連線","settings_pro_auth_desc":"在網站上註冊和登入後,您需要“連線”本裝置和線上賬號。請點選按鈕開始連線。","settings_pro_auth_button":"連線"}')},Zj={en:JSON.parse('{"confirm":"Confirm","disable":"Disable","enable":"Enable","goback":"Go Back","submit":"Submit","sometext":"Here are some texts.","syncrun_alreadyrunning":"New command {{newTriggerSource}} stops because {{pluginName}} is already running in stage {{syncStatus}}!","syncrun_syncingribbon":"{{pluginName}}: syncing from {{triggerSource}}","syncrun_step0":"0/8 Remotely Save is running in dry mode, thus not actual file changes would happen.","syncrun_step1":"1/8 Remotely Save is preparing ({{serviceType}})","syncrun_step2":"2/8 Starting to fetch remote meta data and check password.","syncrun_passworderr":"Something goes wrong while checking password.","syncrun_step3":"3/8 Starting to process remote data.","syncrun_step4":"4/8 Starting to fetch local meta data.","syncrun_step5":"5/8 Starting to fetch local prev sync data.","syncrun_step6":"6/8 Starting to generate sync plan.","syncrun_step7":"7/8 Remotely Save Sync data is exchanging!","syncrun_step7skip":"7/8 Remotely Save real sync is skipped in dry run mode.","syncrun_step8":"8/8 Remotely Save finished!","syncrun_shortstep0":"0/2 Remotely Save is running in dry mode, not actual file changes would happen.","syncrun_shortstep1":"1/2 Remotely Save starts running ({{serviceType}})","syncrun_shortstep2skip":"2/2 Remotely Save real sync is skipped in dry run mode.","syncrun_shortstep2":"2/2 Remotely Save finished!","syncrun_abort":"{{manifestID}}-{{theDate}}: abort sync, triggerSource={{triggerSource}}, error while {{syncStatus}}","syncrun_abort_protectmodifypercentage":"Abort! you set changing files >= {{protectModifyPercentage}}% is not allowed but {{realModifyDeleteCount}}/{{allFilesCount}}={{percent}}% is going to be modified or deleted! If you are sure you want this sync, please adjust the allowed ratio in the settings.","protocol_saveqr":"New settings for {{manifestName}} is imported and saved. Reopen the plugin settings to make it effective.","protocol_callbacknotsupported":"Your uri calls a callback that\'s not supported yet: {{params}}","protocol_dropbox_connecting":"Connecting to Dropbox...\\nPlease DO NOT close this modal.","protocol_dropbox_connect_succ":"Good! We\'ve connected to Dropbox as user {{username}}!","protocol_dropbox_connect_succ_revoke":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","protocol_dropbox_connect_fail":"Something went wrong from response from Dropbox. Maybe the network connection is not good. Maybe you rejected the auth?","protocol_dropbox_connect_unknown":"Do not know how to deal with the callback: {{params}}","protocol_dropbox_no_modal":"You are not startting Dropbox connection from the settings page. Abort.","protocol_onedrive_connecting":"Connecting to OneDrive...\\nPlease DO NOT close this modal.","protocol_onedrive_connect_succ_revoke":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","protocol_onedrive_connect_fail":"Something went wrong from response from OneDrive. Maybe you rejected the auth?","protocol_onedrive_connect_unknown":"Do not know how to deal with the callback: {{params}}","command_startsync":"start sync","command_drynrun":"start sync (dry run only)","command_exportsyncplans_1_only_change":"export sync plans (latest 1) (change part)","command_exportsyncplans_1":"export sync plans (latest 1)","command_exportsyncplans_5":"export sync plans (latest 5)","command_exportsyncplans_all":"export sync plans (all)","command_exportlogsindb":"export logs saved in db","statusbar_sync_source_manual":"Manual: ","statusbar_sync_source_dry":"Dry: ","statusbar_sync_source_auto":"Auto: ","statusbar_sync_source_auto_once_init":"Auto (init): ","statusbar_sync_source_auto_sync_on_save":"Auto (save): ","statusbar_sync_status_prefix_success":"Successfully synced ","statusbar_sync_status_prefix_failed":"Failed to sync ","statusbar_time_years":"{{time}} years ago","statusbar_time_months":"{{time}} months ago","statusbar_time_weeks":"{{time}} weeks ago","statusbar_time_days":"{{time}} days ago","statusbar_time_hours":"{{time}} hours ago","statusbar_time_minutes":"{{time}} minutes ago","statusbar_time_lessminute":"last minute ago","statusbar_time_now":"just now","statusbar_syncing":"Syncing...","statusbar_lastsync_label":"on {{date}}","statusbar_lastsync_never":"Never Synced","statusbar_lastsync_never_label":"Never Synced before","modal_password_title":"Hold on and PLEASE READ ON...","modal_password_shortdesc":"If the field is not empty, files would be encrypted locally before being uploaded.\\nIf the field is empty, then files would be uploaded without encryption.","modal_password_attn1":"Attention 1/5: The vault name is NOT encrypted. The plugin creates a folder with the vault name on some remote services.","modal_password_attn2":"Attention 2/5: The password itself is stored in PLAIN TEXT LOCALLY.","modal_password_attn3":"Attention 3/5: Some metadata are not encrypted or can be easily guessed. (File sizes are closed to their unencrypted ones, and directory path may be stored as 0-byte-size object.)","modal_password_attn4":"Attention 4/5: You should make sure the remote store IS EMPTY, or REMOTE FILES WERE ENCRYPTED BY THAT NEW PASSWORD, to avoid conflicts.","modal_password_attn5":"Attention 5/5: The longer the password, the better.","modal_password_secondconfirm":"The Second Confirm to change password.","modal_password_notice":"New password saved!","modal_encryptionmethod_title":"Hold on and PLEASE READ ON...","modal_encryptionmethod_shortdesc":"You are changing the encrpytion method but you have set the password before.\\nAfter switching the method, you need to <b>manually</b> and <b>fully</b> delete every encrypted vault files in the remote and re-sync (so that re-upload) the newly encrypted files again.","modal_remotebasedir_title":"You are changing the remote base directory config","modal_remotebasedir_shortdesc":"1. The plugin would NOT automatically move the content from the old directory to the new one directly on the remote. Everything syncs from the beginning again.\\n2. If you set the string to the empty, the config would be reset to use the vault folder name (the default config).\\n3. The remote directory name itself would not be encrypted even you\'ve set an E2E password.\\n4. Some special char like \'?\', \'/\', \'\\\\\' are not allowed. Spaces in the beginning or in the end are also trimmed.","modal_remotebasedir_invaliddirhint":"Your input contains special characters like \'?\', \'/\', \'\\\\\' which are not allowed.","modal_remotebasedir_secondconfirm_vaultname":"Reset To The Default Vault Folder Name","modal_remotebasedir_secondconfirm_change":"Confirm To Change","modal_remotebasedir_notice":"New remote base directory config saved!","modal_remoteprefix_s3_title":"You are changing the remote prefix config","modal_remoteprefix_s3_shortdesc":"1. The plugin would NOT automatically move the content from the old directory to the new one directly on the remote. Everything syncs from the beginning again.\\n2. If you set the string to the empty, the prefix will be empty and the files will be saved at the root of the bucket.\\n3. The remote directory name itself would not be encrypted even you\'ve set an E2E password.\\n4. Some special char like \'?\', \'/\', \'\\\\\' are not allowed. Spaces in the beginning or in the end are also trimmed.","modal_remoteprefix_s3_invaliddirhint":"Your input contains special characters like \'?\', \'/\', \'\\\\\' which are not allowed.","modal_remoteprefix_s3_tosave":"The prefix to save is \\"{{{prefix}}}\\"","modal_remoteprefix_s3_secondconfirm_empty":"The prefix is empty and the files will be saved at the root of the bucket.","modal_remoteprefix_s3_secondconfirm_change":"Confirm To Change","modal_remoteprefix_s3_notice":"New remote prefix config saved!","modal_dropboxauth_manualsteps":"Step 1: Visit the address in a browser, and follow the steps.\\nStep 2: In the end of the web flow, you obtain a long code. Paste it here then click \\"Submit\\".","modal_dropboxauth_autosteps":"Visit the address in a browser, and follow the steps.\\nFinally you should be redirected to Obsidian.","modal_dropboxauth_copybutton":"Click to copy the auth url","modal_dropboxauth_copynotice":"The auth url is copied to the clipboard!","modal_dropboxauth_maualinput":"Auth Code from web page","modal_dropboxauth_maualinput_desc":"You need to click \\"Confirm\\".","modal_dropboxauth_maualinput_notice":"Trying to connect to Dropbox","modal_dropboxauth_maualinput_conn_succ":"Good! We\'ve connected to Dropbox as user {{username}}!","modal_dropboxauth_maualinput_conn_succ_revoke":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","modal_dropboxauth_maualinput_conn_fail":"Something goes wrong while connecting to Dropbox.","modal_onedriveauth_shortdesc":"Currently only OneDrive for personal is supported. OneDrive for Business is NOT supported (yet).\\nVisit the address in a browser, and follow the steps.\\nFinally you should be redirected to Obsidian.","modal_onedriveauth_shortdesc_linux":"It seems that you are using Obsidian on Linux, and you might not be able to jump back here properly. Please consider <a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">using</a> the flatpack version of Obsidian, or creating an <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> file</a>.","modal_onedriveauth_copybutton":"Click to copy the auth url","modal_onedriveauth_copynotice":"The auth url is copied to the clipboard!","modal_onedriverevokeauth_step1":"Step 1: Go to the following address, click the \\"Edit\\" button for the plugin, then click \\"Remove these permissions\\" button on the page.","modal_onedriverevokeauth_step2":"Step 2: Click the button below, to clean the locally-saved login credentials.","modal_onedriverevokeauth_clean":"Clean Locally-Saved Login Credentials","modal_onedriverevokeauth_clean_desc":"You need to click the button.","modal_onedriverevokeauth_clean_button":"Clean","modal_onedriverevokeauth_clean_notice":"Cleaned!","modal_onedriverevokeauth_clean_fail":"Something goes wrong while revoking.","modal_syncconfig_attn":"Attention 1/2: This only syncs (copies) the whole Obsidian config dir, not other startting-with-dot folders or files. Except for ignoring folders .git and node_modules, it also doesn\'t understand the meaning of sub-files and sub-folders inside the config dir.\\nAttention 2/2: After the config dir is synced, plugins settings might be corrupted, and Obsidian might need to be restarted to load the new settings.\\nIf you are agreed to take your own risk, please click the following second confirm button.","modal_syncconfig_secondconfirm":"The Second Confirm To Enable.","modal_syncconfig_notice":"You\'ve enabled syncing config folder!","modal_qr_shortdesc":"This exports (partial) settings.\\nYou can use another device to scan this qrcode.\\nOr, you can click the button to copy the special uri and paste it into another device\'s web browser or Remotely Save Import Setting.","modal_qr_button":"Click to copy the special URI","modal_qr_button_notice":"The special uri is copied to the clipboard!","modal_sizesconflict_title":"Remotely Save: Some conflict were found while skipping large files","modal_sizesconflict_desc":"You\'ve set skipping files larger than {{thresholdMB}} MB ({{thresholdBytes}} bytes).\\nBut the following files have sizes larger than the threshold on one side, and sizes smaller than the threshold on the other side.\\nTo avoid unexpected overwriting or deleting, the plugin stops, and you have to manually deal with at least one side of the files.","modal_sizesconflict_copybutton":"Click to copy all the below sizes conflicts info","modal_sizesconflict_copynotice":"All the sizes conflicts info have been copied to the clipboard!","settings_basic":"Basic Settings","settings_password":"Encryption Password","settings_password_desc":"Password for E2E encryption. Empty for no password. You need to click \\"Confirm\\". Attention: The password and other info are saved locally. After changing the password, you need to manually delete all files from the remote location and re-sync to upload the encrypted files again.","settings_encryptionmethod":"Encryption Method","settings_encryptionmethod_desc":"Encryption method for E2E encryption. The RClone Crypt format is recommended, although it does not encrypt the path structure. OpenSSL enc is the legacy format of this plugin. <b>Both are not affliated with the official RClone and OpenSSL products or communities.</b> Attention: After switching encryption methods, you need to manually delete all original files from the remote location and re-sync to upload the encrypted files again. More info is available in the <a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/encryption\'>online doc</a>.","settings_encryptionmethod_rclone":"RClone Crypt (recommended)","settings_encryptionmethod_openssl":"OpenSSL enc (legacy)","settings_autorun":"Schedule For Auto Run","settings_autorun_desc":"The plugin tries to schedule the running after every interval. Battery may be impacted.","settings_autorun_notset":"(not set)","settings_autorun_1min":"every 1 minute","settings_autorun_5min":"every 5 minutes","settings_autorun_10min":"every 10 minutes","settings_autorun_30min":"every 30 minutes","settings_runoncestartup":"Run Once On Start Up Automatically","settings_runoncestartup_desc":"This setting causes the sync to run once automatically at startup. Changes will take effect on the NEXT startup. This setting is different from the \\"schedule for auto run\\" setting, which initiates syncing after every specified interval.","settings_runoncestartup_notset":"(not set)","settings_runoncestartup_1sec":"sync once after 1 second of start up","settings_runoncestartup_10sec":"sync once after 10 seconds of start up","settings_runoncestartup_30sec":"sync once after 30 seconds of start up","settings_synconsave":"Sync On Save (experimental)","settings_synconsave_desc":"If you change your file, the plugin tries to trigger a sync.","settings_synconsave_disable":"Disable (default)","settings_synconsave_enable":"Enable","settings_skiplargefiles":"Skip Large Files","settings_skiplargefiles_desc":"Skip files with sizes larger than the threshold. Here 1 MB = 10^6 bytes.","settings_skiplargefiles_notset":"(not set)","settings_ignorepaths":"Regex Of Paths To Ignore","settings_ignorepaths_desc":"Regex of paths of folders or files to ignore. One regex per line. The path is relative to the vault root without leading slash. Non-empty allow paths and non-empty ignore paths are effective together.","settings_onlyallowpaths":"Regex Of Paths To Allow","settings_onlyallowpaths_desc":"Regex of paths of folders or files to allow to sync. One regex per line. The path is relative to the vault root without leading slash. If this setting is not empty, all paths you want to sync including config dirs must be explicitly set here. Non-empty allow paths and non-empty ignore paths are effective together.","settings_enablestatusbar_info":"Show Last Successful Sync In Status Bar","settings_enablestatusbar_info_desc":"Show the time of the last successful sync in the status bar.","settings_enablestatusbar_reloadrequired_notice":"Reload the plugin for the changes to take effect.","settings_resetstatusbar_time":"Reset Last Successful Sync Time","settings_resetstatusbar_time_desc":"Reset last successful sync time.","settings_resetstatusbar_button":"Reset","settings_resetstatusbar_notice":"Reset done!","settings_checkonnectivity":"Check Connectivity","settings_checkonnectivity_desc":"Check connectivity.","settings_checkonnectivity_button":"Check","settings_checkonnectivity_checking":"Checking...","settings_remotebasedir":"Change The Remote Base Directory (experimental)","settings_remotebasedir_desc":"By default the content is synced to a remote directory with the same name as the vault name. You can change the remote folder name here, or keep the input field empty to reset to the default. You need to click \\"Confirm\\".","settings_remoteprefix_s3":"Change The Remote Prefix (experimental)","settings_remoteprefix_s3_desc":"By default in s3 the files are saved at the root of the bucket. You can change the remote prefix here, or keep the input field empty to reset to the default. You need to click \\"Confirm\\".","settings_s3":"Remote For S3 or compatible","settings_s3_disclaimer1":"Disclaimer: This plugin is NOT an official Amazon product.","settings_s3_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your bucket, please immediately delete the access key on your AWS (or other S3-service provider) settings.","settings_s3_cors":"You need to configure CORS to allow requests from origin app://obsidian.md and capacitor://localhost and http://localhost, and add ETag into exposed headers.","settings_s3_prod":"Some Amazon S3 official docs for references:","settings_s3_prod1":"Endpoint and region info","settings_s3_prod2":"Access Key ID and Secret Access Key info","settings_s3_prod3":"Configuring CORS","settings_s3_endpoint":"Endpoint","settings_s3_region":"Region","settings_s3_region_desc":"If you are not sure what to enter, you could try the value: us-east-1 .","settings_s3_accesskeyid":"Access Key ID","settings_s3_accesskeyid_desc":"Access key ID. Attention: Access key ID and other info are saved locally.","settings_s3_secretaccesskey":"Secret Access Key","settings_s3_secretaccesskey_desc":"Secret access key. Attention: Secret access key and other info are saved locally.","settings_s3_bucketname":"Bucket Name","settings_s3_bypasscorslocally":"Bypass CORS Issue Locally","settings_s3_bypasscorslocally_desc":"The plugin allows skipping server CORS config in new version of Obsidian ( desktop>=0.13.25 or iOS>=1.1.1 or Android>=1.2.1). If you encounter any issues, please disable this setting and config CORS on servers (allowing requests from app://obsidian.md and capacitor://localhost and http://localhost and add ETag into exposed headers).","settings_s3_parts":"Parts Concurrency","settings_s3_parts_desc":"Large files are split into small parts to upload in S3. How many parts do you want to upload in parallel at most?","settings_s3_accuratemtime":"Use Accurate MTime","settings_s3_accuratemtime_desc":"Read the uploaded accurate last modified time for better sync algorithm. But it causes extra api requests / time / money to the S3 endpoint.","settings_s3_urlstyle":"S3 URL style","settings_s3_urlstyle_desc":"Whether to force path-style URLs for S3 objects (e.g., https://s3.amazonaws.com/*/ instead of https://*.s3.amazonaws.com/).","settings_s3_reverse_proxy_no_sign_url":"S3 Reverse Proxy (No Sign) Url (experimental)","settings_s3_reverse_proxy_no_sign_url_desc":"S3 reverse proxy url without signature. This is useful if you use a revers proxy but do not change the original credential signature. No http(s):// prefix. Leave it blank if you don\'t know what it is.","settings_s3_generatefolderobject":"Generate Folder Object Or Not","settings_s3_generatefolderobject_desc":"S3 doesn\'t have \\"real\\" folder. If you set \\"Generate\\" here (or use old version), the plugin will upload a zero-byte object endding with \\"/\\" to represent the folder. In the new version, the plugin skips generating folder object by default.","settings_s3_generatefolderobject_notgenerate":"Not generate (default)","settings_s3_generatefolderobject_generate":"Generate","settings_s3_connect_succ":"Great! The bucket can be accessed.","settings_s3_connect_fail":"The S3 bucket cannot be reached.","settings_dropbox":"Remote For Dropbox","settings_dropbox_disclaimer1":"Disclaimer: This app is NOT an official Dropbox product.","settings_dropbox_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Dropbox, please immediately disconnect this app on https://www.dropbox.com/account/connected_apps .","settings_dropbox_folder":"We will create and sync inside the folder /Apps/{{pluginID}}/{{remoteBaseDir}} on your Dropbox.","settings_dropbox_revoke":"Revoke Auth","settings_dropbox_revoke_desc":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","settings_dropbox_revoke_button":"Revoke Auth","settings_dropbox_revoke_notice":"Revoked!","settings_dropbox_revoke_noticeerr":"Something goes wrong while revoking.","settings_dropbox_clearlocal":"Clear Locally Saved Credentials","settings_dropbox_clearlocal_desc":"You can forcefully clear the locally saved Dropbox login credentials, but not send revoke auth request to the server.","settings_dropbox_clearlocal_button":"Clear","settings_dropbox_clearlocal_notice":"Cleared!","settings_dropbox_auth":"Auth","settings_dropbox_auth_desc":"Auth.","settings_dropbox_auth_button":"Auth","settings_dropbox_connect_succ":"Great! We can connect to Dropbox!","settings_dropbox_connect_fail":"We cannot connect to Dropbox.","settings_onedrive":"Remote For Onedrive (for personal) (App Folder)","settings_onedrive_disclaimer1":"Disclaimer: This app is NOT an official Microsoft / OneDrive product.","settings_onedrive_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Onedrive, please immediately disconnect this app on https://microsoft.com/consent .","settings_onedrive_folder":"We will create and sync inside the folder /Apps/{{pluginID}}/{{remoteBaseDir}} on your OneDrive.","settings_onedrive_nobiz":"Currently only OneDrive for personal is supported. OneDrive for Business is NOT supported (yet).","settings_onedrive_revoke":"Revoke Auth","settings_onedrive_revoke_desc":"You\'ve connected as user {{username}}. If you want to disconnect, click this button.","settings_onedrive_revoke_button":"Revoke Auth","settings_onedrive_auth":"Auth","settings_onedrive_auth_desc":"Auth.","settings_onedrive_auth_button":"Auth","settings_onedrive_connect_succ":"Great! We can connect to OneDrive!","settings_onedrive_connect_fail":"We cannot connect to OneDrive.","settings_onedrive_emptyfile":"Empty File Handling","settings_onedrive_emptyfile_desc":"OneDrive doesn\'t allow uploading empty file (even in its official website). Do you want to show up errors or silently skip the empty files?","settings_onedrive_emptyfile_skip":"Skip","settings_onedrive_emptyfile_error":"Error and abort","settings_webdav":"Remote For Webdav","settings_webdav_disclaimer1":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins may read the info. If you see any unintentional access to your webdav server, please immediately change the username and password.","settings_webdav_cors_os":"Obsidian desktop>=0.13.25 or iOS>=1.1.1 or Android>=1.2.1 supports bypassing CORS locally. But you are using an old version, and you\'re suggested to upgrade Obsidian.","settings_webdav_cors":"You need to configure CORS to allow requests from origin app://obsidian.md and capacitor://localhost and http://localhost","settings_webdav_folder":"We will create and sync inside the folder /{{remoteBaseDir}} on your server.","settings_webdav_addr":"Server Address","settings_webdav_addr_desc":"Server address.","settings_webdav_user":"Username","settings_webdav_user_desc":"Username. Attention: the username and other info are saved locally.","settings_webdav_password":"Password","settings_webdav_password_desc":"Password. Attention: the password and other info are saved locally.","settings_webdav_auth":"Auth Type","settings_webdav_auth_desc":"If no password is provided, this option will be ignored.","settings_webdav_depth":"Depth Header Sent To Servers","settings_webdav_depth_desc":"Webdav servers should be configured to allow requests with header Depth being \'1\' or \'Infinity\'. If you are not sure what\'s this, choose \\"depth=\'1\'\\". If you are sure your server supports depth=\'infinity\', please choose that to get way better performance.","settings_webdav_depth_1":"only supports depth=\'1\'","settings_webdav_depth_inf":"supports depth=\'infinity\'","settings_webdav_customheaders":"Custom Headers Sent To Servers","settings_webdav_customheaders_desc":"Some users may want to set custom headers. If you don\'t know what it is, just leave it empty. Input them like: <code>X-Header1:value1</code> in each line. All spaces around header keys and values will be removed.","settings_webdav_connect_succ":"Great! The webdav server can be accessed.","settings_webdav_connect_fail":"The webdav server cannot be reached (possible to be any of address/username/password/authtype errors).","settings_webdav_connect_fail_withcors":"The webdav server cannot be reached (possible to be any of address/username/password/authtype/CORS errors).","settings_webdis":"Remote For Webdis","settings_webdis_disclaimer1":"Disclaimer: This app is NOT an official Redis® Ltd / Redis® OSS / Webdis product. Redis is a registered trademark of Redis Ltd.","settings_webdis_disclaimer2":"Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins may read the info. If you see any unintentional access to your Webdis server, please immediately change the username and password.","settings_webdis_folder":"We will store the value with keys prefixed by :{{remoteBaseDir}} on your server.","settings_webdis_addr":"Server Address","settings_webdis_addr_desc":"Server address.","settings_webdis_user":"Username","settings_webdis_user_desc":"Username. Attention: the username and other info are saved locally.","settings_webdis_password":"Password","settings_webdis_password_desc":"Password. Attention: the password and other info are saved locally.","settings_webdis_connect_succ":"Great! The Webdis server can be accessed.","settings_webdis_connect_fail":"The Webdis server cannot be reached (possible to be any of address/username/password errors).","settings_chooseservice":"Choose A Remote Service","settings_chooseservice_desc":"Start here. What service are you connecting to? S3, Dropbox, Webdav, OneDrive for personal, or Webdis?","settings_chooseservice_s3":"S3 or compatible","settings_chooseservice_dropbox":"Dropbox","settings_chooseservice_webdav":"Webdav","settings_chooseservice_onedrive":"OneDrive for personal","settings_chooseservice_webdis":"Webdis (HTTP for Redis®)","settings_adv":"Advanced Settings","settings_concurrency":"Concurrency","settings_concurrency_desc":"How many files do you want to download or upload in parallel at most? By default it\'s set to 5. If you meet any problems such as rate limit, you can reduce the concurrency to a lower value.","settings_syncunderscore":"Sync _ Files Or Folders","settings_syncunderscore_desc":"Sync files or folders starting with _ (\\"underscore\\") or not","settings_configdir":"Sync Config Dir (experimental)","settings_configdir_desc":"Sync config dir {{configDir}} or not (inner folder .git and node_modules would be ignored). Please be aware that this may impact all your plugins\' or Obsidian\'s settings, and may require you restart Obsidian after sync. Enable this at your own risk.","settings_bookmarks":"Sync Bookmarks (experimental)","settings_bookmarks_desc":"Sync {{configDir}}/bookmarks.json or not. If you sync config dir, this option will be ignore and treated as \\"enabled\\".","settings_deletetowhere":"Deletion Destination","settings_deletetowhere_desc":"Which trash should the plugin put the files into while deleting?","settings_deletetowhere_system_trash":"system trash (default)","settings_deletetowhere_obsidian_trash":"Obsidian .trash folder","settings_conflictaction":"Action For Conflict","settings_conflictaction_desc":"<p>If a file is created or modified on both side since last update, it\'s a conflict event. How to deal with it? This only works for bidirectional sync.</p>","settings_conflictaction_keep_newer":"newer version survives (default)","settings_conflictaction_keep_larger":"larger size version survives","settings_cleanemptyfolder":"Action For Empty Folders","settings_cleanemptyfolder_desc":"The sync algorithm majorly deals with files, so you need to specify how to deal with empty folders.","settings_cleanemptyfolder_skip":"leave them as is (default)","settings_cleanemptyfolder_clean_both":"delete local and remote","settings_protectmodifypercentage":"Abort Sync If Modification Above Percentage","settings_protectmodifypercentage_desc":"Abort the sync if more than n% of the files are going to be deleted / modified. Useful to protect users\' files from unexpected modifications. You can set to 100 to disable the protection, or set to 0 to always block the sync.","settings_protectmodifypercentage_000_desc":"0 (always block)","settings_protectmodifypercentage_050_desc":"50 (default)","settings_protectmodifypercentage_100_desc":"100 (disable the protection)","settings_protectmodifypercentage_custom_desc":"custom","settings_protectmodifypercentage_customfield":"Custom Abort Sync If Modification Above Percentage","settings_protectmodifypercentage_customfield_desc":"You need to enter a number between 0 (inclusive) and 100 (inclusive). Float number is also allowed.","setting_syncdirection":"Sync Direction (experimental)","setting_syncdirection_desc":"<p>Which direction should the plugin sync to? Please be aware that only CHANGED files (based on time and size) are synced regardless any option.</p><ol><li>Bidirectional: Changes on both side are synced to the other side.</li><li>Incremental Push: Locally created or modifed files are copied to remote.</li><li>Incremental Pull: Remotely created or modifed files are copied to local.</li><li>Incremental Push And Delete: Locally created or modifed files are copied to remote, <strong>and local deletion operations are run on remote too.</strong></li><li>Incremental Pull And Delete: Remotely created or modifed files are copied to local, <strong>and remote deletion operations are run on local too.</strong></li></ol>","setting_syncdirection_bidirectional_desc":"Bidirectional (default)","setting_syncdirection_incremental_push_only_desc":"Incremental Push (aka backup mode)","setting_syncdirection_incremental_pull_only_desc":"Incremental Pull","setting_syncdirection_incremental_push_and_delete_only_desc":"Incremental Push And Delete","setting_syncdirection_incremental_pull_and_delete_only_desc":"Incremental Pull And Delete","settings_enablemobilestatusbar":"Mobile Status Bar (experimental)","settings_enablemobilestatusbar_desc":"By default Obsidian mobile hides status bar. But some users want to show it up. So here is a hack.","settings_importexport":"Import and Export Partial Settings","settings_export":"Export","settings_export_desc":"Export settings by generating a QR code or URI.","settings_export_basic_and_advanced_button":"Export Basic And Advanced Part","settings_export_s3_button":"Export S3 Part","settings_export_dropbox_button":"Export Dropbox Part","settings_export_onedrive_button":"Export OneDrive (App Folder) Part","settings_export_webdav_button":"Export Webdav Part","settings_export_webdis_button":"Export Webdis Part","settings_import":"Import","settings_import_desc":"Paste the exported URI into here and click \\"Import\\". Or, you can open a camera or scan-qrcode app to scan the QR code.","settings_import_button":"Import","settings_import_error_notice":"Your URI string is empty or not correct!","settings_debug":"Debug","settings_debuglevel":"Alter Notice Level","settings_debuglevel_desc":"By default the notice level is \\"info\\". You can change to \\"debug\\" to get verbose information while syncing.","settings_outputsettingsconsole":"Output Current Settings From Disk To Console","settings_outputsettingsconsole_desc":"The settings save on disk in encoded. Click this to see the decoded settings in console.","settings_outputsettingsconsole_button":"Output","settings_outputsettingsconsole_notice":"Finished outputing in console.","settings_obfuscatesettingfile":"Obfuscate The Setting File Or Not","settings_obfuscatesettingfile_desc":"The setting file (data.json) has some sensitive information. It\'s strongly recommended to obfuscate it to avoid unexpected read and modification. If you are sure to view and edit it manually, you can disable the obfuscation.","settings_viewconsolelog":"View Console Log","settings_viewconsolelog_desc":"On desktop, please press \\"ctrl+shift+i\\" or \\"cmd+option+i\\" to view the log. On mobile, please install the third-party plugin <a href=\'https://obsidian.md/plugins?search=Logstravaganza\'>Logstravaganza</a> to export the console log to a note.","settings_syncplans":"Export Sync Plans","settings_syncplans_desc":"Sync plans are created every time after you trigger sync and before the actual sync. Useful to know what would actually happen in those sync. Click the button to export sync plans.","settings_syncplans_button_1_only_change":"Export latest 1 (change part)","settings_syncplans_button_5_only_change":"Export latest 5 (change part)","settings_syncplans_button_1":"Export latest 1","settings_syncplans_button_5":"Export latest 5","settings_syncplans_button_all":"Export All","settings_syncplans_notice":"Sync plans history exported.","settings_delsyncplans":"Delete Sync Plans History In DB","settings_delsyncplans_desc":"Delete sync plans history in DB.","settings_delsyncplans_button":"Delete Sync Plans History","settings_delsyncplans_notice":"Sync plans history (in DB) deleted.","settings_delprevsync":"Delete Prev Sync Details In DB","settings_delprevsync_desc":"The sync algorithm keeps the previous successful sync information in DB to determine the file changes. If you want to ignore them so that all files are treated newly created, you can delete the prev sync info here.","settings_delprevsync_button":"Delete Prev Sync Details","settings_delprevsync_notice":"Previous sync history (in local DB) deleted","settings_profiler_results":"Export Profiler Results","settings_profiler_results_desc":"The plugin records the time cost of each steps. Here you can export them to know which step is slow.","settings_profiler_results_notice":"Profiler results exported.","settings_profiler_results_button_all":"Export All","settings_profiler_enableprofiler":"Enable Profiler","settings_profiler_enableprofiler_desc":"Collect performance data or not?","settings_profiler_enabledebugprint":"Enable Profiler Printing","settings_profiler_enabledebugprint_desc":"Print profiler result in each insertion to console or not?","settings_profiler_recordsize":"Enable Profiler Recording Size","settings_profiler_recordsize_desc":"Let profiler record object sizes or not?","settings_outputbasepathvaultid":"Output Vault Base Path And Randomly Assigned ID","settings_outputbasepathvaultid_desc":"For debugging purposes.","settings_outputbasepathvaultid_button":"Output","settings_resetcache":"Reset Local Internal Cache/Databases","settings_resetcache_desc":"Reset local internal caches/databases (for debugging purposes). You would want to reload the plugin after resetting this. This option will not empty the {s3, password...} settings.","settings_resetcache_button":"Reset","settings_resetcache_notice":"Local internal cache/databases deleted. Please manually reload the plugin.","syncalgov3_title":"Remotely Save has HUGE updates on the sync algorithm","syncalgov3_texts":"Welcome to use Remotely Save!\\nFrom this version, a new algorithm has been developed:\\n<ul><li>More robust deletion sync,</li><li>minimal conflict handling,</li><li>no meta data uploaded any more,</li><li>deletion / modification protection,</li><li>backup mode</li><li>new encryption method</li><li>...</li></ul>\\nStay tune for more! A full introduction is in the <a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/sync_algorithm/v3/intro.md\'>doc website</a>.\\nIf you agree to use this, please read and check two checkboxes then click the \\"Agree\\" button, and enjoy the plugin!\\nIf you do not agree, please click the \\"Do Not Agree\\" button, the plugin will unload itself.\\nAlso, please consider <a href=\'https://github.com/remotely-save/remotely-save\'>visit the GitHub repo and star ⭐ it</a>! Or even <a href=\'https://github.com/remotely-save/donation\'>buy me a coffee</a>. Your support is very important to me! Thanks!","syncalgov3_checkbox_manual_backup":"I will backup my vault manually firstly.","syncalgov3_checkbox_requiremultidevupdate":"I understand I need to update the plugin ACROSS ALL DEVICES to make them work properly.","syncalgov3_button_agree":"Agree","syncalgov3_button_disagree":"Do Not Agree","menu_check_file_stat":"Check file stats"}'),zh_cn:JSON.parse('{"confirm":"确认","disable":"关闭","enable":"开启","goback":"返回","submit":"提交","sometext":"这里有一段文字。","syncrun_alreadyrunning":"{{pluginName}} 正处于此阶段:{{syncStatus}}!中断触发 {{newTriggerSource}}。","syncrun_syncingribbon":"{{pluginName}}:正在由 {{triggerSource}} 触发运行","syncrun_step0":"0/8 Remotely Save 在空跑(dry run)模式,不会发生实际的文件交换。","syncrun_step1":"1/8 Remotely Save 准备同步({{serviceType}})","syncrun_step2":"2/8 正在获取远端的元数据和检查密码。","syncrun_passworderr":"检查密码时候出错。","syncrun_step3":"3/8 正在处理远端的元数据。","syncrun_step4":"4/8 正在获取本地的元数据。","syncrun_step5":"5/8 正在获取本地上一次同步的元数据。","syncrun_step6":"6/8 正在生成同步计划。","syncrun_step7":"7/8 Remotely Save 开始发生数据交换!","syncrun_step7skip":"7/8 Remotely Save 在空跑模式,跳过实际数据交换步骤。","syncrun_step8":"8/8 Remotely Save 已完成同步!","syncrun_shortstep0":"0/2 Remotely Save 在空跑(dry run)模式,不会发生实际的文件交换。","syncrun_shortstep1":"1/2 Remotely Save 开始同步({{serviceType}})","syncrun_shortstep2skip":"2/2 Remotely Save 在空跑模式,跳过实际数据交换步骤。","syncrun_shortstep2":"2/2 Remotely Save 已完成同步!","syncrun_abort":"{{manifestID}}-{{theDate}}:中断同步,同步来源={{triggerSource}},出错阶段={{syncStatus}}","syncrun_abort_protectmodifypercentage":"中断同步!您设置了不允许 >= {{protectModifyPercentage}}% 的变更,但是现在 {{realModifyDeleteCount}}/{{allFilesCount}}={{percent}}% 的文件会被修改或删除!如果您确认这次同步是您想要的,那么请在设置里修改允许比例。","protocol_saveqr":" {{manifestName}} 的新设置导入完成。请重启插件设置页使之生效。","protocol_callbacknotsupported":"您的 uri callback 暂不支持: {{params}}","protocol_dropbox_connecting":"正在连接 Dropbox……\\n请不要关闭此弹窗。","protocol_dropbox_connect_succ":"好!我们作为用户 {{username}} 连接上了 Dropbox!","protocol_dropbox_connect_succ_revoke":"您已作为用户 {{username}} 连接上了。如果您想取消连接,请点击此按钮。","protocol_dropbox_connect_fail":"Dropbox 的回调请求有点异常。您是否网络不顺畅?您是否拒绝了鉴权?","protocol_dropbox_connect_unknown":"不知道如何处理此 callback:{{params}}","protocol_dropbox_no_modal":"您不是在设置页的弹窗里触发 Dropbox 的。中止操作。","protocol_onedrive_connecting":"正在连接 OneDrive……\\n请不要关闭此弹窗。","protocol_onedrive_connect_succ_revoke":"您已作为用户 {{username}} 连接上了。如果您想取消连接,请点击此按钮。","protocol_onedrive_connect_fail":"OneDrive 的回调请求有点异常。您是否拒绝了鉴权?","protocol_onedrive_connect_unknown":"不知道如何处理此 callback:{{params}}","command_startsync":"开始同步(start sync)","command_drynrun":"开始同步(空跑模式)(start sync (dry run only))","command_exportsyncplans_json":"导出同步计划为 json 格式(export sync plans in json format)","command_exportsyncplans_1_only_change":"导出同步计划(最近 1 次)(仅修改部分)(export sync plans (latest 1) (change part))","command_exportsyncplans_1":"导出同步计划(最近 1 次)(export sync plans (latest 1))","command_exportsyncplans_5":"导出同步计划(最近 5 次)(export sync plans (latest 5))","command_exportsyncplans_all":"导出同步计划(所有)(export sync plans (all))","command_exportlogsindb":"从数据库导出终端日志(export logs saved in db)","statusbar_sync_source_manual":"手动:","statusbar_sync_source_dry":"空跑:","statusbar_sync_source_auto":"自动:","statusbar_sync_source_auto_once_init":"启动时同步:","statusbar_sync_source_auto_sync_on_save":"保存时同步:","statusbar_sync_status_prefix_success":"同步成功:","statusbar_sync_status_prefix_failed":"同步失败:","statusbar_time_years":"{{time}} 年前","statusbar_time_months":"{{time}} 月前","statusbar_time_weeks":"{{time}} 周前","statusbar_time_days":"{{time}} 天前","statusbar_time_hours":"{{time}} 小时前","statusbar_time_minutes":"{{time}} 分钟前","statusbar_time_lessminute":"1 分钟内","statusbar_time_now":"刚刚","statusbar_syncing":"正在同步","statusbar_lastsync_label":"日期:{{date}}","statusbar_lastsync_never":"没触发过同步","statusbar_lastsync_never_label":"没触发过同步","modal_password_title":"稍等一下,请阅读下文:","modal_password_shortdesc":"如果密码不是空的,那么文件会在上传之前,在本地先用此密码加密。\\n如果密码是空的,那么文件会被非加密地上传。","modal_password_attn1":"注意 1/5:库(Vault)名字是不会加密的!本插件会在一些远程存储里创建一个和库名字有着同名的文件夹。","modal_password_attn2":"注意 2/5:密码在本地不加密地保存!","modal_password_attn3":"注意 3/5:一些元信息是没有被加密的,或者可以被较容易地猜测出来。(文件大小很接近于没加密的时候,且文件夹可能会被存储为大小为 0 byte 的对象。)","modal_password_attn4":"注意 4/5:您需要确保远程存储是“空”的,或者已有文件也是被同一个新密码加密的;从而避免冲突。","modal_password_attn5":"注意 5/5:密码越长越好。","modal_password_secondconfirm":"再次确认保存新密码","modal_password_notice":"新密码已保存!","modal_encryptionmethod_title":"稍等一下,请阅读下文:","modal_encryptionmethod_shortdesc":"您正在修改加密方式,但是您已经设置了密码。\\n修改加密方式之后,您需要<b>手动</b>和<b>完全</b>删除在远端的之前加密过的库文件,然后重新同步(从而重新上传)新的加密文件。","modal_remotebasedir_title":"您正在修改远端基文件夹设置","modal_remotebasedir_shortdesc":"1. 本插件并不会自动在远端把内容从旧文件夹移动到新文件夹。所有内容都会重新同步。\\n2. 如果你使得文本输入框为空,那么本设置会被重设回库的文件夹名(默认设置)。\\n3. 即使您设置了端对端加密的密码,远端文件夹名称本身也不会被加密。\\n4. 某些特殊字符,如“?”、“/”、“\\\\”是不允许的。文本前后的空格也会被自动删去。","modal_remotebasedir_invaliddirhint":"您所输入的内容含有某些特殊字符,如“?”、“/”、“\\\\”,它们是不允许的。","modal_remotebasedir_secondconfirm_vaultname":"重设回默认的库文件夹名","modal_remotebasedir_secondconfirm_change":"确认修改","modal_remotebasedir_notice":"新的远端基文件夹设置已保存!","modal_remoteprefix_s3_title":"您正在修改远端路径前缀设置","modal_remoteprefix_s3_shortdesc":"1. 本插件并不会自动在远端把内容从旧文件夹移动到新文件夹。所有内容都会重新同步。\\n2. 如果你使得文本输入框为空,那么本设置为保存为空,文件将会被存储在桶(Bucket)的根目录。\\n3. 即使您设置了端对端加密的密码,远端文件夹名称本身也不会被加密。\\n4. 某些特殊字符,如“?”、“/”、“\\\\”是不允许的。文本前后的空格也会被自动删去。","modal_remoteprefix_s3_invaliddirhint":"您所输入的内容含有某些特殊字符,如“?”、“/”、“\\\\”,它们是不允许的。","modal_remoteprefix_s3_tosave":"您设定的新前缀为:“{{{prefix}}}”","modal_remoteprefix_s3_secondconfirm_empty":"前缀为空,文件会保存在根目录","modal_remoteprefix_s3_secondconfirm_change":"确认修改","modal_remoteprefix_s3_notice":"新的远端路径前缀设置已保存!","modal_dropboxauth_manualsteps":"第 1 步:在浏览器中访问以下地址,然后按照网页提示操作。\\n到了最后,您应该会获得一串很长的代码文本,请复制粘贴到下方,并点击“提交”","modal_dropboxauth_autosteps":"在浏览器中访问以下地址,然后按照网页提示操作。\\n到了最后,您应该会被自动重定向回来 Obsidian。","modal_dropboxauth_copybutton":"点击此按钮从而复制鉴权 url","modal_dropboxauth_copynotice":"鉴权 url 已复制到剪贴板!","modal_dropboxauth_maualinput":"来自网页的授权码","modal_dropboxauth_maualinput_desc":"您需要点击“确认”","modal_dropboxauth_maualinput_notice":"正在尝试连接 Dropbox","modal_dropboxauth_maualinput_conn_succ":"很好!我们作为用户 {{username}} 连接到 Dropbox 了!","modal_dropboxauth_maualinput_conn_succ_revoke":"您已作为用户 {{username}} 连接到 Dropbox。如果您想断开连接,点击此按钮。","modal_dropboxauth_maualinput_conn_fail":"连接 Dropbox 途中出错了。","modal_onedriveauth_shortdesc":"现在只支持个人版 OneDrive,(暂)不支持企业版。\\n在浏览器中访问以下地址,然后按照网页提示操作。\\n到了最后,您应该会被自动重定向回来 Obsidian。","modal_onedriveauth_shortdesc_linux":"您正在用 Linux,有可能无法跳转回来。请考虑<a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">使用</a> flatpack 版本的 Obsidian,或创建 <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> 文件</a>。","modal_onedriveauth_copybutton":"点击此按钮从而复制鉴权 url","modal_onedriveauth_copynotice":"鉴权 url 已复制到剪贴板!","modal_onedriverevokeauth_step1":"第 1 步:用浏览器打开以下地址,点击本插件对应的“Edit”按钮,点击“Remove these permissions”按钮。","modal_onedriverevokeauth_step2":"第 2 步:点击以下按钮,清理本地保存的登录信息。","modal_onedriverevokeauth_clean":"清理本地保存的登录信息","modal_onedriverevokeauth_clean_desc":"您需要点击“清理”按钮。","modal_onedriverevokeauth_clean_button":"清理","modal_onedriverevokeauth_clean_notice":"已清理!","modal_onedriverevokeauth_clean_fail":"鉴权途中出错了。","modal_syncconfig_attn":"注意 1/2:此设置只同步(复制)整个 Obsidian 的配置文件夹,但是不会同步其它 . 开头的文件夹或文件。除了会忽略 .git 和 node_modules 文件夹之外,它也并不理解配置文件夹的里各个子文件或子文件夹的含义。\\n注意 2/2:配置文件夹被同步之后,各插件的设置或许会出错,且 Obsidian 或许需要重启来重载各插件的新配置。\\n如果您同意自行承受以上风险,您可以点击以下再次确认按钮。","modal_syncconfig_secondconfirm":"再次确认开启","modal_syncconfig_notice":"您已开启配置文件夹的同步!","modal_qr_shortdesc":"这里可导出(部分)设置。\\n您可以使用另一个设备来扫描此 QR 码。\\n又或者,您可以点击以下按钮复制此特殊 URI,然后粘贴到另一台设备的网络浏览器或 Remotely Save 设置里的导入部分。","modal_qr_button":"点击此按钮复制特殊 URI","modal_qr_button_notice":"特殊 URI 已被复制到剪贴板!","modal_sizesconflict_title":"Remotely Save:跳过大文件的时候出现了一些冲突","modal_sizesconflict_desc":"您设置了跳过同步大于 {{thresholdMB}} MB({{thresholdBytes}} bytes)的文件。\\n但是以下文件的大小,在一端大于阈值,在另一端则小于阈值。\\n为了避免意外的覆盖或删除,插件停止了运作,您需要手动处理至少一端的文件。","modal_sizesconflict_copybutton":"点击以复制以下所有文件大小冲突信息","modal_sizesconflict_copynotice":"所有的文件大小冲突信息,已被复制到剪贴板!","settings_basic":"基本设置","settings_password":"密码","settings_password_desc":"端到端加密的密码。不填写则代表没密码。您需要点击“确认”来修改。注意:密码和其它信息都会在本地保存。如果您修改了密码,您需要手动删除远端的所有文件,重新同步(从而上传)加密文件。","settings_encryptionmethod":"加密方法","settings_encryptionmethod_desc":"端到端加密的方法。推荐选用 RClone Crypt 方法,但是它没有加密文件路径结构。OpenSSL enc 是本插件一开始就支持的方式。<b>两种方法都和 RClone、OpenSSL 官方产品和社区无利益相关。</b>如果您修改了加密方法,您需要手动删除远端的所有文件,重新同步(从而上传)加密文件。更多详细说明见<a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/encryption\'>在线文档</a>。","settings_encryptionmethod_rclone":"RClone Crypt(推荐)","settings_encryptionmethod_openssl":"OpenSSL enc(旧方法)","settings_autorun":"自动运行","settings_autorun_desc":"每隔一段时间,此插件尝试自动同步。会影响到电池用量。","settings_autorun_notset":"(不设置)","settings_autorun_1min":"每 1 分钟","settings_autorun_5min":"每 5 分钟","settings_autorun_10min":"每 10 分钟","settings_autorun_30min":"每 30 分钟","settings_runoncestartup":"启动后自动运行一次","settings_runoncestartup_desc":"本设置使得插件在程序启动后自动触发一次同步。修改后,会在下一次启动生效。本设置和“自动运行”是不同的,那个设置是指“每隔一段时间”都自动同步一次。","settings_runoncestartup_notset":"(不设置)","settings_runoncestartup_1sec":"启动后第 1 秒运行一次","settings_runoncestartup_10sec":"启动后第 10 秒运行一次","settings_runoncestartup_30sec":"启动后第 30 秒运行一次","settings_synconsave":"保存时同步(实验性质)","settings_synconsave_desc":"插件如果检查到当前文件在最近一段时间有修改保存过,则尝试同步。请注意,同步是一个很重的操作,因此会影响到耗电量。(修改设置后可能需要重载插件或重启。)","settings_synconsave_disable":"关闭(默认)","settings_synconsave_enable":"开启","settings_skiplargefiles":"跳过大文件","settings_skiplargefiles_desc":"跳过大于某一个阈值的文件。这里 1 MB = 10^6 bytes。","settings_skiplargefiles_notset":"(不设置)","settings_ignorepaths":"忽略的文件或文件夹的正则表达式","settings_ignorepaths_desc":"忽略的文件或文件夹的正则表达式。每行一条。路径是相对于库(Vault)根目录的,没有前置 / 符号。非空的忽略列表和非空的允许列表会一起生效。","settings_onlyallowpaths":"允许同步的文件或文件夹的正则表达式","settings_onlyallowpaths_desc":"允许同步的文件或文件夹的正则表达式。每行一条。路径是相对于库(Vault)根目录的,没有前置 / 符号。如果这个设置非空,那么所有您想同步的路径(包括隐藏的设置文件夹)都要明确地列出到这里。非空的忽略列表和非空的允许列表会一起生效。","settings_enablestatusbar_info":"在状态栏显示上一次成功的同步","settings_enablestatusbar_info_desc":"在状态栏显示上一次成功的同步的时间。","settings_enablestatusbar_reloadrequired_notice":"需要重新载入此插件才生效。","settings_resetstatusbar_time":"重设上一次成功同步的时间记录","settings_resetstatusbar_time_desc":"重设上一次成功同步的时间记录。","settings_resetstatusbar_button":"重设","settings_resetstatusbar_notice":"重设完毕!","settings_checkonnectivity":"检查可否连接","settings_checkonnectivity_desc":"检查可否连接。","settings_checkonnectivity_button":"检查","settings_checkonnectivity_checking":"正在检查……","settings_remotebasedir":"修改远端基文件夹(实验性质)","settings_remotebasedir_desc":"默认设定,内容会被同步到远端的和资料库同名的文件夹下。您可以在此修改远端文件夹名,或删除输入框文本从而重设到默认值。您需要点击“确认”。","settings_remoteprefix_s3":"修改远端前缀路径(实验性质)","settings_remoteprefix_s3_desc":"默认设定 s3 保存在存储桶(Bucket)的根目录。您可以在这里修改路径前缀,或者保持为空保持默认设置。您需要点击“确认”。","settings_s3":"S3 或兼容 S3 的服务的设置","settings_s3_disclaimer1":"声明:本插件不是 Amazon 的官方产品。","settings_s3_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了存储桶有不符合预期的访问,请立刻从 AWS(或其它 S3 服务商)删除记录于此的 access key。","settings_s3_cors":"您需要设置 CORS,从而允许这些源的请求访问:app://obsidian.md 和 capacitor://localhost 和 http://localhost 且增加 ETag 到暴露 headers 里。","settings_s3_prod":"一些可参考的 Amazon S3 官方文档:","settings_s3_prod1":"服务地址(Endpoint)和区域(Region)信息","settings_s3_prod2":"Access Key ID 和 Secret Access Key 信息","settings_s3_prod3":"设置 CORS","settings_s3_endpoint":"服务地址(Endpoint)","settings_s3_region":"区域(Region)","settings_s3_region_desc":"如果您不知道这个值填什么,可以尝试填写:us-east-1。","settings_s3_accesskeyid":"Access Key ID","settings_s3_accesskeyid_desc":"Access key ID。注意:access key ID 和其它信息都会在本地保存。","settings_s3_secretaccesskey":"Secret Access Key","settings_s3_secretaccesskey_desc":"Secret access key。注意:secret access key 和其它信息都会在本地保存。","settings_s3_bucketname":"存储桶(Bucket)的名字","settings_s3_bypasscorslocally":"本地绕过 CORS 问题","settings_s3_bypasscorslocally_desc":"对于 Obsidian 新版本(桌面版>=0.13.25 或 iOS>=1.1.1 或 Android>=1.2.1),本插件可以跳过服务器设置 CORS 的步骤。如果您遇到任意问题,可以关闭此设定,并在服务端设置 CORS(允许来自 app://obsidian.md 和 capacitor://localhost 和 http://localhost 的请求且增加 ETag 到暴露 headers 里)。","settings_s3_parts":"分块并行度","settings_s3_parts_desc":"在 S3 里,大文件会被分块上传。您希望同一时间最多有多少个分块被上传?","settings_s3_accuratemtime":"使用准确的文件修改时间","settings_s3_accuratemtime_desc":"读取(已上传的)准确的文件修改时间,有助于同步算法更加准确和稳定。但是它也会导致额外的 api 请求、时间、金钱花费。","settings_s3_urlstyle":"S3 URL style","settings_s3_urlstyle_desc":"是否对 S3 对象强制使用 path style URL(例如使用 https://s3.amazonaws.com/*/ 而不是 https://*.s3.amazonaws.com/)。","settings_s3_reverse_proxy_no_sign_url":"S3 反向代理(不签名)地址(实验性质)","settings_s3_reverse_proxy_no_sign_url_desc":"不会参与到签名的 S3 反向代理地址。如果您有一个反向代理,但是不想修改原始鉴权签名,这里就可以填写。没有 http(s):// 前缀。如果您不知道这是什么,留空即可。","settings_s3_generatefolderobject":"是否生成文件夹 Object","settings_s3_generatefolderobject_desc":"S3 不存在“真正”的文件夹。如果您设置了“生成”(或用了旧版本),那么插件会上传 0 字节的以“/”结尾的 Object 来代表文件夹。新版本插件会默认跳过生成这种文件夹 Object。","settings_s3_generatefolderobject_notgenerate":"不生成(默认)","settings_s3_generatefolderobject_generate":"生成","settings_s3_connect_succ":"很好!可以访问到对应存储桶。","settings_s3_connect_fail":"无法访问到对应存储桶。","settings_dropbox":"Dropbox 设置","settings_dropbox_disclaimer1":"声明:此插件不是 Dropbox 官方产品。","settings_dropbox_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 Dropbox 有不符合预期的访问,请立刻从 https://www.dropbox.com/account/connected_apps 删除记录于此插件的连接鉴权。","settings_dropbox_folder":"我们会在您的 Dropbox 上创建此文件夹并在里面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。","settings_dropbox_revoke":"撤回鉴权","settings_dropbox_revoke_desc":"您现在使用了用户名 {{username}} 来连接。如果想取消连接,请点击此按钮。","settings_dropbox_revoke_button":"撤回鉴权","settings_dropbox_revoke_notice":"鉴权已被撤回!","settings_dropbox_revoke_noticeerr":"撤回鉴权出错。","settings_dropbox_clearlocal":"清除本地保存的鉴权信息","settings_dropbox_clearlocal_desc":"您可以强制清除本地已保存的 Dropbox 的登录鉴权信息,但不向服务器发送撤回鉴权的请求。","settings_dropbox_clearlocal_button":"清除","settings_dropbox_clearlocal_notice":"已清除!","settings_dropbox_auth":"鉴权","settings_dropbox_auth_desc":"鉴权。","settings_dropbox_auth_button":"鉴权","settings_dropbox_connect_succ":"很好!我们可连接上 Dropbox!","settings_dropbox_connect_fail":"我们未能连接上 Dropbox。","settings_onedrive":"Onedrive(个人版)(App Folder)设置","settings_onedrive_disclaimer1":"声明:此插件不是微软或 OneDrive 的官方产品。","settings_onedrive_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 OneDrive 有不符合预期的访问,请立刻从 https://microsoft.com/consent 删除记录于此插件的连接鉴权。","settings_onedrive_folder":"我们会在您的 OneDrive 上创建此文件夹并在里面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。","settings_onedrive_nobiz":"现在只支持个人版 OneDrive。(暂时)并不支持企业版 OneDrive。","settings_onedrive_revoke":"撤回鉴权","settings_onedrive_revoke_desc":"您现在使用了用户名 {{username}} 来连接。如果想取消连接,请点击此按钮。","settings_onedrive_revoke_button":"撤回鉴权","settings_onedrive_auth":"鉴权","settings_onedrive_auth_desc":"鉴权。","settings_onedrive_auth_button":"鉴权","settings_onedrive_connect_succ":"很好!我们可连接上 OneDrive!","settings_onedrive_connect_fail":"我们未能连接上 OneDrive。","settings_onedrive_emptyfile":"空文件处理","settings_onedrive_emptyfile_desc":"OneDrive 不允许上传空文件(即使官网也是不允许的)。那么你想跳过空文件还是返回错误?","settings_onedrive_emptyfile_skip":"跳过","settings_onedrive_emptyfile_error":"返回错误和中断","settings_webdav":"Webdav 设置","settings_webdav_disclaimer1":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 Webdav 服务器有不符合预期的访问,请立刻修改用户名和密码。","settings_webdav_cors_os":"Obsidian 桌面版>=0.13.25 或 iOS>=1.1.1 或 Android>=1.2.1 支持跳过 CORS 设置。但您正在使用旧版,建议升级。","settings_webdav_cors":"您需要设置 CORS,允许来自这些源的请求:app://obsidian.md 和 capacitor://localhost 和 http://localhost。","settings_webdav_folder":"我们会在您的服务器上创建此文件夹并在里面同步:/{{remoteBaseDir}}","settings_webdav_addr":"服务器地址","settings_webdav_addr_desc":"服务器地址。","settings_webdav_user":"用户名","settings_webdav_user_desc":"用户名。注意:用户名和其它信息都会保存在本地。","settings_webdav_password":"密码","settings_webdav_password_desc":"密码。注意:密码和其它信息都会保存在本地。","settings_webdav_auth":"鉴权类型","settings_webdav_auth_desc":"如果不填写密码,本设置会被忽略。","settings_webdav_depth":"发送到服务器的 Depth header","settings_webdav_depth_desc":"Webdav 服务器会被设为接收 Depth header 为“1”或“Infinity”请求。如果您不清楚如何设置,可以选择 depth=\'1\'。如果那你确认服务器支持 depth=\'infinity\',请选择它,会获得更加好的性能。","settings_webdav_depth_1":"只支持 depth=\'1\'","settings_webdav_depth_inf":"支持 depth=\'infinity\'","settings_webdav_customheaders":"发送到服务器的自定义 Header","settings_webdav_customheaders_desc":"有些用户需要设置自定义 header。如果您不知道是什么,可以直接留空不填。输入格式:每行形如 <code>X-Header1:value1</code>。header 的 key 和 value 之间的空格会被删除。","settings_webdav_connect_succ":"很好!可以连接上 Webdav 服务器。","settings_webdav_connect_fail":"无法连接上 Webdav 服务器。(可能是地址/账号/密码/鉴权类型等错误。)","settings_webdav_connect_fail_withcors":"无法连接上 Webdav 服务器。(可能是地址/账号/密码/鉴权类型/CORS 等错误。)","settings_webdis":"Webdis 设置","settings_webdis_disclaimer1":"声明:此插件不是 Redis® Ltd 或 Redis® 软件或 Wedis 的官方产品。Redis 是 Redis Ltd 的注册商标。","settings_webdis_disclaimer2":"声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 Webdis 服务器有不符合预期的访问,请立刻修改用户名和密码。","settings_webdis_folder":"我们会在您的服务器上创建带有此前缀的 key 并在里面同步::{{remoteBaseDir}}。","settings_webdis_addr":"服务器地址","settings_webdis_addr_desc":"服务器地址","settings_webdis_user":"用户名","settings_webdis_user_desc":"用户名。注意:用户名和其它信息都会保存在本地。","settings_webdis_password":"密码","settings_webdis_password_desc":"密码。注意:密码和其它信息都会保存在本地。","settings_webdis_connect_succ":"很好!可以连接上 Webdis 服务器。","settings_webdis_connect_fail":"无法连接上 Webdis 服务器。(可能是地址/账号/密码/鉴权类型等错误。)","settings_chooseservice":"选择远程服务","settings_chooseservice_desc":"从这里开始设置。您想连接到哪一个服务?S3、Dropbox、Webdav、OneDrive(个人版)、Webdis?","settings_chooseservice_s3":"S3 或兼容 S3 的服务","settings_chooseservice_dropbox":"Dropbox","settings_chooseservice_webdav":"Webdav","settings_chooseservice_onedrive":"OneDrive(个人版)","settings_chooseservice_webdis":"Webdis (an HTTP interface for Redis)","settings_adv":"进阶设置","settings_concurrency":"并行度","settings_concurrency_desc":"您希望同时最多有多少个文件被上传和下载?默认值是 5。如果您遇到了一些问题(如访问频率限制),您可以减少并行度。","settings_syncunderscore":"同步 _ 文件或文件夹","settings_syncunderscore_desc":"是否同步“_”(下划线)开始的文件或文件夹。","settings_configdir":"同步配置文件夹(实验性质)","settings_configdir_desc":"是否同步 Obsidian 的配置文件夹 {{configDir}}(其中的 .git 和 node_modules 依然会被忽略)。请注意,此设置可能会影响到您 Obsidian 或者所有的插件设置,也可能需要您同步完毕后重启 Obsidian。如果您同意自行承受其风险,则可以开启本设置。","settings_bookmarks":"同步书签(实验性质)","settings_bookmarks_desc":"是否同步书签 {{configDir}}/bookmarks.json 。如果您设置了同步配置文件夹,此选项会被忽略并设为“开启”。","settings_deletetowhere":"删除文件到哪里","settings_deletetowhere_desc":"插件触发删除操作时候,删除到哪里?","settings_deletetowhere_system_trash":"系统回收站(默认)","settings_deletetowhere_obsidian_trash":"Obsidian .trash 文件夹","settings_conflictaction":"处理冲突","settings_conflictaction_desc":"如果一个文件,在本地和服务器都被创建或者修改了,那么这就是一个“冲突”情况。如何处理?这个设置只在双向同步时候生效。","settings_conflictaction_keep_newer":"保留最后修改的版本(默认)","settings_conflictaction_keep_larger":"保留文件体积较大的版本","settings_cleanemptyfolder":"处理空文件夹","settings_cleanemptyfolder_desc":"同步算法主要是针对文件处理的,您需要手动指定空文件夹如何处理。","settings_cleanemptyfolder_skip":"跳过处理空文件夹(默认)","settings_cleanemptyfolder_clean_both":"删除本地和服务器的空文件夹","settings_protectmodifypercentage":"如果修改超过百分比则中止同步","settings_protectmodifypercentage_desc":"如果算法检测到超过 n% 的文件会被修改或删除,则中止同步。从而可以保护用户的文件免受预料之外的修改。您可以设置为 100 而去除此保护,也可以设置为 0 总是强制中止所有同步。","settings_protectmodifypercentage_000_desc":"0(总是强制中止)","settings_protectmodifypercentage_050_desc":"50(默认值)","settings_protectmodifypercentage_100_desc":"100(去除此保护)","settings_protectmodifypercentage_custom_desc":"自定义","settings_protectmodifypercentage_customfield":"如果修改超过自定义百分比则中止同步","settings_protectmodifypercentage_customfield_desc":"您需要输入 0(含)~ 100(含)的数字。小数也是可以的。","setting_syncdirection":"同步方向(实验性质)","setting_syncdirection_desc":"<p>W插件应该向哪里同步?注意每个选项都是只有修改了的文件(基于修改时间和大小判断)才会触发同步动作。</p><ol><li>双向同步:一边的变动会同步到另一边。</li><li>增量推送:本地创建或修改的文件会复制到远端。</li><li>增量拉取:远端创建或修改的文件会复制到本地。</li><li>增量推送带删除:本地创建或修改的文件会复制到远端,<strong>本地的删除也会在远端运行。</strong></li><li>增量拉取带删除:远端创建或修改的文件会复制到本地,<strong>远端的删除也会在本地运行。</strong></li></ol>","setting_syncdirection_bidirectional_desc":"双向同步(默认)","setting_syncdirection_incremental_push_only_desc":"增量推送(也即:备份模式)","setting_syncdirection_incremental_pull_only_desc":"增量拉取","setting_syncdirection_incremental_push_and_delete_only_desc":"增量推送带删除","setting_syncdirection_incremental_pull_and_delete_only_desc":"增量拉取带删除","settings_enablemobilestatusbar":"手机的状态栏(实验性质)","settings_enablemobilestatusbar_desc":"Obsidian 手机版默认隐藏了状态栏。有些用户希望展示它。这里提供了设置选项。","settings_importexport":"导入导出部分设置","settings_export":"导出","settings_export_desc":"用 QR 码或 URI 导出设置信息。","settings_export_basic_and_advanced_button":"导出基本或进阶设置","settings_export_s3_button":"导出 S3 部分","settings_export_dropbox_button":"导出 Dropbox 部分","settings_export_onedrive_button":"导出 OneDrive (App Folder) 部分","settings_export_webdav_button":"导出 Webdav 部分","settings_export_webdis_button":"导出 Webdis 部分","settings_import":"导入","settings_import_desc":"粘贴之前导出的 URI 到这里然后点击“导入”。或,使用拍摄 app 或者扫描 QR 码的 app,来扫描对应的 QR 码。","settings_import_button":"导入","settings_import_error_notice":"您输入的 URI 是空的或者不准确的!","settings_debug":"调试","settings_debuglevel":"修改同步提示信息","settings_debuglevel_desc":"默认值为 \\"info\\"。您可以改为 \\"debug\\" 从而在同步时候里获取更多信息。","settings_outputsettingsconsole":"读取硬盘上的设置文件输出到终端","settings_outputsettingsconsole_desc":"硬盘上的设置文件是编码过的,点击这里从而解码并输出到终端。","settings_outputsettingsconsole_button":"输出","settings_outputsettingsconsole_notice":"已输出到终端","settings_obfuscatesettingfile":"是否混淆保存设置文件","settings_obfuscatesettingfile_desc":"设置文件(data.json)含有敏感信息。强烈建议混淆后保存它,从而避免出乎意料的读取和修改。如果您确认要手动查看和修改它,可以关闭混淆保存。","settings_viewconsolelog":"查看终端输出","settings_viewconsolelog_desc":"电脑上,输入“ctrl+shift+i”或“cmd+shift+i”来查看终端输出。手机上,安装第三方插件 <a href=\'https://obsidian.md/plugins?search=Logstravaganza\'>Logstravaganza</a> 来导出终端输出到一篇笔记上。","settings_syncplans":"导出同步计划","settings_syncplans_desc":"每次您启动同步,并在实际上传下载前,插件会生成同步计划。它可以使您知道每次同步发生了什么。点击按钮可以导出同步计划。","settings_syncplans_button_1_only_change":"导出最近 1 次(仅修改部分)","settings_syncplans_button_5_only_change":"导出最近 5 次(仅修改部分)","settings_syncplans_button_1":"导出最近 1 次","settings_syncplans_button_5":"导出最近 5 次","settings_syncplans_button_all":"导出所有","settings_syncplans_notice":"同步计划已导出","settings_delsyncplans":"删除数据库里的同步计划历史","settings_delsyncplans_desc":"删除数据库里的同步计划历史。","settings_delsyncplans_button":"删除同步计划历史","settings_delsyncplans_notice":"(数据库里的)同步计划已被删除。","settings_delprevsync":"删除数据库里的上次同步明细","settings_delprevsync_desc":"同步算法需要上次成功同步的信息来决定文件变更,这个信息保存在本地的数据库里。如果您想忽略这些信息从而所有文件都被视为新创建的话,可以在此删除之前的信息。","settings_delprevsync_button":"删除上次同步明细","settings_delprevsync_notice":"(本地数据库里的)上次同步明细已被删除。","settings_profiler_results":"导出性能数据记录","settings_profiler_results_desc":"插件记录了每次同步每一步的耗时。这里可以导出记录得知哪一步最慢。","settings_profiler_results_notice":"性能数据已导出","settings_profiler_results_button_all":"导出所有","settings_profiler_enableprofiler":"性能收集","settings_profiler_enableprofiler_desc":"是否开启性能收集功能?","settings_profiler_enabledebugprint":"性能收集输出","settings_profiler_enabledebugprint_desc":"是否直接输出性能收集结果到终端里?","settings_profiler_recordsize":"性能收集统计对象大小","settings_profiler_recordsize_desc":"是否收集对象的大小?","settings_outputbasepathvaultid":"输出资料库对应的位置和随机分配的 ID","settings_outputbasepathvaultid_desc":"用于调试。","settings_outputbasepathvaultid_button":"输出","settings_resetcache":"重设本地缓存和数据库","settings_resetcache_desc":"(出于调试原因)重设本地缓存和数据库。您需要在重设之后重新载入此插件。本重设不会删除 s3,密码……等设定。","settings_resetcache_button":"重设","settings_resetcache_notice":"本地同步缓存和数据库已被删除。请手动重新载入此插件。","syncalgov3_title":"Remotely Save 的同步算法有重大更新","syncalgov3_texts":"欢迎使用 Remotely Save!\\n从这个版本开始,插件更新了同步算法:\\n<ul><li>更稳健的删除同步</li><li>引入冲突处理</li><li>避免上传元数据</li><li>修改删除保护</li><li>备份模式</li><li>新的加密方式</li><li>……</li></ul>\\n敬请期待更多更新!详细介绍请参阅<a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/sync_algorithm/v3/intro.md\'>文档网站</a>。\\n如果您同意使用新版本,请阅读和勾选两个勾选框,然后点击“同意”按钮,开始使用插件吧!\\n如果您不同意,请点击“不同意”按钮,插件将自动停止运行(unload)。\\n此外,请考虑<a href=\'https://github.com/remotely-save/remotely-save\'>访问 GitHub 页面然后点赞 ⭐</a>!您的支持对我十分重要!谢谢!","syncalgov3_checkbox_manual_backup":"我将会首先手动备份我的库(Vault)。","syncalgov3_checkbox_requiremultidevupdate":"我理解,我需要在所有设备上都更新此插件使之正常运行。","syncalgov3_button_agree":"同意","syncalgov3_button_disagree":"不同意","menu_check_file_stat":"查看文件属性"}'),zh_tw:JSON.parse('{"confirm":"確認","disable":"關閉","enable":"開啟","goback":"返回","submit":"提交","sometext":"這裡有一段文字。","syncrun_alreadyrunning":"{{pluginName}} 正處於此階段:{{syncStatus}}! 中斷觸發 {{newTriggerSource}}。","syncrun_syncingribbon":"{{pluginName}}:正在由 {{triggerSource}} 觸發執行","syncrun_step0":"0/8 Remotely Save 在空跑(dry run)模式,不會發生實際的檔案交換。","syncrun_step1":"1/8 Remotely Save 準備同步({{serviceType}})","syncrun_step2":"2/8 正在獲取遠端的元數據和檢查密碼。","syncrun_passworderr":"檢查密碼時候出錯。","syncrun_step3":"3/8 正在處理遠端的元數據。","syncrun_step4":"4/8 正在獲取本地的元資料。","syncrun_step5":"5/8 正在獲取本地上一次同步的元資料。","syncrun_step6":"6/8 正在生成同步計劃。","syncrun_step7":"7/8 Remotely Save 開始發生資料交換!","syncrun_step7skip":"7/8 Remotely Save 在空跑模式,跳過實際資料交換步驟。","syncrun_step8":"8/8 Remotely Save 已完成同步!","syncrun_shortstep0":"0/2 Remotely Save 在空跑(dry run)模式,不會發生實際的檔案交換。","syncrun_shortstep1":"1/2 Remotely Save 開始同步({{serviceType}})","syncrun_shortstep2skip":"2/2 Remotely Save 在空跑模式,跳過實際資料交換步驟。","syncrun_shortstep2":"2/2 Remotely Save 已完成同步!","syncrun_abort":"{{manifestID}}-{{theDate}}:中斷同步,同步來源={{triggerSource}},出錯階段={{syncStatus}}","syncrun_abort_protectmodifypercentage":"中斷同步!您設定了不允許 >= {{protectModifyPercentage}}% 的變更,但是現在 {{realModifyDeleteCount}}/{{allFilesCount}}={{percent}}% 的檔案會被修改或刪除!如果您確認這次同步是您想要的,那麼請在設定裡修改允許比例。","protocol_saveqr":" {{manifestName}} 的新設定匯入完成。請重啟外掛設定頁使之生效。","protocol_callbacknotsupported":"您的 uri callback 暫不支援: {{params}}","protocol_dropbox_connecting":"正在連線 Dropbox……\\n請不要關閉此彈窗。","protocol_dropbox_connect_succ":"好!我們作為使用者 {{username}} 連線上了 Dropbox!","protocol_dropbox_connect_succ_revoke":"您已作為使用者 {{username}} 連線上了。如果您想取消連線,請點選此按鈕。","protocol_dropbox_connect_fail":"Dropbox 的回撥請求有點異常。您是否網路不順暢?您是否拒絕了鑑權?","protocol_dropbox_connect_unknown":"不知道如何處理此 callback:{{params}}","protocol_dropbox_no_modal":"您不是在設定頁的彈窗裡觸發 Dropbox 的。中止操作。","protocol_onedrive_connecting":"正在連線 OneDrive……\\n請不要關閉此彈窗。","protocol_onedrive_connect_succ_revoke":"您已作為使用者 {{username}} 連線上了。如果您想取消連線,請點選此按鈕。","protocol_onedrive_connect_fail":"OneDrive 的回撥請求有點異常。您是否拒絕了鑑權?","protocol_onedrive_connect_unknown":"不知道如何處理此 callback:{{params}}","command_startsync":"開始同步(start sync)","command_drynrun":"開始同步(空跑模式)(start sync (dry run only))","command_exportsyncplans_1_only_change":"匯出同步計劃(最近 1 次)(僅修改部分)(export sync plans (latest 1) (change part))","command_exportsyncplans_1":"匯出同步計劃(最近 1 次)(export sync plans (latest 1))","command_exportsyncplans_5":"匯出同步計劃(最近 5 次)(export sync plans (latest 5))","command_exportsyncplans_all":"匯出同步計劃(所有)(export sync plans (all))","command_exportlogsindb":"從資料庫匯出終端日誌(export logs saved in db)","statusbar_sync_source_manual":"手動:","statusbar_sync_source_dry":"空跑:","statusbar_sync_source_auto":"自動:","statusbar_sync_source_auto_once_init":"啟動時同步:","statusbar_sync_source_auto_sync_on_save":"儲存時同步:","statusbar_sync_status_prefix_success":"同步成功:","statusbar_sync_status_prefix_failed":"同步失敗:","statusbar_time_years":"{{time}} 年前","statusbar_time_months":"{{time}} 月前","statusbar_time_weeks":"{{time}} 周前","statusbar_time_days":"{{time}} 天前","statusbar_time_hours":"{{time}} 小時前","statusbar_time_minutes":"{{time}} 分鐘前","statusbar_time_lessminute":"1 分鐘內","statusbar_time_now":"剛剛","statusbar_syncing":"正在同步","statusbar_lastsync_label":"日期:{{date}}","statusbar_lastsync_never":"沒觸發過同步","statusbar_lastsync_never_label":"沒觸發過同步","modal_password_title":"稍等一下,請閱讀下文:","modal_password_shortdesc":"如果密碼不是空的,那麼檔案會在上傳之前,在本地先用此密碼加密。\\n如果密碼是空的,那麼檔案會被非加密地上傳。","modal_password_attn1":"注意 1/5:儲存庫(Vault)名字是不會加密的!本外掛會在一些遠端儲存裡建立一個和庫名字有著同名的資料夾。","modal_password_attn2":"注意 2/5:密碼在本地不加密地儲存!","modal_password_attn3":"注意 3/5:一些元資訊是沒有被加密的,或者可以被較容易地猜測出來。(檔案大小很接近於沒加密的時候,且資料夾可能會被儲存為大小為 0 byte 的物件。)","modal_password_attn4":"注意 4/5:您需要確保遠端儲存是“空”的,或者已有檔案也是被同一個新密碼加密的;從而避免衝突。","modal_password_attn5":"注意 5/5:密碼越長越好。","modal_password_secondconfirm":"再次確認儲存新密碼","modal_password_notice":"新密碼已儲存!","modal_encryptionmethod_title":"稍等一下,請閱讀下文:","modal_encryptionmethod_shortdesc":"您正在修改加密方式,但是您已經設定了密碼。\\n修改加密方式之後,您需要<b>手動</b>和<b>完全</b>刪除在遠端的之前加密過的庫檔案,然後重新同步(從而重新上傳)新的加密檔案。","modal_remotebasedir_title":"您正在修改遠端基資料夾設定","modal_remotebasedir_shortdesc":"1. 本外掛並不會自動在遠端把內容從舊資料夾移動到新資料夾。所有內容都會重新同步。\\n2. 如果你使得文字輸入框為空,那麼本設定會被重設回庫的資料夾名(預設設定)。\\n3. 即使您設定了端對端加密的密碼,遠端資料夾名稱本身也不會被加密。\\n4. 某些特殊字元,如“?”、“/”、“\\\\”是不允許的。文字前後的空格也會被自動刪去。","modal_remotebasedir_invaliddirhint":"您所輸入的內容含有某些特殊字元,如“?”、“/”、“\\\\”,它們是不允許的。","modal_remotebasedir_secondconfirm_vaultname":"重設回預設的庫資料夾名","modal_remotebasedir_secondconfirm_change":"確認修改","modal_remotebasedir_notice":"新的遠端基資料夾設定已儲存!","modal_remoteprefix_s3_title":"您正在修改遠端路徑字首設定","modal_remoteprefix_s3_shortdesc":"1. 本外掛並不會自動在遠端把內容從舊資料夾移動到新資料夾。所有內容都會重新同步。\\n2. 如果你使得文字輸入框為空,那麼本設定為儲存為空,檔案將會被儲存在桶(Bucket)的根目錄。\\n3. 即使您設定了端對端加密的密碼,遠端資料夾名稱本身也不會被加密。\\n4. 某些特殊字元,如“?”、“/”、“\\\\”是不允許的。文字前後的空格也會被自動刪去。","modal_remoteprefix_s3_invaliddirhint":"您所輸入的內容含有某些特殊字元,如“?”、“/”、“\\\\”,它們是不允許的。","modal_remoteprefix_s3_tosave":"您設定的新字首為:“{{{prefix}}}”","modal_remoteprefix_s3_secondconfirm_empty":"字首為空,檔案會儲存在根目錄","modal_remoteprefix_s3_secondconfirm_change":"確認修改","modal_remoteprefix_s3_notice":"新的遠端路徑字首設定已儲存!","modal_dropboxauth_manualsteps":"第 1 步:在瀏覽器中訪問以下地址,然後按照網頁提示操作。\\n到了最後,您應該會獲得一串很長的程式碼文字,請複製貼上到下方,並點選“提交”","modal_dropboxauth_autosteps":"在瀏覽器中訪問以下地址,然後按照網頁提示操作。\\n到了最後,您應該會被自動重定向回來 Obsidian。","modal_dropboxauth_copybutton":"點選此按鈕從而複製鑑權 url","modal_dropboxauth_copynotice":"鑑權 url 已複製到剪貼簿!","modal_dropboxauth_maualinput":"來自網頁的授權碼","modal_dropboxauth_maualinput_desc":"您需要點選“確認”","modal_dropboxauth_maualinput_notice":"正在嘗試連線 Dropbox","modal_dropboxauth_maualinput_conn_succ":"很好!我們作為使用者 {{username}} 連線到 Dropbox 了!","modal_dropboxauth_maualinput_conn_succ_revoke":"您已作為使用者 {{username}} 連線到 Dropbox。如果您想斷開連線,點選此按鈕。","modal_dropboxauth_maualinput_conn_fail":"連線 Dropbox 途中出錯了。","modal_onedriveauth_shortdesc":"現在只支援個人版 OneDrive,(暫)不支援企業版。\\n在瀏覽器中訪問以下地址,然後按照網頁提示操作。\\n到了最後,您應該會被自動重定向回來 Obsidian。","modal_onedriveauth_shortdesc_linux":"您正在用 Linux,有可能無法跳轉回來。請考慮<a href=\\"https://github.com/remotely-save/remotely-save/issues/415\\">使用</a> flatpack 版本的 Obsidian,或建立 <a href=\\"https://github.com/remotely-save/remotely-save/blob/master/docs/linux.md\\"><code>obsidian.desktop</code> 檔案</a>。","modal_onedriveauth_copybutton":"點選此按鈕從而複製鑑權 url","modal_onedriveauth_copynotice":"鑑權 url 已複製到剪貼簿!","modal_onedriverevokeauth_step1":"第 1 步:用瀏覽器開啟以下地址,點選本外掛對應的“Edit”按鈕,點選“Remove these permissions”按鈕。","modal_onedriverevokeauth_step2":"第 2 步:點選以下按鈕,清理本地儲存的登入資訊。","modal_onedriverevokeauth_clean":"清理本地儲存的登入資訊","modal_onedriverevokeauth_clean_desc":"您需要點選“清理”按鈕。","modal_onedriverevokeauth_clean_button":"清理","modal_onedriverevokeauth_clean_notice":"已清理!","modal_onedriverevokeauth_clean_fail":"鑑權途中出錯了。","modal_syncconfig_attn":"注意 1/2:此設定只同步(複製)整個 Obsidian 的配置資料夾,但是不會同步其它 . 開頭的資料夾或檔案。除了會忽略 .git 和 node_modules 資料夾之外,它也並不理解配置資料夾的裡各個子檔案或子資料夾的含義。\\n注意 2/2:配置資料夾被同步之後,各外掛的設定或許會出錯,且 Obsidian 或許需要重啟來過載各外掛的新配置。\\n如果您同意自行承受以上風險,您可以點選以下再次確認按鈕。","modal_syncconfig_secondconfirm":"再次確認開啟","modal_syncconfig_notice":"您已開啟配置資料夾的同步!","modal_qr_shortdesc":"這裡可匯出(部分)設定。\\n您可以使用另一個裝置來掃描此 QR 碼。\\n又或者,您可以點選以下按鈕複製此特殊 URI,然後貼上到另一臺裝置的網路瀏覽器或 Remotely Save 設定裡的匯入部分。","modal_qr_button":"點選此按鈕複製特殊 URI","modal_qr_button_notice":"特殊 URI 已被複制到剪貼簿!","modal_sizesconflict_title":"Remotely Save:跳過大檔案的時候出現了一些衝突","modal_sizesconflict_desc":"您設定了跳過同步大於 {{thresholdMB}} MB({{thresholdBytes}} bytes)的檔案。\\n但是以下檔案的大小,在一端大於閾值,在另一端則小於閾值。\\n為了避免意外的覆蓋或刪除,外掛停止了運作,您需要手動處理至少一端的檔案。","modal_sizesconflict_copybutton":"點選以複製以下所有檔案大小衝突資訊","modal_sizesconflict_copynotice":"所有的檔案大小衝突資訊,已被複制到剪貼簿!","settings_basic":"基本設定","settings_password":"密碼","settings_password_desc":"端到端加密的密碼。不填寫則代表沒密碼。您需要點選“確認”來修改。注意:密碼和其它資訊都會在本地儲存。如果您修改了密碼,您需要手動刪除遠端的所有檔案,重新同步(從而上傳)加密檔案。","settings_encryptionmethod":"加密方法","settings_encryptionmethod_desc":"端到端加密的方法。推薦選用 RClone Crypt 方法,但是它沒有加密檔案路徑結構。OpenSSL enc 是本外掛一開始就支援的方式。<b>兩種方法都和 RClone、OpenSSL 官方產品和社群無利益相關。</b>如果您修改了加密方法,您需要手動刪除遠端的所有檔案,重新同步(從而上傳)加密檔案。更多詳細說明見<a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/encryption\'>線上文件</a>。","settings_encryptionmethod_rclone":"RClone Crypt(推薦)","settings_encryptionmethod_openssl":"OpenSSL enc(舊方法)","settings_autorun":"自動執行","settings_autorun_desc":"每隔一段時間,此外掛嘗試自動同步。會影響到電池用量。","settings_autorun_notset":"(不設定)","settings_autorun_1min":"每 1 分鐘","settings_autorun_5min":"每 5 分鐘","settings_autorun_10min":"每 10 分鐘","settings_autorun_30min":"每 30 分鐘","settings_runoncestartup":"啟動後自動執行一次","settings_runoncestartup_desc":"本設定使得外掛在程式啟動後自動觸發一次同步。修改後,會在下一次啟動生效。本設定和“自動執行”是不同的,那個設定是指“每隔一段時間”都自動同步一次。","settings_runoncestartup_notset":"(不設定)","settings_runoncestartup_1sec":"啟動後第 1 秒執行一次","settings_runoncestartup_10sec":"啟動後第 10 秒執行一次","settings_runoncestartup_30sec":"啟動後第 30 秒執行一次","settings_synconsave":"儲存時同步(實驗性質)","settings_synconsave_desc":"外掛如果檢查到當前檔案在最近一段時間有修改儲存過,則嘗試同步。請注意,同步是一個很重的操作,因此會影響到耗電量。(修改設定後可能需要過載外掛或重啟。)","settings_synconsave_disable":"關閉(預設)","settings_synconsave_enable":"開啟","settings_skiplargefiles":"跳過大檔案","settings_skiplargefiles_desc":"跳過大於某一個閾值的檔案。這裡 1 MB = 10^6 bytes。","settings_skiplargefiles_notset":"(不設定)","settings_ignorepaths":"忽略的檔案或資料夾的正則表示式","settings_ignorepaths_desc":"忽略的檔案或資料夾的正則表示式。每行一條。路徑是相對於庫(Vault)根目錄的,沒有前置 / 符號。非空的忽略列表和非空的允許列表會一起生效。","settings_onlyallowpaths":"允許同步的檔案或資料夾的正則表示式","settings_onlyallowpaths_desc":"允許同步的檔案或資料夾的正則表示式。每行一條。路徑是相對於庫(Vault)根目錄的,沒有前置 / 符號。如果這個設定非空,那麼所有您想同步的路徑(包括隱藏的設定資料夾)都要明確地列出到這裡。非空的忽略列表和非空的允許列表會一起生效。","settings_enablestatusbar_info":"在狀態列顯示上一次成功的同步","settings_enablestatusbar_info_desc":"在狀態列顯示上一次成功的同步的時間。","settings_enablestatusbar_reloadrequired_notice":"需要重新載入此外掛才生效。","settings_resetstatusbar_time":"重設上一次成功同步的時間記錄","settings_resetstatusbar_time_desc":"重設上一次成功同步的時間記錄。","settings_resetstatusbar_button":"重設","settings_resetstatusbar_notice":"重設完畢!","settings_checkonnectivity":"檢查可否連線","settings_checkonnectivity_desc":"檢查可否連線。","settings_checkonnectivity_button":"檢查","settings_checkonnectivity_checking":"正在檢查……","settings_remotebasedir":"修改遠端基資料夾(實驗性質)","settings_remotebasedir_desc":"預設設定,內容會被同步到遠端的和資料庫同名的資料夾下。您可以在此修改遠端資料夾名,或刪除輸入框文字從而重設到預設值。您需要點選“確認”。","settings_remoteprefix_s3":"修改遠端字首路徑(實驗性質)","settings_remoteprefix_s3_desc":"預設設定 s3 儲存在儲存桶(Bucket)的根目錄。您可以在這裡修改路徑字首,或者保持為空保持預設設定。您需要點選“確認”。","settings_s3":"S3 或相容 S3 的服務的設定","settings_s3_disclaimer1":"宣告:本外掛不是 Amazon 的官方產品。","settings_s3_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了儲存桶有不符合預期的訪問,請立刻從 AWS(或其它 S3 服務商)刪除記錄於此的 access key。","settings_s3_cors":"您需要設定 CORS,從而允許這些源的請求訪問:app://obsidian.md 和 capacitor://localhost 和 http://localhost 且增加 ETag 到暴露 headers 裡。","settings_s3_prod":"一些可參考的 Amazon S3 官方文件:","settings_s3_prod1":"服務地址(Endpoint)和區域(Region)資訊","settings_s3_prod2":"Access Key ID 和 Secret Access Key 資訊","settings_s3_prod3":"設定 CORS","settings_s3_endpoint":"服務地址(Endpoint)","settings_s3_region":"區域(Region)","settings_s3_region_desc":"如果您不知道這個值填什麼,可以嘗試填寫:us-east-1。","settings_s3_accesskeyid":"Access Key ID","settings_s3_accesskeyid_desc":"Access key ID。注意:access key ID 和其它資訊都會在本地儲存。","settings_s3_secretaccesskey":"Secret Access Key","settings_s3_secretaccesskey_desc":"Secret access key。注意:secret access key 和其它資訊都會在本地儲存。","settings_s3_bucketname":"儲存桶(Bucket)的名字","settings_s3_bypasscorslocally":"本地繞過 CORS 問題","settings_s3_bypasscorslocally_desc":"對於 Obsidian 新版本(桌面版>=0.13.25 或 iOS>=1.1.1 或 Android>=1.2.1),本外掛可以跳過伺服器設定 CORS 的步驟。如果您遇到任意問題,可以關閉此設定,並在服務端設定 CORS(允許來自 app://obsidian.md 和 capacitor://localhost 和 http://localhost 的請求且增加 ETag 到暴露 headers 裡)。","settings_s3_parts":"分塊並行度","settings_s3_parts_desc":"在 S3 裡,大檔案會被分塊上傳。您希望同一時間最多有多少個分塊被上傳?","settings_s3_accuratemtime":"使用準確的檔案修改時間","settings_s3_accuratemtime_desc":"讀取(已上傳的)準確的檔案修改時間,有助於同步演算法更加準確和穩定。但是它也會導致額外的 api 請求、時間、金錢花費。","settings_s3_urlstyle":"S3 URL style","settings_s3_urlstyle_desc":"是否對 S3 物件強制使用 path style URL(例如使用 https://s3.amazonaws.com/*/ 而不是 https://*.s3.amazonaws.com/)。","settings_s3_reverse_proxy_no_sign_url":"S3 反向代理(不簽名)地址(實驗性質)","settings_s3_reverse_proxy_no_sign_url_desc":"不會參與到簽名的 S3 反向代理地址。如果您有一個反向代理,但是不想修改原始鑑權簽名,這裡就可以填寫。沒有 http(s):// 字首。如果您不知道這是什麼,留空即可。","settings_s3_generatefolderobject":"是否生成文件夾 Object","settings_s3_generatefolderobject_desc":"S3 不存在“真正”的文件夾。如果您設置了“生成”(或用了舊版本),那麼插件會上傳 0 字節的以“/”結尾的 Object 來代表文件夾。新版本插件會默認跳過生成這種文件夾 Object。","settings_s3_generatefolderobject_notgenerate":"不生成(默認)","settings_s3_generatefolderobject_generate":"生成","settings_s3_connect_succ":"很好!可以訪問到對應儲存桶。","settings_s3_connect_fail":"無法訪問到對應儲存桶。","settings_dropbox":"Dropbox 設定","settings_dropbox_disclaimer1":"宣告:此外掛不是 Dropbox 官方產品。","settings_dropbox_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了 Dropbox 有不符合預期的訪問,請立刻從 https://www.dropbox.com/account/connected_apps 刪除記錄於此外掛的連線鑑權。","settings_dropbox_folder":"我們會在您的 Dropbox 上建立此資料夾並在裡面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。","settings_dropbox_revoke":"撤回鑑權","settings_dropbox_revoke_desc":"您現在使用了使用者名稱 {{username}} 來連線。如果想取消連線,請點選此按鈕。","settings_dropbox_revoke_button":"撤回鑑權","settings_dropbox_revoke_notice":"鑑權已被撤回!","settings_dropbox_revoke_noticeerr":"撤回鑑權出錯。","settings_dropbox_clearlocal":"清除本地儲存的鑑權資訊","settings_dropbox_clearlocal_desc":"您可以強制清除本地已儲存的 Dropbox 的登入鑑權資訊,但不向伺服器傳送撤回鑑權的請求。","settings_dropbox_clearlocal_button":"清除","settings_dropbox_clearlocal_notice":"已清除!","settings_dropbox_auth":"鑑權","settings_dropbox_auth_desc":"鑑權。","settings_dropbox_auth_button":"鑑權","settings_dropbox_connect_succ":"很好!我們可連線上 Dropbox!","settings_dropbox_connect_fail":"我們未能連線上 Dropbox。","settings_onedrive":"Onedrive(個人版)(App Folder)設定","settings_onedrive_disclaimer1":"宣告:此外掛不是微軟或 OneDrive 的官方產品。","settings_onedrive_disclaimer2":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了 OneDrive 有不符合預期的訪問,請立刻從 https://microsoft.com/consent 刪除記錄於此外掛的連線鑑權。","settings_onedrive_folder":"我們會在您的 OneDrive 上建立此資料夾並在裡面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。","settings_onedrive_nobiz":"現在只支援個人版 OneDrive。(暫時)並不支援企業版 OneDrive。","settings_onedrive_revoke":"撤回鑑權","settings_onedrive_revoke_desc":"您現在使用了使用者名稱 {{username}} 來連線。如果想取消連線,請點選此按鈕。","settings_onedrive_revoke_button":"撤回鑑權","settings_onedrive_auth":"鑑權","settings_onedrive_auth_desc":"鑑權。","settings_onedrive_auth_button":"鑑權","settings_onedrive_connect_succ":"很好!我們可連線上 OneDrive!","settings_onedrive_connect_fail":"我們未能連線上 OneDrive。","settings_onedrive_emptyfile":"空檔案處理","settings_onedrive_emptyfile_desc":"OneDrive 不允許上傳空檔案(即使官網也是不允許的)。那麼你想跳過空檔案還是返回錯誤?","settings_onedrive_emptyfile_skip":"跳過","settings_onedrive_emptyfile_error":"返回錯誤和中斷","settings_webdav":"Webdav 設定","settings_webdav_disclaimer1":"宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了 Webdav 伺服器有不符合預期的訪問,請立刻修改使用者名稱和密碼。","settings_webdav_cors_os":"Obsidian 桌面版>=0.13.25 或 iOS>=1.1.1 或 Android>=1.1.1 支援跳過 CORS 設定。但您正在使用舊版,建議升級。","settings_webdav_cors":"您需要設定 CORS,允許來自這些源的請求:app://obsidian.md 和 capacitor://localhost 和 http://localhost。","settings_webdav_folder":"我們會在您的伺服器上建立此資料夾並在裡面同步:/{{remoteBaseDir}}","settings_webdav_addr":"伺服器地址","settings_webdav_addr_desc":"伺服器地址。","settings_webdav_user":"使用者名稱","settings_webdav_user_desc":"使用者名稱。注意:使用者名稱和其它資訊都會儲存在本地。","settings_webdav_password":"密碼","settings_webdav_password_desc":"密碼。注意:密碼和其它資訊都會儲存在本地。","settings_webdav_auth":"鑑權型別","settings_webdav_auth_desc":"如果不填寫密碼,本設定會被忽略。","settings_webdav_depth":"傳送到伺服器的 Depth header","settings_webdav_depth_desc":"Webdav 伺服器會被設為接收 Depth header 為“1”或“Infinity”請求。如果您不清楚如何設定,可以選擇 depth=\'1\'。如果那你確認伺服器支援 depth=\'infinity\',請選擇它,會獲得更加好的效能。","settings_webdav_depth_1":"只支援 depth=\'1\'","settings_webdav_depth_inf":"支援 depth=\'infinity\'","settings_webdav_customheaders":"傳送到伺服器的自定義 Header","settings_webdav_customheaders_desc":"有些使用者需要設定自定義 header。如果您不知道是什麼,可以直接留空不填。輸入格式:每行形如 <code>X-Header1:value1</code>。header 的 key 和 value 之間的空格會被刪除。","settings_webdav_connect_succ":"很好!可以連線上 Webdav 伺服器。","settings_webdav_connect_fail":"無法連線上 Webdav 伺服器。(可能是地址/賬號/密碼/鑑權型別等錯誤。)","settings_webdav_connect_fail_withcors":"無法連線上 Webdav 伺服器。(可能是地址/賬號/密碼/鑑權型別/CORS 等錯誤。)","settings_webdis":"Webdis 設置","settings_webdis_disclaimer1":"聲明:此插件不是 Redis® Ltd 或 Redis® 軟件或 Wedis 的官方產品。Redis 是 Redis Ltd 的註冊商標。","settings_webdis_disclaimer2":"聲明:您所輸入的信息存儲於本地。其它有害的或者出錯的插件,是有可能讀取到這些信息的。如果您發現了 Webdis 服務器有不符合預期的訪問,請立刻修改用戶名和密碼。","settings_webdis_folder":"我們會在您的服務器上創建帶有此前綴的 key 並在裡面同步::{{remoteBaseDir}}。","settings_webdis_addr":"服務器地址","settings_webdis_addr_desc":"服務器地址","settings_webdis_user":"用戶名","settings_webdis_user_desc":"用戶名。注意:用戶名和其它信息都會保存在本地。","settings_webdis_password":"密碼","settings_webdis_password_desc":"密碼。注意:密碼和其它信息都會保存在本地。","settings_webdis_connect_succ":"很好!可以連接上 Webdis 服務器。","settings_webdis_connect_fail":"無法連接上 Webdis 服務器。(可能是地址/賬號/密碼/鑑權類型等錯誤。)","settings_chooseservice":"選擇遠端服務","settings_chooseservice_desc":"從這裡開始設定。您想連線到哪一個服務?S3、Dropbox、Webdav、OneDrive(個人版)、Webdis?","settings_chooseservice_s3":"S3 或相容 S3 的服務","settings_chooseservice_dropbox":"Dropbox","settings_chooseservice_webdav":"Webdav","settings_chooseservice_onedrive":"OneDrive(個人版)","settings_chooseservice_webdis":"Webdis (an HTTP interface for Redis®)","settings_adv":"進階設定","settings_concurrency":"並行度","settings_concurrency_desc":"您希望同時最多有多少個檔案被上傳和下載?預設值是 5。如果您遇到了一些問題(如訪問頻率限制),您可以減少並行度。","settings_syncunderscore":"同步 _ 檔案或資料夾","settings_syncunderscore_desc":"是否同步“_”(下劃線)開始的檔案或資料夾。","settings_configdir":"同步配置資料夾(實驗性質)","settings_configdir_desc":"是否同步 Obsidian 的配置資料夾 {{configDir}}(其中的 .git 和 node_modules 依然會被忽略)。請注意,此設定可能會影響到您 Obsidian 或者所有的外掛設定,也可能需要您同步完畢後重啟 Obsidian。如果您同意自行承受其風險,則可以開啟本設定。","settings_bookmarks":"同步書籤(實驗性質)","settings_bookmarks_desc":"是否同步書籤 {{configDir}}/bookmarks.json 。如果您設定了同步配置資料夾,此選項會被忽略並設為“開啟”。","settings_deletetowhere":"刪除檔案到哪裡","settings_deletetowhere_desc":"外掛觸發刪除操作時候,刪除到哪裡?","settings_deletetowhere_system_trash":"系統回收站(預設)","settings_deletetowhere_obsidian_trash":"Obsidian .trash 資料夾","settings_conflictaction":"處理衝突","settings_conflictaction_desc":"如果一個檔案,在本地和伺服器都被建立或者修改了,那麼這就是一個“衝突”情況。如何處理?這個設定只在雙向同步時候生效。","settings_conflictaction_keep_newer":"保留最後修改的版本(預設)","settings_conflictaction_keep_larger":"保留檔案體積較大的版本","settings_cleanemptyfolder":"處理空資料夾","settings_cleanemptyfolder_desc":"同步演算法主要是針對檔案處理的,您需要手動指定空資料夾如何處理。","settings_cleanemptyfolder_skip":"跳過處理空資料夾(預設)","settings_cleanemptyfolder_clean_both":"刪除本地和伺服器的空資料夾","settings_protectmodifypercentage":"如果修改超過百分比則中止同步","settings_protectmodifypercentage_desc":"如果演算法檢測到超過 n% 的檔案會被修改或刪除,則中止同步。從而可以保護使用者的檔案免受預料之外的修改。您可以設定為 100 而去除此保護,也可以設定為 0 總是強制中止所有同步。","settings_protectmodifypercentage_000_desc":"0(總是強制中止)","settings_protectmodifypercentage_050_desc":"50(預設值)","settings_protectmodifypercentage_100_desc":"100(去除此保護)","settings_protectmodifypercentage_custom_desc":"自定義","settings_protectmodifypercentage_customfield":"如果修改超過自定義百分比則中止同步","settings_protectmodifypercentage_customfield_desc":"您需要輸入 0(含)~ 100(含)的數字。小數也是可以的。","setting_syncdirection":"同步方向(實驗性質)","setting_syncdirection_desc":"<p>W外掛應該向哪裡同步?注意每個選項都是隻有修改了的檔案(基於修改時間和大小判斷)才會觸發同步動作。</p><ol><li>雙向同步:一邊的變動會同步到另一邊。</li><li>增量推送:本地建立或修改的檔案會複製到遠端。</li><li>增量拉取:遠端建立或修改的檔案會複製到本地。</li><li>增量推送帶刪除:本地建立或修改的檔案會複製到遠端,<strong>本地的刪除也會在遠端執行。</strong></li><li>增量拉取帶刪除:遠端建立或修改的檔案會複製到本地,<strong>遠端的刪除也會在本地執行。</strong></li></ol>","setting_syncdirection_bidirectional_desc":"雙向同步(預設)","setting_syncdirection_incremental_push_only_desc":"增量推送(也即:備份模式)","setting_syncdirection_incremental_pull_only_desc":"增量拉取","setting_syncdirection_incremental_push_and_delete_only_desc":"增量推送帶刪除","setting_syncdirection_incremental_pull_and_delete_only_desc":"增量拉取帶刪除","settings_enablemobilestatusbar":"手機的狀態列(實驗性質)","settings_enablemobilestatusbar_desc":"Obsidian 手機版預設隱藏了狀態列。有些使用者希望展示它。這裡提供了設定選項。","settings_importexport":"匯入匯出部分設定","settings_export":"匯出","settings_export_desc":"用 QR 碼或 URI 匯出設定資訊。","settings_export_basic_and_advanced_button":"匯出基本或進階設定","settings_export_s3_button":"匯出 S3 部分","settings_export_dropbox_button":"匯出 Dropbox 部分","settings_export_onedrive_button":"匯出 OneDrive (App Folder) 部分","settings_export_webdav_button":"匯出 Webdav 部分","settings_export_webdis_button":"匯出 Webdis 部分","settings_import":"匯入","settings_import_desc":"貼上之前匯出的 URI 到這裡然後點選“匯入”。或,使用拍攝 app 或者掃描 QR 碼的 app,來掃描對應的 QR 碼。","settings_import_button":"匯入","settings_import_error_notice":"您輸入的 URI 是空的或者不準確的!","settings_debug":"除錯","settings_debuglevel":"修改同步提示資訊","settings_debuglevel_desc":"預設值為 \\"info\\"。您可以改為 \\"debug\\" 從而在同步時候裡獲取更多資訊。","settings_outputsettingsconsole":"讀取硬碟上的設定檔案輸出到終端","settings_outputsettingsconsole_desc":"硬碟上的設定檔案是編碼過的,點選這裡從而解碼並輸出到終端。","settings_outputsettingsconsole_button":"輸出","settings_outputsettingsconsole_notice":"已輸出到終端","settings_obfuscatesettingfile":"是否混淆儲存設定檔案","settings_obfuscatesettingfile_desc":"設定檔案(data.json)含有敏感資訊。強烈建議混淆後儲存它,從而避免出乎意料的讀取和修改。如果您確認要手動檢視和修改它,可以關閉混淆儲存。","settings_viewconsolelog":"檢視終端輸出","settings_viewconsolelog_desc":"電腦上,輸入“ctrl+shift+i”或“cmd+shift+i”來檢視終端輸出。手機上,安裝第三方外掛 <a href=\'https://obsidian.md/plugins?search=Logstravaganza\'>Logstravaganza</a> 來匯出終端輸出到一篇筆記上。","settings_syncplans":"匯出同步計劃","settings_syncplans_desc":"每次您啟動同步,並在實際上傳下載前,外掛會生成同步計劃。它可以使您知道每次同步發生了什麼。點選按鈕可以匯出同步計劃。","settings_syncplans_button_1_only_change":"匯出最近 1 次(僅修改部分)","settings_syncplans_button_5_only_change":"匯出最近 5 次(僅修改部分)","settings_syncplans_button_1":"匯出最近 1 次","settings_syncplans_button_5":"匯出最近 5 次","settings_syncplans_button_all":"匯出所有","settings_syncplans_notice":"同步計劃已匯出","settings_delsyncplans":"刪除資料庫裡的同步計劃歷史","settings_delsyncplans_desc":"刪除資料庫裡的同步計劃歷史。","settings_delsyncplans_button":"刪除同步計劃歷史","settings_delsyncplans_notice":"(資料庫裡的)同步計劃已被刪除。","settings_delprevsync":"刪除資料庫裡的上次同步明細","settings_delprevsync_desc":"同步演算法需要上次成功同步的資訊來決定檔案變更,這個資訊儲存在本地的資料庫裡。如果您想忽略這些資訊從而所有檔案都被視為新建立的話,可以在此刪除之前的資訊。","settings_delprevsync_button":"刪除上次同步明細","settings_delprevsync_notice":"(本地資料庫裡的)上次同步明細已被刪除。","settings_profiler_results":"匯出效能資料記錄","settings_profiler_results_desc":"外掛記錄了每次同步每一步的耗時。這裡可以匯出記錄得知哪一步最慢。","settings_profiler_results_notice":"效能資料已匯出","settings_profiler_results_button_all":"匯出所有","settings_profiler_enableprofiler":"效能收集","settings_profiler_enableprofiler_desc":"是否開啟效能收集功能?","settings_profiler_enabledebugprint":"效能收集輸出","settings_profiler_enabledebugprint_desc":"是否直接輸出效能收集結果到終端裡?","settings_profiler_recordsize":"效能收集統計物件大小","settings_profiler_recordsize_desc":"是否收集物件的大小?","settings_outputbasepathvaultid":"輸出資料庫對應的位置和隨機分配的 ID","settings_outputbasepathvaultid_desc":"用於除錯。","settings_outputbasepathvaultid_button":"輸出","settings_resetcache":"重設本地快取和資料庫","settings_resetcache_desc":"(出於除錯原因)重設本地快取和資料庫。您需要在重設之後重新載入此外掛。本重設不會刪除 s3,密碼……等設定。","settings_resetcache_button":"重設","settings_resetcache_notice":"本地同步快取和資料庫已被刪除。請手動重新載入此外掛。","syncalgov3_title":"Remotely Save 的同步演算法有重大更新","syncalgov3_texts":"歡迎使用 Remotely Save!\\n從這個版本開始,外掛更新了同步演算法:\\n<ul><li>更穩健的刪除同步</li><li>引入衝突處理</li><li>避免上傳元資料</li><li>修改刪除保護</li><li>備份模式</li><li>新的加密方式</li><li>……</li></ul>\\n敬請期待更多更新!詳細介紹請參閱<a href=\'https://github.com/remotely-save/remotely-save/tree/master/docs/sync_algorithm/v3/intro.md\'>文件網站</a>。\\n如果您同意使用新版本,請閱讀和勾選兩個勾選框,然後點選“同意”按鈕,開始使用外掛吧!\\n如果您不同意,請點選“不同意”按鈕,外掛將自動停止執行(unload)。\\n此外,請考慮<a href=\'https://github.com/remotely-save/remotely-save\'>訪問 GitHub 頁面然後點贊 ⭐</a>!您的支援對我十分重要!謝謝!","syncalgov3_checkbox_manual_backup":"我將會首先手動備份我的庫(Vault)。","syncalgov3_checkbox_requiremultidevupdate":"我理解,我需要在所有裝置上都更新此外掛使之正常執行。","syncalgov3_button_agree":"同意","syncalgov3_button_disagree":"不同意","menu_check_file_stat":"檢視檔案屬性"}')},Xj=Aj()(Zj,Qj);class eH{constructor(e,t){this.lang=e,this.saveSettingFunc=t}changeTo(e){return r(this,void 0,void 0,(function*(){this.lang=e,yield this.saveSettingFunc(e)}))}_get(e){let t=this.lang;t="auto"===this.lang&&k.moment.locale().replace("-","_")in Xj?k.moment.locale().replace("-","_"):"en";return Xj[t][e]||Xj.en[e]||e}t(e,t){return void 0===t?this._get(e):Yj.render(this._get(e),t)}}var tH=__webpack_require__(87583);const rH=(e,t)=>{const r=e;if(void 0===r.func||"settings"!==r.func||void 0===r.vault||void 0===r.data)return{status:"error",message:`the uri is not for exporting/importing settings: ${JSON.stringify(e)}`};if(r.vault!==t)return{status:"error",message:`the target vault is ${r.vault} but you are currently in ${t}: ${JSON.stringify(e)}`};let i={};try{i=JSON.parse(r.data)}catch(t){return{status:"error",message:`errors while parsing settings: ${JSON.stringify(e)}`}}return{status:"ok",message:"ok",result:i}},iH={enable:!1,enablePrinting:!1,recordSize:!1};class nH{constructor(e,t,r){if(this.breakPoints=[],this.indent=0,this.startTime=0,this.enablePrinting=null!=t&&t,this.recordSize=null!=r&&r,void 0!==e){this.startTime=Date.now();const t={label:e,fakeTimeMilli:performance.now(),indent:this.indent};this.breakPoints.push(t),this.enablePrinting&&console.debug(this.toString(-1))}}insert(e){0===this.breakPoints.length&&(this.startTime=Date.now());const t={label:e,fakeTimeMilli:performance.now(),indent:this.indent};return this.breakPoints.push(t),this.enablePrinting&&console.debug(this.toString(-1)),this}insertSize(e,t){if(!this.recordSize)return;0===this.breakPoints.length&&(this.startTime=Date.now());const r={label:e,fakeTimeMilli:performance.now(),indent:this.indent,size:eh(t)};return this.breakPoints.push(r),this.enablePrinting&&console.debug(this.toString(-1)),this}addIndent(){this.indent+=2}removeIndent(){this.indent-=2,this.indent<0&&(this.indent=0)}clear(){return this.breakPoints=[],this.indent=0,this.startTime=0,this}toString(e){var t,r,i,n;if(void 0!==e){let o=e;e<0&&(o=this.breakPoints.length+e);const s=null===(t=this.breakPoints)||void 0===t?void 0:t[o].label,a=null===(r=this.breakPoints)||void 0===r?void 0:r[o].indent;let l=0;o>=1&&(l=Math.round(10*((null===(i=this.breakPoints)||void 0===i?void 0:i[o].fakeTimeMilli)-(null===(n=this.breakPoints)||void 0===n?void 0:n[o-1].fakeTimeMilli)))/10);let d=`${" ".repeat(a)}[${s}]: ${l}ms`;if(this.breakPoints[o].hasOwnProperty("size")){d+=`, size=${this.breakPoints[o].size}`}return d}if(0===this.breakPoints.length)return"nothing in profiler";let o=`[startTime]: ${Vp(this.startTime)}`;for(let e=0;e<this.breakPoints.length;++e)o+=0===e?`\n[${this.breakPoints[e].label}]: start`:`\n${this.toString(e)}`;return o}save(e,t,i){return r(this,void 0,void 0,(function*(){yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=Date.now();yield e.profilerResultsTbl.setItem(`${i}\t${r}`,t);const n=(yield e.profilerResultsTbl.keys()).filter((e=>e.startsWith(`${i}\t`))).map((e=>Number.parseInt(e.split("\t")[1])));for(n.sort(((e,t)=>-(e-t)));n.length>5;){const t=n.pop();yield e.profilerResultsTbl.removeItem(`${i}\t${t}`)}})))(e,this.toString(),t)}))}}
|
||
/**
|
||
* @license lucide v0.416.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/
|
||
const oH=["svg",w,[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]]],sH=["svg",w,[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]]];class aH extends k.Modal{constructor(e,t,r){super(e),this.plugin=t,this.newRemotePrefix=r}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_remoteprefix_azureblobstorage_title")}),t("modal_remoteprefix_azureblobstorage_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:t})})),e.createEl("p",{text:t("modal_remoteprefix_azureblobstorage_tosave",{prefix:this.newRemotePrefix})}),new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remoteprefix_azureblobstorage_secondconfirm_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.azureblobstorage.remotePrefix=this.newRemotePrefix,yield this.plugin.saveSettings(),new k.Notice(t("modal_remoteprefix_azureblobstorage_notice")),this.close()})))),e.setClass("remoteprefix-azureblobstorage-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class lH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,i=(()=>{const e=new lh.OAuthConfig({clientId:U,clientSecret:L});return new lh.BoxOAuth({config:e}).getAuthorizeUrl({redirectUri:`obsidian://${q}`})})(),n=e.createDiv();n.createDiv({text:Qp(t("modal_boxauth_tutorial"))}),n.createEl("button",{text:t("modal_boxauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_boxauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i})}))}onClose(){const{contentEl:e}=this;e.empty()}}class dH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_boxrevokeauth_step1")});const i="https://app.box.com/account/security";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_boxrevokeauth_step2")}),new k.Setting(t).setName(e("modal_boxrevokeauth_clean")).setDesc(e("modal_boxrevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_boxrevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.box=m()(bh),yield this.plugin.saveSettings(),this.authDiv.toggleClass("box-auth-button-hide",""!==this.plugin.settings.box.refreshToken),this.revokeAuthDiv.toggleClass("box-revoke-auth-button-hide",""===this.plugin.settings.box.refreshToken),new k.Notice(e("modal_boxrevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_boxrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class cH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.t=r,this.files=i,this.fsLocal=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_cleardupfiles_warning")}),t.createEl("pre").createEl("code",{text:this.files.join("\n")}),new k.Setting(t).addButton((t=>{t.setButtonText(e("modal_cleardupfiles_warning_confirm")),t.onClick((()=>r(this,void 0,void 0,(function*(){var t,i;yield(t=this.files,i=this.fsLocal,r(void 0,void 0,void 0,(function*(){yield Promise.all(t.map((e=>r(void 0,void 0,void 0,(function*(){return yield i.rm(e)})))))}))),new k.Notice(e("modal_cleardupfiles_warning_finished")),this.close()}))))})).addButton((t=>{t.setButtonText(e("goback")),t.onClick((()=>{this.close()}))}))}))}onClose(){const{contentEl:e}=this;e.empty()}}const uH=(e,t,i,n)=>{new k.Setting(e).setName(t("settings_cleardupfiles")).setDesc(Qp(t("settings_cleardupfiles_desc"))).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_cleardupfiles_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){var e,o,s;const a=new Cj(i.vault,null!==(e=n.settings.syncConfigDir)&&void 0!==e&&e,null!==(o=n.settings.syncBookmarks)&&void 0!==o&&o,i.vault.configDir,n.manifest.id,void 0,null!==(s=n.settings.deleteToWhere)&&void 0!==s?s:"system"),l=yield(e=>r(void 0,void 0,void 0,(function*(){const t=yield e.walk();t.sort(((e,t)=>-(e.keyRaw.length-t.keyRaw.length)));const r=new Set,i=new Set;for(const{keyRaw:e}of t){if(e.endsWith("/"))continue;e.includes("dup")&&r.add(e);const t=K_(e);r.has(t)&&i.add(t)}return[...i]})))(a);new cH(i,n,t,l,a).open()}))))}))))};class pH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,i="https://remotelysave.com/auth/googledrive/start",n=e.createDiv();n.createDiv({text:Qp(t("modal_googledriveauth_tutorial"))}),n.createEl("button",{text:t("modal_googledriveauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_googledriveauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i});let o="";new k.Setting(e).setName(t("modal_googledrivce_maualinput")).setDesc(t("modal_googledrivce_maualinput_desc")).addText((e=>e.setPlaceholder("").setValue("").onChange((e=>{o=e.trim()})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(t("submit")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(t("modal_googledrive_maualinput_notice"));try{void 0===this.plugin.settings.googledrive&&(this.plugin.settings.googledrive=m()(Sh)),this.plugin.settings.googledrive.refreshToken=o,this.plugin.settings.googledrive.accessToken="access",this.plugin.settings.googledrive.accessTokenExpiresAtTimeMs=1,this.plugin.settings.googledrive.accessTokenExpiresInMs=1;const e=yield Eh(o),r=Date.now();this.plugin.settings.googledrive.accessToken=e.access_token,this.plugin.settings.googledrive.accessTokenExpiresInMs=1e3*e.expires_in,this.plugin.settings.googledrive.accessTokenExpiresAtTimeMs=r+1e3*e.expires_in-12e4,this.plugin.settings.googledrive.credentialsShouldBeDeletedAtTimeMs=Date.now()+50976e5,yield this.plugin.saveSettings(),yield navigator.clipboard.writeText(""),new k.Notice(t("modal_googledrive_maualinput_succ_notice"))}catch(e){console.error(e),new k.Notice(t("modal_googledrive_maualinput_fail_notice"))}finally{this.authDiv.toggleClass("googledrive-auth-button-hide",""!==this.plugin.settings.googledrive.refreshToken),this.revokeAuthDiv.toggleClass("googledrive-revoke-auth-button-hide",""===this.plugin.settings.googledrive.refreshToken),this.close()}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class hH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_googledriverevokeauth_step1")});const i="https://myaccount.google.com/permissions";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_googledriverevokeauth_step2")}),new k.Setting(t).setName(e("modal_googledriverevokeauth_clean")).setDesc(e("modal_googledriverevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_googledriverevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.googledrive=m()(Sh),yield this.plugin.saveSettings(),this.authDiv.toggleClass("googledrive-auth-button-hide",""!==this.plugin.settings.googledrive.refreshToken),this.revokeAuthDiv.toggleClass("googledrive-revoke-auth-button-hide",""===this.plugin.settings.googledrive.refreshToken),new k.Notice(e("modal_googledriverevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_googledriverevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class fH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,i=((e,t)=>{let r="urn:ietf:wg:oauth:2.0:oob";return t&&(r=`obsidian://${V}`),`${e}/oauth2/auth?${new URLSearchParams({response_type:"code",client_id:J,redirect_uri:r,scope:"public",state:E()})}`})(this.plugin.settings.koofr.api,!0),n=e.createDiv();n.createDiv({text:Qp(t("modal_koofrauth_tutorial"))}),n.createEl("button",{text:t("modal_koofrauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_koofrauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i})}))}onClose(){const{contentEl:e}=this;e.empty()}}class mH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_koofrrevokeauth_step1")});const i="https://app.koofr.net/app/admin/preferences/security";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_koofrrevokeauth_step2")}),new k.Setting(t).setName(e("modal_koofrrevokeauth_clean")).setDesc(e("modal_koofrrevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_koofrrevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.koofr=m()(Nh),yield this.plugin.saveSettings(),this.authDiv.toggleClass("koofr-auth-button-hide",""!==this.plugin.settings.koofr.refreshToken),this.revokeAuthDiv.toggleClass("koofr-revoke-auth-button-hide",""===this.plugin.settings.koofr.refreshToken),new k.Notice(e("modal_koofrrevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_koofrrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class gH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,{authUrl:t,verifier:i}=yield function(e,t){return r(this,void 0,void 0,(function*(){const r=new Aw,{verifier:i,challenge:n}=yield r.generatePkceCodes(),o={challengeMethod:"S256",verifier:i,challenge:n},s={redirectUri:i_,scopes:r_,codeChallenge:o.challenge,codeChallengeMethod:o.challengeMethod},a=new Vw({auth:{clientId:e,authority:t}});return{authUrl:yield a.getAuthCodeUrl(s),verifier:i}}))}(this.plugin.settings.onedrivefull.clientID,this.plugin.settings.onedrivefull.authority);this.plugin.oauth2Info.verifier=i;const n=(e,t)=>this.plugin.i18n.t(e,t);n("modal_onedrivefullauth_shortdesc").split("\n").forEach((t=>{e.createEl("p",{text:t})})),k.Platform.isLinux&&n("modal_onedrivefullauth_shortdesc_linux").split("\n").forEach((t=>{e.createEl("p",{text:Qp(t)})}));e.createDiv().createEl("button",{text:n("modal_onedrivefullauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(t),new k.Notice(n("modal_onedrivefullauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:t,text:t})}))}onClose(){const{contentEl:e}=this;e.empty()}}class yH extends k.Modal{constructor(e,t,r,i){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("p",{text:t("modal_onedrivefullrevokeauth_step1")});const i="https://microsoft.com/consent";e.createEl("p").createEl("a",{href:i,text:i}),e.createEl("p",{text:t("modal_onedrivefullrevokeauth_step2")}),new k.Setting(e).setName(t("modal_onedrivefullrevokeauth_clean")).setDesc(t("modal_onedrivefullrevokeauth_clean_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(t("modal_onedrivefullrevokeauth_clean_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.onedrivefull=JSON.parse(JSON.stringify(n_)),yield this.plugin.saveSettings(),this.authDiv.toggleClass("onedrivefull-auth-button-hide",""!==this.plugin.settings.onedrivefull.username),this.revokeAuthDiv.toggleClass("onedrivefull-revoke-auth-button-hide",""===this.plugin.settings.onedrivefull.username),new k.Notice(t("modal_onedrivefullrevokeauth_clean_notice")),this.close()}catch(e){console.error(e),new k.Notice(t("modal_onedrivefullrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class vH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,{authUrl:i}=yield(n=!0,r(void 0,void 0,void 0,(function*(){const e=H,t=E();let r=`https://my.pcloud.com/oauth2/authorize?response_type=code&client_id=${e}&state=${t}`;return n&&(r+=`&redirect_uri=obsidian://${j}`),{authUrl:r,state:t}})));var n;const o=e.createDiv();o.createDiv({text:Qp(t("modal_pcloudauth_tutorial"))}),o.createEl("button",{text:t("modal_pcloudauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_pcloudauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i})}))}onClose(){const{contentEl:e}=this;e.empty()}}class bH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_pcloudrevokeauth_step1")});const i="https://my.pcloud.com/#page=settings&settings=tab-apps";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_pcloudrevokeauth_step2")}),new k.Setting(t).setName(e("modal_pcloudrevokeauth_clean")).setDesc(e("modal_pcloudrevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_pcloudrevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.pcloud=m()(p_),yield this.plugin.saveSettings(),this.authDiv.toggleClass("pcloud-auth-button-hide",""!==this.plugin.settings.pcloud.accessToken),this.revokeAuthDiv.toggleClass("pcloud-revoke-auth-button-hide",""===this.plugin.settings.pcloud.accessToken),new k.Notice(e("modal_pcloudrevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_pcloudrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class wH extends k.Modal{constructor(e,t,r,i,n,o,s){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.proFeaturesListSetting=o,this.t=s}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,{authUrl:t,codeVerifier:i,codeChallenge:n}=yield ae(!1);this.plugin.oauth2Info.verifier=i;const o=this.t;e.createDiv().createEl("button",{text:o("modal_proauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(t),new k.Notice(o("modal_proauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:t,text:t});let s="";new k.Setting(e).setName(o("modal_proauth_maualinput")).setDesc(o("modal_proauth_maualinput_desc")).addText((e=>e.setPlaceholder("").setValue("").onChange((e=>{s=e.trim()})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(o("submit")),e.onClick((()=>r(this,void 0,void 0,(function*(){var e,t,n,a,l,d,c;new k.Notice(o("modal_proauth_maualinput_notice"));try{const u=yield le(null!=i?i:"verifier",s,(e=>r(this,void 0,void 0,(function*(){throw new k.Notice(o("protocol_pro_connect_fail")),new k.Notice(`${e}`),e}))));console.debug(u);const p=this;de(this.plugin.settings.pro,u,(()=>p.plugin.saveSettings())),yield ue(this.plugin.settings.pro,this.plugin.manifest.version,(()=>p.plugin.saveSettings())),this.proFeaturesListSetting.setDesc(Qp(o("settings_pro_features_desc",{features:xH(this.plugin.settings.pro.enabledProFeatures)}))),yield pe(this.plugin.settings.pro,this.plugin.manifest.version,(()=>p.plugin.saveSettings())),new k.Notice(o("protocol_pro_connect_manualinput_succ",{email:null!==(e=this.plugin.settings.pro.email)&&void 0!==e?e:"(no email)"})),this.plugin.oauth2Info.verifier="",null===(t=this.plugin.oauth2Info.authDiv)||void 0===t||t.toggleClass("pro-auth-button-hide",""!==(null===(n=this.plugin.settings.pro)||void 0===n?void 0:n.refreshToken)),this.plugin.oauth2Info.authDiv=void 0,null===(a=this.plugin.oauth2Info.revokeAuthSetting)||void 0===a||a.setDesc(o("protocol_pro_connect_succ_revoke",{email:null===(l=this.plugin.settings.pro)||void 0===l?void 0:l.email})),this.plugin.oauth2Info.revokeAuthSetting=void 0,null===(d=this.plugin.oauth2Info.revokeDiv)||void 0===d||d.toggleClass("pro-revoke-auth-button-hide",""===(null===(c=this.plugin.settings.pro)||void 0===c?void 0:c.email)),this.plugin.oauth2Info.revokeDiv=void 0,yield navigator.clipboard.writeText(""),this.close()}catch(e){console.error(e),new k.Notice(o("modal_proauth_maualinput_conn_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class _H extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t;e.createEl("p",{text:t("modal_prorevokeauth")}),new k.Setting(e).setName(t("modal_prorevokeauth_clean")).setDesc(t("modal_prorevokeauth_clean_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(t("modal_prorevokeauth_clean_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){var e,r;try{this.plugin.settings.pro=m()(se),yield this.plugin.saveSettings(),this.authDiv.toggleClass("pro-auth-button-hide",""!==(null===(e=this.plugin.settings.pro)||void 0===e?void 0:e.refreshToken)),this.revokeAuthDiv.toggleClass("pro-revoke-auth-button-hide",""===(null===(r=this.plugin.settings.pro)||void 0===r?void 0:r.refreshToken)),new k.Notice(t("modal_prorevokeauth_clean_notice")),this.close()}catch(e){console.error(e),new k.Notice(t("modal_prorevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}const xH=e=>void 0===e||0===e.length?"No features enabled.":e.map((e=>`${e.featureName} (expire: ${new Date(Number(e.expireAtTimeMs)).toISOString()})`)).join("<br/>");class SH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,i=(e=>{let t="https://oauth.yandex.com/verification_code";return e&&(t=`obsidian://${G}`),`https://oauth.yandex.com/authorize?${new URLSearchParams({response_type:"code",client_id:W,redirect_uri:t,force_confirm:"yes",state:E()})}`})(!0),n=e.createDiv();n.createDiv({text:Qp(t("modal_yandexdiskauth_tutorial"))}),n.createEl("button",{text:t("modal_yandexdiskauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_yandexdiskauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i})}))}onClose(){const{contentEl:e}=this;e.empty()}}class kH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_yandexdiskrevokeauth_step1")});const i="https://app.yandexDisk.com/account/security";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_yandexdiskrevokeauth_step2")}),new k.Setting(t).setName(e("modal_yandexdiskrevokeauth_clean")).setDesc(e("modal_yandexdiskrevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_yandexdiskrevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.yandexdisk=m()(y_),yield this.plugin.saveSettings(),this.authDiv.toggleClass("yandexdisk-auth-button-hide",""!==this.plugin.settings.yandexdisk.refreshToken),this.revokeAuthDiv.toggleClass("yandexdisk-revoke-auth-button-hide",""===this.plugin.settings.yandexdisk.refreshToken),new k.Notice(e("modal_yandexdiskrevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_yandexdiskrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class EH extends k.Modal{constructor(e,t,r,i){super(e),this.plugin=t,this.newPassword=r,this.encryptionMethodSetting=i}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_password_title")}),t("modal_password_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:t})})),[t("modal_password_attn1"),t("modal_password_attn2"),t("modal_password_attn3"),t("modal_password_attn4"),t("modal_password_attn5")].forEach(((t,r)=>{r<3?e.createEl("p",{text:t,cls:"password-disclaimer"}):e.createEl("p",{text:t})})),new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_password_secondconfirm")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.password=this.newPassword,""!==this.newPassword?this.encryptionMethodSetting.settingEl.removeClass("settings-encryption-method-hide"):this.encryptionMethodSetting.settingEl.addClass("settings-encryption-method-hide"),yield this.plugin.saveSettings(),new k.Notice(t("modal_password_notice")),this.close()})))),e.setClass("password-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class TH extends k.Modal{constructor(e,t){super(e),this.plugin=t}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_encryptionmethod_title")}),t("modal_encryptionmethod_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:Qp(t)})})),new k.Setting(e).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.close()})))),e.setClass("encryptionmethod-second-confirm")}))}onClose(){const{contentEl:e}=this;e.empty()}}class BH extends k.Modal{constructor(e,t,r,i){super(e),this.plugin=t,this.newRemoteBaseDir=r,this.service=i}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_remotebasedir_title")}),t("modal_remotebasedir_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:t})})),""===this.newRemoteBaseDir||this.newRemoteBaseDir===this.app.vault.getName()?new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remotebasedir_secondconfirm_vaultname")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings[this.service].remoteBaseDir="",yield this.plugin.saveSettings(),new k.Notice(t("modal_remotebasedir_notice")),this.close()})))),e.setClass("remotebasedir-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))})):(e=>/[?/\\]/.test(e))(this.newRemoteBaseDir)?(e.createEl("p",{text:t("modal_remotebasedir_invaliddirhint")}),new k.Setting(e).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))):new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remotebasedir_secondconfirm_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings[this.service].remoteBaseDir=this.newRemoteBaseDir,yield this.plugin.saveSettings(),new k.Notice(t("modal_remotebasedir_notice")),this.close()})))),e.setClass("remotebasedir-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class CH extends k.Modal{constructor(e,t,r){super(e),this.plugin=t,this.newRemotePrefix=r}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_remoteprefix_s3_title")}),t("modal_remoteprefix_s3_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:t})})),e.createEl("p",{text:t("modal_remoteprefix_s3_tosave",{prefix:this.newRemotePrefix})}),""===this.newRemotePrefix||this.newRemotePrefix===this.app.vault.getName()?new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remoteprefix_s3_secondconfirm_empty")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.remotePrefix="",yield this.plugin.saveSettings(),new k.Notice(t("modal_remoteprefix_s3_notice")),this.close()})))),e.setClass("remoteprefix-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))})):new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remoteprefix_s3_secondconfirm_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.remotePrefix=this.newRemotePrefix,yield this.plugin.saveSettings(),new k.Notice(t("modal_remoteprefix_s3_notice")),this.close()})))),e.setClass("remoteprefix-s3-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class IH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);let i=!1;const n=window.navigator.userAgent.toLocaleLowerCase()||"";k.Platform.isDesktopApp&&!k.Platform.isMacOS&&(/linux/.test(n)||/ubuntu/.test(n)||/debian/.test(n)||/fedora/.test(n)||/centos/.test(n))&&(i=!0);const{authUrl:o,verifier:s}=yield((e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=!1){const r=new hx.DropboxAuth({clientId:e}),i=t?void 0:`obsidian://${M}`;return{authUrl:(yield r.getAuthenticationUrl(i,void 0,"code","offline",void 0,"none",!0)).toString(),verifier:r.getCodeVerifier()}})))(this.plugin.settings.dropbox.clientID,i);i?t("modal_dropboxauth_manualsteps").split("\n").forEach((t=>{e.createEl("p",{text:t})})):(this.plugin.oauth2Info.verifier=s,t("modal_dropboxauth_autosteps").split("\n").forEach((t=>{e.createEl("p",{text:t})})));if(e.createDiv().createEl("button",{text:t("modal_dropboxauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(o),new k.Notice(t("modal_dropboxauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:o,text:o}),i){let i="";new k.Setting(e).setName(t("modal_dropboxauth_maualinput")).setDesc(t("modal_dropboxauth_maualinput_desc")).addText((e=>e.setPlaceholder("").setValue("").onChange((e=>{i=e.trim()})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(t("submit")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(t("modal_dropboxauth_maualinput_notice"));try{const e=yield wx(this.plugin.settings.dropbox.clientID,s,i,(e=>r(this,void 0,void 0,(function*(){throw new k.Notice(t("protocol_dropbox_connect_fail")),new k.Notice(`${e}`),e})))),n=this;_x(this.plugin.settings.dropbox,e,(()=>n.plugin.saveSettings()));const o=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),a=yield o.getUserDisplayName();this.plugin.settings.dropbox.username=a,yield this.plugin.saveSettings(),new k.Notice(t("modal_dropboxauth_maualinput_conn_succ",{username:a})),this.authDiv.toggleClass("dropbox-auth-button-hide",""!==this.plugin.settings.dropbox.username),this.revokeAuthDiv.toggleClass("dropbox-revoke-auth-button-hide",""===this.plugin.settings.dropbox.username),this.revokeAuthSetting.setDesc(t("modal_dropboxauth_maualinput_conn_succ_revoke",{username:this.plugin.settings.dropbox.username})),this.close()}catch(e){console.error(e),new k.Notice(t("modal_dropboxauth_maualinput_conn_fail"))}}))))}))))}}))}onClose(){const{contentEl:e}=this;e.empty()}}class AH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,{authUrl:t,verifier:i}=yield function(e,t){return r(this,void 0,void 0,(function*(){const r=new Aw,{verifier:i,challenge:n}=yield r.generatePkceCodes(),o={challengeMethod:"S256",verifier:i,challenge:n},s={redirectUri:Nx,scopes:zx,codeChallenge:o.challenge,codeChallengeMethod:o.challengeMethod},a=new Vw({auth:{clientId:e,authority:t}});return{authUrl:yield a.getAuthCodeUrl(s),verifier:i}}))}(this.plugin.settings.onedrive.clientID,this.plugin.settings.onedrive.authority);this.plugin.oauth2Info.verifier=i;const n=(e,t)=>this.plugin.i18n.t(e,t);n("modal_onedriveauth_shortdesc").split("\n").forEach((t=>{e.createEl("p",{text:t})})),k.Platform.isLinux&&n("modal_onedriveauth_shortdesc_linux").split("\n").forEach((t=>{e.createEl("p",{text:Qp(t)})}));e.createDiv().createEl("button",{text:n("modal_onedriveauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(t),new k.Notice(n("modal_onedriveauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:t,text:t})}))}onClose(){const{contentEl:e}=this;e.empty()}}class FH extends k.Modal{constructor(e,t,r,i){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("p",{text:t("modal_onedriverevokeauth_step1")});const i="https://microsoft.com/consent";e.createEl("p").createEl("a",{href:i,text:i}),e.createEl("p",{text:t("modal_onedriverevokeauth_step2")}),new k.Setting(e).setName(t("modal_onedriverevokeauth_clean")).setDesc(t("modal_onedriverevokeauth_clean_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(t("modal_onedriverevokeauth_clean_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.onedrive=JSON.parse(JSON.stringify(qx)),yield this.plugin.saveSettings(),this.authDiv.toggleClass("onedrive-auth-button-hide",""!==this.plugin.settings.onedrive.username),this.revokeAuthDiv.toggleClass("onedrive-revoke-auth-button-hide",""===this.plugin.settings.onedrive.username),new k.Notice(t("modal_onedriverevokeauth_clean_notice")),this.close()}catch(e){console.error(e),new k.Notice(t("modal_onedriverevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class MH extends k.Modal{constructor(e,t,r){super(e),this.plugin=t,this.saveDropdownFunc=r}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);t("modal_syncconfig_attn").split("\n").forEach((t=>{e.createEl("p",{text:t})})),new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_syncconfig_secondconfirm")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.syncConfigDir=!0,yield this.plugin.saveSettings(),this.saveDropdownFunc(),new k.Notice(t("modal_syncconfig_notice")),this.close()}))))})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class DH extends k.Modal{constructor(e,t,r){super(e),this.plugin=t,this.exportType=r}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t),{rawUri:i,imgUri:n}=yield(o=this.plugin.settings,s=this.app.vault.getName(),a=this.plugin.manifest.version,l=this.exportType,r(void 0,void 0,void 0,(function*(){let e={};"basic_and_advanced"===l?(e=m()(o),delete e.s3,delete e.dropbox,delete e.onedrive,delete e.onedrivefull,delete e.webdav,delete e.webdis,delete e.googledrive,delete e.box,delete e.pcloud,delete e.yandexdisk,delete e.koofr,delete e.azureblobstorage,delete e.pro):"s3"===l?e={s3:m()(o.s3)}:"dropbox"===l?e={dropbox:m()(o.dropbox)}:"onedrive"===l?e={onedrive:$x(o.onedrive)}:"onedrivefull"===l?e={onedrivefull:l_(o.onedrivefull)}:"webdav"===l?e={webdav:m()(o.webdav)}:"webdis"===l?e={webdis:m()(o.webdis)}:"googledrive"===l?e={googledrive:m()(o.googledrive)}:"box"===l?e={box:m()(o.box)}:"pcloud"===l?e={pcloud:m()(o.pcloud)}:"yandexdisk"===l?e={yandexdisk:m()(o.yandexdisk)}:"koofr"===l?e={koofr:m()(o.koofr)}:"azureblobstorage"===l&&(e={azureblobstorage:m()(o.azureblobstorage)}),delete e.vaultRandomID;const t=encodeURIComponent(JSON.stringify(e)),r=encodeURIComponent(s),i=encodeURIComponent(a),n=`obsidian://${A}?func=settings&version=${i}&vault=${r}&data=${t}`;return{rawUri:n,imgUri:yield tH.toDataURL(n)}})));var o,s,a,l;const d=e.createDiv();t("modal_qr_shortdesc").split("\n").forEach((e=>{d.createEl("p",{text:e})}));e.createDiv().createEl("button",{text:t("modal_qr_button")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_qr_button_notice"))}))}));e.createDiv().createEl("img",{cls:"qrcode-img"},(e=>r(this,void 0,void 0,(function*(){e.src=n}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}const RH=e=>{const{eye:t,eyeOff:r}=(()=>{const e=b(oH),t=b(sH);return{eye:e.outerHTML,eyeOff:t.outerHTML}})(),i=e.inputEl.insertAdjacentElement("afterend",createSpan());return i.innerHTML=r,i.addEventListener("click",(n=>{const o="text"===e.inputEl.getAttribute("type");i.innerHTML=o?r:t,e.inputEl.setAttribute("type",o?"password":"text"),e.inputEl.focus()})),e.inputEl.setAttribute("type","password"),e};class PH extends k.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t}display(){var e,t;const{containerEl:i}=this;i.style.setProperty("overflow-wrap","break-word"),i.empty();const n=(e,t)=>this.plugin.i18n.t(e,t);i.createEl("h1",{text:"Remotely Save"});const o=i.createDiv();o.createEl("h2",{text:n("settings_chooseservice")});const s=i.createEl("div",{cls:"s3-hide"});s.toggleClass("s3-hide","s3"!==this.plugin.settings.serviceType),s.createEl("h2",{text:n("settings_s3")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[n("settings_s3_disclaimer1"),n("settings_s3_disclaimer2")])a.createEl("p",{text:e,cls:"s3-disclaimer"});t_||a.createEl("p",{text:n("settings_s3_cors")}),a.createEl("p",{text:n("settings_s3_prod")});const l=a.createEl("ul");l.createEl("li").createEl("a",{href:"https://docs.aws.amazon.com/general/latest/gr/s3.html",text:n("settings_s3_prod1")}),l.createEl("li").createEl("a",{href:"https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-your-credentials.html",text:n("settings_s3_prod2")}),t_||l.createEl("li").createEl("a",{href:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html",text:n("settings_s3_prod3")}),new k.Setting(s).setName(n("settings_s3_endpoint")).setDesc(n("settings_s3_endpoint")).addText((e=>e.setPlaceholder("").setValue(this.plugin.settings.s3.s3Endpoint).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.s3Endpoint=e.trim(),yield this.plugin.saveSettings()})))))),new k.Setting(s).setName(n("settings_s3_region")).setDesc(n("settings_s3_region_desc")).addText((e=>e.setPlaceholder("").setValue(`${this.plugin.settings.s3.s3Region}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.s3Region=e.trim(),yield this.plugin.saveSettings()})))))),new k.Setting(s).setName(n("settings_s3_accesskeyid")).setDesc(n("settings_s3_accesskeyid_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(`${this.plugin.settings.s3.s3AccessKeyID}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.s3AccessKeyID=e.trim(),yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_s3_secretaccesskey")).setDesc(n("settings_s3_secretaccesskey_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(`${this.plugin.settings.s3.s3SecretAccessKey}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.s3SecretAccessKey=e.trim(),yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_s3_bucketname")).setDesc(n("settings_s3_bucketname")).addText((e=>e.setPlaceholder("").setValue(`${this.plugin.settings.s3.s3BucketName}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.s3BucketName=e.trim(),yield this.plugin.saveSettings()})))))),new k.Setting(s).setName(n("settings_s3_urlstyle")).setDesc(n("settings_s3_urlstyle_desc")).addDropdown((e=>{e.addOption("virtualHostedStyle","Virtual Hosted-Style (default)"),e.addOption("pathStyle","Path-Style"),e.setValue(this.plugin.settings.s3.forcePathStyle?"pathStyle":"virtualHostedStyle").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.forcePathStyle="pathStyle"===e,yield this.plugin.saveSettings()}))))})),t_&&!(0,k.requireApiVersion)(e_)&&new k.Setting(s).setName(n("settings_s3_bypasscorslocally")).setDesc(n("settings_s3_bypasscorslocally_desc")).addDropdown((e=>{e.addOption("disable",n("disable")).addOption("enable",n("enable")),e.setValue(""+(this.plugin.settings.s3.bypassCorsLocally?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.bypassCorsLocally="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_s3_parts")).setDesc(n("settings_s3_parts_desc")).addDropdown((e=>{e.addOption("1","1"),e.addOption("2","2"),e.addOption("3","3"),e.addOption("5","5"),e.addOption("10","10"),e.addOption("15","15"),e.addOption("20","20 (default)"),e.setValue(`${this.plugin.settings.s3.partsConcurrency}`).onChange((e=>r(this,void 0,void 0,(function*(){const t=Number.parseInt(e);this.plugin.settings.s3.partsConcurrency=t,yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_s3_accuratemtime")).setDesc(n("settings_s3_accuratemtime_desc")).addDropdown((e=>{e.addOption("disable",n("disable")).addOption("enable",n("enable")),e.setValue(""+(this.plugin.settings.s3.useAccurateMTime?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.useAccurateMTime="enable"===e,yield this.plugin.saveSettings()}))))}));let d=this.plugin.settings.s3.remotePrefix||"";new k.Setting(s).setName(n("settings_remoteprefix_s3")).setDesc(n("settings_remoteprefix_s3_desc")).addText((e=>e.setPlaceholder("").setValue(d).onChange((e=>{d=XN(e.trim())})))).addButton((e=>{e.setButtonText(n("confirm")),e.onClick((()=>{new CH(this.app,this.plugin,XN(d.trim())).open()}))})),new k.Setting(s).setName(n("settings_s3_reverse_proxy_no_sign_url")).setDesc(n("settings_s3_reverse_proxy_no_sign_url_desc")).addText((e=>{var t;return e.setPlaceholder("").setValue(null!==(t=this.plugin.settings.s3.reverseProxyNoSignUrl)&&void 0!==t?t:"").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.reverseProxyNoSignUrl=e.trim(),yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_s3_generatefolderobject")).setDesc(n("settings_s3_generatefolderobject_desc")).addDropdown((e=>{e.addOption("notgenerate",n("settings_s3_generatefolderobject_notgenerate")).addOption("generate",n("settings_s3_generatefolderobject_generate")),e.setValue(""+(this.plugin.settings.s3.generateFolderObject?"generate":"notgenerate")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.s3.generateFolderObject="generate"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(s).setName(n("settings_checkonnectivity")).setDesc(n("settings_checkonnectivity_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_checkonnectivity_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(n("settings_checkonnectivity_checking"));const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),t={msg:""};(yield e.checkConnect((e=>{t.msg=e})))?new k.Notice(n("settings_s3_connect_succ")):(new k.Notice(n("settings_s3_connect_fail")),new k.Notice(t.msg))}))))}))));const c=i.createEl("div",{cls:"dropbox-hide"});c.toggleClass("dropbox-hide","dropbox"!==this.plugin.settings.serviceType),c.createEl("h2",{text:n("settings_dropbox")});const u=c.createEl("div",{cls:"settings-long-desc"});for(const e of[n("settings_dropbox_disclaimer1"),n("settings_dropbox_disclaimer2")])u.createEl("p",{text:e,cls:"dropbox-disclaimer"});u.createEl("p",{text:n("settings_dropbox_folder",{pluginID:this.plugin.manifest.id,remoteBaseDir:this.plugin.settings.dropbox.remoteBaseDir||this.app.vault.getName()})});const p=c.createDiv(),h=p.createDiv({cls:"dropbox-auth-button-hide settings-auth-related"}),f=p.createDiv({cls:"dropbox-revoke-auth-button-hide settings-auth-related"}),g=new k.Setting(f).setName(n("settings_dropbox_revoke")).setDesc(n("settings_dropbox_revoke_desc",{username:this.plugin.settings.dropbox.username})).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_dropbox_revoke_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){try{const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings()));yield e.revokeAuth(),this.plugin.settings.dropbox=JSON.parse(JSON.stringify(gx)),yield this.plugin.saveSettings(),h.toggleClass("dropbox-auth-button-hide",""!==this.plugin.settings.dropbox.username),f.toggleClass("dropbox-revoke-auth-button-hide",""===this.plugin.settings.dropbox.username),new k.Notice(n("settings_dropbox_revoke_notice"))}catch(e){console.error(e),new k.Notice(n("settings_dropbox_revoke_noticeerr"))}}))))}))));new k.Setting(f).setName(n("settings_dropbox_clearlocal")).setDesc(n("settings_dropbox_clearlocal_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_dropbox_clearlocal_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.dropbox=JSON.parse(JSON.stringify(gx)),yield this.plugin.saveSettings(),h.toggleClass("dropbox-auth-button-hide",""!==this.plugin.settings.dropbox.username),f.toggleClass("dropbox-revoke-auth-button-hide",""===this.plugin.settings.dropbox.username),new k.Notice(n("settings_dropbox_clearlocal_notice"))}))))})))),new k.Setting(h).setName(n("settings_dropbox_auth")).setDesc(n("settings_dropbox_auth_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_dropbox_auth_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){const e=new IH(this.app,this.plugin,h,f,g);this.plugin.oauth2Info.helperModal=e,this.plugin.oauth2Info.authDiv=h,this.plugin.oauth2Info.revokeDiv=f,this.plugin.oauth2Info.revokeAuthSetting=g,e.open()}))))})))),h.toggleClass("dropbox-auth-button-hide",""!==this.plugin.settings.dropbox.username),f.toggleClass("dropbox-revoke-auth-button-hide",""===this.plugin.settings.dropbox.username);let y=this.plugin.settings.dropbox.remoteBaseDir||"";new k.Setting(c).setName(n("settings_remotebasedir")).setDesc(n("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(this.app.vault.getName()).setValue(y).onChange((e=>{y=e.trim()})))).addButton((e=>{e.setButtonText(n("confirm")),e.onClick((()=>{new BH(this.app,this.plugin,y,"dropbox").open()}))})),new k.Setting(c).setName(n("settings_checkonnectivity")).setDesc(n("settings_checkonnectivity_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_checkonnectivity_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(n("settings_checkonnectivity_checking"));const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),t={msg:""};(yield e.checkConnect((e=>{t.msg=`${e}`})))?new k.Notice(n("settings_dropbox_connect_succ")):(new k.Notice(n("settings_dropbox_connect_fail")),new k.Notice(t.msg))}))))}))));const v=i.createEl("div",{cls:"onedrive-hide"});v.toggleClass("onedrive-hide","onedrive"!==this.plugin.settings.serviceType),v.createEl("h2",{text:n("settings_onedrive")});const b=v.createEl("div",{cls:"settings-long-desc"});for(const e of[n("settings_onedrive_disclaimer1"),n("settings_onedrive_disclaimer2")])b.createEl("p",{text:e,cls:"onedrive-disclaimer"});b.createEl("p",{text:n("settings_onedrive_folder",{pluginID:this.plugin.manifest.id,remoteBaseDir:this.plugin.settings.onedrive.remoteBaseDir||this.app.vault.getName()})}),b.createEl("p",{text:n("settings_onedrive_nobiz")});const w=v.createDiv(),_=w.createDiv({cls:"onedrive-auth-button-hide settings-auth-related"}),x=w.createDiv({cls:"onedrive-revoke-auth-button-hide settings-auth-related"}),S=new k.Setting(x).setName(n("settings_onedrive_revoke")).setDesc(n("settings_onedrive_revoke_desc",{username:this.plugin.settings.onedrive.username})).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_onedrive_revoke_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new FH(this.app,this.plugin,_,x).open()}))))}))));new k.Setting(_).setName(n("settings_onedrive_auth")).setDesc(n("settings_onedrive_auth_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_onedrive_auth_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){const e=new AH(this.app,this.plugin,_,x,S);this.plugin.oauth2Info.helperModal=e,this.plugin.oauth2Info.authDiv=_,this.plugin.oauth2Info.revokeDiv=x,this.plugin.oauth2Info.revokeAuthSetting=S,e.open()}))))})))),_.toggleClass("onedrive-auth-button-hide",""!==this.plugin.settings.onedrive.username),x.toggleClass("onedrive-revoke-auth-button-hide",""===this.plugin.settings.onedrive.username);let E=this.plugin.settings.onedrive.remoteBaseDir||"";new k.Setting(v).setName(n("settings_remotebasedir")).setDesc(n("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(this.app.vault.getName()).setValue(E).onChange((e=>{E=e.trim()})))).addButton((e=>{e.setButtonText(n("confirm")),e.onClick((()=>{new BH(this.app,this.plugin,E,"onedrive").open()}))})),new k.Setting(v).setName(n("settings_onedrive_emptyfile")).setDesc(n("settings_onedrive_emptyfile_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){e.addOption("skip",n("settings_onedrive_emptyfile_skip")).addOption("error",n("settings_onedrive_emptyfile_error")).setValue(this.plugin.settings.onedrive.emptyFile).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.onedrive.emptyFile=e,yield this.plugin.saveSettings()}))))})))),new k.Setting(v).setName(n("settings_checkonnectivity")).setDesc(n("settings_checkonnectivity_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_checkonnectivity_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(n("settings_checkonnectivity_checking"));const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),t={msg:""};(yield e.checkConnect((e=>{t.msg=`${e}`})))?new k.Notice(n("settings_onedrive_connect_succ")):(new k.Notice(n("settings_onedrive_connect_fail")),new k.Notice(t.msg))}))))}))));const T=i.createEl("div",{cls:"webdav-hide"});T.toggleClass("webdav-hide","webdav"!==this.plugin.settings.serviceType),T.createEl("h2",{text:n("settings_webdav")});const B=T.createEl("div",{cls:"settings-long-desc"});B.createEl("p",{text:n("settings_webdav_disclaimer1"),cls:"webdav-disclaimer"}),t_||(B.createEl("p",{text:n("settings_webdav_cors_os")}),B.createEl("p",{text:n("settings_webdav_cors")})),B.createEl("p",{text:n("settings_webdav_folder",{remoteBaseDir:this.plugin.settings.webdav.remoteBaseDir||this.app.vault.getName()})}),new k.Setting(T).setName(n("settings_webdav_addr")).setDesc(n("settings_webdav_addr_desc")).addText((e=>e.setPlaceholder("").setValue(this.plugin.settings.webdav.address).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdav.address=e.trim(),"auto"!==this.plugin.settings.webdav.depth&&"auto_1"!==this.plugin.settings.webdav.depth&&"auto_infinity"!==this.plugin.settings.webdav.depth&&"auto_unknown"!==this.plugin.settings.webdav.depth||(this.plugin.settings.webdav.depth="manual_1"),yield this.plugin.saveSettings()})))))),new k.Setting(T).setName(n("settings_webdav_user")).setDesc(n("settings_webdav_user_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(this.plugin.settings.webdav.username).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdav.username=e.trim(),"auto"!==this.plugin.settings.webdav.depth&&"auto_1"!==this.plugin.settings.webdav.depth&&"auto_infinity"!==this.plugin.settings.webdav.depth&&"auto_unknown"!==this.plugin.settings.webdav.depth||(this.plugin.settings.webdav.depth="manual_1"),yield this.plugin.saveSettings()}))))})),new k.Setting(T).setName(n("settings_webdav_password")).setDesc(n("settings_webdav_password_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(this.plugin.settings.webdav.password).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdav.password=e.trim(),"auto"!==this.plugin.settings.webdav.depth&&"auto_1"!==this.plugin.settings.webdav.depth&&"auto_infinity"!==this.plugin.settings.webdav.depth&&"auto_unknown"!==this.plugin.settings.webdav.depth||(this.plugin.settings.webdav.depth="manual_1"),yield this.plugin.saveSettings()}))))})),new k.Setting(T).setName(n("settings_webdav_auth")).setDesc(n("settings_webdav_auth_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){e.addOption("basic","basic"),t_&&e.addOption("digest","digest"),t_||"basic"===this.plugin.settings.webdav.authType||(this.plugin.settings.webdav.authType="basic",yield this.plugin.saveSettings()),e.setValue(this.plugin.settings.webdav.authType).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdav.authType=e,yield this.plugin.saveSettings()}))))})))),new k.Setting(T).setName(n("settings_webdav_depth")).setDesc(n("settings_webdav_depth_desc")).addDropdown((e=>{e.addOption("manual_1",n("settings_webdav_depth_1")),e.addOption("manual_infinity",n("settings_webdav_depth_inf")),e.setValue(this.plugin.settings.webdav.depth||"manual_1").onChange((e=>r(this,void 0,void 0,(function*(){"manual_1"===e?(this.plugin.settings.webdav.depth="manual_1",this.plugin.settings.webdav.manualRecursive=!0):"manual_infinity"===e&&(this.plugin.settings.webdav.depth="manual_infinity",this.plugin.settings.webdav.manualRecursive=!1),yield this.plugin.saveSettings()}))))})),new k.Setting(T).setName(n("settings_webdav_customheaders")).setDesc(Qp(n("settings_webdav_customheaders_desc"))).addTextArea((e=>{var t;e.setPlaceholder("X-Header1: Value1\nX-Header2: Value2").setValue(`${null!==(t=this.plugin.settings.webdav.customHeaders)&&void 0!==t?t:""}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdav.customHeaders=e.trim().split("\n").filter((e=>""!==e.trim())).join("\n"),yield this.plugin.saveSettings()})))),e.inputEl.rows=10,e.inputEl.cols=30,e.inputEl.addClass("webdav-customheaders-textarea")}));let C=this.plugin.settings.webdav.remoteBaseDir||"";new k.Setting(T).setName(n("settings_remotebasedir")).setDesc(n("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(this.app.vault.getName()).setValue(C).onChange((e=>{C=e.trim()})))).addButton((e=>{e.setButtonText(n("confirm")),e.onClick((()=>{new BH(this.app,this.plugin,C,"webdav").open()}))})),new k.Setting(T).setName(n("settings_checkonnectivity")).setDesc(n("settings_checkonnectivity_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_checkonnectivity_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(n("settings_checkonnectivity_checking"));const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),t={msg:""};(yield e.checkConnect((e=>{t.msg=`${e}`})))?new k.Notice(n("settings_webdav_connect_succ")):(t_?new k.Notice(n("settings_webdav_connect_fail")):new k.Notice(n("settings_webdav_connect_fail_withcors")),new k.Notice(t.msg))}))))}))));const I=i.createEl("div",{cls:"webdis-hide"});I.toggleClass("webdis-hide","webdis"!==this.plugin.settings.serviceType),I.createEl("h2",{text:n("settings_webdis")});const A=I.createEl("div",{cls:"settings-long-desc"});for(const e of[n("settings_webdis_disclaimer1"),n("settings_webdis_disclaimer2")])A.createEl("p",{text:e,cls:"webdis-disclaimer"});A.createEl("p",{text:n("settings_webdis_folder",{remoteBaseDir:this.plugin.settings.webdis.remoteBaseDir||this.app.vault.getName()})}),new k.Setting(I).setName(n("settings_webdis_addr")).setDesc(n("settings_webdis_addr_desc")).addText((e=>e.setPlaceholder("https://").setValue(this.plugin.settings.webdis.address).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdis.address=e.trim(),yield this.plugin.saveSettings()})))))),new k.Setting(I).setName(n("settings_webdis_user")).setDesc(n("settings_webdis_user_desc")).addText((e=>{var t;RH(e),e.setPlaceholder("").setValue(null!==(t=this.plugin.settings.webdis.username)&&void 0!==t?t:"").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdis.username=(null!=e?e:"").trim(),yield this.plugin.saveSettings()}))))})),new k.Setting(I).setName(n("settings_webdis_password")).setDesc(n("settings_webdis_password_desc")).addText((e=>{var t;RH(e),e.setPlaceholder("").setValue(null!==(t=this.plugin.settings.webdis.password)&&void 0!==t?t:"").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.webdis.password=(null!=e?e:"").trim(),yield this.plugin.saveSettings()}))))}));let F=this.plugin.settings.webdis.remoteBaseDir||"";new k.Setting(I).setName(n("settings_remotebasedir")).setDesc(n("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(this.app.vault.getName()).setValue(F).onChange((e=>{F=e.trim()})))).addButton((e=>{e.setButtonText(n("confirm")),e.onClick((()=>{new BH(this.app,this.plugin,F,"webdis").open()}))})),new k.Setting(I).setName(n("settings_checkonnectivity")).setDesc(n("settings_checkonnectivity_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_checkonnectivity_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(n("settings_checkonnectivity_checking"));const e=Ej(this.plugin.settings,this.app.vault.getName(),(()=>this.plugin.saveSettings())),t={msg:""};(yield e.checkConnect((e=>{t.msg=`${e}`})))?new k.Notice(n("settings_webdis_connect_succ")):(new k.Notice(n("settings_webdis_connect_fail")),new k.Notice(t.msg))}))))}))));const{onedriveFullDiv:M,onedriveFullAllowedToUsedDiv:D,onedriveFullNotShowUpHintSetting:R}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"onedrivefull-hide"});s.toggleClass("onedrivefull-hide","onedrivefull"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_onedrivefull")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_onedrivefull_disclaimer1"),t("settings_onedrivefull_disclaimer2")])a.createEl("p",{text:e,cls:"onedrivefull-disclaimer"});a.createEl("p",{text:t("settings_onedrivefull_folder",{remoteBaseDir:n.settings.onedrivefull.remoteBaseDir||i.vault.getName()})}),a.createEl("p",{text:t("settings_onedrivefull_nobiz")}),a.createDiv({text:Qp(t("settings_onedrivefull_pro_desc")),cls:"onedrivefull-disclaimer"});const l=new k.Setting(s).setName(t("settings_onedrivefull_notshowuphint")).setDesc(t("settings_onedrivefull_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_onedrivefull_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-onedrive_full"===e.featureName)).length);console.debug(`allow to show up onedriveFull settings? ${c}`),c?(d.removeClass("onedrivefull-allow-to-use-hide"),l.settingEl.addClass("onedrivefull-allow-to-use-hide")):(d.addClass("onedrivefull-allow-to-use-hide"),l.settingEl.removeClass("onedrivefull-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"onedrivefull-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"onedrivefull-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_onedrivefull_revoke")).setDesc(t("settings_onedrivefull_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_onedrivefull_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new yH(i,n,p,h).open()}))))}))));new k.Setting(p).setName(t("settings_onedrivefull_auth")).setDesc(t("settings_onedrivefull_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_onedrivefull_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new gH(i,n,p,h,f);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("onedrivefull-auth-button-hide",""!==n.settings.onedrivefull.refreshToken),h.toggleClass("onedrivefull-revoke-auth-button-hide",""===n.settings.onedrivefull.refreshToken);let m=n.settings.onedrivefull.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"onedrivefull").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_onedrivefull_connect_succ")):(new k.Notice(t("settings_onedrivefull_connect_fail")),new k.Notice(r.msg))}))))})))),{onedriveFullDiv:s,onedriveFullAllowedToUsedDiv:d,onedriveFullNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{googleDriveDiv:P,googleDriveAllowedToUsedDiv:O,googleDriveNotShowUpHintSetting:z}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"googledrive-hide"});s.toggleClass("googledrive-hide","googledrive"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_googledrive")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_googledrive_disclaimer1"),t("settings_googledrive_disclaimer2")])a.createEl("p",{text:e,cls:"googledrive-disclaimer"});a.createEl("p",{text:t("settings_googledrive_folder",{remoteBaseDir:n.settings.googledrive.remoteBaseDir||i.vault.getName()})}),a.createDiv({text:Qp(t("settings_googledrive_pro_desc")),cls:"googledrive-disclaimer"});const l=new k.Setting(s).setName(t("settings_googledrive_notshowuphint")).setDesc(t("settings_googledrive_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_googledrive_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-google_drive"===e.featureName)).length);console.debug(`allow to show up google drive settings? ${c}`),c?(d.removeClass("googledrive-allow-to-use-hide"),l.settingEl.addClass("googledrive-allow-to-use-hide")):(d.addClass("googledrive-allow-to-use-hide"),l.settingEl.removeClass("googledrive-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"googledrive-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"googledrive-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_googledrive_revoke")).setDesc(t("settings_googledrive_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_googledrive_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new hH(i,n,p,h,t).open()}))))}))));new k.Setting(p).setName(t("settings_googledrive_auth")).setDesc(t("settings_googledrive_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_googledrive_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new pH(i,n,p,h,f,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("googledrive-auth-button-hide",""!==n.settings.googledrive.refreshToken),h.toggleClass("googledrive-revoke-auth-button-hide",""===n.settings.googledrive.refreshToken);let m=n.settings.googledrive.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"googledrive").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_googledrive_connect_succ")):(new k.Notice(t("settings_googledrive_connect_fail")),new k.Notice(r.msg))}))))})))),{googleDriveDiv:s,googleDriveAllowedToUsedDiv:d,googleDriveNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{boxDiv:N,boxAllowedToUsedDiv:q,boxNotShowUpHintSetting:U}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"box-hide"});s.toggleClass("box-hide","box"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_box")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_box_disclaimer1"),t("settings_box_disclaimer2")])a.createEl("p",{text:e,cls:"box-disclaimer"});a.createEl("p",{text:t("settings_box_folder",{remoteBaseDir:n.settings.box.remoteBaseDir||i.vault.getName()})}),a.createDiv({text:Qp(t("settings_box_pro_desc")),cls:"box-disclaimer"});const l=new k.Setting(s).setName(t("settings_box_notshowuphint")).setDesc(t("settings_box_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_box_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-box"===e.featureName)).length);console.debug(`allow to show up box settings? ${c}`),c?(d.removeClass("box-allow-to-use-hide"),l.settingEl.addClass("box-allow-to-use-hide")):(d.addClass("box-allow-to-use-hide"),l.settingEl.removeClass("box-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"box-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"box-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_box_revoke")).setDesc(t("settings_box_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_box_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new dH(i,n,p,h,t).open()}))))}))));new k.Setting(p).setName(t("settings_box_auth")).setDesc(t("settings_box_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_box_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new lH(i,n,p,h,f,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("box-auth-button-hide",""!==n.settings.box.refreshToken),h.toggleClass("box-revoke-auth-button-hide",""===n.settings.box.refreshToken);let m=n.settings.box.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"box").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_box_connect_succ")):(new k.Notice(t("settings_box_connect_fail")),new k.Notice(r.msg))}))))})))),{boxDiv:s,boxAllowedToUsedDiv:d,boxNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{pCloudDiv:L,pCloudAllowedToUsedDiv:j,pCloudNotShowUpHintSetting:H}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"pcloud-hide"});s.toggleClass("pcloud-hide","pcloud"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_pcloud")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_pcloud_disclaimer1"),t("settings_pcloud_disclaimer2")])a.createEl("p",{text:e,cls:"pcloud-disclaimer"});a.createEl("p",{text:t("settings_pcloud_folder",{remoteBaseDir:n.settings.pcloud.remoteBaseDir||i.vault.getName()})}),a.createDiv({text:Qp(t("settings_pcloud_pro_desc")),cls:"pcloud-disclaimer"});const l=new k.Setting(s).setName(t("settings_pcloud_notshowuphint")).setDesc(t("settings_pcloud_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pcloud_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-pcloud"===e.featureName)).length);console.debug(`allow to show up pcloud settings? ${c}`),c?(d.removeClass("pcloud-allow-to-use-hide"),l.settingEl.addClass("pcloud-allow-to-use-hide")):(d.addClass("pcloud-allow-to-use-hide"),l.settingEl.removeClass("pcloud-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"pcloud-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"pcloud-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_pcloud_revoke")).setDesc(t("settings_pcloud_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pcloud_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new bH(i,n,p,h,t).open()}))))}))));new k.Setting(p).setName(t("settings_pcloud_auth")).setDesc(t("settings_pcloud_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pcloud_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new vH(i,n,p,h,f,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("pcloud-auth-button-hide",""!==n.settings.pcloud.accessToken),h.toggleClass("pcloud-revoke-auth-button-hide",""===n.settings.pcloud.accessToken);let m=n.settings.pcloud.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"pcloud").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_pcloud_connect_succ")):(new k.Notice(t("settings_pcloud_connect_fail")),new k.Notice(r.msg))}))))})))),{pCloudDiv:s,pCloudAllowedToUsedDiv:d,pCloudNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{yandexDiskDiv:$,yandexDiskAllowedToUsedDiv:G,yandexDiskNotShowUpHintSetting:W}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"yandexdisk-hide"});s.toggleClass("yandexdisk-hide","yandexdisk"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_yandexdisk")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_yandexdisk_disclaimer1"),t("settings_yandexdisk_disclaimer2")])a.createEl("p",{text:e,cls:"yandexdisk-disclaimer"});a.createEl("p",{text:t("settings_yandexdisk_folder",{remoteBaseDir:n.settings.yandexdisk.remoteBaseDir||i.vault.getName()})}),a.createDiv({text:Qp(t("settings_yandexdisk_pro_desc")),cls:"yandexdisk-disclaimer"});const l=new k.Setting(s).setName(t("settings_yandexdisk_notshowuphint")).setDesc(t("settings_yandexdisk_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_yandexdisk_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-yandex_disk"===e.featureName)).length);console.debug(`allow to show up yandexDisk settings? ${c}`),c?(d.removeClass("yandexdisk-allow-to-use-hide"),l.settingEl.addClass("yandexdisk-allow-to-use-hide")):(d.addClass("yandexdisk-allow-to-use-hide"),l.settingEl.removeClass("yandexdisk-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"yandexdisk-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"yandexdisk-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_yandexdisk_revoke")).setDesc(t("settings_yandexdisk_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_yandexdisk_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new kH(i,n,p,h,t).open()}))))}))));new k.Setting(p).setName(t("settings_yandexdisk_auth")).setDesc(t("settings_yandexdisk_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_yandexdisk_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new SH(i,n,p,h,f,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("yandexdisk-auth-button-hide",""!==n.settings.yandexdisk.refreshToken),h.toggleClass("yandexdisk-revoke-auth-button-hide",""===n.settings.yandexdisk.refreshToken);let m=n.settings.yandexdisk.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"yandexdisk").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_yandexdisk_connect_succ")):(new k.Notice(t("settings_yandexdisk_connect_fail")),new k.Notice(r.msg))}))))})))),{yandexDiskDiv:s,yandexDiskAllowedToUsedDiv:d,yandexDiskNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{koofrDiv:K,koofrAllowedToUsedDiv:V,koofrNotShowUpHintSetting:J}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"koofr-hide"});s.toggleClass("koofr-hide","koofr"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_koofr")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_koofr_disclaimer1"),t("settings_koofr_disclaimer2")])a.createEl("p",{text:e,cls:"koofr-disclaimer"});a.createEl("p",{text:t("settings_koofr_folder",{remoteBaseDir:n.settings.koofr.remoteBaseDir||i.vault.getName()})}),a.createDiv({text:Qp(t("settings_koofr_pro_desc")),cls:"koofr-disclaimer"});const l=new k.Setting(s).setName(t("settings_koofr_notshowuphint")).setDesc(t("settings_koofr_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_koofr_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-koofr"===e.featureName)).length);console.debug(`allow to show up koofr settings? ${c}`),c?(d.removeClass("koofr-allow-to-use-hide"),l.settingEl.addClass("koofr-allow-to-use-hide")):(d.addClass("koofr-allow-to-use-hide"),l.settingEl.removeClass("koofr-allow-to-use-hide"));const u=d.createDiv(),p=u.createDiv({cls:"koofr-auth-button-hide settings-auth-related"}),h=u.createDiv({cls:"koofr-revoke-auth-button-hide settings-auth-related"}),f=new k.Setting(h).setName(t("settings_koofr_revoke")).setDesc(t("settings_koofr_revoke_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_koofr_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new mH(i,n,p,h,t).open()}))))}))));new k.Setting(p).setName(t("settings_koofr_auth")).setDesc(t("settings_koofr_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_koofr_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new fH(i,n,p,h,f,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=p,n.oauth2Info.revokeDiv=h,n.oauth2Info.revokeAuthSetting=f,e.open()}))))})))),p.toggleClass("koofr-auth-button-hide",""!==n.settings.koofr.refreshToken),h.toggleClass("koofr-revoke-auth-button-hide",""===n.settings.koofr.refreshToken);let m=n.settings.koofr.remoteBaseDir||"";return new k.Setting(d).setName(t("settings_remotebasedir")).setDesc(t("settings_remotebasedir_desc")).addText((e=>e.setPlaceholder(i.vault.getName()).setValue(m).onChange((e=>{m=e.trim()})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new BH(i,n,m,"koofr").open()}))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_koofr_connect_succ")):(new k.Notice(t("settings_koofr_connect_fail")),new k.Notice(r.msg))}))))})))),{koofrDiv:s,koofrAllowedToUsedDiv:d,koofrNotShowUpHintSetting:l}})(i,n,this.app,this.plugin),{azureBlobStorageDiv:Y,azureBlobStorageAllowedToUsedDiv:Q,azureBlobStorageNotShowUpHintSetting:Z}=((e,t,i,n)=>{var o;const s=e.createEl("div",{cls:"azureblobstorage-hide"});s.toggleClass("azureblobstorage-hide","azureblobstorage"!==n.settings.serviceType),s.createEl("h2",{text:t("settings_azureblobstorage")});const a=s.createEl("div",{cls:"settings-long-desc"});for(const e of[t("settings_azureblobstorage_disclaimer1"),Qp(t("settings_azureblobstorage_disclaimer2"))])a.createEl("p",{text:e,cls:"azureblobstorage-disclaimer"});a.createEl("p",{text:t("settings_azureblobstorage_folder",{remotePrefix:n.settings.azureblobstorage.remotePrefix||`${i.vault.getName()}/`})}),a.createDiv({text:Qp(t("settings_azureblobstorage_pro_desc")),cls:"azureblobstorage-disclaimer"});const l=new k.Setting(s).setName(t("settings_azureblobstorage_notshowuphint")).setDesc(t("settings_azureblobstorage_notshowuphint_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_azureblobstorage_notshowuphint_view_pro")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.location.href="#settings-pro"}))))})))),d=s.createDiv(),c=1===(null===(o=n.settings.pro)||void 0===o?void 0:o.enabledProFeatures.filter((e=>"feature-azure_blob_storage"===e.featureName)).length);console.debug(`allow to show up azureBlobStorage settings? ${c}`),c?(d.removeClass("azureblobstorage-allow-to-use-hide"),l.settingEl.addClass("azureblobstorage-allow-to-use-hide")):(d.addClass("azureblobstorage-allow-to-use-hide"),l.settingEl.removeClass("azureblobstorage-allow-to-use-hide")),new k.Setting(d).setName(t("settings_azureblobstorage_containersasurl")).setDesc(Qp(t("settings_azureblobstorage_containersasurl_desc"))).addText((e=>{RH(e),e.setPlaceholder("").setValue(`${n.settings.azureblobstorage.containerSasUrl}`).onChange((e=>r(void 0,void 0,void 0,(function*(){n.settings.azureblobstorage.containerSasUrl=e.trim(),yield n.saveSettings()}))))})),new k.Setting(d).setName(t("settings_azureblobstorage_containername")).setDesc(t("settings_azureblobstorage_containername_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(`${n.settings.azureblobstorage.containerName}`).onChange((e=>r(void 0,void 0,void 0,(function*(){n.settings.azureblobstorage.containerName=e.trim(),yield n.saveSettings()}))))}));let u=n.settings.azureblobstorage.remotePrefix||"";return new k.Setting(d).setName(t("settings_azureblobstorage_remoteprefix")).setDesc(t("settings_azureblobstorage_remoteprefix_desc")).addText((e=>e.setPlaceholder(`${i.vault.getName()}/`).setValue(u).onChange((e=>{const t=ih(e);u=""===t?`${i.vault.getName()}/`:t})))).addButton((e=>{e.setButtonText(t("confirm")),e.onClick((()=>{new aH(i,n,u).open()}))})),new k.Setting(d).setName(t("settings_azureblobstorage_parts")).setDesc(t("settings_azureblobstorage_parts_desc")).addDropdown((e=>{e.addOption("1","1"),e.addOption("2","2"),e.addOption("3","3"),e.addOption("5","5"),e.addOption("10","10"),e.addOption("15","15"),e.addOption("20","20 (default)"),e.setValue(`${n.settings.azureblobstorage.partsConcurrency}`).onChange((e=>r(void 0,void 0,void 0,(function*(){const t=Number.parseInt(e);n.settings.azureblobstorage.partsConcurrency=t,yield n.saveSettings()}))))})),new k.Setting(d).setName(t("settings_azureblobstorage_generatefolderobject")).setDesc(t("settings_azureblobstorage_generatefolderobject_desc")).addDropdown((e=>{e.addOption("notgenerate",t("settings_azureblobstorage_generatefolderobject_notgenerate")).addOption("generate",t("settings_azureblobstorage_generatefolderobject_generate")),e.setValue(n.settings.azureblobstorage.generateFolderObject?"generate":"notgenerate").onChange((e=>r(void 0,void 0,void 0,(function*(){n.settings.azureblobstorage.generateFolderObject="generate"===e,yield n.saveSettings()}))))})),new k.Setting(d).setName(t("settings_checkonnectivity")).setDesc(t("settings_checkonnectivity_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_checkonnectivity_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new k.Notice(t("settings_checkonnectivity_checking"));const e=Ej(n.settings,i.vault.getName(),(()=>n.saveSettings())),r={msg:""};(yield e.checkConnect((e=>{r.msg=`${e}`})))?new k.Notice(t("settings_azureblobstorage_connect_succ")):(new k.Notice(t("settings_azureblobstorage_connect_fail")),new k.Notice(r.msg))}))))})))),{azureBlobStorageDiv:s,azureBlobStorageAllowedToUsedDiv:d,azureBlobStorageNotShowUpHintSetting:l}})(i,n,this.app,this.plugin);new k.Setting(o).setName(n("settings_chooseservice")).setDesc(n("settings_chooseservice_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){e.addOption("s3",n("settings_chooseservice_s3")),e.addOption("dropbox",n("settings_chooseservice_dropbox")),e.addOption("webdav",n("settings_chooseservice_webdav")),e.addOption("onedrive",n("settings_chooseservice_onedrive")),e.addOption("webdis",n("settings_chooseservice_webdis")),e.addOption("separator line","-----"),e.selectEl.lastChild.setAttribute("disabled","disabled"),e.addOption("googledrive",n("settings_chooseservice_googledrive")),e.addOption("onedrivefull",n("settings_chooseservice_onedrivefull")),e.addOption("box",n("settings_chooseservice_box")),e.addOption("pcloud",n("settings_chooseservice_pcloud")),e.addOption("yandexdisk",n("settings_chooseservice_yandexdisk")),e.addOption("koofr",n("settings_chooseservice_koofr")),e.addOption("azureblobstorage",n("settings_chooseservice_azureblobstorage")),e.setValue(this.plugin.settings.serviceType).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.serviceType=e,s.toggleClass("s3-hide","s3"!==this.plugin.settings.serviceType),c.toggleClass("dropbox-hide","dropbox"!==this.plugin.settings.serviceType),v.toggleClass("onedrive-hide","onedrive"!==this.plugin.settings.serviceType),M.toggleClass("onedrivefull-hide","onedrivefull"!==this.plugin.settings.serviceType),T.toggleClass("webdav-hide","webdav"!==this.plugin.settings.serviceType),I.toggleClass("webdis-hide","webdis"!==this.plugin.settings.serviceType),P.toggleClass("googledrive-hide","googledrive"!==this.plugin.settings.serviceType),N.toggleClass("box-hide","box"!==this.plugin.settings.serviceType),L.toggleClass("pcloud-hide","pcloud"!==this.plugin.settings.serviceType),$.toggleClass("yandexdisk-hide","yandexdisk"!==this.plugin.settings.serviceType),K.toggleClass("koofr-hide","koofr"!==this.plugin.settings.serviceType),Y.toggleClass("azureblobstorage-hide","azureblobstorage"!==this.plugin.settings.serviceType),yield this.plugin.saveSettings()}))))}))));const X=i.createEl("div");X.createEl("h2",{text:n("settings_basic")});const ee=new k.Setting(X),te=new k.Setting(X);let re=`${this.plugin.settings.password}`;ee.setName(n("settings_password")).setDesc(n("settings_password_desc")).addText((e=>{RH(e),e.setPlaceholder("").setValue(`${this.plugin.settings.password}`).onChange((e=>r(this,void 0,void 0,(function*(){re=e.trim()}))))})).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("confirm")),e.onClick((()=>r(this,void 0,void 0,(function*(){new EH(this.app,this.plugin,re,te).open()}))))})))),""===this.plugin.settings.password&&te.settingEl.addClass("settings-encryption-method-hide"),te.setName(n("settings_encryptionmethod")).setDesc(Qp(n("settings_encryptionmethod_desc"))).addDropdown((e=>{var t;e.addOption("rclone-base64",n("settings_encryptionmethod_rclone")).addOption("openssl-base64",n("settings_encryptionmethod_openssl")).setValue(null!==(t=this.plugin.settings.encryptionMethod)&&void 0!==t?t:"rclone-base64").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.encryptionMethod=e,yield this.plugin.saveSettings(),""!==this.plugin.settings.password&&new TH(this.app,this.plugin).open()}))))})),new k.Setting(X).setName(n("settings_autorun")).setDesc(n("settings_autorun_desc")).addDropdown((e=>{e.addOption("-1",n("settings_autorun_notset")),e.addOption("60000",n("settings_autorun_1min")),e.addOption("300000",n("settings_autorun_5min")),e.addOption("600000",n("settings_autorun_10min")),e.addOption("1800000",n("settings_autorun_30min")),e.setValue(`${this.plugin.settings.autoRunEveryMilliseconds}`).onChange((e=>r(this,void 0,void 0,(function*(){const t=Number.parseInt(e);if(this.plugin.settings.autoRunEveryMilliseconds=t,yield this.plugin.saveSettings(),(null==t||t<=0)&&void 0!==this.plugin.autoRunIntervalID)window.clearInterval(this.plugin.autoRunIntervalID),this.plugin.autoRunIntervalID=void 0;else if(null!=t&&t>0){const e=window.setInterval((()=>{console.info("auto run from settings.ts"),this.plugin.syncRun("auto")}),t);this.plugin.autoRunIntervalID=e,this.plugin.registerInterval(e)}}))))})),new k.Setting(X).setName(n("settings_runoncestartup")).setDesc(n("settings_runoncestartup_desc")).addDropdown((e=>{e.addOption("-1",n("settings_runoncestartup_notset")),e.addOption("1000",n("settings_runoncestartup_1sec")),e.addOption("10000",n("settings_runoncestartup_10sec")),e.addOption("30000",n("settings_runoncestartup_30sec")),e.setValue(`${this.plugin.settings.initRunAfterMilliseconds}`).onChange((e=>r(this,void 0,void 0,(function*(){const t=Number.parseInt(e);this.plugin.settings.initRunAfterMilliseconds=t,yield this.plugin.saveSettings()}))))})),new k.Setting(X).setName(n("settings_synconsave")).setDesc(n("settings_synconsave_desc")).addDropdown((e=>{var t;e.addOption("-1",n("settings_synconsave_disable")),e.addOption("1000",n("settings_synconsave_enable"));let i=!1;(null!==(t=this.plugin.settings.syncOnSaveAfterMilliseconds)&&void 0!==t?t:-1)>0&&(i=!0),e.setValue(""+(i?"1000":"-1")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.syncOnSaveAfterMilliseconds=Number.parseInt(e),yield this.plugin.saveSettings(),this.plugin.toggleSyncOnSaveIfSet()}))))})),new k.Setting(X).setName(n("settings_skiplargefiles")).setDesc(n("settings_skiplargefiles_desc")).addDropdown((e=>{e.addOption("-1",n("settings_skiplargefiles_notset"));const t=[1,5,10,20,50,100,200,500,1e3];for(const r of t)e.addOption(""+1e3*r*1e3,`${r} MB`);e.setValue(`${this.plugin.settings.skipSizeLargerThan}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.skipSizeLargerThan=Number.parseInt(e),yield this.plugin.saveSettings()}))))})),k.Platform.isMobileApp||(new k.Setting(X).setName(n("settings_enablestatusbar_info")).setDesc(n("settings_enablestatusbar_info_desc")).addToggle((e=>{var t;e.setValue(null!==(t=this.plugin.settings.enableStatusBarInfo)&&void 0!==t&&t).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.enableStatusBarInfo=e,yield this.plugin.saveSettings(),new k.Notice(n("settings_enablestatusbar_reloadrequired_notice"))}))))})),new k.Setting(X).setName(n("settings_resetstatusbar_time")).setDesc(n("settings_resetstatusbar_time_desc")).addButton((e=>{e.setButtonText(n("settings_resetstatusbar_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield P_(this.plugin.db,this.plugin.vaultRandomID,-1),yield z_(this.plugin.db,this.plugin.vaultRandomID,-1),this.plugin.updateLastSyncMsg(void 0,"not_syncing",null,null),new k.Notice(n("settings_resetstatusbar_notice"))}))))}))),new k.Setting(X).setName(n("settings_ignorepaths")).setDesc(n("settings_ignorepaths_desc")).setClass("ignorepaths-settings").addTextArea((e=>{var t;e.setValue(`${(null!==(t=this.plugin.settings.ignorePaths)&&void 0!==t?t:[]).join("\n")}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.ignorePaths=e.trim().split("\n").filter((e=>""!==e.trim())),yield this.plugin.saveSettings()})))),e.inputEl.rows=10,e.inputEl.cols=30,e.inputEl.addClass("ignorepaths-textarea")})),new k.Setting(X).setName(n("settings_onlyallowpaths")).setDesc(n("settings_onlyallowpaths_desc")).setClass("onlyallowpaths-settings").addTextArea((e=>{var t;e.setValue(`${(null!==(t=this.plugin.settings.onlyAllowPaths)&&void 0!==t?t:[]).join("\n")}`).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.onlyAllowPaths=e.trim().split("\n").filter((e=>""!==e.trim())),yield this.plugin.saveSettings()})))),e.inputEl.rows=10,e.inputEl.cols=30,e.inputEl.addClass("onlyallowpaths-textarea")}));const ie=i.createEl("div");ie.createEl("h2",{text:n("settings_adv")}),new k.Setting(ie).setName(n("settings_concurrency")).setDesc(n("settings_concurrency_desc")).addDropdown((e=>{e.addOption("1","1"),e.addOption("2","2"),e.addOption("3","3"),e.addOption("5","5 (default)"),e.addOption("10","10"),e.addOption("15","15"),e.addOption("20","20"),e.setValue(`${this.plugin.settings.concurrency}`).onChange((e=>r(this,void 0,void 0,(function*(){const t=Number.parseInt(e);this.plugin.settings.concurrency=t,yield this.plugin.saveSettings()}))))})),new k.Setting(ie).setName(n("settings_syncunderscore")).setDesc(n("settings_syncunderscore_desc")).addDropdown((e=>{e.addOption("disable",n("disable")),e.addOption("enable",n("enable")),e.setValue(""+(this.plugin.settings.syncUnderscoreItems?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.syncUnderscoreItems="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(ie).setName(n("settings_configdir")).setDesc(n("settings_configdir_desc",{configDir:this.app.vault.configDir})).addDropdown((e=>{e.addOption("disable",n("disable")),e.addOption("enable",n("enable"));const t={secondConfirm:!1};e.setValue(""+(this.plugin.settings.syncConfigDir?"enable":"disable")).onChange((i=>r(this,void 0,void 0,(function*(){"enable"!==i||t.secondConfirm?(t.secondConfirm=!1,this.plugin.settings.syncConfigDir=!1,yield this.plugin.saveSettings()):(e.setValue("disable"),new MH(this.app,this.plugin,(()=>{t.secondConfirm=!0,e.setValue("enable")})).open())}))))})),new k.Setting(ie).setName(n("settings_bookmarks")).setDesc(n("settings_bookmarks_desc",{configDir:this.app.vault.configDir})).addDropdown((e=>{e.addOption("disable",n("disable")),e.addOption("enable",n("enable")),e.setValue(""+(this.plugin.settings.syncBookmarks?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.syncBookmarks="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(ie).setName(n("settings_deletetowhere")).setDesc(n("settings_deletetowhere_desc")).addDropdown((e=>{var t;e.addOption("system",n("settings_deletetowhere_system_trash")),e.addOption("obsidian",n("settings_deletetowhere_obsidian_trash")),e.setValue(null!==(t=this.plugin.settings.deleteToWhere)&&void 0!==t?t:"system").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.deleteToWhere=e,yield this.plugin.saveSettings()}))))}));let ne=n("settings_conflictaction_desc");"smart_conflict"===(null!==(e=this.plugin.settings.conflictAction)&&void 0!==e?e:"keep_newer")&&(ne+=n("settings_conflictaction_smart_conflict_desc"));const oe=new k.Setting(ie).setName(n("settings_conflictaction")).setDesc(Qp(ne));oe.addDropdown((e=>{var t;e.addOption("keep_newer",n("settings_conflictaction_keep_newer")).addOption("keep_larger",n("settings_conflictaction_keep_larger")).addOption("smart_conflict",n("settings_conflictaction_smart_conflict")).setValue(null!==(t=this.plugin.settings.conflictAction)&&void 0!==t?t:"keep_newer").onChange((e=>r(this,void 0,void 0,(function*(){var t;this.plugin.settings.conflictAction=e,yield this.plugin.saveSettings(),ne=n("settings_conflictaction_desc"),"smart_conflict"===(null!==(t=this.plugin.settings.conflictAction)&&void 0!==t?t:"keep_newer")&&(ne+=n("settings_conflictaction_smart_conflict_desc")),oe.setDesc(Qp(ne))}))))})),uH(ie,n,this.app,this.plugin);const se=new k.Setting(ie).setName(n("settings_protectmodifypercentage")).setDesc(n("settings_protectmodifypercentage_desc")),ae=new k.Setting(ie).setName(n("settings_protectmodifypercentage_customfield")).setDesc(n("settings_protectmodifypercentage_customfield_desc"));let le;(null!==(t=this.plugin.settings.protectModifyPercentage)&&void 0!==t?t:50)%10==0&&ae.settingEl.addClass("settings-percentage-custom-hide"),ae.addText((e=>{var t;e.inputEl.type="number",le=e,e.setPlaceholder("0 ~ 100").setValue(`${null!==(t=this.plugin.settings.protectModifyPercentage)&&void 0!==t?t:50}`).onChange((e=>r(this,void 0,void 0,(function*(){let t=Number.parseFloat(e.trim());Number.isNaN(t)||(t<0?t=0:t>100&&(t=100),this.plugin.settings.protectModifyPercentage=t,yield this.plugin.saveSettings())}))))})),se.addDropdown((e=>{var t;for(const t of Array.from({length:11},((e,t)=>10*t))){let r=`${t}`;0===t?r=n("settings_protectmodifypercentage_000_desc"):50===t?r=n("settings_protectmodifypercentage_050_desc"):100===t&&(r=n("settings_protectmodifypercentage_100_desc")),e.addOption(`${t}`,r)}e.addOption("custom",n("settings_protectmodifypercentage_custom_desc"));const i=null!==(t=this.plugin.settings.protectModifyPercentage)&&void 0!==t?t:50;let o="custom";i%10==0?o=`${i}`:ae.settingEl.removeClass("settings-percentage-custom"),e.setValue(o).onChange((e=>r(this,void 0,void 0,(function*(){const t=Number.parseInt(e);"custom"===e||Number.isNaN(t)?ae.settingEl.removeClass("settings-percentage-custom-hide"):(this.plugin.settings.protectModifyPercentage=t,ae.settingEl.addClass("settings-percentage-custom-hide"),null==le||le.setValue(`${t}`),yield this.plugin.saveSettings())}))))})),new k.Setting(ie).setName(n("setting_syncdirection")).setDesc(Qp(n("setting_syncdirection_desc"))).addDropdown((e=>{var t;e.addOption("bidirectional",n("setting_syncdirection_bidirectional_desc")),e.addOption("incremental_push_only",n("setting_syncdirection_incremental_push_only_desc")),e.addOption("incremental_pull_only",n("setting_syncdirection_incremental_pull_only_desc")),e.addOption("incremental_push_and_delete_only",n("setting_syncdirection_incremental_push_and_delete_only_desc")),e.addOption("incremental_pull_and_delete_only",n("setting_syncdirection_incremental_pull_and_delete_only_desc")),e.setValue(null!==(t=this.plugin.settings.syncDirection)&&void 0!==t?t:"bidirectional").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.syncDirection=e,yield this.plugin.saveSettings()}))))})),k.Platform.isMobile&&new k.Setting(ie).setName(n("settings_enablemobilestatusbar")).setDesc(n("settings_enablemobilestatusbar_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){e.addOption("enable",n("enable")).addOption("disable",n("disable")),e.setValue(""+(this.plugin.settings.enableMobileStatusBar?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){var t;"enable"===e?(this.plugin.settings.enableMobileStatusBar=!0,this.plugin.appContainerObserver=Xp("enable")):(this.plugin.settings.enableMobileStatusBar=!1,Xp("disable",this.plugin.appContainerObserver),null===(t=this.plugin.appContainerObserver)||void 0===t||t.disconnect(),this.plugin.appContainerObserver=void 0),yield this.plugin.saveSettings()}))))}))));const de=i.createEl("div");de.createEl("h2",{text:n("settings_importexport")});const ce=new k.Setting(de).setName(n("settings_export")).setDesc(n("settings_export_desc"));ce.settingEl.addClass("setting-need-wrapping"),ce.addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_basic_and_advanced_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"basic_and_advanced").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_s3_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"s3").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_dropbox_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"dropbox").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_onedrive_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"onedrive").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_onedrivefull_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"onedrivefull").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_webdav_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"webdav").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_webdis_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"webdis").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_googledrive_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"googledrive").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_box_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"box").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_pcloud_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"pcloud").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_yandexdisk_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"yandexdisk").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_koofr_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"koofr").open()}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_export_azureblobstorage_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new DH(this.app,this.plugin,"azureblobstorage").open()}))))}))));let pe="";new k.Setting(de).setName(n("settings_import")).setDesc(n("settings_import_desc")).addText((e=>e.setPlaceholder("obsidian://remotely-save?func=settings&...").setValue("").onChange((e=>{pe=e})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("confirm")),e.onClick((()=>r(this,void 0,void 0,(function*(){if(""!==pe){try{const e=(e=>{if(!e.startsWith("obsidian://remotely-save?func=settings&"))throw Error("not valid string");const t=new URL(e);return Object.fromEntries(t.searchParams)})(pe),t=rH(e,this.app.vault.getName());if("error"===t.status)new k.Notice(t.message);else{const e=m()(t.result);this.plugin.settings=Object.assign({},this.plugin.settings,e),this.plugin.saveSettings(),new k.Notice(n("protocol_saveqr",{manifestName:this.plugin.manifest.name}))}}catch(e){new k.Notice(`${e}`)}pe=""}else new k.Notice(n("settings_import_error_notice")),pe=""}))))}))));((e,t,i,n,o,s,a,l,d,c,u,p,h,f,m,g,y,v,b)=>{var w,_,x;e.createEl("h2",{text:t("settings_pro")}).setAttribute("id","settings-pro"),e.createEl("div",{text:Qp(t("settings_pro_tutorial"))});const S=e.createDiv(),E=S.createDiv({cls:"pro-auth-button-hide settings-auth-related"}),T=S.createDiv({cls:"pro-revoke-auth-button-hide settings-auth-related"}),B=new k.Setting(T).setName(t("settings_pro_features")).setDesc(Qp(t("settings_pro_features_desc",{features:xH(n.settings.pro.enabledProFeatures)})));B.addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pro_features_refresh_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){var e,r,i,w,_,x,S;new k.Notice(t("settings_pro_features_refresh_fetch")),yield ue(n.settings.pro,n.manifest.version,o),B.setDesc(Qp(t("settings_pro_features_desc",{features:xH(n.settings.pro.enabledProFeatures)})));const E=1===(null===(e=n.settings.pro)||void 0===e?void 0:e.enabledProFeatures.filter((e=>"feature-onedrive_full"===e.featureName)).length);console.debug(`allow to show up OnedriveFull settings? ${E}`),E?(s.removeClass("onedrivefull-allow-to-use-hide"),a.settingEl.addClass("onedrivefull-allow-to-use-hide")):(s.addClass("onedrivefull-allow-to-use-hide"),a.settingEl.removeClass("onedrivefull-allow-to-use-hide"));const T=1===(null===(r=n.settings.pro)||void 0===r?void 0:r.enabledProFeatures.filter((e=>"feature-google_drive"===e.featureName)).length);console.debug(`allow to show up google drive settings? ${T}`),T?(l.removeClass("googledrive-allow-to-use-hide"),d.settingEl.addClass("googledrive-allow-to-use-hide")):(l.addClass("googledrive-allow-to-use-hide"),d.settingEl.removeClass("googledrive-allow-to-use-hide"));const C=1===(null===(i=n.settings.pro)||void 0===i?void 0:i.enabledProFeatures.filter((e=>"feature-box"===e.featureName)).length);console.debug(`allow to show up Box settings? ${C}`),C?(c.removeClass("box-allow-to-use-hide"),u.settingEl.addClass("box-allow-to-use-hide")):(c.addClass("box-allow-to-use-hide"),u.settingEl.removeClass("box-allow-to-use-hide"));const I=1===(null===(w=n.settings.pro)||void 0===w?void 0:w.enabledProFeatures.filter((e=>"feature-pcloud"===e.featureName)).length);console.debug(`allow to show up pCloud settings? ${I}`),I?(p.removeClass("pcloud-allow-to-use-hide"),h.settingEl.addClass("pcloud-allow-to-use-hide")):(p.addClass("pcloud-allow-to-use-hide"),h.settingEl.removeClass("pcloud-allow-to-use-hide"));const A=1===(null===(_=n.settings.pro)||void 0===_?void 0:_.enabledProFeatures.filter((e=>"feature-yandex_disk"===e.featureName)).length);console.debug(`allow to show up Yandex Disk settings? ${A}`),A?(f.removeClass("yandexdisk-allow-to-use-hide"),m.settingEl.addClass("yandexdisk-allow-to-use-hide")):(f.addClass("yandexdisk-allow-to-use-hide"),m.settingEl.removeClass("yandexdisk-allow-to-use-hide"));const F=1===(null===(x=n.settings.pro)||void 0===x?void 0:x.enabledProFeatures.filter((e=>"feature-koofr"===e.featureName)).length);console.debug(`allow to show up Koofr settings? ${F}`),F?(g.removeClass("koofr-allow-to-use-hide"),y.settingEl.addClass("koofr-allow-to-use-hide")):(g.addClass("koofr-allow-to-use-hide"),y.settingEl.removeClass("koofr-allow-to-use-hide"));const M=1===(null===(S=n.settings.pro)||void 0===S?void 0:S.enabledProFeatures.filter((e=>"feature-azure_blob_storage"===e.featureName)).length);console.debug(`allow to show up AzureBlobStorage settings? ${M}`),M?(v.removeClass("azureblobstorage-allow-to-use-hide"),b.settingEl.addClass("azureBlobStorage-allow-to-use-hide")):(v.addClass("azureblobstorage-allow-to-use-hide"),b.settingEl.removeClass("azureblobstorage-allow-to-use-hide")),new k.Notice(t("settings_pro_features_refresh_succ"))}))))}))));const C=new k.Setting(T).setName(t("settings_pro_revoke")).setDesc(t("settings_pro_revoke_desc",{email:null===(w=n.settings.pro)||void 0===w?void 0:w.email})).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pro_revoke_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){new _H(i,n,E,T,t).open()}))))}))));new k.Setting(E).setName(t("settings_pro_intro")).setDesc(Qp(t("settings_pro_intro_desc"))).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pro_intro_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){window.open("https://remotelysave.com/user/signupin","_self")}))))})))),new k.Setting(E).setName(t("settings_pro_auth")).setDesc(t("settings_pro_auth_desc")).addButton((e=>r(void 0,void 0,void 0,(function*(){e.setButtonText(t("settings_pro_auth_button")),e.onClick((()=>r(void 0,void 0,void 0,(function*(){const e=new wH(i,n,E,T,C,B,t);n.oauth2Info.helperModal=e,n.oauth2Info.authDiv=E,n.oauth2Info.revokeDiv=T,n.oauth2Info.revokeAuthSetting=C,e.open()}))))})))),E.toggleClass("pro-auth-button-hide",""!==(null===(_=n.settings.pro)||void 0===_?void 0:_.refreshToken)),T.toggleClass("pro-revoke-auth-button-hide",""===(null===(x=n.settings.pro)||void 0===x?void 0:x.refreshToken))})(i.createEl("div"),n,this.app,this.plugin,(()=>this.plugin.saveSettings()),D,R,O,z,q,U,j,H,G,W,V,J,Q,Z);const he=i.createEl("div");he.createEl("h2",{text:n("settings_debug")}),new k.Setting(he).setName(n("settings_debuglevel")).setDesc(n("settings_debuglevel_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){var t;e.addOption("info","info"),e.addOption("debug","debug"),e.setValue(null!==(t=this.plugin.settings.currLogLevel)&&void 0!==t?t:"info").onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.currLogLevel=e,yield this.plugin.saveSettings(),console.info(`the log level is changed to ${e}`)}))))})))),new k.Setting(he).setName(n("settings_outputsettingsconsole")).setDesc(n("settings_outputsettingsconsole_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_outputsettingsconsole_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){const e=dx(yield this.plugin.loadData());console.info(e),new k.Notice(n("settings_outputsettingsconsole_notice"))}))))})))),new k.Setting(he).setName(n("settings_obfuscatesettingfile")).setDesc(n("settings_obfuscatesettingfile_desc")).addDropdown((e=>r(this,void 0,void 0,(function*(){e.addOption("enable",n("enable")).addOption("disable",n("disable")),e.setValue(""+(this.plugin.settings.obfuscateSettingFile?"enable":"disable")).onChange((e=>r(this,void 0,void 0,(function*(){this.plugin.settings.obfuscateSettingFile="enable"===e,yield this.plugin.saveSettings()}))))})))),new k.Setting(he).setName(n("settings_viewconsolelog")).setDesc(Qp(n("settings_viewconsolelog_desc")));const fe=new k.Setting(he).setName(n("settings_syncplans")).setDesc(n("settings_syncplans_desc"));fe.settingEl.addClass("setting-need-wrapping"),fe.addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_syncplans_button_1_only_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield ux(this.plugin.db,this.app.vault,this.plugin.vaultRandomID,1,!0),new k.Notice(n("settings_syncplans_notice"))}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_syncplans_button_5_only_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield ux(this.plugin.db,this.app.vault,this.plugin.vaultRandomID,5,!0),new k.Notice(n("settings_syncplans_notice"))}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_syncplans_button_1")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield ux(this.plugin.db,this.app.vault,this.plugin.vaultRandomID,1,!1),new k.Notice(n("settings_syncplans_notice"))}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_syncplans_button_5")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield ux(this.plugin.db,this.app.vault,this.plugin.vaultRandomID,5,!1),new k.Notice(n("settings_syncplans_notice"))}))))})))).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_syncplans_button_all")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield ux(this.plugin.db,this.app.vault,this.plugin.vaultRandomID,-1,!1),new k.Notice(n("settings_syncplans_notice"))}))))})))),new k.Setting(he).setName(n("settings_delsyncplans")).setDesc(n("settings_delsyncplans_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_delsyncplans_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){var e;yield(e=this.plugin.db,r(void 0,void 0,void 0,(function*(){yield e.syncPlansTbl.clear()}))),new k.Notice(n("settings_delsyncplans_notice"))}))))})))),new k.Setting(he).setName(n("settings_delprevsync")).setDesc(n("settings_delprevsync_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_delprevsync_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){var e,t;yield(e=this.plugin.db,t=this.plugin.vaultRandomID,r(void 0,void 0,void 0,(function*(){const r=(yield e.prevSyncRecordsTbl.keys()).filter((e=>e.startsWith(`${t}\t`)));yield e.prevSyncRecordsTbl.removeItems(r)}))),new k.Notice(n("settings_delprevsync_notice"))}))))})))),new k.Setting(he).setName(n("settings_profiler_results")).setDesc(n("settings_profiler_results_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_profiler_results_button_all")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield px(this.plugin.db,this.app.vault,this.plugin.vaultRandomID),new k.Notice(n("settings_profiler_results_notice"))}))))})))),new k.Setting(he).setName(n("settings_profiler_enableprofiler")).setDesc(n("settings_profiler_enableprofiler_desc")).addDropdown((e=>{var t;e.addOption("enable",n("enable")),e.addOption("disable",n("disable")),e.setValue((null===(t=this.plugin.settings.profiler)||void 0===t?void 0:t.enable)?"enable":"disable").onChange((e=>r(this,void 0,void 0,(function*(){void 0===this.plugin.settings.profiler&&(this.plugin.settings.profiler=iH),this.plugin.settings.profiler.enable="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(he).setName(n("settings_profiler_enabledebugprint")).setDesc(n("settings_profiler_enabledebugprint_desc")).addDropdown((e=>{var t;e.addOption("enable",n("enable")),e.addOption("disable",n("disable")),e.setValue((null===(t=this.plugin.settings.profiler)||void 0===t?void 0:t.enablePrinting)?"enable":"disable").onChange((e=>r(this,void 0,void 0,(function*(){void 0===this.plugin.settings.profiler&&(this.plugin.settings.profiler=iH),this.plugin.settings.profiler.enablePrinting="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(he).setName(n("settings_profiler_recordsize")).setDesc(n("settings_profiler_recordsize_desc")).addDropdown((e=>{var t;e.addOption("enable",n("enable")),e.addOption("disable",n("disable")),e.setValue((null===(t=this.plugin.settings.profiler)||void 0===t?void 0:t.recordSize)?"enable":"disable").onChange((e=>r(this,void 0,void 0,(function*(){void 0===this.plugin.settings.profiler&&(this.plugin.settings.profiler=iH),this.plugin.settings.profiler.recordSize="enable"===e,yield this.plugin.saveSettings()}))))})),new k.Setting(he).setName(n("settings_outputbasepathvaultid")).setDesc(n("settings_outputbasepathvaultid_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_outputbasepathvaultid_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){new k.Notice(this.plugin.getVaultBasePath()),new k.Notice(this.plugin.vaultRandomID)}))))})))),new k.Setting(he).setName(n("settings_resetcache")).setDesc(n("settings_resetcache_desc")).addButton((e=>r(this,void 0,void 0,(function*(){e.setButtonText(n("settings_resetcache_button")),e.onClick((()=>r(this,void 0,void 0,(function*(){yield r(void 0,void 0,void 0,(function*(){const e=indexedDB.deleteDatabase(I_);e.onsuccess=e=>{console.info("db deleted")},e.onblocked=e=>{console.warn("trying to delete db but it was blocked")},e.onerror=e=>{console.error("tried to delete db but something goes wrong!"),console.error(e)}})),new k.Notice(n("settings_resetcache_notice")),this.plugin.unload()}))))}))))}hide(){const{containerEl:e}=this;e.empty(),super.hide()}}class OH extends k.Modal{constructor(e,t){super(e),this.plugin=t,this.agree=!1,this.manualBackup=!1,this.requireUpdateAllDev=!1}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("syncalgov3_title")});const r=e.createEl("ul");t("syncalgov3_texts").split("\n").forEach((e=>{r.createEl("li",{text:Qp(e)})})),e.createDiv("modal-button-container",(e=>{let r;e.createEl("label",{cls:"mod-checkbox"},(e=>{const i=e.createEl("input",{attr:{tabindex:-1},type:"checkbox"});i.checked=this.manualBackup,i.addEventListener("click",(()=>{this.manualBackup=i.checked,void 0!==r&&(this.manualBackup&&this.requireUpdateAllDev?r.removeAttribute("disabled"):r.setAttr("disabled",!0))})),e.appendText(t("syncalgov3_checkbox_manual_backup"))})),e.createEl("label",{cls:"mod-checkbox"},(e=>{const i=e.createEl("input",{attr:{tabindex:-1},type:"checkbox"});i.checked=this.requireUpdateAllDev,i.addEventListener("click",(()=>{this.requireUpdateAllDev=i.checked,void 0!==r&&(this.manualBackup&&this.requireUpdateAllDev?r.removeAttribute("disabled"):r.setAttr("disabled",!0))})),e.appendText(t("syncalgov3_checkbox_requiremultidevupdate"))})),r=e.createEl("button",{attr:{type:"button"},cls:"mod-cta",text:t("syncalgov3_button_agree")}),r.setAttr("disabled",!0),r.addEventListener("click",(()=>{this.agree=!0,this.close()})),e.createEl("button",{attr:{type:"submit"},text:t("syncalgov3_button_disagree")}).addEventListener("click",(()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty(),this.agree?(console.info("agree to use the new algorithm"),this.plugin.saveAgreeToUseNewSyncAlgorithm(),this.plugin.enableAutoSyncIfSet(),this.plugin.enableInitSyncIfSet(),this.plugin.toggleSyncOnSaveIfSet()):(console.info("do not agree to use the new algorithm"),this.plugin.unload())}}const zH={s3:{s3Endpoint:"",s3Region:"",s3AccessKeyID:"",s3SecretAccessKey:"",s3BucketName:"",bypassCorsLocally:!0,partsConcurrency:20,forcePathStyle:!1,remotePrefix:"",useAccurateMTime:!1,reverseProxyNoSignUrl:"",generateFolderObject:!1},webdav:{address:"",username:"",password:"",authType:"basic",manualRecursive:!0,depth:"manual_1",remoteBaseDir:""},dropbox:gx,onedrive:qx,onedrivefull:n_,webdis:{address:"",username:"",password:"",remoteBaseDir:""},googledrive:Sh,box:bh,pcloud:p_,yandexdisk:y_,koofr:Nh,azureblobstorage:nh,password:"",serviceType:"s3",currLogLevel:"info",autoRunEveryMilliseconds:-1,initRunAfterMilliseconds:-1,syncOnSaveAfterMilliseconds:-1,agreeToUploadExtraMetadata:!0,concurrency:5,syncConfigDir:!1,syncBookmarks:!1,syncUnderscoreItems:!1,lang:"auto",logToDB:!1,skipSizeLargerThan:-1,ignorePaths:[],onlyAllowPaths:[],enableStatusBarInfo:!0,deleteToWhere:"system",agreeToUseSyncV3:!1,conflictAction:"keep_newer",howToCleanEmptyFolder:"clean_both",protectModifyPercentage:50,syncDirection:"bidirectional",obfuscateSettingFile:!0,enableMobileStatusBar:!1,encryptionMethod:"unknown",profiler:iH,pro:se},NH="remotely-save-sync-wait",qH="remotely-save-sync-running",UH="remotely-save-logs",LH=(e,t)=>{if(void 0===t)return"";switch(t){case"manual":return e("statusbar_sync_source_manual");case"dry":return e("statusbar_sync_source_dry");case"auto":return e("statusbar_sync_source_auto");case"auto_once_init":return e("statusbar_sync_source_auto_once_init");case"auto_sync_on_save":return e("statusbar_sync_source_auto_sync_on_save");default:throw Error(`no translate for ${t}`)}};class jH extends k.Plugin{constructor(){super(...arguments),this._syncOnSaveEvent1=()=>{this._checkCurrFileModified("SYNC")},this._syncOnSaveEvent2=y()((()=>r(this,void 0,void 0,(function*(){yield this._checkCurrFileModified("FILE_CHANGES")}))),3e3,{leading:!1,trailing:!0})}syncRun(){return r(this,arguments,void 0,(function*(e="manual"){var t,i,n,o,s,a,l,d,c,u,p,f;let m;null!==(i=null===(t=this.settings.profiler)||void 0===t?void 0:t.enable)&&void 0!==i&&i&&(m=new nH(void 0,null!==(o=null===(n=this.settings.profiler)||void 0===n?void 0:n.enablePrinting)&&void 0!==o&&o,null!==(a=null===(s=this.settings.profiler)||void 0===s?void 0:s.recordSize)&&void 0!==a&&a));const g=new Cj(this.app.vault,null!==(l=this.settings.syncConfigDir)&&void 0!==l&&l,null!==(d=this.settings.syncBookmarks)&&void 0!==d&&d,this.app.vault.configDir,this.manifest.id,m,null!==(c=this.settings.deleteToWhere)&&void 0!==c?c:"system"),y=Ej(this.settings,this.app.vault.getName(),(()=>r(this,void 0,void 0,(function*(){return yield this.saveSettings()})))),v=new Ox(y,null!==(u=this.settings.password)&&void 0!==u?u:"",null!==(p=this.settings.encryptionMethod)&&void 0!==p?p:"rclone-base64"),b=(e,t)=>this.i18n.t(e,t),w=this.getCurrProfileID(),_=(e,t,r)=>{"manual"!==e&&"dry"!==e||new k.Notice(t,r)};if(this.isSyncing)return _(e,b("syncrun_alreadyrunning",{pluginName:this.manifest.name,syncStatus:"running",newTriggerSource:e})),void(void 0!==this.currSyncMsg&&""!==this.currSyncMsg&&_(e,this.currSyncMsg));yield ax(g,y,v,m,this.db,e,w,this.vaultRandomID,this.app.vault.configDir,this.settings,this.manifest.version,(()=>r(this,void 0,void 0,(function*(){return yield this.saveSettings()}))),((e,t,r)=>{const i=(100*t/r).toFixed(1);return b("syncrun_abort_protectmodifypercentage",{protectModifyPercentage:e,realModifyDeleteCount:t,allFilesCount:r,percent:i})}),(e=>r(this,void 0,void 0,(function*(){this.isSyncing=e}))),((e,t)=>r(this,void 0,void 0,(function*(){switch(t){case 0:"dry"===e&&("info"===this.settings.currLogLevel?_(e,b("syncrun_shortstep0")):_(e,b("syncrun_step0")));break;case 1:"info"===this.settings.currLogLevel?_(e,b("syncrun_shortstep1",{serviceType:this.settings.serviceType})):_(e,b("syncrun_step1",{serviceType:this.settings.serviceType}));break;case 2:"info"===this.settings.currLogLevel||_(e,b("syncrun_step2"));break;case 3:"info"===this.settings.currLogLevel||_(e,b("syncrun_step3"));break;case 4:"info"===this.settings.currLogLevel||_(e,b("syncrun_step4"));break;case 5:"info"===this.settings.currLogLevel||_(e,b("syncrun_step5"));break;case 6:"info"===this.settings.currLogLevel||_(e,b("syncrun_step6"));break;case 7:"dry"===e?"info"===this.settings.currLogLevel?_(e,b("syncrun_shortstep2skip")):_(e,b("syncrun_step7skip")):"info"===this.settings.currLogLevel||_(e,b("syncrun_step7"));break;case 8:"info"===this.settings.currLogLevel?_(e,b("syncrun_shortstep2")):_(e,b("syncrun_step8"));break;default:throw Error(`unknown step=${t} for showing notice`)}}))),((e,t)=>r(this,void 0,void 0,(function*(){var r;if(console.error(t),t instanceof h)for(const r of t.errors)_(e,r.message,1e4);else _(e,null!==(r=null==t?void 0:t.message)&&void 0!==r?r:"error while sync",1e4)}))),((e,t)=>r(this,void 0,void 0,(function*(){if(1===t)void 0!==this.syncRibbon&&((0,k.setIcon)(this.syncRibbon,qH),this.syncRibbon.setAttribute("aria-label",b("syncrun_syncingribbon",{pluginName:this.manifest.name,triggerSource:e})));else if(8===t&&void 0!==this.syncRibbon){(0,k.setIcon)(this.syncRibbon,NH);const e=`${this.manifest.name}`;this.syncRibbon.setAttribute("aria-label",e)}}))),((e,t,i)=>r(this,void 0,void 0,(function*(){if(1===t)this.updateLastSyncMsg(e,"syncing",-1,-1);else if(8===t&&i){const t=Date.now();yield P_(this.db,this.vaultRandomID,t),this.updateLastSyncMsg(e,"not_syncing",t,null)}else if(!i){const t=Date.now();yield z_(this.db,this.vaultRandomID,t),this.updateLastSyncMsg(e,"not_syncing",null,t)}}))),((t,i,n,o,s)=>r(this,void 0,void 0,(function*(){this.setCurrSyncMsg(b,t,i,n,o,s,e)})))),v.closeResources(),null==m||m.clear(),null===(f=this.syncEvent)||void 0===f||f.trigger("SYNC_DONE")}))}onload(){return r(this,void 0,void 0,(function*(){var e;console.info(`loading plugin ${this.manifest.id}`);const{iconSvgSyncWait:t,iconSvgSyncRunning:i,iconSvgLogs:n}=(()=>{const e=b(_);e.setAttribute("width","100"),e.setAttribute("height","100");const t=b(x);t.setAttribute("width","100"),t.setAttribute("height","100");const r=b(S);r.setAttribute("width","100"),r.setAttribute("height","100");const i={iconSvgSyncWait:e.outerHTML,iconSvgSyncRunning:t.outerHTML,iconSvgLogs:r.outerHTML};return e.empty(),t.empty(),r.empty(),i})();(0,k.addIcon)(NH,t),(0,k.addIcon)(qH,i),(0,k.addIcon)(UH,n),this.oauth2Info={verifier:"",helperModal:void 0,authDiv:void 0,revokeDiv:void 0,revokeAuthSetting:void 0},this.currSyncMsg="",this.isSyncing=!1,this.hasPendingSyncOnSave=!1,this.syncEvent=new k.Events,yield this.loadSettings();const o=this.getCurrProfileID();this.i18n=new eH(this.settings.lang,(e=>r(this,void 0,void 0,(function*(){this.settings.lang=e,yield this.saveSettings()}))));const s=(e,t)=>this.i18n.t(e,t);yield this.checkIfOauthExpires();const a=yield this.getVaultRandomIDFromOldConfigFile();this.tryToAddIgnoreFile();const l=this.getVaultBasePath();try{yield this.prepareDBAndVaultRandomID(l,a,o)}catch(t){throw new k.Notice(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:"error of prepareDBAndVaultRandomID",1e4),t}if(this.enableAutoClearOutputToDBHistIfSet(),this.enableAutoClearSyncPlanHist(),this.registerObsidianProtocolHandler(A,(e=>r(this,void 0,void 0,(function*(){const t=rH(e,this.app.vault.getName());if("error"===t.status)new k.Notice(t.message);else{const e=m()(t.result);this.settings=Object.assign({},this.settings,e),this.saveSettings(),new k.Notice(s("protocol_saveqr",{manifestName:this.manifest.name}))}})))),this.registerObsidianProtocolHandler("remotely-save-cb",(e=>r(this,void 0,void 0,(function*(){new k.Notice(s("protocol_callbacknotsupported",{params:JSON.stringify(e)}))})))),this.registerObsidianProtocolHandler(M,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a;if(void 0===e.code||void 0===(null===(t=this.oauth2Info)||void 0===t?void 0:t.verifier))throw new k.Notice(s("protocol_dropbox_connect_fail")),Error(s("protocol_dropbox_connect_unknown",{params:JSON.stringify(e)}));{if(void 0===this.oauth2Info.helperModal)return void new k.Notice(s("protocol_dropbox_no_modal"));{const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_dropbox_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}const t=yield wx(this.settings.dropbox.clientID,this.oauth2Info.verifier,e.code,(e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_dropbox_connect_fail")),new k.Notice(`${e}`),e})))),l=this;_x(this.settings.dropbox,t,(()=>l.saveSettings()));const d=Ej(this.settings,this.app.vault.getName(),(()=>l.saveSettings())),c=yield d.getUserDisplayName();this.settings.dropbox.username=c,yield this.saveSettings(),new k.Notice(s("protocol_dropbox_connect_succ",{username:c})),this.oauth2Info.verifier="",null===(i=this.oauth2Info.helperModal)||void 0===i||i.close(),this.oauth2Info.helperModal=void 0,null===(n=this.oauth2Info.authDiv)||void 0===n||n.toggleClass("dropbox-auth-button-hide",""!==this.settings.dropbox.username),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_dropbox_connect_succ_revoke",{username:this.settings.dropbox.username})),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("dropbox-revoke-auth-button-hide",""===this.settings.dropbox.username),this.oauth2Info.revokeDiv=void 0}})))),this.registerObsidianProtocolHandler(F,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l,d,c,u,p,h,f,m;if(void 0===e.code||void 0===(null===(t=this.oauth2Info)||void 0===t?void 0:t.verifier))throw new k.Notice(s("protocol_onedrive_connect_fail")),Error(s("protocol_onedrive_connect_unknown",{params:JSON.stringify(e)}));{if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_onedrive_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}const t=yield(u=this.settings.onedrive.clientID,p=this.settings.onedrive.authority,h=e.code,f=this.oauth2Info.verifier,m=e=>r(this,void 0,void 0,(function*(){new k.Notice(s("protocol_onedrive_connect_fail")),new k.Notice(`${e}`)})),r(void 0,void 0,void 0,(function*(){try{const e=yield(0,k.request)({url:`${p}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:new URLSearchParams({tenant:"consumers",client_id:u,scope:zx.join(" "),code:h,redirect_uri:Nx,grant_type:"authorization_code",code_verifier:f}).toString()}),t=JSON.parse(e);return t.error,t}catch(e){console.error(e),yield m(e)}})));if(void 0!==t.error)throw new k.Notice(`${JSON.stringify(t)}`),Error(`${JSON.stringify(t)}`);const g=this;l=this.settings.onedrive,d=t,c=()=>g.saveSettings(),r(void 0,void 0,void 0,(function*(){console.info("start updating local info of OneDrive token"),l.accessToken=d.access_token,l.accessTokenExpiresAtTime=Date.now()+d.expires_in-3e5,l.accessTokenExpiresInSeconds=d.expires_in,l.refreshToken=d.refresh_token,l.credentialsShouldBeDeletedAtTime=Date.now()+D,void 0!==c&&(yield c()),console.info("finish updating local info of Onedrive token")}));const y=Ej(this.settings,this.app.vault.getName(),(()=>g.saveSettings()));this.settings.onedrive.username=yield y.getUserDisplayName(),yield this.saveSettings(),this.oauth2Info.verifier="",null===(i=this.oauth2Info.helperModal)||void 0===i||i.close(),this.oauth2Info.helperModal=void 0,null===(n=this.oauth2Info.authDiv)||void 0===n||n.toggleClass("onedrive-auth-button-hide",""!==this.settings.onedrive.username),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_onedrive_connect_succ_revoke",{username:this.settings.onedrive.username})),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("onedrive-revoke-auth-button-hide",""===this.settings.onedrive.username),this.oauth2Info.revokeDiv=void 0}})))),this.registerObsidianProtocolHandler(Q,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l,d,c,u,p,h,f,m;if(void 0===e.code||void 0===(null===(t=this.oauth2Info)||void 0===t?void 0:t.verifier))throw new k.Notice(s("protocol_onedrivefull_connect_fail")),Error(s("protocol_onedrivefull_connect_unknown",{params:JSON.stringify(e)}));{if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_onedrivefull_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}const t=yield(u=this.settings.onedrivefull.clientID,p=this.settings.onedrivefull.authority,h=e.code,f=this.oauth2Info.verifier,m=e=>r(this,void 0,void 0,(function*(){new k.Notice(s("protocol_onedrivefull_connect_fail")),new k.Notice(`${e}`)})),r(void 0,void 0,void 0,(function*(){try{const e=yield(0,k.request)({url:`${p}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:new URLSearchParams({tenant:"consumers",client_id:u,scope:r_.join(" "),code:h,redirect_uri:i_,grant_type:"authorization_code",code_verifier:f}).toString()}),t=JSON.parse(e);return t.error,t}catch(e){console.error(e),yield m(e)}})));if(void 0!==t.error)throw new k.Notice(`${JSON.stringify(t)}`),Error(`${JSON.stringify(t)}`);const g=this;l=this.settings.onedrivefull,d=t,c=()=>g.saveSettings(),r(void 0,void 0,void 0,(function*(){console.info("start updating local info of OneDrive token"),l.accessToken=d.access_token,l.accessTokenExpiresAtTime=Date.now()+d.expires_in-3e5,l.accessTokenExpiresInSeconds=d.expires_in,l.refreshToken=d.refresh_token,l.credentialsShouldBeDeletedAtTime=Date.now()+D,void 0!==c&&(yield c()),console.info("finish updating local info of Onedrive token")}));const y=Ej(this.settings,this.app.vault.getName(),(()=>g.saveSettings()));this.settings.onedrivefull.username=yield y.getUserDisplayName(),yield this.saveSettings(),this.oauth2Info.verifier="",null===(i=this.oauth2Info.helperModal)||void 0===i||i.close(),this.oauth2Info.helperModal=void 0,null===(n=this.oauth2Info.authDiv)||void 0===n||n.toggleClass("onedrivefull-auth-button-hide",""!==this.settings.onedrivefull.username),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_onedrivefull_connect_succ_revoke",{username:this.settings.onedrivefull.username})),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("onedrivefull-revoke-auth-button-hide",""===this.settings.onedrivefull.username),this.oauth2Info.revokeDiv=void 0}})))),this.registerObsidianProtocolHandler(P,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l,d;if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_pro_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}console.debug(e);const c=yield le(this.oauth2Info.verifier||"verifier",e.code,(e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_pro_connect_fail")),new k.Notice(`${e}`),e}))));console.debug(c);const u=this;yield de(this.settings.pro,c,(()=>u.saveSettings())),yield ue(this.settings.pro,this.manifest.version,(()=>u.saveSettings())),yield pe(this.settings.pro,this.manifest.version,(()=>u.saveSettings())),this.oauth2Info.verifier="",null===(t=this.oauth2Info.helperModal)||void 0===t||t.close(),this.oauth2Info.helperModal=void 0,null===(i=this.oauth2Info.authDiv)||void 0===i||i.toggleClass("pro-auth-button-hide",""!==(null===(n=this.settings.pro)||void 0===n?void 0:n.refreshToken)),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_pro_connect_succ_revoke",{email:null===(a=this.settings.pro)||void 0===a?void 0:a.email})),this.oauth2Info.revokeAuthSetting=void 0,null===(l=this.oauth2Info.revokeDiv)||void 0===l||l.toggleClass("pro-revoke-auth-button-hide",""===(null===(d=this.settings.pro)||void 0===d?void 0:d.email)),this.oauth2Info.revokeDiv=void 0})))),this.registerObsidianProtocolHandler(q,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l;if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_box_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}console.debug(e);const d=yield(c=e.code,u=e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_box_connect_fail")),new k.Notice(`${e}`),e})),r(void 0,void 0,void 0,(function*(){try{const e={code:c,grant_type:"authorization_code",client_id:U,client_secret:L},t=yield fetch("https://api.box.com/oauth2/token",{method:"POST",body:new URLSearchParams(e)});return yield t.json()}catch(e){console.error(e),void 0!==u&&(yield u(e))}})));var c,u;console.debug(d);const p=this;yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){if(void 0===t.access_token||""===t.access_token)throw Error(`remotely save account auth failed, please auth again: ${JSON.stringify(t)}`);e.accessToken=t.access_token,e.accessTokenExpiresAtTimeMs=Date.now()+1e3*t.expires_in-3e5,e.accessTokenExpiresInMs=1e3*t.expires_in,e.refreshToken=t.refresh_token||e.refreshToken,e.credentialsShouldBeDeletedAtTimeMs=Date.now()+50976e5,yield null==i?void 0:i(),console.info("finish updating local info of Box token")})))(this.settings.box,d,(()=>p.saveSettings())),this.oauth2Info.verifier="",null===(t=this.oauth2Info.helperModal)||void 0===t||t.close(),this.oauth2Info.helperModal=void 0,null===(i=this.oauth2Info.authDiv)||void 0===i||i.toggleClass("box-auth-button-hide",""!==(null===(n=this.settings.box)||void 0===n?void 0:n.refreshToken)),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_box_connect_succ_revoke")),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("box-revoke-auth-button-hide",""===(null===(l=this.settings.box)||void 0===l?void 0:l.refreshToken)),this.oauth2Info.revokeDiv=void 0})))),this.registerObsidianProtocolHandler(j,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l;if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_pcloud_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}console.debug(e);const d=yield(c=e.hostname,u=e.code,p=e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_pcloud_connect_fail")),new k.Notice(`${e}`),e})),r(void 0,void 0,void 0,(function*(){const e=H,t=$;try{const r={code:u,client_id:e,client_secret:t},i=yield fetch(`https://${c}/oauth2_token`,{method:"POST",body:new URLSearchParams(r)}),n=yield i.json();if(0!==(null==n?void 0:n.result))throw Error("result is not 0 (success) in the end");if(!("access_token"in n))throw Error("no access_token in the end");return n}catch(e){console.error(e),void 0!==p&&(yield p(e))}})));var c,u,p;console.debug(d);const h=this;yield((e,t,i,n)=>r(void 0,void 0,void 0,(function*(){if(void 0===i)throw Error("remotely save account auth failed, please auth again: undefined result");e.accessToken=i.access_token,e.hostname=t.hostname,e.locationid=t.locationid,e.credentialsShouldBeDeletedAtTimeMs=Date.now()+D,yield null==n?void 0:n(),console.info("finish updating local info of pCloud token")})))(this.settings.pcloud,e,d,(()=>h.saveSettings())),this.oauth2Info.verifier="",null===(t=this.oauth2Info.helperModal)||void 0===t||t.close(),this.oauth2Info.helperModal=void 0,null===(i=this.oauth2Info.authDiv)||void 0===i||i.toggleClass("pcloud-auth-button-hide",""!==(null===(n=this.settings.pcloud)||void 0===n?void 0:n.accessToken)),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_pcloud_connect_succ_revoke")),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("pcloud-revoke-auth-button-hide",""===(null===(l=this.settings.pcloud)||void 0===l?void 0:l.accessToken)),this.oauth2Info.revokeDiv=void 0})))),this.registerObsidianProtocolHandler(G,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l;if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_yandexdisk_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}console.debug(e);const d=yield(c=e.code,u=e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_yandexdisk_connect_fail")),new k.Notice(`${e}`),e})),r(void 0,void 0,void 0,(function*(){try{const e={code:c,grant_type:"authorization_code",client_id:W,client_secret:K},t=yield fetch("https://oauth.yandex.com/token",{method:"POST",body:new URLSearchParams(e)});if(200!==t.status){const e=yield t.json();throw Error(JSON.stringify(e))}return yield t.json()}catch(e){console.error(e),void 0!==u&&(yield u(e))}})));var c,u;console.debug(d);const p=this;yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){if(void 0===t.access_token||""===t.access_token)throw Error(`remotely save account auth failed, please auth again: ${JSON.stringify(t)}`);e.accessToken=t.access_token,e.accessTokenExpiresAtTimeMs=Date.now()+1e3*t.expires_in-3e5,e.accessTokenExpiresInMs=1e3*t.expires_in,e.refreshToken=t.refresh_token||e.refreshToken,e.credentialsShouldBeDeletedAtTimeMs=Date.now()+50976e5,yield null==i?void 0:i(),console.info("finish updating local info of Yandex Disk token")})))(this.settings.yandexdisk,d,(()=>p.saveSettings())),this.oauth2Info.verifier="",null===(t=this.oauth2Info.helperModal)||void 0===t||t.close(),this.oauth2Info.helperModal=void 0,null===(i=this.oauth2Info.authDiv)||void 0===i||i.toggleClass("yandexdisk-auth-button-hide",""!==(null===(n=this.settings.yandexdisk)||void 0===n?void 0:n.refreshToken)),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_yandexdisk_connect_succ_revoke")),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("yandexdisk-revoke-auth-button-hide",""===(null===(l=this.settings.yandexdisk)||void 0===l?void 0:l.refreshToken)),this.oauth2Info.revokeDiv=void 0})))),this.registerObsidianProtocolHandler(V,(e=>r(this,void 0,void 0,(function*(){var t,i,n,o,a,l;if(void 0!==this.oauth2Info.helperModal){const e=this.oauth2Info.helperModal.contentEl;e.empty(),s("protocol_koofr_connecting").split("\n").forEach((t=>{e.createEl("p",{text:t})}))}console.debug(e);const d=yield(c=this.settings.koofr.api,u=e.code,p=e=>r(this,void 0,void 0,(function*(){throw new k.Notice(s("protocol_koofr_connect_fail")),new k.Notice(`${e}`),e})),h=!0,r(void 0,void 0,void 0,(function*(){let e="urn:ietf:wg:oauth:2.0:oob";h&&(e=`obsidian://${V}`);try{const t={code:u,grant_type:"authorization_code",client_id:J,client_secret:Y,redirect_uri:e},r=yield fetch(`${c}/oauth2/token`,{method:"POST",body:new URLSearchParams(t)});if(200!==r.status){const e=yield r.json();throw Error(JSON.stringify(e))}return yield r.json()}catch(e){console.error(e),void 0!==p&&(yield p(e))}})));var c,u,p,h;console.debug(d);const f=this;yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){if(void 0===t.access_token||""===t.access_token)throw Error(`remotely save account auth failed, please auth again: ${JSON.stringify(t)}`);e.accessToken=t.access_token,e.accessTokenExpiresAtTimeMs=Date.now()+1e3*t.expires_in-3e5,e.accessTokenExpiresInMs=1e3*t.expires_in,e.refreshToken=t.refresh_token||e.refreshToken,e.scope=t.scope||e.scope,e.credentialsShouldBeDeletedAtTimeMs=Date.now()+50976e5,yield null==i?void 0:i(),console.info("finish updating local info of Koofr token")})))(this.settings.koofr,d,(()=>f.saveSettings())),this.oauth2Info.verifier="",null===(t=this.oauth2Info.helperModal)||void 0===t||t.close(),this.oauth2Info.helperModal=void 0,null===(i=this.oauth2Info.authDiv)||void 0===i||i.toggleClass("koofr-auth-button-hide",""!==(null===(n=this.settings.koofr)||void 0===n?void 0:n.refreshToken)),this.oauth2Info.authDiv=void 0,null===(o=this.oauth2Info.revokeAuthSetting)||void 0===o||o.setDesc(s("protocol_koofr_connect_succ_revoke")),this.oauth2Info.revokeAuthSetting=void 0,null===(a=this.oauth2Info.revokeDiv)||void 0===a||a.toggleClass("koofr-revoke-auth-button-hide",""===(null===(l=this.settings.koofr)||void 0===l?void 0:l.refreshToken)),this.oauth2Info.revokeDiv=void 0})))),this.syncRibbon=this.addRibbonIcon(NH,`${this.manifest.name}`,(()=>r(this,void 0,void 0,(function*(){return this.syncRun("manual")})))),this.enableMobileStatusBarIfSet(),(!k.Platform.isMobile||k.Platform.isMobile&&this.settings.enableMobileStatusBar)&&!0===this.settings.enableStatusBarInfo){const e=this.addStatusBarItem();this.statusBarElement=e.createEl("span"),this.statusBarElement.setAttribute("data-tooltip-position","top"),this.isSyncing||this.updateLastSyncMsg(void 0,"not_syncing",yield O_(this.db,this.vaultRandomID),yield N_(this.db,this.vaultRandomID)),this.registerInterval(window.setInterval((()=>r(this,void 0,void 0,(function*(){this.isSyncing||this.updateLastSyncMsg(void 0,"not_syncing",yield O_(this.db,this.vaultRandomID),yield N_(this.db,this.vaultRandomID))}))),3e4))}if(this.addCommand({id:"start-sync",name:s("command_startsync"),icon:NH,callback:()=>r(this,void 0,void 0,(function*(){this.syncRun("manual")}))}),this.addCommand({id:"start-sync-dry-run",name:s("command_drynrun"),icon:NH,callback:()=>r(this,void 0,void 0,(function*(){this.syncRun("dry")}))}),this.addCommand({id:"export-sync-plans-1-only-change",name:s("command_exportsyncplans_1_only_change"),icon:UH,callback:()=>r(this,void 0,void 0,(function*(){yield ux(this.db,this.app.vault,this.vaultRandomID,1,!0),new k.Notice(s("settings_syncplans_notice"))}))}),this.addCommand({id:"export-sync-plans-1",name:s("command_exportsyncplans_1"),icon:UH,callback:()=>r(this,void 0,void 0,(function*(){yield ux(this.db,this.app.vault,this.vaultRandomID,1,!1),new k.Notice(s("settings_syncplans_notice"))}))}),this.addCommand({id:"export-sync-plans-5",name:s("command_exportsyncplans_5"),icon:UH,callback:()=>r(this,void 0,void 0,(function*(){yield ux(this.db,this.app.vault,this.vaultRandomID,5,!1),new k.Notice(s("settings_syncplans_notice"))}))}),this.addCommand({id:"export-sync-plans-all",name:s("command_exportsyncplans_all"),icon:UH,callback:()=>r(this,void 0,void 0,(function*(){yield ux(this.db,this.app.vault,this.vaultRandomID,-1,!1),new k.Notice(s("settings_syncplans_notice"))}))}),this.addSettingTab(new PH(this.app,this)),this.enableCheckingFileStat(),this.settings.agreeToUseSyncV3)this.enableAutoSyncIfSet(),this.enableInitSyncIfSet(),this.toggleSyncOnSaveIfSet();else{new OH(this.app,this).open()}const{oldVersion:d}=yield(c=this.db,u=this.vaultRandomID,p=this.manifest.version,r(void 0,void 0,void 0,(function*(){let e=yield c.simpleKVForMiscTbl.getItem(`${u}-pluginversion`);return null===e&&(e="0.0.0"),yield c.simpleKVForMiscTbl.setItem(`${u}-pluginversion`,p),{oldVersion:e,newVersion:p}})));var c,u,p}))}onunload(){return r(this,void 0,void 0,(function*(){console.info(`unloading plugin ${this.manifest.id}`),this.syncRibbon=void 0,void 0!==this.appContainerObserver&&(this.appContainerObserver.disconnect(),this.appContainerObserver=void 0),void 0!==this.oauth2Info&&(this.oauth2Info.helperModal=void 0,this.oauth2Info={verifier:"",helperModal:void 0,authDiv:void 0,revokeDiv:void 0,revokeAuthSetting:void 0})}))}loadSettings(){return r(this,void 0,void 0,(function*(){this.settings=Object.assign({},m()(zH),dx(yield this.loadData())),void 0===this.settings.syncBookmarks&&(this.settings.syncBookmarks=!1),""===this.settings.dropbox.clientID&&(this.settings.dropbox.clientID=zH.dropbox.clientID),void 0===this.settings.dropbox.remoteBaseDir&&(this.settings.dropbox.remoteBaseDir=""),""===this.settings.onedrive.clientID&&(this.settings.onedrive.clientID=zH.onedrive.clientID),""===this.settings.onedrive.authority&&(this.settings.onedrive.authority=zH.onedrive.authority),void 0===this.settings.onedrive.remoteBaseDir&&(this.settings.onedrive.remoteBaseDir=""),void 0===this.settings.onedrive.emptyFile&&(this.settings.onedrive.emptyFile="skip"),void 0===this.settings.onedrive.kind&&(this.settings.onedrive.kind="onedrive"),void 0===this.settings.onedrivefull&&(this.settings.onedrivefull=n_),void 0===this.settings.webdav.manualRecursive&&(this.settings.webdav.manualRecursive=!0),void 0!==this.settings.webdav.depth&&"auto"!==this.settings.webdav.depth&&"auto_1"!==this.settings.webdav.depth&&"auto_infinity"!==this.settings.webdav.depth&&"auto_unknown"!==this.settings.webdav.depth||(this.settings.webdav.depth="manual_1",this.settings.webdav.manualRecursive=!0),void 0===this.settings.webdav.remoteBaseDir&&(this.settings.webdav.remoteBaseDir=""),void 0===this.settings.webdav.customHeaders&&(this.settings.webdav.customHeaders=""),void 0===this.settings.s3.partsConcurrency&&(this.settings.s3.partsConcurrency=20),void 0===this.settings.s3.forcePathStyle&&(this.settings.s3.forcePathStyle=!1),void 0===this.settings.s3.remotePrefix&&(this.settings.s3.remotePrefix=""),void 0===this.settings.s3.useAccurateMTime&&(this.settings.s3.useAccurateMTime=!1),void 0===this.settings.s3.generateFolderObject&&(this.settings.s3.generateFolderObject=!1),void 0===this.settings.ignorePaths&&(this.settings.ignorePaths=[]),void 0===this.settings.onlyAllowPaths&&(this.settings.onlyAllowPaths=[]),void 0===this.settings.enableStatusBarInfo&&(this.settings.enableStatusBarInfo=!0),void 0===this.settings.syncOnSaveAfterMilliseconds&&(this.settings.syncOnSaveAfterMilliseconds=-1),void 0===this.settings.deleteToWhere&&(this.settings.deleteToWhere="system"),this.settings.logToDB=!1,(0,k.requireApiVersion)(e_)&&(this.settings.s3.bypassCorsLocally=!0),void 0===this.settings.agreeToUseSyncV3&&(this.settings.agreeToUseSyncV3=!1),void 0===this.settings.conflictAction&&(this.settings.conflictAction="keep_newer"),void 0===this.settings.howToCleanEmptyFolder&&(this.settings.howToCleanEmptyFolder="clean_both"),void 0===this.settings.protectModifyPercentage&&(this.settings.protectModifyPercentage=50),void 0===this.settings.syncDirection&&(this.settings.syncDirection="bidirectional"),void 0===this.settings.obfuscateSettingFile&&(this.settings.obfuscateSettingFile=!0),void 0===this.settings.enableMobileStatusBar&&(this.settings.enableMobileStatusBar=!1),void 0!==this.settings.encryptionMethod&&"unknown"!==this.settings.encryptionMethod||(void 0===this.settings.password||""===this.settings.password?this.settings.encryptionMethod="rclone-base64":this.settings.encryptionMethod="openssl-base64"),void 0===this.settings.profiler&&(this.settings.profiler=iH),void 0===this.settings.profiler.enable&&(this.settings.profiler.enable=!1),void 0===this.settings.profiler.enablePrinting&&(this.settings.profiler.enablePrinting=!1),void 0===this.settings.profiler.recordSize&&(this.settings.profiler.recordSize=!1),void 0===this.settings.googledrive&&(this.settings.googledrive=Sh),void 0===this.settings.box&&(this.settings.box=bh),void 0===this.settings.pcloud&&(this.settings.pcloud=p_),void 0===this.settings.yandexdisk&&(this.settings.yandexdisk=y_),void 0===this.settings.koofr&&(this.settings.koofr=Nh),void 0===this.settings.azureblobstorage&&(this.settings.azureblobstorage=nh),yield this.saveSettings()}))}saveSettings(){return r(this,void 0,void 0,(function*(){this.settings.obfuscateSettingFile?yield this.saveData((e=>null==e?(console.debug("the normal config is null or undefined, skip"),e):{readme:"The file contains sensitive info, so DO NOT take screenshot of, copy, or share it to anyone! It's also generated automatically, so do not edit it manually.",d:Wp(ne(lx.from(JSON.stringify(e),"utf-8"),{pad:!1}))})(this.settings)):yield this.saveData(this.settings)}))}getCurrProfileID(){if(void 0!==this.settings.serviceType)return`${this.settings.serviceType}-default-1`;throw Error("unknown serviceType in the setting!")}checkIfOauthExpires(){return r(this,void 0,void 0,(function*(){let e=!1;const t=Date.now();""!==this.settings.dropbox.refreshToken&&void 0===this.settings.dropbox.credentialsShouldBeDeletedAtTime&&(this.settings.dropbox.credentialsShouldBeDeletedAtTime=t+2592e6,e=!0),""!==this.settings.onedrive.refreshToken&&void 0===this.settings.onedrive.credentialsShouldBeDeletedAtTime&&(this.settings.onedrive.credentialsShouldBeDeletedAtTime=t+2592e6,e=!0);let r=!1;""!==this.settings.dropbox.refreshToken&&t>=this.settings.dropbox.credentialsShouldBeDeletedAtTime&&(console.warn("dropbox expired"),r=!0,this.settings.dropbox=m()(gx),e=!0);let i=!1;""!==this.settings.onedrive.refreshToken&&t>=this.settings.onedrive.credentialsShouldBeDeletedAtTime&&(console.warn("onedrive expired"),i=!0,this.settings.onedrive=m()(qx),e=!0);let n=!1;""!==this.settings.onedrivefull.refreshToken&&t>=this.settings.onedrivefull.credentialsShouldBeDeletedAtTime&&(console.warn("onedrive full expired"),n=!0,this.settings.onedrivefull=m()(n_),e=!0);let o=!1;""!==this.settings.googledrive.refreshToken&&t>=this.settings.googledrive.credentialsShouldBeDeletedAtTimeMs&&(console.warn("google drive expired"),o=!0,this.settings.googledrive=m()(Sh),e=!0);let s=!1;""!==this.settings.box.refreshToken&&t>=this.settings.box.credentialsShouldBeDeletedAtTimeMs&&(console.warn("box expired"),s=!0,this.settings.box=m()(bh),e=!0);let a=!1;""!==this.settings.pcloud.accessToken&&t>=this.settings.pcloud.credentialsShouldBeDeletedAtTimeMs&&(console.warn("pcloud expired"),a=!0,this.settings.pcloud=m()(p_),e=!0);let l=!1;""!==this.settings.yandexdisk.refreshToken&&t>=this.settings.yandexdisk.credentialsShouldBeDeletedAtTimeMs&&(console.warn("yandex disk expired"),l=!0,this.settings.yandexdisk=m()(y_),e=!0);let d=!1;""!==this.settings.koofr.refreshToken&&t>=this.settings.koofr.credentialsShouldBeDeletedAtTimeMs&&(console.warn("koofr expired"),d=!0,this.settings.koofr=m()(Nh),e=!0),void 0===this.settings.pro&&(this.settings.pro=m()(se)),e&&(yield this.saveSettings()),r&&new k.Notice(`${this.manifest.name}: You haven't manually auth Dropbox for many days, you need to re-auth it again.`,6e3),i&&new k.Notice(`${this.manifest.name}: You haven't manually auth OneDrive (App Folder) for many days, you need to re-auth it again.`,6e3),n&&new k.Notice(`${this.manifest.name}: You haven't manually auth OneDrive (Full) for many days, you need to re-auth it again.`,6e3),o&&new k.Notice(`${this.manifest.name}: You haven't manually auth Google Drive for many days, you need to re-auth it again.`,6e3),s&&new k.Notice(`${this.manifest.name}: You haven't manually auth Box for many days, you need to re-auth it again.`,6e3),a&&new k.Notice(`${this.manifest.name}: You haven't manually auth pCloud for many days, you need to re-auth it again.`,6e3),l&&new k.Notice(`${this.manifest.name}: You haven't manually auth Yandex Disk for many days, you need to re-auth it again.`,6e3),d&&new k.Notice(`${this.manifest.name}: You haven't manually auth koofr for many days, you need to re-auth it again.`,6e3)}))}getVaultRandomIDFromOldConfigFile(){return r(this,void 0,void 0,(function*(){let e="";return void 0!==this.settings.vaultRandomID&&(""!==this.settings.vaultRandomID&&(e=this.settings.vaultRandomID),console.debug("vaultRandomID is no longer saved in data.json"),delete this.settings.vaultRandomID,yield this.saveSettings()),e}))}trash(e){return r(this,void 0,void 0,(function*(){"obsidian"===this.settings.deleteToWhere?yield this.app.vault.adapter.trashLocal(e):(yield this.app.vault.adapter.trashSystem(e))||(yield this.app.vault.adapter.trashLocal(e))}))}getVaultBasePath(){return this.app.vault.adapter instanceof k.FileSystemAdapter?this.app.vault.adapter.getBasePath().split("?")[0]:this.app.vault.adapter.getResourcePath("").split("?")[0]}prepareDBAndVaultRandomID(e,t,i){return r(this,void 0,void 0,(function*(){const{db:n,vaultRandomID:o}=yield((e,t,i)=>r(void 0,void 0,void 0,(function*(){var r;const n={versionTbl:E_().createInstance({name:I_,storeName:"schemaversion"}),syncPlansTbl:E_().createInstance({name:I_,storeName:"syncplanshistory"}),vaultRandomIDMappingTbl:E_().createInstance({name:I_,storeName:"vaultrandomidmapping"}),loggerOutputTbl:E_().createInstance({name:I_,storeName:"loggeroutput"}),simpleKVForMiscTbl:E_().createInstance({name:I_,storeName:"simplekvformisc"}),prevSyncRecordsTbl:E_().createInstance({name:I_,storeName:"prevsyncrecords"}),profilerResultsTbl:E_().createInstance({name:I_,storeName:"profilerresults"}),fileHistoryTbl:E_().createInstance({name:I_,storeName:"filefolderoperationhistory"}),syncMappingTbl:E_().createInstance({name:I_,storeName:"syncmetadatahistory"}),fileContentHistoryTbl:E_().createInstance({name:I_,storeName:"filecontenthistory"})};let o="";const s=yield n.vaultRandomIDMappingTbl.getItem(`path2id\t${e}`);if(null===s?(o=""!==t?t:E(),yield n.vaultRandomIDMappingTbl.setItem(`path2id\t${e}`,o),yield n.vaultRandomIDMappingTbl.setItem(`id2path\t${o}`,e)):o=s,""===o)throw Error("no vaultRandomID found or generated");const a=null!==(r=yield n.versionTbl.getItem(`${o}\tversion`))&&void 0!==r?r:yield n.versionTbl.getItem("version");return null===a?(console.debug("no internal db version, setting it to 20240220"),yield n.versionTbl.setItem(`${o}\tversion`,C_)):a===C_||(console.debug(`trying to upgrade db version from ${a} to 20240220`),yield A_(n,a,C_,o,i)),console.info("db connected"),{db:n,vaultRandomID:o}})))(e,t,i);this.db=n,this.vaultRandomID=o}))}enableAutoSyncIfSet(){void 0!==this.settings.autoRunEveryMilliseconds&&null!==this.settings.autoRunEveryMilliseconds&&this.settings.autoRunEveryMilliseconds>0&&this.app.workspace.onLayoutReady((()=>{const e=window.setInterval((()=>{this.syncRun("auto")}),this.settings.autoRunEveryMilliseconds);this.autoRunIntervalID=e,this.registerInterval(e)}))}enableInitSyncIfSet(){void 0!==this.settings.initRunAfterMilliseconds&&null!==this.settings.initRunAfterMilliseconds&&this.settings.initRunAfterMilliseconds>0&&this.app.workspace.onLayoutReady((()=>{window.setTimeout((()=>{this.syncRun("auto_once_init")}),this.settings.initRunAfterMilliseconds)}))}_checkCurrFileModified(e){return r(this,void 0,void 0,(function*(){console.debug("inside checkCurrFileModified");const t=this.app.workspace.getActiveFile();if(t){console.debug(`we have currentFile=${t.path}`);const r=t.stat.mtime,i=yield O_(this.db,this.vaultRandomID);if(console.debug(`lastModified=${r}, lastSuccessSyncMillis=${i}`),"SYNC"===e||"FILE_CHANGES"===e&&r>(null!=i?i:1))return console.debug("so lastModified > lastSuccessSyncMillis or it's called while syncing before"),console.debug(`caller=${e}, isSyncing=${this.isSyncing}, hasPendingSyncOnSave=${this.hasPendingSyncOnSave}`),this.isSyncing?void(this.hasPendingSyncOnSave=!0):void((this.hasPendingSyncOnSave||"FILE_CHANGES"===e)&&(this.hasPendingSyncOnSave=!1,yield this.syncRun("auto_sync_on_save")))}else console.debug("no currentFile here")}))}toggleSyncOnSaveIfSet(){var e;void 0!==this.settings.syncOnSaveAfterMilliseconds&&null!==this.settings.syncOnSaveAfterMilliseconds&&this.settings.syncOnSaveAfterMilliseconds>0?this.app.workspace.onLayoutReady((()=>{var e;this.registerEvent(null===(e=this.syncEvent)||void 0===e?void 0:e.on("SYNC_DONE",this._syncOnSaveEvent1)),this.registerEvent(this.app.vault.on("modify",this._syncOnSaveEvent2)),this.registerEvent(this.app.vault.on("create",this._syncOnSaveEvent2)),this.registerEvent(this.app.vault.on("delete",this._syncOnSaveEvent2)),this.registerEvent(this.app.vault.on("rename",this._syncOnSaveEvent2))})):(null===(e=this.syncEvent)||void 0===e||e.off("SYNC_DONE",this._syncOnSaveEvent1),this.app.vault.off("modify",this._syncOnSaveEvent2),this.app.vault.off("create",this._syncOnSaveEvent2),this.app.vault.off("delete",this._syncOnSaveEvent2),this.app.vault.off("rename",this._syncOnSaveEvent2))}enableMobileStatusBarIfSet(){this.app.workspace.onLayoutReady((()=>{k.Platform.isMobile&&this.settings.enableMobileStatusBar&&(this.appContainerObserver=Xp("enable"))}))}enableCheckingFileStat(){this.app.workspace.onLayoutReady((()=>{const e=(e,t)=>this.i18n.t(e,t);this.registerEvent(this.app.workspace.on("file-menu",((t,i)=>{i instanceof k.TFolder||t.addItem((t=>{t.setTitle(e("menu_check_file_stat")).setIcon("file-cog").onClick((()=>r(this,void 0,void 0,(function*(){var e,t,r;const n=i.path,o=new Cj(this.app.vault,null!==(e=this.settings.syncConfigDir)&&void 0!==e&&e,null!==(t=this.settings.syncBookmarks)&&void 0!==t&&t,this.app.vault.configDir,this.manifest.id,void 0,null!==(r=this.settings.deleteToWhere)&&void 0!==r?r:"system"),s=yield o.stat(n);new k.Notice(JSON.stringify(s,null,2),1e4)}))))}))})))}))}saveAgreeToUseNewSyncAlgorithm(){return r(this,void 0,void 0,(function*(){this.settings.agreeToUseSyncV3=!0,yield this.saveSettings()}))}setCurrSyncMsg(e,t,r,i,n,o,s){const a=`${i}`.length,l=`${r}`.padStart(a,"0"),d=LH(e,t),c=d+`Syncing ${l}/${i}`,u=d+`Syncing progress=${l}/${i},decision=${o},path=${n},source=${s}`;this.currSyncMsg=u,void 0!==this.statusBarElement&&(this.statusBarElement.setText(c),this.statusBarElement.setAttribute("aria-label",u))}updateLastSyncMsg(e,t,r,i){if(void 0===this.statusBarElement)return;const n=(e,t)=>this.i18n.t(e,t);let o=n("statusbar_lastsync_never"),s=n("statusbar_lastsync_never_label");const a=Math.max(null!=r?r:-999,null!=i?i:-999),l=(null!=r?r:-999)>=(null!=i?i:-999);if("syncing"===t)o=LH(n,e)+n("statusbar_syncing");else if(a>0){let e="";e=n(l?"statusbar_sync_status_prefix_success":"statusbar_sync_status_prefix_failed");const t=Date.now()-a,r=Math.floor(t/31556952e3),i=Math.floor(t/2629746e3),d=Math.floor(t/6048e5),c=Math.floor(t/864e5),u=Math.floor(t/36e5),p=Math.floor(t/6e4),h=Math.floor(t/1e3);let f="";f=r>0?n("statusbar_time_years",{time:r}):i>0?n("statusbar_time_months",{time:i}):d>0?n("statusbar_time_weeks",{time:d}):c>0?n("statusbar_time_days",{time:c}):u>0?n("statusbar_time_hours",{time:u}):p>0?n("statusbar_time_minutes",{time:p}):n(h>30?"statusbar_time_lessminute":"statusbar_time_now");o=e+f,s=e+n("statusbar_lastsync_label",{date:new Date(a).toLocaleTimeString(navigator.language,{weekday:"long",year:"numeric",month:"long",day:"numeric"})})}this.statusBarElement.setText(o),this.statusBarElement.setAttribute("aria-label",s)}tryToAddIgnoreFile(){return r(this,void 0,void 0,(function*(){const e=this.manifest.dir||`${this.app.vault.configDir}/plugins/${this.manifest.dir}`;if(!(yield this.app.vault.adapter.exists(e)))return;const t=`${e}/.gitignore`,r=yield this.app.vault.adapter.exists(t);try{r||this.app.vault.adapter.write(t,"data.json\n")}catch(e){}}))}enableAutoClearOutputToDBHistIfSet(){this.app.workspace.onLayoutReady((()=>{window.setTimeout((()=>{var e;e=this.db,r(void 0,void 0,void 0,(function*(){yield e.loggerOutputTbl.clear(),console.debug("successfully clearAllLoggerOutputRecords")}))}),3e4)}))}enableAutoClearSyncPlanHist(){this.app.workspace.onLayoutReady((()=>{window.setTimeout((()=>{M_(this.db)}),45e3);const e=window.setInterval((()=>{M_(this.db)}),3e5);this.registerInterval(e)}))}}})();var __webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})();
|
||
/* nosourcemap */ |