diff --git "a/_next/static/chunks/842.3f8418770ac3440a.js" "b/_next/static/chunks/842.3f8418770ac3440a.js" new file mode 100644--- /dev/null +++ "b/_next/static/chunks/842.3f8418770ac3440a.js" @@ -0,0 +1,16 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[842],{7470:function(e,t,r){"use strict";r.d(t,{H:function(){return c}});var n=r(1386),o=r(2166),i=r(2202),a=r(5986),s=r(2265),l=r(2281),u=r(357);function c(e,t={defaultThemeColor:u.env.DEFAULT_ICON_THEME_COLOR||"$color",defaultStrokeWidth:2,fallbackColor:"#000"}){return r=>{let[s,u,c]=(0,n.Lb)(r,{...t,forComponent:o.xv,resolveValues:"web"}),d=u.color??t.defaultThemeColor,f=(0,i.E0)((d?c[d]:void 0)||u.color||(s.disableTheme?null:c.color)||t.fallbackColor),h="string"==typeof s.size?(0,a.Wi)(s.size,"size"):s.size,p="string"==typeof s.strokeWidth?(0,a.Wi)(s.strokeWidth,"size"):s.strokeWidth??`${t.defaultStrokeWidth}`;return(0,l.jsx)(e,{...s,color:f,size:h,strokeWidth:p,style:u})}}s.keep},1957:function(e,t,r){"use strict";r.d(t,{J:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsx)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:(0,a.jsx)(o.y$,{d:"M20 6 9 17l-5-5",stroke:t})})};s.displayName="Check";let l=(0,n.memo)((0,i.H)(s))},1569:function(e,t,r){"use strict";r.d(t,{_:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsx)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:(0,a.jsx)(o.y$,{d:"m6 9 6 6 6-6",stroke:t})})};s.displayName="ChevronDown";let l=(0,n.memo)((0,i.H)(s))},1378:function(e,t,r){"use strict";r.d(t,{K:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsx)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:(0,a.jsx)(o.y$,{d:"m18 15-6-6-6 6",stroke:t})})};s.displayName="ChevronUp";let l=(0,n.memo)((0,i.H)(s))},6855:function(e,t,r){"use strict";r.d(t,{u:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsxs)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:[(0,a.jsx)(o.UL,{width:"20",height:"14",x:"2",y:"3",rx:"2",stroke:t}),(0,a.jsx)(o.x1,{x1:"8",x2:"16",y1:"21",y2:"21",stroke:t}),(0,a.jsx)(o.x1,{x1:"12",x2:"12",y1:"17",y2:"21",stroke:t})]})};s.displayName="Monitor";let l=(0,n.memo)((0,i.H)(s))},2890:function(e,t,r){"use strict";r.d(t,{J:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsx)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:(0,a.jsx)(o.y$,{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",stroke:t})})};s.displayName="Moon";let l=(0,n.memo)((0,i.H)(s))},896:function(e,t,r){"use strict";r.d(t,{k:function(){return l}});var n=r(2265),o=r(2989),i=r(7470),a=r(2281);let s=e=>{let{color:t="black",size:r=24,...n}=e;return(0,a.jsxs)(o.ny,{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...n,children:[(0,a.jsx)(o.Cd,{cx:"12",cy:"12",r:"4",stroke:t}),(0,a.jsx)(o.y$,{d:"M12 2v2",stroke:t}),(0,a.jsx)(o.y$,{d:"M12 20v2",stroke:t}),(0,a.jsx)(o.y$,{d:"m4.93 4.93 1.41 1.41",stroke:t}),(0,a.jsx)(o.y$,{d:"m17.66 17.66 1.41 1.41",stroke:t}),(0,a.jsx)(o.y$,{d:"M2 12h2",stroke:t}),(0,a.jsx)(o.y$,{d:"M20 12h2",stroke:t}),(0,a.jsx)(o.y$,{d:"m6.34 17.66-1.41 1.41",stroke:t}),(0,a.jsx)(o.y$,{d:"m19.07 4.93-1.41 1.41",stroke:t})]})};s.displayName="Sun";let l=(0,n.memo)((0,i.H)(s))},8738:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=l(e),a=i[0],s=i[1],u=new o((a+s)*3/4-s),c=0,d=s>0?a-4:a;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9109:function(e,t,r){"use strict";/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var n=r(8738),o=r(6868),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=a(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(T(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(T(e,ArrayBuffer)||e&&T(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(T(e,SharedArrayBuffer)||e&&T(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var o=function(e){if(s.isBuffer(e)){var t,r=0|h(e.length),n=a(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),r=a(t),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||T(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return C(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(e).length;default:if(o)return n?-1:C(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,r){var o,i,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(i=r=+r)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return -1;r=e.length-1}else if(r<0){if(!o)return -1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){var i,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=r;is&&(r=s-l),i=r;i>=0;i--){for(var d=!0,f=0;f239?4:u>223?3:u>191?2:1;if(o+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:(192&(i=e[o+1]))==128&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:i=e[o+1],a=e[o+2],(192&i)==128&&(192&a)==128&&(l=(15&u)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],(192&i)==128&&(192&a)==128&&(192&s)==128&&(l=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,o,i){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function _(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,i){return t=+t,r>>>=0,i||_(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function E(e,t,r,n,i){return t=+t,r>>>=0,i||_(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}t.lW=s,t.h2=50,s.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}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(T(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),T(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);on.length?s.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else if(s.isBuffer(i))i.copy(n,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,o){if(T(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw 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===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,a=r-t,l=Math.min(i,a),u=this.slice(n,o),c=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,a,s,l,u,c,d,f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var h=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var a=0;a>8,o.push(r%256),o.push(n);return o}(e,this.length-c),this,c,d);default:if(h)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),h=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;x(this,e,t,r,o,0)}var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;x(this,e,t,r,o,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(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},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(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},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(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},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(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},s.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!o){if(r>56319||a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function R(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A(e,t,r,n){for(var o=0;o=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function T(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var O=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},3085:function(e,t,r){"use strict";function n(e){return(n="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)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2?o-2:0),a=2;a */t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<>1,c=-7,d=r?o-1:0,f=r?-1:1,h=e[t+d];for(d+=f,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=f,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=u}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,l,u=8*i-o-1,c=(1<>1,f=23===o?5960464477539062e-23:0,h=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=p,s/=256,o-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*m}},2933:function(e,t,r){"use strict";t.Z=function(e){var t=e.prefixMap,r=e.plugins;return function e(s){for(var l in s){var u=s[l];if((0,a.default)(u))s[l]=e(u);else if(Array.isArray(u)){for(var c=[],d=0,f=u.length;d0&&(s[l]=c)}else{var p=(0,o.default)(r,l,u,s,t);p&&(s[l]=p),s=(0,n.default)(t,l,s)}}return s}};var n=s(r(9886)),o=s(r(6054)),i=s(r(2065)),a=s(r(22));function s(e){return e&&e.__esModule?e:{default:e}}},1677:function(e,t){"use strict";t.Z=function(){return null}},9699:function(e,t,r){"use strict";t.Z=function(e,t){if("string"==typeof t&&!(0,n.isPrefixedValue)(t)&&-1!==t.indexOf("cross-fade("))return i.map(function(e){return t.replace(o,e+"cross-fade(")})};var n=r(3085),o=/cross-fade\(/g,i=["-webkit-",""]},5019:function(e,t){"use strict";t.Z=function(e,t){if("cursor"===e&&n.hasOwnProperty(t))return r.map(function(e){return e+t})};var r=["-webkit-","-moz-",""],n={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0}},8527:function(e,t,r){"use strict";t.Z=function(e,t){if("string"==typeof t&&!(0,n.isPrefixedValue)(t)&&-1!==t.indexOf("filter("))return i.map(function(e){return t.replace(o,e+"filter(")})};var n=r(3085),o=/filter\(/g,i=["-webkit-",""]},9779:function(e,t,r){"use strict";t.Z=function(e,t){if("string"==typeof t&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1)return i.map(function(e){return t.replace(/image-set\(/g,e+"image-set(")})};var n,o=(n=r(2702))&&n.__esModule?n:{default:n},i=["-webkit-",""]},2316:function(e,t){"use strict";t.Z=function(e,t,n){if(Object.prototype.hasOwnProperty.call(r,e))for(var o=r[e],i=0,a=o.length;i-1&&"order"!==d)for(var f=t[c],h=0,p=f.length;h-1)return c;var d=u.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return!/-webkit-|-ms-/.test(e)}).join(",");return e.indexOf("Moz")>-1?d:(r["Webkit"+(0,i.default)(e)]=c,r["Moz"+(0,i.default)(e)]=d,u)}};var n=a(r(1442)),o=a(r(2702)),i=a(r(8937));function a(e){return e&&e.__esModule?e:{default:e}}var s={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},l={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"}},2065:function(e,t){"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Array.isArray(t))for(var n=0,o=t.length;n256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):c.pathname),"about:"===b.protocol&&"blank"===b.pathname&&(b.protocol="",b.pathname=""),w&&"/"!==e[0]&&(b.pathname=b.pathname.substr(1)),u&&!f.test(u)&&"/"!==e.slice(-1)&&"/"===b.pathname&&(b.pathname=""),b.path=b.pathname+b.search,b.auth=[c.username,c.password].map(decodeURIComponent).filter(Boolean).join(":"),b.port=c.port,v&&!b.host.endsWith(v)&&(b.host+=v,b.port=v.slice(1)),b.href=x?""+b.pathname+b.search+b.hash:n(b);var S=/^(file)/.test(b.href)?["host","hostname"]:[];return Object.keys(b).forEach(function(e){~S.indexOf(e)||(b[e]=b[e]||null)}),b}i.parse=y,i.format=n,i.resolve=c,i.resolveObject=function(e,t){return y(c(e,t))},i.Url=d}(),e.exports=i}()},6405:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,r,n,o){r=r||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(r);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var u=0;u=0?(c=p.substr(0,m),d=p.substr(m+1)):(c=p,d=""),f=decodeURIComponent(c),h=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(i,f))?t(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,i,a,s){return(i=i||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(o(e),function(o){var s=encodeURIComponent(t(o))+a;return r(e[o])?n(e[o],function(e){return s+encodeURIComponent(t(e))}).join(i):s+encodeURIComponent(t(e[o]))}).join(i):s?encodeURIComponent(t(s))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n{if(t&&"function"==typeof t.init&&"function"==typeof t.createSessionHandler){let i=n[e];if(void 0===i)n[e]={backend:t,priority:r};else if(i.priority>r)return;else if(i.priority===r&&i.backend!==t)throw Error(`cannot register backend "${e}" using priority ${r}`);if(r>=0){let t=o.indexOf(e);-1!==t&&o.splice(t,1);for(let t=0;t{let t=0===e.length?o:e,r=[];for(let e of t){let t=n[e];if(t){if(t.initialized)return t.backend;if(t.aborted)continue;let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init()),await t.initPromise,t.initialized=!0,t.backend}catch(o){n||r.push({name:e,err:o}),t.aborted=!0}finally{delete t.initPromise}}}throw Error(`no available backend found. ERR: ${r.map(e=>`[${e.name}] ${e.err}`).join(", ")}`)};class s{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(e){if(void 0!==e){if("string"!=typeof e||-1===["verbose","info","warning","error","fatal"].indexOf(e))throw Error(`Unsupported logging level: ${e}`);this.logLevelInternal=e}}get logLevel(){return this.logLevelInternal}}let l=new s,u="undefined"!=typeof BigInt64Array&&"function"==typeof BigInt64Array.from,c="undefined"!=typeof BigUint64Array&&"function"==typeof BigUint64Array.from,d=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),f=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);u&&(d.set("int64",BigInt64Array),f.set(BigInt64Array,"int64")),c&&(d.set("uint64",BigUint64Array),f.set(BigUint64Array,"uint64"));let h=e=>{let t=1;for(let r=0;r{let o=document.createElement("canvas"),i=o.getContext("2d");if(!e||!i)return n();let a=new Image;a.crossOrigin="Anonymous",a.src=e,a.onload=()=>{o.width=a.width,o.height=a.height,i.drawImage(a,0,0,o.width,o.height);let e=i.getImageData(0,0,o.width,o.height);if(void 0!==t){if(void 0!==t.height&&t.height!==o.height)throw Error("Image input config height doesn't match ImageBitmap height");if(s.height=o.height,void 0!==t.width&&t.width!==o.width)throw Error("Image input config width doesn't match ImageBitmap width");s.width=o.width}else s.height=o.height,s.width=o.width;r(p.bufferToTensor(e.data,s))}});else throw Error("Input data provided is not supported - aborted tensor creation");if(void 0!==r)return p.bufferToTensor(r,s);throw Error("Input data provided is not supported - aborted tensor creation")}toImageData(e){var t,r;let n;let o=document.createElement("canvas").getContext("2d");if(null!=o){let i=this.dims[3],a=this.dims[2],s=this.dims[1],l=void 0!==e&&void 0!==e.format?e.format:"RGB",u=void 0!==e&&(null===(t=e.norm)||void 0===t?void 0:t.mean)!==void 0?e.norm.mean:255,c=void 0!==e&&(null===(r=e.norm)||void 0===r?void 0:r.bias)!==void 0?e.norm.bias:0,d=a*i;if(void 0!==e){if(void 0!==e.height&&e.height!==a)throw Error("Image output config height doesn't match tensor height");if(void 0!==e.width&&e.width!==i)throw Error("Image output config width doesn't match tensor width");if(void 0!==e.format&&4===s&&"RGBA"!==e.format||3===s&&"RGB"!==e.format&&"BGR"!==e.format)throw Error("Tensor format doesn't match input tensor dims")}let f=0,h=1,p=2,m=3,g=0,y=d,v=2*d,b=-1;"RGBA"===l?(g=0,y=d,v=2*d,b=3*d):"RGB"===l?(g=0,y=d,v=2*d):"RBG"===l&&(g=0,v=d,y=2*d),n=o.createImageData(i,a);for(let e=0;e=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(s=e.byteLength-a,"number"==typeof r){if(!Number.isSafeInteger(s=r))throw RangeError("'byteLength' must be an integer.");if(s<=0||a+s>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-a}].`);if("object"==typeof n&&null!==n)i=n;else if(void 0!==n)throw TypeError("'options' must be an object.")}else if(void 0!==r)throw TypeError("'byteLength' must be a number.")}else if(void 0!==t)throw TypeError("'options' must be an object.");o=new Uint8Array(e,a,s)}else throw TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let s=(i.executionProviders||[]).map(e=>"string"==typeof e?e:e.name),l=await a(s);return new g(await l.createSessionHandler(o,i))}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}}let y=g},2989:function(e,t,r){"use strict";r.d(t,{Cd:function(){return M},x1:function(){return I},y$:function(){return z},UL:function(){return L},ny:function(){return P}});var n=r(2265),o=r(5803),i=r(213),a=r.n(i);let s={top:20,left:20,right:20,bottom:30},{Mixin:l}=a(),{touchableHandleStartShouldSetResponder:u,touchableHandleResponderTerminationRequest:c,touchableHandleResponderGrant:d,touchableHandleResponderMove:f,touchableHandleResponderRelease:h,touchableHandleResponderTerminate:p,touchableGetInitialState:m}=l,g={...l,touchableHandleStartShouldSetResponder(e){let{onStartShouldSetResponder:t}=this.props;return t?t(e):u.call(this,e)},touchableHandleResponderTerminationRequest(e){let{onResponderTerminationRequest:t}=this.props;return t?t(e):c.call(this,e)},touchableHandleResponderGrant(e){let{onResponderGrant:t}=this.props;return t?t(e):d.call(this,e)},touchableHandleResponderMove(e){let{onResponderMove:t}=this.props;return t?t(e):f.call(this,e)},touchableHandleResponderRelease(e){let{onResponderRelease:t}=this.props;return t?t(e):h.call(this,e)},touchableHandleResponderTerminate(e){let{onResponderTerminate:t}=this.props;return t?t(e):p.call(this,e)},touchableHandlePress(e){let{onPress:t}=this.props;t&&t(e)},touchableHandleActivePressIn(e){let{onPressIn:t}=this.props;t&&t(e)},touchableHandleActivePressOut(e){let{onPressOut:t}=this.props;t&&t(e)},touchableHandleLongPress(e){let{onLongPress:t}=this.props;t&&t(e)},touchableGetPressRectOffset(){let{pressRetentionOffset:e}=this.props;return e||s},touchableGetHitSlop(){let{hitSlop:e}=this.props;return e},touchableGetHighlightDelayMS(){let{delayPressIn:e}=this.props;return e||0},touchableGetLongPressDelayMS(){let{delayLongPress:e}=this.props;return 0===e?0:e||500},touchableGetPressOutDelayMS(){let{delayPressOut:e}=this.props;return e||0}},y=Object.keys(g),v=y.map(e=>g[e]),b=y.length;var w=e=>{for(let t=0;te.onPress||e.onPressIn||e.onPressOut||e.onLongPress,S=e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());function E(e){let t=[];return null!=e.translate&&t.push(`translate(${e.translate})`),(null!=e.translateX||null!=e.translateY)&&t.push(`translate(${e.translateX||0}, ${e.translateY||0})`),null!=e.scale&&t.push(`scale(${e.scale})`),(null!=e.scaleX||null!=e.scaleY)&&t.push(`scale(${e.scaleX||1}, ${e.scaleY||1})`),null!=e.rotation&&t.push(`rotate(${e.rotation})`),null!=e.skewX&&t.push(`skewX(${e.skewX})`),null!=e.skewY&&t.push(`skewY(${e.skewY})`),t}function k(e,t){let r=[];if(t&&r.push(...E(t)),Array.isArray(e)){if("number"==typeof e[0])r.push(`matrix(${e.join(" ")})`);else{let t=function(e){let t={};return null==e||e.forEach(e=>{let r=Object.keys(e);1!==r.length&&console.error("You must specify exactly one property per transform object.");let n=r[0],o=e[n];t[n]=o}),t}(e);r.push(...E(t))}}else"string"==typeof e&&r.push(e);return r.length?r.join(" "):void 0}let C=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.props,{transform:r,origin:n,originX:o,originY:i,fontFamily:a,fontSize:s,fontWeight:l,fontStyle:u,style:c,forwardedRef:d,gradientTransform:f,patternTransform:h,...p}=t,m={..._(t)?{onStartShouldSetResponder:e.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:e.touchableHandleResponderTerminationRequest,onResponderGrant:e.touchableHandleResponderGrant,onResponderMove:e.touchableHandleResponderMove,onResponderRelease:e.touchableHandleResponderRelease,onResponderTerminate:e.touchableHandleResponderTerminate}:null,...p};null!=n?m["transform-origin"]=n.toString().replace(","," "):(null!=o||null!=i)&&(m["transform-origin"]=`${o||0} ${i||0}`);let g=k(r,t);g&&(m.transform=g);let y=k(f);y&&(m.gradientTransform=y);let v=k(h);v&&(m.patternTransform=v),m.ref=t=>{e.elementRef.current=t,"function"==typeof d?d(t):d&&(d.current=t)};let b={};return null!=a&&(b.fontFamily=a),null!=s&&(b.fontSize=s),null!=l&&(b.fontWeight=l),null!=u&&(b.fontStyle=u),m.style=c?x.Z?[c,b]:c[Symbol.iterator]?Object.assign({},...c,b):Object.assign({},c,b):b,m},R=e=>{if(e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect)return e.getBoundingClientRect();throw Error("Can not get boundingClientRect of "+e)},A=(e,t)=>{let r=null==e?void 0:e.parentNode;r&&setTimeout(()=>{let n=R(r),{height:o,left:i,top:a,width:s}=R(e);t(i-n.left,a-n.top,s,o,i,a)},0)};function T(){let e=this.state.touchable.responderID;null!==e&&A(e,this._handleQueryLayout)}class O extends n.Component{prepareProps(e){return e}elementRef=n.createRef();lastMergedProps={};setNativeProps(e){let t=Object.assign({},this.props,this.lastMergedProps,e.style);this.lastMergedProps=t;let r=C(this,this.prepareProps(t)),n=this.elementRef.current;if(n)for(let e of Object.keys(r)){let t=r[e];switch(e){case"ref":case"children":break;case"style":for(let e of[].concat(r.style??[]))Object.assign(n.style,e);break;default:n.setAttribute(S(e),t)}}}constructor(e){super(e),_(e)&&w(this),this._remeasureMetricsOnActivation=T.bind(this)}render(){if(!this.tag)throw Error("When extending `WebShape` you need to overwrite either `tag` or `render`!");return this.lastMergedProps={},(0,o.Z)(this.tag,C(this,this.prepareProps(this.props)))}}class M extends O{tag="circle"}class I extends O{tag="line"}class z extends O{tag="path"}class L extends O{tag="rect"}class P extends O{tag="svg";toDataURL(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.elementRef.current;if(null===n)return;let o=R(n),i=Number(r.width)||o.width,a=Number(r.height)||o.height,s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",`0 0 ${o.width} ${o.height}`),s.setAttribute("width",String(i)),s.setAttribute("height",String(a)),s.appendChild(n.cloneNode(!0));let l=new window.Image;l.onload=()=>{let t=document.createElement("canvas");t.width=i,t.height=a;let r=t.getContext("2d");null==r||r.drawImage(l,0,0),e(t.toDataURL().replace("data:image/png;base64,",""))},l.src=`data:image/svg+xml;utf8,${(t=new window.XMLSerializer().serializeToString(s)).replace("/g,"%3E").replace(/\s+/g," ")}`}}},7873:function(e){"use strict";function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(n=1,o=1;nW&&(W=F,H=[]),H.push(e))}function K(){var e,t,r,n,o;for(e=F,t=[],r=ea();r!==d;)t.push(r),r=ea();if(t!==d){if((r=function e(){var t,r,n,o,i,a,s,l,u,c,f,h,p,m,g,y,v,b;if(t=F,(r=Y())!==d){for(n=[],o=ee();o!==d;)n.push(o),o=ee();n!==d&&(o=e())!==d?(i=r,a=o,s=i[0],l=i[1],u=i[2],c=i[3],f=i[4],h=i[5],p=a[0],m=a[1],g=a[2],y=a[3],t=r=[s*p+l*y,s*m+l*(v=a[4]),s*g+l*(b=a[5])+u,c*p+f*y,c*m+f*v,c*g+f*b+h]):(F=t,t=d)}else F=t,t=d;return t===d&&(t=Y()),t}())===d&&(r=null),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();n!==d?e=t=r:(F=e,e=d)}else F=e,e=d}else F=e,e=d;return e}function Y(){var t;return(t=function(){var t,r,n,o,i,a,s,l,u,c,f,h,v;if(t=F,e.substr(F,6)===p?(r=p,F+=6):(r=d,0===V&&G(m)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){if(ee()!==d){if((s=J())!==d){if(ee()!==d){if((l=J())!==d){if(ee()!==d){if((u=J())!==d){if(ee()!==d){if((c=J())!==d){if(ee()!==d){if((f=J())!==d){for(h=[],v=ea();v!==d;)h.push(v),v=ea();h!==d&&(41===e.charCodeAt(F)?(v=")",F++):(v=d,0===V&&G(y)),v!==d)?t=r=[a,l,c,s,u,f]:(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}())===d&&(t=function(){var t,r,n,o,i,a,s,l,u;if(t=F,e.substr(F,9)===v?(r=v,F+=9):(r=d,0===V&&G(b)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){if((s=Q())===d&&(s=null),s!==d){for(l=[],u=ea();u!==d;)l.push(u),u=ea();l!==d&&(41===e.charCodeAt(F)?(u=")",F++):(u=d,0===V&&G(y)),u!==d)?t=r=[1,0,a,0,1,s||0]:(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}())===d&&(t=function(){var t,r,n,o,i,a,s,l,u,c,f;if(t=F,e.substr(F,5)===w?(r=w,F+=5):(r=d,0===V&&G(x)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){if((s=Q())===d&&(s=null),s!==d){for(l=[],u=ea();u!==d;)l.push(u),u=ea();l!==d&&(41===e.charCodeAt(F)?(u=")",F++):(u=d,0===V&&G(y)),u!==d)?t=r=[c=a,0,0,0,null===(f=s)?c:f,0]:(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}())===d&&(t=function(){var t,r,n,o,i,a,s,l,u,c,f,h;if(t=F,e.substr(F,6)===_?(r=_,F+=6):(r=d,0===V&&G(S)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){if((c=F,ee()!==d&&(f=J())!==d&&ee()!==d&&(h=J())!==d)?c=[f,h]:(F=c,c=d),(s=c)===d&&(s=null),s!==d){for(l=[],u=ea();u!==d;)l.push(u),u=ea();l!==d?(41===e.charCodeAt(F)?(u=")",F++):(u=d,0===V&&G(y)),u!==d?t=r=E(a,s):(F=t,t=d)):(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}())===d&&(t=function(){var t,r,n,o,i,a,s,l;if(t=F,e.substr(F,5)===k?(r=k,F+=5):(r=d,0===V&&G(C)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){for(s=[],l=ea();l!==d;)s.push(l),l=ea();s!==d&&(41===e.charCodeAt(F)?(l=")",F++):(l=d,0===V&&G(y)),l!==d)?t=r=[1,Math.tan(es*a),0,0,1,0]:(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}())===d&&(t=function(){var t,r,n,o,i,a,s,l;if(t=F,e.substr(F,5)===R?(r=R,F+=5):(r=d,0===V&&G(A)),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();if(n!==d){if(40===e.charCodeAt(F)?(o="(",F++):(o=d,0===V&&G(g)),o!==d){for(i=[],a=ea();a!==d;)i.push(a),a=ea();if(i!==d){if((a=J())!==d){for(s=[],l=ea();l!==d;)s.push(l),l=ea();s!==d&&(41===e.charCodeAt(F)?(l=")",F++):(l=d,0===V&&G(y)),l!==d)?t=r=[1,0,0,Math.tan(es*a),1,0]:(F=t,t=d)}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d}else F=t,t=d;return t}()),t}function J(){var t,r,n,o,i,a,s,l,u,c,f,h,p,m;if(t=F,r=F,(n=en())===d&&(n=null),n!==d&&(i=F,a=F,((V++,c=F,(f=eo())===d&&(f=null),f!==d&&(46===e.charCodeAt(F)?(h=".",F++):(h=d,0===V&&G(I)),h!==d&&(p=eo())!==d))?c=f=[(m=f)?m.join(""):null,".",p.join("")].join(""):(F=c,c=d),c===d&&(c=F,(f=eo())!==d?(46===e.charCodeAt(F)?(h=".",F++):(h=d,0===V&&G(I)),h!==d?c=f=O(f):(F=c,c=d)):(F=c,c=d)),V--,c===d&&(f=d,0===V&&G(M)),(s=c)!==d)?((l=er())===d&&(l=null),l!==d?a=s=[s,l]:(F=a,a=d)):(F=a,a=d),a!==d&&(a=a.join("")),(i=a)===d&&(i=F,a=F,(s=eo())!==d&&(l=er())!==d?a=s=[s,l]:(F=a,a=d),a!==d&&(a=O(a)),i=a),(o=i)!==d)?r=n=[n,o]:(F=r,r=d),r!==d)r=parseFloat(r.join(""));return(t=r)===d&&(t=F,r=F,(n=en())===d&&(n=null),n!==d&&((u=eo())!==d&&(u=u.join("")),(o=u)!==d)?r=n=[n,o]:(F=r,r=d),r!==d&&(r=parseInt(r.join(""))),t=r),t}function Q(){var e,t;return(e=F,ee()!==d&&(t=J())!==d)?e=t:(F=e,e=d),e}function ee(){var e,t,r,n,o;if(e=F,t=[],(r=ea())!==d)for(;r!==d;)t.push(r),r=ea();else t=d;if(t!==d){if((r=et())===d&&(r=null),r!==d){for(n=[],o=ea();o!==d;)n.push(o),o=ea();n!==d?e=t=[t,r,n]:(F=e,e=d)}else F=e,e=d}else F=e,e=d;if(e===d){if(e=F,(t=et())!==d){for(r=[],n=ea();n!==d;)r.push(n),n=ea();r!==d?e=t=[t,r]:(F=e,e=d)}else F=e,e=d}return e}function et(){var t;return 44===e.charCodeAt(F)?(t=",",F++):(t=d,0===V&&G(T)),t}function er(){var t,r,n,o,i;return t=F,z.test(e.charAt(F))?(r=e.charAt(F),F++):(r=d,0===V&&G(L)),r!==d?((n=en())===d&&(n=null),n!==d&&(o=eo())!==d?t=r=[r,n,o]:(F=t,t=d)):(F=t,t=d),t!==d&&(t=[(i=t)[0],i[1],i[2].join("")].join("")),t}function en(){var t;return P.test(e.charAt(F))?(t=e.charAt(F),F++):(t=d,0===V&&G(B)),t}function eo(){var e,t;if(e=[],(t=ei())!==d)for(;t!==d;)e.push(t),t=ei();else e=d;return e}function ei(){var t;return j.test(e.charAt(F))?(t=e.charAt(F),F++):(t=d,0===V&&G(N)),t}function ea(){var t;return $.test(e.charAt(F))?(t=e.charAt(F),F++):(t=d,0===V&&G(U)),t}var es=Math.PI/180;if((c=h())!==d&&F===e.length)return c;throw c!==d&&Fe+t.charAt(0).toUpperCase()+t.substring(1);Object.keys(i).forEach(e=>{a.forEach(t=>{i[s(t,e)]=i[e]})});var l=e=>"currentcolor"===e||"currentColor"===e||"inherit"===e||0===e.indexOf("var("),u=r(44),c=r.n(u),d=e=>{if(null==e)return e;var t=c()(e);if(null!=t)return(t<<24|t>>>8)>>>0},f=function(e,t){if(void 0===t&&(t=1),null!=e){if("string"==typeof e&&l(e))return e;var r=d(e);if(null!=r){var n=((r>>24&255)/255*t).toFixed(2);return"rgba("+(r>>16&255)+","+(r>>8&255)+","+(255&r)+","+n+")"}}},h={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function p(e,t){var r=e;return null!=t&&i[t]||"number"!=typeof e?null!=t&&h[t]&&(r=f(e)):r=e+"px",r}var m=r(1213),g={},y=!m.Z||null!=window.CSS&&null!=window.CSS.supports&&(window.CSS.supports("text-decoration-line","none")||window.CSS.supports("-webkit-text-decoration-line","none")),v='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif',b={borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderBlockColor:["borderTopColor","borderBottomColor"],borderInlineColor:["borderRightColor","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderStyle:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderInlineStyle:["borderRightStyle","borderLeftStyle"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderInlineWidth:["borderRightWidth","borderLeftWidth"],insetBlock:["top","bottom"],insetInline:["left","right"],marginBlock:["marginTop","marginBottom"],marginInline:["marginRight","marginLeft"],paddingBlock:["paddingTop","paddingBottom"],paddingInline:["paddingRight","paddingLeft"],overflow:["overflowX","overflowY"],overscrollBehavior:["overscrollBehaviorX","overscrollBehaviorY"],borderBlockStartColor:["borderTopColor"],borderBlockStartStyle:["borderTopStyle"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndColor:["borderBottomColor"],borderBlockEndStyle:["borderBottomStyle"],borderBlockEndWidth:["borderBottomWidth"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],insetBlockEnd:["bottom"],insetBlockStart:["top"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"]},w=(e,t)=>{if(!e)return g;var r={};for(var n in e)if("continue"===function(){var o=e[n];if(null==o)return"continue";if("backgroundClip"===n)"text"===o&&(r.backgroundClip=o,r.WebkitBackgroundClip=o);else if("flex"===n)-1===o?(r.flexGrow=0,r.flexShrink=1,r.flexBasis="auto"):r.flex=o;else if("font"===n)r[n]=o.replace("System",v);else if("fontFamily"===n){if(o.indexOf("System")>-1){var i=o.split(/,\s*/);i[i.indexOf("System")]=v,r[n]=i.join(",")}else"monospace"===o?r[n]="monospace,monospace":r[n]=o}else if("textDecorationLine"===n)y?r.textDecorationLine=o:r.textDecoration=o;else if("writingDirection"===n)r.direction=o;else{var a=p(e[n],n),s=b[n];t&&"inset"===n?(null==e.insetInline&&(r.left=a,r.right=a),null==e.insetBlock&&(r.top=a,r.bottom=a)):t&&"margin"===n?(null==e.marginInline&&(r.marginLeft=a,r.marginRight=a),null==e.marginBlock&&(r.marginTop=a,r.marginBottom=a)):t&&"padding"===n?(null==e.paddingInline&&(r.paddingLeft=a,r.paddingRight=a),null==e.paddingBlock&&(r.paddingTop=a,r.paddingBottom=a)):s?s.forEach((t,n)=>{null==e[t]&&(r[t]=a)}):r[n]=a}}())continue;return r},x=e=>(function(e,t){for(var r,n=e.length,o=1^n,i=0;n>=4;)r=(65535&(r=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))*1540483477+(((r>>>16)*1540483477&65535)<<16),r^=r>>>24,o=(65535&o)*1540483477+(((o>>>16)*1540483477&65535)<<16)^(r=(65535&r)*1540483477+(((r>>>16)*1540483477&65535)<<16)),n-=4,++i;switch(n){case 3:o^=(255&e.charCodeAt(i+2))<<16;case 2:o^=(255&e.charCodeAt(i+1))<<8;case 1:o^=255&e.charCodeAt(i),o=(65535&o)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(65535&o)*1540483477+(((o>>>16)*1540483477&65535)<<16),(o^=o>>>15)>>>0})(e,0).toString(36),_=/[A-Z]/g,S=/^ms-/,E={};function k(e){return"-"+e.toLowerCase()}var C=function(e){if(e in E)return E[e];var t=e.replace(_,k);return E[e]=S.test(t)?"-"+t:t},R=r(2933),A=r(1677),T=r(9699),O=r(5019),M=r(8527),I=r(9779),z=r(2316),L=r(9832),P=r(8579),B=r(4633),j=["Webkit"],N=["Webkit","ms"],$={plugins:[A.Z,T.Z,O.Z,M.Z,I.Z,z.Z,L.Z,P.Z,B.Z],prefixMap:{appearance:["Webkit","Moz","ms"],userSelect:["Webkit","Moz"],textEmphasisPosition:N,textEmphasis:N,textEmphasisStyle:N,textEmphasisColor:N,boxDecorationBreak:N,clipPath:j,maskImage:N,maskMode:N,maskRepeat:N,maskPosition:N,maskClip:N,maskOrigin:N,maskSize:N,maskComposite:N,mask:N,maskBorderSource:N,maskBorderMode:N,maskBorderSlice:N,maskBorderWidth:N,maskBorderOutset:N,maskBorderRepeat:N,maskBorder:N,maskType:N,textDecorationStyle:j,textDecorationSkip:j,textDecorationLine:j,textDecorationColor:j,filter:j,breakAfter:j,breakBefore:j,breakInside:j,columnCount:j,columnFill:j,columnGap:j,columnRule:j,columnRuleColor:j,columnRuleStyle:j,columnRuleWidth:j,columns:j,columnSpan:j,columnWidth:j,backdropFilter:j,hyphens:j,flowInto:j,flowFrom:j,regionFragment:j,textOrientation:j,tabSize:["Moz"],fontKerning:j,textSizeAdjust:j}},U=(0,R.Z)($),F=["animationKeyframes"],D=new Map,W={},H={borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,inset:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,insetBlock:2.1,insetInline:2.1,marginInline:2.1,marginBlock:2.1,paddingInline:2.1,paddingBlock:2.1,borderBlockStartColor:2.2,borderBlockStartStyle:2.2,borderBlockStartWidth:2.2,borderBlockEndColor:2.2,borderBlockEndStyle:2.2,borderBlockEndWidth:2.2,borderInlineStartColor:2.2,borderInlineStartStyle:2.2,borderInlineStartWidth:2.2,borderInlineEndColor:2.2,borderInlineEndStyle:2.2,borderInlineEndWidth:2.2,borderEndStartRadius:2.2,borderEndEndRadius:2.2,borderStartStartRadius:2.2,borderStartEndRadius:2.2,insetBlockEnd:2.2,insetBlockStart:2.2,insetInlineEnd:2.2,insetInlineStart:2.2,marginBlockStart:2.2,marginBlockEnd:2.2,marginInlineStart:2.2,marginInlineEnd:2.2,paddingBlockStart:2.2,paddingBlockEnd:2.2,paddingInlineStart:2.2,paddingInlineEnd:2.2},V="borderTopLeftRadius",Z="borderTopRightRadius",q="borderBottomLeftRadius",X="borderBottomRightRadius",G="borderLeftColor",K="borderLeftStyle",Y="borderLeftWidth",J="borderRightColor",Q="borderRightStyle",ee="borderRightWidth",et="right",er="marginLeft",en="marginRight",eo="paddingLeft",ei="paddingRight",ea="left",es={[V]:Z,[Z]:V,[q]:X,[X]:q,[G]:J,[K]:Q,[Y]:ee,[J]:G,[Q]:K,[ee]:Y,[ea]:et,[er]:en,[en]:er,[eo]:ei,[ei]:eo,[et]:ea},el={borderStartStartRadius:V,borderStartEndRadius:Z,borderEndStartRadius:q,borderEndEndRadius:X,borderInlineStartColor:G,borderInlineStartStyle:K,borderInlineStartWidth:Y,borderInlineEndColor:J,borderInlineEndStyle:Q,borderInlineEndWidth:ee,insetInlineEnd:et,insetInlineStart:ea,marginInlineStart:er,marginInlineEnd:en,paddingInlineStart:eo,paddingInlineEnd:ei},eu=["clear","float","textAlign"];function ec(e){var t=U(w(e));return"{"+Object.keys(t).map(e=>{var r=t[e],n=C(e);return Array.isArray(r)?r.map(e=>n+":"+e).join(";"):n+":"+r}).sort().join(";")+";}"}function ed(e){if("number"==typeof e)throw Error("Invalid CSS keyframes type: "+typeof e);var t=[],r=[];return(Array.isArray(e)?e:[e]).forEach(e=>{if("string"==typeof e)t.push(e);else{var n,o,i,a=(n="r-"+x("animation"+JSON.stringify(e)),o="{"+Object.keys(e).map(t=>{var r=ec(e[t]);return""+t+r}).join("")+"}",i=["-webkit-",""].map(e=>"@"+e+"keyframes "+n+o),[n,i]),s=a[0],l=a[1];t.push(s),r.push(...l)}}),[t,r]}function ef(e,t,r){if(!m.Z)return null;var n=null!=t?t:document,o=n.getElementById(e);if(null==o){if((o=document.createElement("style")).setAttribute("id",e),"string"==typeof r&&o.appendChild(document.createTextNode(r)),n instanceof ShadowRoot)n.insertBefore(o,n.firstChild);else{var i=n.head;i&&i.insertBefore(o,i.firstChild)}}return o.sheet}var eh=Array.prototype.slice;function ep(e){var t,r={},n={};function o(e,t,n){var o=eg(r),i=o.indexOf(t)+1,a=o[i],s=null!=a&&null!=r[a].start?r[a].start:e.cssRules.length,l=function(e,t,r){try{return e.insertRule(t,r),!0}catch(e){return!1}}(e,n,s);if(l){null==r[t].start&&(r[t].start=s);for(var u=i;u{var i=e.cssText;if(i.indexOf("stylesheet-group")>-1)r[t=Number(e.selectorText.split(em)[1])]={start:o,rules:[i]};else{var a=ev(i);null!=a&&(n[a]=!0,r[t].rules.push(i))}}),{getTextContent:()=>eg(r).map(e=>{var t=r[e].rules,n=t.shift();return t.sort(),t.unshift(n),t.join("\n")}).join("\n"),insert(t,i){var a=Number(i);if(null==r[a]){var s='[stylesheet-group="'+a+'"]{}';r[a]={start:null,rules:[s]},null!=e&&o(e,a,s)}var l=ev(t);null==l||null!=n[l]||(n[l]=!0,r[a].rules.push(t),null==e||o(e,a,t)||r[a].rules.pop())}}}var em=/["']/g;function eg(e){return Object.keys(e).map(Number).sort((e,t)=>e>t?1:-1)}var ey=/\s*([,])\s*/g;function ev(e){var t=e.split("{")[0].trim();return""!==t?t.replace(ey,"$1"):null}var eb=new WeakMap,ew=[],ex=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"],e_=r(7106),eS=r(131),eE={},ek={height:0,width:0},eC=e=>{var t=e.shadowColor,r=e.shadowOffset,n=e.shadowOpacity,o=e.shadowRadius,i=r||ek,a=i.height,s=p(i.width),l=p(a),u=p(o||0),c=f(t||"black",n);if(null!=c&&null!=s&&null!=l&&null!=u)return s+" "+l+" "+u+" "+c},eR=e=>{var t=e.textShadowColor,r=e.textShadowOffset,n=e.textShadowRadius,o=r||ek,i=o.height,a=o.width,s=n||0,l=p(a),u=p(i),c=p(s),d=p(t,"textShadowColor");if(d&&(0!==i||0!==a||0!==s)&&null!=l&&null!=u&&null!=c)return l+" "+u+" "+c+" "+d},eA=e=>{var t=Object.keys(e)[0],r=e[t];if("matrix"===t||"matrix3d"===t)return t+"("+r.join(",")+")";var n=p(r,t);return t+"("+n+")"},eT=e=>e.map(eA).join(" "),eO={borderBottomEndRadius:"borderEndEndRadius",borderBottomStartRadius:"borderEndStartRadius",borderTopEndRadius:"borderStartEndRadius",borderTopStartRadius:"borderStartStartRadius",borderEndColor:"borderInlineEndColor",borderEndStyle:"borderInlineEndStyle",borderEndWidth:"borderInlineEndWidth",borderStartColor:"borderInlineStartColor",borderStartStyle:"borderInlineStartStyle",borderStartWidth:"borderInlineStartWidth",end:"insetInlineEnd",marginEnd:"marginInlineEnd",marginHorizontal:"marginInline",marginStart:"marginInlineStart",marginVertical:"marginBlock",paddingEnd:"paddingInlineEnd",paddingHorizontal:"paddingInline",paddingStart:"paddingInlineStart",paddingVertical:"paddingBlock",start:"insetInlineStart"},eM={elevation:!0,overlayColor:!0,resizeMode:!0,tintColor:!0},eI=function(e,t){void 0===t&&(t={});var r=e||eE,n={};if(t.shadow,null!=r.shadowColor||null!=r.shadowOffset||null!=r.shadowOpacity||null!=r.shadowRadius){(0,eS.O)("shadowStyles",'"shadow*" style props are deprecated. Use "boxShadow".');var o=eC(r);if(null!=o&&null==n.boxShadow){var i=r.boxShadow;n.boxShadow=i?i+", "+o:o}}if(t.textShadow,null!=r.textShadowColor||null!=r.textShadowOffset||null!=r.textShadowRadius){(0,eS.O)("textShadowStyles",'"textShadow*" style props are deprecated. Use "textShadow".');var a=eR(r);if(null!=a&&null==n.textShadow){var s=r.textShadow;n.textShadow=s?s+", "+a:a}}for(var l in r)if(null==eM[l]&&"shadowColor"!==l&&"shadowOffset"!==l&&"shadowOpacity"!==l&&"shadowRadius"!==l&&"textShadowColor"!==l&&"textShadowOffset"!==l&&"textShadowRadius"!==l){var u=r[l],c=eO[l]||l,d=u;Object.prototype.hasOwnProperty.call(r,l)&&(c===l||null==r[c])&&("aspectRatio"===c&&"number"==typeof d?n[c]=d.toString():"fontVariant"===c?(Array.isArray(d)&&d.length>0&&((0,eS.O)("fontVariant",'"fontVariant" style array value is deprecated. Use space-separated values.'),d=d.join(" ")),n[c]=d):"textAlignVertical"===c?((0,eS.O)("textAlignVertical",'"textAlignVertical" style is deprecated. Use "verticalAlign".'),null==r.verticalAlign&&(n.verticalAlign="center"===d?"middle":d)):"transform"===c?(Array.isArray(d)&&(d=eT(d)),n.transform=d):n[c]=d)}return n},ez=r(8650),eL=["writingDirection"],eP=new WeakMap,eB=function(e,t){if(void 0===t&&(t="react-native-stylesheet"),m.Z){var r,n=document;if(0===ew.length)r=ep(ef(t)),ex.forEach(e=>{r.insert(e,0)}),eb.set(n,ew.length),ew.push(r);else{var o=eb.get(n);if(null==o){var i=ew[0];r=ep(ef(t,n,null!=i?i.getTextContent():"")),eb.set(n,ew.length),ew.push(r)}else r=ew[o]}}else 0===ew.length?(r=ep(ef(t)),ex.forEach(e=>{r.insert(e,0)}),ew.push(r)):r=ew[0];return{getTextContent:()=>r.getTextContent(),id:t,insert(e,t){ew.forEach(r=>{r.insert(e,t)})}}}(),ej={shadow:!0,textShadow:!0};function eN(e){e.forEach(e=>{var t=e[0],r=e[1];null!=eB&&t.forEach(e=>{eB.insert(e,r)})})}var e$={position:"absolute",left:0,right:0,top:0,bottom:0},eU=eF({x:(0,n.Z)({},e$)}).x;function eF(e){return Object.keys(e).forEach(t=>{var r,i,a,s,l,u=e[t];null!=u&&!0!==u.$$css&&(t.indexOf("$raw")>-1?(i=(r=function(e,t){var r,i={$$css:!0},a=[],s=e.animationKeyframes,l=(0,o.Z)(e,F),u="css-"+x(t+JSON.stringify(e));if(null!=s){var c=ed(s),d=c[0],f=c[1];r=d.join(","),a.push(...f)}var h=ec((0,n.Z)((0,n.Z)({},l),{},{animationName:r}));return a.push("."+u+h),i[u]=u,[i,[[a,1]]]}(u,t.split("$raw")[0]))[0],eN(r[1]),l=i):(s=(a=function(e){var t={$$css:!0},r=[];function n(e,t,n){var o,i,a="string"!=typeof(o=p(n,t))?JSON.stringify(o||""):o,s=t+a,l=D.get(s);if(null!=l)i=l[0],r.push(l[1]);else{i="r-"+x(e+(e!==t?s:a));var u=H[e]||3,c=[function(e,t,r){var n=[],o="."+e;switch(t){case"animationKeyframes":var i=ed(r),a=i[0],s=i[1],l=ec({animationName:a.join(",")});n.push(""+o+l,...s);break;case"placeholderTextColor":var u=ec({color:r,opacity:1});n.push(o+"::-webkit-input-placeholder"+u,o+"::-moz-placeholder"+u,o+":-ms-input-placeholder"+u,o+"::placeholder"+u);break;case"pointerEvents":var c=r;if("auto"===r||"box-only"===r){if(c="auto!important","box-only"===r){var d=ec({pointerEvents:"none"});n.push(o+">*"+d)}}else if(("none"===r||"box-none"===r)&&(c="none!important","box-none"===r)){var f=ec({pointerEvents:"auto"});n.push(o+">*"+f)}var h=ec({pointerEvents:c});n.push(""+o+h);break;case"scrollbarWidth":"none"===r&&n.push(o+"::-webkit-scrollbar{display:none}");var p=ec({scrollbarWidth:r});n.push(""+o+p);break;default:var m=ec({[t]:r});n.push(""+o+m)}return n}(i,t,n),u];r.push(c),D.set(s,[i,c])}return i}return Object.keys(e).sort().forEach(r=>{var o=e[r];if(null!=o){if(eu.indexOf(r)>-1){var i,a=n(r,r,"left"),s=n(r,r,"right");"start"===o?i=[a,s]:"end"===o&&(i=[s,a])}var l=el[r];if(null!=l&&(i=[n(r,l,o),n(r,es[l],o)]),"transitionProperty"===r){for(var u=Array.isArray(o)?o:[o],c=[],d=0;d0){var h=[...u],p=[...u];c.forEach(e=>{var t=h[e];if("string"==typeof t){var o=el[t],a=es[o];h[e]=o,p[e]=a,i=[n(r,r,h),n(r,r,p)]}})}}null==i?i=n(r,r,o):t.$$css$localize=!0,t[r]=i}}),[t,r]}(eI(u,ej)))[0],eN(a[1]),l=s),eP.set(u,l))}),e}function eD(e,t){void 0===t&&(t={});var r,i,a,s,l,u="rtl"===t.writingDirection,c=(void 0===(r=t)&&(r={}),a=(i=r).writingDirection,s=(0,o.Z)(i,eL),l="rtl"===a,ez.D.factory({transform(e){var t=eP.get(e);return null!=t?(0,e_.j)(t,l):eI(e,(0,n.Z)((0,n.Z)({},ej),s))}})(e));return Array.isArray(c)&&null!=c[1]&&(c[1]=function(e,t){var r=e||W,n={},o={};for(var i in r)if("continue"===function(){var e=r[i],a=i,s=e;if(!Object.prototype.hasOwnProperty.call(r,i)||null==e)return"continue";eu.indexOf(i)>-1&&("start"===e?s=t?"right":"left":"end"===e&&(s=t?"left":"right"));var l=el[i];if(null!=l&&(a=t?es[l]:l),"transitionProperty"===i){var u=Array.isArray(e)?e:[e];u.forEach((e,r)=>{if("string"==typeof e){var n=el[e];null!=n&&(u[r]=t?es[n]:n,s=u.join(" "))}})}n[a]||(o[a]=s),a===i&&(n[a]=!0)}())continue;return w(o,!0)}(c[1],u)),c}eD.absoluteFill=eU,eD.absoluteFillObject=e$,eD.create=eF,eD.compose=function(e,t){return[e,t]},eD.flatten=function(){for(var e=arguments.length,t=Array(e),r=0;rReflect.has(r,n)?Reflect.get(r,n):e(),apply:()=>e()})}(!0)},2319:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},o=["ms","Moz","O","Webkit"],i=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);Object.keys(n).forEach(e=>{o.forEach(t=>{n[i(t,e)]=n[e]})});var a=function(e,t){var r=e.style;for(var o in t)if(t.hasOwnProperty(o)){var i,a,s=0===o.indexOf("--"),l=(i=o,null==(a=t[o])||"boolean"==typeof a||""===a?"":s||"number"!=typeof a||0===a||n.hasOwnProperty(i)&&n[i]?(""+a).trim():a+"px");"float"===o&&(o="cssFloat"),s?r.setProperty(o,l):r[o]=l}},s=e=>{var t=e.offsetHeight,r=e.offsetWidth,n=e.offsetLeft,o=e.offsetTop;for(e=e.offsetParent;e&&1===e.nodeType;)n+=e.offsetLeft+e.clientLeft-e.scrollLeft,o+=e.offsetTop+e.clientTop-e.scrollTop,e=e.offsetParent;return{width:r,height:t,top:o-=window.scrollY,left:n-=window.scrollX}},l=(e,t,r)=>{var n=t||e&&e.parentNode;e&&n&&setTimeout(()=>{if(e.isConnected&&n.isConnected){var t=s(n),o=s(e),i=o.height,a=o.left,l=o.top,u=o.width;r(a-t.left,l-t.top,u,i,a,l)}},0)},u={A:!0,BODY:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},c={blur(e){try{e.blur()}catch(e){}},focus(e){try{var t=e.nodeName;null==e.getAttribute("tabIndex")&&!0!==e.isContentEditable&&null==u[t]&&e.setAttribute("tabIndex","-1"),e.focus()}catch(e){}},measure(e,t){l(e,null,t)},measureInWindow(e,t){e&&setTimeout(()=>{var r=s(e),n=r.height;t(r.left,r.top,r.width,n)},0)},measureLayout(e,t,r,n){l(e,t,n)},updateView(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];switch(r){case"style":a(e,n);break;case"class":case"className":e.setAttribute("class",n);break;case"text":case"value":e.value=n;break;default:e.setAttribute(r,n)}}},configureNextLayoutAnimation(e,t){t()},setLayoutAnimationEnabledExperimental(){}}},5275:function(e,t,r){"use strict";r.d(t,{Z:function(){return w}});var n=r(3950),o=r(2265),i=r(5803),a=r(7792),s=r(9115),l=r(9647),u=r(9926),c=r(5158),d=r(4834),f=r(929),h=(0,o.createContext)(!1),p=r(3201),m=["hrefAttrs","onLayout","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture"],g=Object.assign({},a.lG,a.LO,a._T,a.YB,a.Uy,a.hJ,a.E5,a.vr,{href:!0,lang:!0,onScroll:!0,onWheel:!0,pointerEvents:!0}),y=e=>(0,s.Z)(e,g),v=o.forwardRef((e,t)=>{var r=e.hrefAttrs,a=e.onLayout,s=e.onMoveShouldSetResponder,f=e.onMoveShouldSetResponderCapture,g=e.onResponderEnd,v=e.onResponderGrant,w=e.onResponderMove,x=e.onResponderReject,_=e.onResponderRelease,S=e.onResponderStart,E=e.onResponderTerminate,k=e.onResponderTerminationRequest,C=e.onScrollShouldSetResponder,R=e.onScrollShouldSetResponderCapture,A=e.onSelectionChangeShouldSetResponder,T=e.onSelectionChangeShouldSetResponderCapture,O=e.onStartShouldSetResponder,M=e.onStartShouldSetResponderCapture,I=(0,n.Z)(e,m),z=o.useContext(h),L=o.useRef(null),P=(0,p.PE)().direction;(0,l.Z)(L,a),(0,d.Z)(L,{onMoveShouldSetResponder:s,onMoveShouldSetResponderCapture:f,onResponderEnd:g,onResponderGrant:v,onResponderMove:w,onResponderReject:x,onResponderRelease:_,onResponderStart:S,onResponderTerminate:E,onResponderTerminationRequest:k,onScrollShouldSetResponder:C,onScrollShouldSetResponderCapture:R,onSelectionChangeShouldSetResponder:A,onSelectionChangeShouldSetResponderCapture:T,onStartShouldSetResponder:O,onStartShouldSetResponderCapture:M});var B="div",j=null!=e.lang?(0,p.w1)(e.lang):null,N=e.dir||j,$=N||P,U=y(I);if(U.dir=N,U.style=[b.view$raw,z&&b.inline,e.style],null!=e.href&&(B="a",null!=r)){var F=r.download,D=r.rel,W=r.target;null!=F&&(U.download=F),null!=D&&(U.rel=D),"string"==typeof W&&(U.target="_"!==W.charAt(0)?"_"+W:W)}var H=(0,c.Z)(U),V=(0,u.Z)(L,H,t);return U.ref=V,(0,i.Z)(B,U,{writingDirection:$})});v.displayName="View";var b=f.Z.create({view$raw:{alignItems:"stretch",backgroundColor:"transparent",border:"0 solid black",boxSizing:"border-box",display:"flex",flexBasis:"auto",flexDirection:"column",flexShrink:0,listStyle:"none",margin:0,minHeight:0,minWidth:0,padding:0,position:"relative",textDecoration:"none",zIndex:0},inline:{display:"inline-flex"}}),w=v},5803:function(e,t,r){"use strict";r.d(t,{Z:function(){return S}});var n={adjustable:"slider",button:"button",header:"heading",image:"img",imagebutton:null,keyboardkey:null,label:null,link:"link",none:"presentation",search:"search",summary:"region",text:null},o=e=>{var t=e.accessibilityRole,r=e.role||t;if(r){var o=n[r];if(null!==o)return o||r}},i={article:"article",banner:"header",blockquote:"blockquote",button:"button",code:"code",complementary:"aside",contentinfo:"footer",deletion:"del",emphasis:"em",figure:"figure",insertion:"ins",form:"form",list:"ul",listitem:"li",main:"main",navigation:"nav",paragraph:"p",region:"section",strong:"strong"},a={},s={propsToAccessibilityComponent:function(e){if(void 0===e&&(e=a),"label"===e.accessibilityRole)return"label";var t=o(e);if(t){if("heading"===t){var r=e.accessibilityLevel||e["aria-level"];return null!=r?"h"+r:"h1"}return i[t]}},propsToAriaRole:o},l=r(7998),u=r(3950),c=r(929),d=r(131),f=["aria-activedescendant","accessibilityActiveDescendant","aria-atomic","accessibilityAtomic","aria-autocomplete","accessibilityAutoComplete","aria-busy","accessibilityBusy","aria-checked","accessibilityChecked","aria-colcount","accessibilityColumnCount","aria-colindex","accessibilityColumnIndex","aria-colspan","accessibilityColumnSpan","aria-controls","accessibilityControls","aria-current","accessibilityCurrent","aria-describedby","accessibilityDescribedBy","aria-details","accessibilityDetails","aria-disabled","accessibilityDisabled","aria-errormessage","accessibilityErrorMessage","aria-expanded","accessibilityExpanded","aria-flowto","accessibilityFlowTo","aria-haspopup","accessibilityHasPopup","aria-hidden","accessibilityHidden","aria-invalid","accessibilityInvalid","aria-keyshortcuts","accessibilityKeyShortcuts","aria-label","accessibilityLabel","aria-labelledby","accessibilityLabelledBy","aria-level","accessibilityLevel","aria-live","accessibilityLiveRegion","aria-modal","accessibilityModal","aria-multiline","accessibilityMultiline","aria-multiselectable","accessibilityMultiSelectable","aria-orientation","accessibilityOrientation","aria-owns","accessibilityOwns","aria-placeholder","accessibilityPlaceholder","aria-posinset","accessibilityPosInSet","aria-pressed","accessibilityPressed","aria-readonly","accessibilityReadOnly","aria-required","accessibilityRequired","role","accessibilityRole","aria-roledescription","accessibilityRoleDescription","aria-rowcount","accessibilityRowCount","aria-rowindex","accessibilityRowIndex","aria-rowspan","accessibilityRowSpan","aria-selected","accessibilitySelected","aria-setsize","accessibilitySetSize","aria-sort","accessibilitySort","aria-valuemax","accessibilityValueMax","aria-valuemin","accessibilityValueMin","aria-valuenow","accessibilityValueNow","aria-valuetext","accessibilityValueText","dataSet","focusable","id","nativeID","pointerEvents","style","tabIndex","testID"],h={},p=Object.prototype.hasOwnProperty,m=Array.isArray,g=/[A-Z]/g;function y(e){return"-"+e.toLowerCase()}function v(e){return m(e)?e.join(" "):e}var b=c.Z.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}}),w=(e,t,r)=>{t||(t=h);var n=t,o=n["aria-activedescendant"],i=n.accessibilityActiveDescendant,a=n["aria-atomic"],m=n.accessibilityAtomic,w=n["aria-autocomplete"],x=n.accessibilityAutoComplete,_=n["aria-busy"],S=n.accessibilityBusy,E=n["aria-checked"],k=n.accessibilityChecked,C=n["aria-colcount"],R=n.accessibilityColumnCount,A=n["aria-colindex"],T=n.accessibilityColumnIndex,O=n["aria-colspan"],M=n.accessibilityColumnSpan,I=n["aria-controls"],z=n.accessibilityControls,L=n["aria-current"],P=n.accessibilityCurrent,B=n["aria-describedby"],j=n.accessibilityDescribedBy,N=n["aria-details"],$=n.accessibilityDetails,U=n["aria-disabled"],F=n.accessibilityDisabled,D=n["aria-errormessage"],W=n.accessibilityErrorMessage,H=n["aria-expanded"],V=n.accessibilityExpanded,Z=n["aria-flowto"],q=n.accessibilityFlowTo,X=n["aria-haspopup"],G=n.accessibilityHasPopup,K=n["aria-hidden"],Y=n.accessibilityHidden,J=n["aria-invalid"],Q=n.accessibilityInvalid,ee=n["aria-keyshortcuts"],et=n.accessibilityKeyShortcuts,er=n["aria-label"],en=n.accessibilityLabel,eo=n["aria-labelledby"],ei=n.accessibilityLabelledBy,ea=n["aria-level"],es=n.accessibilityLevel,el=n["aria-live"],eu=n.accessibilityLiveRegion,ec=n["aria-modal"],ed=n.accessibilityModal,ef=n["aria-multiline"],eh=n.accessibilityMultiline,ep=n["aria-multiselectable"],em=n.accessibilityMultiSelectable,eg=n["aria-orientation"],ey=n.accessibilityOrientation,ev=n["aria-owns"],eb=n.accessibilityOwns,ew=n["aria-placeholder"],ex=n.accessibilityPlaceholder,e_=n["aria-posinset"],eS=n.accessibilityPosInSet,eE=n["aria-pressed"],ek=n.accessibilityPressed,eC=n["aria-readonly"],eR=n.accessibilityReadOnly,eA=n["aria-required"],eT=n.accessibilityRequired,eO=(n.role,n.accessibilityRole),eM=n["aria-roledescription"],eI=n.accessibilityRoleDescription,ez=n["aria-rowcount"],eL=n.accessibilityRowCount,eP=n["aria-rowindex"],eB=n.accessibilityRowIndex,ej=n["aria-rowspan"],eN=n.accessibilityRowSpan,e$=n["aria-selected"],eU=n.accessibilitySelected,eF=n["aria-setsize"],eD=n.accessibilitySetSize,eW=n["aria-sort"],eH=n.accessibilitySort,eV=n["aria-valuemax"],eZ=n.accessibilityValueMax,eq=n["aria-valuemin"],eX=n.accessibilityValueMin,eG=n["aria-valuenow"],eK=n.accessibilityValueNow,eY=n["aria-valuetext"],eJ=n.accessibilityValueText,eQ=n.dataSet,e0=n.focusable,e1=n.id,e2=n.nativeID,e5=n.pointerEvents,e6=n.style,e4=n.tabIndex,e3=n.testID,e8=(0,u.Z)(n,f);null!=F&&(0,d.O)("accessibilityDisabled","accessibilityDisabled is deprecated.");var e7=s.propsToAriaRole(t);null!=i&&(0,d.O)("accessibilityActiveDescendant","accessibilityActiveDescendant is deprecated. Use aria-activedescendant.");var e9=null!=o?o:i;null!=e9&&(e8["aria-activedescendant"]=e9),null!=m&&(0,d.O)("accessibilityAtomic","accessibilityAtomic is deprecated. Use aria-atomic.");var te=null!=a?o:m;null!=te&&(e8["aria-atomic"]=te),null!=x&&(0,d.O)("accessibilityAutoComplete","accessibilityAutoComplete is deprecated. Use aria-autocomplete.");var tt=null!=w?w:x;null!=tt&&(e8["aria-autocomplete"]=tt),null!=S&&(0,d.O)("accessibilityBusy","accessibilityBusy is deprecated. Use aria-busy.");var tr=null!=_?_:S;null!=tr&&(e8["aria-busy"]=tr),null!=k&&(0,d.O)("accessibilityChecked","accessibilityChecked is deprecated. Use aria-checked.");var tn=null!=E?E:k;null!=tn&&(e8["aria-checked"]=tn),null!=R&&(0,d.O)("accessibilityColumnCount","accessibilityColumnCount is deprecated. Use aria-colcount.");var to=null!=C?C:R;null!=to&&(e8["aria-colcount"]=to),null!=T&&(0,d.O)("accessibilityColumnIndex","accessibilityColumnIndex is deprecated. Use aria-colindex.");var ti=null!=A?A:T;null!=ti&&(e8["aria-colindex"]=ti),null!=M&&(0,d.O)("accessibilityColumnSpan","accessibilityColumnSpan is deprecated. Use aria-colspan.");var ta=null!=O?O:M;null!=ta&&(e8["aria-colspan"]=ta),null!=z&&(0,d.O)("accessibilityControls","accessibilityControls is deprecated. Use aria-controls.");var ts=null!=I?I:z;null!=ts&&(e8["aria-controls"]=v(ts)),null!=P&&(0,d.O)("accessibilityCurrent","accessibilityCurrent is deprecated. Use aria-current.");var tl=null!=L?L:P;null!=tl&&(e8["aria-current"]=tl),null!=j&&(0,d.O)("accessibilityDescribedBy","accessibilityDescribedBy is deprecated. Use aria-describedby.");var tu=null!=B?B:j;null!=tu&&(e8["aria-describedby"]=v(tu)),null!=$&&(0,d.O)("accessibilityDetails","accessibilityDetails is deprecated. Use aria-details.");var tc=null!=N?N:$;null!=tc&&(e8["aria-details"]=tc),!0===(U||F)&&(e8["aria-disabled"]=!0,("button"===e||"form"===e||"input"===e||"select"===e||"textarea"===e)&&(e8.disabled=!0)),null!=W&&(0,d.O)("accessibilityErrorMessage","accessibilityErrorMessage is deprecated. Use aria-errormessage.");var td=null!=D?D:W;null!=td&&(e8["aria-errormessage"]=td),null!=V&&(0,d.O)("accessibilityExpanded","accessibilityExpanded is deprecated. Use aria-expanded.");var tf=null!=H?H:V;null!=tf&&(e8["aria-expanded"]=tf),null!=q&&(0,d.O)("accessibilityFlowTo","accessibilityFlowTo is deprecated. Use aria-flowto.");var th=null!=Z?Z:q;null!=th&&(e8["aria-flowto"]=v(th)),null!=G&&(0,d.O)("accessibilityHasPopup","accessibilityHasPopup is deprecated. Use aria-haspopup.");var tp=null!=X?X:G;null!=tp&&(e8["aria-haspopup"]=tp),null!=Y&&(0,d.O)("accessibilityHidden","accessibilityHidden is deprecated. Use aria-hidden.");var tm=null!=K?K:Y;!0===tm&&(e8["aria-hidden"]=tm),null!=Q&&(0,d.O)("accessibilityInvalid","accessibilityInvalid is deprecated. Use aria-invalid.");var tg=null!=J?J:Q;null!=tg&&(e8["aria-invalid"]=tg),null!=et&&(0,d.O)("accessibilityKeyShortcuts","accessibilityKeyShortcuts is deprecated. Use aria-keyshortcuts.");var ty=null!=ee?ee:et;null!=ty&&(e8["aria-keyshortcuts"]=v(ty)),null!=en&&(0,d.O)("accessibilityLabel","accessibilityLabel is deprecated. Use aria-label.");var tv=null!=er?er:en;null!=tv&&(e8["aria-label"]=tv),null!=ei&&(0,d.O)("accessibilityLabelledBy","accessibilityLabelledBy is deprecated. Use aria-labelledby.");var tb=null!=eo?eo:ei;null!=tb&&(e8["aria-labelledby"]=v(tb)),null!=es&&(0,d.O)("accessibilityLevel","accessibilityLevel is deprecated. Use aria-level.");var tw=null!=ea?ea:es;null!=tw&&(e8["aria-level"]=tw),null!=eu&&(0,d.O)("accessibilityLiveRegion","accessibilityLiveRegion is deprecated. Use aria-live.");var tx=null!=el?el:eu;null!=tx&&(e8["aria-live"]="none"===tx?"off":tx),null!=ed&&(0,d.O)("accessibilityModal","accessibilityModal is deprecated. Use aria-modal.");var t_=null!=ec?ec:ed;null!=t_&&(e8["aria-modal"]=t_),null!=eh&&(0,d.O)("accessibilityMultiline","accessibilityMultiline is deprecated. Use aria-multiline.");var tS=null!=ef?ef:eh;null!=tS&&(e8["aria-multiline"]=tS),null!=em&&(0,d.O)("accessibilityMultiSelectable","accessibilityMultiSelectable is deprecated. Use aria-multiselectable.");var tE=null!=ep?ep:em;null!=tE&&(e8["aria-multiselectable"]=tE),null!=ey&&(0,d.O)("accessibilityOrientation","accessibilityOrientation is deprecated. Use aria-orientation.");var tk=null!=eg?eg:ey;null!=tk&&(e8["aria-orientation"]=tk),null!=eb&&(0,d.O)("accessibilityOwns","accessibilityOwns is deprecated. Use aria-owns.");var tC=null!=ev?ev:eb;null!=tC&&(e8["aria-owns"]=v(tC)),null!=ex&&(0,d.O)("accessibilityPlaceholder","accessibilityPlaceholder is deprecated. Use aria-placeholder.");var tR=null!=ew?ew:ex;null!=tR&&(e8["aria-placeholder"]=tR),null!=eS&&(0,d.O)("accessibilityPosInSet","accessibilityPosInSet is deprecated. Use aria-posinset.");var tA=null!=e_?e_:eS;null!=tA&&(e8["aria-posinset"]=tA),null!=ek&&(0,d.O)("accessibilityPressed","accessibilityPressed is deprecated. Use aria-pressed.");var tT=null!=eE?eE:ek;null!=tT&&(e8["aria-pressed"]=tT),null!=eR&&(0,d.O)("accessibilityReadOnly","accessibilityReadOnly is deprecated. Use aria-readonly.");var tO=null!=eC?eC:eR;null!=tO&&(e8["aria-readonly"]=tO,("input"===e||"select"===e||"textarea"===e)&&(e8.readOnly=!0)),null!=eT&&(0,d.O)("accessibilityRequired","accessibilityRequired is deprecated. Use aria-required.");var tM=null!=eA?eA:eT;null!=tM&&(e8["aria-required"]=tM,("input"===e||"select"===e||"textarea"===e)&&(e8.required=eT)),null!=eO&&(0,d.O)("accessibilityRole","accessibilityRole is deprecated. Use role."),null!=e7&&(e8.role="none"===e7?"presentation":e7),null!=eI&&(0,d.O)("accessibilityRoleDescription","accessibilityRoleDescription is deprecated. Use aria-roledescription.");var tI=null!=eM?eM:eI;null!=tI&&(e8["aria-roledescription"]=tI),null!=eL&&(0,d.O)("accessibilityRowCount","accessibilityRowCount is deprecated. Use aria-rowcount.");var tz=null!=ez?ez:eL;null!=tz&&(e8["aria-rowcount"]=tz),null!=eB&&(0,d.O)("accessibilityRowIndex","accessibilityRowIndex is deprecated. Use aria-rowindex.");var tL=null!=eP?eP:eB;null!=tL&&(e8["aria-rowindex"]=tL),null!=eN&&(0,d.O)("accessibilityRowSpan","accessibilityRowSpan is deprecated. Use aria-rowspan.");var tP=null!=ej?ej:eN;null!=tP&&(e8["aria-rowspan"]=tP),null!=eU&&(0,d.O)("accessibilitySelected","accessibilitySelected is deprecated. Use aria-selected.");var tB=null!=e$?e$:eU;null!=tB&&(e8["aria-selected"]=tB),null!=eD&&(0,d.O)("accessibilitySetSize","accessibilitySetSize is deprecated. Use aria-setsize.");var tj=null!=eF?eF:eD;null!=tj&&(e8["aria-setsize"]=tj),null!=eH&&(0,d.O)("accessibilitySort","accessibilitySort is deprecated. Use aria-sort.");var tN=null!=eW?eW:eH;null!=tN&&(e8["aria-sort"]=tN),null!=eZ&&(0,d.O)("accessibilityValueMax","accessibilityValueMax is deprecated. Use aria-valuemax.");var t$=null!=eV?eV:eZ;null!=t$&&(e8["aria-valuemax"]=t$),null!=eX&&(0,d.O)("accessibilityValueMin","accessibilityValueMin is deprecated. Use aria-valuemin.");var tU=null!=eq?eq:eX;null!=tU&&(e8["aria-valuemin"]=tU),null!=eK&&(0,d.O)("accessibilityValueNow","accessibilityValueNow is deprecated. Use aria-valuenow.");var tF=null!=eG?eG:eK;null!=tF&&(e8["aria-valuenow"]=tF),null!=eJ&&(0,d.O)("accessibilityValueText","accessibilityValueText is deprecated. Use aria-valuetext.");var tD=null!=eY?eY:eJ;if(null!=tD&&(e8["aria-valuetext"]=tD),null!=eQ){for(var tW in eQ)if(p.call(eQ,tW)){var tH=tW.replace(g,y),tV=eQ[tW];null!=tV&&(e8["data-"+tH]=tV)}}0===e4||"0"===e4||-1===e4||"-1"===e4?e8.tabIndex=e4:(null!=e0&&(0,d.O)("focusable","focusable is deprecated."),!1===e0&&(e8.tabIndex="-1"),"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e?(!1===e0||!0===F)&&(e8.tabIndex="-1"):"button"===e7||"checkbox"===e7||"link"===e7||"radio"===e7||"textbox"===e7||"switch"===e7?!1!==e0&&(e8.tabIndex="0"):!0===e0&&(e8.tabIndex="0")),null!=e5&&(0,d.O)("pointerEvents","props.pointerEvents is deprecated. Use style.pointerEvents");var tZ=(0,c.Z)([e6,e5&&b[e5]],(0,l.Z)({writingDirection:"ltr"},r)),tq=tZ[0],tX=tZ[1];tq&&(e8.className=tq),tX&&(e8.style=tX),null!=e2&&(0,d.O)("nativeID","nativeID is deprecated. Use id.");var tG=null!=e1?e1:e2;return null!=tG&&(e8.id=tG),null!=e3&&(e8["data-testid"]=e3),null==e8.type&&"button"===e&&(e8.type="button"),e8},x=r(2265),_=r(3201),S=(e,t,r)=>{e&&e.constructor===String&&(n=s.propsToAccessibilityComponent(t));var n,o=n||e,i=w(o,t,r),a=x.createElement(o,i);return i.dir?x.createElement(_.Iw,{children:a,direction:i.dir,locale:i.lang}):a}},3013:function(e,t,r){"use strict";var n=r(2319);t.Z={_currentlyFocusedNode:null,currentlyFocusedField(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput(e){null!==e&&(this._currentlyFocusedNode=e,document.activeElement!==e&&n.Z.focus(e))},blurTextInput(e){null!==e&&(this._currentlyFocusedNode=null,document.activeElement===e&&n.Z.blur(e))}}},1213:function(e,t){"use strict";var r=!!("undefined"!=typeof window&&window.document&&window.document.createElement);t.Z=r},7792:function(e,t,r){"use strict";r.d(t,{E5:function(){return u},LO:function(){return o},Uy:function(){return s},YB:function(){return a},_T:function(){return i},hJ:function(){return l},lG:function(){return n},vr:function(){return c}});var n={children:!0,dataSet:!0,dir:!0,id:!0,ref:!0,suppressHydrationWarning:!0,tabIndex:!0,testID:!0,focusable:!0,nativeID:!0},o={"aria-activedescendant":!0,"aria-atomic":!0,"aria-autocomplete":!0,"aria-busy":!0,"aria-checked":!0,"aria-colcount":!0,"aria-colindex":!0,"aria-colspan":!0,"aria-controls":!0,"aria-current":!0,"aria-describedby":!0,"aria-details":!0,"aria-disabled":!0,"aria-errormessage":!0,"aria-expanded":!0,"aria-flowto":!0,"aria-haspopup":!0,"aria-hidden":!0,"aria-invalid":!0,"aria-keyshortcuts":!0,"aria-label":!0,"aria-labelledby":!0,"aria-level":!0,"aria-live":!0,"aria-modal":!0,"aria-multiline":!0,"aria-multiselectable":!0,"aria-orientation":!0,"aria-owns":!0,"aria-placeholder":!0,"aria-posinset":!0,"aria-pressed":!0,"aria-readonly":!0,"aria-required":!0,role:!0,"aria-roledescription":!0,"aria-rowcount":!0,"aria-rowindex":!0,"aria-rowspan":!0,"aria-selected":!0,"aria-setsize":!0,"aria-sort":!0,"aria-valuemax":!0,"aria-valuemin":!0,"aria-valuenow":!0,"aria-valuetext":!0,accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0},i={onClick:!0,onAuxClick:!0,onContextMenu:!0,onGotPointerCapture:!0,onLostPointerCapture:!0,onPointerCancel:!0,onPointerDown:!0,onPointerEnter:!0,onPointerMove:!0,onPointerLeave:!0,onPointerOut:!0,onPointerOver:!0,onPointerUp:!0},a={onBlur:!0,onFocus:!0},s={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},l={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},u={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},c={style:!0}},2050:function(e,t,r){"use strict";function n(){for(var e=arguments.length,t=Array(e),r=0;r{if(null!=t){if("function"==typeof t){t(e);return}if("object"==typeof t){t.current=e;return}console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(t))}})}}r.d(t,{Z:function(){return n}}),r(2265)},9115:function(e,t,r){"use strict";function n(e,t){var r={};for(var n in e)e.hasOwnProperty(n)&&!0===t[n]&&(r[n]=e[n]);return r}r.d(t,{Z:function(){return n}})},9647:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(1435),o=r(2319),i=r(1213),a="__reactLayoutHandler",s=(i.Z,null);function l(e,t){var r=(i.Z&&void 0!==window.ResizeObserver&&null==s&&(s=new window.ResizeObserver(function(e){e.forEach(e=>{var t=e.target,r=t[a];"function"==typeof r&&o.Z.measure(t,(t,n,o,i,a,s)=>{var l={nativeEvent:{layout:{x:t,y:n,width:o,height:i,left:a,top:s}},timeStamp:Date.now()};Object.defineProperty(l.nativeEvent,"target",{enumerable:!0,get:()=>e.target}),r(l)})})})),s);(0,n.Z)(()=>{var r=e.current;null!=r&&(r[a]=t)},[e,t]),(0,n.Z)(()=>{var t=e.current;return null!=t&&null!=r&&("function"==typeof t[a]?r.observe(t):r.unobserve(t)),()=>{null!=t&&null!=r&&r.unobserve(t)}},[e,r])}},1435:function(e,t,r){"use strict";var n=r(2265),o=r(1213).Z?n.useLayoutEffect:n.useEffect;t.Z=o},3201:function(e,t,r){"use strict";r.d(t,{Iw:function(){return u},w1:function(){return l},PE:function(){return c}});var n=r(2265),o=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),i=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","far","glk","he","iw","khw","ks","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),a=new Map,s=(0,n.createContext)({direction:"ltr",locale:"en-US"});function l(e){return!function(e){var t=a.get(e);if(t)return t;var r=!1;if(Intl.Locale){var n=new Intl.Locale(e).maximize().script;r=o.has(n)}else{var s=e.split("-")[0];r=i.has(s)}return a.set(e,r),r}(e)?"ltr":"rtl"}function u(e){var t=e.direction,r=e.locale,o=e.children;return t||r?n.createElement(s.Provider,{children:o,value:{direction:r?l(r):t,locale:r}}):o}function c(){return(0,n.useContext)(s)}},9926:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(2265),o=r(2050);function i(){for(var e=arguments.length,t=Array(e),r=0;r(0,o.Z)(...t),[...t])}},5158:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(2319),o=r(2265),i="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():Object.freeze({});function a(e){var t,r;return e.pointerEvents,e.style,t=()=>e=>{null!=e&&(e.measure=t=>n.Z.measure(e,t),e.measureLayout=(t,r,o)=>n.Z.measureLayout(e,t,o,r),e.measureInWindow=t=>n.Z.measureInWindow(e,t))},(r=o.useRef(i)).current===i&&(r.current=t()),r.current}},4834:function(e,t,r){"use strict";r.d(t,{Z:function(){return $}});var n=r(2265),o=e=>{if(null!=e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect)return e.getBoundingClientRect()},i=()=>{},a={},s=[];function l(e){return e>20?e%20:e}function u(e,t){var r,n,u,c=!1,d=e.changedTouches,f=e.type,h=!0===e.metaKey,p=!0===e.shiftKey,m=d&&d[0].force||0,g=l(d&&d[0].identifier||0),y=d&&d[0].clientX||e.clientX,v=d&&d[0].clientY||e.clientY,b=d&&d[0].pageX||e.pageX,w=d&&d[0].pageY||e.pageY,x="function"==typeof e.preventDefault?e.preventDefault.bind(e):i,_=e.timeStamp;function S(e){return Array.prototype.slice.call(e).map(e=>({force:e.force,identifier:l(e.identifier),get locationX(){return C(e.clientX)},get locationY(){return R(e.clientY)},pageX:e.pageX,pageY:e.pageY,target:e.target,timestamp:_}))}if(null!=d)n=S(d),u=S(e.touches);else{var E=[{force:m,identifier:g,get locationX(){return C(y)},get locationY(){return R(v)},pageX:b,pageY:w,target:e.target,timestamp:_}];n=E,u="mouseup"===f||"dragstart"===f?s:E}var k={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:a,eventPhase:e.eventPhase,isDefaultPrevented:()=>e.defaultPrevented,isPropagationStopped:()=>c,isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:h,shiftKey:p,changedTouches:n,force:m,identifier:g,get locationX(){return C(y)},get locationY(){return R(v)},pageX:b,pageY:w,target:e.target,timestamp:_,touches:u,type:f},persist:i,preventDefault:x,stopPropagation(){c=!0},target:e.target,timeStamp:_,touchHistory:t.touchHistory};function C(e){if(r=r||o(k.currentTarget))return e-r.left}function R(e){if(r=r||o(k.currentTarget))return e-r.top}return k}function c(e){return"touchstart"===e||"mousedown"===e}function d(e){return"touchmove"===e||"mousemove"===e}function f(e){return"touchend"===e||"mouseup"===e||h(e)}function h(e){return"touchcancel"===e||"dragstart"===e}var p="__reactResponderId";function m(e){for(var t=[];null!=e&&e!==document.body;)t.push(e),e=e.parentNode;return t}function g(e){return e.timeStamp||e.timestamp}function y(e){var t=e.identifier;return null==t&&console.error("Touch object is missing identifier."),t}function v(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:g(e)})}function b(e){var t=e.touchBank,r=JSON.stringify(t.slice(0,20));return t.length>20&&(r+=" (original size: "+t.length+")"),r}class w{constructor(){this._touchHistory={touchBank:[],numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0}}recordTouchTrack(e,t){var r=this._touchHistory;if(d(e))t.changedTouches.forEach(e=>{var t;(t=r.touchBank[y(e)])?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=g(e),r.mostRecentTimeStamp=g(e)):console.warn("Cannot record touch move without a touch start.\n","Touch Move: "+v(e)+"\n","Touch Bank: "+b(r))});else if(c(e))t.changedTouches.forEach(e=>{var t,n,o,i;return t=e,n=r,o=y(t),void((i=n.touchBank[o])?(i.touchActive=!0,i.startPageX=t.pageX,i.startPageY=t.pageY,i.startTimeStamp=g(t),i.currentPageX=t.pageX,i.currentPageY=t.pageY,i.currentTimeStamp=g(t),i.previousPageX=t.pageX,i.previousPageY=t.pageY,i.previousTimeStamp=g(t)):n.touchBank[o]={touchActive:!0,startPageX:t.pageX,startPageY:t.pageY,startTimeStamp:g(t),currentPageX:t.pageX,currentPageY:t.pageY,currentTimeStamp:g(t),previousPageX:t.pageX,previousPageY:t.pageY,previousTimeStamp:g(t)},n.mostRecentTimeStamp=g(t))}),r.numberActiveTouches=t.touches.length,1===r.numberActiveTouches&&(r.indexOfSingleActiveTouch=t.touches[0].identifier);else if(f(e)&&(t.changedTouches.forEach(e=>{var t;(t=r.touchBank[y(e)])?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=g(e),r.mostRecentTimeStamp=g(e)):console.warn("Cannot record touch end without a touch start.\n","Touch End: "+v(e)+"\n","Touch Bank: "+b(r))}),r.numberActiveTouches=t.touches.length,1===r.numberActiveTouches))for(var n=r.touchBank,o=0;o1)&&(A=!1),("mousedown"!==l||!A)&&("mousemove"!==l||!A)&&("mousemove"!==l||!(T<1))){if(A&&"mouseup"===l){0===T&&(A=!1);return}var y=c(l)&&(t=e.altKey,r=e.button,n=e.buttons,o=e.ctrlKey,i=e.type,a=!1===t&&!1===o,"touchstart"===i||"touchmove"===i||"mousedown"===i&&(0===r||1===n)&&!!a||"mousemove"===i&&1===n&&!!a),v=d(l),b=f(l),w="scroll"===l,x="select"===l||"selectionchange"===l,_=u(e,M);(y||v||b)&&(e.touches?T=e.touches.length:y?T=1:b&&(T=0),M.recordTouchTrack(l,_.nativeEvent));var S=function(e){for(var t=[],r=[],n="selectionchange"===e.type?m(window.getSelection().anchorNode):null!=e.composedPath?e.composedPath():m(e.target),o=0;o0){var R=O.idPath,z=S.idPath;if(null!=R&&null!=z){var L=function(e,t){var r=e.length,n=t.length;if(0===r||0===n||e[r-1]!==t[n-1])return null;var o=e[0],i=0,a=t[0],s=0;r-n>0&&(o=e[i=r-n],r=n),n-r>0&&(a=t[s=n-r],n=r);for(var l=r;l--;){if(o===a)return o;o=e[i++],a=t[s++]}return null}(R,z);if(null!=L){var P=z.indexOf(L)+(L===O.id?1:0);S={idPath:z.slice(P),nodePath:S.nodePath.slice(P)}}else S=null}null!=S&&null!=(s=function(e,t,r){var n=k[t.type];if(null!=n){for(var o=e.idPath,i=e.nodePath,a=n[0],s=n[1],l=n[2].bubbles,u=function(e,t,n){var i=I(e)[n];if(null!=i&&(r.currentTarget=t,!0===i(r))){var a=o.slice(o.indexOf(e));return{id:e,node:t,idPath:a}}},c=o.length-1;c>=0;c--){var d=u(o[c],i[c],a);if(null!=d)return d;if(!0===r.isPropagationStopped())return}if(l)for(var f=0;f=1&&"\n"!==r&&i}return"select"===e.type}(e),q=b&&!Z&&!function(e,t){if(!t||0===t.length)return!1;for(var r=0;rN++,null==(o=n.useRef(null)).current&&(o.current=r()),o.current),a=n.useRef(!1);n.useEffect(()=>(x.Z&&null==window.__reactResponderSystemActive&&(window.addEventListener("blur",z),P.forEach(e=>{document.addEventListener(e,z)}),L.forEach(e=>{document.addEventListener(e,z,!0)}),window.__reactResponderSystemActive=!0),()=>{B(i)}),[i]),n.useEffect(()=>{var r,n=t,o=n.onMoveShouldSetResponder,s=n.onMoveShouldSetResponderCapture,l=n.onScrollShouldSetResponder,u=n.onScrollShouldSetResponderCapture,c=n.onSelectionChangeShouldSetResponder,d=n.onSelectionChangeShouldSetResponderCapture,f=n.onStartShouldSetResponder,h=n.onStartShouldSetResponderCapture,m=e.current;null!=o||null!=s||null!=l||null!=u||null!=c||null!=d||null!=f||null!=h?(r=t,null!=m&&(m[p]=i),R.set(i,r),a.current=!0):a.current&&(B(i),a.current=!1)},[t,e,i]),n.useDebugValue({isResponder:e.current===O.node}),n.useDebugValue(t)}},131:function(e,t,r){"use strict";function n(e,t){}r.d(t,{O:function(){return n}})},8650:function(e,t){"use strict";t.D=void 0;var r=new WeakMap;function n(e){var t,n,o;return null!=e&&(t=!0===e.disableCache,n=!0===e.disableMix,o=e.transform),function(){for(var e=[],i="",a=null,s=t?null:r,l=Array(arguments.length),u=0;u0;){var c=l.pop();if(null!=c&&!1!==c){if(Array.isArray(c)){for(var d=0;d=0||(o[r]=e[r]);return o}r.d(t,{Z:function(){return n}})},4087:function(e,t,r){"use strict";r.d(t,{YS:function(){return q}});var n=Object.freeze({Text:"Text",NumericLiteral:"NumericLiteral",BooleanLiteral:"BooleanLiteral",StringLiteral:"StringLiteral",Identifier:"Identifier",Equals:"Equals",OpenParen:"OpenParen",CloseParen:"CloseParen",OpenStatement:"OpenStatement",CloseStatement:"CloseStatement",OpenExpression:"OpenExpression",CloseExpression:"CloseExpression",OpenSquareBracket:"OpenSquareBracket",CloseSquareBracket:"CloseSquareBracket",OpenCurlyBracket:"OpenCurlyBracket",CloseCurlyBracket:"CloseCurlyBracket",Comma:"Comma",Dot:"Dot",Colon:"Colon",Pipe:"Pipe",CallOperator:"CallOperator",AdditiveBinaryOperator:"AdditiveBinaryOperator",MultiplicativeBinaryOperator:"MultiplicativeBinaryOperator",ComparisonBinaryOperator:"ComparisonBinaryOperator",UnaryOperator:"UnaryOperator",Set:"Set",If:"If",For:"For",In:"In",Is:"Is",NotIn:"NotIn",Else:"Else",EndIf:"EndIf",ElseIf:"ElseIf",EndFor:"EndFor",And:"And",Or:"Or",Not:"UnaryOperator"}),o=Object.freeze({set:n.Set,for:n.For,in:n.In,is:n.Is,if:n.If,else:n.Else,endif:n.EndIf,elif:n.ElseIf,endfor:n.EndFor,and:n.And,or:n.Or,not:n.Not,"not in":n.NotIn,true:n.BooleanLiteral,false:n.BooleanLiteral}),i=class{constructor(e,t){this.value=e,this.type=t}};function a(e){return/\w/.test(e)}function s(e){return/[0-9]/.test(e)}var l=[["{%",n.OpenStatement],["%}",n.CloseStatement],["{{",n.OpenExpression],["}}",n.CloseExpression],["(",n.OpenParen],[")",n.CloseParen],["{",n.OpenCurlyBracket],["}",n.CloseCurlyBracket],["[",n.OpenSquareBracket],["]",n.CloseSquareBracket],[",",n.Comma],[".",n.Dot],[":",n.Colon],["|",n.Pipe],["<=",n.ComparisonBinaryOperator],[">=",n.ComparisonBinaryOperator],["==",n.ComparisonBinaryOperator],["!=",n.ComparisonBinaryOperator],["<",n.ComparisonBinaryOperator],[">",n.ComparisonBinaryOperator],["+",n.AdditiveBinaryOperator],["-",n.AdditiveBinaryOperator],["*",n.MultiplicativeBinaryOperator],["/",n.MultiplicativeBinaryOperator],["%",n.MultiplicativeBinaryOperator],["=",n.Equals]],u=new Map([["n","\n"],["t"," "],["r","\r"],["b","\b"],["f","\f"],["v","\v"],["'","'"],['"','"'],["\\","\\"]]),c=class{type="Statement"},d=class extends c{constructor(e){super(),this.body=e}type="Program"},f=class extends c{constructor(e,t,r){super(),this.test=e,this.body=t,this.alternate=r}type="If"},h=class extends c{constructor(e,t,r){super(),this.loopvar=e,this.iterable=t,this.body=r}type="For"},p=class extends c{constructor(e,t){super(),this.assignee=e,this.value=t}type="Set"},m=class extends c{type="Expression"},g=class extends m{constructor(e,t,r){super(),this.object=e,this.property=t,this.computed=r}type="MemberExpression"},y=class extends m{constructor(e,t){super(),this.callee=e,this.args=t}type="CallExpression"},v=class extends m{constructor(e){super(),this.value=e}type="Identifier"},b=class extends m{constructor(e){super(),this.value=e}type="Literal"},w=class extends b{type="NumericLiteral"},x=class extends b{type="StringLiteral"},_=class extends b{type="BooleanLiteral"},S=class extends b{type="ArrayLiteral"},E=class extends b{type="TupleLiteral"},k=class extends b{type="ObjectLiteral"},C=class extends m{constructor(e,t,r){super(),this.operator=e,this.left=t,this.right=r}type="BinaryExpression"},R=class extends m{constructor(e,t){super(),this.operand=e,this.filter=t}type="FilterExpression"},A=class extends m{constructor(e,t,r){super(),this.operand=e,this.negate=t,this.test=r}type="TestExpression"},T=class extends m{constructor(e,t){super(),this.operator=e,this.argument=t}type="UnaryExpression"},O=class extends m{constructor(e,t,r){super(),this.start=e,this.stop=t,this.step=r}type="SliceExpression"},M=class extends m{constructor(e,t){super(),this.key=e,this.value=t}type="KeywordArgumentExpression"};function I(e,t,r=1){void 0===t&&(t=e,e=0);let n=[];for(let o=e;o=0?(t=(t??=0)<0?Math.max(e.length+t,0):Math.min(t,e.length),r=(r??=e.length)<0?Math.max(e.length+r,0):Math.min(r,e.length)):(t=(t??=e.length-1)<0?Math.max(e.length+t,-1):Math.min(t,e.length-1),r=(r??=-1)<-1?Math.max(e.length+r,-1):Math.min(r,e.length-1));let i=[];for(let a=t;o*ae.toUpperCase())}var P=class{type="RuntimeValue";value;builtins=new Map;constructor(e){this.value=e}__bool__(){return new N(!!this.value)}},B=class extends P{type="NumericValue"},j=class extends P{type="StringValue";builtins=new Map([["upper",new D(()=>new j(this.value.toUpperCase()))],["lower",new D(()=>new j(this.value.toLowerCase()))],["strip",new D(()=>new j(this.value.trim()))],["title",new D(()=>new j(L(this.value)))],["length",new B(this.value.length)]])},N=class extends P{type="BooleanValue"},$=class extends P{type="ObjectValue";__bool__(){return new N(this.value.size>0)}builtins=new Map([["get",new D(([e,t])=>{if(!(e instanceof j))throw Error(`Object key must be a string: got ${e.type}`);return this.value.get(e.value)??t??new W})],["items",new D(()=>new U(Array.from(this.value.entries()).map(([e,t])=>new U([new j(e),t]))))]])},U=class extends P{type="ArrayValue";builtins=new Map([["length",new B(this.value.length)]]);__bool__(){return new N(this.value.length>0)}},F=class extends U{type="TupleValue"},D=class extends P{type="FunctionValue"},W=class extends P{type="NullValue"},H=class extends P{type="UndefinedValue"},V=class{constructor(e){this.parent=e}variables=new Map([["namespace",new D(e=>{if(0===e.length)return new $(new Map);if(1!==e.length||!(e[0]instanceof $))throw Error("`namespace` expects either zero arguments or a single object argument");return e[0]})]]);tests=new Map([["boolean",e=>"BooleanValue"===e.type],["callable",e=>e instanceof D],["odd",e=>{if("NumericValue"!==e.type)throw Error(`Cannot apply test "odd" to type: ${e.type}`);return e.value%2!=0}],["even",e=>{if("NumericValue"!==e.type)throw Error(`Cannot apply test "even" to type: ${e.type}`);return e.value%2==0}],["false",e=>"BooleanValue"===e.type&&!e.value],["true",e=>"BooleanValue"===e.type&&e.value],["number",e=>"NumericValue"===e.type],["integer",e=>"NumericValue"===e.type&&Number.isInteger(e.value)],["iterable",e=>e instanceof U||e instanceof j],["lower",e=>{let t=e.value;return"StringValue"===e.type&&t===t.toLowerCase()}],["upper",e=>{let t=e.value;return"StringValue"===e.type&&t===t.toUpperCase()}],["none",e=>"NullValue"===e.type],["defined",e=>"UndefinedValue"!==e.type],["undefined",e=>"UndefinedValue"===e.type],["equalto",(e,t)=>e.value===t.value]]);set(e,t){return this.declareVariable(e,function e(t){switch(typeof t){case"number":return new B(t);case"string":return new j(t);case"boolean":return new N(t);case"object":if(null===t)return new W;if(Array.isArray(t))return new U(t.map(e));return new $(new Map(Object.entries(t).map(([t,r])=>[t,e(r)])));case"function":return new D((r,n)=>e(t(...r.map(e=>e.value))??null));default:throw Error(`Cannot convert to runtime value: ${t}`)}}(t))}declareVariable(e,t){if(this.variables.has(e))throw SyntaxError(`Variable already declared: ${e}`);return this.variables.set(e,t),t}setVariable(e,t){return this.variables.set(e,t),t}resolve(e){if(this.variables.has(e))return this;if(this.parent)return this.parent.resolve(e);throw Error(`Unknown variable: ${e}`)}lookupVariable(e){try{return this.resolve(e).variables.get(e)??new H}catch{return new H}}},Z=class{global;constructor(e){this.global=e??new V}run(e){return this.evaluate(e,this.global)}evaluateBinaryExpression(e,t){let r=this.evaluate(e.left,t);switch(e.operator.value){case"and":return r.__bool__().value?this.evaluate(e.right,t):r;case"or":return r.__bool__().value?r:this.evaluate(e.right,t)}let n=this.evaluate(e.right,t);switch(e.operator.value){case"==":return new N(r.value==n.value);case"!=":return new N(r.value!=n.value)}if(r instanceof H||n instanceof H)throw Error("Cannot perform operation on undefined values");if(r instanceof W||n instanceof W)throw Error("Cannot perform operation on null values");if(r instanceof B&&n instanceof B)switch(e.operator.value){case"+":return new B(r.value+n.value);case"-":return new B(r.value-n.value);case"*":return new B(r.value*n.value);case"/":return new B(r.value/n.value);case"%":return new B(r.value%n.value);case"<":return new N(r.value":return new N(r.value>n.value);case">=":return new N(r.value>=n.value);case"<=":return new N(r.value<=n.value)}else if(r instanceof U&&n instanceof U){if("+"===e.operator.value)return new U(r.value.concat(n.value))}else if(n instanceof U){let t=void 0!==n.value.find(e=>e.value===r.value);switch(e.operator.value){case"in":return new N(t);case"not in":return new N(!t)}}if((r instanceof j||n instanceof j)&&"+"===e.operator.value)return new j(r.value.toString()+n.value.toString());if(r instanceof j&&n instanceof j)switch(e.operator.value){case"in":return new N(n.value.includes(r.value));case"not in":return new N(!n.value.includes(r.value))}if(r instanceof j&&n instanceof $)switch(e.operator.value){case"in":return new N(n.value.has(r.value));case"not in":return new N(!n.value.has(r.value))}throw SyntaxError(`Unknown operator "${e.operator.value}" between ${r.type} and ${n.type}`)}evaluateFilterExpression(e,t){let r=this.evaluate(e.operand,t);if("Identifier"===e.filter.type){let t=e.filter;if(r instanceof U)switch(t.value){case"list":return r;case"first":return r.value[0];case"last":return r.value[r.value.length-1];case"length":return new B(r.value.length);case"reverse":return new U(r.value.reverse());case"sort":return new U(r.value.sort((e,t)=>{if(e.type!==t.type)throw Error(`Cannot compare different types: ${e.type} and ${t.type}`);switch(e.type){case"NumericValue":return e.value-t.value;case"StringValue":return e.value.localeCompare(t.value);default:throw Error(`Cannot compare type: ${e.type}`)}}));default:throw Error(`Unknown ArrayValue filter: ${t.value}`)}else if(r instanceof j)switch(t.value){case"length":return new B(r.value.length);case"upper":return new j(r.value.toUpperCase());case"lower":return new j(r.value.toLowerCase());case"title":return new j(L(r.value));case"capitalize":return new j(r.value.charAt(0).toUpperCase()+r.value.slice(1));case"trim":return new j(r.value.trim());default:throw Error(`Unknown StringValue filter: ${t.value}`)}else if(r instanceof B){if("abs"===t.value)return new B(Math.abs(r.value));throw Error(`Unknown NumericValue filter: ${t.value}`)}else if(r instanceof $)switch(t.value){case"items":return new U(Array.from(r.value.entries()).map(([e,t])=>new U([new j(e),t])));case"length":return new B(r.value.size);default:throw Error(`Unknown ObjectValue filter: ${t.value}`)}throw Error(`Cannot apply filter "${t.value}" to type: ${r.type}`)}if("CallExpression"===e.filter.type){let n=e.filter;if("Identifier"!==n.callee.type)throw Error(`Unknown filter: ${n.callee.type}`);let o=n.callee.value;if(r instanceof U){if("selectattr"===o){let e;if(r.value.some(e=>!(e instanceof $)))throw Error("`selectattr` can only be applied to array of objects");if(n.args.some(e=>"StringLiteral"!==e.type))throw Error("arguments of `selectattr` must be strings");let[o,i,a]=n.args.map(e=>this.evaluate(e,t));if(i){let r=t.tests.get(i.value);if(!r)throw Error(`Unknown test: ${i.value}`);e=r}else e=(...e)=>e[0].__bool__().value;return new U(r.value.filter(t=>{let r=t.value.get(o.value);return!!r&&e(r,a)}))}throw Error(`Unknown ArrayValue filter: ${o}`)}throw Error(`Cannot apply filter "${o}" to type: ${r.type}`)}throw Error(`Unknown filter: ${e.filter.type}`)}evaluateTestExpression(e,t){let r=this.evaluate(e.operand,t),n=t.tests.get(e.test.value);if(!n)throw Error(`Unknown test: ${e.test.value}`);let o=n(r);return new N(e.negate?!o:o)}evaluateUnaryExpression(e,t){let r=this.evaluate(e.argument,t);if("not"===e.operator.value)return new N(!r.value);throw SyntaxError(`Unknown operator: ${e.operator.value}`)}evalProgram(e,t){return this.evaluateBlock(e.body,t)}evaluateBlock(e,t){let r="";for(let n of e){let e=this.evaluate(n,t);"NullValue"!==e.type&&"UndefinedValue"!==e.type&&(r+=e.value)}return new j(r)}evaluateIdentifier(e,t){return t.lookupVariable(e.value)}evaluateCallExpression(e,t){let r=[],n=new Map;for(let o of e.args)"KeywordArgumentExpression"===o.type?n.set(o.key.value,this.evaluate(o.value,t)):r.push(this.evaluate(o,t));n.size>0&&r.push(new $(n));let o=this.evaluate(e.callee,t);if("FunctionValue"!==o.type)throw Error(`Cannot call something that is not a function: got ${o.type}`);return o.value(r,t)}evaluateSliceExpression(e,t,r){if(!(e instanceof U||e instanceof j))throw Error("Slice object must be an array or string");let n=this.evaluate(t.start,r),o=this.evaluate(t.stop,r),i=this.evaluate(t.step,r);if(!(n instanceof B||n instanceof H))throw Error("Slice start must be numeric or undefined");if(!(o instanceof B||o instanceof H))throw Error("Slice stop must be numeric or undefined");if(!(i instanceof B||i instanceof H))throw Error("Slice step must be numeric or undefined");return e instanceof U?new U(z(e.value,n.value,o.value,i.value)):new j(z(Array.from(e.value),n.value,o.value,i.value).join(""))}evaluateMemberExpression(e,t){let r,n;let o=this.evaluate(e.object,t);if(e.computed){if("SliceExpression"===e.property.type)return this.evaluateSliceExpression(o,e.property,t);r=this.evaluate(e.property,t)}else r=new j(e.property.value);if(o instanceof $){if(!(r instanceof j))throw Error(`Cannot access property with non-string: got ${r.type}`);n=o.value.get(r.value)??o.builtins.get(r.value)}else if(o instanceof U||o instanceof j){if(r instanceof B)n=o.value.at(r.value),o instanceof j&&(n=new j(o.value.at(r.value)));else if(r instanceof j)n=o.builtins.get(r.value);else throw Error(`Cannot access property with non-string/non-number: got ${r.type}`)}else{if(!(r instanceof j))throw Error(`Cannot access property with non-string: got ${r.type}`);n=o.builtins.get(r.value)}return n instanceof P?n:new H}evaluateSet(e,t){let r=this.evaluate(e.value,t);if("Identifier"===e.assignee.type){let n=e.assignee.value;t.setVariable(n,r)}else if("MemberExpression"===e.assignee.type){let n=e.assignee,o=this.evaluate(n.object,t);if(!(o instanceof $))throw Error("Cannot assign to member of non-object");if("Identifier"!==n.property.type)throw Error("Cannot assign to member with non-identifier property");o.value.set(n.property.value,r)}else throw Error(`Invalid LHS inside assignment expression: ${JSON.stringify(e.assignee)}`);return new W}evaluateIf(e,t){let r=this.evaluate(e.test,t);return this.evaluateBlock(r.__bool__().value?e.body:e.alternate,t)}evaluateFor(e,t){let r=new V(t),n=this.evaluate(e.iterable,r);if(!(n instanceof U))throw Error(`Expected iterable type in for loop: got ${n.type}`);let o="";for(let t=0;t0?n.value[t-1]:new H],["nextitem",ta.value.length?"few":"many"} items to unpack`);for(let e=0;ethis.evaluate(e,t)));case"TupleLiteral":return new F(e.value.map(e=>this.evaluate(e,t)));case"ObjectLiteral":{let r=new Map;for(let[n,o]of e.value){let e=this.evaluate(n,t);if(!(e instanceof j))throw Error(`Object keys must be strings: got ${e.type}`);r.set(e.value,this.evaluate(o,t))}return new $(r)}case"Identifier":return this.evaluateIdentifier(e,t);case"CallExpression":return this.evaluateCallExpression(e,t);case"MemberExpression":return this.evaluateMemberExpression(e,t);case"UnaryExpression":return this.evaluateUnaryExpression(e,t);case"BinaryExpression":return this.evaluateBinaryExpression(e,t);case"FilterExpression":return this.evaluateFilterExpression(e,t);case"TestExpression":return this.evaluateTestExpression(e,t);default:throw SyntaxError(`Unknown node type: ${e.type}`)}}},q=class{parsed;constructor(e){let t=function(e,t={}){let r=[],c=function(e,t={}){return e.endsWith("\n")&&(e=e.slice(0,-1)),e=e.replace(/{#.*?#}/gs,"{##}"),t.lstrip_blocks&&(e=e.replace(/^[ \t]*({[#%])/gm,"$1")),t.trim_blocks&&(e=e.replace(/([#%]})\n/g,"$1")),e.replace(/{##}/g,"").replace(/-%}\s*/g,"%}").replace(/\s*{%-/g,"{%").replace(/-}}\s*/g,"}}").replace(/\s*{{-/g,"{{")}(e,t),d=0,f=e=>{let t="";for(;e(c[d]);){if("\\"===c[d]){if(++d>=c.length)throw SyntaxError("Unexpected end of input");let e=c[d++],r=u.get(e);if(void 0===r)throw SyntaxError(`Unexpected escaped character: ${e}`);t+=r;continue}if(t+=c[d++],d>=c.length)throw SyntaxError("Unexpected end of input")}return t};e:for(;d0){r.push(new i(e,n.Text));continue}}f(e=>/\s/.test(e));let t=c[d];if("-"===t||"+"===t){let e=r.at(-1)?.type;if(e===n.Text||void 0===e)throw SyntaxError(`Unexpected character: ${t}`);switch(e){case n.Identifier:case n.NumericLiteral:case n.BooleanLiteral:case n.StringLiteral:case n.CloseParen:case n.CloseSquareBracket:break;default:{++d;let e=f(s);r.push(new i(`${t}${e}`,e.length>0?n.NumericLiteral:n.UnaryOperator));continue}}}for(let[e,t]of l)if(c.slice(d,d+e.length)===e){r.push(new i(e,t)),d+=e.length;continue e}if("'"===t||'"'===t){++d;let e=f(e=>e!==t);r.push(new i(e,n.StringLiteral)),++d;continue}if(s(t)){let e=f(s);r.push(new i(e,n.NumericLiteral));continue}if(a(t)){let e=f(a),t=Object.hasOwn(o,e)?o[e]:n.Identifier;t===n.In&&r.at(-1)?.type===n.Not?(r.pop(),r.push(new i("not in",n.NotIn))):r.push(new i(e,t));continue}throw SyntaxError(`Unexpected character: ${t}`)}return r}(e,{lstrip_blocks:!0,trim_blocks:!0});this.parsed=function(e){let t=new d([]),r=0;function o(t,n){let o=e[r++];if(!o||o.type!==t)throw Error(`Parser Error: ${n}. ${o.type} !== ${t}.`);return o}function i(...t){return r+t.length<=e.length&&t.every((t,n)=>t===e[r+n].type)}function a(e=!1){let t=e?L:s,o=[t()],a=i(n.Comma);for(;a&&(++r,o.push(t()),i(n.Comma)););return a?new E(o):o[0]}function s(){return function(){let e=l();if(i(n.If)){++r;let t=l();return o(n.Else,"Expected else token"),new f(t,[e],[l()])}return e}()}function l(){let t=u();for(;i(n.Or);){let n=e[r];++r,t=new C(n,t,u())}return t}function u(){let t=c();for(;i(n.And);){let n=e[r];++r,t=new C(n,t,c())}return t}function c(){let t;for(;i(n.Not);){let n=e[r];++r,t=new T(n,c())}return t??function(){let t=m();for(;i(n.ComparisonBinaryOperator)||i(n.In)||i(n.NotIn);){let n=e[r];++r,t=new C(n,t,m())}return t}()}function m(){let t=I();for(;i(n.AdditiveBinaryOperator);){let n=e[r];++r,t=new C(n,t,I())}return t}function b(e){let t=new y(e,function(){o(n.OpenParen,"Expected opening parenthesis for arguments list");let e=function(){let e=[];for(;!i(n.CloseParen);){let t=s();if(i(n.Equals)){if(++r,!(t instanceof v))throw SyntaxError("Expected identifier for keyword argument");t=new M(t,s())}e.push(t),i(n.Comma)&&++r}return e}();return o(n.CloseParen,"Expected closing parenthesis for arguments list"),e}());return i(n.OpenParen)&&(t=b(t)),t}function I(){let t=z();for(;i(n.MultiplicativeBinaryOperator);){let n=e[r];++r,t=new C(n,t,z())}return t}function z(){let t=function(){let t=function(){let t=function(){let t=L();for(;i(n.Dot)||i(n.OpenSquareBracket);){let a;let l=e[r];++r;let u=l.type!==n.Dot;if(u)a=function(){let e=[],t=!1;for(;!i(n.CloseSquareBracket);)i(n.Colon)?(e.push(void 0),++r,t=!0):(e.push(s()),i(n.Colon)&&(++r,t=!0));if(0===e.length)throw SyntaxError("Expected at least one argument for member/slice expression");if(t){if(e.length>3)throw SyntaxError("Expected 0-3 arguments for slice expression");return new O(...e)}return e[0]}(),o(n.CloseSquareBracket,"Expected closing square bracket");else if("Identifier"!==(a=L()).type)throw SyntaxError("Expected identifier following dot operator");t=new g(t,a,u)}return t}();return i(n.OpenParen)?b(t):t}();for(;i(n.Pipe);){++r;let e=L();if(!(e instanceof v))throw SyntaxError("Expected identifier for the filter");i(n.OpenParen)&&(e=b(e)),t=new R(t,e)}return t}();for(;i(n.Is);){++r;let e=i(n.Not);e&&++r;let o=L();if(o instanceof _&&(o=new v(o.value.toString())),!(o instanceof v))throw SyntaxError("Expected identifier for the test");t=new A(t,e,o)}return t}function L(){let t=e[r];switch(t.type){case n.NumericLiteral:return++r,new w(Number(t.value));case n.StringLiteral:return++r,new x(t.value);case n.BooleanLiteral:return++r,new _("true"===t.value);case n.Identifier:return++r,new v(t.value);case n.OpenParen:{++r;let t=a();if(e[r].type!==n.CloseParen)throw SyntaxError(`Expected closing parenthesis, got ${e[r].type} instead`);return++r,t}case n.OpenSquareBracket:{++r;let e=[];for(;!i(n.CloseSquareBracket);)e.push(s()),i(n.Comma)&&++r;return++r,new S(e)}case n.OpenCurlyBracket:{++r;let e=new Map;for(;!i(n.CloseCurlyBracket);){let t=s();o(n.Colon,"Expected colon between key and value in object literal");let a=s();e.set(t,a),i(n.Comma)&&++r}return++r,new k(e)}default:throw SyntaxError(`Unexpected token: ${t.type}`)}}for(;rt!==e[r+n].type)}(n.OpenStatement,n.EndFor);)u.push(t());return new h(i,l,u)}(),o(n.OpenStatement,"Expected {% token"),o(n.EndFor,"Expected endfor token"),o(n.CloseStatement,"Expected %} token");break;default:throw SyntaxError(`Unknown statement type: ${e[r].type}`)}return l}();case n.OpenExpression:return function(){o(n.OpenExpression,"Expected opening expression token");let e=s();return o(n.CloseExpression,"Expected closing expression token"),e}();default:throw SyntaxError(`Unexpected token type: ${e[r].type}`)}}());return t}(t)}render(e){let t=new V;for(let[r,n]of(t.set("false",!1),t.set("true",!0),t.set("raise_exception",e=>{throw Error(e)}),t.set("range",I),Object.entries(e)))t.set(r,n);return new Z(t).run(this.parsed).value}}},3370:function(e,t,r){"use strict";r.d(t,{Tr:function(){return d},fG:function(){return l},pV:function(){return c}});var n=r(281),o=r(9097),i=r(8338),a=r(2265),s=r(2281);let l=(0,a.createContext)(null),u=e=>{let t=(0,a.useContext)(l);if(!t?.Contents)throw Error("tamagui.dev/docs/intro/errors#warning-002");return(0,a.createElement)(t.Contents,e)};u.shouldForwardSpace=!0;let c=({Contents:e})=>{let[t,r]=(0,a.useState)(null);return{AdaptProvider:(0,a.useMemo)(()=>{let t={Contents:e,setWhen:r};return function(e){return(0,s.jsx)(l.Provider,{value:t,children:e.children})}},[e]),when:t}},d=(0,i.$e)(function({platform:e,when:t,children:r}){let i=(0,a.useContext)(l),s=(0,o.GS)(),u=!e;return"touch"===e&&(u=n.wT),"native"===e&&(u=!n.$L),"web"===e&&(u=n.$L),"ios"===e&&(u=n.s),"android"===e&&(u=n.Dt),t&&!s[t]&&(u=!1),(0,n.LI)(()=>{u&&i?.setWhen(t||u)},[t,i,u]),u?r:null},{Contents:u})},9085:function(e,t,r){"use strict";r.d(t,{M:function(){return h}});var n=r(2265);let o=typeof window>"u",i=()=>{},a=(0,n.createContext)({});var s=r(3020),l=r(5390),u=r(2281);let c=n.memo(({children:e,initial:t,isPresent:r,onExitComplete:o,exitVariant:i,enterVariant:a,enterExitVariant:c,presenceAffectsLayout:f,custom:h})=>{let p=(0,s.h)(d),m=(0,n.useId)()||"",g=n.useMemo(()=>({id:m,initial:t,isPresent:r,custom:h,exitVariant:i,enterVariant:a,enterExitVariant:c,onExitComplete:()=>{for(let e of(p.set(m,!0),p.values()))if(!e)return;o?.()},register:()=>(p.set(m,!1),()=>p.delete(m))}),f?void 0:[r,i,a]);return n.useMemo(()=>{p.forEach((e,t)=>p.set(t,!1))},[r]),n.useEffect(()=>{r||p.size||o?.()},[r]),(0,u.jsx)(l.Oy.Provider,{value:g,children:e})});function d(){return new Map}let f=e=>e.key||"",h=({children:e,enterVariant:t,exitVariant:r,enterExitVariant:s,initial:l=!0,onExitComplete:d,exitBeforeEnter:h,presenceAffectsLayout:p=!0,custom:m})=>{let g=(0,n.useContext)(a).forceRender??(o?i:(0,n.useReducer)(e=>Math.random(),0)[1]),y=function(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}(e),v=(0,n.useRef)(y),b=(0,n.useRef)(new Map).current,w=(0,n.useRef)(new Set).current;!function(e,t){e.forEach(e=>{let r=f(e);t.set(r,e)})}(y,b);let x=(0,n.useRef)(!0);if(x.current)return x.current=!1,(0,u.jsx)(u.Fragment,{children:y.map(e=>(0,u.jsx)(c,{isPresent:!0,enterExitVariant:s,exitVariant:r,enterVariant:t,initial:!!l&&void 0,presenceAffectsLayout:p,custom:m,children:e},f(e)))});let _=[...y],S=v.current.map(f),E=y.map(f),k=S.length;for(let e=0;e{if(-1!==E.indexOf(e))return;let n=b.get(e);if(!n)return;let o=S.indexOf(e),i=(0,u.jsx)(c,{isPresent:!1,onExitComplete:()=>{b.delete(e),w.delete(e);let t=v.current.findIndex(t=>t.key===e);v.current.splice(t,1),w.size||(v.current=y,g(),d?.())},presenceAffectsLayout:p,enterExitVariant:s,enterVariant:t,exitVariant:r,custom:m,children:n},f(n));_.splice(o,0,i)}),_=_.map(e=>{let n=e.key;return w.has(n)?e:(0,u.jsx)(c,{isPresent:!0,exitVariant:r,enterVariant:t,enterExitVariant:s,presenceAffectsLayout:p,custom:m,children:e},f(e))}),v.current=_,(0,u.jsx)(u.Fragment,{children:w.size?_:_.map(e=>(0,n.cloneElement)(e))})};h.displayName="AnimatePresence"},3187:function(e,t,r){"use strict";r.d(t,{zx:function(){return S}});var n=r(3924),o=r(8306),i=r(8338),a=r(1676),s=r(1092),l=r(2265);let u=(0,l.createContext)(!1);var c=r(2026),d=r(2875),f=r(925),h=r(4975),p=r(1386),m=r(2202),g=r(9100),y=r(2281),v=r(357);let b=(0,f.i)({color:void 0,ellipse:void 0,fontFamily:void 0,fontSize:void 0,fontStyle:void 0,fontWeight:void 0,letterSpacing:void 0,maxFontSizeMultiplier:void 0,size:void 0,textAlign:void 0,variant:void 0}),w=(0,h.z)(s.K,{name:"Button",tag:"button",context:b,role:"button",focusable:!0,variants:{unstyled:{false:{size:"$true",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",flexDirection:"row",cursor:"pointer",hoverTheme:!0,pressTheme:!0,backgrounded:!0,borderWidth:1,borderColor:"transparent",focusVisibleStyle:{outlineColor:"$outlineColor",outlineStyle:"solid",outlineWidth:2}}},variant:{outlined:{backgroundColor:"transparent",borderWidth:2,borderColor:"$borderColor",hoverStyle:{backgroundColor:"transparent",borderColor:"$borderColorHover"},pressStyle:{backgroundColor:"transparent",borderColor:"$borderColorPress"},focusVisibleStyle:{backgroundColor:"transparent",borderColor:"$borderColorFocus"}}},size:{"...size":o.f,":number":o.f},disabled:{true:{pointerEvents:"none"}}},defaultVariants:{unstyled:"1"===v.env.TAMAGUI_HEADLESS}}),x=(0,h.z)(c.J,{name:"Button",context:b,variants:{unstyled:{false:{userSelect:"none",cursor:"pointer",flexGrow:0,flexShrink:1,ellipse:!0,color:"$color"}}},defaultVariants:{unstyled:"1"===v.env.TAMAGUI_HEADLESS}}),_=w.styleable(function(e,t){let{props:r}=function({textProps:e,...t},{Text:r=S.Text}={Text:S.Text}){let o=(0,l.useContext)(u),i=(0,p.wN)(t,{noNormalize:!0,noExpand:!0}),{icon:s,iconAfter:c,space:f,spaceFlex:h,scaleIcon:b=1,scaleSpace:w=.66,separator:_,noTextWrap:E,fontFamily:k,fontSize:C,fontWeight:R,fontStyle:A,letterSpacing:T,tag:O,ellipse:M,maxFontSizeMultiplier:I,...z}=i,L=i.size||(i.unstyled?void 0:"$true"),P=i.color,B=("number"==typeof L?.5*L:(0,n.yv)(L,{font:k?.[0]==="$"?k:void 0}))*b,[j,N]=[s,c].map((0,a.Zw)({size:B,color:P})),$=f??(0,m.Ve)(B)*w,U=E?[t.children]:(0,d.k)(r,{children:t.children,fontFamily:k,fontSize:C,textProps:e,fontWeight:R,fontStyle:A,letterSpacing:T,ellipse:M,maxFontSizeMultiplier:I},r===x&&!0!==i.unstyled?{unstyled:"1"===v.env.TAMAGUI_HEADLESS,size:L}:void 0),F=(0,g.P9)({space:$,spaceFlex:h,separator:_,direction:"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal",children:[j,...U,N]}),D={size:L,...t.disabled&&{focusable:void 0,focusVisibleStyle:{borderColor:"$background"}},tag:O??(o?"span":"link"===i.accessibilityRole||"link"===i.role?"a":"button"),...z,children:(0,y.jsx)(u.Provider,{value:!0,children:F}),disableClassName:!0};return{spaceSize:$,isNested:o,props:D}}(e);return(0,y.jsx)(w,{...r,ref:t})}),S=(0,i.$e)(_,{Text:x,Icon:e=>{let{children:t,scaleIcon:r=1}=e,{size:o,color:i}=(0,l.useContext)(b),s=("number"==typeof o?.5*o:(0,n.yv)(o))*r;return(0,a.Zw)({size:s,color:i})(t)}})},301:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(2265),o=r(2281);function i(e,t=[]){let r=[],i=()=>{let t=r.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return i.scopeName=e,[function(t,i){let a=n.createContext(i),s=r.length;function l(t){let{scope:r,children:i,...l}=t,u=r?.[e]?.[s]||a,c=n.useMemo(()=>l,Object.values(l));return(0,o.jsx)(u.Provider,{value:c,children:i})}return r=[...r,i],l.displayName=`${t}Provider`,[l,function(r,o,l){let u=o?.[e]?.[s]||a,c=n.useContext(u);if(c)return c;if(void 0!==i)return i;let d=`\`${r}\` must be used within \`${t}\``;if(l?.fallback)return l?.warn!==!1&&console.warn(d),l.fallback;throw Error(d)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(i,...t)]}},3924:function(e,t,r){"use strict";r.d(t,{yv:function(){return i}});var n=r(2202),o=r(5986);let i=(e,t)=>{let r=a(e,t);return(0,n.cG)(r)?+r.val:r?+r:16},a=(e,t)=>{let r=s(e,t);return r?(0,o.iE)().fontsParsed[t?.font||"$body"].size[r]:e},s=(e,t)=>{if("number"==typeof e)return null;let r=t?.relativeSize||0,n=(0,o.iE)().fontsParsed[t?.font||"$body"].size,i=("$true"!==e||"$true"in n?e:"$4")??("$true"in n?"$true":"$4"),a=Object.keys(n),s=a.indexOf(i);-1===s&&i.endsWith(".5")&&(s=a.indexOf(i.replace(".5","")));let l=Math.min(Math.max(0,s+r),a.length-1);return a[l]??i}},8306:function(e,t,r){"use strict";r.d(t,{f:function(){return o}});var n=r(6748);let o=(e,{tokens:t,props:r})=>{if(!e||r.circular)return;if("number"==typeof e)return{paddingHorizontal:.25*e,height:e,borderRadius:r.circular?1e5:.2*e};let o=(0,n.Pj)(e),i=t.radius[e]??t.radius.$true;return{paddingHorizontal:o,height:e,borderRadius:r.circular?1e5:i}}},8970:function(e,t,r){"use strict";r.d(t,{H:function(){return o}});var n=r(5986);let o=(e="$true",{font:t,fontFamily:r,props:o})=>{if(!t)return;let a="$true"===e?function(e){if("object"==typeof e&&i.has(e))return i.get(e);let t="$true"in e.size?e.size:(0,n.lz)().size,r=t.$true,o=r?Object.keys(t).find(e=>"$true"!==e&&t[e].val===r.val):null;return r&&o?(i.set(e,o),o):Object.keys(e.size)[3]}(t):e,s=t.size[a],l=t.lineHeight?.[a],u=t.weight?.[a],c=t.letterSpacing?.[a],d=t.transform?.[a],f=o.fontStyle??t.style?.[a];return{color:o.color??t.color?.[a],fontStyle:f,textTransform:d,fontFamily:r,fontWeight:u,letterSpacing:c,fontSize:s,lineHeight:l}},i=new WeakMap},6748:function(e,t,r){"use strict";r.d(t,{Pj:function(){return s},ap:function(){return a}});var n=r(5986),o=r(2202);let i={shift:0,bounds:[0]},a=(e,t)=>f("size",e,t),s=(e,t)=>f("space",e,t),l={},u={},c={},d={},f=(e,t,r=i)=>{let a=(0,n.lz)({prefixed:!0})[e];if(!(e in l)){c[e]=[],l[e]=[],d[e]=[],u[e]=[];let t=Object.keys(a).map(e=>a[e]).sort((e,t)=>e.val-t.val);for(let r of t)c[e].push(r.key),l[e].push(r);for(let r of t.filter(e=>!e.key.endsWith(".5")))d[e].push(r.key),u[e].push(r)}let s="string"==typeof t,f=(r.excludeHalfSteps?s?d:u:s?c:l)[e],h=r.bounds?.[0]??0,p=r.bounds?.[1]??f.length-1,m=f.indexOf(t),g=r.shift||0;g&&("$true"===t||(0,o.cG)(t)&&"true"===t.name)&&(g+=g>0?1:-1);let y=f[Math.min(p,Math.max(h,m+g))];return("string"==typeof y?a[y]:y)||a.$true}},1676:function(e,t,r){"use strict";r.d(t,{Zw:function(){return s}}),r(8338);var n=r(2265),o=r(8411),i=r(2202);let a=e=>{let t=(0,o.Fg)();return(0,i.E0)(e||t[e]?.get("web")||t.color?.get("web"))},s=e=>{let t=a(e.color);return r=>r&&((0,n.isValidElement)(r)?(0,n.cloneElement)(r,{...e,color:t,...r.props}):(0,n.createElement)(r,e))}},8030:function(e,t,r){"use strict";r.d(t,{o:function(){return h}});var n=r(4975),o=r(1386),i=r(8411),a=r(5377),s=r(2117),l=r(2265),u=r(5275),c=r(2281);function d({colors:e,locations:t,start:r,end:n,...o}){let[{height:i,width:a},d]=l.useState({height:1,width:1}),f=l.useMemo(()=>(function(e,t,r,n,o=1,i=1){let a=e.map((e,r)=>{let n=(0,s.ut)(e);if(t&&t[r]){let e=100*Math.max(0,Math.min(1,t[r]));return`${n} ${e}%`}return n});return`linear-gradient(${function(e,t,r,n){let o,i;let[a,s]=(o=[0,0],Array.isArray(r)&&(o=[null!=r[0]?r[0]:0,null!=r[1]?r[1]:0]),i=[0,1],Array.isArray(n)&&(i=[null!=n[0]?n[0]:0,null!=n[1]?n[1]:1]),[o,i]);return a[0]*=e,s[0]*=e,a[1]*=t,s[1]*=t,90+180*Math.atan2(s[1]-a[1],s[0]-a[0])/Math.PI}(o,i,r,n)}deg, ${a.join(", ")})`})(e,t,r,n,a,i),[e,t,r,n,a,i]);return(0,c.jsx)(u.Z,{...o,style:[o.style,{backgroundImage:f}],onLayout:e=>{let{width:t,height:r}=e.nativeEvent.layout;d(e=>t!==e.width||r!==e.height?{height:r,width:t}:e),o.onLayout&&o.onLayout(e)}})}let f=(0,n.z)(a.FA,{name:"LinearGradient",overflow:"hidden",position:"relative"}),h=f.styleable((e,t)=>{let r=(0,o.wN)(e),{start:n,end:a,colors:s,locations:l,children:u,...h}=r,m=(0,i.Fg)(),g=r.colors?.map(e=>m[e]?.get("web")??e)||[];return(0,c.jsxs)(f,{ref:t,...h,children:[(0,c.jsx)(d,{start:n,end:a,colors:g,locations:l,style:p}),u]})}),p={position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0}},663:function(e,t,r){"use strict";r.d(t,{Ex:function(){return E}});var n=r(4975),o=r(2202),i=r(301),a=r(6748),s=r(8338),l=r(1092),u=r(2265),c=r(2281),d=r(357);let f="Progress",[h,p]=(0,i.b)(f),[m,g]=h(f),y="ProgressIndicator",v=(0,n.z)(l.K,{name:y,variants:{unstyled:{false:{height:"100%",width:"100%",backgrounded:!0}}},defaultVariants:{unstyled:"1"===d.env.TAMAGUI_HEADLESS}}),b=v.styleable(function(e,t){let{__scopeProgress:r,...n}=e,o=g(y,r),i=o.max-(o.value??0),a=-(0===o.width?300:o.width)*(i/100);return(0,c.jsx)(v,{"data-state":x(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,x:a,width:o.width,...!e.unstyled&&{animateOnly:["transform"],opacity:0===o.width?0:1},...n,ref:t})});function w(e,t){return`${Math.round(e/t*100)}%`}function x(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function _(e){return"number"==typeof e}let S=(0,n.z)(l.K,{name:"Progress",variants:{unstyled:{false:{borderRadius:1e5,overflow:"hidden",backgrounded:!0}},size:{"...size":e=>{let t=Math.round(.25*(0,o.Ve)((0,a.ap)(e)));return{height:t,minWidth:20*(0,o.Ve)(t),width:"100%"}}}},defaultVariants:{unstyled:"1"===d.env.TAMAGUI_HEADLESS}}),E=(0,s.$e)(S.styleable(function(e,t){let{__scopeProgress:r,value:n,max:o,getValueLabel:i=w,size:a="$true",...s}=e,l=_(o)&&!Number.isNaN(o)&&o>0?o:100,d=_(n)&&!Number.isNaN(n)&&n<=l&&n>=0?n:null,f=_(d)?i(d,l):void 0,[h,p]=u.useState(0);return(0,c.jsx)(m,{scope:r,value:d,max:l,width:h,children:(0,c.jsx)(S,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":_(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":x(d,l),"data-value":d??void 0,"data-max":l,...!0!==s.unstyled&&{size:a},...s,onLayout:e=>{p(e.nativeEvent.layout.width),s.onLayout?.(e)},ref:t})})}),{Indicator:b})},4363:function(e,t,r){"use strict";let n,o;r.d(t,{Ph:function(){return nC}});var i=r(3370),a=r(9046),s=r(281),l=r(4975),u=r(2202),c=r(9087),d=r(6748),f=r(8338),h=r(3924),p=r(8970),m=r(1676),g=r(1092),y=r(5377),v=r(2026),b=r(2875),w=r(1386),x=r(5986),_=r(9100),S=r(2281),E=r(357);let k=(0,l.z)(g.K,{name:"ListItem",tag:"li",variants:{unstyled:{false:{size:"$true",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",width:"100%",borderColor:"$borderColor",maxWidth:"100%",overflow:"hidden",flexDirection:"row",backgroundColor:"$background"}},size:{"...size":(e,{tokens:t})=>({minHeight:t.size[e],paddingHorizontal:t.space[e],paddingVertical:(0,d.Pj)(t.space[e],{shift:-4})})},active:{true:{hoverStyle:{backgroundColor:"$background"}}},disabled:{true:{opacity:.5,pointerEvents:"none"}}},defaultVariants:{unstyled:"1"===E.env.TAMAGUI_HEADLESS}}),C=(0,l.z)(v.J,{name:"ListItemText",variants:{unstyled:{false:{color:"$color",size:"$true",flexGrow:1,flexShrink:1,ellipse:!0,cursor:"default"}}},defaultVariants:{unstyled:"1"===E.env.TAMAGUI_HEADLESS}}),R=(0,l.z)(C,{name:"ListItemSubtitle",variants:{unstyled:{false:{opacity:.6,maxWidth:"100%",color:"$color"}},size:{"...size":(e,t)=>{let r=(0,d.ap)(e,{shift:-1,excludeHalfSteps:!0});return(0,p.H)(r.key,t)}}},defaultVariants:{unstyled:"1"===E.env.TAMAGUI_HEADLESS}}),A=(0,l.z)(C,{name:"ListItemTitle"}),T=(e,{Text:t=C,Subtitle:r=R,Title:n=A}={Text:C,Subtitle:R,Title:A})=>{let o=(0,w.wN)(e),{children:i,icon:a,iconAfter:s,noTextWrap:l,theme:c,space:d,spaceFlex:f,scaleIcon:p=1,scaleSpace:g=1,unstyled:v=!1,subTitle:E,title:k,color:T,fontWeight:O,fontSize:M,fontFamily:I,letterSpacing:z,textAlign:L,ellipse:P,...B}=o,j=o.size||"$true",N=(0,h.yv)(j)*p,[$,U]=[a,s].map((0,m.Zw)({size:N,color:T})),F=(0,u.Ve)((0,x.lz)().space[o.space]??N)*g,D=(0,b.k)(t,{color:T,fontWeight:O,fontSize:M,fontFamily:I,letterSpacing:z,textAlign:L,ellipse:P,children:i});return{props:{...B,children:(0,S.jsxs)(S.Fragment,{children:[$?(0,S.jsxs)(S.Fragment,{children:[$,(0,S.jsx)(_.LZ,{size:F})]}):null,k||E?(0,S.jsxs)(y.FA,{flex:1,children:["all"===l?k:(0,S.jsx)(n,{size:j,children:k}),E?(0,S.jsx)(S.Fragment,{children:"string"==typeof E&&"all"!==l?(0,S.jsx)(r,{unstyled:v,size:j,children:E}):E}):null,D]}):D,U?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_.LZ,{size:F}),U]}):null]})}}},O=k.styleable(function(e,t){let{props:r}=T(e);return(0,S.jsx)(k,{ref:t,...r})}),M=(0,f.$e)(O,{Text:C,Subtitle:R});var I=r(4624),z=r(6505),L=r(2265),P=r.t(L,2),B=r(7657);let j=({children:e,onOpenChange:t,...r})=>{let n=(0,c.z)(t),o=(0,L.useMemo)(()=>({open:r.open,hidden:r.hidden,disableDrag:r.disableDrag,onOpenChange:n}),[n,r.open,r.hidden,r.disableDrag]);return(0,S.jsx)(B.W.Provider,{value:o,children:e})};var N=r(4905),$=r(1217),U=r(3277);let F={leading:!1},D="Select",W="SelectViewport";var H=r(301);let[V,Z]=(0,H.b)(D),[q,X]=V(D),[G,K]=(0,H.b)(D),[Y,J]=V(D),Q=({__scopeSelect:e,context:t,itemContext:r,children:n})=>(0,S.jsx)(q,{isInSheet:!0,scope:e,...t,children:(0,S.jsx)(Y,{scope:e,...r,children:n})});function ee(e){return en(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function er(e){var t;return null==(t=(en(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function en(e){return e instanceof Node||e instanceof et(e).Node}function eo(e){return e instanceof Element||e instanceof et(e).Element}function ei(e){return e instanceof HTMLElement||e instanceof et(e).HTMLElement}function ea(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof et(e).ShadowRoot)}function es(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=ed(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function el(e){let t=eu(),r=ed(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function eu(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function ec(e){return["html","body","#document"].includes(ee(e))}function ed(e){return et(e).getComputedStyle(e)}function ef(e){return eo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eh(e){if("html"===ee(e))return e;let t=e.assignedSlot||e.parentNode||ea(e)&&e.host||er(e);return ea(t)?t.host:t}function ep(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=eh(t);return ec(r)?t.ownerDocument?t.ownerDocument.body:t.body:ei(r)&&es(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=et(o);return i?t.concat(a,a.visualViewport||[],es(o)?o:[],a.frameElement&&r?ep(a.frameElement):[]):t.concat(o,ep(o,[],r))}function em(e){let t=e.activeElement;for(;(null==(r=t)||null==(r=r.shadowRoot)?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function eg(e,t){if(!e||!t)return!1;let r=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ea(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ey(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function ev(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:r}=e;return t+"/"+r}).join(" "):navigator.userAgent}function eb(e){return 0===e.mozInputSource&&!!e.isTrusted||(e_()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function ew(e){return!ev().includes("jsdom/")&&(!e_()&&0===e.width&&0===e.height||e_()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function ex(){return/apple/i.test(navigator.vendor)}function e_(){let e=/android/i;return e.test(ey())||e.test(ev())}function eS(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function eE(e){return(null==e?void 0:e.ownerDocument)||document}function ek(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function eC(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eR(e){return ei(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function eA(e){e.preventDefault(),e.stopPropagation()}function eT(e){return!!e&&"combobox"===e.getAttribute("role")&&eR(e)}let eO=Math.min,eM=Math.max,eI=Math.round,ez=Math.floor,eL=e=>({x:e,y:e});function eP(e,t){return"function"==typeof e?e(t):e}function eB(e){return e.split("-")[0]}function ej(e){return e.split("-")[1]}function eN(e){return["top","bottom"].includes(eB(e))?"y":"x"}function e$(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function eU(e,t,r){let n,{reference:o,floating:i}=e,a=eN(t),s="x"===eN(t)?"y":"x",l="y"===s?"height":"width",u=eB(t),c="y"===a,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;switch(u){case"top":n={x:d,y:o.y-i.height};break;case"bottom":n={x:d,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-i.width,y:f};break;default:n={x:o.x,y:o.y}}switch(ej(t)){case"start":n[s]-=h*(r&&c?-1:1);break;case"end":n[s]+=h*(r&&c?-1:1)}return n}let eF=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=eU(u,n,l),f=n,h={},p=0;for(let r=0;r{try{return e.matches(t)}catch(e){return!1}})}function eQ(e){return eK(er(e)).left+ef(e).scrollLeft}function e0(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=et(e),n=er(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;let e=eu();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){let t=er(e),r=ef(e),n=e.ownerDocument.body,o=eM(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=eM(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+eQ(e),s=-r.scrollTop;return"rtl"===ed(n).direction&&(a+=eM(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}(er(e));else if(eo(t))n=function(e,t){let r=eK(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ei(e)?eq(e):eL(1),a=e.clientWidth*i.x;return{width:a,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{let r=eG(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return e$(n)}function e1(e,t){return ei(e)&&"fixed"!==ed(e).position?t?t(e):e.offsetParent:null}function e2(e,t){let r=et(e);if(!ei(e)||eJ(e))return r;let n=e1(e,t);for(;n&&["table","td","th"].includes(ee(n))&&"static"===ed(n).position;)n=e1(n,t);return n&&("html"===ee(n)||"body"===ee(n)&&"static"===ed(n).position&&!el(n))?r:n||function(e){let t=eh(e);for(;ei(t)&&!ec(t);){if(el(t))return t;t=eh(t)}return null}(e)||r}let e5=async function(e){let t=this.getOffsetParent||e2,r=this.getDimensions;return{reference:function(e,t,r){let n=ei(t),o=er(t),i="fixed"===r,a=eK(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=eL(0);if(n||!n&&!i){if(("body"!==ee(t)||es(o))&&(s=ef(t)),n){let e=eK(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=eQ(o))}return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}},e6={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,a=er(n),s=!!t&&eJ(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},u=eL(1),c=eL(0),d=ei(n);if((d||!d&&!i)&&(("body"!==ee(n)||es(a))&&(l=ef(n)),ei(n))){let e=eK(n);u=eq(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:er,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[..."clippingAncestors"===r?function(e,t){let r=t.get(e);if(r)return r;let n=ep(e,[],!1).filter(e=>eo(e)&&"body"!==ee(e)),o=null,i="fixed"===ed(e).position,a=i?eh(e):e;for(;eo(a)&&!ec(a);){let t=ed(a),r=el(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||es(a)&&!r&&function e(t,r){let n=eh(t);return!(n===r||!eo(n)||ec(n))&&("fixed"===ed(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):o=t,a=eh(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{let n=e0(t,r,o);return e.top=eM(n.top,e.top),e.right=eO(n.right,e.right),e.bottom=eO(n.bottom,e.bottom),e.left=eM(n.left,e.left),e},e0(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:e2,getElementRects:e5,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=eV(e);return{width:t,height:r}},getScale:eq,isElement:eo,isRTL:function(e){return"rtl"===ed(e).direction}};function e4(e,t,r,n){let o;void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=eZ(e),d=i||a?[...c?ep(c):[],...ep(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let f=c&&l?function(e,t){let r,n=null,o=er(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();let{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;let h=ez(c),p=ez(o.clientWidth-(u+d)),m={rootMargin:-h+"px "+-p+"px "+-ez(o.clientHeight-(c+f))+"px "+-ez(u)+"px",threshold:eM(0,eO(1,l))||1},g=!0;function y(e){let t=e[0].intersectionRatio;if(t!==l){if(!g)return a();t?a(!1,t):r=setTimeout(()=>{a(!1,1e-7)},100)}g=!1}try{n=new IntersectionObserver(y,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(y,m)}n.observe(e)}(!0),i}(c,r):null,h=-1,p=null;s&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!u&&p.observe(c),p.observe(t));let m=u?eK(e):null;return u&&function t(){let n=eK(e);m&&(n.x!==m.x||n.y!==m.y||n.width!==m.width||n.height!==m.height)&&r(),m=n,o=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(o)}}let e3=(e,t,r)=>{let n=new Map,o={platform:e6,...r},i={...o.platform,_c:n};return eF(e,t,{...o,platform:i})};var e8=r(4887),e7="undefined"!=typeof document?L.useLayoutEffect:L.useEffect;function e9(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!e9(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!e9(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function te(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){let r=te(e);return Math.round(t*r)/r}function tr(e){let t=L.useRef(e);return e7(()=>{t.current=e}),t}var tn='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',to="undefined"==typeof Element,ti=to?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ta=!to&&Element.prototype.getRootNode?function(e){var t;return null==e?void 0:null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ts=function e(t,r){void 0===r&&(r=!0);var n,o=null==t?void 0:null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||r&&t&&e(t.parentNode)},tl=function(e){var t,r=null==e?void 0:null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===r||"true"===r},tu=function(e,t,r){if(ts(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(tn));return t&&ti.call(e,tn)&&n.unshift(e),n=n.filter(r)},tc=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ts(a,!1)){if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{ti.call(a,tn)&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var u=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),c=!ts(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(u&&c){var d=e(!0===u?a.children:u.children,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}}return o},td=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},tf=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||tl(e))&&!td(e)?0:e.tabIndex},th=function(e,t){var r=tf(e);return r<0&&t&&!td(e)?0:r},tp=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},tm=function(e){return"INPUT"===e.tagName},tg=function(e,t){for(var r=0;rsummary:first-of-type")?e.parentElement:e;if(ti.call(o,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return tb(e)}else{if("function"==typeof n){for(var i=e;e;){var a=e.parentElement,s=ta(e);if(a&&!a.shadowRoot&&!0===n(a))return tb(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(tv(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1},tx=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var r=0;rtf(t))&&(n=e,!((o=t).disabled||ts(o)||tm(o)&&"hidden"===o.type||tw(o,n)||"DETAILS"===o.tagName&&Array.prototype.slice.apply(o.children).some(function(e){return"SUMMARY"===e.tagName})||tx(o)))},tS=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||t>=0},tE=function e(t){var r=[],n=[];return t.forEach(function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=th(a,i),l=i?e(t.candidates):a;0===s?i?r.push.apply(r,l):r.push(a):n.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})}),n.sort(tp).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(r)},tk=function(e,t){return tE((t=t||{}).getShadowRoot?tc([e],t.includeContainer,{filter:t_.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:tS}):tu(e,t.includeContainer,t_.bind(null,t)))},tC=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==ti.call(e,tn)&&t_(t,e)};let tR={...P},tA=tR.useInsertionEffect||(e=>e());function tT(e){let t=L.useRef(()=>{});return tA(()=>{t.current=e}),L.useCallback(function(){for(var e=arguments.length,r=Array(e),n=0;n=e.current.length}function tB(e,t){return tN(e,{disabledIndices:t})}function tj(e,t){return tN(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tN(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t,a=e.current,s=o?e=>o.includes(e):e=>{let t=a[e];return null==t||t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")},l=r;do l+=n?-i:i;while(l>=0&&l<=a.length-1&&s(l));return l}let t$=0;function tU(e,t){void 0===t&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(t$);let i=()=>null==e?void 0:e.focus({preventScroll:r});o?i():t$=requestAnimationFrame(i)}var tF="undefined"!=typeof document?L.useLayoutEffect:L.useEffect;function tD(){return(tD=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+tH++,tZ=tR.useId||function(){let[e,t]=L.useState(()=>tW?tV():void 0);return tF(()=>{null==e&&t(tV())},[]),L.useEffect(()=>{tW=!0},[]),e},tq=L.createContext(null),tX=L.createContext(null),tG=()=>{var e;return(null==(e=L.useContext(tq))?void 0:e.id)||null},tK=()=>L.useContext(tX);function tY(e){return"data-floating-ui-"+e}function tJ(e){let t=(0,L.useRef)(e);return tF(()=>{t.current=e}),t}function tQ(e,t){let r=e.filter(e=>{var r;return e.parentId===t&&(null==(r=e.context)?void 0:r.open)}),n=r;for(;n.length;)n=e.filter(e=>{var t;return null==(t=n)?void 0:t.some(t=>{var r;return e.parentId===t.id&&(null==(r=e.context)?void 0:r.open)})}),r=r.concat(n);return r}let t0=new WeakMap,t1=new WeakSet,t2={},t5=0,t6=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,t4=e=>e&&(e.host||t4(e.parentNode)),t3=(e,t)=>t.map(t=>{if(e.contains(t))return t;let r=t4(t);return e.contains(r)?r:null}).filter(e=>null!=e);function t8(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);let n=eE(e[0]).body;return function(e,t,r,n){let o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,a=t3(t,e),s=new Set,l=new Set(a),u=[];t2[o]||(t2[o]=new WeakMap);let c=t2[o];return a.forEach(function e(t){!(!t||s.has(t))&&(s.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||l.has(t)||Array.prototype.forEach.call(t.children,t=>{if(s.has(t))e(t);else{let e=i?t.getAttribute(i):null,r=null!==e&&"false"!==e,n=(t0.get(t)||0)+1,a=(c.get(t)||0)+1;t0.set(t,n),c.set(t,a),u.push(t),1===n&&r&&t1.add(t),1===a&&t.setAttribute(o,""),!r&&i&&t.setAttribute(i,"true")}})}(t),s.clear(),t5++,()=>{u.forEach(e=>{let t=(t0.get(e)||0)-1,r=(c.get(e)||0)-1;t0.set(e,t),c.set(e,r),t||(!t1.has(e)&&i&&e.removeAttribute(i),t1.delete(e)),r||e.removeAttribute(o)}),--t5||(t0=new WeakMap,t0=new WeakMap,t1=new WeakSet,t2={})}}(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}let t7=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function t9(e,t){let r=tk(e,t7());"prev"===t&&r.reverse();let n=r.indexOf(em(eE(e)));return r.slice(n+1)[0]}function re(){return t9(document.body,"next")}function rt(){return t9(document.body,"prev")}function rr(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!eg(r,n)}let rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ro(e){"Tab"===e.key&&(e.target,clearTimeout(n))}let ri=L.forwardRef(function(e,t){let[r,n]=L.useState();tF(()=>(ex()&&n("button"),document.addEventListener("keydown",ro),()=>{document.removeEventListener("keydown",ro)}),[]);let o={ref:t,tabIndex:0,role:r,"aria-hidden":!r||void 0,[tY("focus-guard")]:"",style:rn};return L.createElement("span",tD({},e,o))}),ra=L.createContext(null),rs=tY("portal");function rl(e){let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});let{id:t,root:r}=e,n=tZ(),o=ru(),[i,a]=L.useState(null),s=L.useRef(null);return tF(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),tF(()=>{if(s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let r=document.createElement("div");r.id=n,r.setAttribute(rs,""),e.appendChild(r),s.current=r,a(r)},[t,n]),tF(()=>{if(s.current)return;let e=r||(null==o?void 0:o.portalNode);e&&!eo(e)&&(e=e.current),e=e||document.body;let i=null;t&&((i=document.createElement("div")).id=t,e.appendChild(i));let l=document.createElement("div");l.id=n,l.setAttribute(rs,""),(e=i||e).appendChild(l),s.current=l,a(l)},[t,r,n,o]),i}({id:r,root:n}),[a,s]=L.useState(null),l=L.useRef(null),u=L.useRef(null),c=L.useRef(null),d=L.useRef(null),f=!!a&&!a.modal&&a.open&&o&&!!(n||i);return L.useEffect(()=>{if(i&&o&&(null==a||!a.modal))return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&rr(e)&&("focusin"===e.type?function(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}:function(e){tk(e,t7()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(i)}},[i,o,null==a?void 0:a.modal]),L.createElement(ra.Provider,{value:L.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},f&&i&&L.createElement(ri,{"data-type":"outside",ref:l,onFocus:e=>{if(rr(e,i)){var t;null==(t=c.current)||t.focus()}else{let e=rt()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),f&&i&&L.createElement("span",{"aria-owns":i.id,style:rn}),i&&(0,e8.createPortal)(t,i),f&&i&&L.createElement(ri,{"data-type":"outside",ref:u,onFocus:e=>{if(rr(e,i)){var t;null==(t=d.current)||t.focus()}else{let t=re()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent))}}}))}let ru=()=>L.useContext(ra),rc=[];function rd(e){rc=rc.filter(e=>e.isConnected);let t=e;if(t&&"body"!==ee(t)){if(!tC(t,t7())){let e=tk(t,t7())[0];if(!e)return;t=e}rc.push(t),rc.length>20&&(rc=rc.slice(-20))}}function rf(){return rc.slice().reverse().find(e=>e.isConnected)}let rh=L.forwardRef(function(e,t){return L.createElement("button",tD({},e,{type:"button",ref:t,tabIndex:-1,style:rn}))});function rp(e){let{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:d,refs:f,nodeId:h,onOpenChange:p,events:m,dataRef:g,elements:{domReference:y,floating:v}}=t,b="number"==typeof a&&a<0,w=eT(y)&&b,x=!t6()||i,_=tJ(o),S=tJ(a),E=tJ(s),k=tK(),C=ru(),R=L.useRef(null),A=L.useRef(null),T=L.useRef(!1),O=L.useRef(!1),M=null!=C,I=L.useCallback(function(e){return void 0===e&&(e=v),e?tk(e,t7()):[]},[v]),z=L.useCallback(e=>{let t=I(e);return _.current.map(e=>y&&"reference"===e?y:v&&"floating"===e?v:t).filter(Boolean).flat()},[y,v,_,I]);function P(e){return!n&&u&&l?L.createElement(rh,{ref:"start"===e?R:A,onClick:e=>p(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}L.useEffect(()=>{if(n||!l)return;function e(e){if("Tab"===e.key){eg(v,em(eE(v)))&&0===I().length&&!w&&eA(e);let t=z(),r=eC(e);"reference"===_.current[0]&&r===y&&(eA(e),e.shiftKey?tU(t[t.length-1]):tU(t[1])),"floating"===_.current[1]&&r===v&&e.shiftKey&&(eA(e),tU(t[0]))}}let t=eE(v);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[n,y,v,l,_,w,I,z]),L.useEffect(()=>{if(!n&&c&&v&&ei(y))return y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),l||v.addEventListener("focusout",t),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),l||v.removeEventListener("focusout",t)};function e(){O.current=!0,setTimeout(()=>{O.current=!1})}function t(e){let t=e.relatedTarget;queueMicrotask(()=>{let r=!(eg(y,t)||eg(v,t)||eg(t,v)||eg(null==C?void 0:C.portalNode,t)||null!=t&&t.hasAttribute(tY("focus-guard"))||k&&(tQ(k.nodesRef.current,h).find(e=>{var r,n;return eg(null==(r=e.context)?void 0:r.elements.floating,t)||eg(null==(n=e.context)?void 0:n.elements.domReference,t)})||(function(e,t){var r;let n=[],o=null==(r=e.find(e=>e.id===t))?void 0:r.parentId;for(;o;){let t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(n=n.concat(t))}return n})(k.nodesRef.current,h).find(e=>{var r,n;return(null==(r=e.context)?void 0:r.elements.floating)===t||(null==(n=e.context)?void 0:n.elements.domReference)===t})));t&&r&&!O.current&&t!==rf()&&(T.current=!0,p(!1,e))})}},[n,y,v,l,h,k,C,p,c]),L.useEffect(()=>{var e;if(n)return;let t=Array.from((null==C||null==(e=C.portalNode)?void 0:e.querySelectorAll("["+tY("portal")+"]"))||[]);if(v){let e=[v,...t,R.current,A.current,_.current.includes("reference")||w?y:null].filter(e=>null!=e),r=l||w?t8(e,x,!x):t8(e);return()=>{r()}}},[n,y,v,l,_,C,w,x]),tF(()=>{if(n||!v)return;let e=em(eE(v));queueMicrotask(()=>{let t=z(v),r=S.current,n=("number"==typeof r?t[r]:r.current)||v,o=eg(v,e);b||o||!d||tU(n,{preventScroll:n===v})})},[n,d,v,b,z,S]),tF(()=>{if(n||!v)return;let e=!1,t=eE(v),r=em(t),o=g.current;function i(t){let{reason:r,event:n,nested:o}=t;"escape-key"===r&&f.domReference.current&&rd(f.domReference.current),"hover"===r&&"mouseleave"===n.type&&(T.current=!0),"outside-press"===r&&(o?(T.current=!1,e=!0):T.current=!(eb(n)||ew(n)))}return rd(r),m.on("openchange",i),()=>{m.off("openchange",i);let r=em(t),n=eg(v,r)||k&&tQ(k.nodesRef.current,h).some(e=>{var t;return eg(null==(t=e.context)?void 0:t.elements.floating,r)});(n||o.openEvent&&["click","mousedown"].includes(o.openEvent.type))&&f.domReference.current&&rd(f.domReference.current);let a=rf();E.current&&!T.current&&ei(a)&&(a===r||r===t.body||n)&&tU(a,{cancelPrevious:!1,preventScroll:e})}},[n,v,E,g,f,m,k,h]),tF(()=>{if(!n&&C)return C.setFocusManagerState({modal:l,closeOnFocusOut:c,open:d,onOpenChange:p,refs:f}),()=>{C.setFocusManagerState(null)}},[n,C,l,d,p,f,c]),tF(()=>{if(n||!v||"function"!=typeof MutationObserver||b)return;let e=()=>{let e=v.getAttribute("tabindex");_.current.includes("floating")||em(eE(v))!==f.domReference.current&&0===I().length?"0"!==e&&v.setAttribute("tabindex","0"):"-1"!==e&&v.setAttribute("tabindex","-1")};e();let t=new MutationObserver(e);return t.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[n,v,f,_,I,b]);let B=!n&&x&&(M||l);return L.createElement(L.Fragment,null,B&&L.createElement(ri,{"data-type":"inside",ref:null==C?void 0:C.beforeInsideRef,onFocus:e=>{if(l){let e=z();tU("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=C&&C.preserveTabOrder&&C.portalNode){if(T.current=!1,rr(e,C.portalNode)){let e=re()||y;null==e||e.focus()}else{var t;null==(t=C.beforeOutsideRef.current)||t.focus()}}}}),!w&&P("start"),r,P("end"),B&&L.createElement(ri,{"data-type":"inside",ref:null==C?void 0:C.afterInsideRef,onFocus:e=>{if(l)tU(z()[0]);else if(null!=C&&C.preserveTabOrder&&C.portalNode){if(c&&(T.current=!0),rr(e,C.portalNode)){let e=rt()||y;null==e||e.focus()}else{var t;null==(t=C.afterOutsideRef.current)||t.focus()}}}}))}let rm=new Set,rg=L.forwardRef(function(e,t){let{lockScroll:r=!1,...n}=e,o=tZ();return tF(()=>{if(!r)return;rm.add(o);let e=/iP(hone|ad|od)|iOS/.test(ey()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,s=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",i&&(t[n]=i+"px"),e){var l,u;let e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0;Object.assign(t,{position:"fixed",top:-(s-Math.floor((null==(u=window.visualViewport)?void 0:u.offsetTop)||0))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{rm.delete(o),0===rm.size&&(Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s)))}},[o,r]),L.createElement("div",tD({ref:t},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))});function ry(e){return ei(e.target)&&"BUTTON"===e.target.tagName}let rv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rb={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rw=e=>{var t,r;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(r=null==e?void 0:e.outsidePress)||r}};function rx(e){var t;void 0===e&&(e={});let{open:r=!1,onOpenChange:n,nodeId:o}=e,[i,a]=L.useState(null),[s,l]=L.useState(null),u=(null==(t=e.elements)?void 0:t.reference)||i;tF(()=>{u&&(p.current=u)},[u]);let c=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=L.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=L.useState(n);e9(f,n)||h(n);let[p,m]=L.useState(null),[g,y]=L.useState(null),v=L.useCallback(e=>{e!==_.current&&(_.current=e,m(e))},[]),b=L.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),w=i||p,x=a||g,_=L.useRef(null),S=L.useRef(null),E=L.useRef(c),k=null!=l,C=tr(l),R=tr(o),A=L.useCallback(()=>{if(!_.current||!S.current)return;let e={placement:t,strategy:r,middleware:f};R.current&&(e.platform=R.current),e3(_.current,S.current,e).then(e=>{let t={...e,isPositioned:!0};T.current&&!e9(E.current,t)&&(E.current=t,e8.flushSync(()=>{d(t)}))})},[f,t,r,R]);e7(()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let T=L.useRef(!1);e7(()=>(T.current=!0,()=>{T.current=!1}),[]),e7(()=>{if(w&&(_.current=w),x&&(S.current=x),w&&x){if(C.current)return C.current(w,x,A);A()}},[w,x,A,C,k]);let O=L.useMemo(()=>({reference:_,floating:S,setReference:v,setFloating:b}),[v,b]),M=L.useMemo(()=>({reference:w,floating:x}),[w,x]),I=L.useMemo(()=>{let e={position:r,left:0,top:0};if(!M.floating)return e;let t=tt(M.floating,c.x),n=tt(M.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...te(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,M.floating,c.x,c.y]);return L.useMemo(()=>({...c,update:A,refs:O,elements:M,floatingStyles:I}),[c,A,O,M,I])}({...e,elements:{...e.elements,...s&&{reference:s}}}),d=tK(),f=null!=tG(),h=tT((e,t,r)=>{m.current.openEvent=e?t:void 0,g.emit("openchange",{open:e,event:t,reason:r,nested:f}),null==n||n(e,t,r)}),p=L.useRef(null),m=L.useRef({}),g=L.useState(()=>(function(){let e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==r))||[])}}})())[0],y=tZ(),v=L.useCallback(e=>{let t=eo(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),c.refs.setReference(t)},[c.refs]),b=L.useCallback(e=>{(eo(e)||null===e)&&(p.current=e,a(e)),(eo(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!eo(e))&&c.refs.setReference(e)},[c.refs]),w=L.useMemo(()=>({...c.refs,setReference:b,setPositionReference:v,domReference:p}),[c.refs,b,v]),x=L.useMemo(()=>({...c.elements,domReference:u}),[c.elements,u]),_=L.useMemo(()=>({...c,refs:w,elements:x,dataRef:m,nodeId:o,floatingId:y,events:g,open:r,onOpenChange:h}),[c,o,y,g,r,h,w,x]);return tF(()=>{let e=null==d?void 0:d.nodesRef.current.find(e=>e.id===o);e&&(e.context=_)}),L.useMemo(()=>({...c,context:_,refs:w,elements:x}),[c,w,x,_])}let r_="active",rS="selected";function rE(e,t,r){let n=new Map,o="item"===r,i=e;if(o&&e){let{[r_]:t,[rS]:r,...n}=e;i=n}return{..."floating"===r&&{tabIndex:-1},...i,...t.map(t=>{let n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[r,i]=t;if(!(o&&[r_,rS].includes(r))){if(0===r.indexOf("on")){if(n.has(r)||n.set(r,[]),"function"==typeof i){var a;null==(a=n.get(r))||a.push(i),e[r]=function(){for(var e,t=arguments.length,o=Array(t),i=0;ie(...o)).find(e=>void 0!==e)}}}else e[r]=i}}),e),{})}}let rk=!1;function rC(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function rR(e,t){return rC(t,e===tO||e===tM,e===tI||e===tz)}function rA(e,t,r){return rC(t,e===tM,r?e===tI:e===tz)||"Enter"===e||" "===e||""===e}function rT(e,t,r){return rC(t,r?e===tz:e===tI,e===tO)}let rO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function rM(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let rI=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:a=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=e,{rects:d,elements:{floating:f}}=t,h=r.current[a];if(!h)return{};let p={...t,...await eH(-h.offsetTop-f.clientTop-d.reference.height/2-h.offsetHeight/2-i).fn(t)},m=(null==u?void 0:u.current)||f,g=await eD(rM(p,m.scrollHeight),c),y=await eD(p,{...c,elementContext:"reference"}),v=Math.max(0,g.top),b=p.y+v,w=Math.max(0,m.scrollHeight-v-Math.max(0,g.bottom));return m.style.maxHeight=w+"px",m.scrollTop=v,o&&(m.offsetHeight=-l||y.bottom>=-l?(0,e8.flushSync)(()=>o(!0)):(0,e8.flushSync)(()=>o(!1))),n&&(n.current=await eD(rM({...p,y:b},m.offsetHeight),c)),{y:b}}});var rz=r(4582),rL=r(1130),rP=r(6616);let rB=()=>!s.$L||!!(0,rP.S)()&&s.wT,rj="focusScope.autoFocusOnMount",rN="focusScope.autoFocusOnUnmount",r$={bubbles:!1,cancelable:!0},rU=L.forwardRef(function(e,t){let r=function(e,t){let{loop:r=!1,enabled:n=!0,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,forceUnmount:l,children:u,...d}=e,[f,h]=L.useState(null),p=(0,c.z)(i),m=(0,c.z)(s),g=L.useRef(null),y=(0,a.ex)(t,e=>h(e)),v=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(!n||!o)return;let e=new AbortController;function t(t){if(v.paused||!f)return;let r=t.target;f.contains(r)?(r?.addEventListener("blur",i,{signal:e.signal}),g.current=r):rW(g.current,{select:!0})}function r(t){e.abort(),!(v.paused||!f)&&(f.contains(t.relatedTarget)||rW(g.current,{select:!0}))}function i(){g.current=f}return document.addEventListener("focusin",t),document.addEventListener("focusout",r),()=>{e.abort(),document.removeEventListener("focusin",t),document.removeEventListener("focusout",r)}},[o,l,f,v.paused]),L.useEffect(()=>{if(!n||!f||l)return;rH.add(v);let e=document.activeElement;if(!f.contains(e)){let t=new CustomEvent(rj,r$);f.addEventListener(rj,p),f.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(rW(n,{select:t}),document.activeElement!==r)return}(rF(f).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&rW(f))}return()=>{f.removeEventListener(rj,p);let t=new CustomEvent(rN,r$);f.addEventListener(rN,m),f.dispatchEvent(t),t.defaultPrevented||rW(e??document.body,{select:!0}),f.removeEventListener(rN,m),rH.remove(v)}},[n,f,l,p,m,v]);let b=L.useCallback(e=>{if(!o||!r||v.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[o,i]=function(e){let t=rF(e);return[rD(t,e),rD(t.reverse(),e)]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&rW(i,{select:!0})):(e.preventDefault(),r&&rW(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,v.paused]);return{tabIndex:-1,...d,ref:y,onKeyDown:b}}(e,t);return"function"==typeof e.children?(0,S.jsx)(S.Fragment,{children:e.children(r)}):L.cloneElement(L.Children.only(e.children),r)});function rF(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function rD(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function rW(e,{select:t=!1}={}){if(e?.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}let rH=(o=[],{add(e){let t=o[0];e!==t&&t?.pause(),(o=rV(o,e)).unshift(e)},remove(e){o=rV(o,e),o[0]?.resume()}});function rV(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var rZ=r(9097);let rq=e=>{let t=(0,rZ.GS)();return!!e&&(!0===e||!!e&&t[e])},rX=e=>{let t=rq(e.sheetBreakpoint);return!1!==e.open&&t},rG="SelectContent",rK=e=>{var t;let{__scopeSelect:r,children:n,open:o=!1,selectedIndexRef:i,listContentRef:a}=e,l=X("SelectSheetImpl",r),u=J("SelectSheetImpl",r),{setActiveIndex:d,selectedIndex:f,activeIndex:h,forceUpdate:p}=l,{setOpen:m,setSelectedIndex:g}=u,[y,v]=L.useState(0),b=rB(),w=L.useRef([]),x=L.useRef(null),_=L.useRef(null),E=L.useRef(null),k=L.useRef(!1),C=L.useRef(!0),R=L.useRef(),A=L.useRef({isMouseOutside:!1}),[T,O]=L.useState(!1),[M,I]=L.useState(!1),[z,P]=L.useState(0),[B,j]=L.useState(!1),N=L.useRef({});(0,s.LI)(()=>{queueMicrotask(()=>{o||(v(0),I(!1),d(null),O(!1))})},[o,d]),s.$L&&s.C5&&(0,s.LI)(()=>{if(!o)return;let e=e=>{A.current.isMouseOutside&&m(!1)};return document.addEventListener("mouseup",e),()=>{document.removeEventListener("mouseup",e)}},[o]);let{x:$,y:U,strategy:F,context:D,refs:W,update:H}=rx({open:o,onOpenChange:m,placement:"bottom-start",whileElementsMounted:e4,middleware:[{name:"size",options:t={apply({rects:{reference:{width:e}}}){Object.assign(N.current,{minWidth:e+8}),W.floating.current&&Object.assign(W.floating.current.style,N.current)}},async fn(e){let r,n;let{placement:o,rects:i,platform:a,elements:s}=e,{apply:l=()=>{},...u}=eP(t,e),c=await eD(e,u),d=eB(o),f=ej(o),h="y"===eN(o),{width:p,height:m}=i.floating;"top"===d||"bottom"===d?(r=d,n=f===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(n=d,r="end"===f?"top":"bottom");let g=m-c[r],y=p-c[n],v=!e.middlewareData.shift,b=g,w=y;if(h){let e=p-c.left-c.right;w=f||v?eO(y,e):e}else{let e=m-c.top-c.bottom;b=f||v?eO(g,e):e}if(v&&!f){let e=eM(c.left,0),t=eM(c.right,0),r=eM(c.top,0),n=eM(c.bottom,0);h?w=p-2*(0!==e||0!==t?e+t:eM(c.left,c.right)):b=m-2*(0!==r||0!==n?r+n:eM(c.top,c.bottom))}await l({...e,availableWidth:w,availableHeight:b});let x=await a.getDimensions(s.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}},rI({listRef:w,overflowRef:x,index:f,offset:z,onFallbackChange:I,padding:10,minItemsVisible:b?10:4,referenceOverflowThreshold:20}),eH({crossAxis:-5})]}),V=W.floating,Z=o&&y>8,G=o&&V.current&&y(window.addEventListener("resize",H),o&&H(),()=>window.removeEventListener("resize",H)),[H,o]);let K=(0,c.z)(e=>(o?d:g)(e)),Q=[function(e,t){void 0===t&&(t={});let{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,d=L.useRef(),f=L.useRef(!1);return L.useMemo(()=>a?{reference:{onPointerDown(e){d.current=e.pointerType},onMouseDown(e){0!==e.button||eS(d.current,!0)&&u||"click"===s||(r&&l&&(!o.current.openEvent||"mousedown"===o.current.openEvent.type)?n(!1,e.nativeEvent,"click"):(e.preventDefault(),n(!0,e.nativeEvent,"click")))},onClick(e){if("mousedown"===s&&d.current){d.current=void 0;return}eS(d.current,!0)&&u||(r&&l&&(!o.current.openEvent||"click"===o.current.openEvent.type)?n(!1,e.nativeEvent,"click"):n(!0,e.nativeEvent,"click"))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!c||ry(e)||(" "!==e.key||eR(i)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&(r&&l?n(!1,e.nativeEvent,"click"):n(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!c||ry(e)||eR(i))&&" "===e.key&&f.current&&(f.current=!1,r&&l?n(!1,e.nativeEvent,"click"):n(!0,e.nativeEvent,"click"))}}}:{},[a,o,s,u,c,i,l,r,n])}(D,{event:"mousedown",keyboardHandlers:!1}),function(e,t){void 0===t&&(t={});let{open:r,onOpenChange:n,nodeId:o,elements:{reference:i,domReference:a,floating:s},dataRef:l}=e,{enabled:u=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:g,capture:y}=t,v=tK(),b=tT("function"==typeof d?d:()=>!1),w="function"==typeof d?b:d,x=L.useRef(!1),_=L.useRef(!1),{escapeKey:S,outsidePress:E}=rw(g),{escapeKey:k,outsidePress:C}=rw(y),R=tT(e=>{if(!r||!u||!c||"Escape"!==e.key)return;let t=v?tQ(v.nodesRef.current,o):[];if(!S&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach(t=>{var r;if(null!=(r=t.context)&&r.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}n(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),A=tT(e=>{var t;let r=()=>{var t;R(e),null==(t=eC(e))||t.removeEventListener("keydown",r)};null==(t=eC(e))||t.addEventListener("keydown",r)}),T=tT(e=>{let t=x.current;x.current=!1;let r=_.current;if(_.current=!1,"click"===f&&r||t||"function"==typeof w&&!w(e))return;let i=eC(e),l="["+tY("inert")+"]",u=eE(s).querySelectorAll(l),c=eo(i)?i:null;for(;c&&!ec(c);){let e=eh(c);if(ec(e)||!eo(e))break;c=e}if(u.length&&eo(i)&&!i.matches("html,body")&&!eg(i,s)&&Array.from(u).every(e=>!eg(c,e)))return;if(ei(i)&&s){let t=i.clientWidth>0&&i.scrollWidth>i.clientWidth,r=i.clientHeight>0&&i.scrollHeight>i.clientHeight,n=r&&e.offsetX>i.clientWidth;if(r&&"rtl"===ed(i).direction&&(n=e.offsetX<=i.offsetWidth-i.clientWidth),n||t&&e.offsetY>i.clientHeight)return}let d=v&&tQ(v.nodesRef.current,o).some(t=>{var r;return ek(e,null==(r=t.context)?void 0:r.elements.floating)});if(ek(e,s)||ek(e,a)||d)return;let h=v?tQ(v.nodesRef.current,o):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var r;if(null!=(r=t.context)&&r.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}n(!1,e,"outside-press")}),O=tT(e=>{var t;let r=()=>{var t;T(e),null==(t=eC(e))||t.removeEventListener(f,r)};null==(t=eC(e))||t.addEventListener(f,r)});return L.useEffect(()=>{if(!r||!u)return;function e(e){n(!1,e,"ancestor-scroll")}l.current.__escapeKeyBubbles=S,l.current.__outsidePressBubbles=E;let t=eE(s);c&&t.addEventListener("keydown",k?A:R,k),w&&t.addEventListener(f,C?O:T,C);let o=[];return m&&(eo(a)&&(o=ep(a)),eo(s)&&(o=o.concat(ep(s))),!eo(i)&&i&&i.contextElement&&(o=o.concat(ep(i.contextElement)))),(o=o.filter(e=>{var r;return e!==(null==(r=t.defaultView)?void 0:r.visualViewport)})).forEach(t=>{t.addEventListener("scroll",e,{passive:!0})}),()=>{c&&t.removeEventListener("keydown",k?A:R,k),w&&t.removeEventListener(f,C?O:T,C),o.forEach(t=>{t.removeEventListener("scroll",e)})}},[l,s,a,i,c,w,f,r,n,m,u,S,E,R,k,A,T,C,O]),L.useEffect(()=>{x.current=!1},[w,f]),L.useMemo(()=>u?{reference:{onKeyDown:R,[rv[p]]:e=>{h&&n(!1,e.nativeEvent,"reference-press")}},floating:{onKeyDown:R,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[rb[f]]:()=>{x.current=!0}}}:{},[u,h,f,p,n,R])}(D,{outsidePress:!1}),function(e,t){var r;void 0===t&&(t={});let{open:n,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=null!=(r=rO.get(a))?r:a,l=tZ(),u=null!=tG();return L.useMemo(()=>{if(!i)return{};let e={id:o,...s&&{role:s}};return"tooltip"===s||"label"===a?{reference:{["aria-"+("label"===a?"labelledby":"describedby")]:n?o:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":n?o:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:l},..."menu"===s&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}},floating:{...e,..."menu"===s&&{"aria-labelledby":l}},item(e){let{active:t,selected:r}=e,n={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...n,"aria-selected":t&&r};case"combobox":return{...n,...t&&{"aria-selected":!0}}}return{}}}},[i,a,s,n,o,l,u])}(D,{role:"listbox"}),function(e,t){let{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:a,onChange:s}=t,l=tT(s),u=L.useRef(!1),c=L.useRef(null),d=L.useRef(null);return L.useEffect(()=>{if(!o)return;function e(e){if(e.ctrlKey||!t||null==i.current)return;let r=e.deltaY,n=i.current.top>=-.5,o=i.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,s=r<0?-1:1,u=r<0?"max":"min";!(t.scrollHeight<=t.clientHeight)&&(!n&&r>0||!o&&r<0?(e.preventDefault(),(0,e8.flushSync)(()=>{l(e=>e+Math[u](r,a*s))})):/firefox/i.test(ev())&&(t.scrollTop+=r))}let t=(null==a?void 0:a.current)||n.floating;if(r&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{c.current=t.scrollTop,null!=i.current&&(d.current={...i.current})}),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}},[o,r,n.floating,i,a,l]),L.useMemo(()=>o?{floating:{onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){let e=(null==a?void 0:a.current)||n.floating;if(i.current&&e&&u.current){if(null!==c.current){let t=e.scrollTop-c.current;(i.current.bottom<-.5&&t<-1||i.current.top<-.5&&t>1)&&(0,e8.flushSync)(()=>l(e=>e+t))}requestAnimationFrame(()=>{c.current=e.scrollTop})}}}}:{},[o,i,n.floating,a,l])}(D,{enabled:!M&&(G||Z),onChange:P,overflowRef:x,scrollRef:W.floating}),function(e,t){let{open:r,onOpenChange:n,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:d=null,allowEscape:f=!1,loop:h=!1,nested:p=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:w,orientation:x="vertical",cols:_=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:k,dense:C=!1}=t,R=tG(),A=tK(),T=tT(u),O=L.useRef(y),M=L.useRef(null!=d?d:-1),I=L.useRef(null),z=L.useRef(!0),P=L.useRef(T),B=L.useRef(!!a),j=L.useRef(!1),N=L.useRef(!1),$=tJ(w),U=tJ(r),F=tJ(S),[D,W]=L.useState(),[H,V]=L.useState(),Z=tT(function(e,t,r){void 0===r&&(r=!1);let n=e.current[t.current];n&&(g?(W(n.id),null==A||A.events.emit("virtualfocus",n),E&&(E.current=n)):tU(n,{preventScroll:!0,sync:!!(ey().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&ex())&&(rk||j.current)}),requestAnimationFrame(()=>{let e=F.current;e&&n&&(r||!z.current)&&(null==n.scrollIntoView||n.scrollIntoView("boolean"==typeof e?{block:"nearest",inline:"nearest"}:e))}))});tF(()=>{document.createElement("div").focus({get preventScroll(){return rk=!0,!1}})},[]),tF(()=>{c&&(r&&a?O.current&&null!=d&&(N.current=!0,M.current=d,T(d)):B.current&&(M.current=-1,P.current(null)))},[c,r,a,d,T]),tF(()=>{if(c&&r&&a){if(null==l){if(j.current=!1,null==d&&(B.current&&(M.current=-1,Z(s,M)),!B.current&&O.current&&(null!=I.current||!0===O.current&&null==I.current))){let e=0,t=()=>{null==s.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==I.current||rA(I.current,x,m)||p?tB(s,$.current):tj(s,$.current),I.current=null,T(M.current))};t()}}else tP(s,l)||(M.current=l,Z(s,M,N.current),N.current=!1)}},[c,r,a,l,d,p,s,x,m,T,Z,$]),tF(()=>{var e;if(!c||a||!A||g||!B.current)return;let t=A.nodesRef.current,r=null==(e=t.find(e=>e.id===R))||null==(e=e.context)?void 0:e.elements.floating,n=em(eE(a)),o=t.some(e=>e.context&&eg(e.context.elements.floating,n));r&&!o&&z.current&&r.focus({preventScroll:!0})},[c,a,A,R,g]),tF(()=>{if(c&&A&&g&&!R)return A.events.on("virtualfocus",e),()=>{A.events.off("virtualfocus",e)};function e(e){V(e.id),E&&(E.current=e)}},[c,A,g,R,E]),tF(()=>{P.current=T,B.current=!!a}),tF(()=>{r||(I.current=null)},[r]);let q=null!=l,X=L.useMemo(()=>{function e(e){if(!r)return;let t=s.current.indexOf(e);-1!==t&&T(t)}return{onFocus(t){let{currentTarget:r}=t;e(r)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...v&&{onMouseMove(t){let{currentTarget:r}=t;e(r)},onPointerLeave(e){let{pointerType:t}=e;z.current&&"touch"!==t&&(M.current=-1,Z(s,M),T(null),g||tU(o.floating.current,{preventScroll:!0}))}}}},[r,o,Z,v,s,T,g]);return L.useMemo(()=>{if(!c)return{};let e=$.current;function t(t){if(z.current=!1,j.current=!0,!U.current&&t.currentTarget===o.floating.current)return;if(p&&rT(t.key,x,m)){eA(t),n(!1,t.nativeEvent,"list-navigation"),ei(i)&&!g&&i.focus();return}let a=M.current,l=tB(s,e),u=tj(s,e);if("Home"===t.key&&(eA(t),M.current=l,T(M.current)),"End"===t.key&&(eA(t),M.current=u,T(M.current)),_>1){var c;let r=k||Array.from({length:s.current.length},()=>({width:1,height:1})),n=function(e,t,r){let n=[],o=0;return e.forEach((e,i)=>{let{width:a,height:s}=e,l=!1;for(r&&(o=0);!l;){let e=[];for(let r=0;rnull==n[e])?(e.forEach(e=>{n[e]=i}),l=!0):o++}}),[...n]}(r,_,C),o=n.findIndex(t=>null!=t&&!(null!=e&&e.includes(t))),i=n.reduce((t,r,n)=>null==r||null!=e&&e.includes(r)?t:n,-1);if(M.current=n[function(e,t){let{event:r,orientation:n,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,d=u;if(r.key===tO){if(c&&eA(r),-1===u)d=l;else if(d=tN(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(u-ie?r:r-i}tP(e,d)&&(d=u)}if(r.key===tM&&(c&&eA(r),-1===u?d=s:(d=tN(e,{startingIndex:u,amount:i,disabledIndices:a}),o&&u+i>l&&(d=tN(e,{startingIndex:u%i-i,amount:i,disabledIndices:a}))),tP(e,d)&&(d=u)),"both"===n){let t=ez(u/i);r.key===tz&&(c&&eA(r),u%i!=i-1?(d=tN(e,{startingIndex:u,disabledIndices:a}),o&&tL(d,i,t)&&(d=tN(e,{startingIndex:u-u%i-1,disabledIndices:a}))):o&&(d=tN(e,{startingIndex:u-u%i-1,disabledIndices:a})),tL(d,i,t)&&(d=u)),r.key===tI&&(c&&eA(r),u%i!=0?(d=tN(e,{startingIndex:u,disabledIndices:a,decrement:!0}),o&&tL(d,i,t)&&(d=tN(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}))):o&&(d=tN(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a})),tL(d,i,t)&&(d=u));let n=ez(l/i)===t;tP(e,d)&&(d=o&&n?r.key===tI?l:tN(e,{startingIndex:u-u%i-1,disabledIndices:a}):u)}return d}({current:n.map(e=>null!=e?s.current[e]:null)},{event:t,orientation:x,loop:h,cols:_,disabledIndices:(c=[...e||[],void 0],n.flatMap((e,t)=>c.includes(e)?[t]:[])),minIndex:o,maxIndex:i,prevIndex:function(e,t,r,n,o){if(-1===e)return -1;let i=r.indexOf(e);switch(o){case"tl":return i;case"tr":return i+t[e].width-1;case"bl":return i+(t[e].height-1)*n;case"br":return r.lastIndexOf(e)}}(M.current,r,n,_,t.key===tM?"bl":t.key===tz?"tr":"tl"),stopEvent:!0})],T(M.current),"both"===x)return}if(rR(t.key,x)){if(eA(t),r&&!g&&em(t.currentTarget.ownerDocument)===t.currentTarget){M.current=rA(t.key,x,m)?l:u,T(M.current);return}rA(t.key,x,m)?h?M.current=a>=u?f&&a!==s.current.length?-1:l:tN(s,{startingIndex:a,disabledIndices:e}):M.current=Math.min(u,tN(s,{startingIndex:a,disabledIndices:e})):h?M.current=a<=l?f&&-1!==a?s.current.length:u:tN(s,{startingIndex:a,decrement:!0,disabledIndices:e}):M.current=Math.max(l,tN(s,{startingIndex:a,decrement:!0,disabledIndices:e})),tP(s,M.current)?T(null):T(M.current)}}function a(e){"auto"===y&&eb(e.nativeEvent)&&(O.current=!0)}let l=g&&r&&q&&{"aria-activedescendant":H||D},u=s.current.find(e=>(null==e?void 0:e.id)===D);return{reference:{...l,onKeyDown(o){var i,a,l,c,f,h;z.current=!1;let y=0===o.key.indexOf("Arrow"),v=(i=o.key,rC(x,m?i===tI:i===tz,i===tM)),w=rT(o.key,x,m),_=rR(o.key,x),S=(p?v:_)||"Enter"===o.key||""===o.key.trim();if(g&&r){let e,r;let n=null==A?void 0:A.nodesRef.current.find(e=>null==e.parentId),i=A&&n?(a=A.nodesRef.current,l=n.id,r=-1,!function t(n,o){o>r&&(e=n,r=o),tQ(a,n).forEach(e=>{t(e.id,o+1)})}(l,0),a.find(t=>t.id===e)):null;if(y&&i&&E){let e=new KeyboardEvent("keydown",{key:o.key,bubbles:!0});if(v||w){let t=(null==(c=i.context)?void 0:c.elements.domReference)===o.currentTarget,r=w&&!t?null==(f=i.context)?void 0:f.elements.domReference:v?u:null;r&&(eA(o),r.dispatchEvent(e),V(void 0))}if(_&&i.context&&i.context.open&&i.parentId&&o.currentTarget!==i.context.elements.domReference){eA(o),null==(h=i.context.elements.domReference)||h.dispatchEvent(e);return}}return t(o)}if(r||b||!y){if(S&&(I.current=p&&_?null:o.key),p){v&&(eA(o),r?(M.current=tB(s,e),T(M.current)):n(!0,o.nativeEvent,"list-navigation"));return}_&&(null!=d&&(M.current=d),eA(o),!r&&b?n(!0,o.nativeEvent,"list-navigation"):t(o),r&&T(M.current))}},onFocus(){r&&T(null)},onPointerDown:function(e){O.current=y,"auto"===y&&ew(e.nativeEvent)&&(O.current=!0)},onMouseDown:a,onClick:a},floating:{"aria-orientation":"both"===x?void 0:x,...!eT(i)&&l,onKeyDown:t,onPointerMove(){z.current=!0}},item:X}},[i,o,D,H,$,U,s,c,x,m,g,r,q,p,d,b,f,_,h,y,T,n,X,A,E,k,C])}(D,{listRef:w,activeIndex:h||0,selectedIndex:f,onNavigate:d}),function(e,t){var r;let{open:n,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=L.useRef(),m=L.useRef(""),g=L.useRef(null!=(r=null!=h?h:a)?r:-1),y=L.useRef(null),v=tT(s),b=tT(l),w=tJ(c),x=tJ(f);return tF(()=>{n&&(clearTimeout(p.current),y.current=null,m.current="")},[n]),tF(()=>{if(n&&""===m.current){var e;g.current=null!=(e=null!=h?h:a)?e:-1}},[n,h,a]),L.useMemo(()=>{if(!u)return{};function e(e){e?o.current.typing||(o.current.typing=e,b(e)):o.current.typing&&(o.current.typing=e,b(e))}function t(e,t,r){let n=w.current?w.current(t,r):t.find(e=>(null==e?void 0:e.toLocaleLowerCase().indexOf(r.toLocaleLowerCase()))===0);return n?e.indexOf(n):-1}function r(r){let o=i.current;if(m.current.length>0&&" "!==m.current[0]&&(-1===t(o,o,m.current)?e(!1):" "===r.key&&eA(r)),null==o||x.current.includes(r.key)||1!==r.key.length||r.ctrlKey||r.metaKey||r.altKey)return;n&&" "!==r.key&&(eA(r),e(!0)),o.every(e=>{var t,r;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(r=e[1])?void 0:r.toLocaleLowerCase())})&&m.current===r.key&&(m.current="",g.current=y.current),m.current+=r.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,e(!1)},d);let a=g.current,s=t(o,[...o.slice((a||0)+1),...o.slice(0,(a||0)+1)],m.current);-1!==s?(v(s),y.current=s):" "!==r.key&&(m.current="",e(!1))}return{reference:{onKeyDown:r},floating:{onKeyDown:r,onKeyUp(t){" "===t.key&&e(!1)}}}},[u,n,o,i,d,x,w,v,b])}(D,{listRef:a,onMatch:K,selectedIndex:f,activeIndex:h})],ee=function(e){void 0===e&&(e=[]);let t=e,r=L.useCallback(t=>rE(t,e,"reference"),t),n=L.useCallback(t=>rE(t,e,"floating"),t),o=L.useCallback(t=>rE(t,e,"item"),e.map(e=>null==e?void 0:e.item));return L.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}(L.useMemo(()=>Q,Q)),et=L.useMemo(()=>({...ee,getReferenceProps:()=>ee.getReferenceProps({ref:W.reference,className:"SelectTrigger",onKeyDown(e){"Enter"!==e.key&&"Space"!==e.code&&(" "!==e.key||D.dataRef.current.typing)||(e.preventDefault(),m(!0))}}),getFloatingProps:e=>ee.getFloatingProps({ref:W.floating,className:"Select",...e,style:{position:F,top:U??"",left:$??"",outline:0,scrollbarWidth:"none",...N.current,...e?.style},onPointerEnter(){O(!1),A.current.isMouseOutside=!1},onPointerLeave(){A.current.isMouseOutside=!0},onPointerMove(){A.current.isMouseOutside=!1,O(!1)},onKeyDown(){O(!0)},onContextMenu(e){e.preventDefault()},onScroll(e){(0,e8.flushSync)(()=>{v(e.currentTarget.scrollTop)})}})}),[W.reference.current,$,U,W.floating.current,ee]);return(0,s.LI)(()=>{if(o)return R.current=setTimeout(()=>{k.current=!0},300),()=>{clearTimeout(R.current)};k.current=!1,C.current=!0,P(0),I(!1),j(!1)},[o]),(0,s.LI)(()=>{!o&&A.current.isMouseOutside&&(A.current.isMouseOutside=!1)},[o]),(0,s.LI)(()=>{function e(e){let t=e.target;W.floating.current?.contains(t)||_.current?.contains(t)||E.current?.contains(t)||(m(!1),O(!1))}if(o)return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[o,W,m]),L.useEffect(()=>{o&&T&&null!=h&&w.current[h]?.scrollIntoView({block:"nearest"}),v(W.floating.current?.scrollTop??0)},[o,W,T,h]),L.useEffect(()=>{o&&M&&null!=f&&w.current[f]?.scrollIntoView({block:"nearest"})},[o,M,f]),(0,s.LI)(()=>{W.floating.current&&M&&(W.floating.current.style.maxHeight="")},[W,M]),(0,S.jsx)(q,{scope:r,...l,setScrollTop:v,setInnerOffset:P,fallback:M,floatingContext:D,activeIndex:h,canScrollDown:!!G,canScrollUp:!!Z,controlledScrolling:T,blockSelection:B,upArrowRef:_,downArrowRef:E,update:H,children:(0,S.jsx)(Y,{scope:r,...u,allowMouseUpRef:C,allowSelectRef:k,dataRef:D.dataRef,interactions:et,listRef:w,selectTimeoutRef:R,children:n})})},rY="SelectItem",[rJ,rQ]=V(rY),r0=k.styleable(function(e,t){let{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,index:l,...u}=e,{props:c}=T({...!e.unstyled&&{ellipse:!0},...u}),{setSelectedIndex:d,listRef:f,setOpen:h,onChange:p,activeIndexSubscribe:m,valueSubscribe:g,allowMouseUpRef:y,allowSelectRef:v,setValueAtIndex:b,selectTimeoutRef:w,dataRef:x,interactions:_,shouldRenderWebNative:E,size:C,onActiveChange:R,initialValue:A}=J(rY,r),[O,M]=L.useState(A===n);L.useEffect(()=>m(e=>{l===e&&(R(n,l),f?.current[l]?.focus())}),[l]),L.useEffect(()=>g(e=>{M(e===n)}),[n]);let I=L.useId(),z=(0,a.ex)(t,e=>{s.$L&&e instanceof HTMLElement&&f&&(f.current[l]=e)});function P(){d(l),p(n),h(!1)}(0,s.LI)(()=>{b(l,n)},[l,b,n]);let B=L.useMemo(()=>_?_.getItemProps({onTouchMove(){v.current=!0,y.current=!1},onTouchEnd(){v.current=!1,y.current=!0},onKeyDown(e){"Enter"!==e.key&&(" "!==e.key||x?.current.typing)?v.current=!0:(e.preventDefault(),P())},onClick(){v.current&&P()},onMouseUp(){y.current&&(v.current&&P(),clearTimeout(w.current),w.current=setTimeout(()=>{v.current=!0}))}}):{onPress:P},[P]);return(0,S.jsx)(rJ,{scope:r,value:n,textId:I||"",isSelected:O,children:E?(0,S.jsx)("option",{value:n,children:e.children}):(0,S.jsx)(k,{tag:"div",componentName:rY,ref:z,"aria-labelledby":I,"aria-selected":O,"data-state":O?"active":"inactive","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...!e.unstyled&&{backgrounded:!0,pressTheme:!0,hoverTheme:!0,focusTheme:!0,cursor:"default",size:C,outlineOffset:-.5,focusVisibleStyle:{outlineColor:"$outlineColor",outlineWidth:1,outlineStyle:"solid"}},...c,...B})})},{disableTheme:!0});var r1=r(357);let r2="SelectItemText",r5=(0,l.z)(v.J,{name:r2,variants:{unstyled:{false:{userSelect:"none",color:"$color",ellipse:!0}}},defaultVariants:{unstyled:"1"===r1.env.TAMAGUI_HEADLESS}}),r6=r5.styleable(function(e,t){let{__scopeSelect:r,className:n,...o}=e,i=X(r2,r),s=J(r2,r),l=L.useRef(null),u=(0,a.ex)(t,l),c=rQ(r2,r),d=L.useRef();return d.current=(0,S.jsx)(r5,{className:n,size:s.size,id:c.textId,...o,ref:u}),L.useEffect(()=>{s.initialValue!==c.value||i.selectedIndex||i.setSelectedItem(d.current)},[]),L.useEffect(()=>s.valueSubscribe(e=>{e===c.value&&i.setSelectedItem(d.current)}),[c.value]),s.shouldRenderWebNative?(0,S.jsx)(S.Fragment,{children:e.children}):(0,S.jsx)(S.Fragment,{children:d.current})}),r4="SelectScrollUpButton",r3=L.forwardRef((e,t)=>(0,S.jsx)(r9,{componentName:r4,...e,dir:"up",ref:t}));r3.displayName=r4;let r8="SelectScrollDownButton",r7=L.forwardRef((e,t)=>(0,S.jsx)(r9,{componentName:r8,...e,dir:"down",ref:t}));r7.displayName=r8;let r9=L.memo(L.forwardRef((e,t)=>{let{__scopeSelect:r,dir:n,componentName:o,...i}=e,{forceUpdate:s,open:l,fallback:u,setScrollTop:c,setInnerOffset:d,...f}=X(o,r),h=f.floatingContext?.refs.floating,p=L.useRef("idle"),m=f["down"===n?"canScrollDown":"canScrollUp"],g=L.useRef(),{x:v,y:b,refs:w,strategy:x}=rx({open:l&&m,strategy:"fixed",elements:{reference:h?.current},placement:"up"===n?"top":"bottom",middleware:[eH(({rects:e})=>-e.floating.height)],whileElementsMounted:(...e)=>e4(...e,{animationFrame:!0})}),_=(0,a.ex)(t,w.setFloating);if(!m)return null;let E=e=>{h&&(u?h.current&&(h.current.scrollTop-=e,(0,e8.flushSync)(()=>c(h.current?.scrollTop??0))):(0,e8.flushSync)(()=>d(t=>t-e)))};return(0,S.jsx)(y.FA,{ref:_,componentName:o,"aria-hidden":!0,...i,zIndex:1e3,position:x,left:v||0,top:b||0,width:`calc(${(h?.current?.offsetWidth??0)-2}px)`,onPointerEnter:()=>{p.current="active";let e=Date.now();cancelAnimationFrame(g.current),g.current=requestAnimationFrame(function t(){let r=h?.current;if(r){let o=Date.now(),i=o-e;e=o;let a=i/2,s="up"===n?r.scrollTop:r.scrollHeight-r.clientHeight-r.scrollTop,l="up"===n?r.scrollTop-a>0:r.scrollTop+a{p.current="idle",cancelAnimationFrame(g.current)}})})),ne="SelectTrigger",nt=!s.$L||!s.C5||window.matchMedia("(pointer:coarse)").matches,nr=L.forwardRef(function(e,t){let{__scopeSelect:r,disabled:n=!1,unstyled:o=!1,...i}=e,s=X(ne,r),l=J(ne,r),u=(0,a.ex)(t,s.floatingContext?.refs.setReference);return l.shouldRenderWebNative?null:(0,S.jsx)(M,{componentName:ne,unstyled:o,tag:"button",id:l.id,...!o&&{backgrounded:!0,radiused:!0,hoverTheme:!0,pressTheme:!0,focusable:!0,focusVisibleStyle:{outlineStyle:"solid",outlineWidth:2,outlineColor:"$outlineColor"},borderWidth:1,size:l.size},"aria-expanded":s.open,"aria-autocomplete":"none",dir:s.dir,disabled:n,"data-disabled":n?"":void 0,...i,ref:u,...l.interactions?{...l.interactions.getReferenceProps(),...nt?{onPress(){l.setOpen(!s.open)}}:{onMouseDown(){s.floatingContext?.update(),l.setOpen(!s.open)}}}:{onPress(){l.setOpen(!s.open)}}})});var nn=r(9085),no=r(357);let ni=(0,l.z)(g.K,{name:W,variants:{unstyled:{false:{size:"$2",backgroundColor:"$background",elevate:!0,bordered:!0,userSelect:"none",outlineWidth:0}},size:{"...size":(e,{tokens:t})=>({borderRadius:t.radius[e]??e})}},defaultVariants:{unstyled:"1"===no.env.TAMAGUI_HEADLESS}}),na=ni.styleable(function(e,t){let{__scopeSelect:r,children:n,disableScroll:o,...i}=e,l=X(W,r),u=J(W,r),c=rq(l.sheetBreakpoint);if((0,s.LI)(()=>{l.update&&l.update()},[c]),u.shouldRenderWebNative)return(0,S.jsx)(S.Fragment,{children:n});if(c||!s.$L)return(0,S.jsx)(I.b5,{hostName:`${l.scopeKey}SheetContents`,children:(0,S.jsx)(Q,{__scopeSelect:r,itemContext:u,context:l,children:n})});if(!u.interactions)return null;let{style:d,className:f,onScroll:h,...p}=u.interactions.getFloatingProps(),m=(0,a.FE)(t,l.floatingContext?.refs.setFloating);return(0,S.jsxs)(S.Fragment,{children:[!o&&!e.unstyled&&(0,S.jsx)("style",{dangerouslySetInnerHTML:{__html:ns}}),(0,S.jsx)(nn.M,{children:l.open?(0,S.jsx)(rp,{context:l.floatingContext,modal:!1,children:(0,S.jsx)(ni,{size:u.size,role:"presentation",...i,...d,...p,...!e.unstyled&&{overflowY:o?void 0:d.overflow??"auto"},ref:m,children:n},"select-viewport")}):null}),!l.open&&(0,S.jsx)("div",{style:{display:"none"},children:e.children})]})}),ns=` +.is_SelectViewport { + scrollbar-width: none; + -webkit-overflow-scrolling: touch; + overscroll-behavior: contain; +} + +.is_SelectViewport::-webkit-scrollbar{ + display:none +} +`,nl="SelectValue",nu=(0,l.z)(v.J,{name:nl,userSelect:"none"}),nc=nu.styleable(function({__scopeSelect:e,children:t,placeholder:r,...n},o){let i=X(nl,e),s=J(nl,e),l=(0,a.ex)(o,i.onValueNodeChange),u=t??i.selectedItem,c=null==i.value||""===i.value?r??u:u;return(0,S.jsx)(nu,{...!n.unstyled&&{size:s.size,ellipse:!0,pointerEvents:"none"},ref:l,...n,children:function e(t){return L.Children.map(t,t=>{if(t){if(t.type?.staticConfig?.componentName===r2)return t.props.children;if(t.props?.children)return e(t.props.children)}return t})}(c)})}),nd=(0,l.z)(y.sL,{name:"SelectIcon","aria-hidden":!0,children:(0,S.jsx)($.n,{children:"â–¼"})}),nf="SelectItemIndicator",nh=(0,l.z)(y.sL,{name:r2}),np=L.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=J(nf,r),i=rQ(nf,r);return o.shouldRenderWebNative?null:i.isSelected?(0,S.jsx)(nh,{"aria-hidden":!0,...n,ref:t}):null});np.displayName=nf;let nm="SelectGroup",[ng,ny]=V(nm),nv=(0,l.z)(y.FA,{name:nm,width:"100%"}),nb=(0,l.z)(v.J,{tag:"select",backgroundColor:"$background",borderColor:"$borderColor",hoverStyle:{backgroundColor:"$backgroundHover"}}),nw=(0,l.z)(g.K,{name:"NativeSelect",bordered:!0,userSelect:"none",outlineWidth:0,paddingRight:10,variants:{size:{"...size":(e,t)=>{let{tokens:r}=t,n=(0,u.Ve)(r.space[e]);return{borderRadius:r.radius[e]??e,minHeight:r.size[e],paddingRight:n+20,paddingLeft:n,paddingVertical:(0,d.Pj)(e,{shift:-3})}}}},defaultVariants:{size:"$2"}}),nx=L.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=L.useId(),i=X(nm,r),a=J(nm,r),s=a.size??"$true",l=L.useRef(null),u=a.shouldRenderWebNative?(0,S.jsx)(nw,{asChild:!0,size:s,value:i.value,id:a.id,children:(0,S.jsx)(nb,{onChange:e=>{a.onChange(e.currentTarget.value)},size:s,ref:l,style:{color:"var(--color)",appearance:"none"},children:e.children})}):(0,S.jsx)(nv,{role:"group","aria-labelledby":o,...n,ref:t});return(0,S.jsx)(ng,{scope:r,id:o||"",children:u})});nx.displayName=nm;let n_="SelectLabel",nS=L.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=J(n_,r),i=ny(n_,r);return o.shouldRenderWebNative?null:(0,S.jsx)(M,{tag:"div",componentName:n_,fontWeight:"800",id:i.id,size:o.size,...n,ref:t})});nS.displayName=n_,(0,l.z)(z.Z,{name:"SelectSeparator"});let nE=e=>{let t=X("SelectSheetController",e.__scopeSelect),r=rX(t),n=rq(t.sheetBreakpoint),o=(0,c.X)(r);return(0,S.jsx)(j,{onOpenChange:t=>{o()&&e.onOpenChange(t)},open:t.open,hidden:!1===n,children:e.children})},nk=e=>(0,S.jsx)(S.Fragment,{children:e.children}),nC=(0,f.$e)(e=>{let{__scopeSelect:t,native:r,children:n,open:o,defaultOpen:a,onOpenChange:l,value:u,defaultValue:d,onValueChange:f,disablePreventBodyScroll:h,size:p="$true",onActiveChange:m,dir:g,id:y}=e,v=L.useId(),b=t?Object.keys(t)[0]??v:v,{when:w,AdaptProvider:x}=(0,i.pV)({Contents:L.useCallback(()=>(0,S.jsx)(I.$2,{name:`${b}SheetContents`}),[b])}),_=rq(w)||!s.$L?nk:rK,E=L.useReducer(()=>({}),{})[1],[k,C]=L.useState(null),[R,A]=(0,U.T)({prop:o,defaultProp:a||!1,onChange:l}),[T,O]=(0,U.T)({prop:u,defaultProp:d||"",onChange:f,transition:!0});L.useEffect(()=>{R&&P(T)},[R]),L.useEffect(()=>{P(T)},[T]);let[M,z]=L.useState(0),[P,B]=nR(),[j,N]=nR(),$=L.useRef(null),D=L.useRef(null),W=L.useRef([]),[H,V]=L.useState(0),[Z,X]=L.useState(null);(0,s.LI)(()=>{$.current=H,D.current=M});let G=s.$L&&(!0===r||"web"===r||Array.isArray(r)&&r.includes("web")),K=function(e,t,r=F,n=[e]){let o=(0,L.useRef)(null);return(0,L.useEffect)(()=>()=>{o.current?.cancel()},[]),(0,L.useMemo)(()=>(o.current=function(e,t,r){let n,o=!1;function i(){o=!1;let i=arguments;r&&!n&&e.apply(this,i),clearTimeout(n),n=setTimeout(()=>{n=null,r||o||e.apply(this,i),o=!1},t)}return i.cancel=()=>{o=!0},i}(e,1,r.leading),o.current),[r.leading,...n])}(e=>{z(t=>t!==e?("number"==typeof e&&j(e),e):t)},0,{},[]);return(0,S.jsx)(x,{children:(0,S.jsx)(Y,{scope:t,initialValue:L.useMemo(()=>T,[R]),size:p,activeIndexSubscribe:N,valueSubscribe:B,setOpen:A,id:y,onChange:L.useCallback(e=>{O(e),P(e)},[]),onActiveChange:(0,c.z)((...e)=>{m?.(...e)}),setSelectedIndex:V,setValueAtIndex:L.useCallback((e,t)=>{W.current[e]=t},[]),shouldRenderWebNative:G,children:(0,S.jsx)(q,{scope:t,disablePreventBodyScroll:h,dir:g,blockSelection:!1,fallback:!1,selectedItem:k,setSelectedItem:C,forceUpdate:E,valueNode:Z,onValueNodeChange:X,scopeKey:b,sheetBreakpoint:w,activeIndex:M,selectedIndex:H,setActiveIndex:K,value:T,open:R,native:r,children:(0,S.jsx)(nE,{onOpenChange:A,__scopeSelect:t,children:G?n:(0,S.jsx)(_,{activeIndexRef:D,listContentRef:W,selectedIndexRef:$,...e,open:R,value:T,children:n})})})})})},{Adapt:i.Tr,Content:({children:e,__scopeSelect:t,zIndex:r=1e3,...n})=>{let o=X(rG,t),i=J(rG,t),a=(0,rz.C)(),s=rX(o),l=(0,S.jsx)(rL.Q,{forceClassName:!0,name:a,children:e}),u=rB(),c=(0,L.useMemo)(()=>({zIndex:r,pointerEvents:o.open?"auto":"none"}),[o.open]);return i.shouldRenderWebNative?(0,S.jsx)(S.Fragment,{children:e}):s?o.open?(0,S.jsx)(S.Fragment,{children:l}):null:(0,S.jsx)(rl,{children:(0,S.jsx)(rg,{style:c,lockScroll:!o.disablePreventBodyScroll&&!!o.open&&!u,children:(0,S.jsx)(rU,{loop:!0,enabled:!!o.open,trapped:!0,...n,children:l})})})},Group:nx,Icon:nd,Item:r0,ItemIndicator:np,ItemText:r6,Label:nS,ScrollDownButton:r7,ScrollUpButton:r3,Trigger:nr,Value:nc,Viewport:na,Sheet:N.yo.Controlled});function nR(){let e=L.useRef();return e.current||(e.current=new Set),[t=>{e.current.forEach(e=>e(t))},L.useCallback(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])]}nC.displayName=D},6505:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(281),o=r(4975),i=r(2166);let a=(0,o.z)(i.Kq,{name:"Separator",borderColor:"$borderColor",flexShrink:0,borderWidth:0,flex:1,height:0,maxHeight:0,borderBottomWidth:1,y:-.5,variants:{vertical:{true:{y:0,x:-.5,height:n.$L?"initial":"auto",maxHeight:n.$L?"initial":"auto",width:0,maxWidth:0,borderBottomWidth:0,borderRightWidth:1}}}})},4905:function(e,t,r){"use strict";r.d(t,{yo:function(){return tz}});var n,o,i,a,s,l,u,c=r(4975),d=r(5377),f=r(1092),h=r(281);let p="Sheet",m="SheetHandle",g="SheetOverlay",y=h.C5?document.createElement("style"):null;y&&"u">typeof document.head&&document.head.appendChild(y);var v=r(9046),b=r(2166),w=r(8338),x=r(2265),_=function(){return(_=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}"function"==typeof SuppressedError&&SuppressedError;var E="right-scroll-bar-position",k="width-before-scroll-bar";function C(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var R="undefined"!=typeof window?x.useLayoutEffect:x.useEffect,A=new WeakMap,T=(void 0===n&&(n={}),(void 0===o&&(o=function(e){return e}),i=[],a=!1,s={read:function(){if(a)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:null},useMedium:function(e){var t=o(e,a);return i.push(t),function(){i=i.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(a=!0;i.length;){var t=i;i=[],t.forEach(e)}i={push:function(t){return e(t)},filter:function(){return i}}},assignMedium:function(e){a=!0;var t=[];if(i.length){var r=i;i=[],r.forEach(e),t=i}var n=function(){var r=t;t=[],r.forEach(e)},o=function(){return Promise.resolve().then(n)};o(),i={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),i}}}}).options=_({async:!0,ssr:!1},n),s),O=function(){},M=x.forwardRef(function(e,t){var r,n,o,i,a=x.useRef(null),s=x.useState({onScrollCapture:O,onWheelCapture:O,onTouchMoveCapture:O}),l=s[0],u=s[1],c=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,g=e.sideCar,y=e.noIsolation,v=e.inert,b=e.allowPinchZoom,w=e.as,E=S(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),k=(r=[a,t],n=function(e){return r.forEach(function(t){return C(t,e)})},(o=(0,x.useState)(function(){return{value:null,callback:n,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=n,i=o.facade,R(function(){var e=A.get(i);if(e){var t=new Set(e),n=new Set(r),o=i.current;t.forEach(function(e){n.has(e)||C(e,null)}),n.forEach(function(e){t.has(e)||C(e,o)})}A.set(i,r)},[r]),i),M=_(_({},E),l);return x.createElement(x.Fragment,null,p&&x.createElement(g,{sideCar:T,removeScrollBar:h,shards:m,noIsolation:y,inert:v,setCallbacks:u,allowPinchZoom:!!b,lockRef:a}),c?x.cloneElement(x.Children.only(d),_(_({},M),{ref:k})):x.createElement(void 0===w?"div":w,_({},M,{className:f,ref:k}),d))});M.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},M.classNames={fullWidth:k,zeroRight:E};var I=function(e){var t=e.sideCar,r=S(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return x.createElement(n,_({},r))};I.isSideCarExport=!0;var z=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||r.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},L=function(){var e=z();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},P=function(){var e=L();return function(t){return e(t.styles,t.dynamic),null}},B={left:0,top:0,right:0,gap:0},j=function(e){return parseInt(e||"",10)||0},N=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[j(r),j(n),j(o)]},$=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return B;var t=N(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},U=P(),F="data-scroll-locked",D=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(F,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(E," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(k," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(E," .").concat(E," {\n right: 0 ").concat(n,";\n }\n \n .").concat(k," .").concat(k," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(F,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},W=function(){var e=parseInt(document.body.getAttribute(F)||"0",10);return isFinite(e)?e:0},H=function(){x.useEffect(function(){return document.body.setAttribute(F,(W()+1).toString()),function(){var e=W()-1;e<=0?document.body.removeAttribute(F):document.body.setAttribute(F,e.toString())}},[])},V=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n;H();var i=x.useMemo(function(){return $(o)},[o]);return x.createElement(U,{styles:D(i,!t,o,r?"":"!important")})},Z=!1;if("undefined"!=typeof window)try{var q=Object.defineProperty({},"passive",{get:function(){return Z=!0,!0}});window.addEventListener("test",q,q),window.removeEventListener("test",q,q)}catch(e){Z=!1}var X=!!Z&&{passive:!1},G=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},K=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Y(e,r)){var n=J(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Y=function(e,t){return"v"===e?G(t,"overflowY"):G(t,"overflowX")},J=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},Q=function(e,t,r,n,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),s=a*n,l=r.target,u=t.contains(l),c=!1,d=s>0,f=0,h=0;do{var p=J(e,l),m=p[0],g=p[1]-p[2]-a*m;(m||g)&&Y(e,l)&&(f+=g,h+=m),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(o&&0===f||!o&&s>f)?c=!0:!d&&(o&&0===h||!o&&-s>h)&&(c=!0),c},ee=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},et=function(e){return[e.deltaX,e.deltaY]},er=function(e){return e&&"current"in e?e.current:e},en=0,eo=[],ei=(l=function(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),o=x.useState(en++)[0],i=x.useState(function(){return P()})[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;oMath.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=K(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=K(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=o),!o)return!0;var h=n.current||o;return Q(h,t,e,"h"===h?l:u,!0)},[]),l=x.useCallback(function(e){if(eo.length&&eo[eo.length-1]===i){var r="deltaY"in e?et(e):ee(e),n=t.current.filter(function(t){var n;return t.name===e.type&&t.target===e.target&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var o=(a.current.shards||[]).map(er).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?s(e,o[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=x.useCallback(function(e,r,n,o){var i={name:e,delta:r,target:n,should:o};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),c=x.useCallback(function(e){r.current=ee(e),n.current=void 0},[]),d=x.useCallback(function(t){u(t.type,et(t),t.target,s(t,e.lockRef.current))},[]),f=x.useCallback(function(t){u(t.type,ee(t),t.target,s(t,e.lockRef.current))},[]);x.useEffect(function(){return eo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,X),document.addEventListener("touchmove",l,X),document.addEventListener("touchstart",c,X),function(){eo=eo.filter(function(e){return e!==i}),document.removeEventListener("wheel",l,X),document.removeEventListener("touchmove",l,X),document.removeEventListener("touchstart",c,X)}},[]);var h=e.removeScrollBar,p=e.inert;return x.createElement(x.Fragment,null,p?x.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?x.createElement(V,{gapMode:"margin"}):null)},T.useMedium(l),I),ea=x.forwardRef(function(e,t){return x.createElement(M,_({},e,{ref:t,sideCar:ei}))});ea.classNames=M.classNames;var es=r(2281);let el=(0,x.memo)(e=>e.children?(0,es.jsx)(ea,{...e}):null);ea.classNames;var eu=r(6616),ec={OS:"web",select:e=>"web"in e?e.web:e.default,get isTesting(){return!1}};let[ed,ef]=(0,r(301).b)(p),[eh,ep]=ed(p,{});var em=r(3370),eg=r(9085),ey=r(9235),ev=r(5986),eb=r(7562);let ew=()=>{let{groups:e,animationDriver:t,...r}=(0,x.useContext)(eb.s),{animations:n,...o}=(0,ev.iE)();return{...o,...r,animationDriver:t??(0,ev.iE)().animations}};var ex=r(9087),e_=r(4582),eS=r(1130),eE=r(4624),ek=r(3013),eC=()=>{ek.Z.blurTextInput(ek.Z.currentlyFocusedField())},eR={addListener:()=>({remove:()=>{}}),dismiss(){eC()},removeAllListeners(){},removeListener(){}};let eA=()=>{let[e,t]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{let e=eR.addListener("keyboardDidShow",()=>{t(!0)}),r=eR.addListener("keyboardDidHide",()=>{t(!1)});return()=>{r.remove(),e.remove()}},[]),e};var eT=r(7445),eO=r.n(eT),eM=r(7998);class eI{constructor(e){var t=e.onMoreTasks;this._onMoreTasks=t,this._queueStack=[{tasks:[],popable:!0}]}enqueue(e){this._getCurrentQueue().push(e)}enqueueTasks(e){e.forEach(e=>this.enqueue(e))}cancelTasks(e){this._queueStack=this._queueStack.map(t=>(0,eM.Z)((0,eM.Z)({},t),{},{tasks:t.tasks.filter(t=>-1===e.indexOf(t))})).filter((e,t)=>e.tasks.length>0||0===t)}hasTasksToProcess(){return this._getCurrentQueue().length>0}processNext(){var e=this._getCurrentQueue();if(e.length){var t=e.shift();try{"object"==typeof t&&t.gen?this._genPromise(t):"object"==typeof t&&t.run?t.run():(eO()("function"==typeof t,"Expected Function, SimpleTask, or PromiseTask, but got:\n"+JSON.stringify(t,null,2)),t())}catch(e){throw e.message="TaskQueue: Error with task "+(t.name||"")+": "+e.message,e}}}_getCurrentQueue(){var e=this._queueStack.length-1,t=this._queueStack[e];return t.popable&&0===t.tasks.length&&e>0?(this._queueStack.pop(),this._getCurrentQueue()):t.tasks}_genPromise(e){var t=this._queueStack.push({tasks:[],popable:!1}),r=this._queueStack[t-1];e.gen().then(()=>{r.popable=!0,this.hasTasksToProcess()&&this._onMoreTasks()}).catch(t=>{setTimeout(()=>{throw t.message="TaskQueue: Error resolving Promise in task "+e.name+": "+t.message,t},0)})}}class ez{constructor(){this._registry={}}addListener(e,t,r){var n,o,i=(null==(o=(n=this._registry)[e])&&(o=new Set,n[e]=o),o),a={context:r,listener:t,remove(){i.delete(a)}};return i.add(a),a}emit(e){var t=this._registry[e];if(null!=t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o{var t=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)};eP&&window.cancelIdleCallback;var ej=new ez,eN={Events:{interactionStart:"interactionStart",interactionComplete:"interactionComplete"},runAfterInteractions(e){var t=[],r=new Promise(r=>{eZ(),e&&t.push(e),t.push({run:r,name:"resolve "+(e&&e.name||"?")}),eD.enqueueTasks(t)});return{then:r.then.bind(r),done:r.then.bind(r),cancel:()=>{eD.cancelTasks(t)}}},createInteractionHandle(){eZ();var e=++eH;return eU.add(e),e},clearInteractionHandle(e){eO()(!!e,"Must provide a handle to clear."),eZ(),eU.delete(e),eF.add(e)},addListener:ej.addListener.bind(ej),setDeadline(e){eV=e}},e$=new Set,eU=new Set,eF=new Set,eD=new eI({onMoreTasks:eZ}),eW=0,eH=0,eV=-1;function eZ(){eW||(eW=eV>0?setTimeout(eq):eB(eq))}function eq(){eW=0;var e=e$.size;eU.forEach(e=>e$.add(e)),eF.forEach(e=>e$.delete(e));var t=e$.size;if(0!==e&&0===t?ej.emit(eN.Events.interactionComplete):0===e&&0!==t&&ej.emit(eN.Events.interactionStart),0===t){for(var r=Date.now();eD.hasTasksToProcess();)if(eD.processNext(),eV>0&&Date.now()-r>=eV){eZ();break}}eU.clear(),eF.clear()}var eX={centroidDimension:function(e,t,r,n){var o=e.touchBank,i=0,a=0,s=1===e.numberActiveTouches?e.touchBank[e.indexOfSingleActiveTouch]:null;if(null!==s)s.touchActive&&s.currentTimeStamp>t&&(i+=n&&r?s.currentPageX:n&&!r?s.currentPageY:!n&&r?s.previousPageX:s.previousPageY,a=1);else for(var l=0;l=t&&(i+=n&&r?u.currentPageX:n&&!r?u.currentPageY:!n&&r?u.previousPageX:u.previousPageY,a++)}return a>0?i/a:eX.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,t){return eX.centroidDimension(e,t,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,t){return eX.centroidDimension(e,t,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,t){return eX.centroidDimension(e,t,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,t){return eX.centroidDimension(e,t,!1,!1)},currentCentroidX:function(e){return eX.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return eX.centroidDimension(e,0,!1,!0)},noCentroid:-1},eG=eX.currentCentroidXOfTouchesChangedAfter,eK=eX.currentCentroidYOfTouchesChangedAfter,eY=eX.previousCentroidXOfTouchesChangedAfter,eJ=eX.previousCentroidYOfTouchesChangedAfter,eQ=eX.currentCentroidX,e0=eX.currentCentroidY,e1={_initializeGestureState(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove(e,t){e.numberActiveTouches=t.numberActiveTouches,e.moveX=eG(t,e._accountsForMovesUpTo),e.moveY=eK(t,e._accountsForMovesUpTo);var r=e._accountsForMovesUpTo,n=eY(t,r),o=eG(t,r),i=eJ(t,r),a=eK(t,r),s=e.dx+(o-n),l=e.dy+(a-i),u=t.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(s-e.dx)/u,e.vy=(l-e.dy)/u,e.dx=s,e.dy=l,e._accountsForMovesUpTo=t.mostRecentTimeStamp},create(e){var t={handle:null,shouldCancelClick:!1,timeout:null},r={stateID:Math.random(),moveX:0,moveY:0,x0:0,y0:0,dx:0,dy:0,vx:0,vy:0,numberActiveTouches:0,_accountsForMovesUpTo:0};return{panHandlers:{onStartShouldSetResponder:t=>null!=e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(t,r),onMoveShouldSetResponder:t=>null!=e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(t,r),onStartShouldSetResponderCapture:t=>(1===t.nativeEvent.touches.length&&e1._initializeGestureState(r),r.numberActiveTouches=t.touchHistory.numberActiveTouches,null!=e.onStartShouldSetPanResponderCapture&&e.onStartShouldSetPanResponderCapture(t,r)),onMoveShouldSetResponderCapture(t){var n=t.touchHistory;return r._accountsForMovesUpTo!==n.mostRecentTimeStamp&&(e1._updateGestureStateOnMove(r,n),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(t,r))},onResponderGrant:n=>(t.handle||(t.handle=eN.createInteractionHandle()),t.timeout&&clearTimeout(t.timeout),t.shouldCancelClick=!0,r.x0=eQ(n.touchHistory),r.y0=e0(n.touchHistory),r.dx=0,r.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(n,r),null==e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder(n,r)),onResponderReject(n){e2(t,e.onPanResponderReject,n,r)},onResponderRelease(n){e2(t,e.onPanResponderRelease,n,r),e5(t),e1._initializeGestureState(r)},onResponderStart(t){var n=t.touchHistory;r.numberActiveTouches=n.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(t,r)},onResponderMove(t){var n=t.touchHistory;r._accountsForMovesUpTo!==n.mostRecentTimeStamp&&(e1._updateGestureStateOnMove(r,n),e.onPanResponderMove&&e.onPanResponderMove(t,r))},onResponderEnd(n){var o=n.touchHistory;r.numberActiveTouches=o.numberActiveTouches,e2(t,e.onPanResponderEnd,n,r)},onResponderTerminate(n){e2(t,e.onPanResponderTerminate,n,r),e5(t),e1._initializeGestureState(r)},onResponderTerminationRequest:t=>null==e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(t,r),onClickCapture:e=>{!0===t.shouldCancelClick&&(e.stopPropagation(),e.preventDefault())}},getInteractionHandle:()=>t.handle}}};function e2(e,t,r,n){e.handle&&(eN.clearInteractionHandle(e.handle),e.handle=null),t&&t(r,n)}function e5(e){e.timeout=setTimeout(()=>{e.shouldCancelClick=!1},250)}var e6={window:{fontScale:1,height:0,scale:1,width:0},screen:{fontScale:1,height:0,scale:1,width:0}},e4={},e3=eL.Z;function e8(){if(eL.Z){var e,t,r=window;if(r.visualViewport){var n=r.visualViewport;e=Math.round(n.height*n.scale),t=Math.round(n.width*n.scale)}else{var o=r.document.documentElement;e=o.clientHeight,t=o.clientWidth}e6.window={fontScale:1,height:e,scale:r.devicePixelRatio||1,width:t},e6.screen={fontScale:1,height:r.screen.height,scale:r.devicePixelRatio||1,width:r.screen.width}}}function e7(){e8(),Array.isArray(e4.change)&&e4.change.forEach(e=>e(e6))}class e9{static get(e){return e3&&(e3=!1,e8()),eO()(e6[e],"No dimension set for key "+e),e6[e]}static set(e){e&&(eL.Z?eO()(!1,"Dimensions cannot be set in the browser"):(null!=e.screen&&(e6.screen=e.screen),null!=e.window&&(e6.window=e.window)))}static addEventListener(e,t){return e4[e]=e4[e]||[],e4[e].push(t),{remove:()=>{this.removeEventListener(e,t)}}}static removeEventListener(e,t){Array.isArray(e4[e])&&(e4[e]=e4[e].filter(e=>e!==t))}}eL.Z&&(window.visualViewport?window.visualViewport.addEventListener("resize",e7,!1):window.addEventListener("resize",e7,!1));var te=r(5275);let tt=(0,x.createContext)({zIndex:1e5}),tr=(0,x.createContext)(null);function tn(e,t,r=25){return e{let{isHidden:t,controller:r}=(0,ti.$)(),[n,o]=(0,to.T)({prop:r?.open??e.open,defaultProp:e.defaultOpen??!1,onChange:t=>{r?.onOpenChange?.(t),e.onOpenChange?.(t)},strategy:"most-recent-wins",transition:!0});return{open:n,setOpen:o,isHidden:t,controller:r}};var ts=r(3020);let tl=(0,ey.Y)((0,x.forwardRef)(function(e,t){let r=(0,x.useContext)(tt),{animation:n,animationConfig:o,modal:i=!1,zIndex:a=r.zIndex+1,moveOnKeyboardChange:s=!1,unmountChildrenWhenHidden:l=!1,portalProps:u,containerComponent:c=x.Fragment}=e,d=eA(),f=ta(e),[p,m]=(0,x.useState)(null),g=function(e,t,r={}){let n=x.useRef(null),o=x.useRef(null),[i,a]=(0,x.useState)(0),[s,l]=(0,x.useState)(0),u=e.snapPointsMode??"percent",c=e.snapPoints??("percent"===u?[80]:"constant"===u?[256]:["fit"]),d="fit"===c[0],f=(0,x.useMemo)(()=>e.dismissOnSnapToBottom?[...c,0]:c,[JSON.stringify(c),e.dismissOnSnapToBottom]),[h,p]=(0,to.T)({prop:e.position,defaultProp:e.defaultPosition||(t.open?0:-1),onChange:e.onPositionChange,strategy:"most-recent-wins",transition:!0}),m=!1===t.open?-1:h,{open:g}=t,y=(0,x.useCallback)(r=>{e.dismissOnSnapToBottom&&r===f.length-1?t.setOpen(!1):p(r)},[e.dismissOnSnapToBottom,f.length,p,t.setOpen]);g&&e.dismissOnSnapToBottom&&m===f.length-1&&p(0);let v=g&&m<0;(0,x.useEffect)(()=>{v&&y(0)},[y,v]);let{animationDriver:b}=ew();if(!b)throw Error("Must set animations in tamagui.config.ts");let w=(0,ts.h)(()=>({enabled:!1,y:0,paneY:0,paneMinY:0,scrollStartY:-1,drag:()=>{},release:()=>{},scrollLock:!1})),_=e.forceRemoveScrollEnabled??(g&&e.modal),S=f[0];return{screenSize:"percent"===u?i/(("number"==typeof S?S:100)/100):s,maxSnapPoint:S,removeScrollEnabled:_,scrollBridge:w,modal:!!e.modal,open:t.open,setOpen:t.setOpen,hidden:!!t.isHidden,contentRef:o,handleRef:n,frameSize:i,setFrameSize:a,dismissOnOverlayPress:e.dismissOnOverlayPress??!0,dismissOnSnapToBottom:e.dismissOnSnapToBottom??!1,onOverlayComponent:r.onOverlayComponent,scope:e.__scopeSheet,hasFit:d,position:m,snapPoints:f,snapPointsMode:u,setMaxContentSize:l,setPosition:y,setPositionImmediate:p,onlyShowFrame:!1}}(e,f,{onOverlayComponent:m}),{frameSize:w,setFrameSize:_,snapPoints:S,snapPointsMode:E,hasFit:k,position:C,setPosition:R,scrollBridge:A,screenSize:T,setMaxContentSize:O,maxSnapPoint:M}=g,{open:I,controller:z,isHidden:L}=f,P=(0,x.useRef)(null),B=(0,v.ex)(t,P),j=(()=>{let[e,t]=n?Array.isArray(n)?n:[n]:[];return o??(e?{...(0,ev.iE)().animations.animations[e],...t}:null)})(),[N,$]=(0,x.useState)(!1),U=!h.$L&&i&&N,F=(0,x.useContext)(tr),D=(0,x.useCallback)(e=>{$(e)},[]),W=(0,x.useMemo)(()=>S.map(e=>(function(e,t,r,n){if(!r||!n)return 0;if("mixed"===e){if("number"==typeof t)return r-Math.min(r,Math.max(0,t));if("fit"===t)return r-Math.min(r,n);if(t.endsWith("%")){let e=Math.min(100,Math.max(0,Number(t.slice(0,-1))))/100;return Number.isNaN(e)?(console.warn("Invalid snapPoint percentage string"),0):Math.round(r-e*r)}return console.warn("Invalid snapPoint unknown value"),0}if("fit"===e)return 0===t?r:r-Math.min(r,n);if("constant"===e&&"number"==typeof t)return r-Math.min(r,Math.max(0,t));let o=Math.min(100,Math.max(0,Number(t)))/100;return Number.isNaN(o)?(console.warn("Invalid snapPoint percentage"),0):Math.round(r-o*r)})(E,e,T,w)),[T,w,S,E]),{animationDriver:H}=ew(),{useAnimatedNumber:V,useAnimatedNumberStyle:Z,useAnimatedNumberReaction:q}=H,X=H.View??b.Kq;(0,h.LI)(()=>{if(F&&I)return F(!0),()=>{F(!1)}},[F,I]);let G=(0,x.useMemo)(()=>({zIndex:a}),[a]),K=V(10000.1),Y=(0,x.useRef)(10000.1);function J(){K.stop(),A.onFinishAnimate&&(A.onFinishAnimate(),A.onFinishAnimate=void 0)}q({value:K,hostRef:P},(0,x.useCallback)(e=>{Y.current=e,A.paneY=e},[H]));let Q=10000.1===Y.current,ee=(0,ex.z)(e=>{if(0===w)return;let t=L||-1===e?T:W[e];if(Y.current!==t){if(Y.current=t,J(),Q||L){if(K.setValue(T,{type:"timing",duration:0}),L)return;t=W[e],Y.current=t}K.setValue(t,{type:"spring",...j})}});(0,h.LI)(()=>{T&&Q&&K.setValue(T,{type:"timing",duration:0})},[Q,T]),(0,h.LI)(()=>{w&&T&&!L&&(!Q||I)&&ee(C)},[L,w,T,I,C]);let et=e.disableDrag??z?.disableDrag,er=(0,e_.C)(),[en,eo]=(0,x.useState)(!1),ei=(0,x.useMemo)(()=>{if(et||!w||N)return;let e=W[0];A.paneMinY=e;let t=Y.current;function r(e){eo(e),y&&(e?y.innerText=":root * { user-select: none !important; -webkit-user-select: none !important; }":y.innerText="")}let n=({vy:e,dragAt:n})=>{a=!1,r(!1);let o=n+t+w*e*.2,i=0,s=1/0;for(let e=0;et?o-t:t-o;r{n({vy:t.vy,dragAt:t.dy})},i=()=>{r(!0),J(),t=Y.current},a=!1;return A.drag=r=>{a||(a=!0,i());let n=r+t;K.setValue(tn(n,e),{type:"direct"})},A.release=n,e1.create({onMoveShouldSetPanResponder:(e,{dy:t})=>{if(e.target===g.handleRef.current)return!0;let r=0!==A.y,n=A.paneY-5<=A.paneMinY;return!r&&(!n||!!r||!(t<0)||!!h.$L)&&Math.abs(t)>5},onPanResponderGrant:i,onPanResponderMove:(r,{dy:n})=>{let o=tn(n+t,e);K.setValue(o,{type:"direct"})},onPanResponderEnd:o,onPanResponderTerminate:o,onPanResponderRelease:o})},[et,N,ee,w,W,R]),ea=(0,x.useCallback)(e=>{let t=Math.min(e.nativeEvent?.layout.height,e9.get("window").height);t&&_(t)},[d]),el=(0,x.useCallback)(e=>{let t=Math.min(e.nativeEvent?.layout.height,e9.get("window").height);t&&O(t)},[d]),eu=Z(K,e=>({transform:[{translateY:0===w?10000.1:e}]})),ec=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(h.$L||!s)return;let e=eR.addListener("keyboardDidShow",e=>{null===ec.current&&(ec.current=K.getValue(),K.setValue(Math.max(K.getValue()-e.endCoordinates.height,0)))}),t=eR.addListener("keyboardDidHide",()=>{null!==ec.current&&(K.setValue(ec.current),ec.current=null)});return()=>{t.remove(),e.remove()}},[s]);let[ed,ef]=(0,x.useState)(I?1:0);I&&0===ed&&ef(1),(0,x.useEffect)(()=>{if(!I){let e=setTimeout(()=>{ef(0)},400);return()=>{clearTimeout(e)}}},[I]);let ep=k?void 0:"percent"===E?`${M}${h.$L?"dvh":"%"}`:M,ey=(0,es.jsx)(tt.Provider,{value:G,children:(0,es.jsxs)(eh,{...g,children:[(0,es.jsx)(eg.M,{custom:{open:I},children:U||!I?null:p}),"percent"!==E&&(0,es.jsx)(te.Z,{style:{opacity:0,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none"},onLayout:el}),(0,es.jsx)(X,{ref:B,...ei?.panHandlers,onLayout:ea,...!en&&{animation:n},disableClassName:!0,style:[{position:"absolute",zIndex:a,width:"100%",height:ep,minHeight:ep,opacity:ed,...(U||!I)&&{pointerEvents:"none"}},eu],children:e.children})]})}),eb=(0,x.useContext)(em.fG);if(i){let e=(0,es.jsx)(eE.h_,{zIndex:a,...u,children:!!(ed||!l)&&(0,es.jsx)(c,{children:(0,es.jsx)(eS.Q,{forceClassName:!0,name:er,children:(0,es.jsx)(em.fG.Provider,{value:eb,children:ey})})})});return h.$L?e:(0,es.jsx)(tr.Provider,{value:D,children:e})}return ey}));function tu(){return(tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.onScroll,n=e.onTouchMove,o=e.onWheel,i=e.scrollEnabled,a=void 0===i||i,s=e.scrollEventThrottle,l=void 0===s?0:s,u=e.showsHorizontalScrollIndicator,c=e.showsVerticalScrollIndicator,d=e.style,f=(0,tc.Z)(e,tp),h=x.useRef({isScrolling:!1,scrollLastTick:0}),p=x.useRef(null),m=x.useRef(null);function g(e){return t=>{a&&e&&e(t)}}function y(e){h.current.scrollLastTick=Date.now(),r&&r(tm(e))}return x.createElement(te.Z,tu({},f,{onScroll:function(e){if(e.stopPropagation(),e.target===m.current){var t,n;(e.persist(),null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h.current.isScrolling=!1,r&&r(tm(e))},100),h.current.isScrolling)?(t=h.current.scrollLastTick,n=Date.now()-t,l>0&&n>=l&&y(e)):(h.current.isScrolling=!0,y(e))}},onTouchMove:g(n),onWheel:g(o),ref:(0,th.Z)(m,t),style:[d,!a&&ty.scrollDisabled,(!1===u||!1===c)&&ty.hideScrollbar]}))}),ty=tf.Z.create({scrollDisabled:{overflowX:"hidden",overflowY:"hidden",touchAction:"none"},hideScrollbar:{scrollbarWidth:"none"}}),tv=r(2319),tb=r(9895),tw=r.n(tb),tx=["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll","centerContent"],t_={};class tS extends x.Component{constructor(){super(...arguments),this._scrollNodeRef=null,this._innerViewRef=null,this.isTouching=!1,this.lastMomentumScrollBeginTime=0,this.lastMomentumScrollEndTime=0,this.observedScrollSinceBecomingResponder=!1,this.becameResponderWhileAnimating=!1,this.scrollResponderHandleScrollShouldSetResponder=()=>this.isTouching,this.scrollResponderHandleStartShouldSetResponderCapture=e=>this.scrollResponderIsAnimating(),this.scrollResponderHandleTerminationRequest=()=>!this.observedScrollSinceBecomingResponder,this.scrollResponderHandleTouchEnd=e=>{var t=e.nativeEvent;this.isTouching=0!==t.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},this.scrollResponderHandleResponderRelease=e=>{this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=ek.Z.currentlyFocusedField();this.props.keyboardShouldPersistTaps||null==t||e.target===t||this.observedScrollSinceBecomingResponder||this.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),ek.Z.blurTextInput(t))},this.scrollResponderHandleScroll=e=>{this.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},this.scrollResponderHandleResponderGrant=e=>{this.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},this.scrollResponderHandleScrollBeginDrag=e=>{this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},this.scrollResponderHandleScrollEndDrag=e=>{this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},this.scrollResponderHandleMomentumScrollBegin=e=>{this.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},this.scrollResponderHandleMomentumScrollEnd=e=>{this.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},this.scrollResponderHandleTouchStart=e=>{this.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},this.scrollResponderHandleTouchMove=e=>{this.props.onTouchMove&&this.props.onTouchMove(e)},this.scrollResponderIsAnimating=()=>Date.now()-this.lastMomentumScrollEndTime<16||this.lastMomentumScrollEndTime{if("number"==typeof e)console.warn("`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.");else{var n=e||t_;e=n.x,t=n.y,r=n.animated}var o=this.getScrollableNode(),i=e||0,a=t||0;null!=o&&("function"==typeof o.scroll?o.scroll({top:a,left:i,behavior:r?"smooth":"auto"}):(o.scrollLeft=i,o.scrollTop=a))},this.scrollResponderZoomTo=(e,t)=>{"ios"!==ec.OS&&eO()("zoomToRect is not implemented")},this.scrollResponderScrollNativeHandleToKeyboard=(e,t,r)=>{this.additionalScrollOffset=t||0,this.preventNegativeScrollOffset=!!r,tv.Z.measureLayout(e,this.getInnerViewNode(),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},this.scrollResponderInputMeasureAndScrollToKeyboard=(e,t,r,n)=>{var o=e9.get("window").height;this.keyboardWillOpenTo&&(o=this.keyboardWillOpenTo.endCoordinates.screenY);var i=t-o+n+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(i=Math.max(0,i)),this.scrollResponderScrollTo({x:0,y:i,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},this.scrollResponderKeyboardWillShow=e=>{this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},this.scrollResponderKeyboardWillHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},this.scrollResponderKeyboardDidShow=e=>{e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},this.scrollResponderKeyboardDidHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)},this.flashScrollIndicators=()=>{this.scrollResponderFlashScrollIndicators()},this.getScrollResponder=()=>this,this.getScrollableNode=()=>this._scrollNodeRef,this.getInnerViewRef=()=>this._innerViewRef,this.getInnerViewNode=()=>this._innerViewRef,this.getNativeScrollRef=()=>this._scrollNodeRef,this.scrollTo=(e,t,r)=>{if("number"==typeof e)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var n=e||t_;t=n.x,e=n.y,r=n.animated}this.scrollResponderScrollTo({x:t||0,y:e||0,animated:!1!==r})},this.scrollToEnd=e=>{var t=!1!==(e&&e.animated),r=this.props.horizontal,n=this.getScrollableNode(),o=r?n.scrollWidth:0,i=r?0:n.scrollHeight;this.scrollResponderScrollTo({x:o,y:i,animated:t})},this._handleContentOnLayout=e=>{var t=e.nativeEvent.layout,r=t.width,n=t.height;this.props.onContentSizeChange(r,n)},this._handleScroll=e=>{"on-drag"===this.props.keyboardDismissMode&&eC(),this.scrollResponderHandleScroll(e)},this._setInnerViewRef=e=>{this._innerViewRef=e},this._setScrollNodeRef=e=>{this._scrollNodeRef=e,null!=e&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),(0,td.Z)(this.props.forwardedRef)(e)}}scrollResponderHandleStartShouldSetResponder(){return!1}scrollResponderHandleResponderReject(){tw()(!1,"ScrollView doesn't take rejection well - scrolls anyway")}scrollResponderFlashScrollIndicators(){}scrollResponderTextInputFocusError(e){console.error("Error measuring text field: ",e)}render(){var e=this.props,t=e.contentContainerStyle,r=e.horizontal,n=e.onContentSizeChange,o=e.refreshControl,i=e.stickyHeaderIndices,a=e.pagingEnabled,s=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,e.centerContent),l=(0,tc.Z)(e,tx),u={};n&&(u={onLayout:this._handleContentOnLayout});var c=!r&&Array.isArray(i),d=c||a?x.Children.map(this.props.children,(e,t)=>{var r=c&&i.indexOf(t)>-1;return null!=e&&(r||a)?x.createElement(te.Z,{style:[r&&tk.stickyHeader,a&&tk.pagingEnabledChild]},e):e}):this.props.children,f=x.createElement(te.Z,tu({},u,{children:d,collapsable:!1,ref:this._setInnerViewRef,style:[r&&tk.contentContainerHorizontal,s&&tk.contentContainerCenterContent,t]})),h=r?tk.baseHorizontal:tk.baseVertical,p=r?tk.pagingEnabledHorizontal:tk.pagingEnabledVertical,m=(0,eM.Z)((0,eM.Z)({},l),{},{style:[h,a&&p,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject});eO()(void 0!==tg,"ScrollViewClass must not be undefined");var g=x.createElement(tg,tu({},m,{ref:this._setScrollNodeRef}),f);return o?x.cloneElement(o,{style:m.style},g):g}}var tE={flexGrow:1,flexShrink:1,transform:"translateZ(0)",WebkitOverflowScrolling:"touch"},tk=tf.Z.create({baseVertical:(0,eM.Z)((0,eM.Z)({},tE),{},{flexDirection:"column",overflowX:"hidden",overflowY:"auto"}),baseHorizontal:(0,eM.Z)((0,eM.Z)({},tE),{},{flexDirection:"row",overflowX:"auto",overflowY:"hidden"}),contentContainerHorizontal:{flexDirection:"row"},contentContainerCenterContent:{justifyContent:"center",flexGrow:1},stickyHeader:{position:"sticky",top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:"x mandatory"},pagingEnabledVertical:{scrollSnapType:"y mandatory"},pagingEnabledChild:{scrollSnapAlign:"start"}}),tC=x.forwardRef((e,t)=>x.createElement(tS,tu({},e,{forwardedRef:t})));tC.displayName="ScrollView";let tR=(0,c.z)(tC,{name:"ScrollView",scrollEnabled:!0,variants:{fullscreen:{true:d.Xu}}},{accept:{contentContainerStyle:"style"}}),tA=(0,x.forwardRef)(({__scopeSheet:e,children:t,onScroll:r,...n},o)=>{let{scrollBridge:i}=ep("SheetScrollView",e),a=(0,x.useRef)(null),s=(0,x.useRef)({lastPageY:0,dragAt:0,dys:[],isScrolling:!1,isDragging:!1});return(0,es.jsx)(tR,{ref:(0,v.FE)(a,o),flex:1,scrollEventThrottle:8,onScroll:e=>{let{y:t}=e.nativeEvent.contentOffset;i.y=t,t>0&&(i.scrollStartY=-1),r?.(e)},onStartShouldSetResponder:()=>(i.scrollStartY=-1,s.current.isDragging=!0,!0),onMoveShouldSetResponder:()=>!1,onResponderRelease:()=>{if(!s.current.isDragging)return;s.current.isDragging=!1,i.scrollStartY=-1,s.current.isScrolling=!1;let e=0;if(s.current.dys.length){let t=s.current.dys.slice(-10);e=(t.length?t.reduce((e,t)=>e+t,0):0)/t.length*.04}s.current.dys=[],i.release({dragAt:s.current.dragAt,vy:e})},className:"_ovs-contain",...n,children:(0,x.useMemo)(()=>t,[t])})}),tT=({snapPoints:e,position:t,screenSize:r,frameSize:n,snapPointsMode:o})=>{if("fit"===o)return 0;if("constant"===o)return Number(e[0])-Number(e[t]??0);if("percent"===o)return(Number(e[0])/100-Number(e[t]??0)/100)*r;let i=e[0];if("fit"===i)return 0;let a="string"==typeof i?Number(i.slice(0,-1))/100*r:i,s=e[t]??0,l=a-("string"==typeof s?Number(s.slice(0,-1))/100*r:s);return Number.isNaN(l)?0:l};var tO=r(357);let tM=(0,c.z)(d.sL,{name:m,variants:{open:{true:{pointerEvents:"auto"},false:{opacity:0,pointerEvents:"none"}},unstyled:{false:{height:10,borderRadius:100,backgroundColor:"$background",zIndex:10,marginHorizontal:"35%",marginBottom:"$2",opacity:.5,hoverStyle:{opacity:.7}}}},defaultVariants:{unstyled:"1"===tO.env.TAMAGUI_HEADLESS}}),tI=(0,c.z)(f.K,{name:g,variants:{open:{true:{opacity:1,pointerEvents:"auto"},false:{opacity:0,pointerEvents:"none"}},unstyled:{false:{fullscreen:!0,position:"absolute",backgrounded:!0,zIndex:99999,pointerEvents:"auto"}}},defaultVariants:{unstyled:"1"===tO.env.TAMAGUI_HEADLESS}}),tz=function({Handle:e,Frame:t,Overlay:r}){let n=e.styleable(({__scopeSheet:t,...r},n)=>{let o=ep(m,t),i=(0,v.ex)(o.handleRef,n);return o.onlyShowFrame?null:(0,es.jsx)(e,{ref:i,onPress:()=>{let e=o.snapPoints.length+(o.dismissOnSnapToBottom?-1:0),t=(o.position+1)%e;o.setPosition(t)},open:o.open,...r})}),o=r.extractable((0,x.memo)(e=>{let{__scopeSheet:t,...n}=e,o=ep(g,t),i=(0,x.useMemo)(()=>(0,es.jsx)(r,{...n,debug:"verbose",onPress:(0,w.Mj)(n.onPress,o.dismissOnOverlayPress?()=>{o.setOpen(!1)}:void 0)}),[n.onPress,o.dismissOnOverlayPress]);return(0,h.LI)(()=>{o.onOverlayComponent?.(i)},[i]),o.onlyShowFrame,null})),i=t.extractable((0,x.forwardRef)(({__scopeSheet:e,adjustPaddingForOffscreenContent:r,disableHideBottomOverflow:n,children:o,...i},a)=>{let s=ep(p,e),{hasFit:l,removeScrollEnabled:u,frameSize:c,contentRef:d,open:f}=s,h=(0,v.ex)(a,d),m=tT(s),g=(0,x.useMemo)(()=>(0,es.jsxs)(t,{ref:h,flex:l?0:1,height:l?void 0:c,pointerEvents:f?"auto":"none",...i,children:[o,r&&(0,es.jsx)(b.Kq,{"data-sheet-offscreen-pad":!0,height:m,width:"100%"})]}),[f,i,c,m,r,l]);return(0,es.jsxs)(es.Fragment,{children:[(0,es.jsx)(el,{forwardProps:!0,enabled:u,allowPinchZoom:!0,shards:[d],removeScrollBar:!1,children:g}),!n&&(0,es.jsx)(t,{...i,componentName:"SheetCover",children:null,position:"absolute",bottom:"-100%",zIndex:-1,height:s.frameSize,left:0,right:0,borderWidth:0,borderRadius:0,shadowOpacity:0})]})})),a=(0,x.forwardRef)(function(e,t){let r=(0,eu.S)(),{isShowingNonSheet:n}=(0,ti.$)();return e.native&&ec.OS,n||!r?null:(0,es.jsx)(tl,{ref:t,...e})}),s={Frame:i,Overlay:o,Handle:n,ScrollView:tA},l=(0,w.$e)(a,s);return(0,w.$e)(a,{...s,Controlled:l})}({Frame:(0,c.z)(d.FA,{name:p,variants:{unstyled:{false:{flex:1,backgroundColor:"$background",borderTopLeftRadius:"$true",borderTopRightRadius:"$true",width:"100%",maxHeight:"100%",overflow:"hidden"}}},defaultVariants:{unstyled:"1"===tO.env.TAMAGUI_HEADLESS}}),Handle:tM,Overlay:tI})},7657:function(e,t,r){"use strict";r.d(t,{$:function(){return o},W:function(){return i}});var n=r(2265);let o=()=>{let e=(0,n.useContext)(i),t=e?.hidden,r=t&&e?.open;return{controller:e,isHidden:t,isShowingNonSheet:r,disableDrag:e?.disableDrag}},i=(0,n.createContext)(null)},1092:function(e,t,r){"use strict";r.d(t,{K:function(){return u}});var n=r(4975),o=r(5377),i=r(8587);let a={borderRadius:1e5,padding:0},s={backgroundColor:"transparent",borderColor:"transparent",shadowColor:"transparent",hoverStyle:{borderColor:"transparent"}},l={backgrounded:{true:{backgroundColor:"$background"}},radiused:{true:(e,t)=>{let{tokens:r,props:n}=t;return{borderRadius:r.radius[n.size]||r.radius.$true}}},hoverTheme:{true:{hoverStyle:{backgroundColor:"$backgroundHover",borderColor:"$borderColorHover"}},false:{}},pressTheme:{true:{cursor:"pointer",pressStyle:{backgroundColor:"$backgroundPress",borderColor:"$borderColorPress"}},false:{}},focusTheme:{true:{focusStyle:{backgroundColor:"$backgroundFocus",borderColor:"$borderColorFocus"}},false:{}},circular:{true:(e,{props:t,tokens:r})=>{if(!("size"in t))return a;let n="number"==typeof t.size?t.size:r.size[t.size];return{...a,width:n,height:n,maxWidth:n,maxHeight:n,minWidth:n,minHeight:n}}},padded:{true:(e,t)=>{let{tokens:r,props:n}=t;return{padding:r.space[n.size]||r.space.$true}}},elevate:{true:(e,t)=>(0,i.y)(t.props.size,t)},bordered:(e,{props:t})=>({borderWidth:"number"==typeof e?e:1,borderColor:"$borderColor",...t.hoverTheme&&{hoverStyle:{borderColor:"$borderColorHover"}},...t.pressTheme&&{pressStyle:{borderColor:"$borderColorPress"}},...t.focusTheme&&{focusStyle:{borderColor:"$borderColorFocus"}}}),transparent:{true:{backgroundColor:"transparent"}},chromeless:{true:s,all:{...s,hoverStyle:s,pressStyle:s,focusStyle:s}}},u=(0,n.z)(o.FA,{variants:l})},391:function(e,t,r){"use strict";r.d(t,{H1:function(){return a}});var n=r(4975),o=r(1217);let i=(0,n.z)(o.n,{tag:"span",name:"Heading",accessibilityRole:"header",fontFamily:"$heading",size:"$8",margin:0}),a=(0,n.z)(i,{name:"H1",tag:"h1",size:"$10"});(0,n.z)(i,{name:"H2",tag:"h2",size:"$9"}),(0,n.z)(i,{name:"H3",tag:"h3",size:"$8"}),(0,n.z)(i,{name:"H4",tag:"h4",size:"$7"}),(0,n.z)(i,{name:"H5",tag:"h5",size:"$6"}),(0,n.z)(i,{name:"H6",tag:"h6",size:"$5"})},1217:function(e,t,r){"use strict";r.d(t,{n:function(){return i}});var n=r(4975),o=r(2026);let i=(0,n.z)(o.J,{name:"Paragraph",tag:"p",userSelect:"auto",color:"$color",size:"$true",whiteSpace:"normal"})},2026:function(e,t,r){"use strict";r.d(t,{J:function(){return s}});var n=r(8970),o=r(4975),i=r(8475),a=r(357);let s=(0,o.z)(i.x,{name:"SizableText",fontFamily:"$body",variants:{unstyled:{false:{size:"$true",color:"$color"}},size:n.H},defaultVariants:{unstyled:"1"===a.env.TAMAGUI_HEADLESS}});s.staticConfig.variants.fontFamily={"...":(e,t)=>{let r=t.props.size||"$true";return(0,n.H)(r,t)}}},2875:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(2265),o=r(2281);function i(e,t,r){let{children:i,textProps:a,size:s,noTextWrap:l,color:u,fontFamily:c,fontSize:d,fontWeight:f,letterSpacing:h,textAlign:p,fontStyle:m,maxFontSizeMultiplier:g}=t;if(l||!i)return[i];let y={...r};return u&&(y.color=u),c&&(y.fontFamily=c),d&&(y.fontSize=d),f&&(y.fontWeight=f),h&&(y.letterSpacing=h),p&&(y.textAlign=p),s&&(y.size=s),m&&(y.fontStyle=m),g&&(y.maxFontSizeMultiplier=g),n.Children.toArray(i).map((t,r)=>"string"==typeof t?(0,o.jsx)(e,{...y,...a,children:t},r):t)}},3020:function(e,t,r){"use strict";r.d(t,{h:function(){return o}});var n=r(2265);function o(e){if(typeof document>"u")return(0,n.useMemo)(()=>e(),[]);let t=(0,n.useRef)();return t.current||(t.current={v:e()}),t.current.v}},3277:function(e,t,r){"use strict";r.d(t,{T:function(){return a}});var n=r(9087),o=r(2265);let i=e=>e();function a({prop:e,defaultProp:t,onChange:r,strategy:a="prop-wins",preventUpdate:l,transition:u}){let[c,d]=(0,o.useState)(e??t),f=(0,o.useRef)(c),h="prop-wins"===a&&void 0!==e,p=h?e:c,m=(0,n.z)(r||s),g=u?o.startTransition:i;return(0,o.useEffect)(()=>{void 0!==e&&(f.current=e,g(()=>{d(e)}))},[e]),(0,o.useEffect)(()=>{h||c!==f.current&&(f.current=c,m(c))},[m,c,h]),[p,(0,n.z)(e=>{l||(h?m("function"==typeof e?e(f.current):e):g(()=>{d(e)}))})]}let s=()=>{}},1386:function(e,t,r){"use strict";r.d(t,{Lb:function(){return f},wN:function(){return d}});var n=r(2265),o=r(5986),i=r(7562),a=r(9100),s=r(8075),l=r(5566),u=r(9097),c=r(8411);function d(e,t){let[r,n]=f(e,{...t,noExpand:!0,noNormalize:!0,resolveValues:"none"});return{...r,...n}}function f(e,t){let r=t?.forComponent?.staticConfig??l.K.staticConfig,[d,f]=(0,c.WU)({componentName:r.componentName}),h=(0,n.useContext)(i.s),{state:p,disabled:m,setStateShallow:g}=(0,a.Ee)(e,h,r,(0,o.iE)()),y=(0,u.GS)(),v=(0,s.DP)(e,r,f,d.state?.name||"",p,{isAnimated:!1,mediaState:y,noSkip:!0,noMergeStyle:!0,noClassNames:!0,resolveValues:"auto",...t},null,h),{mediaGroups:b,pseudoGroups:w}=v;return(0,n.useEffect)(()=>{if(!m){if(p.unmounted){g({unmounted:!1});return}return(0,a.En)({disabled:m,componentContext:h,setStateShallow:g,state:p,mediaGroups:b,pseudoGroups:w})}},[m,w?Object.keys([...w]).join(""):0,b?Object.keys([...b]).join(""):0]),[v.viewProps,v.style||{},f,y]}},4582:function(e,t,r){"use strict";r.d(t,{C:function(){return s}});var n=r(281),o=r(2265),i=r(9033),a=r(8411);function s(e){let t=(0,a.q4)((0,o.useContext)(i.s)),[r,s]=(0,o.useState)(t?.state.name||"");return(0,n.LI)(()=>{if(t)return s(t.state.name),t.onChangeTheme((t,r)=>{let n=e?.parent&&r.state.parentName||t;n&&s(n)})},[t?.state.name]),r}},967:function(e,t,r){"use strict";let n;r.d(t,{ONNX:function(){return n},p:function(){return u}});var o,i,a=r(495),s=r(7004),l=r(357);let u=["wasm"];void 0!==l&&l?.release?.name==="node"?(n=a??(o||(o=r.t(a,2))),u.unshift("cpu")):(n=s??(i||(i=r.t(s,2))),"undefined"!=typeof navigator&&/iP(hone|od|ad).+16_4.+AppleWebKit/.test(navigator.userAgent)&&(n.env.wasm.simd=!1))},16:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var n=r(911);async function o(e,t){return await (0,n.yM)(e,"config.json",!0,t)}class i{constructor(e){this.model_type=null,this.is_encoder_decoder=!1,Object.assign(this,e)}static async from_pretrained(e,{progress_callback:t=null,config:r=null,cache_dir:n=null,local_files_only:i=!1,revision:a="main"}={}){return new this(r??await o(e,{progress_callback:t,config:r,cache_dir:n,local_files_only:i,revision:a}))}}class a{static async from_pretrained(...e){return i.from_pretrained(...e)}}},851:function(e,t,r){"use strict";r.d(t,{O:function(){return g}});var n=r(8386),o=r(3342),i=r(8464);let{env:a}=r(967).ONNX,s="2.17.0",l="undefined"!=typeof self&&"caches"in self,u=!y(n),c=!y(o),d=u&&c,f=d?o.dirname(o.dirname(i.fileURLToPath("file:///mnt/c/tools/projects/translator-next/node_modules/@xenova/transformers/src/env.js"))):"./",h=d?o.join(f,"/.cache/"):null,p="/models/",m=d?o.join(f,p):p;a?.wasm&&(a.wasm.wasmPaths=d?o.join(f,"/dist/"):`https://cdn.jsdelivr.net/npm/@xenova/transformers@${s}/dist/`);let g={backends:{onnx:a,tfjs:{}},__dirname:f,version:s,allowRemoteModels:!0,remoteHost:"https://huggingface.co/",remotePathTemplate:"{model}/resolve/{revision}/",allowLocalModels:!0,localModelPath:m,useFS:u,useBrowserCache:l,useFSCache:u,cacheDir:h,useCustomCache:!1,customCache:null};function y(e){return 0===Object.keys(e).length}},9078:function(e,t,r){"use strict";let n,o,i;r.d(t,{qCb:function(){return c.qC},EUT:function(){return eK}});var a=r(2018),s=r(9454),l=r(761),u=r(911),c=r(8709),d=r(2414),f=r(851),h=r(8741);let p="undefined"!=typeof self,m=p&&"DedicatedWorkerGlobalScope"===self.constructor.name;if(p)n=(e,t)=>{if(!self.OffscreenCanvas)throw Error("OffscreenCanvas not supported by this browser.");return new self.OffscreenCanvas(e,t)},i=self.createImageBitmap,o=self.ImageData;else if(h)i=async e=>{let t=(await e.metadata()).channels,{data:r,info:n}=await e.raw().toBuffer({resolveWithObject:!0}),o=new v(new Uint8ClampedArray(r),n.width,n.height,n.channels);return void 0!==t&&t!==n.channels&&o.convert(t),o};else throw Error("Unable to load image processing library.");let g={0:"nearest",1:"lanczos",2:"bilinear",3:"bicubic",4:"box",5:"hamming"},y=new Map([["png","image/png"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["gif","image/gif"]]);class v{constructor(e,t,r,n){this.data=e,this.width=t,this.height=r,this.channels=n}get size(){return[this.width,this.height]}static async read(e){if(e instanceof v)return e;if("string"==typeof e||e instanceof URL)return await this.fromURL(e);throw Error(`Unsupported input type: ${typeof e}`)}static async fromURL(e){let t=await (0,u.hn)(e);if(200!==t.status)throw Error(`Unable to read image from "${e}" (${t.status} ${t.statusText})`);let r=await t.blob();return this.fromBlob(r)}static async fromBlob(e){if(p){let t=await i(e),r=n(t.width,t.height).getContext("2d");return r.drawImage(t,0,0),new this(r.getImageData(0,0,t.width,t.height).data,t.width,t.height,4)}{let t=h(await e.arrayBuffer());return await i(t)}}static fromTensor(e,t="CHW"){if(3!==e.dims.length)throw Error(`Tensor should have 3 dimensions, but has ${e.dims.length} dimensions.`);if("CHW"===t)e=e.transpose(1,2,0);else if("HWC"===t);else throw Error(`Unsupported channel format: ${t}`);if(!(e.data instanceof Uint8ClampedArray||e.data instanceof Uint8Array))throw Error(`Unsupported tensor type: ${e.type}`);switch(e.dims[2]){case 1:case 2:case 3:case 4:return new v(e.data,e.dims[1],e.dims[0],e.dims[2]);default:throw Error(`Unsupported number of channels: ${e.dims[2]}`)}}grayscale(){if(1===this.channels)return this;let e=new Uint8ClampedArray(this.width*this.height*1);switch(this.channels){case 3:case 4:for(let t=0,r=0;t=0?l=r:c=-r,o>=0?u=o:d=-o,s.drawImage(a,l,u,e,t,c,d,e,t),new v(s.getImageData(0,0,e,t).data,e,t,4).convert(i)}{let n=this.toSharp();if(r>=0&&o>=0)n=n.extract({left:Math.floor(r),top:Math.floor(o),width:e,height:t});else if(r<=0&&o<=0){let i=Math.floor(-o),a=Math.floor(-r);n=n.extend({top:i,left:a,right:e-this.width-a,bottom:t-this.height-i})}else{let i=[0,0],a=0;o<0?(i[0]=Math.floor(-o),i[1]=t-this.height-i[0]):a=Math.floor(o);let s=[0,0],l=0;r<0?(s[0]=Math.floor(-r),s[1]=e-this.width-s[0]):l=Math.floor(r),n=n.extend({top:i[0],bottom:i[1],left:s[0],right:s[1]}).extract({left:l,top:a,width:e,height:t})}return await i(n)}}async toBlob(e="image/png",t=1){if(!p)throw Error("toBlob() is only supported in browser environments.");let r=this.toCanvas();return await r.convertToBlob({type:e,quality:t})}toTensor(e="CHW"){let t=new d.es("uint8",new Uint8Array(this.data),[this.height,this.width,this.channels]);if("HWC"===e);else if("CHW"===e)t=t.permute(2,0,1);else throw Error(`Unsupported channel format: ${e}`);return t}toCanvas(){if(!p)throw Error("toCanvas() is only supported in browser environments.");let e=this.clone().rgba(),t=n(e.width,e.height),r=new o(e.data,e.width,e.height);return t.getContext("2d").putImageData(r,0,0),t}_update(e,t,r,n=null){return this.data=e,this.width=t,this.height=r,null!==n&&(this.channels=n),this}clone(){return new v(this.data.slice(),this.width,this.height,this.channels)}convert(e){if(this.channels===e)return this;switch(e){case 1:this.grayscale();break;case 3:this.rgb();break;case 4:this.rgba();break;default:throw Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this}async save(e){if(p){if(m)throw Error("Unable to save an image from a Web Worker.");let t=e.split(".").pop().toLowerCase(),r=y.get(t)??"image/png",n=await this.toBlob(r),o=URL.createObjectURL(n),i=document.createElement("a");i.href=o,i.download=e,i.click(),i.remove()}else if(f.O.useFS){let t=this.toSharp();return await t.toFile(e)}else throw Error("Unable to save the image because filesystem is disabled in this environment.")}toSharp(){if(p)throw Error("toSharp() is only supported in server-side environments.");return h(this.data,{raw:{width:this.width,height:this.height,channels:this.channels}})}}async function b(e,t){let r;if("undefined"==typeof AudioContext)throw Error("Unable to load audio from path/URL since `AudioContext` is not available in your environment. Instead, audio data should be passed directly to the pipeline/processor. For more information and some example code, see https://huggingface.co/docs/transformers.js/guides/node-audio-processing.");let n=await (await (0,u.hn)(e)).arrayBuffer(),o=new AudioContext({sampleRate:t});void 0===t&&console.warn(`No sampling rate provided, using default of ${o.sampleRate}Hz.`);let i=await o.decodeAudioData(n);if(2===i.numberOfChannels){let e=Math.sqrt(2),t=i.getChannelData(0),n=i.getChannelData(1);r=new Float32Array(t.length);for(let o=0;o2595*Math.log10(1+e/700),kaldi:e=>1127*Math.log(1+e/700),slaney:(e,t=1e3,r=15,n=27/Math.log(6.4))=>e>=t?r+Math.log(e/t)*n:3*e/200};function _(e,t="htk"){let r=x[t];if(!r)throw Error('mel_scale should be one of "htk", "slaney" or "kaldi".');return"number"==typeof e?r(e):e.map(e=>r(e))}let S={htk:e=>700*(10**(e/2595)-1),kaldi:e=>700*(Math.exp(e/1127)-1),slaney:(e,t=1e3,r=15,n=Math.log(6.4)/27)=>e>=r?t*Math.exp(n*(e-r)):200*e/3};function E(e,t,r){let n=(t-e)/(r-1);return Float64Array.from({length:r},(t,r)=>e+n*r)}function k(e,t,r,n,o,i=null,a="htk",s=!1){let l;if(null!==i&&"slaney"!==i)throw Error('norm must be one of null or "slaney"');let u=E(_(r,a),_(n,a),t+2),c=function(e,t="htk"){let r=S[t];if(!r)throw Error('mel_scale should be one of "htk", "slaney" or "kaldi".');return"number"==typeof e?r(e):e.map(e=>r(e))}(u,a);if(s){let t=o/(2*e);l=_(Float64Array.from({length:e},(e,r)=>r*t),a),c=u}else l=E(0,Math.floor(o/2),e);let d=function(e,t){let r=Float64Array.from({length:t.length-1},(e,r)=>t[r+1]-t[r]),n=Array.from({length:e.length},()=>Array(t.length));for(let r=0;rArray(e.length));for(let t=0;to)throw Error(`frame_length (${r}) may not be larger than fft_length (${o})`);if(_!==r)throw Error(`Length of the window (${_}) must equal frame_length (${r})`);if(n<=0)throw Error("hop_length must be greater than zero");if(a){if("reflect"!==s)throw Error(`pad_mode="${s}" not implemented yet.`);let t=Math.floor((o-1)/2)+1;e=function(e,t,r){let n=new e.constructor(e.length+t+r),o=e.length-1;for(let r=0;rS?w&&(R=b):R=k=b);let A=new c.vw(o),T=new Float64Array(o),O=new Float64Array(A.outputBufferSize),M=Array(k);for(let o=0;o=1;--e)T[e]-=d*T[e-1];T[0]*=1-d}for(let e=0;eMath.pow(e,.85));break;default:throw Error(`Unknown window type ${t}.`)}if(r&&(i=i.subarray(0,e)),null===n)return i;if(e>n)throw Error(`Length of the window (${e}) may not be larger than frame_length (${n})`);return i}function T(e,t=.5,r=null,n=!1){let o=e.logits,i=e.pred_boxes,[a,s,l]=o.dims;if(null!==r&&r.length!==a)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");let u=[];for(let e=0;et&&i.push(e)}else{let e=(0,c.Fp)(o.data)[1];if(e===l-1)continue;i.push(e),r=(0,c.XA)(o.data)}for(let t of i){let n=h[e].data;n=function([e,t,r,n]){return[e-r/2,t-n/2,e+r/2,t+n/2]}(n),null!==a&&(n=n.map((e,t)=>e*a[(t+1)%2])),d.boxes.push(n),d.classes.push(t),d.scores.push(r[t])}}u.push(d)}return u}function O(e,t){if(!(e instanceof Float32Array||e instanceof Float64Array))throw Error(`${t} expects input to be a Float32Array or a Float64Array, but got ${e?.constructor?.name??typeof e} instead. If using the feature extractor directly, remember to use \`read_audio(url, sampling_rate)\` to obtain the raw audio data of the file/url.`)}function M(e,t,r=0,n=null){let o=e/t,i=(0,c.eT)(o)*t;return null!==n&&i>n&&(i=Math.floor(o)*t),io?l=Math.floor(o*s/n):o>n&&(s=Math.floor(n*l/o)),await e.resize(l,s,{resample:r}))}async crop_margin(e,t=200){let r=e.clone().grayscale(),n=(0,c.VV)(r.data)[0],o=(0,c.Fp)(r.data)[0]-n;if(0===o)return e;let i=t/255,a=r.width,s=r.height,l=0,u=0;for(let e=0;ethis.preprocess(e)));return{pixel_values:(0,d.kn)(r.map(e=>e.pixel_values),0),original_sizes:r.map(e=>e.original_size),reshaped_input_sizes:r.map(e=>e.reshaped_input_size)}}}class P extends L{post_process_semantic_segmentation(e,t=null){let r=e.logits,n=r.dims[0];if(null!==t&&t.length!==n)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");let o=[];for(let e=0;eu[r]&&(u[r]=t[r],l.data[r]=e)}let c=Array(i.dims[0]),f=l.data;for(let e=0;evoid 0!==e);o.push({segmentation:l,labels:h})}return o}}class B extends L{}class j extends B{}class N extends L{}class $ extends L{}class U extends L{}class F extends L{}class D extends L{}class W extends L{constructor(e){super(e),this.crop_pct=this.config.crop_pct??.875}async resize(e){let t=this.size?.shortest_edge;if(void 0===t)throw Error("Size dictionary must contain 'shortest_edge' key.");if(t<384){let r=Math.floor(t/this.crop_pct),[n,o]=this.get_resize_output_image_size(e,{shortest_edge:r});e=await e.resize(n,o,{resample:this.resample}),e=await e.center_crop(t,t)}else e=await e.resize(t,t,{resample:this.resample});return e}}class H extends W{}class V extends L{}class Z extends L{}class q extends L{constructor(e){super(e),this.include_top=this.config.include_top??!0,this.include_top&&(this.image_std=this.image_std.map(e=>e*e))}}class X extends L{}class G extends L{post_process_object_detection(...e){return T(...e)}}class K extends G{}class Y extends L{}class J extends L{}class Q extends L{pad_image(e,t,r,n={}){let[o,i,a]=t,s=this.image_mean;Array.isArray(this.image_mean)||(s=Array(a).fill(s));let l=this.image_std;Array.isArray(l)||(l=Array(a).fill(s));let u=s.map((e,t)=>-e/l[t]);return super.pad_image(e,t,r,{center:!0,constant_values:u,...n})}}class ee extends Q{}class et extends L{async _call(e){let t=await super._call(e),r=[t.pixel_values.dims[0],64,64],n=new d.es("int64",new BigInt64Array(r.reduce((e,t)=>e*t)).fill(1n),r);return{...t,pixel_mask:n}}post_process_object_detection(...e){return T(...e)}remove_low_and_no_objects(e,t,r,n){let o=[],i=[],a=[];for(let s=0;sr&&(o.push(u),i.push(f),a.push(d))}return[o,i,a]}check_segment_validity(e,t,r,n=.5,o=.8){let i=[],a=0,s=0;for(let o=0;o=n&&++s;let l=a>0&&s>0;return l&&(l=a/s>o),[l,i]}compute_segments(e,t,r,n,o,i=null,a=null){let[s,l]=a??e[0].dims,u=new d.es("int32",new Int32Array(s*l),[s,l]),c=[];if(null!==a)for(let t=0;th[t]&&(f[t]=r,h[t]=e[r].data[t])}let p=0;for(let i=0;ie!==t.dims[r]))throw Error(`The first ${r.length} dimensions of 'input_points' and 'input_labels' must be the same.`);return new d.es("int64",e.flat(1/0).map(BigInt),r)}async _call(e,t=null,r=null){let n=await super._call(e);if(t&&(n.input_points=this.reshape_input_points(t,n.original_sizes,n.reshaped_input_sizes)),r){if(!n.input_points)throw Error("`input_points` must be provided if `input_labels` are provided.");n.input_labels=this.add_input_labels(r,n.input_points)}return n}post_process_masks(e,t,r,{mask_threshold:n=0,binarize:o=!0,pad_size:i=null}={}){let a=[],s=[(i=i??this.pad_size).height,i.width];for(let i=0;in&&(e[t]=1);r=new d.es("bool",e,r.dims)}f.push(r)}a.push((0,d.kn)(f))}return a}}class eo extends L{pad_image(e,t,r,n={}){let[o,i,a]=t;return super.pad_image(e,t,{width:i+(r-i%r)%r,height:o+(r-o%r)%r},{mode:"symmetric",center:!1,constant_values:-1,...n})}}class ei extends L{async _call(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);let r=await Promise.all(e.map(e=>this.preprocess(e))),n=await Promise.all(t.map(e=>this.preprocess(e,{do_normalize:!1,do_convert_rgb:!1,do_convert_grayscale:!0})));return{pixel_values:(0,d.kn)(r.map((e,t)=>(0,d.d3)([e.pixel_values,n[t].pixel_values],0)),0),original_sizes:r.map(e=>e.original_size),reshaped_input_sizes:r.map(e=>e.reshaped_input_size)}}}class ea extends z{constructor(e){super(e),this.config.mel_filters??=k(Math.floor(1+this.config.n_fft/2),this.config.feature_size,0,8e3,this.config.sampling_rate,"slaney","slaney"),this.window=A(this.config.n_fft,"hann")}_extract_fbank_features(e){let{data:t,dims:r}=R(e,this.window,this.config.n_fft,this.config.hop_length,{power:2,mel_filters:this.config.mel_filters,log_mel:"log10",max_num_frames:this.config.nb_max_frames}),n=(0,c.Fp)(t)[0];for(let e=0;ethis.config.n_samples?(console.warn("Attempting to extract features for audio longer than 30 seconds. If using a pipeline to extract transcript from a long audio clip, remember to specify `chunk_length_s` and/or `stride_length_s`."),t=e.slice(0,this.config.n_samples)):(t=new Float32Array(this.config.n_samples)).set(e);let{data:r,dims:n}=this._extract_fbank_features(t);return{input_features:new d.es("float32",r,[1,...n])}}}class es extends z{_zero_mean_unit_var_norm(e){let t=e.reduce((e,t)=>e+t,0)/e.length,r=e.reduce((e,r)=>e+(r-t)**2,0)/e.length;return e.map(e=>(e-t)/Math.sqrt(r+1e-7))}async _call(e){O(e,"Wav2Vec2FeatureExtractor"),e instanceof Float64Array&&(e=new Float32Array(e));let t=e;this.config.do_normalize&&(t=this._zero_mean_unit_var_norm(t));let r=[1,t.length];return{input_values:new d.es("float32",t,r),attention_mask:new d.es("int64",new BigInt64Array(t.length).fill(1n),r)}}}class el extends z{constructor(e){super(e);let t=this.config.sampling_rate,r=k(256,this.config.num_mel_bins,20,Math.floor(t/2),t,null,"kaldi",!0);for(let e=0;e32768*e),this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:"log",mel_floor:1192092955078125e-22,remove_dc_offset:!0,max_num_frames:t,transpose:!0})}async _call(e,{padding:t=!0,pad_to_multiple_of:r=2,do_normalize_per_mel_bins:n=!0,return_attention_mask:o=!0}={}){let i;O(e,"SeamlessM4TFeatureExtractor");let a=this._extract_fbank_features(e,this.config.max_length);if(n){let[e,t]=a.dims;for(let r=0;r0){let r=new Float32Array(t*(e+n));r.set(a.data),r.fill(this.config.padding_value,a.data.length);let s=e+n;a={data:r,dims:[s,t]},o&&(i=new d.es("int64",new BigInt64Array(s),[1,s])).data.fill(1n,0,e)}}let[s,l]=a.dims,u=this.config.stride;if(0!=s%u)throw Error(`The number of frames (${s}) must be a multiple of the stride (${u}).`);let c=new d.es("float32",a.data,a.dims).view(1,Math.floor(s/u),l*u),f={input_features:c};if(o){let e=c.dims[1],t=new d.es("int64",new BigInt64Array(e),[1,e]);if(i)for(let e=1,r=0;e0){if("rand_trunc"===r){i=!0;let r=Math.floor(Math.random()*(a+1));e=e.subarray(r,r+t),(o=this._extract_fbank_features(e,this.mel_filters_slaney,this.config.nb_max_samples)).dims=[1,...o.dims]}else throw Error(`Truncation strategy "${r}" not implemented`)}else{if(a<0){let r=new Float64Array(t);if(r.set(e),"repeat"===n)for(let n=e.length;nv.read(e)))}async function ew(e,t){return Array.isArray(e)||(e=[e]),await Promise.all(e.map(e=>"string"==typeof e||e instanceof URL?b(e,t):e instanceof Float64Array?new Float32Array(e):e))}function ex(e,t){t&&(e=e.map(e=>0|e));let[r,n,o,i]=e;return{xmin:r,ymin:n,xmax:o,ymax:i}}class e_ extends l.Ag{constructor({task:e,model:t,tokenizer:r=null,processor:n=null}){super(),this.task=e,this.model=t,this.tokenizer=r,this.processor=n}async dispose(){await this.model.dispose()}}class eS extends e_{constructor(e){super(e)}async _call(e,{topk:t=1}={}){let r=this.tokenizer(e,{padding:!0,truncation:!0}),n=await this.model(r),o="multi_label_classification"===this.model.config.problem_type?e=>e.sigmoid().data:e=>(0,c.XA)(e.data),i=this.model.config.id2label,a=[];for(let e of n.logits){let r=o(e),n=(0,c.em)(r,t).map(e=>({label:i[e[0]],score:e[1]}));1===t?a.push(...n):a.push(n)}return Array.isArray(e)||1===t?a:a[0]}}class eE extends e_{constructor(e){super(e)}async _call(e,{ignore_labels:t=["O"]}={}){let r=Array.isArray(e),n=this.tokenizer(r?e:[e],{padding:!0,truncation:!0}),o=(await this.model(n)).logits,i=this.model.config.id2label,a=[];for(let e=0;e[e,t]).filter(e=>e[1]>a),u=Array.from((0,c.XA)(o.end_logits[e].data)).map((e,t)=>[e,t]).filter(e=>e[1]>a),d=(0,l.O7)(s,u).filter(e=>e[0][1]<=e[1][1]).map(e=>[e[0][1],e[1][1],e[0][0]*e[1][0]]).sort((e,t)=>t[2]-e[2]);for(let e=0;e{let t=[...i];return t[a]=e[0],{score:e[1],token:e[0],token_str:this.tokenizer.model.vocab[e[0]],sequence:this.tokenizer.decode(t,{skip_special_tokens:!0})}}))}return Array.isArray(e)?o:o[0]}}class eR extends e_{_key="generated_text";constructor(e){super(e)}async _call(e,t={}){let r;Array.isArray(e)||(e=[e]),this.model.config.prefix&&(e=e.map(e=>this.model.config.prefix+e));let n=this.model.config.task_specific_params;n&&n[this.task]&&n[this.task].prefix&&(e=e.map(e=>n[this.task].prefix+e));let o=this.tokenizer,i={padding:!0,truncation:!0};r=this instanceof eT&&"_build_translation_inputs"in o?o._build_translation_inputs(e,i,t).input_ids:o(e,i).input_ids;let a=await this.model.generate(r,t);return o.batch_decode(a,{skip_special_tokens:!0}).map(e=>({[this._key]:e}))}}class eA extends eR{_key="summary_text";constructor(e){super(e)}}class eT extends eR{_key="translation_text";constructor(e){super(e)}}function eO(e){return Array.isArray(e)&&e.every(e=>"role"in e&&"content"in e)}class eM extends e_{constructor(e){super(e)}async _call(e,t={}){let r,n,o=!1,i=!1;if("string"==typeof e)r=e=[e];else if(Array.isArray(e)&&e.every(e=>"string"==typeof e))o=!0,r=e;else{if(eO(e))e=[e];else if(Array.isArray(e)&&e.every(eO))o=!0;else throw Error("Input must be a string, an array of strings, a Chat, or an array of Chats");i=!0,r=e.map(e=>this.tokenizer.apply_chat_template(e,{tokenize:!1,add_generation_prompt:!0}))}let a=t.add_special_tokens??!1,s=!i&&(t.return_full_text??!0);this.tokenizer.padding_side="left";let{input_ids:l,attention_mask:u}=this.tokenizer(r,{add_special_tokens:a,padding:!0,truncation:!0}),c=await this.model.generate(l,t,null,{inputs_attention_mask:u}),d=this.tokenizer.batch_decode(c,{skip_special_tokens:!0});!s&&l.dims.at(-1)>0&&(n=this.tokenizer.batch_decode(l,{skip_special_tokens:!0}).map(e=>e.length));let f=Array.from({length:e.length},e=>[]);for(let t=0;t[e.toLowerCase(),t])),this.entailment_id=this.label2id.entailment,void 0===this.entailment_id&&(console.warn("Could not find 'entailment' in label2id mapping. Using 2 as entailment_id."),this.entailment_id=2),this.contradiction_id=this.label2id.contradiction??this.label2id.not_entailment,void 0===this.contradiction_id&&(console.warn("Could not find 'contradiction' in label2id mapping. Using 0 as contradiction_id."),this.contradiction_id=0)}async _call(e,t,{hypothesis_template:r="This example is {}.",multi_label:n=!1}={}){let o=Array.isArray(e);o||(e=[e]),Array.isArray(t)||(t=[t]);let i=t.map(e=>r.replace("{}",e)),a=n||1===t.length,s=[];for(let r of e){let e=[];for(let t of i){let n=this.tokenizer(r,{text_pair:t,padding:!0,truncation:!0}),o=await this.model(n);a?e.push([o.logits.data[this.contradiction_id],o.logits.data[this.entailment_id]]):e.push(o.logits.data[this.entailment_id])}let n=(a?e.map(e=>(0,c.XA)(e)[1]):(0,c.XA)(e)).map((e,t)=>[e,t]).sort((e,t)=>t[0]-e[0]);s.push({sequence:r,labels:n.map(e=>t[e[1]]),scores:n.map(e=>e[0])})}return o?s:s[0]}}class ez extends e_{constructor(e){super(e)}async _call(e,{pooling:t="none",normalize:r=!1,quantize:n=!1,precision:o="binary"}={}){let i=this.tokenizer(e,{padding:!0,truncation:!0}),a=await this.model(i),s=a.last_hidden_state??a.logits;if("none"===t);else if("mean"===t)s=(0,d.v6)(s,i.attention_mask);else if("cls"===t)s=s.slice(null,0);else throw Error(`Pooling method '${t}' not supported.`);return r&&(s=s.normalize(2,-1)),n&&(s=(0,d.e)(s,o)),s}}class eL extends e_{constructor(e){super(e)}async _call(e,{pool:t=null}={}){let r;let n=await eb(e),{pixel_values:o}=await this.processor(n),i=await this.model({pixel_values:o});if(t){if(!("pooler_output"in i))throw Error("No pooled output was returned. Make sure the model has a 'pooler' layer when using the 'pool' option.");r=i.pooler_output}else r=i.last_hidden_state??i.logits??i.image_embeds;return r}}class eP extends e_{constructor(e){super(e)}async _call(e,{topk:t=null}={}){let r=!Array.isArray(e),n=this.processor.feature_extractor.config.sampling_rate,o=await ew(e,n),i=this.model.config.id2label,a=[];for(let e of o){let r=await this.processor(e),n=(await this.model(r)).logits[0],o=(0,c.em)((0,c.XA)(n.data),t).map(e=>({label:i[e[0]],score:e[1]}));1===t?a.push(...o):a.push(o)}return r&&1!==t?a[0]:a}}class eB extends e_{constructor(e){super(e)}async _call(e,t,{hypothesis_template:r="This is a sound of {}."}={}){let n=!Array.isArray(e);n&&(e=[e]);let o=t.map(e=>r.replace("{}",e)),i=this.tokenizer(o,{padding:!0,truncation:!0}),a=this.processor.feature_extractor.config.sampling_rate,s=await ew(e,a),l=[];for(let e of s){let r=await this.processor(e),n=await this.model({...i,...r}),o=(0,c.XA)(n.logits_per_audio.data);l.push([...o].map((e,r)=>({score:e,label:t[r]})))}return n?l[0]:l}}class ej extends e_{constructor(e){super(e)}async _call(e,t={}){switch(this.model.config.model_type){case"whisper":return this._call_whisper(e,t);case"wav2vec2":case"wav2vec2-bert":case"unispeech":case"unispeech-sat":case"hubert":return this._call_wav2vec2(e,t);default:throw Error(`AutomaticSpeechRecognitionPipeline does not support model type '${this.model.config.model_type}'.`)}}async _call_wav2vec2(e,t={}){t.language&&console.warn('`language` parameter is not yet supported for `wav2vec2` models, defaulting to "English".'),t.task&&console.warn('`task` parameter is not yet supported for `wav2vec2` models, defaulting to "transcribe".');let r=!Array.isArray(e);r&&(e=[e]);let n=this.processor.feature_extractor.config.sampling_rate,o=await ew(e,n),i=[];for(let e of o){let t=await this.processor(e),r=(await this.model(t)).logits[0],n=[];for(let e of r)n.push((0,c.Fp)(e.data)[1]);let o=this.tokenizer.decode(n);i.push({text:o})}return r?i[0]:i}async _call_whisper(e,t={}){let r=t.return_timestamps??!1,n=t.chunk_length_s??0,o=t.chunk_callback??null,i=t.force_full_sequences??!1,a=t.stride_length_s??null;"word"===r&&(t.return_token_timestamps=!0);let s=(0,l.Sw)(t,"language",null),u=(0,l.Sw)(t,"task",null);if(s||u||r){if(t.forced_decoder_ids)throw Error("Cannot specify `language`/`task`/`return_timestamps` and `forced_decoder_ids` at the same time.");let e=this.tokenizer.get_decoder_prompt_ids({language:s,task:u,no_timestamps:!r});e.length>0&&(t.forced_decoder_ids=e)}let d=!Array.isArray(e);d&&(e=[e]);let f=this.processor.feature_extractor.config.chunk_length/this.model.config.max_source_positions,h=this.processor.feature_extractor.config.hop_length,p=this.processor.feature_extractor.config.sampling_rate,m=await ew(e,p),g=[];for(let e of m){let s=[];if(n>0){if(null===a)a=n/6;else if(n<=a)throw Error("`chunk_length_s` must be larger than `stride_length_s`.");let t=p*n,r=p*a,o=t-2*r,i=0;for(;i=e.length;s.push({stride:[n.length,l?0:r,u?0:r],input_features:a.input_features,is_last:u}),i+=o}}else s=[{stride:[e.length,0,0],input_features:(await this.processor(e)).input_features,is_last:!0}];for(let e of s){t.num_frames=Math.floor(e.stride[0]/h);let n=await this.model.generate(e.input_features,t);"word"===r?(e.tokens=n.sequences[0],e.token_timestamps=n.token_timestamps.tolist()[0].map(e=>(0,c.NM)(e,2))):e.tokens=n[0],e.stride=e.stride.map(e=>e/p),null!==o&&o(e)}let[l,u]=this.tokenizer._decode_asr(s,{time_precision:f,return_timestamps:r,force_full_sequences:i});g.push({text:l,...u})}return d?g[0]:g}}class eN extends e_{constructor(e){super(e)}async _call(e,t={}){let r=Array.isArray(e),n=await eb(e),{pixel_values:o}=await this.processor(n),i=[];for(let e of o){e.dims=[1,...e.dims];let r=await this.model.generate(e,t),n=this.tokenizer.batch_decode(r,{skip_special_tokens:!0}).map(e=>({generated_text:e.trim()}));i.push(n)}return r?i:i[0]}}class e$ extends e_{constructor(e){super(e)}async _call(e,{topk:t=1}={}){let r=Array.isArray(e),n=await eb(e),{pixel_values:o}=await this.processor(n),i=await this.model({pixel_values:o}),a=this.model.config.id2label,s=[];for(let e of i.logits){let r=(0,c.em)((0,c.XA)(e.data),t).map(e=>({label:a[e[0]],score:e[1]}));1===t?s.push(...r):s.push(r)}return r||1===t?s:s[0]}}class eU extends e_{constructor(e){super(e),this.subtasks_mapping={panoptic:"post_process_panoptic_segmentation",instance:"post_process_instance_segmentation",semantic:"post_process_semantic_segmentation"}}async _call(e,{threshold:t=.5,mask_threshold:r=.5,overlap_mask_area_threshold:n=.8,label_ids_to_fuse:o=null,target_sizes:i=null,subtask:a=null}={}){if(Array.isArray(e)&&1!==e.length)throw Error("Image segmentation pipeline currently only supports a batch size of 1.");let s=await eb(e),l=s.map(e=>[e.height,e.width]),{pixel_values:u,pixel_mask:c}=await this.processor(s),d=await this.model({pixel_values:u,pixel_mask:c}),f=null;if(null!==a)f=this.subtasks_mapping[a];else for(let[e,t]of Object.entries(this.subtasks_mapping))if(t in this.processor.feature_extractor){f=this.processor.feature_extractor[t].bind(this.processor.feature_extractor),a=e;break}let h=this.model.config.id2label,p=[];if("panoptic"===a||"instance"===a){let e=f(d,t,r,n,o,i??l)[0],a=e.segmentation;for(let t of e.segments_info){let e=new Uint8ClampedArray(a.data.length);for(let r=0;rr.replace("{}",e)),a=this.tokenizer(i,{padding:"siglip"!==this.model.config.model_type||"max_length",truncation:!0}),{pixel_values:s}=await this.processor(o),l=await this.model({...a,pixel_values:s}),u="siglip"===this.model.config.model_type?e=>e.sigmoid().data:e=>(0,c.XA)(e.data),d=[];for(let e of l.logits_per_image){let r=[...u(e)].map((e,r)=>({score:e,label:t[r]}));r.sort((e,t)=>t.score-e.score),d.push(r)}return n?d:d[0]}}class eD extends e_{constructor(e){super(e)}async _call(e,{threshold:t=.9,percentage:r=!1}={}){let n=Array.isArray(e);if(n&&1!==e.length)throw Error("Object detection pipeline currently only supports a batch size of 1.");let o=await eb(e),i=r?null:o.map(e=>[e.height,e.width]),{pixel_values:a,pixel_mask:s}=await this.processor(o),l=await this.model({pixel_values:a,pixel_mask:s}),u=this.processor.feature_extractor.post_process_object_detection(l,t,i),c=this.model.config.id2label,d=u.map(e=>e.boxes.map((t,n)=>({score:e.scores[n],label:c[e.classes[n]],box:ex(t,!r)})));return n?d:d[0]}}class eW extends e_{constructor(e){super(e)}async _call(e,t,{threshold:r=.1,topk:n=null,percentage:o=!1}={}){let i=Array.isArray(e),a=await eb(e),s=this.tokenizer(t,{padding:!0,truncation:!0}),l=await this.processor(a),u=[];for(let e=0;e({score:h.scores[r],label:t[h.classes[r]],box:ex(e,!o)})).sort((e,t)=>t.score-e.score);null!==n&&(p=p.slice(0,n)),u.push(p)}return i?u:u[0]}}class eH extends e_{constructor(e){super(e)}async _call(e,t,r={}){let n=(await eb(e))[0],{pixel_values:o}=await this.processor(n),i=`${t}`,a=this.tokenizer(i,{add_special_tokens:!1,padding:!0,truncation:!0}).input_ids,s=await this.model.generate(o,{...r,decoder_input_ids:a,max_length:this.model.config.decoder.max_position_embeddings}),l=this.tokenizer.batch_decode(s)[0].match(/(.*?)<\/s_answer>/),u=null;return l&&l.length>=2&&(u=l[1].trim()),[{answer:u}]}}class eV extends e_{DEFAULT_VOCODER_ID="Xenova/speecht5_hifigan";constructor(e){super(e),this.vocoder=e.vocoder??null}async _call(e,{speaker_embeddings:t=null}={}){return this.processor?this._call_text_to_spectrogram(e,{speaker_embeddings:t}):this._call_text_to_waveform(e)}async _call_text_to_waveform(e){let t=this.tokenizer(e,{padding:!0,truncation:!0}),{waveform:r}=await this.model(t),n=this.model.config.sampling_rate;return{audio:r.data,sampling_rate:n}}async _call_text_to_spectrogram(e,{speaker_embeddings:t}){if(this.vocoder||(console.log("No vocoder specified, using default HifiGan vocoder."),this.vocoder=await s.$Sz.from_pretrained(this.DEFAULT_VOCODER_ID,{quantized:!1})),("string"==typeof t||t instanceof URL)&&(t=new Float32Array(await (await fetch(t)).arrayBuffer())),t instanceof Float32Array)t=new d.es("float32",t,[1,t.length]);else if(!(t instanceof d.es))throw Error("Speaker embeddings must be a `Tensor`, `Float32Array`, `string`, or `URL`.");let{input_ids:r}=this.tokenizer(e,{padding:!0,truncation:!0}),{waveform:n}=await this.model.generate_speech(r,t,{vocoder:this.vocoder}),o=this.processor.feature_extractor.config.sampling_rate;return{audio:n.data,sampling_rate:o}}}class eZ extends e_{constructor(e){super(e)}async _call(e){let t=await eb(e),r=await this.processor(t),n=await this.model(r),o=[];for(let e of n.reconstruction){let t=e.squeeze().clamp_(0,1).mul_(255).round_().to("uint8");o.push(v.fromTensor(t))}return o.length>1?o:o[0]}}class eq extends e_{constructor(e){super(e)}async _call(e){let t=await eb(e),r=await this.processor(t),{predicted_depth:n}=await this.model(r),o=[];for(let e=0;e1?o:o[0]}}let eX=Object.freeze({"text-classification":{tokenizer:a.t2,pipeline:eS,model:s.o$X,default:{model:"Xenova/distilbert-base-uncased-finetuned-sst-2-english"},type:"text"},"token-classification":{tokenizer:a.t2,pipeline:eE,model:s.OjJ,default:{model:"Xenova/bert-base-multilingual-cased-ner-hrl"},type:"text"},"question-answering":{tokenizer:a.t2,pipeline:ek,model:s.wiU,default:{model:"Xenova/distilbert-base-cased-distilled-squad"},type:"text"},"fill-mask":{tokenizer:a.t2,pipeline:eC,model:s.t78,default:{model:"Xenova/bert-base-uncased"},type:"text"},summarization:{tokenizer:a.t2,pipeline:eA,model:s.Kf0,default:{model:"Xenova/distilbart-cnn-6-6"},type:"text"},translation:{tokenizer:a.t2,pipeline:eT,model:s.Kf0,default:{model:"Xenova/t5-small"},type:"text"},"text2text-generation":{tokenizer:a.t2,pipeline:eR,model:s.Kf0,default:{model:"Xenova/flan-t5-small"},type:"text"},"text-generation":{tokenizer:a.t2,pipeline:eM,model:s.Hqk,default:{model:"Xenova/gpt2"},type:"text"},"zero-shot-classification":{tokenizer:a.t2,pipeline:eI,model:s.o$X,default:{model:"Xenova/distilbert-base-uncased-mnli"},type:"text"},"audio-classification":{pipeline:eP,model:s.K2m,processor:ev,default:{model:"Xenova/wav2vec2-base-superb-ks"},type:"audio"},"zero-shot-audio-classification":{tokenizer:a.t2,pipeline:eB,model:s.$Sz,processor:ev,default:{model:"Xenova/clap-htsat-unfused"},type:"multimodal"},"automatic-speech-recognition":{tokenizer:a.t2,pipeline:ej,model:[s.hZO,s.ENH],processor:ev,default:{model:"Xenova/whisper-tiny.en"},type:"multimodal"},"text-to-audio":{tokenizer:a.t2,pipeline:eV,model:[s.z6E,s.lbf],processor:[ev,null],default:{model:"Xenova/speecht5_tts"},type:"text"},"image-to-text":{tokenizer:a.t2,pipeline:eN,model:s.tLj,processor:ev,default:{model:"Xenova/vit-gpt2-image-captioning"},type:"multimodal"},"image-classification":{pipeline:e$,model:s.En$,processor:ev,default:{model:"Xenova/vit-base-patch16-224"},type:"multimodal"},"image-segmentation":{pipeline:eU,model:[s.U$$,s.$Bv],processor:ev,default:{model:"Xenova/detr-resnet-50-panoptic"},type:"multimodal"},"zero-shot-image-classification":{tokenizer:a.t2,pipeline:eF,model:s.$Sz,processor:ev,default:{model:"Xenova/clip-vit-base-patch32"},type:"multimodal"},"object-detection":{pipeline:eD,model:s.Zn,processor:ev,default:{model:"Xenova/detr-resnet-50"},type:"multimodal"},"zero-shot-object-detection":{tokenizer:a.t2,pipeline:eW,model:s.LdW,processor:ev,default:{model:"Xenova/owlvit-base-patch32"},type:"multimodal"},"document-question-answering":{tokenizer:a.t2,pipeline:eH,model:s.DcG,processor:ev,default:{model:"Xenova/donut-base-finetuned-docvqa"},type:"multimodal"},"image-to-image":{pipeline:eZ,model:s.S2d,processor:ev,default:{model:"Xenova/swin2SR-classical-sr-x2-64"},type:"image"},"depth-estimation":{pipeline:eq,model:s.hY6,processor:ev,default:{model:"Xenova/dpt-large"},type:"image"},"feature-extraction":{tokenizer:a.t2,pipeline:ez,model:s.$Sz,default:{model:"Xenova/all-MiniLM-L6-v2"},type:"text"},"image-feature-extraction":{processor:ev,pipeline:eL,model:[s.IFL,s.$Sz],default:{model:"Xenova/vit-base-patch16-224-in21k"},type:"image"}}),eG=Object.freeze({"sentiment-analysis":"text-classification",ner:"token-classification",asr:"automatic-speech-recognition","text-to-speech":"text-to-audio",embeddings:"feature-extraction"});async function eK(e,t=null,{quantized:r=!0,progress_callback:n=null,config:o=null,cache_dir:i=null,local_files_only:a=!1,revision:s="main"}={}){let u=eX[(e=eG[e]??e).split("_",1)[0]];if(!u)throw Error(`Unsupported pipeline: ${e}. Must be one of [${Object.keys(eX)}]`);t||(t=u.default.model,console.log(`No model specified. Using default model: "${t}".`));let c=new Map([["tokenizer",u.tokenizer],["model",u.model],["processor",u.processor]]),d=await eY(c,t,{quantized:r,progress_callback:n,config:o,cache_dir:i,local_files_only:a,revision:s});return d.task=e,(0,l.T2)(n,{status:"ready",task:e,model:t}),new u.pipeline(d)}async function eY(e,t,r){let n=Object.create(null),o=[];for(let[i,a]of e.entries()){let e;a&&(e=Array.isArray(a)?new Promise(async(e,n)=>{let o;for(let n of a){if(null===n){e(null);return}try{e(await n.from_pretrained(t,r));return}catch(e){o=e}}n(o)}):a.from_pretrained(t,r),n[i]=e,o.push(e))}for(let[e,t]of(await Promise.all(o),Object.entries(n)))n[e]=await t;return n}r(16)},761:function(e,t,r){"use strict";function n(e,t){e&&e(t)}function o(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e]))}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}r.d(t,{$2:function(){return o},Ag:function(){return a},Gg:function(){return u},O7:function(){return h},Sw:function(){return d},T2:function(){return n},Wy:function(){return l},eG:function(){return f},fU:function(){return s},hr:function(){return i},hs:function(){return p},jg:function(){return c}});let a=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}_call(...e){throw Error("Must implement _call method in subclass")}};function s(e){return e?.prototype?.__proto__?.constructor?.name==="TypedArray"}function l(e){return Number.isInteger(e)||"bigint"==typeof e}function u(e){return null!=e}function c(e){let t=[],r=e;for(;Array.isArray(r);)t.push(r.length),r=r[0];return t}function d(e,t,r){let n=e[t];if(void 0!==n)return delete e[t],n;if(void 0===r)throw Error(`Key ${t} does not exist in object.`);return r}function f(...e){return Array.prototype.concat.apply([],e)}function h(...e){return e.reduce((e,t)=>e.flatMap(e=>t.map(t=>[e,t])))}function p(e,t){return Math.abs((e+t)%(2*t)-t)}},1510:function(e,t,r){"use strict";r.d(t,{GA:function(){return o},Z3:function(){return n},pQ:function(){return a}});class n{constructor(e=(e,t)=>e>t){this._heap=[],this._comparator=e}get size(){return this._heap.length}isEmpty(){return 0===this.size}peek(){return this._heap[0]}push(...e){return this.extend(e)}extend(e){for(let t of e)this._heap.push(t),this._siftUp();return this.size}pop(){let e=this.peek(),t=this.size-1;return t>0&&this._swap(0,t),this._heap.pop(),this._siftDown(),e}replace(e){let t=this.peek();return this._heap[0]=e,this._siftDown(),t}_parent(e){return(e+1>>>1)-1}_left(e){return(e<<1)+1}_right(e){return e+1<<1}_greater(e,t){return this._comparator(this._heap[e],this._heap[t])}_swap(e,t){let r=this._heap[e];this._heap[e]=this._heap[t],this._heap[t]=r}_siftUp(){let e=this.size-1;for(;e>0&&this._greater(e,this._parent(e));)this._swap(e,this._parent(e)),e=this._parent(e)}_siftDown(){let e=0;for(;this._left(e)[]),this.endNodes=Array.from({length:this.len+1},()=>[]);let n=new s(this.bosTokenId,0,0,0,0),o=new s(this.eosTokenId,1,this.len,0,0);this.nodes.push(n.clone()),this.nodes.push(o.clone()),this.beginNodes[this.len].push(o),this.endNodes[0].push(n)}insert(e,t,r,n){let o=new s(n,this.nodes.length,e,t,r);this.beginNodes[e].push(o),this.endNodes[e+t].push(o),this.nodes.push(o)}viterbi(){let e=this.len,t=0;for(;t<=e;){if(0==this.beginNodes[t].length)return[];for(let e of this.beginNodes[t]){e.prev=null;let r=0,n=null;for(let o of this.endNodes[t]){let t=o.backtraceScore+e.score;(null===n||t>r)&&(n=o.clone(),r=t)}if(null===n)return[];e.prev=n,e.backtraceScore=r}++t}let r=[],n=this.beginNodes[e][0].prev;if(null===n)return[];let o=n.clone();for(;null!==o.prev;)r.push(o.clone()),o=o.clone().prev.clone();return r.reverse(),r}piece(e){return this.sentence.slice(e.pos,e.pos+e.length)}tokens(){return this.viterbi().map(e=>this.piece(e))}tokenIds(){return this.viterbi().map(e=>e.tokenId)}}class s{constructor(e,t,r,n,o){this.tokenId=e,this.nodeId=t,this.pos=r,this.length=n,this.score=o,this.prev=null,this.backtraceScore=0}clone(){let e=new s(this.tokenId,this.nodeId,this.pos,this.length,this.score);return e.prev=this.prev,e.backtraceScore=this.backtraceScore,e}}},5774:function(e,t,r){"use strict";r.d(t,{AE:function(){return g},C9:function(){return l},CJ:function(){return m},E:function(){return s},GU:function(){return c},Jj:function(){return h},Jm:function(){return i},Pg:function(){return d},Z4:function(){return v},aP:function(){return y},dZ:function(){return u},ez:function(){return p},jF:function(){return f}}),r(2414);var n=r(761),o=r(8709);class i extends n.Ag{constructor(){super(),this.processors=[]}push(e){this.processors.push(e)}extend(e){this.processors.push(...e)}_call(e,t){for(let r of t)this.processors.forEach(t=>t(e,r))}[Symbol.iterator](){return this.processors.values()}}class a extends n.Ag{_call(e,t){throw Error("`_call` should be implemented in a subclass")}}class s extends a{constructor(e){super(),this.force_token_map=Object.fromEntries(e??[])}_call(e,t){let r=this.force_token_map[e.length];return(0,n.Gg)(r)&&(t.data.fill(-1/0),t.data[r]=0),t}}class l extends a{constructor(e){super(),this.bos_token_id=e}_call(e,t){return 1===e.length&&(t.data.fill(-1/0),t.data[this.bos_token_id]=0),t}}class u extends a{constructor(e,t){super(),this.max_length=e,this.forced_eos_token_id=t}_call(e,t){}}class c extends a{constructor(e,t){super(),this.begin_suppress_tokens=e,this.begin_index=t}_call(e,t){if(e.length===this.begin_index)for(let e of this.begin_suppress_tokens)t.data[e]=-1/0;return t}}class d extends a{constructor(e){super(),this.eos_token_id=e.eos_token_id,this.no_timestamps_token_id=e.no_timestamps_token_id,this.timestamp_begin=this.no_timestamps_token_id+1,this.begin_index=(e.forced_decoder_ids||[]).length+2,e.forced_decoder_ids.slice(-1)[0][1]===this.no_timestamps_token_id&&(this.begin_index-=1),this.max_initial_timestamp_index=e.max_initial_timestamp_index}_call(e,t){let r=t.data;if(r[this.no_timestamps_token_id]=-1/0,e.length===this.begin_index-1)return r.fill(-1/0),r[this.timestamp_begin]=0,t;let n=e.slice(this.begin_index),i=n.length>=1&&n[n.length-1]>=this.timestamp_begin,a=n.length<2||n[n.length-2]>=this.timestamp_begin;if(i&&(a?r.subarray(this.timestamp_begin).fill(-1/0):r.subarray(0,this.eos_token_id).fill(-1/0)),e.length===this.begin_index&&null!==this.max_initial_timestamp_index){let e=this.timestamp_begin+this.max_initial_timestamp_index;r.subarray(e+1).fill(-1/0)}let s=(0,o.CI)(r);return Math.log(s.subarray(this.timestamp_begin).map(Math.exp).reduce((e,t)=>e+t))>(0,o.Fp)(s.subarray(0,this.timestamp_begin))[0]&&r.subarray(0,this.timestamp_begin).fill(-1/0),t}}class f extends a{constructor(e){super(),this.no_repeat_ngram_size=e}getNgrams(e){let t=e.length,r=[];for(let n=0;n0&&(n=n.map(e=>e/this.generation_config.temperature)),n}randomSelect(e){let t=Math.random()*e.reduce((e,t)=>e+t,0);for(let r=0;r1)return new x(e);if(e.num_return_sequences>1)throw Error(`num_return_sequences has to be 1 when doing greedy search, but is ${e.num_return_sequences}.`);return new b(e)}}class b extends v{sample(e,t=-1){let r=this.getLogits(e,t);return[[(0,o.Fp)(r)[1],0]]}}class w extends v{sample(e,t=-1){let r=e.dims.at(-1);this.generation_config.top_k>0&&(r=Math.min(this.generation_config.top_k,r));let n=this.getLogits(e,t),i=(0,o.em)(n,r),a=(0,o.XA)(i.map(e=>e[1]));return Array.from({length:this.generation_config.num_beams},()=>{let e=this.randomSelect(a);return[i[e][0],Math.log(a[e])]})}}class x extends v{sample(e,t=-1){let r=e.dims.at(-1);this.generation_config.top_k>0&&(r=Math.min(this.generation_config.top_k,r));let n=this.getLogits(e,t),i=(0,o.em)(n,r),a=(0,o.XA)(i.map(e=>e[1]));return Array.from({length:this.generation_config.num_beams},(e,t)=>[i[t][0],Math.log(a[t])])}}},911:function(e,t,r){"use strict";r.d(t,{hn:function(){return f},st:function(){return g},yM:function(){return y}});var n=r(7147),o=r(1418),i=r(319),a=r(851),s=r(761),l=r(357),u=r(9109).lW;globalThis.ReadableStream||(globalThis.ReadableStream=i.ReadableStream);class c{_CONTENT_TYPE_MAP={txt:"text/plain",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"};constructor(e){if(this.filePath=e,this.headers=new Headers,this.exists=n.existsSync(e),this.exists){this.status=200,this.statusText="OK";let t=n.statSync(e);this.headers.set("content-length",t.size.toString()),this.updateContentType();let r=this;this.body=new ReadableStream({start(e){r.arrayBuffer().then(t=>{e.enqueue(new Uint8Array(t)),e.close()})}})}else this.status=404,this.statusText="Not Found",this.body=null}updateContentType(){let e=this.filePath.toString().split(".").pop().toLowerCase();this.headers.set("content-type",this._CONTENT_TYPE_MAP[e]??"application/octet-stream")}clone(){let e=new c(this.filePath);return e.exists=this.exists,e.status=this.status,e.statusText=this.statusText,e.headers=new Headers(this.headers),e}async arrayBuffer(){return(await n.promises.readFile(this.filePath)).buffer}async blob(){return new Blob([await n.promises.readFile(this.filePath)],{type:this.headers.get("content-type")})}async text(){return await n.promises.readFile(this.filePath,"utf8")}async json(){return JSON.parse(await this.text())}}function d(e,t=null){let r;try{r=new URL(e)}catch(e){return!1}return(!t||!!t.includes(r.hostname))&&("http:"===r.protocol||"https:"===r.protocol)}async function f(e){if(a.O.useFS&&!d(e))return new c(e);if(void 0===l||l?.release?.name!=="node")return fetch(e);{let t=!!l.env?.TESTING_REMOTELY,r=a.O.version,n=new Headers;if(n.set("User-Agent",`transformers.js/${r}; is_ci/${t};`),d(e,["huggingface.co","hf.co"])){let e=l.env?.HF_TOKEN??l.env?.HF_ACCESS_TOKEN;e&&n.set("Authorization",`Bearer ${e}`)}return fetch(e,{headers:n})}}let h={400:"Bad request error occurred while trying to load file",401:"Unauthorized access to file",403:"Forbidden access to file",404:"Could not locate file",408:"Request timeout error occurred while trying to load file",500:"Internal server error error occurred while trying to load file",502:"Bad gateway error occurred while trying to load file",503:"Service unavailable error occurred while trying to load file",504:"Gateway timeout error occurred while trying to load file"};class p{constructor(e){this.path=e}async match(e){let t=new c(o.join(this.path,e));return t.exists?t:void 0}async put(e,t){let r=u.from(await t.arrayBuffer()),i=o.join(this.path,e);try{await n.promises.mkdir(o.dirname(i),{recursive:!0}),await n.promises.writeFile(i,r)}catch(e){console.warn("An error occurred while writing the file to cache:",e)}}}async function m(e,...t){for(let r of t)try{let t=await e.match(r);if(t)return t}catch(e){continue}}async function g(e,t,r=!0,n={}){let o,i,l,u;if(!a.O.allowLocalModels){if(n.local_files_only)throw Error("Invalid configuration detected: local models are disabled (`env.allowLocalModels=false`) but you have requested to only use local models (`local_files_only=true`).");if(!a.O.allowRemoteModels)throw Error("Invalid configuration detected: both local and remote models are disabled. Fix by setting `env.allowLocalModels` or `env.allowRemoteModels` to `true`.")}if((0,s.T2)(n.progress_callback,{status:"initiate",name:e,file:t}),!o&&a.O.useBrowserCache){if("undefined"==typeof caches)throw Error("Browser cache is not available in this environment.");try{o=await caches.open("transformers-cache")}catch(e){console.warn("An error occurred while opening the browser cache:",e)}}if(!o&&a.O.useFSCache&&(o=new p(n.cache_dir??a.O.cacheDir)),!o&&a.O.useCustomCache){if(!a.O.customCache)throw Error("`env.useCustomCache=true`, but `env.customCache` is not defined.");if(!a.O.customCache.match||!a.O.customCache.put)throw Error("`env.customCache` must be an object which implements the `match` and `put` functions of the Web Cache API. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Cache");o=a.O.customCache}let c=n.revision??"main",g=b(e,t),y=b(a.O.localModelPath,g),w=b(a.O.remoteHost,a.O.remotePathTemplate.replaceAll("{model}",e).replaceAll("{revision}",encodeURIComponent(c)),t),x="main"===c?g:b(e,c,t),_=o instanceof p?x:w,S=!1;o&&(l=await m(o,y,_));let E=void 0!==l;if(void 0===l){if(a.O.allowLocalModels){if(d(g)){if(n.local_files_only)throw Error(`\`local_files_only=true\`, but attempted to load a remote file from: ${g}.`);if(!a.O.allowRemoteModels)throw Error(`\`env.allowRemoteModels=false\`, but attempted to load a remote file from: ${g}.`)}else try{l=await f(y),i=y}catch(e){console.warn(`Unable to load from local path "${y}": "${e}"`)}}if(void 0===l||404===l.status){if(n.local_files_only||!a.O.allowRemoteModels){if(!r)return null;throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${y}".`)}if(200!==(l=await f(w)).status)return function(e,t,r){if(!r)return null;let n=h[e]??`Error (${e}) occurred while trying to load file`;throw Error(`${n}: "${t}".`)}(l.status,w,r);i=_}S=o&&"undefined"!=typeof Response&&l instanceof Response&&200===l.status}(0,s.T2)(n.progress_callback,{status:"download",name:e,file:t});let k={status:"progress",name:e,file:t};return n.progress_callback?E&&"undefined"!=typeof navigator&&/firefox/i.test(navigator.userAgent)?(u=new Uint8Array(await l.arrayBuffer()),(0,s.T2)(n.progress_callback,{...k,progress:100,loaded:u.length,total:u.length})):u=await v(l,e=>{(0,s.T2)(n.progress_callback,{...k,...e})}):u=new Uint8Array(await l.arrayBuffer()),S&&i&&await o.match(i)===void 0&&await o.put(i,new Response(u,{headers:l.headers})).catch(e=>{console.warn(`Unable to add response to browser cache: ${e}.`)}),(0,s.T2)(n.progress_callback,{status:"done",name:e,file:t}),u}async function y(e,t,r=!0,n={}){let o=await g(e,t,r,n);return null===o?{}:JSON.parse(new TextDecoder("utf-8").decode(o))}async function v(e,t){let r=e.headers.get("Content-Length");null===r&&console.warn("Unable to determine content-length from response headers. Will expand buffer when needed.");let n=parseInt(r??"0"),o=new Uint8Array(n),i=0,a=e.body.getReader();async function s(){let{done:e,value:r}=await a.read();if(e)return;let l=i+r.length;if(l>n){let e=new Uint8Array(n=l);e.set(o),o=e}return o.set(r,i),t({progress:(i=l)/n*100,loaded:i,total:n}),s()}return await s(),o}function b(...e){return(e=e.map((t,r)=>(r&&(t=t.replace(RegExp("^/"),"")),r!==e.length-1&&(t=t.replace(RegExp("/$"),"")),t))).join("/")}},8709:function(e,t,r){"use strict";function n(e,[t,r,n],[o,i],a="bilinear",s=!1){let l=i/n,u=o/r,c=new e.constructor(o*i*t),d=r*n,f=o*i;for(let a=0;a=0;--e)o[e]=i,n[e]=t[r[e]],i*=n[e];let i=r.map((e,t)=>o[r.indexOf(t)]),a=new e.constructor(e.length);for(let r=0;r=0;--e)n+=o%t[e]*i[e],o=Math.floor(o/t[e]);a[n]=e[r]}return[a,n]}function i(e){let t=u(e)[0],r=e.map(e=>Math.exp(e-t)),n=r.reduce((e,t)=>e+t,0);return r.map(e=>e/n)}function a(e){return i(e).map(e=>Math.log(e))}function s(e,t=0){return e=Array.from(e).map((e,t)=>[t,e]).sort((e,t)=>t[1]-e[1]),null!==t&&t>0&&(e=e.slice(0,t)),e}function l(e){if(0===e.length)throw Error("Array must not be empty");let t=e[0],r=0;for(let n=1;nt&&(t=e[n],r=n);return[Number(t),r]}function c(e){return e>0&&(e&e-1)==0}r.d(t,{CI:function(){return a},Fp:function(){return u},NM:function(){return m},Nq:function(){return n},VV:function(){return l},XA:function(){return i},eT:function(){return g},em:function(){return s},nu:function(){return o},qC:function(){return p},vw:function(){return h}});class d{constructor(e){if(this.size=0|e,this.size<=1||!c(this.size))throw Error("FFT size must be a power of two larger than 1");this._csize=e<<1,this.table=new Float64Array(2*this.size);for(let e=0;ee;e<<=1)++t;this._width=t%2==0?t-1:t,this._bitrev=new Int32Array(1<>>t&3)<>>1);for(let t=0;t>>1]=e[t];return r}toComplexArray(e,t){let r=t||this.createComplexArray();for(let t=0;t>>1],r[t+1]=0;return r}completeSpectrum(e){let t=this._csize,r=t>>>1;for(let n=2;n>=2;a>=2;a>>=2){let t=(s=i/a<<1)>>>2;for(n=0;n>>1,a>>>1)}else for(n=0,o=0;n>>1,a>>>1,r)}for(a>>=2;a>=2;a>>=2){let t=(s=i/a<<1)>>>2;for(n=0;n>1;++t){let r=(t+1-e)**2/2,n=Math.sqrt(s**2+l**2)**r,a=r*Math.atan2(l,s),u=2*t;o[u]=n*Math.cos(a),o[u+1]=n*Math.sin(a),i[u]=o[u],i[u+1]=-o[u+1]}this._slicedChirpBuffer=o.subarray(t,r),this._f=new d(n>>1),this._f.transform(this._chirpBuffer,i)}_transform(e,t,r){let n=this._buffer1,o=this._buffer2,i=this._outBuffer1,a=this._outBuffer2,s=this._chirpBuffer,l=this._slicedChirpBuffer,u=this._a;if(r)for(let e=0;e>1];n[e]=o*l[e],n[r]=o*l[r]}else for(let e=0;e=e.length&&(o=2*(e.length-1)-o),n[i++]=e[o]}n.sort(),r[t]=n[o]}return r}function m(e,t){let r=Math.pow(10,t);return Math.round(e*r)/r}function g(e){let t=Math.round(e);return Math.abs(e)%1==.5?t%2==0?t:t-1:t}},2414:function(e,t,r){"use strict";r.d(t,{J6:function(){return g},Ks:function(){return y},d3:function(){return h},e:function(){return b},es:function(){return s},f3:function(){return m},kn:function(){return p},r6:function(){return v},sX:function(){return l},v6:function(){return u}});var n=r(967),o=r(8709);let i=Object.freeze({float32:Float32Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array}),a=n.ONNX.Tensor;class s{dims;type;data;size;constructor(...e){return e[0]instanceof a?Object.assign(this,e[0]):Object.assign(this,new a(e[0],e[1],e[2])),new Proxy(this,{get:(e,t)=>{if("string"==typeof t){let r=Number(t);if(Number.isInteger(r))return e._getitem(r)}return e[t]},set:(e,t,r)=>e[t]=r})}*[Symbol.iterator](){let[e,...t]=this.dims;if(t.length>0){let r=t.reduce((e,t)=>e*t);for(let n=0;n0))return new s(this.type,[this.data[e]],r);{let t=r.reduce((e,t)=>e*t);return this._subarray(e,t,r)}}indexOf(e){for(let t=0;te*t))throw Error(`cannot reshape array of size ${r} into shape (${t})`);let n=e;for(let e=t.length-1;e>=0;e--)n=n.reduce((r,n)=>{let o=r[r.length-1];return o.lengtho[1])throw Error(`Invalid slice: ${o}`);let e=[Math.max(o[0],0),Math.min(o[1],this.dims[n])];r.push(e),t.push(e[1]-e[0])}else throw Error(`Invalid slice: ${o}`)}let n=r.map(([e,t])=>t-e),o=n.reduce((e,t)=>e*t),i=new this.data.constructor(o),a=this.stride();for(let e=0;e=0;--o){let e=n[o];t+=(i%e+r[o][0])*a[o],i=Math.floor(i/e)}i[e]=this.data[t]}return new s(this.type,i,t)}permute(...e){return function(e,t){let[r,n]=(0,o.nu)(e.data,e.dims,t);return new s(e.type,r,n)}(this,e)}transpose(...e){return this.permute(...e)}sum(e=null,t=!1){return this.norm(1,e,t)}norm(e="fro",t=null,r=!1){if("fro"===e)e=2;else if("string"==typeof e)throw Error(`Unsupported norm: ${e}`);if(null===t){let t=this.data.reduce((t,r)=>t+r**e,0)**(1/e);return new s(this.type,[t],[])}t=f(t,this.dims.length);let n=this.dims.slice();n[t]=1;let o=new this.data.constructor(this.data.length/this.dims[t]);for(let r=0;r=0;--e){let r=this.dims[e];e!==t&&(i+=o%r*a,a*=n[e]),o=Math.floor(o/r)}o[i]+=this.data[r]**e}if(1!==e)for(let t=0;t=0;--r){let e=this.dims[r];r!==t&&(n+=o%e*i,i*=this.dims[r]),o=Math.floor(o/e)}this.data[e]/=r.data[n]}return this}normalize(e=2,t=1){return this.clone().normalize_(e,t)}stride(){return function(e){let t=Array(e.length);for(let r=e.length-1,n=1;r>=0;--r)t[r]=n,n*=e[r];return t}(this.dims)}squeeze(e=null){return new s(this.type,this.data,c(this.dims,e))}squeeze_(e=null){return this.dims=c(this.dims,e),this}unsqueeze(e=null){return new s(this.type,this.data,d(this.dims,e))}unsqueeze_(e=null){return this.dims=d(this.dims,e),this}flatten_(e=0,t=-1){t=(t+this.dims.length)%this.dims.length;let r=this.dims.slice(0,e),n=this.dims.slice(e,t+1),o=this.dims.slice(t+1);return this.dims=[...r,n.reduce((e,t)=>e*t,1),...o],this}flatten(e=0,t=-1){return this.clone().flatten_(e,t)}view(...e){let t=-1;for(let r=0;rn!==t?e*r:e,1);e[t]=this.data.length/r}return new s(this.type,this.data,e)}neg_(){for(let e=0;e1!==e):"number"==typeof t?1===e[t]&&e.splice(t,1):Array.isArray(t)&&(e=e.filter((e,r)=>1!==e||!t.includes(r))),e}function d(e,t){return t=f(t,e.length+1),(e=e.slice()).splice(t,0,1),e}function f(e,t,r=null){if(e<-t||e>=t)throw Error(`IndexError: index ${e} is out of bounds for dimension${null===r?"":" "+r} with size ${t}`);return e<0&&(e=(e%t+t)%t),e}function h(e,t=0){t=f(t,e[0].dims.length);let r=e[0].dims.slice();r[t]=e.reduce((e,r)=>e+r.dims[t],0);let n=r.reduce((e,t)=>e*t,1),o=new e[0].data.constructor(n),i=e[0].type;if(0===t){let t=0;for(let r of e)o.set(r.data,t),t+=r.data.length}else{let n=0;for(let i=0;i=0;--o){let e=a.dims[o],u=s%e;o===t&&(u+=n),i+=u*l,l*=r[o],s=Math.floor(s/e)}o[i]=a.data[e]}n+=a.dims[t]}}return new s(i,o,r)}function p(e,t=0){return h(e.map(e=>e.unsqueeze(t)),t)}function m(e,t=null,r=1,n=!1){if(null===t){let t=e.data.reduce((e,t)=>e+t,0)/e.data.length,n=Math.sqrt(e.data.reduce((e,r)=>e+(r-t)**2,0)/(e.data.length-r)),o=new s(e.type,[t],[]);return[new s(e.type,[n],[]),o]}t=f(t,e.dims.length);let o=g(e,t,n),i=e.dims.slice();i[t]=1;let a=new e.data.constructor(e.data.length/e.dims[t]);for(let r=0;r=0;--o){let r=e.dims[o];o!==t&&(n+=a%r*s,s*=i[o]),a=Math.floor(a/r)}a[n]+=(e.data[r]-o.data[n])**2}for(let n=0;ne+t,0);return new s(e.type,[t/e.data.length],[])}t=f(t,e.dims.length);let n=e.dims.slice();n[t]=1;let o=new e.data.constructor(e.data.length/e.dims[t]);for(let r=0;r=0;--o){let r=e.dims[o];o!==t&&(i+=a%r*s,s*=n[o]),a=Math.floor(a/r)}o[i]+=e.data[r]}if(1!==e.dims[t])for(let r=0;r0||l>0;)switch(u.push(a-1),c.push(l-1),i[a][l].item()){case 0:--a,--l;break;case 1:--a;break;case 2:--l;break;default:throw Error(`Internal error in dynamic time warping. Unexpected trace[${a}, ${l}]. Please file a bug report.`)}return u.reverse(),c.reverse(),[u,c]}function v(e){var t;return new s("int64",new BigInt64Array((t=e.dims).reduce((e,t)=>e*t,1)).fill(1n),t)}function b(e,t){if(2!==e.dims.length)throw Error("The tensor must have 2 dimensions");if(e.dims.at(-1)%8!=0)throw Error("The last dimension of the tensor must be a multiple of 8");if(!["binary","ubinary"].includes(t))throw Error("The precision must be either 'binary' or 'ubinary'");let r="binary"===t,n=r?Int8Array:Uint8Array,o=e.data,i=new n(o.length/8);for(let e=0;e0?1:0,n=Math.floor(e/8),a=e%8;i[n]|=t<<7-a,r&&0===a&&(i[n]-=128)}return new s(r?"int8":"uint8",i,[e.dims[0],e.dims[1]/8])}},5737:function(e,t,r){"use strict";r.d(t,{e:function(){return m}});var n=r(281),o=r(4975),i=r(2026),a=r(7445),s=r.n(a),l=r(1213),u=l.Z?window.location.href:"";class c{constructor(){this._eventCallbacks={}}_dispatchEvent(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{e(...r)})}addEventListener(e,t){var r=this;return r._eventCallbacks[e]||(r._eventCallbacks[e]=[t]),r._eventCallbacks[e].push(t),{remove(){var n=r._eventCallbacks[e].filter(e=>e.toString()!==t.toString());r._eventCallbacks[e]=n}}}removeEventListener(e,t){console.error("Linking.removeEventListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `Linking.addEventListener`.");var r=this._eventCallbacks[e].filter(e=>e.toString()!==t.toString());this._eventCallbacks[e]=r}canOpenURL(){return Promise.resolve(!0)}getInitialURL(){return Promise.resolve(u)}openURL(e,t){1==arguments.length&&(t="_blank");try{return d(e,t),this._dispatchEvent("onOpen",e),Promise.resolve()}catch(e){return Promise.reject(e)}}_validateURL(e){s()("string"==typeof e,"Invalid URL: should be a string. Was: "+e),s()(e,"Invalid URL: cannot be empty")}}var d=(e,t)=>{if(l.Z){var r=new URL(e,window.location).toString();0===r.indexOf("tel:")?window.location=r:window.open(r,t,"noopener")}},f=new c,h=r(2281);let p=(0,o.z)(i.J,{name:"Anchor",tag:"a",accessibilityRole:"link"}),m=p.styleable(({href:e,target:t,...r},o)=>(0,h.jsx)(p,{...r,...n.$L?{href:e,target:t}:{onPress:t=>{r.onPress?.(t),void 0!==e&&f.openURL(e)}},ref:o}))},9175:function(e,t,r){"use strict";r.d(t,{K:function(){return F}});var n=r(281),o=r(4975),i=r(9046),a=r(2202),s=r(8306),l=r(8970),u=r(6748);let c=(e="$true",t)=>{let{props:r}=t,n=(0,s.f)(e,t),o=(0,l.H)(e,t),i=r.rows??r.numberOfLines,c="number"==typeof i?i*(0,a.Ve)(o.lineHeight):"auto",d=(0,u.Pj)(e,{shift:-2,bounds:[2]}),f=(0,u.Pj)(e,{shift:-1,bounds:[2]});return{...n,...o,paddingVertical:d,paddingHorizontal:f,height:c}};var d=r(8411),f=r(9087),h=r(2265);let p=(e,t)=>()=>{};var m=r(2281),g=r(5803),y=r(7792),v=r(9115),b=r(9647),w=r(1435),x=r(9926),_=r(5158),S=r(4834),E=r(3201),k=r(929),C=r(3013),R=r(131),A=(e,t)=>{var r=e.selectionEnd,n=e.selectionStart,o=t.start,i=t.end;return o!==n||i!==r},T=(e,t)=>{if(A(e,t)){var r=t.start,n=t.end;try{e.setSelectionRange(r,n||r)}catch(e){}}},O=Object.assign({},y.lG,y.LO,y._T,y.YB,y.Uy,y.hJ,y.E5,y.vr,{autoCapitalize:!0,autoComplete:!0,autoCorrect:!0,autoFocus:!0,defaultValue:!0,disabled:!0,lang:!0,maxLength:!0,onChange:!0,onScroll:!0,placeholder:!0,pointerEvents:!0,readOnly:!0,rows:!0,spellCheck:!0,value:!0,type:!0}),M=e=>(0,v.Z)(e,O),I=null,z=h.forwardRef((e,t)=>{var r,n,o=e.autoCapitalize,i=e.autoComplete,a=e.autoCompleteType,s=e.autoCorrect,l=void 0===s||s,u=e.blurOnSubmit,c=e.caretHidden,d=e.clearTextOnFocus,f=e.dir,p=e.editable,m=e.enterKeyHint,y=e.inputMode,v=e.keyboardType,k=e.multiline,A=void 0!==k&&k,O=e.numberOfLines,z=e.onBlur,P=e.onChange,B=e.onChangeText,j=e.onContentSizeChange,N=e.onFocus,$=e.onKeyPress,U=e.onLayout,F=e.onMoveShouldSetResponder,D=e.onMoveShouldSetResponderCapture,W=e.onResponderEnd,H=e.onResponderGrant,V=e.onResponderMove,Z=e.onResponderReject,q=e.onResponderRelease,X=e.onResponderStart,G=e.onResponderTerminate,K=e.onResponderTerminationRequest,Y=e.onScrollShouldSetResponder,J=e.onScrollShouldSetResponderCapture,Q=e.onSelectionChange,ee=e.onSelectionChangeShouldSetResponder,et=e.onSelectionChangeShouldSetResponderCapture,er=e.onStartShouldSetResponder,en=e.onStartShouldSetResponderCapture,eo=e.onSubmitEditing,ei=e.placeholderTextColor,ea=e.readOnly,es=e.returnKeyType,el=e.rows,eu=e.secureTextEntry,ec=void 0!==eu&&eu,ed=e.selection,ef=e.selectTextOnFocus,eh=e.spellCheck;if(null!=y)n=y,r="email"===y?"email":"tel"===y?"tel":"search"===y?"search":"url"===y?"url":"text";else if(null!=v)switch((0,R.O)("keyboardType","keyboardType is deprecated. Use inputMode."),v){case"email-address":r="email";break;case"number-pad":case"numeric":n="numeric";break;case"decimal-pad":n="decimal";break;case"phone-pad":r="tel";break;case"search":case"web-search":r="search";break;case"url":r="url";break;default:r="text"}ec&&(r="password");var ep=h.useRef({height:null,width:null}),em=h.useRef(null),eg=h.useRef(null),ey=h.useRef(!1);h.useEffect(()=>{em.current&&eg.current&&T(em.current,eg.current),ey.current=ec},[ec]);var ev=h.useCallback(e=>{if(A&&j&&null!=e){var t=e.scrollHeight,r=e.scrollWidth;(t!==ep.current.height||r!==ep.current.width)&&(ep.current.height=t,ep.current.width=r,j({nativeEvent:{contentSize:{height:ep.current.height,width:ep.current.width}}}))}},[A,j]),eb=h.useMemo(()=>e=>{null!=e&&(e.clear=function(){null!=e&&(e.value="")},e.isFocused=function(){return null!=e&&C.Z.currentlyFocusedField()===e},ev(e))},[ev]);(0,w.Z)(()=>{var e=em.current;null!=e&&null!=ed&&T(e,ed),document.activeElement===e&&(C.Z._currentlyFocusedNode=e)},[em,ed]),(0,b.Z)(em,U),(0,S.Z)(em,{onMoveShouldSetResponder:F,onMoveShouldSetResponderCapture:D,onResponderEnd:W,onResponderGrant:H,onResponderMove:V,onResponderReject:Z,onResponderRelease:q,onResponderStart:X,onResponderTerminate:G,onResponderTerminationRequest:K,onScrollShouldSetResponder:Y,onScrollShouldSetResponderCapture:J,onSelectionChangeShouldSetResponder:ee,onSelectionChangeShouldSetResponderCapture:et,onStartShouldSetResponder:er,onStartShouldSetResponderCapture:en});var ew=(0,E.PE)().direction,ex=M(e);ex.autoCapitalize=void 0===o?"sentences":o,ex.autoComplete=i||a||"on",ex.autoCorrect=l?"on":"off",ex.dir=void 0!==f?f:"auto",null!=es&&(0,R.O)("returnKeyType","returnKeyType is deprecated. Use enterKeyHint."),ex.enterKeyHint=m||es,ex.inputMode=n,ex.onBlur=function(e){C.Z._currentlyFocusedNode=null,z&&(e.nativeEvent.text=e.target.value,z(e))},ex.onChange=function(e){var t=e.target,r=t.value;e.nativeEvent.text=r,ev(t),P&&P(e),B&&B(r)},ex.onFocus=function(e){var t=e.target;N&&(e.nativeEvent.text=t.value,N(e)),null!=t&&(C.Z._currentlyFocusedNode=t,d&&(t.value=""),ef&&(null!=I&&clearTimeout(I),I=setTimeout(()=>{null!=t&&t.select()},0)))},ex.onKeyDown=function(e){var t=e.target;e.stopPropagation();var r=!A,n=e.nativeEvent,o=n.isComposing||229===n.keyCode;$&&$(e),"Enter"!==e.key||e.shiftKey||o||e.isDefaultPrevented()||((u||!A)&&eo&&(e.preventDefault(),n.text=e.target.value,eo(e)),(null==u?r:u)&&null!=t&&setTimeout(()=>t.blur(),0))},ex.onSelect=function(e){try{var t=e.target,r=t.selectionStart,n=t.selectionEnd,o={start:r,end:n};Q&&(e.nativeEvent.selection=o,e.nativeEvent.text=e.target.value,Q(e)),ey.current===ec&&(eg.current=o)}catch(e){}},null!=p&&(0,R.O)("editable","editable is deprecated. Use readOnly."),ex.readOnly=!0===(void 0!==ea&&ea)||!1===p,null!=O&&(0,R.O)("numberOfLines","TextInput numberOfLines is deprecated. Use rows."),ex.rows=A?null!=el?el:O:1,ex.spellCheck=null!=eh?eh:l,ex.style=[{"--placeholderTextColor":ei},L.textinput$raw,L.placeholder,e.style,c&&L.caretHidden],ex.type=A?void 0:r;var e_=(0,_.Z)(ex),eS=(0,x.Z)(em,e_,eb,t);ex.ref=eS;var eE=null!=e.lang?(0,E.w1)(e.lang):null,ek=e.dir||eE;return(0,g.Z)(A?"textarea":"input",ex,{writingDirection:ek||ew})});z.displayName="TextInput",z.State=C.Z;var L=k.Z.create({textinput$raw:{MozAppearance:"textfield",WebkitAppearance:"none",backgroundColor:"transparent",border:"0 solid black",borderRadius:0,boxSizing:"border-box",font:"14px System",margin:0,padding:0,resize:"none"},placeholder:{placeholderTextColor:"var(--placeholderTextColor)"},caretHidden:{caretColor:"transparent"}}),P=r(357);let B={size:"$true",fontFamily:"$body",borderWidth:1,outlineWidth:0,color:"$color",...n.$L?{tabIndex:0}:{focusable:!0},borderColor:"$borderColor",backgroundColor:"$background",minWidth:0,hoverStyle:{borderColor:"$borderColorHover"},focusStyle:{borderColor:"$borderColorFocus"},focusVisibleStyle:{outlineColor:"$outlineColor",outlineWidth:2,outlineStyle:"solid"}},j=(0,o.z)(z,{name:"Input",variants:{unstyled:{false:B},size:{"...size":(e="$true",t)=>{if(t.props.multiline||t.props.numberOfLines>1)return c(e,t);let r=(0,s.f)(e,t),o=(0,u.Pj)(e,{shift:-1,bounds:[2]}),i=(0,l.H)(e,t);return!n.$L&&i&&delete i.lineHeight,{...i,...r,paddingHorizontal:o}}},disabled:{true:{}}},defaultVariants:{unstyled:"1"===P.env.TAMAGUI_HEADLESS}},{isInput:!0,accept:{placeholderTextColor:"color",selectionColor:"color"}});function N(e,t){let r=(0,d.Fg)(),{onChangeText:n,ref:o}=function({isInput:e,props:t,ref:r}){let{id:n,onChangeText:o,value:a,defaultValue:s}=t,l=(0,h.useRef)(a||s||""),u=(0,h.useRef)(),c=(0,h.useCallback)(t=>{n&&t&&(u.current?.(),u.current=p(n,{focus:t.focus,...e&&{focusAndSelect(){t.focus(),t.setSelection&&"string"==typeof l.current&&t.setSelection(0,l.current.length)}}}))},[e,n]),d=(0,i.FE)(r,c);return(0,h.useEffect)(()=>()=>{u.current?.()},[]),{ref:d,onChangeText:(0,f.z)(e=>{l.current=e,o?.(e)})}}({props:e,ref:t,isInput:!0}),a=e.placeholderTextColor,s=r[a]?.get()??a??r.placeholderColor?.get();return{ref:o,readOnly:e.disabled,...e,placeholderTextColor:s,onChangeText:n}}j.styleable((e,t)=>{let r=(0,h.useRef)(null),n=N(e,(0,i.ex)(t,r));return(0,m.jsx)(j,{...n})});var $=r(357);let U=(0,o.z)(j,{name:"TextArea",multiline:!0,whiteSpace:"pre-wrap",variants:{unstyled:{false:{height:"auto",...B}},size:{"...size":c}},defaultVariants:{unstyled:"1"===$.env.TAMAGUI_HEADLESS}}),F=U.styleable((e,t)=>{let r=(0,h.useRef)(null),o=N(e,(0,i.ex)(t,r)),a={[n.$L?"rows":"numberOfLines"]:e.unstyled?void 0:4};return(0,m.jsx)(U,{...a,...o})})}}]); \ No newline at end of file