PageSourceSearch

https://chat.cherry.fun/_next/static/chunks/v-fa70753b-16d8ac8d998e5c31.js

js cherry.fun collected 2026-10-07 08:46:18 UTC 80,064 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2853],{65606:e=>{var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],u=!1,l=-1;function d(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&h())}function h(){if(!u){var e=s(d);u=!0;for(var t=c.length;t;){for(r=c,c=[];++l<t;)r&&r[l].run();l=-1,t=c.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},79995:(e,t,n)=>{let r=n(47685),o=n(77245),i=n(16383),a=n(40934);function s(e,t,n,i,a){let s=[].slice.call(arguments,1),c=s.length,u="function"==typeof s[c-1];if(!u&&!r())throw Error("Callback required as last argument");if(u){if(c<2)throw Error("Too few arguments provided");2===c?(a=n,n=t,t=i=void 0):3===c&&(t.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=t,t=void 0))}else{if(c<1)throw Error("Too few arguments provided");return 1===c?(n=t,t=i=void 0):2!==c||t.getContext||(i=n,n=t,t=void 0),new Promise(function(r,a){try{let a=o.create(n,i);r(e(a,t,i))}catch(e){a(e)}})}try{let r=o.create(n,i);a(null,e(r,t,i))}catch(e){a(e)}}t.create=o.create,t.toCanvas=s.bind(null,i.render),t.toDataURL=s.bind(null,i.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return a.render(e,n)})},47685:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},863:(e,t,n)=>{let r=n(56880).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){let n=[],r=t.getRowColCoords(e),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)(0!==e||0!==t)&&(0!==e||t!==o-1)&&(e!==o-1||0!==t)&&n.push([r[e],r[t]]);return n}},22115:(e,t,n)=>{let r=n(71932),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},48071:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},53972:e=>{function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){let o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t}
1,85688:(e,t,n)=>{let r=n(71932);function o(e){this.mode=r.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},93684:(e,t,n)=>{let r=n(20865),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[(e-1)*4+0];case r.M:return o[(e-1)*4+1];case r.Q:return o[(e-1)*4+2];case r.H:return o[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[(e-1)*4+0];case r.M:return i[(e-1)*4+1];case r.Q:return i[(e-1)*4+2];case r.H:return i[(e-1)*4+3];default:return}}},20865:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}}
1,87428:(e,t,n)=>{let r=n(56880).getSymbolSize;t.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},73335:(e,t,n)=>{let r=n(56880),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){let n=e.bit<<3|t,i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return(n<<10|i)^21522}},3455:(e,t)=>{let n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},47873:(e,t,n)=>{let r=n(71932),o=n(56880);function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},e.exports=i},69616:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let n={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,r=0,o=0,i=0,a=null,s=null;for(let c=0;c<t;c++){o=i=0,a=s=null;for(let u=0;u<t;u++){let t=e.get(c,u);t===a?o++:(o>=5&&(r+=n.N1+(o-5)),a=t,o=1),(t=e.get(u,c))===s?i++:(i>=5&&(r+=n.N1+(i-5)),s=t,i=1)}o>=5&&(r+=n.N1+(o-5)),i>=5&&(r+=n.N1+(i-5))}return r},t.getPenaltyN2=function(e){let t=e.size,r=0;for(let n=0;n<t-1;n++)for(let o=0;o<t-1;o++){let t=e.get(n,o)+e.get(n,o+1)+e.get(n+1,o)+e.get(n+1,o+1);(4===t||0===t)&&r++}return r*n.N2},t.getPenaltyN3=function(e){let t=e.size,r=0,o=0,i=0;for(let n=0;n<t;n++){o=i=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(n,a),a>=10&&(1488===o||93===o)&&r++,i=i<<1&2047|e.get(a,n),a>=10&&(1488===i||93===i)&&r++}return r*n.N3},t.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/r/5)-10)*n.N4},t.applyMask=function(e,n){let r=n.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)n.isReserved(i,o)||n.xor(i,o,function(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,i,o))},t.getBestMask=function(e,n){let r=Object.keys(t.Patterns).length,o=0,i=1/0;for(let a=0;a<r;a++){n(a),t.applyMask(a,e);let r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<i&&(i=r,o=a)}return o}},71932:(e,t,n)=>{let r=n(35040),o=n(26734);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!r.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},53773:(e,t,n)=>{let r=n(71932);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let r=this.data.length-t;r>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*r+1))},e.exports=o},90177:(e,t,n)=>{let r=n(3455);t.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<t.length;i++)n[o+i]^=r.mul(e[o],t[i]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let o=0;o<t.length;o++)n[o]^=r.mul(t[o],e);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=t.mul(n,new Uint8Array([1,r.exp(o)]));return n}},77245:(e,t,n)=>{let r=n(56880),o=n(20865),i=n(48071),a=n(53972),s=n(863),c=n(87428),u=n(69616),l=n(93684),d=n(78928),h=n(54557),f=n(73335),p=n(71932),g=n(28181);function m(e,t,n){let r,o;let i=e.size,a=f.getEncodedBits(t,n);for(r=0;r<15;r++)o=(a>>r&1)==1,r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}t.create=function(e,t){let n,f;if(void 0===e||""===e)throw Error("No input text");let v=o.M;return void 0!==t&&(v=o.from(t.errorCorrectionLevel,o.M),n=h.from(t.version),f=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,n,o){let f;if(Array.isArray(e))f=g.fromArray(e);else if("string"==typeof e){let r=t;if(!r){let t=g.rawSplit(e);r=h.getBestVersionForData(t,n)}f=g.fromString(e,r||40)}else throw Error("Invalid data");let v=h.getBestVersionForData(f,n);if(!v)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<v)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+v+".\n")}else t=v;let y=function(e,t,n){let o=new i;
vendor: 10,237 bytes, line 1
1n.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(o)});let a=(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t))*8;for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,n){let o,i;let a=r.getSymbolTotalCodewords(t),s=a-l.getTotalCodewordsCount(t,n),c=l.getBlocksCount(t,n),u=a%c,h=c-u,f=Math.floor(a/c),p=Math.floor(s/c),g=p+1,m=f-p,v=new d(m),y=0,w=Array(c),E=Array(c),C=0,b=new Uint8Array(e.buffer);for(let e=0;e<c;e++){let t=e<h?p:g;w[e]=b.slice(y,y+t),E[e]=v.encode(w[e]),y+=t,C=Math.max(C,t)}let R=new Uint8Array(a),S=0;for(o=0;o<C;o++)for(i=0;i<c;i++)o<w[i].length&&(R[S++]=w[i][o]);for(o=0;o<m;o++)for(i=0;i<c;i++)R[S++]=E[i][o];return R}(o,e,t)}(t,n,f),w=new a(r.getSymbolSize(t));return function(e,t){let n=e.size,r=c.getPositions(t);for(let t=0;t<r.length;t++){let o=r[t][0],i=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1)&&!(n<=o+t))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0))}}(w,t),function(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(w),function(e,t){let n=s.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],o=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,o+n,!0,!0):e.set(r+t,o+n,!1,!0)}}(w,t),m(w,n,0),t>=7&&function(e,t){let n,r,o;let i=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),r=t%3+i-8-3,o=(a>>t&1)==1,e.set(n,r,o,!0),e.set(r,n,o,!0)}(w,t),function(e,t){let n=e.size,r=-1,o=n-1,i=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;a<t.length&&(r=(t[a]>>>i&1)==1),e.set(o,s-n,r),-1==--i&&(a++,i=7)}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(w,y),isNaN(o)&&(o=u.getBestMask(w,m.bind(null,w,n))),u.applyMask(o,w),m(w,n,o),{modules:w,version:t,errorCorrectionLevel:n,maskPattern:o,segments:f}}(e,n,v,f)}},78928:(e,t,n)=>{let r=n(90177);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){let e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},26734:(e,t)=>{let n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(r,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(o,"g"),t.NUMERIC=RegExp(n,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let i=RegExp("^"+r+"$"),a=RegExp("^"+n+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},28181:(e,t,n)=>{let r=n(71932),o=n(53773),i=n(22115),a=n(85688),s=n(47873),c=n(26734),u=n(56880),l=n(45130);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){let r;let o=[];for(;null!==(r=e.exec(n));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function f(e){let t,n;let o=h(c.NUMERIC,r.NUMERIC,e),i=h(c.ALPHANUMERIC,r.ALPHANUMERIC,e);return u.isKanjiModeEnabled()?(t=h(c.BYTE,r.BYTE,e),n=h(c.KANJI,r.KANJI,e)):(t=h(c.BYTE_KANJI,r.BYTE,e),n=[]),o.concat(i,t,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function g(e,t){let n;let c=r.getBestModeForData(e);if((n=r.from(t,c))!==r.BYTE&&n.bit<c.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||u.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new i(e);case r.KANJI:return new s(e);case r.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},t.fromString=function(e,n){let o=function(e,t){let n={},o={start:{}},i=["start"];for(let a=0;a<e.length;a++){let s=e[a],c=[];for(let e=0;e<s.length;e++){let u=s[e],l=""+a+e;c.push(l),n[l]={node:u,lastCount:0},o[l]={};for(let e=0;e<i.length;e++){let a=i[e];n[a]&&n[a].node.mode===u.mode?(o[a][l]=p(n[a].lastCount+u.length,u.mode)-p(n[a].lastCount,u.mode),n[a].lastCount+=u.length):(n[a]&&(n[a].lastCount=u.length),o[a][l]=p(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,t))}}i=c}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let o=e[n];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return t}(f(e,u.isKanjiModeEnabled())),n),i=l.find_path(o.map,"start","end"),a=[];for(let e=1;e<i.length-1;e++)a.push(o.table[i[e]].node);return t.fromArray(a.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(f(e,u.isKanjiModeEnabled()))}},56880:(e,t)=>{let n;let r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},35040:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},54557:(e,t,n)=>{let r=n(56880),o=n(93684),i=n(20865),a=n(71932),s=n(35040),c=r.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);let i=(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t))*8;if(n===a.MIXED)return i;let c=i-u(n,e);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;let o=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(function(e,t){let n=0;return e.forEach(function(e){let r=u(e.mode,t);n+=r+e.getBitsLength()}),n}(e,r)<=t.getCapacity(r,n,a.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},16383:(e,t,n)=>{let r=n(62172);t.render=function(e,t,n){var o;let i=n,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),i=r.getOptions(i);let s=r.getImageWidth(e.modules.size,i),c=a.getContext("2d"),u=c.createImageData(s,s);return r.qrToImageData(u.data,e,i),o=a,c.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px",c.putImageData(u,0,0),a},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});let i=t.render(e,n,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},40934:(e,t,n)=>{let r=n(62172);function o(e,t){let n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){let a=r.getOptions(t),s=e.modules.size,c=e.modules.data,u=s+2*a.margin,l=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(e,t,n){let r="",o=0,a=!1,s=0;for(let c=0;c<e.length;c++){let u=Math.floor(c%t),l=Math.floor(c/t);u||a||(a=!0),e[c]?(s++,c>0&&u>0&&e[c-1]||(r+=a?i("M",u+n,.5+l+n):i("m",o,0),o=0,a=!1),u+1<t&&e[c+1]||(r+=i("h",s),s=0)):o++}return r}(c,s,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+u)+" "+u+'" shape-rendering="crispEdges">'+l+d+"</svg>\n";return"function"==typeof n&&n(null,h),h}},62172:(e,t)=>{function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;
1return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){let r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){let o=n.modules.size,i=n.modules.data,a=t.getScale(o,r),s=Math.floor((o+2*r.margin)*a),c=r.margin*a,u=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let l=(t*s+n)*4,d=r.color.light;t>=c&&n>=c&&t<s-c&&n<s-c&&(d=u[i[Math.floor((t-c)/a)*o+Math.floor((n-c)/a)]?1:0]),e[l++]=d.r,e[l++]=d.g,e[l++]=d.b,e[l]=d.a}}},87358:e=>{var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],u=!1,l=-1;function d(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&h())}function h(){if(!u){var e=s(d);u=!0;for(var t=c.length;t;){for(r=c,c=[];++l<t;)r&&r[l].run();l=-1,t=c.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},96069:(e,t,n)=>{"use strict";n.d(t,{bm:()=>tt,UC:()=>e7,VY:()=>te,hJ:()=>e6,ZL:()=>e4,bL:()=>e3,hE:()=>e9,l9:()=>e8});var r,o=n(12115),i=n.t(o,2);function a(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():s(e[t],null)}}}}function u(...e){return o.useCallback(c(...e),e)}"undefined"!=typeof window&&window.document&&window.document.createElement;var l=n(95155),d=globalThis?.document?o.useLayoutEffect:()=>{},h=i[" useId ".trim().toString()]||(()=>void 0),f=0;function p(e){let[t,n]=o.useState(h());return d(()=>{e||n(e=>e??String(f++))},[e]),e||(t?`radix-${t}`:"")}var g=i[" useInsertionEffect ".trim().toString()]||d,m=(Symbol("RADIX:SYNC_STATE"),n(47650));function v(e){let t=function(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e,i;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref,s=function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==o.Fragment&&(s.ref=t?c(t,a):a),o.cloneElement(n,s)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}
1(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(w);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,l.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,l.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var y=Symbol("radix.slottable");function w(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===y}var E=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=v(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:o,...i}=e,a=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(a,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function C(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var b="dismissableLayer.update",R=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),S=o.forwardRef((e,t)=>{var n,i;let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,...g}=e,m=o.useContext(R),[v,y]=o.useState(null),w=null!==(i=null==v?void 0:v.ownerDocument)&&void 0!==i?i:null===(n=globalThis)||void 0===n?void 0:n.document,[,S]=o.useState({}),P=u(t,e=>y(e)),N=Array.from(m.layers),[M]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=N.indexOf(M),D=v?N.indexOf(v):-1,L=m.layersWithOutsidePointerEventsDisabled.size>0,z=D>=A,I=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e),i=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){T("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));!z||n||(null==d||d(e),null==f||f(e),e.defaultPrevented||null==p||p())},w),_=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&T("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;[...m.branches].some(e=>e.contains(t))||(null==h||h(e),null==f||f(e),e.defaultPrevented||null==p||p())},w);return!function(e,t=globalThis?.document){let n=C(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{D!==m.layers.size-1||(null==c||c(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))},w),o.useEffect(()=>{if(v)return s&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(r=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),x(),()=>{s&&1===m.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=r)}},[v,w,s,m]),o.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),x())},[v,m]),o.useEffect(()=>{let e=()=>S({});return document.addEventListener(b,e),()=>document.removeEventListener(b,e)},[]),(0,l.jsx)(E.div,{...g,ref:P,style:{pointerEvents:L?z?"auto":"none":void 0,...e.style},onFocusCapture:a(e.onFocusCapture,_.onFocusCapture),onBlurCapture:a(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:a(e.onPointerDownCapture,I.onPointerDownCapture)})});function x(){let e=new CustomEvent(b);document.dispatchEvent(e)}function T(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),o)?i&&m.flushSync(()=>i.dispatchEvent(a)):i.dispatchEvent(a)}S.displayName="DismissableLayer",o.forwardRef((e,t)=>
1{let n=o.useContext(R),r=o.useRef(null),i=u(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,l.jsx)(E.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var P="focusScope.autoFocusOnMount",N="focusScope.autoFocusOnUnmount",M={bubbles:!1,cancelable:!0},A=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[c,d]=o.useState(null),h=C(i),f=C(a),p=o.useRef(null),g=u(t,e=>d(e)),m=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(m.paused||!c)return;let t=e.target;c.contains(t)?p.current=t:z(p.current,{select:!0})},t=function(e){if(m.paused||!c)return;let t=e.relatedTarget;null===t||c.contains(t)||z(p.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&z(c)});return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,c,m.paused]),o.useEffect(()=>{if(c){I.add(m);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(P,M);c.addEventListener(P,h),c.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(z(r,{select:t}),document.activeElement!==n)return}(D(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&z(c))}return()=>{c.removeEventListener(P,h),setTimeout(()=>{let t=new CustomEvent(N,M);c.addEventListener(N,f),c.dispatchEvent(t),t.defaultPrevented||z(null!=e?e:document.body,{select:!0}),c.removeEventListener(N,f),I.remove(m)},0)}}},[c,h,f,m]);let v=o.useCallback(e=>{if(!n&&!r||m.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=D(e);return[L(t,e),L(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&z(i,{select:!0})):(e.preventDefault(),n&&z(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,m.paused]);return(0,l.jsx)(E.div,{tabIndex:-1,...s,ref:g,onKeyDown:v})});function D(e){let t=[],n=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(;n.nextNode();)t.push(n.currentNode);return t}function L(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function z(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}A.displayName="FocusScope";var I=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=_(e,t)).unshift(t)},remove(t){var n;null===(n=(e=_(e,t))[0])||void 0===n||n.resume()}}}();function _(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var k=o.forwardRef((e,t)=>{var n,r;let{container:i,...a}=e,[s,c]=o.useState(!1);d(()=>c(!0),[]);let u=i||s&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return u?m.createPortal((0,l.jsx)(E.div,{...a,ref:t}),u):null});k.displayName="Portal";var B=e=>{let{present:t,children:n}=e,r=function(e){var t,n;let[r,i]=o.useState(),a=o.useRef(null),s=o.useRef(e),c=o.useRef("none"),[u,l]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},o.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return o.useEffect(()=>{let e=O(a.current);c.current="mounted"===u?e:"none"},[u]),d(()=>{let t=a.current,n=s.current;if(n!==e){let r=c.current,o=O(t);e?l("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?l("UNMOUNT"):n&&r!==o?l("ANIMATION_OUT"):l("UNMOUNT"),s.current=e}},[e,l]),d(()=>
1{if(r){var e;let t;let n=null!==(e=r.ownerDocument.defaultView)&&void 0!==e?e:window,o=e=>{let o=O(a.current).includes(CSS.escape(e.animationName));if(e.target===r&&o&&(l("ANIMATION_END"),!s.current)){let e=r.style.animationFillMode;r.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=e)})}},i=e=>{e.target===r&&(c.current=O(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",o),r.addEventListener("animationend",o),()=>{n.clearTimeout(t),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",o),r.removeEventListener("animationend",o)}}l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:o.useCallback(e=>{a.current=e?getComputedStyle(e):null,i(e)},[])}}(t),i="function"==typeof n?n({present:r.isPresent}):o.Children.only(n),a=u(r.ref,function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(o=(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning)?e.props.ref:e.props.ref||e.ref}(i));return"function"==typeof n||r.isPresent?o.cloneElement(i,{ref:a}):null};function O(e){return(null==e?void 0:e.animationName)||"none"}B.displayName="Presence";var F=0;function j(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var U=n(6476),W="right-scroll-bar-position",H="width-before-scroll-bar",K=n(42607),Y=(0,n(44577).f)(),Z=function(){},q=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:Z,onWheelCapture:Z,onTouchMoveCapture:Z}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,w=e.gapMode,E=(0,U.Tt)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(0,K.S)([n,t]),b=(0,U.Cl)((0,U.Cl)({},E),i);return o.createElement(o.Fragment,null,d&&o.createElement(f,{sideCar:Y,removeScrollBar:l,shards:h,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:w}),s?o.cloneElement(o.Children.only(c),(0,U.Cl)((0,U.Cl)({},b),{ref:C})):o.createElement(void 0===y?"div":y,(0,U.Cl)({},b,{className:u,ref:C}),c))});q.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},q.classNames={fullWidth:H,zeroRight:W};var V=n(66377),J=n(22065),$=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=(0,J.m)();return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}}
1,G=function(){var e=$();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},X=function(){var e=G();return function(t){return e(t.styles,t.dynamic),null}},Q={left:0,top:0,right:0,gap:0},ee=function(e){return parseInt(e||"",10)||0},et=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[ee(n),ee(r),ee(o)]},en=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Q;var t=et(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},er=X(),eo="data-scroll-locked",ei=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(s,"px ").concat(r,";\n  }\n  body[").concat(eo,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\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(r,";\n    "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(W," {\n    right: ").concat(s,"px ").concat(r,";\n  }\n  \n  .").concat(H," {\n    margin-right: ").concat(s,"px ").concat(r,";\n  }\n  \n  .").concat(W," .").concat(W," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(H," .").concat(H," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(eo,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n  }\n")},ea=function(){var e=parseInt(document.body.getAttribute(eo)||"0",10);return isFinite(e)?e:0},es=function(){o.useEffect(function(){return document.body.setAttribute(eo,(ea()+1).toString()),function(){var e=ea()-1;e<=0?document.body.removeAttribute(eo):document.body.setAttribute(eo,e.toString())}},[])},ec=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;es();var a=o.useMemo(function(){return en(i)},[i]);return o.createElement(er,{styles:ei(a,!t,i,n?"":"!important")})},eu=!1;if("undefined"!=typeof window)try{var el=Object.defineProperty({},"passive",{get:function(){return eu=!0,!0}});window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch(e){eu=!1}var ed=!!eu&&{passive:!1},eh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},ef=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),ep(e,r)){var o=eg(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ep=function(e,t){return"v"===e?eh(t,"overflowY"):eh(t,"overflowX")},eg=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},em=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),s=a*r,c=n.target,u=t.contains(c),l=!1,d=s>0,h=0,f=0;do{if(!c)break;var p=eg(e,c),g=p[0],m=p[1]-p[2]-a*g;(g||m)&&ep(e,c)&&(h+=m,f+=g);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return d&&(o&&1>Math.abs(h)||!o&&s>h)?l=!0:!d&&(o&&1>Math.abs(f)||!o&&-s>f)&&(l=!0),l},ev=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ey=function(e){return[e.deltaX,e.deltaY]},ew=function(e){return e&&"current"in e?e.current:e},eE=0,eC=[];let eb=(0,V.m)(Y,function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(eE++)[0],a=o.useState(X)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,U.fX)([e.lockRef.current],(e.shards||[]).map(ew),!0).filter(
1Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=ev(e),a=n.current,c="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],l=e.target,d=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var h=window.getSelection(),f=h&&h.anchorNode;if(f&&(f===l||f.contains(l)))return!1;var p=ef(d,l);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=ef(d,l)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var g=r.current||o;return em(g,t,e,"h"===g?c:u,!0)},[]),u=o.useCallback(function(e){if(eC.length&&eC[eC.length-1]===a){var n="deltaY"in e?ey(e):ev(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(s.current.shards||[]).map(ew).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?c(e,o[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),l=o.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=o.useCallback(function(e){n.current=ev(e),r.current=void 0},[]),h=o.useCallback(function(t){l(t.type,ey(t),t.target,c(t,e.lockRef.current))},[]),f=o.useCallback(function(t){l(t.type,ev(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return eC.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",u,ed),document.addEventListener("touchmove",u,ed),document.addEventListener("touchstart",d,ed),function(){eC=eC.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,ed),document.removeEventListener("touchmove",u,ed),document.removeEventListener("touchstart",d,ed)}},[]);var p=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(a,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?o.createElement(ec,{noRelative:e.noRelative,gapMode:e.gapMode}):null)});var eR=o.forwardRef(function(e,t){return o.createElement(q,(0,U.Cl)({},e,{ref:t,sideCar:eb}))});eR.classNames=q.classNames;var eS=n(15587),ex="Dialog",[eT,eP]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=o.createContext(r),a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[a]||i,u=o.useMemo(()=>s,Object.values(s));return(0,l.jsx)(c.Provider,{value:u,children:r})};return s.displayName=t+"Provider",[s,function(n,s){let c=s?.[e]?.[a]||i,u=o.useContext(c);if(u)return u;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(ex),[eN,eM]=eT(ex),eA=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),u=o.useRef(null),[d,h]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=function({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return g(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}({defaultProp:t,onChange:n}),c=void 0!==e,u=c?e:i;{let t=o.useRef(void 0!==e);o.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,r])}return[u,o.useCallback(t=>{if(c){let n="function"==typeof t?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}({prop:r,defaultProp:null!=i&&i,onChange:a,caller:ex});return(0,l.jsx)(eN,{scope:t,triggerRef:c,contentRef:u,contentId:p(),titleId:p(),descriptionId:p(),open:d,onOpenChange:h,onOpenToggle:o.useCallback(()=>h(e=>!e),[h]),modal:s,children:n})};eA.displayName=ex;var eD="DialogTrigger",eL=o.forwardRef((e,t)=>
1{let{__scopeDialog:n,...r}=e,o=eM(eD,n),i=u(t,o.triggerRef);return(0,l.jsx)(E.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":eX(o.open),...r,ref:i,onClick:a(e.onClick,o.onOpenToggle)})});eL.displayName=eD;var ez="DialogPortal",[eI,e_]=eT(ez,{forceMount:void 0}),ek=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=eM(ez,t);return(0,l.jsx)(eI,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,l.jsx)(B,{present:n||a.open,children:(0,l.jsx)(k,{asChild:!0,container:i,children:e})}))})};ek.displayName=ez;var eB="DialogOverlay",eO=o.forwardRef((e,t)=>{let n=e_(eB,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=eM(eB,e.__scopeDialog);return i.modal?(0,l.jsx)(B,{present:r||i.open,children:(0,l.jsx)(ej,{...o,ref:t})}):null});eO.displayName=eB;var eF=v("DialogOverlay.RemoveScroll"),ej=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=eM(eB,n);return(0,l.jsx)(eR,{as:eF,allowPinchZoom:!0,shards:[o.contentRef],children:(0,l.jsx)(E.div,{"data-state":eX(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),eU="DialogContent",eW=o.forwardRef((e,t)=>{let n=e_(eU,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=eM(eU,e.__scopeDialog);return(0,l.jsx)(B,{present:r||i.open,children:i.modal?(0,l.jsx)(eH,{...o,ref:t}):(0,l.jsx)(eK,{...o,ref:t})})});eW.displayName=eU;var eH=o.forwardRef((e,t)=>{let n=eM(eU,e.__scopeDialog),r=o.useRef(null),i=u(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return(0,eS.Eq)(e)},[]),(0,l.jsx)(eY,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault())})}),eK=o.forwardRef((e,t)=>{let n=eM(eU,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,l.jsx)(eY,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let s=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),eY=o.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,c=eM(eU,n),d=o.useRef(null),h=u(t,d);return o.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:j()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:j()),F++,()=>{1===F&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),F--}},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,l.jsx)(S,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":eX(c.open),...s,ref:h,onDismiss:()=>c.onOpenChange(!1)})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e2,{titleId:c.titleId}),(0,l.jsx)(e5,{contentRef:d,descriptionId:c.descriptionId})]})]})}),eZ="DialogTitle",eq=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=eM(eZ,n);return(0,l.jsx)(E.h2,{id:o.titleId,...r,ref:t})});eq.displayName=eZ;var eV="DialogDescription",eJ=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=eM(eV,n);return(0,l.jsx)(E.p,{id:o.descriptionId,...r,ref:t})});eJ.displayName=eV;var e$="DialogClose",eG=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=eM(e$,n);return(0,l.jsx)(E.button,{type:"button",...r,ref:t,onClick:a(e.onClick,()=>o.onOpenChange(!1))})});function eX(e){return e?"open":"closed"}eG.displayName=e$;var eQ="DialogTitleWarning",[e0,e1]=function(e,t){let n=o.createContext(t),r=e=>{let{children:t,...r}=e,i=o.useMemo(()=>r,Object.values(r));return(0,l.jsx)(n.Provider,{value:i,children:t})};return r.displayName=e+"Provider",[r,function(r){let i=o.useContext(n);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}(eQ,{contentName:eU,titleName:eZ,docsSlug:"dialog"}),e2=e=>{let{titleId:t}=e,n=e1(eQ),r="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return o.useEffect(()=>{t&&!document.getElementById(t)&&console.error(r)},[r,t]),null},e5=e=>{let{contentRef:t,descriptionId:n}=e,r=e1("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(r.contentName,"}.");return o.useEffect(()=>{var e;let r=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");n&&r&&!document.getElementById(n)&&console.warn(i)},[i,t,n]),null},e3=eA,e8=eL,e4=ek,e6=eO,e7=eW,e9=eq,te=eJ,tt=eG},79581:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m});var r=n(6476),o=n(12115),i=n(82912);function a(e,t,n,r,o){void 0===o&&(o=0);var i=f(t.width,t.height,o),a=i.width,c=i.height;return{x:s(e.x,a,n.width,r),y:s(e.y,c,n.height,r)}}function s(e,t,n,r){var o=Math.abs(t*r/2-n/2);return p(e,-o,o)}function c(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function u(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function l(e,t){return Math.min(e,Math.max(0,t))}function d(e,t){return t}function h(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function f(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function p(e,t,n){return Math.min(Math.max(e,t),n)}function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&e.length>0}).join(" ").trim()}var m=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.cropperRef=o.createRef(),n.imageRef=o.createRef(),n.videoRef=o.createRef(),n.containerPosition={x:0,y:0}
1,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.previousCropSize=null,n.isInitialized=!1,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturechange",n.onGestureChange),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.previousCropSize=e,n.emitCropData(),n.setInitialCrop(e),n.isInitialized=!0),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t,r,o,i,a,s,c,u=(t=n.props.initialCroppedAreaPercentages,r=n.mediaSize,o=n.props.rotation,i=n.props.minZoom,a=n.props.maxZoom,s=f(r.width,r.height,o),{crop:{x:(c=p(e.width/s.width*(100/t.width),i,a))*s.width/2-e.width/2-s.width*c*(t.x/100),y:c*s.height/2-e.height/2-s.height*c*(t.y/100)},zoom:c}),l=u.crop,d=u.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(d)}else if(n.props.initialCroppedAreaPixels){var h,g,m,v,y,w,E,C,b,R=(h=n.props.initialCroppedAreaPixels,g=n.mediaSize,m=n.props.rotation,v=n.props.minZoom,y=n.props.maxZoom,void 0===m&&(m=0),w=f(g.naturalWidth,g.naturalHeight,m),C=p((E=g.width>g.height?g.width/g.naturalWidth:g.height/g.naturalHeight,e.height>e.width?e.height/(h.height*E):e.width/(h.width*E)),v,y),b=e.height>e.width?e.height/h.height:e.width/h.width,{crop:{x:((w.width-h.width)/2-h.x)*b,y:((w.height-h.height)/2-h.y)*b},zoom:C}),l=R.crop,d=R.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(d)}},n.computeSizes=function(){var e,t,o,i,a,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u,l,d,h,p,g,m,v,y,w,E,C=n.containerRect.width/n.containerRect.height,b=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,R=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,S=c.offsetWidth<b||c.offsetHeight<R,x=b/R,T=void 0;if(S)switch(n.state.mediaObjectFit){default:case"contain":T=C>x?{width:n.containerRect.height*x,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/x};break;case"horizontal-cover":T={width:n.containerRect.width,height:n.containerRect.width/x};break;case"vertical-cover":T={width:n.containerRect.height*x,height:n.containerRect.height}}else T={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=(0,r.Cl)((0,r.Cl)({},T),{naturalWidth:b,naturalHeight:R}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var P=n.props.cropSize?n.props.cropSize:(u=n.mediaSize.width,l=n.mediaSize.height,d=n.containerRect.width,h=n.containerRect.height,p=n.props.aspect,void 0===(g=n.props.rotation)&&(g=0),v=(m=f(u,l,g)).width,y=m.height,(w=Math.min(v,d))>(E=Math.min(y,h))*p?{width:E*p,height:E}:{width:w,height:w/p});return((null===(a=n.state.cropSize)||void 0===a?void 0:a.height)!==P.height||(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)!==P.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(P),n.setState({cropSize:P},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(P),P}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,(!n.props.onTouchRequest||n.props.onTouchRequest(e))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureChange),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureChange=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()}
1,n.onDragStart=function(e){var t,o,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,r.Cl)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},s=n.props.restrictPosition?a(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(s)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=i(e).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)})},250)}},n.getPointOnContainer=function(e,t){var r=e.x,o=e.y;if(!n.containerRect)throw Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition;if(n.state.cropSize&&n.props.onZoomChange){var i=p(e,n.props.minZoom,n.props.maxZoom);if(void 0===o||o){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),u={x:c.x*i-s.x,y:c.y*i-s.y},l=n.props.restrictPosition?a(u,n.mediaSize,n.state.cropSize,i,n.props.rotation):u;n.props.onCropChange(l)}n.props.onZoomChange(i)}},n.getCropData=function(){var e,t,o,i,s,c,u,h,p,g,m,v,y,w,E;return n.state.cropSize?(e=n.props.restrictPosition?a(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,t=n.mediaSize,o=n.state.cropSize,i=n.getAspect(),s=n.props.zoom,c=n.props.rotation,u=n.props.restrictPosition,void 0===c&&(c=0),void 0===u&&(u=!0),h=u?l:d,p=f(t.width,t.height,c),g=f(t.naturalWidth,t.naturalHeight,c),m={x:h(100,((p.width-o.width/s)/2-e.x/s)/p.width*100),y:h(100,((p.height-o.height/s)/2-e.y/s)/p.height*100),width:h(100,o.width/p.width*100/s),height:h(100,o.height/p.height*100/s)},v=Math.round(h(g.width,m.width*g.width/100)),y=Math.round(h(g.height,m.height*g.height/100)),w=g.width>=g.height*i?{width:Math.round(y*i),height:y}:{width:v,height:Math.round(v/i)},E=(0,r.Cl)((0,r.Cl)({},w),{x:Math.round(h(g.width-w.width,m.x*g.width/100)),y:Math.round(h(g.height-w.height,m.y*g.height/100))}),{croppedAreaPercentages:m,croppedAreaPixels:E}):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e,t,r=n.props.crop;if(n.isInitialized&&(null===(e=n.previousCropSize)||void 0===e?void 0:e.width)&&(null===(t=n.previousCropSize)||void 0===t?void 0:t.height)&&(Math.abs(n.previousCropSize.width-n.state.cropSize.width)>1e-6||Math.abs(n.previousCropSize.height-n.state.cropSize.height)>1e-6)){var o=n.state.cropSize.width/n.previousCropSize.width,i=n.state.cropSize.height/n.previousCropSize.height;r={x:n.props.crop.x*o,y:n.props.crop.y*i}}var s=n.props.restrictPosition?a(r,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):r;n.previousCropSize=n.state.cropSize,n.props.onCropChange(s),n.emitCropData()}},n.onKeyDown=function(e){var t,o,i=n.props,s=i.crop,c=i.onCropChange,u=i.keyboardStep,l=i.zoom,d=i.rotation,h=u;if(n.state.cropSize){e.shiftKey&&(h*=.2);var f=(0,r.Cl)({},s);switch(e.key){case"ArrowUp":f.y-=h,e.preventDefault();break;case"ArrowDown":f.y+=h,e.preventDefault();break;case"ArrowLeft":f.x-=h,e.preventDefault();break;case"ArrowRight":f.x+=h,e.preventDefault();break;default:return}n.props.restrictPosition&&(f=a(f,n.mediaSize,n.state.cropSize,l,d)),e.repeat||null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t),c(f)}},n.onKeyUp=function(e){var t,r;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}n.emitCropData(),null===(r=(t=n.props).onInteractionEnd)||void 0===r||r.call(t)},n}return(0,r.C6)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}
1\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():((null===(i=e.crop)||void 0===i?void 0:i.x)!==(null===(a=this.props.crop)||void 0===a?void 0:a.x)||(null===(s=e.crop)||void 0===s?void 0:s.y)!==(null===(c=this.props.crop)||void 0===c?void 0:c.y))&&this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(u=this.videoRef.current)||void 0===u||u.load());var t,n,r,o,i,a,s,c,u,l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=c(n,r),this.lastPinchRotation=u(n,r),this.onDragStart(h(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=h(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=c(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=u(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,n=this.props,i=n.image,a=n.video,s=n.mediaProps,c=n.cropperProps,u=n.transform,l=n.crop,d=l.x,h=l.y,f=n.rotation,p=n.zoom,m=n.cropShape,v=n.showGrid,y=n.roundCropAreaPixels,w=n.style,E=w.containerStyle,C=w.cropAreaStyle,b=w.mediaStyle,R=n.classes,S=R.containerClassName,x=R.cropAreaClassName,T=R.mediaClassName,P=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return o.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef
1=e},"data-testid":"container",style:E,className:g("reactEasyCrop_Container",S)},i?o.createElement("img",(0,r.Cl)({alt:"",className:g("reactEasyCrop_Image","contain"===P&&"reactEasyCrop_Contain","horizontal-cover"===P&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===P&&"reactEasyCrop_Cover_Vertical",T)},s,{src:i,ref:this.imageRef,style:(0,r.Cl)((0,r.Cl)({},b),{transform:u||"translate(".concat(d,"px, ").concat(h,"px) rotate(").concat(f,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&o.createElement("video",(0,r.Cl)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:g("reactEasyCrop_Video","contain"===P&&"reactEasyCrop_Contain","horizontal-cover"===P&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===P&&"reactEasyCrop_Cover_Vertical",T)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.Cl)((0,r.Cl)({},b),{transform:u||"translate(".concat(d,"px, ").concat(h,"px) rotate(").concat(f,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(e){return o.createElement("source",(0,r.Cl)({key:e.src},e))})),this.state.cropSize&&o.createElement("div",(0,r.Cl)({ref:this.cropperRef,style:(0,r.Cl)((0,r.Cl)({},C),{width:y?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:y?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:g("reactEasyCrop_CropArea","round"===m&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",x)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(o.Component)},70295:(e,t,n)=>{"use strict";n.d(t,{kb:()=>a,vE:()=>c});var r=n(75927),o=n(29761),i=class extends o.b{socket;constructor(e,t){super(),this.socket=new window.WebSocket(e,t.protocols),this.socket.onopen=()=>
vendor: 4,836 bytes, line 1
1this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,n){let r=n||t;try{this.socket.send(e),r()}catch(e){r(e)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,n){this.socket.addEventListener(e,t,n)}};function a(e,t){return new i(e,t)}var s=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},c=class extends o.b{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:n=!0,reconnect:r=!0,reconnect_interval:o=1e3,max_reconnects:i=5,...a}={},c,u){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=n,this.ready=!1,this.reconnect=r,this.reconnect_timer_id=void 0,this.reconnect_interval=o,this.max_reconnects=i,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=c||(()=>"number"==typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),u?this.dataPack=u:this.dataPack=new s,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,n,r){return r||"object"!=typeof n||(r=n,n=null),new Promise((o,i)=>{if(!this.ready)return i(Error("socket not ready"));let a=this.generate_request_id(e,t);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t||void 0,id:a}),r,e=>{if(e)return i(e);this.queue[a]={promise:[o,i]},n&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],i(Error("reply timeout"))},n))})})}async login(e){let t=await this.call("rpc.login",e);if(!t)throw Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((n,r)=>{if(!this.ready)return r(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t}),e=>{if(e)return r(e);n()})})}async subscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.on",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.off",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket&&this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return void 0!==this.reconnect_timer_id}willReconnect(){return this.reconnect&&(0===this.max_reconnects||this.current_reconnects<this.max_reconnects)}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:e})=>{e instanceof ArrayBuffer&&(e=r.Buffer.from(e).toString());try{e=this.dataPack.decode(e)}catch(e){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit(e.notification);let t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let n=0;n<e.params.length;n++)t.push(e.params[n]);return Promise.resolve().then(()=>{this.emit.apply(this,t)})}if(!this.queue[e.id])return e.method?Promise.resolve().then(()=>{this.emit(e.method,e?.params)}):void 0;"error"in e=="result"in e&&this.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",({code:n,reason:r})=>{this.ready&&setTimeout(()=>this.emit("close",n,r),0),this.ready=!1,this.socket=void 0,1e3!==n&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)?this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",n,r),1))})}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.