gt-react 9.2.17 → 9.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/branches/Branch.d.ts +1 -1
- package/dist/branches/Branch.d.ts.map +1 -1
- package/dist/branches/plurals/Plural.d.ts +1 -1
- package/dist/branches/plurals/Plural.d.ts.map +1 -1
- package/dist/client.cjs.min.cjs +1 -1
- package/dist/client.d.ts +7 -8
- package/dist/client.esm.min.mjs +1 -1
- package/dist/index.cjs.min.cjs +1 -1
- package/dist/index.esm.min.mjs +1 -1
- package/dist/translation/inline/T.d.ts +1 -1
- package/dist/translation/inline/T.d.ts.map +1 -1
- package/package.json +1 -1
@@ -27,7 +27,7 @@ declare function Branch({ children, branch, ...branches }: {
|
|
27
27
|
name?: string;
|
28
28
|
branch?: string;
|
29
29
|
[key: string]: any;
|
30
|
-
}):
|
30
|
+
}): React.JSX.Element;
|
31
31
|
declare namespace Branch {
|
32
32
|
var gtTransformation: string;
|
33
33
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../src/branches/Branch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,MAAM,EACN,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,
|
1
|
+
{"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../src/branches/Branch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,MAAM,EACN,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAOpB;kBAhBQ,MAAM;;;AAmBf,eAAe,MAAM,CAAC"}
|
@@ -30,7 +30,7 @@ declare function Plural({ children, n, locale, ...branches }: {
|
|
30
30
|
n?: number;
|
31
31
|
locale?: string;
|
32
32
|
[key: string]: any;
|
33
|
-
}):
|
33
|
+
}): React.JSX.Element;
|
34
34
|
declare namespace Plural {
|
35
35
|
var gtTransformation: string;
|
36
36
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Plural.d.ts","sourceRoot":"","sources":["../../../src/branches/plurals/Plural.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,CAAC,EACD,MAAM,EACN,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,
|
1
|
+
{"version":3,"file":"Plural.d.ts","sourceRoot":"","sources":["../../../src/branches/plurals/Plural.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,CAAC,EACD,MAAM,EACN,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAepB;kBAzBQ,MAAM;;;AA6Bf,eAAe,MAAM,CAAC"}
|
package/dist/client.cjs.min.cjs
CHANGED
@@ -15,4 +15,4 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){
|
|
15
15
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
17
|
*/
|
18
|
-
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,m,b,x,w,k,B,E,S,A,T=this._hash.words,O=u.words,j=d.words,C=a.words,P=s.words,D=c.words,H=l.words;for(w=i=T[0],k=f=T[1],B=m=T[2],E=b=T[3],S=x=T[4],r=0;r<80;r+=1)A=i+e[t+C[r]]|0,A+=r<16?h(f,m,b)+O[0]:r<32?p(f,m,b)+O[1]:r<48?v(f,m,b)+O[2]:r<64?g(f,m,b)+O[3]:y(f,m,b)+O[4],A=(A=_(A|=0,D[r]))+x|0,i=x,x=b,b=_(m,10),m=f,f=A,A=w+e[t+P[r]]|0,A+=r<16?y(k,B,E)+j[0]:r<32?g(k,B,E)+j[1]:r<48?v(k,B,E)+j[2]:r<64?p(k,B,E)+j[3]:h(k,B,E)+j[4],A=(A=_(A|=0,H[r]))+S|0,w=S,S=E,E=_(B,10),B=k,k=A;A=T[1]+m+E|0,T[1]=T[2]+b+S|0,T[2]=T[3]+x+w|0,T[3]=T[4]+i+k|0,T[4]=T[0]+f+B|0,T[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),he.exports;var e}(),ge(),function(){return ye||(ye=1,_e.exports=(c=C(),te(),ge(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,g=1;g<d;g++){v=o.finalize(v),o.reset();for(var y=v.words,_=0;_<p;_++)h[_]^=y[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),_e.exports;var e,t,r,n,o,i,a,s,c}(),xe(),Be(),Ae(),je(),De(),ze(),function(){return Le?Fe.exports:(Le=1,Fe.exports=(t=C(),Be(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return Ie?Ne.exports:(Ie=1,Ne.exports=(e=C(),Be(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return Me?Ve.exports:(Me=1,Ve.exports=(e=C(),Be(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Ue?Ge.exports:(Ue=1,Ge.exports=(e=C(),Be(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return $e||($e=1,Ke.exports=(e=C(),Be(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),Ke.exports;var e}(),function(){return We?Je.exports:(We=1,Je.exports=(e=C(),Be(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return Xe?qe.exports:(Xe=1,qe.exports=(n=C(),Be(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return Ye||(Ye=1,Ze.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],g=e[v],y=e[g],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*g^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[y^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],g=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],y=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=g,d=y,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],y=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=g,e[t+2]=y,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Ze.exports;var e}(),tt(),function(){return rt||(rt=1,nt.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),nt.exports;var e}(),function(){return ot||(ot=1,it.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),it.exports;var e}(),function(){return at||(at=1,st.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),st.exports;var e}(),ut())),A.exports),mt=k(_t),bt=function(){return bt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)};function xt(e){return mt.SHA256(e).toString(mt.enc.Hex)}function wt(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=xt),t(S(bt(bt(bt({source:Bt(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var kt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Bt(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Bt(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return bt({key:e.key},e.variable&&{variable:e.variable})}return e};function Bt(e){return Array.isArray(e)?e.map(kt):kt(e)}function Et(r,n,o,i,a,s,c,l){return e.useCallback(((e,u={})=>{if(!e||"string"!=typeof e)return"";const d=t.splitStringToContent(e),f=(e,r)=>t.renderContentToString(e,r,u.variables,u.variablesOptions),h=null==u?void 0:u.id,p=h&&(null==r?void 0:r[h]);let v="";i&&!p&&(v=wt(Object.assign(Object.assign(Object.assign({source:d},(null==u?void 0:u.context)&&{context:u.context}),h&&{id:h}),{dataFormat:"JSX"})));let g=p?null==r?void 0:r[h]:null==r?void 0:r[v];return i&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?f(g.target,[n,o]):s?(c({source:d,targetLocale:n,metadata:Object.assign(Object.assign({},(null==u?void 0:u.context)&&{context:u.context}),{id:h,hash:v||""})}),"replace"===l.method?f(d,[o]):"skeleton"===l.method?"":a?f(d,[o]):""):f(d,[o]):f(d,[o])}),[r,n,o,i,s,c,a])}function St(r,n,o,i,a,s,c,l,u){return e.useCallback(((d,f={})=>{if(!r)return"";const h=function(t,r){let n=t,o=r.split(".");for(const t of o){if("object"!=typeof n||Array.isArray(n)||e.isValidElement(n))return;n=n[t]}return n}(r,d);if(!h)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(d)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(h))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(d)),"";const{entry:p,metadata:v}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(h);if(!p||"string"!=typeof p)return"";const g=t.splitStringToContent(p),y=(e,r)=>t.renderContentToString(e,r,f.variables,f.variablesOptions);if(!a)return y(g,[i]);let _=wt(Object.assign(Object.assign({source:g},(null==v?void 0:v.context)&&{context:v.context}),{id:d,dataFormat:"JSX"})),m=null==n?void 0:n[_];return"success"===(null==m?void 0:m.state)?y(m.target,[o,i]):"error"===(null==m?void 0:m.state)?y(g,[i]):c?(l({source:g,targetLocale:o,metadata:Object.assign(Object.assign({},(null==v?void 0:v.context)&&{context:v.context}),{id:d,hash:_})}),"replace"===u.method?y(g,[i]):"skeleton"===u.method?"":s?y(g,[i]):""):y(g,[i])}),[r,n,o,i,a,c,l,s])}const At="generaltranslation.locale";function Tt(e){var{children:t,branch:n}=e,o=a(e,["children","branch"]);const i=(n=null==n?void 0:n.toString())&&void 0!==o[n]?o[n]:t;return r.jsx(r.Fragment,{children:i})}function Ot(t,r=0){let n=r;const o=e=>{const{type:t,props:r}=e;n+=1;let o,i={id:n};try{o="function"==typeof t&&t.gtTransformation||""}catch(e){o=""}if(o){const t=o.split("-");if("translate"===t[0])throw new Error((e=>{var t;return`General Translation: Nested <T> components. The inner <T> has the id: "${null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.id}".`})(e));if("variable"===t[0]&&(i.variableType=(null==t?void 0:t[1])||"variable"),"plural"===t[0]){const e=Object.entries(r).reduce(((e,[t,r])=>(function(e){return h.includes(e)}(t)&&(e[t]=Ot(r,n)),e)),{});Object.keys(e).length&&(i.branches=e)}if("branch"===t[0]){const e=a(r,["children","branch"]),t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=Ot(r,n),e)),{});Object.keys(t).length&&(i.branches=t)}i.transformation=t[0]}return i};function i(t){return e.isValidElement(t)?function(t){const{props:r}=t;if(r["data-_gt"])throw new Error((e=>`General Translation already in use on child with props: ${e.props}. This usually occurs when you nest <T> components within the same file. Remove one of the <T> components to continue.`)(t));let n=o(t),i=Object.assign(Object.assign({},r),{"data-_gt":n});return r.children&&!n.variableType&&(i.children=s(r.children)),t.type===e.Fragment&&(i["data-_gt"].transformation="fragment"),e.cloneElement(t,i)}(t):t}function s(t){return Array.isArray(t)?e.Children.map(t,i):i(t)}return s(t)}Tt.gtTransformation="branch";const jt={variable:"value",number:"n",datetime:"date",currency:"cost"};function Ct(e={},t){var r;if(e.name)return e.name;return`_gt_${jt[t]||"value"}_${null===(r=e["data-_gt"])||void 0===r?void 0:r.id}`}const Pt=e=>{var t;if(!e)return"";const{type:r,props:n}=e;if(r&&"function"==typeof r){if("displayName"in r&&"string"==typeof r.displayName&&r.displayName)return r.displayName;if("name"in r&&"string"==typeof r.name&&r.name)return r.name}return r&&"string"==typeof r?r:n.href?"a":(null===(t=n["data-_gt"])||void 0===t?void 0:t.id)?`C${n["data-_gt"].id}`:"function"},Dt=t=>{return r=t,e.isValidElement(r)?(e=>{const{type:t,props:r}=e;let n={type:Pt(e),props:{}};if(r["data-_gt"]){const e=r["data-_gt"];let t=Object.assign({},e);const o=e.transformation;if("variable"===o){const t=e.variableType||"variable";return{variable:t,key:Ct(r,t),id:e.id}}if("plural"===o&&e.branches){n.type="Plural";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Ht(t)})),t=Object.assign(Object.assign({},t),{branches:r})}if("branch"===o&&e.branches){n.type="Branch";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Ht(t)})),t=Object.assign(Object.assign({},t),{branches:r})}n.props["data-_gt"]=t}return r.children&&(n.props.children=Ht(r.children)),n})(t):"number"==typeof t?t.toString():t;var r};function Ht(e){return Array.isArray(e)?e.map(Dt):Dt(e)}function Rt(e,t,r){let n="",o=null;return"number"==typeof e&&!o&&r&&(n=function(e,t,r){void 0===t&&(t=h),void 0===r&&(r=["en"]);var n=p.get("PluralRules",r).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(e,Object.keys(r),t)),n&&!o&&(o=r[n]),o}function zt(e){var t;const r=(null===(t=e["data-_gt"])||void 0===t?void 0:t.variableType)||"variable";return{variableName:Ct(e,r),variableType:r,variableValue:void 0!==e.value?e.value:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t=Object.assign(Object.assign({},e.currency&&{currency:e.currency}),e.options&&Object.assign({},e.options));return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function Lt(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.key){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.id)return!0;if("string"==typeof t.variable)return!0}if(3===e.length&&"string"==typeof t.variable&&"number"==typeof t.id)return!0}return!1}function Ft(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function It({children:t,defaultLocale:r=f,renderVariable:n}){const o=t=>e.isValidElement(t)?(t=>{const o=Ft(t);if("variable"===(null==o?void 0:o.transformation)){const{variableType:e,variableValue:o,variableOptions:i}=zt(t.props);return n({variableType:e,variableValue:o,variableOptions:i,locales:[r]})}if("plural"===(null==o?void 0:o.transformation)){const e=o.branches||{};return i(Rt(t.props.n,[r],e)||t.props.children)}if("branch"===(null==o?void 0:o.transformation)){let e=t.props,{children:r,name:n,branch:s,"data-_gt":c}=e,l=a(e,["children","name","branch","data-_gt"]);return n=n||t.props["data-_gt-name"]||"branch",l=o.branches||{},i(void 0!==l[s]?l[s]:r)}return"fragment"===(null==o?void 0:o.transformation)?e.createElement(t.type,{key:t.props.key,children:i(t.props.children)}):t.props.children?e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0,children:i(t.props.children)})):e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0}))})(t):t,i=t=>Array.isArray(t)?e.Children.map(t,o):o(t);return i(t)}function Nt({sourceElement:t,targetElement:r,locales:n=[f],renderVariable:o}){var i,a;const{props:s}=t,c=s["data-_gt"],l=null==c?void 0:c.transformation;if("plural"===l){const e=t.props.n;return Mt({source:Rt(e,n,c.branches||{})||t.props.children,target:Rt(e,n,r.props["data-_gt"].branches||{})||r.props.children,locales:n,renderVariable:o})}if("branch"===l){let{name:e,branch:i,children:a}=s;e=e||t.props["data-_gt-name"]||"branch";return Mt({source:(c.branches||{})[i]||a,target:(r.props["data-_gt"].branches||{})[i]||r.props.children,locales:n,renderVariable:o})}return"fragment"===l&&(null===(i=r.props)||void 0===i?void 0:i.children)?e.createElement(t.type,{key:t.props.key,children:Mt({source:s.children,target:r.props.children,locales:n,renderVariable:o})}):(null==s?void 0:s.children)&&(null===(a=r.props)||void 0===a?void 0:a.children)?e.cloneElement(t,Object.assign(Object.assign({},s),{"data-_gt":void 0,children:Mt({source:s.children,target:r.props.children,locales:n,renderVariable:o})})):It({children:t,defaultLocale:n[0],renderVariable:o})}function Mt({source:t,target:n,locales:o=[f],renderVariable:i}){if(null==n&&t)return It({children:t,defaultLocale:o[0],renderVariable:i});if("string"==typeof n)return n;if(Array.isArray(n)&&!Array.isArray(t)&&t&&(t=[t]),Array.isArray(t)&&Array.isArray(n)){const a={},s={},c=t.filter((t=>{if(e.isValidElement(t)){const e=Ft(t);if("variable"!==(null==e?void 0:e.transformation))return!0;{let{variableName:e,variableValue:r,variableOptions:n}=zt(t.props);a[e]=r,s[e]=n}}})),l=e=>c.find((t=>{var r,n;const o=Ft(t);if(void 0!==(null==o?void 0:o.id)){return o.id===(null===(n=null===(r=null==e?void 0:e.props)||void 0===r?void 0:r["data-_gt"])||void 0===n?void 0:n.id)}return!1}))||c.shift();return n.map(((t,n)=>{if("string"==typeof t)return r.jsx(e.Fragment,{children:t},`string_${n}`);if(Lt(t))return r.jsx(e.Fragment,{children:i({variableType:t.variable||"variable",variableValue:a[t.key],variableOptions:s[t.key],locales:o})},`var_${n}`);const c=l(t);return c?r.jsx(e.Fragment,{children:Nt({sourceElement:c,targetElement:t,locales:o,renderVariable:i})},`element_${n}`):void 0}))}if(n&&"object"==typeof n&&!Array.isArray(n)){const r=Lt(n)?"variable":"element";if(e.isValidElement(t)){if("element"===r)return Nt({sourceElement:t,targetElement:n,locales:o,renderVariable:i});const e=Ft(t);if("variable"===(null==e?void 0:e.transformation)){const{variableValue:e,variableOptions:r,variableType:n}=zt(t.props);return i({variableType:n,variableValue:e,variableOptions:r,locales:o})}}}return It({children:t,defaultLocale:o[0],renderVariable:i})}const Vt={method:"default",timeout:"undefined"!=typeof process&&"development"!==process.env.NODE_ENV?8e3:12e3};const Ut=e=>"string"==typeof e||Array.isArray(e),Gt=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function $t(e,t){const r=Object.assign(Object.assign({},Object.fromEntries(Object.entries(e).filter((([,e])=>Ut(e))))),Object.fromEntries(Object.entries(t).filter((([,e])=>Ut(e))))),n=Object.entries(e).filter((([,e])=>Gt(e))).map((([e])=>e)),o=Object.entries(t).filter((([,e])=>Gt(e))).map((([e])=>e)),i=new Set([...n,...o]);for(const n of i)r[n]=$t(e[n]||{},t[n]||{});return r}function Kt(t){var{children:n,n:i,locale:s}=t,c=a(t,["children","n","locale"]);const l=e.useContext(o);let u;l&&(s||(s=l.locale),u||(u=l.defaultLocale));const d=[...s?[s]:[],u||f];if("number"!=typeof i)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const h=Rt(i,d,c)||n;return r.jsx(r.Fragment,{children:h})}function Wt(){return i("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}function Jt({children:t,id:n,context:o}){if(!t)return;const{translations:a,translationRequired:s,runtimeTranslationEnabled:c,dialectTranslationRequired:l,registerJsxForTranslation:u,renderSettings:d,locale:f,defaultLocale:h}=i("<T> used on the client-side outside of <GTProvider>"),p=e.useMemo((()=>Ot(t)),[t]),v=n&&(null==a?void 0:a[n]),[g,y]=e.useMemo((()=>{if(!s||v)return[void 0,""];const e=Ht(p);return[e,wt(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[p,o,n,s,v]),_=v?null==a?void 0:a[n]:null==a?void 0:a[y];e.useEffect((()=>{c&&s&&a&&f&&!_&&u({source:g,targetLocale:f,metadata:{id:n,hash:y,context:o}})}),[c,a,_,s,n,y,o,f,t]);const b=()=>It({children:p,defaultLocale:h,renderVariable:m});if(!s||a&&!_&&!c||"error"===(null==_?void 0:_.state))return r.jsx(r.Fragment,{children:b()});if(!_||"loading"===(null==_?void 0:_.state)){let e;return e="skeleton"===d.method?"":"replace"===d.method||l?b():"",r.jsx(r.Fragment,{children:e})}return r.jsx(r.Fragment,{children:(x=_.target,Mt({source:p,target:x,locales:[f,h],renderVariable:m}))});var x}function Xt(){return i("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function qt(){const{setLocale:e}=i("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function Yt(r){const n=Wt(),o=Xt(),i=qt(),a=e.useMemo((()=>{if(!o||0===o.length)return[];const e=o.sort(((e,r)=>(new Intl.Collator).compare(t.getLocaleProperties(e).nativeNameWithRegionCode,t.getLocaleProperties(r).nativeNameWithRegionCode)));return e}),[o]);return{locale:n,locales:r||a,setLocale:i}}function Zt({locale:r="",defaultLocale:n=f,locales:o=[],localeCookieName:i=At,ssr:a=!0}){const[s,c]=e.useState(a?r&&t.determineLocale(r,o)||"":Qt({_locale:r,locale:r,locales:o,defaultLocale:n,localeCookieName:i})),[l,u]=function({locale:e,locales:r,defaultLocale:n,localeCookieName:o,_setLocale:i}){const a=o=>{const a=t.determineLocale(o,r)||e||n;return a!==o&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(a,o)),i(a),a},s=e=>{const t=a(e);"undefined"!=typeof document&&(document.cookie=`${o}=${t};path=/`)};return[s,a]}({locale:s,locales:o,defaultLocale:n,localeCookieName:i,_setLocale:c});return e.useEffect((()=>{const e=Qt({_locale:r,locale:s,locales:o,defaultLocale:n,localeCookieName:i});u(e)}),[r,s,o,n,i]),[s,l]}function Qt({_locale:e,locale:r,locales:n,defaultLocale:o,localeCookieName:i}){var a;if(e&&e===r&&t.determineLocale(e,n)===r)return e;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[o],c="undefined"!=typeof document?null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${i}=`))))||void 0===a?void 0:a.split("=")[1]:void 0,l=t.determineLocale([...e?[e]:[],...c?[c]:[],...s],n)||o;return c&&c!==l&&"undefined"!=typeof document&&(document.cookie=`${i}=${l};path=/`),l}function er(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function tr(e,r){return s(this,void 0,void 0,(function*(){var n;let o;try{o=yield r(e)}catch(e){}const i=null===(n=t.getLocaleProperties(e))||void 0===n?void 0:n.languageCode;if(i&&i!==e)try{o=yield r(i)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return o}))}Kt.gtTransformation="plural",Jt.gtTransformation="translate-client",exports.Branch=Tt,exports.ClientProvider=function({children:n,dictionary:i,initialTranslations:a,locale:s,_versionId:c,defaultLocale:u,translationRequired:d,dialectTranslationRequired:f,locales:h=[],renderSettings:p,projectId:v,devApiKey:g,runtimeUrl:y,runtimeTranslationEnabled:_,resetLocaleCookieName:m,localeCookieName:b=At}){const[x,w]=e.useState(g?null:a),[k,B]=e.useState(s&&t.determineLocale(s,h)||"");e.useEffect((()=>{const e=s&&t.determineLocale(s,h)||"";e!==k&&B(e)}),[s,h]),e.useEffect((()=>{var e;const t=null===(e=document.cookie.split("; ").find((e=>e.startsWith(`${b}=`))))||void 0===e?void 0:e.split("=")[1];k&&t&&t!==k&&(document.cookie=`${b}=;path=/`)}),[k,b]),e.useEffect((()=>{w((e=>Object.assign(Object.assign({},a),e)))}),[a]);const{registerContentForTranslation:E,registerJsxForTranslation:S}=l({locale:k,versionId:c,projectId:v,devApiKey:g,runtimeUrl:y,setTranslations:w,defaultLocale:u,renderSettings:p,runtimeTranslationEnabled:_}),A=Et(x,k,u,d,f,_,E,p),T=St(i,x,k,u,d,f,_,E,p),O=!(d&&!x)&&k;return r.jsx(o.Provider,{value:{registerContentForTranslation:E,registerJsxForTranslation:S,setLocale:e=>{e=t.determineLocale(e,h)||k||u,document.cookie=`${b}=${e};path=/`,document.cookie=`${m}=true;path=/`,B(e),window.location.reload()},_internalUseGTFunction:A,_internalUseDictFunction:T,locale:k,locales:h,defaultLocale:u,translations:x,translationRequired:d,dialectTranslationRequired:f,renderSettings:p,runtimeTranslationEnabled:_},children:O&&n})},exports.Currency=y,exports.DateTime=_,exports.GTContext=o,exports.GTProvider=function(i){var{children:c,projectId:h="",devApiKey:p,dictionary:v,locales:g=[],defaultLocale:y=f,locale:_,cacheUrl:m=u,runtimeUrl:b=d,renderSettings:x=Vt,loadDictionary:w,loadTranslations:k,fallback:B,ssr:E=er(),localeCookieName:S=At,translations:A=null,_versionId:T}=i,O=a(i,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:j,devApiKey:C}=function(e,t){try{return{projectId:e||(void 0).VITE_GT_PROJECT_ID||(void 0).REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||(void 0).VITE_GT_DEV_API_KEY||(void 0).VITE_GT_API_KEY||(void 0).REDWOOD_ENV_GT_DEV_API_KEY||(void 0).REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(h,p);g=e.useMemo((()=>Array.from(new Set([y,...g]))),[y,g]);const[P,D]=Zt({defaultLocale:y,locales:g,locale:_,ssr:E,localeCookieName:S}),H=e.useMemo((()=>!!(j&&b&&C&&"development"===process.env.NODE_ENV)),[j,b,C]),R=e.useMemo((()=>(k?"custom":m&&j&&"default")||"disabled"),[k]),[z,L]=e.useState(v);e.useEffect((()=>{if(!w)return;let e=!0;return(()=>{s(this,void 0,void 0,(function*(){const t=$t((yield tr(y,w))||{},(yield tr(P,w))||{});e&&L(t||{})}))})(),()=>{e=!1}}),[w,P,y]),e.useMemo((()=>{if("production"===process.env.NODE_ENV&&C){if(!E)throw new Error("gt-react Error: Production environments cannot include an api key.");if(C.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===R||!m&&!b||j||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),j&&b&&"custom"!==R&&!C&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),b===d||m===u&&"default"===R){const e=(g||g).filter((e=>!n.getSupportedLocale(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:r}=t.getLocaleProperties(e);return`${e} (${r})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,C,R,m,b,j,g]);const[F,I]=e.useMemo((()=>{const e=t.requiresTranslation(y,P,g);return[e,e&&t.isSameLanguage(y,P)]}),[y,P,g]),[N,M]=e.useState(A||F&&"disabled"!==R?null:{});e.useEffect((()=>M(F&&"disabled"!==R?null:{})),[P,R]);const{registerContentForTranslation:V,registerJsxForTranslation:U}=l(Object.assign({locale:P,versionId:T,projectId:j,runtimeTranslationEnabled:H,defaultLocale:y,devApiKey:C,runtimeUrl:b,renderSettings:x,setTranslations:M},O));e.useEffect((()=>{if(N||!F||"disabled"===R)return;let e=!0;return(()=>{s(this,void 0,void 0,(function*(){let t;switch(R){case"custom":if(k)try{t=yield k(P)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(P),e)}break;case"default":try{t=yield function(e){return s(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:m,projectId:j,locale:P,versionId:T})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&M(t)}))})(),()=>{e=!1}}),[N,F,R,m,j,P,T]);const G=Et(N,P,y,F,I,H,V,x),$=St(z,N,P,y,F,I,H,V,x),K=!(F&&!N||!P);return r.jsx(o.Provider,{value:{registerContentForTranslation:V,registerJsxForTranslation:U,_internalUseGTFunction:G,_internalUseDictFunction:$,runtimeTranslationEnabled:H,locale:P,locales:g,setLocale:D,defaultLocale:y,translations:N,translationRequired:F,dialectTranslationRequired:I,projectId:j,renderSettings:x},children:K?c:B})},exports.LocaleSelector=function(e){var{locales:n}=e,o=a(e,["locales"]);const{locale:i,locales:s,setLocale:c}=Yt(n||void 0),l=e=>{return(r=t.getLocaleProperties(e).nativeNameWithRegionCode)?r.charAt(0).toUpperCase()+(r.length>1?r.slice(1):""):"";var r};return s&&0!==s.length&&c?r.jsxs("select",Object.assign({},o,{value:i||"",onChange:e=>c(e.target.value),children:[!i&&r.jsx("option",{value:""}),s.map((e=>r.jsx("option",{value:e,suppressHydrationWarning:!0,children:l(e)},e)))]})):null},exports.Num=v,exports.Plural=Kt,exports.T=Jt,exports.Var=g,exports.renderVariable=m,exports.useDefaultLocale=function(){return i("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale},exports.useDict=function(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=i(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}},exports.useGT=function(){const{_internalUseGTFunction:e}=i("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}},exports.useLocale=Wt,exports.useLocaleSelector=Yt,exports.useLocales=Xt,exports.useRuntimeTranslation=l,exports.useSetLocale=qt;
|
18
|
+
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,m,b,x,w,k,B,E,S,A,T=this._hash.words,O=u.words,j=d.words,C=a.words,P=s.words,D=c.words,H=l.words;for(w=i=T[0],k=f=T[1],B=m=T[2],E=b=T[3],S=x=T[4],r=0;r<80;r+=1)A=i+e[t+C[r]]|0,A+=r<16?h(f,m,b)+O[0]:r<32?p(f,m,b)+O[1]:r<48?v(f,m,b)+O[2]:r<64?g(f,m,b)+O[3]:y(f,m,b)+O[4],A=(A=_(A|=0,D[r]))+x|0,i=x,x=b,b=_(m,10),m=f,f=A,A=w+e[t+P[r]]|0,A+=r<16?y(k,B,E)+j[0]:r<32?g(k,B,E)+j[1]:r<48?v(k,B,E)+j[2]:r<64?p(k,B,E)+j[3]:h(k,B,E)+j[4],A=(A=_(A|=0,H[r]))+S|0,w=S,S=E,E=_(B,10),B=k,k=A;A=T[1]+m+E|0,T[1]=T[2]+b+S|0,T[2]=T[3]+x+w|0,T[3]=T[4]+i+k|0,T[4]=T[0]+f+B|0,T[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),he.exports;var e}(),ge(),function(){return ye||(ye=1,_e.exports=(c=C(),te(),ge(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,g=1;g<d;g++){v=o.finalize(v),o.reset();for(var y=v.words,_=0;_<p;_++)h[_]^=y[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),_e.exports;var e,t,r,n,o,i,a,s,c}(),xe(),Be(),Ae(),je(),De(),ze(),function(){return Le?Fe.exports:(Le=1,Fe.exports=(t=C(),Be(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return Ie?Ne.exports:(Ie=1,Ne.exports=(e=C(),Be(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return Me?Ve.exports:(Me=1,Ve.exports=(e=C(),Be(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Ue?Ge.exports:(Ue=1,Ge.exports=(e=C(),Be(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return $e||($e=1,Ke.exports=(e=C(),Be(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),Ke.exports;var e}(),function(){return We?Je.exports:(We=1,Je.exports=(e=C(),Be(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return Xe?qe.exports:(Xe=1,qe.exports=(n=C(),Be(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return Ye||(Ye=1,Ze.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],g=e[v],y=e[g],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*g^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[y^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],g=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],y=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=g,d=y,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],y=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=g,e[t+2]=y,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Ze.exports;var e}(),tt(),function(){return rt||(rt=1,nt.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),nt.exports;var e}(),function(){return ot||(ot=1,it.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),it.exports;var e}(),function(){return at||(at=1,st.exports=(e=C(),U(),X(),xe(),Be(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),st.exports;var e}(),ut())),A.exports),mt=k(_t),bt=function(){return bt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)};function xt(e){return mt.SHA256(e).toString(mt.enc.Hex)}function wt(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=xt),t(S(bt(bt(bt({source:Bt(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var kt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Bt(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Bt(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return bt({key:e.key},e.variable&&{variable:e.variable})}return e};function Bt(e){return Array.isArray(e)?e.map(kt):kt(e)}function Et(r,n,o,i,a,s,c,l){return e.useCallback(((e,u={})=>{if(!e||"string"!=typeof e)return"";const d=t.splitStringToContent(e),f=(e,r)=>t.renderContentToString(e,r,u.variables,u.variablesOptions),h=null==u?void 0:u.id,p=h&&(null==r?void 0:r[h]);let v="";i&&!p&&(v=wt(Object.assign(Object.assign(Object.assign({source:d},(null==u?void 0:u.context)&&{context:u.context}),h&&{id:h}),{dataFormat:"JSX"})));let g=p?null==r?void 0:r[h]:null==r?void 0:r[v];return i&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?f(g.target,[n,o]):s?(c({source:d,targetLocale:n,metadata:Object.assign(Object.assign({},(null==u?void 0:u.context)&&{context:u.context}),{id:h,hash:v||""})}),"replace"===l.method?f(d,[o]):"skeleton"===l.method?"":a?f(d,[o]):""):f(d,[o]):f(d,[o])}),[r,n,o,i,s,c,a])}function St(r,n,o,i,a,s,c,l,u){return e.useCallback(((d,f={})=>{if(!r)return"";const h=function(t,r){let n=t,o=r.split(".");for(const t of o){if("object"!=typeof n||Array.isArray(n)||e.isValidElement(n))return;n=n[t]}return n}(r,d);if(!h)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(d)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(h))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(d)),"";const{entry:p,metadata:v}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(h);if(!p||"string"!=typeof p)return"";const g=t.splitStringToContent(p),y=(e,r)=>t.renderContentToString(e,r,f.variables,f.variablesOptions);if(!a)return y(g,[i]);let _=wt(Object.assign(Object.assign({source:g},(null==v?void 0:v.context)&&{context:v.context}),{id:d,dataFormat:"JSX"})),m=null==n?void 0:n[_];return"success"===(null==m?void 0:m.state)?y(m.target,[o,i]):"error"===(null==m?void 0:m.state)?y(g,[i]):c?(l({source:g,targetLocale:o,metadata:Object.assign(Object.assign({},(null==v?void 0:v.context)&&{context:v.context}),{id:d,hash:_})}),"replace"===u.method?y(g,[i]):"skeleton"===u.method?"":s?y(g,[i]):""):y(g,[i])}),[r,n,o,i,a,c,l,s])}const At="generaltranslation.locale";function Tt(e){var{children:t,branch:n}=e,o=a(e,["children","branch"]);const i=(n=null==n?void 0:n.toString())&&void 0!==o[n]?o[n]:t;return r.jsx(r.Fragment,{children:i})}function Ot(t,r=0){let n=r;const o=e=>{const{type:t,props:r}=e;n+=1;let o,i={id:n};try{o="function"==typeof t&&t.gtTransformation||""}catch(e){o=""}if(o){const t=o.split("-");if("translate"===t[0])throw new Error((e=>{var t;return`General Translation: Nested <T> components. The inner <T> has the id: "${null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.id}".`})(e));if("variable"===t[0]&&(i.variableType=(null==t?void 0:t[1])||"variable"),"plural"===t[0]){const e=Object.entries(r).reduce(((e,[t,r])=>(function(e){return h.includes(e)}(t)&&(e[t]=Ot(r,n)),e)),{});Object.keys(e).length&&(i.branches=e)}if("branch"===t[0]){const e=a(r,["children","branch"]),t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=Ot(r,n),e)),{});Object.keys(t).length&&(i.branches=t)}i.transformation=t[0]}return i};function i(t){return e.isValidElement(t)?function(t){const{props:r}=t;if(r["data-_gt"])throw new Error((e=>`General Translation already in use on child with props: ${e.props}. This usually occurs when you nest <T> components within the same file. Remove one of the <T> components to continue.`)(t));let n=o(t),i=Object.assign(Object.assign({},r),{"data-_gt":n});return r.children&&!n.variableType&&(i.children=s(r.children)),t.type===e.Fragment&&(i["data-_gt"].transformation="fragment"),e.cloneElement(t,i)}(t):t}function s(t){return Array.isArray(t)?e.Children.map(t,i):i(t)}return s(t)}Tt.gtTransformation="branch";const jt={variable:"value",number:"n",datetime:"date",currency:"cost"};function Ct(e={},t){var r;if(e.name)return e.name;return`_gt_${jt[t]||"value"}_${null===(r=e["data-_gt"])||void 0===r?void 0:r.id}`}const Pt=e=>{var t;if(!e)return"";const{type:r,props:n}=e;if(r&&"function"==typeof r){if("displayName"in r&&"string"==typeof r.displayName&&r.displayName)return r.displayName;if("name"in r&&"string"==typeof r.name&&r.name)return r.name}return r&&"string"==typeof r?r:n.href?"a":(null===(t=n["data-_gt"])||void 0===t?void 0:t.id)?`C${n["data-_gt"].id}`:"function"},Dt=t=>{return r=t,e.isValidElement(r)?(e=>{const{type:t,props:r}=e;let n={type:Pt(e),props:{}};if(r["data-_gt"]){const e=r["data-_gt"];let t=Object.assign({},e);const o=e.transformation;if("variable"===o){const t=e.variableType||"variable";return{variable:t,key:Ct(r,t),id:e.id}}if("plural"===o&&e.branches){n.type="Plural";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Ht(t)})),t=Object.assign(Object.assign({},t),{branches:r})}if("branch"===o&&e.branches){n.type="Branch";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Ht(t)})),t=Object.assign(Object.assign({},t),{branches:r})}n.props["data-_gt"]=t}return r.children&&(n.props.children=Ht(r.children)),n})(t):"number"==typeof t?t.toString():t;var r};function Ht(e){return Array.isArray(e)?e.map(Dt):Dt(e)}function Rt(e,t,r){let n="",o=null;return"number"==typeof e&&!o&&r&&(n=function(e,t,r){void 0===t&&(t=h),void 0===r&&(r=["en"]);var n=p.get("PluralRules",r).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(e,Object.keys(r),t)),n&&!o&&(o=r[n]),o}function zt(e){var t;const r=(null===(t=e["data-_gt"])||void 0===t?void 0:t.variableType)||"variable";return{variableName:Ct(e,r),variableType:r,variableValue:void 0!==e.value?e.value:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t=Object.assign(Object.assign({},e.currency&&{currency:e.currency}),e.options&&Object.assign({},e.options));return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function Lt(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.key){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.id)return!0;if("string"==typeof t.variable)return!0}if(3===e.length&&"string"==typeof t.variable&&"number"==typeof t.id)return!0}return!1}function Ft(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function It({children:t,defaultLocale:r=f,renderVariable:n}){const o=t=>e.isValidElement(t)?(t=>{const o=Ft(t);if("variable"===(null==o?void 0:o.transformation)){const{variableType:e,variableValue:o,variableOptions:i}=zt(t.props);return n({variableType:e,variableValue:o,variableOptions:i,locales:[r]})}if("plural"===(null==o?void 0:o.transformation)){const e=o.branches||{};return i(Rt(t.props.n,[r],e)||t.props.children)}if("branch"===(null==o?void 0:o.transformation)){let e=t.props,{children:r,name:n,branch:s,"data-_gt":c}=e,l=a(e,["children","name","branch","data-_gt"]);return n=n||t.props["data-_gt-name"]||"branch",l=o.branches||{},i(void 0!==l[s]?l[s]:r)}return"fragment"===(null==o?void 0:o.transformation)?e.createElement(t.type,{key:t.props.key,children:i(t.props.children)}):t.props.children?e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0,children:i(t.props.children)})):e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0}))})(t):t,i=t=>Array.isArray(t)?e.Children.map(t,o):o(t);return i(t)}function Nt({sourceElement:t,targetElement:r,locales:n=[f],renderVariable:o}){var i,a;const{props:s}=t,c=s["data-_gt"],l=null==c?void 0:c.transformation;if("plural"===l){const e=t.props.n;return Mt({source:Rt(e,n,c.branches||{})||t.props.children,target:Rt(e,n,r.props["data-_gt"].branches||{})||r.props.children,locales:n,renderVariable:o})}if("branch"===l){let{name:e,branch:i,children:a}=s;e=e||t.props["data-_gt-name"]||"branch";return Mt({source:(c.branches||{})[i]||a,target:(r.props["data-_gt"].branches||{})[i]||r.props.children,locales:n,renderVariable:o})}return"fragment"===l&&(null===(i=r.props)||void 0===i?void 0:i.children)?e.createElement(t.type,{key:t.props.key,children:Mt({source:s.children,target:r.props.children,locales:n,renderVariable:o})}):(null==s?void 0:s.children)&&(null===(a=r.props)||void 0===a?void 0:a.children)?e.cloneElement(t,Object.assign(Object.assign({},s),{"data-_gt":void 0,children:Mt({source:s.children,target:r.props.children,locales:n,renderVariable:o})})):It({children:t,defaultLocale:n[0],renderVariable:o})}function Mt({source:t,target:n,locales:o=[f],renderVariable:i}){if(null==n&&t)return It({children:t,defaultLocale:o[0],renderVariable:i});if("string"==typeof n)return n;if(Array.isArray(n)&&!Array.isArray(t)&&t&&(t=[t]),Array.isArray(t)&&Array.isArray(n)){const a={},s={},c=t.filter((t=>{if(e.isValidElement(t)){const e=Ft(t);if("variable"!==(null==e?void 0:e.transformation))return!0;{let{variableName:e,variableValue:r,variableOptions:n}=zt(t.props);a[e]=r,s[e]=n}}})),l=e=>c.find((t=>{var r,n;const o=Ft(t);if(void 0!==(null==o?void 0:o.id)){return o.id===(null===(n=null===(r=null==e?void 0:e.props)||void 0===r?void 0:r["data-_gt"])||void 0===n?void 0:n.id)}return!1}))||c.shift();return n.map(((t,n)=>{if("string"==typeof t)return r.jsx(e.Fragment,{children:t},`string_${n}`);if(Lt(t))return r.jsx(e.Fragment,{children:i({variableType:t.variable||"variable",variableValue:a[t.key],variableOptions:s[t.key],locales:o})},`var_${n}`);const c=l(t);return c?r.jsx(e.Fragment,{children:Nt({sourceElement:c,targetElement:t,locales:o,renderVariable:i})},`element_${n}`):void 0}))}if(n&&"object"==typeof n&&!Array.isArray(n)){const r=Lt(n)?"variable":"element";if(e.isValidElement(t)){if("element"===r)return Nt({sourceElement:t,targetElement:n,locales:o,renderVariable:i});const e=Ft(t);if("variable"===(null==e?void 0:e.transformation)){const{variableValue:e,variableOptions:r,variableType:n}=zt(t.props);return i({variableType:n,variableValue:e,variableOptions:r,locales:o})}}}return It({children:t,defaultLocale:o[0],renderVariable:i})}const Vt={method:"default",timeout:"undefined"!=typeof process&&"development"!==process.env.NODE_ENV?8e3:12e3};const Ut=e=>"string"==typeof e||Array.isArray(e),Gt=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function $t(e,t){const r=Object.assign(Object.assign({},Object.fromEntries(Object.entries(e).filter((([,e])=>Ut(e))))),Object.fromEntries(Object.entries(t).filter((([,e])=>Ut(e))))),n=Object.entries(e).filter((([,e])=>Gt(e))).map((([e])=>e)),o=Object.entries(t).filter((([,e])=>Gt(e))).map((([e])=>e)),i=new Set([...n,...o]);for(const n of i)r[n]=$t(e[n]||{},t[n]||{});return r}function Kt(t){var{children:n,n:i,locale:s}=t,c=a(t,["children","n","locale"]);const l=e.useContext(o);let u;l&&(s||(s=l.locale),u||(u=l.defaultLocale));const d=[...s?[s]:[],u||f];if("number"!=typeof i)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const h=Rt(i,d,c)||n;return r.jsx(r.Fragment,{children:h})}function Wt(){return i("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}function Jt({children:t,id:n,context:o}){if(!t)return null;const{translations:a,translationRequired:s,runtimeTranslationEnabled:c,dialectTranslationRequired:l,registerJsxForTranslation:u,renderSettings:d,locale:f,defaultLocale:h}=i("<T> used on the client-side outside of <GTProvider>"),p=e.useMemo((()=>Ot(t)),[t]),v=n&&(null==a?void 0:a[n]),[g,y]=e.useMemo((()=>{if(!s||v)return[void 0,""];const e=Ht(p);return[e,wt(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[p,o,n,s,v]),_=v?null==a?void 0:a[n]:null==a?void 0:a[y];e.useEffect((()=>{c&&s&&a&&f&&!_&&u({source:g,targetLocale:f,metadata:{id:n,hash:y,context:o}})}),[c,a,_,s,n,y,o,f,t]);const b=()=>It({children:p,defaultLocale:h,renderVariable:m});if(!s||a&&!_&&!c||"error"===(null==_?void 0:_.state))return r.jsx(r.Fragment,{children:b()});if(!_||"loading"===(null==_?void 0:_.state)){let e;return e="skeleton"===d.method?"":"replace"===d.method||l?b():"",r.jsx(r.Fragment,{children:e})}return r.jsx(r.Fragment,{children:(x=_.target,Mt({source:p,target:x,locales:[f,h],renderVariable:m}))});var x}function Xt(){return i("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function qt(){const{setLocale:e}=i("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function Yt(r){const n=Wt(),o=Xt(),i=qt(),a=e.useMemo((()=>{if(!o||0===o.length)return[];const e=o.sort(((e,r)=>(new Intl.Collator).compare(t.getLocaleProperties(e).nativeNameWithRegionCode,t.getLocaleProperties(r).nativeNameWithRegionCode)));return e}),[o]);return{locale:n,locales:r||a,setLocale:i}}function Zt({locale:r="",defaultLocale:n=f,locales:o=[],localeCookieName:i=At,ssr:a=!0}){const[s,c]=e.useState(a?r&&t.determineLocale(r,o)||"":Qt({_locale:r,locale:r,locales:o,defaultLocale:n,localeCookieName:i})),[l,u]=function({locale:e,locales:r,defaultLocale:n,localeCookieName:o,_setLocale:i}){const a=o=>{const a=t.determineLocale(o,r)||e||n;return a!==o&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(a,o)),i(a),a},s=e=>{const t=a(e);"undefined"!=typeof document&&(document.cookie=`${o}=${t};path=/`)};return[s,a]}({locale:s,locales:o,defaultLocale:n,localeCookieName:i,_setLocale:c});return e.useEffect((()=>{const e=Qt({_locale:r,locale:s,locales:o,defaultLocale:n,localeCookieName:i});u(e)}),[r,s,o,n,i]),[s,l]}function Qt({_locale:e,locale:r,locales:n,defaultLocale:o,localeCookieName:i}){var a;if(e&&e===r&&t.determineLocale(e,n)===r)return e;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[o],c="undefined"!=typeof document?null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${i}=`))))||void 0===a?void 0:a.split("=")[1]:void 0,l=t.determineLocale([...e?[e]:[],...c?[c]:[],...s],n)||o;return c&&c!==l&&"undefined"!=typeof document&&(document.cookie=`${i}=${l};path=/`),l}function er(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function tr(e,r){return s(this,void 0,void 0,(function*(){var n;let o;try{o=yield r(e)}catch(e){}const i=null===(n=t.getLocaleProperties(e))||void 0===n?void 0:n.languageCode;if(i&&i!==e)try{o=yield r(i)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return o}))}Kt.gtTransformation="plural",Jt.gtTransformation="translate-client",exports.Branch=Tt,exports.ClientProvider=function({children:n,dictionary:i,initialTranslations:a,locale:s,_versionId:c,defaultLocale:u,translationRequired:d,dialectTranslationRequired:f,locales:h=[],renderSettings:p,projectId:v,devApiKey:g,runtimeUrl:y,runtimeTranslationEnabled:_,resetLocaleCookieName:m,localeCookieName:b=At}){const[x,w]=e.useState(g?null:a),[k,B]=e.useState(s&&t.determineLocale(s,h)||"");e.useEffect((()=>{const e=s&&t.determineLocale(s,h)||"";e!==k&&B(e)}),[s,h]),e.useEffect((()=>{var e;const t=null===(e=document.cookie.split("; ").find((e=>e.startsWith(`${b}=`))))||void 0===e?void 0:e.split("=")[1];k&&t&&t!==k&&(document.cookie=`${b}=;path=/`)}),[k,b]),e.useEffect((()=>{w((e=>Object.assign(Object.assign({},a),e)))}),[a]);const{registerContentForTranslation:E,registerJsxForTranslation:S}=l({locale:k,versionId:c,projectId:v,devApiKey:g,runtimeUrl:y,setTranslations:w,defaultLocale:u,renderSettings:p,runtimeTranslationEnabled:_}),A=Et(x,k,u,d,f,_,E,p),T=St(i,x,k,u,d,f,_,E,p),O=!(d&&!x)&&k;return r.jsx(o.Provider,{value:{registerContentForTranslation:E,registerJsxForTranslation:S,setLocale:e=>{e=t.determineLocale(e,h)||k||u,document.cookie=`${b}=${e};path=/`,document.cookie=`${m}=true;path=/`,B(e),window.location.reload()},_internalUseGTFunction:A,_internalUseDictFunction:T,locale:k,locales:h,defaultLocale:u,translations:x,translationRequired:d,dialectTranslationRequired:f,renderSettings:p,runtimeTranslationEnabled:_},children:O&&n})},exports.Currency=y,exports.DateTime=_,exports.GTContext=o,exports.GTProvider=function(i){var{children:c,projectId:h="",devApiKey:p,dictionary:v,locales:g=[],defaultLocale:y=f,locale:_,cacheUrl:m=u,runtimeUrl:b=d,renderSettings:x=Vt,loadDictionary:w,loadTranslations:k,fallback:B,ssr:E=er(),localeCookieName:S=At,translations:A=null,_versionId:T}=i,O=a(i,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:j,devApiKey:C}=function(e,t){try{return{projectId:e||(void 0).VITE_GT_PROJECT_ID||(void 0).REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||(void 0).VITE_GT_DEV_API_KEY||(void 0).VITE_GT_API_KEY||(void 0).REDWOOD_ENV_GT_DEV_API_KEY||(void 0).REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(h,p);g=e.useMemo((()=>Array.from(new Set([y,...g]))),[y,g]);const[P,D]=Zt({defaultLocale:y,locales:g,locale:_,ssr:E,localeCookieName:S}),H=e.useMemo((()=>!!(j&&b&&C&&"development"===process.env.NODE_ENV)),[j,b,C]),R=e.useMemo((()=>(k?"custom":m&&j&&"default")||"disabled"),[k]),[z,L]=e.useState(v);e.useEffect((()=>{if(!w)return;let e=!0;return(()=>{s(this,void 0,void 0,(function*(){const t=$t((yield tr(y,w))||{},(yield tr(P,w))||{});e&&L(t||{})}))})(),()=>{e=!1}}),[w,P,y]),e.useMemo((()=>{if("production"===process.env.NODE_ENV&&C){if(!E)throw new Error("gt-react Error: Production environments cannot include an api key.");if(C.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===R||!m&&!b||j||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),j&&b&&"custom"!==R&&!C&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),b===d||m===u&&"default"===R){const e=(g||g).filter((e=>!n.getSupportedLocale(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:r}=t.getLocaleProperties(e);return`${e} (${r})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,C,R,m,b,j,g]);const[F,I]=e.useMemo((()=>{const e=t.requiresTranslation(y,P,g);return[e,e&&t.isSameLanguage(y,P)]}),[y,P,g]),[N,M]=e.useState(A||F&&"disabled"!==R?null:{});e.useEffect((()=>M(F&&"disabled"!==R?null:{})),[P,R]);const{registerContentForTranslation:V,registerJsxForTranslation:U}=l(Object.assign({locale:P,versionId:T,projectId:j,runtimeTranslationEnabled:H,defaultLocale:y,devApiKey:C,runtimeUrl:b,renderSettings:x,setTranslations:M},O));e.useEffect((()=>{if(N||!F||"disabled"===R)return;let e=!0;return(()=>{s(this,void 0,void 0,(function*(){let t;switch(R){case"custom":if(k)try{t=yield k(P)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(P),e)}break;case"default":try{t=yield function(e){return s(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:m,projectId:j,locale:P,versionId:T})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&M(t)}))})(),()=>{e=!1}}),[N,F,R,m,j,P,T]);const G=Et(N,P,y,F,I,H,V,x),$=St(z,N,P,y,F,I,H,V,x),K=!(F&&!N||!P);return r.jsx(o.Provider,{value:{registerContentForTranslation:V,registerJsxForTranslation:U,_internalUseGTFunction:G,_internalUseDictFunction:$,runtimeTranslationEnabled:H,locale:P,locales:g,setLocale:D,defaultLocale:y,translations:N,translationRequired:F,dialectTranslationRequired:I,projectId:j,renderSettings:x},children:K?c:B})},exports.LocaleSelector=function(e){var{locales:n}=e,o=a(e,["locales"]);const{locale:i,locales:s,setLocale:c}=Yt(n||void 0),l=e=>{return(r=t.getLocaleProperties(e).nativeNameWithRegionCode)?r.charAt(0).toUpperCase()+(r.length>1?r.slice(1):""):"";var r};return s&&0!==s.length&&c?r.jsxs("select",Object.assign({},o,{value:i||"",onChange:e=>c(e.target.value),children:[!i&&r.jsx("option",{value:""}),s.map((e=>r.jsx("option",{value:e,suppressHydrationWarning:!0,children:l(e)},e)))]})):null},exports.Num=v,exports.Plural=Kt,exports.T=Jt,exports.Var=g,exports.renderVariable=m,exports.useDefaultLocale=function(){return i("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale},exports.useDict=function(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=i(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}},exports.useGT=function(){const{_internalUseGTFunction:e}=i("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}},exports.useLocale=Wt,exports.useLocaleSelector=Yt,exports.useLocales=Xt,exports.useRuntimeTranslation=l,exports.useSetLocale=qt;
|
package/dist/client.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import * as React from 'react';
|
1
|
+
import * as React$1 from 'react';
|
2
2
|
import React__default from 'react';
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
3
|
|
5
4
|
type Entry = string;
|
6
5
|
type Metadata = {
|
@@ -125,7 +124,7 @@ type ClientProviderProps = {
|
|
125
124
|
resetLocaleCookieName: string;
|
126
125
|
};
|
127
126
|
|
128
|
-
declare const GTContext: React.Context<GTContextType | undefined>;
|
127
|
+
declare const GTContext: React$1.Context<GTContextType | undefined>;
|
129
128
|
|
130
129
|
declare function useRuntimeTranslation({ projectId, devApiKey, locale, versionId, defaultLocale, runtimeUrl, renderSettings, setTranslations, runtimeTranslationEnabled, ...globalMetadata }: {
|
131
130
|
projectId?: string;
|
@@ -139,7 +138,7 @@ declare function useRuntimeTranslation({ projectId, devApiKey, locale, versionId
|
|
139
138
|
method: RenderMethod;
|
140
139
|
timeout?: number;
|
141
140
|
};
|
142
|
-
setTranslations: React.Dispatch<React.SetStateAction<any>>;
|
141
|
+
setTranslations: React$1.Dispatch<React$1.SetStateAction<any>>;
|
143
142
|
[key: string]: any;
|
144
143
|
}): {
|
145
144
|
registerContentForTranslation: TranslateContentCallback;
|
@@ -148,7 +147,7 @@ declare function useRuntimeTranslation({ projectId, devApiKey, locale, versionId
|
|
148
147
|
|
149
148
|
declare const renderVariable: RenderVariable;
|
150
149
|
|
151
|
-
declare function ClientProvider({ children, dictionary, initialTranslations, locale: _locale, _versionId, defaultLocale, translationRequired, dialectTranslationRequired, locales, renderSettings, projectId, devApiKey, runtimeUrl, runtimeTranslationEnabled, resetLocaleCookieName, localeCookieName, }: ClientProviderProps): React.JSX.Element;
|
150
|
+
declare function ClientProvider({ children, dictionary, initialTranslations, locale: _locale, _versionId, defaultLocale, translationRequired, dialectTranslationRequired, locales, renderSettings, projectId, devApiKey, runtimeUrl, runtimeTranslationEnabled, resetLocaleCookieName, localeCookieName, }: ClientProviderProps): React$1.JSX.Element;
|
152
151
|
|
153
152
|
/**
|
154
153
|
* The `<Branch>` component dynamically renders a specified branch of content or a fallback child component.
|
@@ -179,7 +178,7 @@ declare function Branch({ children, branch, ...branches }: {
|
|
179
178
|
name?: string;
|
180
179
|
branch?: string;
|
181
180
|
[key: string]: any;
|
182
|
-
}):
|
181
|
+
}): React.JSX.Element;
|
183
182
|
declare namespace Branch {
|
184
183
|
var gtTransformation: string;
|
185
184
|
}
|
@@ -216,7 +215,7 @@ declare function Plural({ children, n, locale, ...branches }: {
|
|
216
215
|
n?: number;
|
217
216
|
locale?: string;
|
218
217
|
[key: string]: any;
|
219
|
-
}):
|
218
|
+
}): React.JSX.Element;
|
220
219
|
declare namespace Plural {
|
221
220
|
var gtTransformation: string;
|
222
221
|
}
|
@@ -313,7 +312,7 @@ declare function T({ children, id, context, }: {
|
|
313
312
|
id?: string;
|
314
313
|
context?: string;
|
315
314
|
[key: string]: any;
|
316
|
-
}): React__default.JSX.Element |
|
315
|
+
}): React__default.JSX.Element | null;
|
317
316
|
declare namespace T {
|
318
317
|
var gtTransformation: string;
|
319
318
|
}
|
package/dist/client.esm.min.mjs
CHANGED
@@ -15,4 +15,4 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){
|
|
15
15
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
17
|
*/
|
18
|
-
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,A,E,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,H=c.words,D=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],A=m=O[3],E=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?y(f,b,m)+T[3]:g(f,b,m)+T[4],S=(S=_(S|=0,H[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?g(k,B,A)+j[0]:r<32?y(k,B,A)+j[1]:r<48?v(k,B,A)+j[2]:r<64?p(k,B,A)+j[3]:h(k,B,A)+j[4],S=(S=_(S|=0,D[r]))+E|0,w=E,E=A,A=_(B,10),B=k,k=S;S=O[1]+b+A|0,O[1]=O[2]+m+E|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),Ce.exports;var e}(),De(),function(){return ze||(ze=1,Re.exports=(c=X(),be(),De(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=o.finalize(v),o.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),Re.exports;var e,t,r,n,o,i,a,s,c}(),Le(),Ue(),Ke(),Je(),qe(),et(),function(){return tt?rt.exports:(tt=1,rt.exports=(t=X(),Ue(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return nt?ot.exports:(nt=1,ot.exports=(e=X(),Ue(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return it?at.exports:(it=1,at.exports=(e=X(),Ue(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return st?ct.exports:(st=1,ct.exports=(e=X(),Ue(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return lt||(lt=1,ut.exports=(e=X(),Ue(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),ut.exports;var e}(),function(){return dt?ft.exports:(dt=1,ft.exports=(e=X(),Ue(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return ht?pt.exports:(ht=1,pt.exports=(n=X(),Ue(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return vt||(vt=1,yt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),yt.exports;var e}(),bt(),function(){return mt||(mt=1,xt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),xt.exports;var e}(),function(){return wt||(wt=1,kt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),kt.exports;var e}(),function(){return Bt||(Bt=1,At.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),At.exports;var e}(),Ot())),K.exports),It=M(Rt),Ft=function(){return Ft=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ft.apply(this,arguments)};function Lt(e){return It.SHA256(e).toString(It.enc.Hex)}function Nt(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=Lt),t($(Ft(Ft(Ft({source:Ut(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var Mt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Ut(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Ut(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return Ft({key:e.key},e.variable&&{variable:e.variable})}return e};function Ut(e){return Array.isArray(e)?e.map(Mt):Mt(e)}function Vt(e,t,r,n,o,i,a,c){return s(((s,l={})=>{if(!s||"string"!=typeof s)return"";const u=h(s),d=(e,t)=>p(e,t,l.variables,l.variablesOptions),f=null==l?void 0:l.id,v=f&&(null==e?void 0:e[f]);let y="";n&&!v&&(y=Nt(Object.assign(Object.assign(Object.assign({source:u},(null==l?void 0:l.context)&&{context:l.context}),f&&{id:f}),{dataFormat:"JSX"})));let g=v?null==e?void 0:e[f]:null==e?void 0:e[y];return n&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?d(g.target,[t,r]):i?(a({source:u,targetLocale:t,metadata:Object.assign(Object.assign({},(null==l?void 0:l.context)&&{context:l.context}),{id:f,hash:y||""})}),"replace"===c.method?d(u,[r]):"skeleton"===c.method?"":o?d(u,[r]):""):d(u,[r]):d(u,[r])}),[e,t,r,n,i,a,o])}function $t(t,r,n,o,i,a,c,l,u){return s(((s,d={})=>{if(!t)return"";const f=function(t,r){let n=t,o=r.split(".");for(const t of o){if("object"!=typeof n||Array.isArray(n)||e.isValidElement(n))return;n=n[t]}return n}(t,s);if(!f)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(s)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(f))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(s)),"";const{entry:v,metadata:y}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(f);if(!v||"string"!=typeof v)return"";const g=h(v),_=(e,t)=>p(e,t,d.variables,d.variablesOptions);if(!i)return _(g,[o]);let b=Nt(Object.assign(Object.assign({source:g},(null==y?void 0:y.context)&&{context:y.context}),{id:s,dataFormat:"JSX"})),m=null==r?void 0:r[b];return"success"===(null==m?void 0:m.state)?_(m.target,[n,o]):"error"===(null==m?void 0:m.state)?_(g,[o]):c?(l({source:g,targetLocale:n,metadata:Object.assign(Object.assign({},(null==y?void 0:y.context)&&{context:y.context}),{id:s,hash:b})}),"replace"===u.method?_(g,[o]):"skeleton"===u.method?"":a?_(g,[o]):""):_(g,[o])}),[t,r,n,o,i,c,l,a])}const Kt="generaltranslation.locale";function Gt({children:e,dictionary:t,initialTranslations:r,locale:o,_versionId:a,defaultLocale:s,translationRequired:c,dialectTranslationRequired:l,locales:u=[],renderSettings:d,projectId:f,devApiKey:h,runtimeUrl:p,runtimeTranslationEnabled:y,resetLocaleCookieName:g,localeCookieName:b=Kt}){const[m,x]=n(h?null:r),[k,B]=n(o&&v(o,u)||"");i((()=>{const e=o&&v(o,u)||"";e!==k&&B(e)}),[o,u]),i((()=>{var e;const t=null===(e=document.cookie.split("; ").find((e=>e.startsWith(`${b}=`))))||void 0===e?void 0:e.split("=")[1];k&&t&&t!==k&&(document.cookie=`${b}=;path=/`)}),[k,b]);i((()=>{x((e=>Object.assign(Object.assign({},r),e)))}),[r]);const{registerContentForTranslation:A,registerJsxForTranslation:E}=S({locale:k,versionId:a,projectId:f,devApiKey:h,runtimeUrl:p,setTranslations:x,defaultLocale:s,renderSettings:d,runtimeTranslationEnabled:y}),O=Vt(m,k,s,c,l,y,A,d),T=$t(t,m,k,s,c,l,y,A,d),j=!(c&&!m)&&k;return _(w.Provider,{value:{registerContentForTranslation:A,registerJsxForTranslation:E,setLocale:e=>{e=v(e,u)||k||s,document.cookie=`${b}=${e};path=/`,document.cookie=`${g}=true;path=/`,B(e),window.location.reload()},_internalUseGTFunction:O,_internalUseDictFunction:T,locale:k,locales:u,defaultLocale:s,translations:m,translationRequired:c,dialectTranslationRequired:l,renderSettings:d,runtimeTranslationEnabled:y},children:j&&e})}function Wt(e){var{children:t,branch:r}=e,n=B(e,["children","branch"]);const o=(r=null==r?void 0:r.toString())&&void 0!==n[r]?n[r]:t;return _(b,{children:o})}function Jt(t,r=0){let n=r;const o=e=>{const{type:t,props:r}=e;n+=1;let o,i={id:n};try{o="function"==typeof t&&t.gtTransformation||""}catch(e){o=""}if(o){const t=o.split("-");if("translate"===t[0])throw new Error((e=>{var t;return`General Translation: Nested <T> components. The inner <T> has the id: "${null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.id}".`})(e));if("variable"===t[0]&&(i.variableType=(null==t?void 0:t[1])||"variable"),"plural"===t[0]){const e=Object.entries(r).reduce(((e,[t,r])=>(function(e){return C.includes(e)}(t)&&(e[t]=Jt(r,n)),e)),{});Object.keys(e).length&&(i.branches=e)}if("branch"===t[0]){const e=B(r,["children","branch"]),t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=Jt(r,n),e)),{});Object.keys(t).length&&(i.branches=t)}i.transformation=t[0]}return i};function i(t){return c(t)?function(t){const{props:r}=t;if(r["data-_gt"])throw new Error((e=>`General Translation already in use on child with props: ${e.props}. This usually occurs when you nest <T> components within the same file. Remove one of the <T> components to continue.`)(t));let n=o(t),i=Object.assign(Object.assign({},r),{"data-_gt":n});return r.children&&!n.variableType&&(i.children=a(r.children)),t.type===e.Fragment&&(i["data-_gt"].transformation="fragment"),e.cloneElement(t,i)}(t):t}function a(t){return Array.isArray(t)?e.Children.map(t,i):i(t)}return a(t)}Wt.gtTransformation="branch";const Xt={variable:"value",number:"n",datetime:"date",currency:"cost"};function Yt(e={},t){var r;if(e.name)return e.name;return`_gt_${Xt[t]||"value"}_${null===(r=e["data-_gt"])||void 0===r?void 0:r.id}`}const qt=e=>{var t;if(!e)return"";const{type:r,props:n}=e;if(r&&"function"==typeof r){if("displayName"in r&&"string"==typeof r.displayName&&r.displayName)return r.displayName;if("name"in r&&"string"==typeof r.name&&r.name)return r.name}return r&&"string"==typeof r?r:n.href?"a":(null===(t=n["data-_gt"])||void 0===t?void 0:t.id)?`C${n["data-_gt"].id}`:"function"},Zt=t=>{return r=t,e.isValidElement(r)?(e=>{const{type:t,props:r}=e;let n={type:qt(e),props:{}};if(r["data-_gt"]){const e=r["data-_gt"];let t=Object.assign({},e);const o=e.transformation;if("variable"===o){const t=e.variableType||"variable";return{variable:t,key:Yt(r,t),id:e.id}}if("plural"===o&&e.branches){n.type="Plural";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Qt(t)})),t=Object.assign(Object.assign({},t),{branches:r})}if("branch"===o&&e.branches){n.type="Branch";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Qt(t)})),t=Object.assign(Object.assign({},t),{branches:r})}n.props["data-_gt"]=t}return r.children&&(n.props.children=Qt(r.children)),n})(t):"number"==typeof t?t.toString():t;var r};function Qt(e){return Array.isArray(e)?e.map(Zt):Zt(e)}function er(e,t,r){let n="",o=null;return"number"==typeof e&&!o&&r&&(n=function(e,t,r){void 0===t&&(t=C),void 0===r&&(r=["en"]);var n=P.get("PluralRules",r).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(e,Object.keys(r),t)),n&&!o&&(o=r[n]),o}function tr(e){var t;const r=(null===(t=e["data-_gt"])||void 0===t?void 0:t.variableType)||"variable";return{variableName:Yt(e,r),variableType:r,variableValue:void 0!==e.value?e.value:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t=Object.assign(Object.assign({},e.currency&&{currency:e.currency}),e.options&&Object.assign({},e.options));return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function rr(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.key){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.id)return!0;if("string"==typeof t.variable)return!0}if(3===e.length&&"string"==typeof t.variable&&"number"==typeof t.id)return!0}return!1}function nr(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function or({children:t,defaultLocale:r=j,renderVariable:n}){const o=t=>e.isValidElement(t)?(t=>{const o=nr(t);if("variable"===(null==o?void 0:o.transformation)){const{variableType:e,variableValue:o,variableOptions:i}=tr(t.props);return n({variableType:e,variableValue:o,variableOptions:i,locales:[r]})}if("plural"===(null==o?void 0:o.transformation)){const e=o.branches||{};return i(er(t.props.n,[r],e)||t.props.children)}if("branch"===(null==o?void 0:o.transformation)){let e=t.props,{children:r,name:n,branch:a,"data-_gt":s}=e,c=B(e,["children","name","branch","data-_gt"]);return n=n||t.props["data-_gt-name"]||"branch",c=o.branches||{},i(void 0!==c[a]?c[a]:r)}return"fragment"===(null==o?void 0:o.transformation)?e.createElement(t.type,{key:t.props.key,children:i(t.props.children)}):t.props.children?e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0,children:i(t.props.children)})):e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0}))})(t):t,i=t=>Array.isArray(t)?e.Children.map(t,o):o(t);return i(t)}function ir({sourceElement:t,targetElement:r,locales:n=[j],renderVariable:o}){var i,a;const{props:s}=t,c=s["data-_gt"],l=null==c?void 0:c.transformation;if("plural"===l){const e=t.props.n;return ar({source:er(e,n,c.branches||{})||t.props.children,target:er(e,n,r.props["data-_gt"].branches||{})||r.props.children,locales:n,renderVariable:o})}if("branch"===l){let{name:e,branch:i,children:a}=s;e=e||t.props["data-_gt-name"]||"branch";return ar({source:(c.branches||{})[i]||a,target:(r.props["data-_gt"].branches||{})[i]||r.props.children,locales:n,renderVariable:o})}return"fragment"===l&&(null===(i=r.props)||void 0===i?void 0:i.children)?e.createElement(t.type,{key:t.props.key,children:ar({source:s.children,target:r.props.children,locales:n,renderVariable:o})}):(null==s?void 0:s.children)&&(null===(a=r.props)||void 0===a?void 0:a.children)?e.cloneElement(t,Object.assign(Object.assign({},s),{"data-_gt":void 0,children:ar({source:s.children,target:r.props.children,locales:n,renderVariable:o})})):or({children:t,defaultLocale:n[0],renderVariable:o})}function ar({source:t,target:r,locales:n=[j],renderVariable:o}){if(null==r&&t)return or({children:t,defaultLocale:n[0],renderVariable:o});if("string"==typeof r)return r;if(Array.isArray(r)&&!Array.isArray(t)&&t&&(t=[t]),Array.isArray(t)&&Array.isArray(r)){const i={},a={},s=t.filter((t=>{if(e.isValidElement(t)){const e=nr(t);if("variable"!==(null==e?void 0:e.transformation))return!0;{let{variableName:e,variableValue:r,variableOptions:n}=tr(t.props);i[e]=r,a[e]=n}}})),c=e=>s.find((t=>{var r,n;const o=nr(t);if(void 0!==(null==o?void 0:o.id)){return o.id===(null===(n=null===(r=null==e?void 0:e.props)||void 0===r?void 0:r["data-_gt"])||void 0===n?void 0:n.id)}return!1}))||s.shift();return r.map(((t,r)=>{if("string"==typeof t)return _(e.Fragment,{children:t},`string_${r}`);if(rr(t))return _(e.Fragment,{children:o({variableType:t.variable||"variable",variableValue:i[t.key],variableOptions:a[t.key],locales:n})},`var_${r}`);const s=c(t);return s?_(e.Fragment,{children:ir({sourceElement:s,targetElement:t,locales:n,renderVariable:o})},`element_${r}`):void 0}))}if(r&&"object"==typeof r&&!Array.isArray(r)){const i=rr(r)?"variable":"element";if(e.isValidElement(t)){if("element"===i)return ir({sourceElement:t,targetElement:r,locales:n,renderVariable:o});const e=nr(t);if("variable"===(null==e?void 0:e.transformation)){const{variableValue:e,variableOptions:r,variableType:i}=tr(t.props);return o({variableType:i,variableValue:e,variableOptions:r,locales:n})}}}return or({children:t,defaultLocale:n[0],renderVariable:o})}const sr={method:"default",timeout:"undefined"!=typeof process&&"development"!==process.env.NODE_ENV?8e3:12e3};const cr=e=>"string"==typeof e||Array.isArray(e),lr=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function ur(e,t){const r=Object.assign(Object.assign({},Object.fromEntries(Object.entries(e).filter((([,e])=>cr(e))))),Object.fromEntries(Object.entries(t).filter((([,e])=>cr(e))))),n=Object.entries(e).filter((([,e])=>lr(e))).map((([e])=>e)),o=Object.entries(t).filter((([,e])=>lr(e))).map((([e])=>e)),i=new Set([...n,...o]);for(const n of i)r[n]=ur(e[n]||{},t[n]||{});return r}function dr(e){var{children:t,n:n,locale:o}=e,i=B(e,["children","n","locale"]);const a=r(w);let s;a&&(o||(o=a.locale),s||(s=a.defaultLocale));const c=[...o?[o]:[],s||j];if("number"!=typeof n)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(t));const l=er(n,c,i)||t;return _(b,{children:l})}function fr(){const{_internalUseGTFunction:e}=k("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}}function hr(){return k("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function pr(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=k(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}}function vr(){return k("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}function yr({children:e,id:t,context:r}){if(!e)return;const{translations:n,translationRequired:o,runtimeTranslationEnabled:s,dialectTranslationRequired:c,registerJsxForTranslation:l,renderSettings:u,locale:d,defaultLocale:f}=k("<T> used on the client-side outside of <GTProvider>"),h=a((()=>Jt(e)),[e]),p=t&&(null==n?void 0:n[t]),[v,y]=a((()=>{if(!o||p)return[void 0,""];const e=Qt(h);return[e,Nt(Object.assign(Object.assign(Object.assign({source:e},r&&{context:r}),t&&{id:t}),{dataFormat:"JSX"}))]}),[h,r,t,o,p]),g=p?null==n?void 0:n[t]:null==n?void 0:n[y];i((()=>{s&&o&&n&&d&&!g&&l({source:v,targetLocale:d,metadata:{id:t,hash:y,context:r}})}),[s,n,g,o,t,y,r,d,e]);const m=()=>or({children:h,defaultLocale:f,renderVariable:I});if(!o||n&&!g&&!s||"error"===(null==g?void 0:g.state))return _(b,{children:m()});if(!g||"loading"===(null==g?void 0:g.state)){let e;return e="skeleton"===u.method?"":"replace"===u.method||c?m():"",_(b,{children:e})}return _(b,{children:(x=g.target,ar({source:h,target:x,locales:[d,f],renderVariable:I}))});var x}function gr(){return k("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function _r(){const{setLocale:e}=k("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function br(e){const t=vr(),r=gr(),n=_r(),o=a((()=>{if(!r||0===r.length)return[];const e=r.sort(((e,t)=>(new Intl.Collator).compare(l(e).nativeNameWithRegionCode,l(t).nativeNameWithRegionCode)));return e}),[r]);return{locale:t,locales:e||o,setLocale:n}}function mr(e){var{locales:t}=e,r=B(e,["locales"]);const{locale:n,locales:o,setLocale:i}=br(t||void 0),a=e=>{return(t=l(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return o&&0!==o.length&&i?m("select",Object.assign({},r,{value:n||"",onChange:e=>i(e.target.value),children:[!n&&_("option",{value:""}),o.map((e=>_("option",{value:e,suppressHydrationWarning:!0,children:a(e)},e)))]})):null}function xr({locale:e="",defaultLocale:t=j,locales:r=[],localeCookieName:o=Kt,ssr:a=!0}){const[s,c]=n(a?e&&v(e,r)||"":wr({_locale:e,locale:e,locales:r,defaultLocale:t,localeCookieName:o})),[l,u]=function({locale:e,locales:t,defaultLocale:r,localeCookieName:n,_setLocale:o}){const i=n=>{const i=v(n,t)||e||r;return i!==n&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(i,n)),o(i),i},a=e=>{const t=i(e);"undefined"!=typeof document&&(document.cookie=`${n}=${t};path=/`)};return[a,i]}({locale:s,locales:r,defaultLocale:t,localeCookieName:o,_setLocale:c});return i((()=>{const n=wr({_locale:e,locale:s,locales:r,defaultLocale:t,localeCookieName:o});u(n)}),[e,s,r,t,o]),[s,l]}function wr({_locale:e,locale:t,locales:r,defaultLocale:n,localeCookieName:o}){var i;if(e&&e===t&&v(e,r)===t)return e;const a=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[n],s="undefined"!=typeof document?null===(i=document.cookie.split("; ").find((e=>e.startsWith(`${o}=`))))||void 0===i?void 0:i.split("=")[1]:void 0,c=v([...e?[e]:[],...s?[s]:[],...a],r)||n;return s&&s!==c&&"undefined"!=typeof document&&(document.cookie=`${o}=${c};path=/`),c}function kr(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function Br(e,t){return A(this,void 0,void 0,(function*(){var r;let n;try{n=yield t(e)}catch(e){}const o=null===(r=l(e))||void 0===r?void 0:r.languageCode;if(o&&o!==e)try{n=yield t(o)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return n}))}function Ar(e){var{children:t,projectId:r="",devApiKey:o,dictionary:s,locales:c=[],defaultLocale:u=j,locale:d,cacheUrl:f=O,runtimeUrl:h=T,renderSettings:p=sr,loadDictionary:v,loadTranslations:b,fallback:m,ssr:k=kr(),localeCookieName:E=Kt,translations:C=null,_versionId:P}=e,H=B(e,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:D,devApiKey:z}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(r,o);c=a((()=>Array.from(new Set([u,...c]))),[u,c]);const[R,I]=xr({defaultLocale:u,locales:c,locale:d,ssr:k,localeCookieName:E}),F=a((()=>!!(D&&h&&z&&"development"===process.env.NODE_ENV)),[D,h,z]),L=a((()=>(b?"custom":f&&D&&"default")||"disabled"),[b]),[N,M]=n(s);i((()=>{if(!v)return;let e=!0;return(()=>{A(this,void 0,void 0,(function*(){const t=ur((yield Br(u,v))||{},(yield Br(R,v))||{});e&&M(t||{})}))})(),()=>{e=!1}}),[v,R,u]),a((()=>{if("production"===process.env.NODE_ENV&&z){if(!k)throw new Error("gt-react Error: Production environments cannot include an api key.");if(z.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===L||!f&&!h||D||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),D&&h&&"custom"!==L&&!z&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),h===T||f===O&&"default"===L){const e=(c||c).filter((e=>!x(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=l(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,z,L,f,h,D,c]);const[U,V]=a((()=>{const e=y(u,R,c);return[e,e&&g(u,R)]}),[u,R,c]),[$,K]=n(C||U&&"disabled"!==L?null:{});i((()=>K(U&&"disabled"!==L?null:{})),[R,L]);const{registerContentForTranslation:G,registerJsxForTranslation:W}=S(Object.assign({locale:R,versionId:P,projectId:D,runtimeTranslationEnabled:F,defaultLocale:u,devApiKey:z,runtimeUrl:h,renderSettings:p,setTranslations:K},H));i((()=>{if($||!U||"disabled"===L)return;let e=!0;return(()=>{A(this,void 0,void 0,(function*(){let t;switch(L){case"custom":if(b)try{t=yield b(R)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(R),e)}break;case"default":try{t=yield function(e){return A(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:f,projectId:D,locale:R,versionId:P})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&K(t)}))})(),()=>{e=!1}}),[$,U,L,f,D,R,P]);const J=Vt($,R,u,U,V,F,G,p),X=$t(N,$,R,u,U,V,F,G,p),Y=!(U&&!$||!R);return _(w.Provider,{value:{registerContentForTranslation:G,registerJsxForTranslation:W,_internalUseGTFunction:J,_internalUseDictFunction:X,runtimeTranslationEnabled:F,locale:R,locales:c,setLocale:I,defaultLocale:u,translations:$,translationRequired:U,dialectTranslationRequired:V,projectId:D,renderSettings:p},children:Y?t:m})}dr.gtTransformation="plural",yr.gtTransformation="translate-client";export{Wt as Branch,Gt as ClientProvider,z as Currency,R as DateTime,w as GTContext,Ar as GTProvider,mr as LocaleSelector,H as Num,dr as Plural,yr as T,D as Var,I as renderVariable,hr as useDefaultLocale,pr as useDict,fr as useGT,vr as useLocale,br as useLocaleSelector,gr as useLocales,S as useRuntimeTranslation,_r as useSetLocale};
|
18
|
+
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,A,E,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,H=c.words,D=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],A=m=O[3],E=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?y(f,b,m)+T[3]:g(f,b,m)+T[4],S=(S=_(S|=0,H[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?g(k,B,A)+j[0]:r<32?y(k,B,A)+j[1]:r<48?v(k,B,A)+j[2]:r<64?p(k,B,A)+j[3]:h(k,B,A)+j[4],S=(S=_(S|=0,D[r]))+E|0,w=E,E=A,A=_(B,10),B=k,k=S;S=O[1]+b+A|0,O[1]=O[2]+m+E|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),Ce.exports;var e}(),De(),function(){return ze||(ze=1,Re.exports=(c=X(),be(),De(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=o.finalize(v),o.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),Re.exports;var e,t,r,n,o,i,a,s,c}(),Le(),Ue(),Ke(),Je(),qe(),et(),function(){return tt?rt.exports:(tt=1,rt.exports=(t=X(),Ue(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return nt?ot.exports:(nt=1,ot.exports=(e=X(),Ue(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return it?at.exports:(it=1,at.exports=(e=X(),Ue(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return st?ct.exports:(st=1,ct.exports=(e=X(),Ue(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return lt||(lt=1,ut.exports=(e=X(),Ue(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),ut.exports;var e}(),function(){return dt?ft.exports:(dt=1,ft.exports=(e=X(),Ue(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return ht?pt.exports:(ht=1,pt.exports=(n=X(),Ue(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return vt||(vt=1,yt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),yt.exports;var e}(),bt(),function(){return mt||(mt=1,xt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),xt.exports;var e}(),function(){return wt||(wt=1,kt.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),kt.exports;var e}(),function(){return Bt||(Bt=1,At.exports=(e=X(),se(),he(),Le(),Ue(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),At.exports;var e}(),Ot())),K.exports),It=M(Rt),Ft=function(){return Ft=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ft.apply(this,arguments)};function Lt(e){return It.SHA256(e).toString(It.enc.Hex)}function Nt(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=Lt),t($(Ft(Ft(Ft({source:Ut(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var Mt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Ut(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Ut(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return Ft({key:e.key},e.variable&&{variable:e.variable})}return e};function Ut(e){return Array.isArray(e)?e.map(Mt):Mt(e)}function Vt(e,t,r,n,o,i,a,c){return s(((s,l={})=>{if(!s||"string"!=typeof s)return"";const u=h(s),d=(e,t)=>p(e,t,l.variables,l.variablesOptions),f=null==l?void 0:l.id,v=f&&(null==e?void 0:e[f]);let y="";n&&!v&&(y=Nt(Object.assign(Object.assign(Object.assign({source:u},(null==l?void 0:l.context)&&{context:l.context}),f&&{id:f}),{dataFormat:"JSX"})));let g=v?null==e?void 0:e[f]:null==e?void 0:e[y];return n&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?d(g.target,[t,r]):i?(a({source:u,targetLocale:t,metadata:Object.assign(Object.assign({},(null==l?void 0:l.context)&&{context:l.context}),{id:f,hash:y||""})}),"replace"===c.method?d(u,[r]):"skeleton"===c.method?"":o?d(u,[r]):""):d(u,[r]):d(u,[r])}),[e,t,r,n,i,a,o])}function $t(t,r,n,o,i,a,c,l,u){return s(((s,d={})=>{if(!t)return"";const f=function(t,r){let n=t,o=r.split(".");for(const t of o){if("object"!=typeof n||Array.isArray(n)||e.isValidElement(n))return;n=n[t]}return n}(t,s);if(!f)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(s)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(f))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(s)),"";const{entry:v,metadata:y}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(f);if(!v||"string"!=typeof v)return"";const g=h(v),_=(e,t)=>p(e,t,d.variables,d.variablesOptions);if(!i)return _(g,[o]);let b=Nt(Object.assign(Object.assign({source:g},(null==y?void 0:y.context)&&{context:y.context}),{id:s,dataFormat:"JSX"})),m=null==r?void 0:r[b];return"success"===(null==m?void 0:m.state)?_(m.target,[n,o]):"error"===(null==m?void 0:m.state)?_(g,[o]):c?(l({source:g,targetLocale:n,metadata:Object.assign(Object.assign({},(null==y?void 0:y.context)&&{context:y.context}),{id:s,hash:b})}),"replace"===u.method?_(g,[o]):"skeleton"===u.method?"":a?_(g,[o]):""):_(g,[o])}),[t,r,n,o,i,c,l,a])}const Kt="generaltranslation.locale";function Gt({children:e,dictionary:t,initialTranslations:r,locale:o,_versionId:a,defaultLocale:s,translationRequired:c,dialectTranslationRequired:l,locales:u=[],renderSettings:d,projectId:f,devApiKey:h,runtimeUrl:p,runtimeTranslationEnabled:y,resetLocaleCookieName:g,localeCookieName:b=Kt}){const[m,x]=n(h?null:r),[k,B]=n(o&&v(o,u)||"");i((()=>{const e=o&&v(o,u)||"";e!==k&&B(e)}),[o,u]),i((()=>{var e;const t=null===(e=document.cookie.split("; ").find((e=>e.startsWith(`${b}=`))))||void 0===e?void 0:e.split("=")[1];k&&t&&t!==k&&(document.cookie=`${b}=;path=/`)}),[k,b]);i((()=>{x((e=>Object.assign(Object.assign({},r),e)))}),[r]);const{registerContentForTranslation:A,registerJsxForTranslation:E}=S({locale:k,versionId:a,projectId:f,devApiKey:h,runtimeUrl:p,setTranslations:x,defaultLocale:s,renderSettings:d,runtimeTranslationEnabled:y}),O=Vt(m,k,s,c,l,y,A,d),T=$t(t,m,k,s,c,l,y,A,d),j=!(c&&!m)&&k;return _(w.Provider,{value:{registerContentForTranslation:A,registerJsxForTranslation:E,setLocale:e=>{e=v(e,u)||k||s,document.cookie=`${b}=${e};path=/`,document.cookie=`${g}=true;path=/`,B(e),window.location.reload()},_internalUseGTFunction:O,_internalUseDictFunction:T,locale:k,locales:u,defaultLocale:s,translations:m,translationRequired:c,dialectTranslationRequired:l,renderSettings:d,runtimeTranslationEnabled:y},children:j&&e})}function Wt(e){var{children:t,branch:r}=e,n=B(e,["children","branch"]);const o=(r=null==r?void 0:r.toString())&&void 0!==n[r]?n[r]:t;return _(b,{children:o})}function Jt(t,r=0){let n=r;const o=e=>{const{type:t,props:r}=e;n+=1;let o,i={id:n};try{o="function"==typeof t&&t.gtTransformation||""}catch(e){o=""}if(o){const t=o.split("-");if("translate"===t[0])throw new Error((e=>{var t;return`General Translation: Nested <T> components. The inner <T> has the id: "${null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.id}".`})(e));if("variable"===t[0]&&(i.variableType=(null==t?void 0:t[1])||"variable"),"plural"===t[0]){const e=Object.entries(r).reduce(((e,[t,r])=>(function(e){return C.includes(e)}(t)&&(e[t]=Jt(r,n)),e)),{});Object.keys(e).length&&(i.branches=e)}if("branch"===t[0]){const e=B(r,["children","branch"]),t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=Jt(r,n),e)),{});Object.keys(t).length&&(i.branches=t)}i.transformation=t[0]}return i};function i(t){return c(t)?function(t){const{props:r}=t;if(r["data-_gt"])throw new Error((e=>`General Translation already in use on child with props: ${e.props}. This usually occurs when you nest <T> components within the same file. Remove one of the <T> components to continue.`)(t));let n=o(t),i=Object.assign(Object.assign({},r),{"data-_gt":n});return r.children&&!n.variableType&&(i.children=a(r.children)),t.type===e.Fragment&&(i["data-_gt"].transformation="fragment"),e.cloneElement(t,i)}(t):t}function a(t){return Array.isArray(t)?e.Children.map(t,i):i(t)}return a(t)}Wt.gtTransformation="branch";const Xt={variable:"value",number:"n",datetime:"date",currency:"cost"};function Yt(e={},t){var r;if(e.name)return e.name;return`_gt_${Xt[t]||"value"}_${null===(r=e["data-_gt"])||void 0===r?void 0:r.id}`}const qt=e=>{var t;if(!e)return"";const{type:r,props:n}=e;if(r&&"function"==typeof r){if("displayName"in r&&"string"==typeof r.displayName&&r.displayName)return r.displayName;if("name"in r&&"string"==typeof r.name&&r.name)return r.name}return r&&"string"==typeof r?r:n.href?"a":(null===(t=n["data-_gt"])||void 0===t?void 0:t.id)?`C${n["data-_gt"].id}`:"function"},Zt=t=>{return r=t,e.isValidElement(r)?(e=>{const{type:t,props:r}=e;let n={type:qt(e),props:{}};if(r["data-_gt"]){const e=r["data-_gt"];let t=Object.assign({},e);const o=e.transformation;if("variable"===o){const t=e.variableType||"variable";return{variable:t,key:Yt(r,t),id:e.id}}if("plural"===o&&e.branches){n.type="Plural";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Qt(t)})),t=Object.assign(Object.assign({},t),{branches:r})}if("branch"===o&&e.branches){n.type="Branch";let r={};Object.entries(e.branches).forEach((([e,t])=>{r[e]=Qt(t)})),t=Object.assign(Object.assign({},t),{branches:r})}n.props["data-_gt"]=t}return r.children&&(n.props.children=Qt(r.children)),n})(t):"number"==typeof t?t.toString():t;var r};function Qt(e){return Array.isArray(e)?e.map(Zt):Zt(e)}function er(e,t,r){let n="",o=null;return"number"==typeof e&&!o&&r&&(n=function(e,t,r){void 0===t&&(t=C),void 0===r&&(r=["en"]);var n=P.get("PluralRules",r).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(e,Object.keys(r),t)),n&&!o&&(o=r[n]),o}function tr(e){var t;const r=(null===(t=e["data-_gt"])||void 0===t?void 0:t.variableType)||"variable";return{variableName:Yt(e,r),variableType:r,variableValue:void 0!==e.value?e.value:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t=Object.assign(Object.assign({},e.currency&&{currency:e.currency}),e.options&&Object.assign({},e.options));return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function rr(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.key){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.id)return!0;if("string"==typeof t.variable)return!0}if(3===e.length&&"string"==typeof t.variable&&"number"==typeof t.id)return!0}return!1}function nr(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function or({children:t,defaultLocale:r=j,renderVariable:n}){const o=t=>e.isValidElement(t)?(t=>{const o=nr(t);if("variable"===(null==o?void 0:o.transformation)){const{variableType:e,variableValue:o,variableOptions:i}=tr(t.props);return n({variableType:e,variableValue:o,variableOptions:i,locales:[r]})}if("plural"===(null==o?void 0:o.transformation)){const e=o.branches||{};return i(er(t.props.n,[r],e)||t.props.children)}if("branch"===(null==o?void 0:o.transformation)){let e=t.props,{children:r,name:n,branch:a,"data-_gt":s}=e,c=B(e,["children","name","branch","data-_gt"]);return n=n||t.props["data-_gt-name"]||"branch",c=o.branches||{},i(void 0!==c[a]?c[a]:r)}return"fragment"===(null==o?void 0:o.transformation)?e.createElement(t.type,{key:t.props.key,children:i(t.props.children)}):t.props.children?e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0,children:i(t.props.children)})):e.cloneElement(t,Object.assign(Object.assign({},t.props),{"data-_gt":void 0}))})(t):t,i=t=>Array.isArray(t)?e.Children.map(t,o):o(t);return i(t)}function ir({sourceElement:t,targetElement:r,locales:n=[j],renderVariable:o}){var i,a;const{props:s}=t,c=s["data-_gt"],l=null==c?void 0:c.transformation;if("plural"===l){const e=t.props.n;return ar({source:er(e,n,c.branches||{})||t.props.children,target:er(e,n,r.props["data-_gt"].branches||{})||r.props.children,locales:n,renderVariable:o})}if("branch"===l){let{name:e,branch:i,children:a}=s;e=e||t.props["data-_gt-name"]||"branch";return ar({source:(c.branches||{})[i]||a,target:(r.props["data-_gt"].branches||{})[i]||r.props.children,locales:n,renderVariable:o})}return"fragment"===l&&(null===(i=r.props)||void 0===i?void 0:i.children)?e.createElement(t.type,{key:t.props.key,children:ar({source:s.children,target:r.props.children,locales:n,renderVariable:o})}):(null==s?void 0:s.children)&&(null===(a=r.props)||void 0===a?void 0:a.children)?e.cloneElement(t,Object.assign(Object.assign({},s),{"data-_gt":void 0,children:ar({source:s.children,target:r.props.children,locales:n,renderVariable:o})})):or({children:t,defaultLocale:n[0],renderVariable:o})}function ar({source:t,target:r,locales:n=[j],renderVariable:o}){if(null==r&&t)return or({children:t,defaultLocale:n[0],renderVariable:o});if("string"==typeof r)return r;if(Array.isArray(r)&&!Array.isArray(t)&&t&&(t=[t]),Array.isArray(t)&&Array.isArray(r)){const i={},a={},s=t.filter((t=>{if(e.isValidElement(t)){const e=nr(t);if("variable"!==(null==e?void 0:e.transformation))return!0;{let{variableName:e,variableValue:r,variableOptions:n}=tr(t.props);i[e]=r,a[e]=n}}})),c=e=>s.find((t=>{var r,n;const o=nr(t);if(void 0!==(null==o?void 0:o.id)){return o.id===(null===(n=null===(r=null==e?void 0:e.props)||void 0===r?void 0:r["data-_gt"])||void 0===n?void 0:n.id)}return!1}))||s.shift();return r.map(((t,r)=>{if("string"==typeof t)return _(e.Fragment,{children:t},`string_${r}`);if(rr(t))return _(e.Fragment,{children:o({variableType:t.variable||"variable",variableValue:i[t.key],variableOptions:a[t.key],locales:n})},`var_${r}`);const s=c(t);return s?_(e.Fragment,{children:ir({sourceElement:s,targetElement:t,locales:n,renderVariable:o})},`element_${r}`):void 0}))}if(r&&"object"==typeof r&&!Array.isArray(r)){const i=rr(r)?"variable":"element";if(e.isValidElement(t)){if("element"===i)return ir({sourceElement:t,targetElement:r,locales:n,renderVariable:o});const e=nr(t);if("variable"===(null==e?void 0:e.transformation)){const{variableValue:e,variableOptions:r,variableType:i}=tr(t.props);return o({variableType:i,variableValue:e,variableOptions:r,locales:n})}}}return or({children:t,defaultLocale:n[0],renderVariable:o})}const sr={method:"default",timeout:"undefined"!=typeof process&&"development"!==process.env.NODE_ENV?8e3:12e3};const cr=e=>"string"==typeof e||Array.isArray(e),lr=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function ur(e,t){const r=Object.assign(Object.assign({},Object.fromEntries(Object.entries(e).filter((([,e])=>cr(e))))),Object.fromEntries(Object.entries(t).filter((([,e])=>cr(e))))),n=Object.entries(e).filter((([,e])=>lr(e))).map((([e])=>e)),o=Object.entries(t).filter((([,e])=>lr(e))).map((([e])=>e)),i=new Set([...n,...o]);for(const n of i)r[n]=ur(e[n]||{},t[n]||{});return r}function dr(e){var{children:t,n:n,locale:o}=e,i=B(e,["children","n","locale"]);const a=r(w);let s;a&&(o||(o=a.locale),s||(s=a.defaultLocale));const c=[...o?[o]:[],s||j];if("number"!=typeof n)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(t));const l=er(n,c,i)||t;return _(b,{children:l})}function fr(){const{_internalUseGTFunction:e}=k("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}}function hr(){return k("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function pr(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=k(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}}function vr(){return k("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}function yr({children:e,id:t,context:r}){if(!e)return null;const{translations:n,translationRequired:o,runtimeTranslationEnabled:s,dialectTranslationRequired:c,registerJsxForTranslation:l,renderSettings:u,locale:d,defaultLocale:f}=k("<T> used on the client-side outside of <GTProvider>"),h=a((()=>Jt(e)),[e]),p=t&&(null==n?void 0:n[t]),[v,y]=a((()=>{if(!o||p)return[void 0,""];const e=Qt(h);return[e,Nt(Object.assign(Object.assign(Object.assign({source:e},r&&{context:r}),t&&{id:t}),{dataFormat:"JSX"}))]}),[h,r,t,o,p]),g=p?null==n?void 0:n[t]:null==n?void 0:n[y];i((()=>{s&&o&&n&&d&&!g&&l({source:v,targetLocale:d,metadata:{id:t,hash:y,context:r}})}),[s,n,g,o,t,y,r,d,e]);const m=()=>or({children:h,defaultLocale:f,renderVariable:I});if(!o||n&&!g&&!s||"error"===(null==g?void 0:g.state))return _(b,{children:m()});if(!g||"loading"===(null==g?void 0:g.state)){let e;return e="skeleton"===u.method?"":"replace"===u.method||c?m():"",_(b,{children:e})}return _(b,{children:(x=g.target,ar({source:h,target:x,locales:[d,f],renderVariable:I}))});var x}function gr(){return k("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function _r(){const{setLocale:e}=k("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function br(e){const t=vr(),r=gr(),n=_r(),o=a((()=>{if(!r||0===r.length)return[];const e=r.sort(((e,t)=>(new Intl.Collator).compare(l(e).nativeNameWithRegionCode,l(t).nativeNameWithRegionCode)));return e}),[r]);return{locale:t,locales:e||o,setLocale:n}}function mr(e){var{locales:t}=e,r=B(e,["locales"]);const{locale:n,locales:o,setLocale:i}=br(t||void 0),a=e=>{return(t=l(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return o&&0!==o.length&&i?m("select",Object.assign({},r,{value:n||"",onChange:e=>i(e.target.value),children:[!n&&_("option",{value:""}),o.map((e=>_("option",{value:e,suppressHydrationWarning:!0,children:a(e)},e)))]})):null}function xr({locale:e="",defaultLocale:t=j,locales:r=[],localeCookieName:o=Kt,ssr:a=!0}){const[s,c]=n(a?e&&v(e,r)||"":wr({_locale:e,locale:e,locales:r,defaultLocale:t,localeCookieName:o})),[l,u]=function({locale:e,locales:t,defaultLocale:r,localeCookieName:n,_setLocale:o}){const i=n=>{const i=v(n,t)||e||r;return i!==n&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(i,n)),o(i),i},a=e=>{const t=i(e);"undefined"!=typeof document&&(document.cookie=`${n}=${t};path=/`)};return[a,i]}({locale:s,locales:r,defaultLocale:t,localeCookieName:o,_setLocale:c});return i((()=>{const n=wr({_locale:e,locale:s,locales:r,defaultLocale:t,localeCookieName:o});u(n)}),[e,s,r,t,o]),[s,l]}function wr({_locale:e,locale:t,locales:r,defaultLocale:n,localeCookieName:o}){var i;if(e&&e===t&&v(e,r)===t)return e;const a=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[n],s="undefined"!=typeof document?null===(i=document.cookie.split("; ").find((e=>e.startsWith(`${o}=`))))||void 0===i?void 0:i.split("=")[1]:void 0,c=v([...e?[e]:[],...s?[s]:[],...a],r)||n;return s&&s!==c&&"undefined"!=typeof document&&(document.cookie=`${o}=${c};path=/`),c}function kr(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function Br(e,t){return A(this,void 0,void 0,(function*(){var r;let n;try{n=yield t(e)}catch(e){}const o=null===(r=l(e))||void 0===r?void 0:r.languageCode;if(o&&o!==e)try{n=yield t(o)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return n}))}function Ar(e){var{children:t,projectId:r="",devApiKey:o,dictionary:s,locales:c=[],defaultLocale:u=j,locale:d,cacheUrl:f=O,runtimeUrl:h=T,renderSettings:p=sr,loadDictionary:v,loadTranslations:b,fallback:m,ssr:k=kr(),localeCookieName:E=Kt,translations:C=null,_versionId:P}=e,H=B(e,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:D,devApiKey:z}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(r,o);c=a((()=>Array.from(new Set([u,...c]))),[u,c]);const[R,I]=xr({defaultLocale:u,locales:c,locale:d,ssr:k,localeCookieName:E}),F=a((()=>!!(D&&h&&z&&"development"===process.env.NODE_ENV)),[D,h,z]),L=a((()=>(b?"custom":f&&D&&"default")||"disabled"),[b]),[N,M]=n(s);i((()=>{if(!v)return;let e=!0;return(()=>{A(this,void 0,void 0,(function*(){const t=ur((yield Br(u,v))||{},(yield Br(R,v))||{});e&&M(t||{})}))})(),()=>{e=!1}}),[v,R,u]),a((()=>{if("production"===process.env.NODE_ENV&&z){if(!k)throw new Error("gt-react Error: Production environments cannot include an api key.");if(z.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===L||!f&&!h||D||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),D&&h&&"custom"!==L&&!z&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),h===T||f===O&&"default"===L){const e=(c||c).filter((e=>!x(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=l(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,z,L,f,h,D,c]);const[U,V]=a((()=>{const e=y(u,R,c);return[e,e&&g(u,R)]}),[u,R,c]),[$,K]=n(C||U&&"disabled"!==L?null:{});i((()=>K(U&&"disabled"!==L?null:{})),[R,L]);const{registerContentForTranslation:G,registerJsxForTranslation:W}=S(Object.assign({locale:R,versionId:P,projectId:D,runtimeTranslationEnabled:F,defaultLocale:u,devApiKey:z,runtimeUrl:h,renderSettings:p,setTranslations:K},H));i((()=>{if($||!U||"disabled"===L)return;let e=!0;return(()=>{A(this,void 0,void 0,(function*(){let t;switch(L){case"custom":if(b)try{t=yield b(R)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(R),e)}break;case"default":try{t=yield function(e){return A(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:f,projectId:D,locale:R,versionId:P})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&K(t)}))})(),()=>{e=!1}}),[$,U,L,f,D,R,P]);const J=Vt($,R,u,U,V,F,G,p),X=$t(N,$,R,u,U,V,F,G,p),Y=!(U&&!$||!R);return _(w.Provider,{value:{registerContentForTranslation:G,registerJsxForTranslation:W,_internalUseGTFunction:J,_internalUseDictFunction:X,runtimeTranslationEnabled:F,locale:R,locales:c,setLocale:I,defaultLocale:u,translations:$,translationRequired:U,dialectTranslationRequired:V,projectId:D,renderSettings:p},children:Y?t:m})}dr.gtTransformation="plural",yr.gtTransformation="translate-client";export{Wt as Branch,Gt as ClientProvider,z as Currency,R as DateTime,w as GTContext,Ar as GTProvider,mr as LocaleSelector,H as Num,dr as Plural,yr as T,D as Var,I as renderVariable,hr as useDefaultLocale,pr as useDict,fr as useGT,vr as useLocale,br as useLocaleSelector,gr as useLocales,S as useRuntimeTranslation,_r as useSetLocale};
|
package/dist/index.cjs.min.cjs
CHANGED
@@ -15,4 +15,4 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){
|
|
15
15
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
17
|
*/
|
18
|
-
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,E,A,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,D=c.words,H=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],E=m=O[3],A=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?g(f,b,m)+T[3]:y(f,b,m)+T[4],S=(S=_(S|=0,D[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?y(k,B,E)+j[0]:r<32?g(k,B,E)+j[1]:r<48?v(k,B,E)+j[2]:r<64?p(k,B,E)+j[3]:h(k,B,E)+j[4],S=(S=_(S|=0,H[r]))+A|0,w=A,A=E,E=_(B,10),B=k,k=S;S=O[1]+b+E|0,O[1]=O[2]+m+A|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),je.exports;var e}(),De(),function(){return He||(He=1,ze.exports=(c=J(),_e(),De(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,g=1;g<d;g++){v=o.finalize(v),o.reset();for(var y=v.words,_=0;_<p;_++)h[_]^=y[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),ze.exports;var e,t,r,n,o,i,a,s,c}(),Le(),Ne(),Ge(),We(),Ye(),Qe(),function(){return et?tt.exports:(et=1,tt.exports=(t=J(),Ne(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return rt?nt.exports:(rt=1,nt.exports=(e=J(),Ne(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return ot?it.exports:(ot=1,it.exports=(e=J(),Ne(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return at?st.exports:(at=1,st.exports=(e=J(),Ne(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return ct||(ct=1,lt.exports=(e=J(),Ne(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),lt.exports;var e}(),function(){return ut?dt.exports:(ut=1,dt.exports=(e=J(),Ne(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return ft?ht.exports:(ft=1,ht.exports=(n=J(),Ne(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return pt||(pt=1,vt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],g=e[v],y=e[g],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*g^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[y^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],g=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],y=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=g,d=y,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],y=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=g,e[t+2]=y,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),vt.exports;var e}(),_t(),function(){return bt||(bt=1,mt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),mt.exports;var e}(),function(){return xt||(xt=1,wt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),wt.exports;var e}(),function(){return kt||(kt=1,Bt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Bt.exports;var e}(),St())),G.exports),Rt=M(zt),It=function(){return It=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},It.apply(this,arguments)};function Lt(e){return Rt.SHA256(e).toString(Rt.enc.Hex)}function Ft(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=Lt),t(U(It(It(It({source:Nt(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var Mt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Nt(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Nt(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return It({key:e.key},e.variable&&{variable:e.variable})}return e};function Nt(e){return Array.isArray(e)?e.map(Mt):Mt(e)}function Vt({children:r,id:n,context:o}){if(!r)return;const{translations:i,translationRequired:a,runtimeTranslationEnabled:s,dialectTranslationRequired:c,registerJsxForTranslation:l,renderSettings:u,locale:d,defaultLocale:f}=C("<T> used on the client-side outside of <GTProvider>"),h=t.useMemo((()=>_(r)),[r]),p=n&&(null==i?void 0:i[n]),[v,y]=t.useMemo((()=>{if(!a||p)return[void 0,""];const e=x(h);return[e,Ft(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[h,o,n,a,p]),b=p?null==i?void 0:i[n]:null==i?void 0:i[y];t.useEffect((()=>{s&&a&&i&&d&&!b&&l({source:v,targetLocale:d,metadata:{id:n,hash:y,context:o}})}),[s,i,b,a,n,y,o,d,r]);const m=()=>g({children:h,defaultLocale:f,renderVariable:R});if(!a||i&&!b&&!s||"error"===(null==b?void 0:b.state))return e.jsx(e.Fragment,{children:m()});if(!b||"loading"===(null==b?void 0:b.state)){let t;return t="skeleton"===u.method?"":"replace"===u.method||c?m():"",e.jsx(e.Fragment,{children:t})}return e.jsx(e.Fragment,{children:(w=b.target,B({source:h,target:w,locales:[d,f],renderVariable:R}))});var w}function Ut(){return C("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}Vt.gtTransformation="translate-client";function Gt({locale:e="",defaultLocale:n=f,locales:o=[],localeCookieName:i=A,ssr:a=!0}){const[s,c]=t.useState(a?e&&r.determineLocale(e,o)||"":Kt({_locale:e,locale:e,locales:o,defaultLocale:n,localeCookieName:i})),[l,u]=function({locale:e,locales:t,defaultLocale:n,localeCookieName:o,_setLocale:i}){const a=o=>{const a=r.determineLocale(o,t)||e||n;return a!==o&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(a,o)),i(a),a},s=e=>{const t=a(e);"undefined"!=typeof document&&(document.cookie=`${o}=${t};path=/`)};return[s,a]}({locale:s,locales:o,defaultLocale:n,localeCookieName:i,_setLocale:c});return t.useEffect((()=>{const t=Kt({_locale:e,locale:s,locales:o,defaultLocale:n,localeCookieName:i});u(t)}),[e,s,o,n,i]),[s,l]}function Kt({_locale:e,locale:t,locales:n,defaultLocale:o,localeCookieName:i}){var a;if(e&&e===t&&r.determineLocale(e,n)===t)return e;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[o],c="undefined"!=typeof document?null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${i}=`))))||void 0===a?void 0:a.split("=")[1]:void 0,l=r.determineLocale([...e?[e]:[],...c?[c]:[],...s],n)||o;return c&&c!==l&&"undefined"!=typeof document&&(document.cookie=`${i}=${l};path=/`),l}function $t(e,n,o,i,a,s,c,l,u){return t.useCallback(((d,f={})=>{if(!e)return"";const h=function(e,r){let n=e,o=r.split(".");for(const e of o){if("object"!=typeof n||Array.isArray(n)||t.isValidElement(n))return;n=n[e]}return n}(e,d);if(!h)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(d)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(h))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(d)),"";const{entry:p,metadata:v}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(h);if(!p||"string"!=typeof p)return"";const g=r.splitStringToContent(p),y=(e,t)=>r.renderContentToString(e,t,f.variables,f.variablesOptions);if(!a)return y(g,[i]);let _=Ft(Object.assign(Object.assign({source:g},(null==v?void 0:v.context)&&{context:v.context}),{id:d,dataFormat:"JSX"})),b=null==n?void 0:n[_];return"success"===(null==b?void 0:b.state)?y(b.target,[o,i]):"error"===(null==b?void 0:b.state)?y(g,[i]):c?(l({source:g,targetLocale:o,metadata:Object.assign(Object.assign({},(null==v?void 0:v.context)&&{context:v.context}),{id:d,hash:_})}),"replace"===u.method?y(g,[i]):"skeleton"===u.method?"":s?y(g,[i]):""):y(g,[i])}),[e,n,o,i,a,c,l,s])}function Wt(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function Jt(e,t){return i(this,void 0,void 0,(function*(){var n;let o;try{o=yield t(e)}catch(e){}const i=null===(n=r.getLocaleProperties(e))||void 0===n?void 0:n.languageCode;if(i&&i!==e)try{o=yield t(i)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return o}))}function Xt(r){var{children:n,n:i,locale:a}=r,s=o(r,["children","n","locale"]);const c=t.useContext(j);let l;c&&(a||(a=c.locale),l||(l=c.defaultLocale));const u=[...a?[a]:[],l||f];if("number"!=typeof i)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const d=v(i,u,s)||n;return e.jsx(e.Fragment,{children:d})}function Yt(t){var{children:r,branch:n}=t,i=o(t,["children","branch"]);const a=(n=null==n?void 0:n.toString())&&void 0!==i[n]?i[n]:r;return e.jsx(e.Fragment,{children:a})}function qt(){return C("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function Zt(){const{setLocale:e}=C("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function Qt(e){const n=Ut(),o=qt(),i=Zt(),a=t.useMemo((()=>{if(!o||0===o.length)return[];const e=o.sort(((e,t)=>(new Intl.Collator).compare(r.getLocaleProperties(e).nativeNameWithRegionCode,r.getLocaleProperties(t).nativeNameWithRegionCode)));return e}),[o]);return{locale:n,locales:e||a,setLocale:i}}Xt.gtTransformation="plural",Yt.gtTransformation="branch",exports.Branch=Yt,exports.Currency=H,exports.DateTime=z,exports.GTProvider=function(a){var{children:s,projectId:c="",devApiKey:l,dictionary:h,locales:p=[],defaultLocale:v=f,locale:g,cacheUrl:_=u,runtimeUrl:b=d,renderSettings:m=E,loadDictionary:x,loadTranslations:w,fallback:k,ssr:B=Wt(),localeCookieName:S=A,translations:O=null,_versionId:C}=a,P=o(a,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:D,devApiKey:H}=function(e,t){try{return{projectId:e||(void 0).VITE_GT_PROJECT_ID||(void 0).REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||(void 0).VITE_GT_DEV_API_KEY||(void 0).VITE_GT_API_KEY||(void 0).REDWOOD_ENV_GT_DEV_API_KEY||(void 0).REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(c,l);p=t.useMemo((()=>Array.from(new Set([v,...p]))),[v,p]);const[z,R]=Gt({defaultLocale:v,locales:p,locale:g,ssr:B,localeCookieName:S}),I=t.useMemo((()=>!!(D&&b&&H&&"development"===process.env.NODE_ENV)),[D,b,H]),L=t.useMemo((()=>(w?"custom":_&&D&&"default")||"disabled"),[w]),[F,M]=t.useState(h);t.useEffect((()=>{if(!x)return;let e=!0;return(()=>{i(this,void 0,void 0,(function*(){const t=T((yield Jt(v,x))||{},(yield Jt(z,x))||{});e&&M(t||{})}))})(),()=>{e=!1}}),[x,z,v]),t.useMemo((()=>{if("production"===process.env.NODE_ENV&&H){if(!B)throw new Error("gt-react Error: Production environments cannot include an api key.");if(H.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===L||!_&&!b||D||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),D&&b&&"custom"!==L&&!H&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),b===d||_===u&&"default"===L){const e=(p||p).filter((e=>!n.getSupportedLocale(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=r.getLocaleProperties(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,H,L,_,b,D,p]);const[N,V]=t.useMemo((()=>{const e=r.requiresTranslation(v,z,p);return[e,e&&r.isSameLanguage(v,z)]}),[v,z,p]),[U,G]=t.useState(O||N&&"disabled"!==L?null:{});t.useEffect((()=>G(N&&"disabled"!==L?null:{})),[z,L]);const{registerContentForTranslation:K,registerJsxForTranslation:$}=function(e){var{projectId:r,devApiKey:n,locale:a,versionId:s,defaultLocale:c,runtimeUrl:l,renderSettings:u,setTranslations:d,runtimeTranslationEnabled:f}=e,h=o(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!f)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};h=Object.assign(Object.assign({},h),{projectId:r,sourceLocale:c});const[p,v]=t.useState(0),g=t.useRef(new Map),_=t.useRef(new Map);t.useEffect((()=>{g.current.forEach((e=>e.resolve())),g.current.clear()}),[a]);const[b,m]=t.useMemo((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=_.current.get(r);if(n)return n;const o=new Promise(((n,o)=>{g.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:o})})).catch((e=>{throw e})).finally((()=>{_.current.delete(r)}));return _.current.set(r,o),o};return[e("content"),e("jsx")]}),[]),x=t.useCallback(((e,t)=>i(this,void 0,void 0,(function*(){if(0===g.current.size)return{};v((e=>e+1));const o=Array.from(e.values()),a={};try{const c=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});d((e=>Object.assign(Object.assign({},e||{}),c)));const f=(e,t,r)=>i(this,void 0,void 0,(function*(){const n=new AbortController,o=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}finally{void 0!==o&&clearTimeout(o)}})),p=yield f(`${l}/v1/runtime/${r}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},n&&{"x-gt-dev-api-key":n}),body:JSON.stringify({requests:o,targetLocale:t,metadata:h,versionId:s})},u.timeout);if(!p.ok)throw new Error(yield p.text());(yield p.json()).forEach(((e,t)=>{const r=o[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;a[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(y(r.metadata.id,r.metadata.hash),e.error),void(a[n]={state:"error",error:e.error,code:e.code});console.error(y(r.metadata.id,r.metadata.hash),e),a[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){e instanceof Error&&"AbortError"===e.name?console.warn("gt-react: Runtime translation timed out."):console.error("Error fetching batched translations:",e),o.forEach((e=>{a[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return v((e=>e-1)),o.forEach((e=>e.resolve(a[e.metadata.hash]))),a}}))),[l,r,n,h,s,u.timeout]),w=t.useRef(p);return t.useEffect((()=>{w.current=p}),[p]),t.useEffect((()=>{let e=!0;const t=setInterval((()=>{if(g.current.size>0&&w.current<100){const t=Math.min(25,g.current.size),r=new Map(Array.from(g.current.entries()).slice(0,t));(()=>{i(this,void 0,void 0,(function*(){const t=yield x(r,a);e&&d((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>g.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[a]),{registerContentForTranslation:b,registerJsxForTranslation:m}}(Object.assign({locale:z,versionId:C,projectId:D,runtimeTranslationEnabled:I,defaultLocale:v,devApiKey:H,runtimeUrl:b,renderSettings:m,setTranslations:G},P));t.useEffect((()=>{if(U||!N||"disabled"===L)return;let e=!0;return(()=>{i(this,void 0,void 0,(function*(){let t;switch(L){case"custom":if(w)try{t=yield w(z)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(z),e)}break;case"default":try{t=yield function(e){return i(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:_,projectId:D,locale:z,versionId:C})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&G(t)}))})(),()=>{e=!1}}),[U,N,L,_,D,z,C]);const W=function(e,n,o,i,a,s,c,l){return t.useCallback(((t,u={})=>{if(!t||"string"!=typeof t)return"";const d=r.splitStringToContent(t),f=(e,t)=>r.renderContentToString(e,t,u.variables,u.variablesOptions),h=null==u?void 0:u.id,p=h&&(null==e?void 0:e[h]);let v="";i&&!p&&(v=Ft(Object.assign(Object.assign(Object.assign({source:d},(null==u?void 0:u.context)&&{context:u.context}),h&&{id:h}),{dataFormat:"JSX"})));let g=p?null==e?void 0:e[h]:null==e?void 0:e[v];return i&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?f(g.target,[n,o]):s?(c({source:d,targetLocale:n,metadata:Object.assign(Object.assign({},(null==u?void 0:u.context)&&{context:u.context}),{id:h,hash:v||""})}),"replace"===l.method?f(d,[o]):"skeleton"===l.method?"":a?f(d,[o]):""):f(d,[o]):f(d,[o])}),[e,n,o,i,s,c,a])}(U,z,v,N,V,I,K,m),J=$t(F,U,z,v,N,V,I,K,m),X=!(N&&!U||!z);return e.jsx(j.Provider,{value:{registerContentForTranslation:K,registerJsxForTranslation:$,_internalUseGTFunction:W,_internalUseDictFunction:J,runtimeTranslationEnabled:I,locale:z,locales:p,setLocale:R,defaultLocale:v,translations:U,translationRequired:N,dialectTranslationRequired:V,projectId:D,renderSettings:m},children:X?s:k})},exports.LocaleSelector=function(t){var{locales:n}=t,i=o(t,["locales"]);const{locale:a,locales:s,setLocale:c}=Qt(n||void 0),l=e=>{return(t=r.getLocaleProperties(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return s&&0!==s.length&&c?e.jsxs("select",Object.assign({},i,{value:a||"",onChange:e=>c(e.target.value),children:[!a&&e.jsx("option",{value:""}),s.map((t=>e.jsx("option",{value:t,suppressHydrationWarning:!0,children:l(t)},t)))]})):null},exports.Num=P,exports.Plural=Xt,exports.T=Vt,exports.Var=D,exports.useDefaultLocale=function(){return C("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale},exports.useDict=function(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=C(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}},exports.useGT=function(){const{_internalUseGTFunction:e}=C("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}},exports.useLocale=Ut,exports.useLocaleSelector=Qt,exports.useLocales=qt,exports.useSetLocale=Zt;
|
18
|
+
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,E,A,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,D=c.words,H=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],E=m=O[3],A=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?g(f,b,m)+T[3]:y(f,b,m)+T[4],S=(S=_(S|=0,D[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?y(k,B,E)+j[0]:r<32?g(k,B,E)+j[1]:r<48?v(k,B,E)+j[2]:r<64?p(k,B,E)+j[3]:h(k,B,E)+j[4],S=(S=_(S|=0,H[r]))+A|0,w=A,A=E,E=_(B,10),B=k,k=S;S=O[1]+b+E|0,O[1]=O[2]+m+A|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),je.exports;var e}(),De(),function(){return He||(He=1,ze.exports=(c=J(),_e(),De(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,g=1;g<d;g++){v=o.finalize(v),o.reset();for(var y=v.words,_=0;_<p;_++)h[_]^=y[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),ze.exports;var e,t,r,n,o,i,a,s,c}(),Le(),Ne(),Ge(),We(),Ye(),Qe(),function(){return et?tt.exports:(et=1,tt.exports=(t=J(),Ne(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return rt?nt.exports:(rt=1,nt.exports=(e=J(),Ne(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return ot?it.exports:(ot=1,it.exports=(e=J(),Ne(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return at?st.exports:(at=1,st.exports=(e=J(),Ne(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return ct||(ct=1,lt.exports=(e=J(),Ne(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),lt.exports;var e}(),function(){return ut?dt.exports:(ut=1,dt.exports=(e=J(),Ne(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return ft?ht.exports:(ft=1,ht.exports=(n=J(),Ne(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return pt||(pt=1,vt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],g=e[v],y=e[g],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*g^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[y^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],g=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],y=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=g,d=y,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],y=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=g,e[t+2]=y,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),vt.exports;var e}(),_t(),function(){return bt||(bt=1,mt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),mt.exports;var e}(),function(){return xt||(xt=1,wt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),wt.exports;var e}(),function(){return kt||(kt=1,Bt.exports=(e=J(),ae(),fe(),Le(),Ne(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Bt.exports;var e}(),St())),G.exports),Rt=M(zt),It=function(){return It=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},It.apply(this,arguments)};function Lt(e){return Rt.SHA256(e).toString(Rt.enc.Hex)}function Ft(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=Lt),t(U(It(It(It({source:Nt(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var Mt=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],Nt(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=Nt(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return It({key:e.key},e.variable&&{variable:e.variable})}return e};function Nt(e){return Array.isArray(e)?e.map(Mt):Mt(e)}function Vt({children:r,id:n,context:o}){if(!r)return null;const{translations:i,translationRequired:a,runtimeTranslationEnabled:s,dialectTranslationRequired:c,registerJsxForTranslation:l,renderSettings:u,locale:d,defaultLocale:f}=C("<T> used on the client-side outside of <GTProvider>"),h=t.useMemo((()=>_(r)),[r]),p=n&&(null==i?void 0:i[n]),[v,y]=t.useMemo((()=>{if(!a||p)return[void 0,""];const e=x(h);return[e,Ft(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[h,o,n,a,p]),b=p?null==i?void 0:i[n]:null==i?void 0:i[y];t.useEffect((()=>{s&&a&&i&&d&&!b&&l({source:v,targetLocale:d,metadata:{id:n,hash:y,context:o}})}),[s,i,b,a,n,y,o,d,r]);const m=()=>g({children:h,defaultLocale:f,renderVariable:R});if(!a||i&&!b&&!s||"error"===(null==b?void 0:b.state))return e.jsx(e.Fragment,{children:m()});if(!b||"loading"===(null==b?void 0:b.state)){let t;return t="skeleton"===u.method?"":"replace"===u.method||c?m():"",e.jsx(e.Fragment,{children:t})}return e.jsx(e.Fragment,{children:(w=b.target,B({source:h,target:w,locales:[d,f],renderVariable:R}))});var w}function Ut(){return C("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}Vt.gtTransformation="translate-client";function Gt({locale:e="",defaultLocale:n=f,locales:o=[],localeCookieName:i=A,ssr:a=!0}){const[s,c]=t.useState(a?e&&r.determineLocale(e,o)||"":Kt({_locale:e,locale:e,locales:o,defaultLocale:n,localeCookieName:i})),[l,u]=function({locale:e,locales:t,defaultLocale:n,localeCookieName:o,_setLocale:i}){const a=o=>{const a=r.determineLocale(o,t)||e||n;return a!==o&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(a,o)),i(a),a},s=e=>{const t=a(e);"undefined"!=typeof document&&(document.cookie=`${o}=${t};path=/`)};return[s,a]}({locale:s,locales:o,defaultLocale:n,localeCookieName:i,_setLocale:c});return t.useEffect((()=>{const t=Kt({_locale:e,locale:s,locales:o,defaultLocale:n,localeCookieName:i});u(t)}),[e,s,o,n,i]),[s,l]}function Kt({_locale:e,locale:t,locales:n,defaultLocale:o,localeCookieName:i}){var a;if(e&&e===t&&r.determineLocale(e,n)===t)return e;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[o],c="undefined"!=typeof document?null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${i}=`))))||void 0===a?void 0:a.split("=")[1]:void 0,l=r.determineLocale([...e?[e]:[],...c?[c]:[],...s],n)||o;return c&&c!==l&&"undefined"!=typeof document&&(document.cookie=`${i}=${l};path=/`),l}function $t(e,n,o,i,a,s,c,l,u){return t.useCallback(((d,f={})=>{if(!e)return"";const h=function(e,r){let n=e,o=r.split(".");for(const e of o){if("object"!=typeof n||Array.isArray(n)||t.isValidElement(n))return;n=n[e]}return n}(e,d);if(!h)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(d)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(h))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(d)),"";const{entry:p,metadata:v}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(h);if(!p||"string"!=typeof p)return"";const g=r.splitStringToContent(p),y=(e,t)=>r.renderContentToString(e,t,f.variables,f.variablesOptions);if(!a)return y(g,[i]);let _=Ft(Object.assign(Object.assign({source:g},(null==v?void 0:v.context)&&{context:v.context}),{id:d,dataFormat:"JSX"})),b=null==n?void 0:n[_];return"success"===(null==b?void 0:b.state)?y(b.target,[o,i]):"error"===(null==b?void 0:b.state)?y(g,[i]):c?(l({source:g,targetLocale:o,metadata:Object.assign(Object.assign({},(null==v?void 0:v.context)&&{context:v.context}),{id:d,hash:_})}),"replace"===u.method?y(g,[i]):"skeleton"===u.method?"":s?y(g,[i]):""):y(g,[i])}),[e,n,o,i,a,c,l,s])}function Wt(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function Jt(e,t){return i(this,void 0,void 0,(function*(){var n;let o;try{o=yield t(e)}catch(e){}const i=null===(n=r.getLocaleProperties(e))||void 0===n?void 0:n.languageCode;if(i&&i!==e)try{o=yield t(i)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return o}))}function Xt(r){var{children:n,n:i,locale:a}=r,s=o(r,["children","n","locale"]);const c=t.useContext(j);let l;c&&(a||(a=c.locale),l||(l=c.defaultLocale));const u=[...a?[a]:[],l||f];if("number"!=typeof i)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const d=v(i,u,s)||n;return e.jsx(e.Fragment,{children:d})}function Yt(t){var{children:r,branch:n}=t,i=o(t,["children","branch"]);const a=(n=null==n?void 0:n.toString())&&void 0!==i[n]?i[n]:r;return e.jsx(e.Fragment,{children:a})}function qt(){return C("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function Zt(){const{setLocale:e}=C("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function Qt(e){const n=Ut(),o=qt(),i=Zt(),a=t.useMemo((()=>{if(!o||0===o.length)return[];const e=o.sort(((e,t)=>(new Intl.Collator).compare(r.getLocaleProperties(e).nativeNameWithRegionCode,r.getLocaleProperties(t).nativeNameWithRegionCode)));return e}),[o]);return{locale:n,locales:e||a,setLocale:i}}Xt.gtTransformation="plural",Yt.gtTransformation="branch",exports.Branch=Yt,exports.Currency=H,exports.DateTime=z,exports.GTProvider=function(a){var{children:s,projectId:c="",devApiKey:l,dictionary:h,locales:p=[],defaultLocale:v=f,locale:g,cacheUrl:_=u,runtimeUrl:b=d,renderSettings:m=E,loadDictionary:x,loadTranslations:w,fallback:k,ssr:B=Wt(),localeCookieName:S=A,translations:O=null,_versionId:C}=a,P=o(a,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:D,devApiKey:H}=function(e,t){try{return{projectId:e||(void 0).VITE_GT_PROJECT_ID||(void 0).REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||(void 0).VITE_GT_DEV_API_KEY||(void 0).VITE_GT_API_KEY||(void 0).REDWOOD_ENV_GT_DEV_API_KEY||(void 0).REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(c,l);p=t.useMemo((()=>Array.from(new Set([v,...p]))),[v,p]);const[z,R]=Gt({defaultLocale:v,locales:p,locale:g,ssr:B,localeCookieName:S}),I=t.useMemo((()=>!!(D&&b&&H&&"development"===process.env.NODE_ENV)),[D,b,H]),L=t.useMemo((()=>(w?"custom":_&&D&&"default")||"disabled"),[w]),[F,M]=t.useState(h);t.useEffect((()=>{if(!x)return;let e=!0;return(()=>{i(this,void 0,void 0,(function*(){const t=T((yield Jt(v,x))||{},(yield Jt(z,x))||{});e&&M(t||{})}))})(),()=>{e=!1}}),[x,z,v]),t.useMemo((()=>{if("production"===process.env.NODE_ENV&&H){if(!B)throw new Error("gt-react Error: Production environments cannot include an api key.");if(H.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===L||!_&&!b||D||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),D&&b&&"custom"!==L&&!H&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),b===d||_===u&&"default"===L){const e=(p||p).filter((e=>!n.getSupportedLocale(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=r.getLocaleProperties(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,H,L,_,b,D,p]);const[N,V]=t.useMemo((()=>{const e=r.requiresTranslation(v,z,p);return[e,e&&r.isSameLanguage(v,z)]}),[v,z,p]),[U,G]=t.useState(O||N&&"disabled"!==L?null:{});t.useEffect((()=>G(N&&"disabled"!==L?null:{})),[z,L]);const{registerContentForTranslation:K,registerJsxForTranslation:$}=function(e){var{projectId:r,devApiKey:n,locale:a,versionId:s,defaultLocale:c,runtimeUrl:l,renderSettings:u,setTranslations:d,runtimeTranslationEnabled:f}=e,h=o(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!f)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};h=Object.assign(Object.assign({},h),{projectId:r,sourceLocale:c});const[p,v]=t.useState(0),g=t.useRef(new Map),_=t.useRef(new Map);t.useEffect((()=>{g.current.forEach((e=>e.resolve())),g.current.clear()}),[a]);const[b,m]=t.useMemo((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=_.current.get(r);if(n)return n;const o=new Promise(((n,o)=>{g.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:o})})).catch((e=>{throw e})).finally((()=>{_.current.delete(r)}));return _.current.set(r,o),o};return[e("content"),e("jsx")]}),[]),x=t.useCallback(((e,t)=>i(this,void 0,void 0,(function*(){if(0===g.current.size)return{};v((e=>e+1));const o=Array.from(e.values()),a={};try{const c=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});d((e=>Object.assign(Object.assign({},e||{}),c)));const f=(e,t,r)=>i(this,void 0,void 0,(function*(){const n=new AbortController,o=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}finally{void 0!==o&&clearTimeout(o)}})),p=yield f(`${l}/v1/runtime/${r}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},n&&{"x-gt-dev-api-key":n}),body:JSON.stringify({requests:o,targetLocale:t,metadata:h,versionId:s})},u.timeout);if(!p.ok)throw new Error(yield p.text());(yield p.json()).forEach(((e,t)=>{const r=o[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;a[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(y(r.metadata.id,r.metadata.hash),e.error),void(a[n]={state:"error",error:e.error,code:e.code});console.error(y(r.metadata.id,r.metadata.hash),e),a[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){e instanceof Error&&"AbortError"===e.name?console.warn("gt-react: Runtime translation timed out."):console.error("Error fetching batched translations:",e),o.forEach((e=>{a[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return v((e=>e-1)),o.forEach((e=>e.resolve(a[e.metadata.hash]))),a}}))),[l,r,n,h,s,u.timeout]),w=t.useRef(p);return t.useEffect((()=>{w.current=p}),[p]),t.useEffect((()=>{let e=!0;const t=setInterval((()=>{if(g.current.size>0&&w.current<100){const t=Math.min(25,g.current.size),r=new Map(Array.from(g.current.entries()).slice(0,t));(()=>{i(this,void 0,void 0,(function*(){const t=yield x(r,a);e&&d((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>g.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[a]),{registerContentForTranslation:b,registerJsxForTranslation:m}}(Object.assign({locale:z,versionId:C,projectId:D,runtimeTranslationEnabled:I,defaultLocale:v,devApiKey:H,runtimeUrl:b,renderSettings:m,setTranslations:G},P));t.useEffect((()=>{if(U||!N||"disabled"===L)return;let e=!0;return(()=>{i(this,void 0,void 0,(function*(){let t;switch(L){case"custom":if(w)try{t=yield w(z)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(z),e)}break;case"default":try{t=yield function(e){return i(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:_,projectId:D,locale:z,versionId:C})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&G(t)}))})(),()=>{e=!1}}),[U,N,L,_,D,z,C]);const W=function(e,n,o,i,a,s,c,l){return t.useCallback(((t,u={})=>{if(!t||"string"!=typeof t)return"";const d=r.splitStringToContent(t),f=(e,t)=>r.renderContentToString(e,t,u.variables,u.variablesOptions),h=null==u?void 0:u.id,p=h&&(null==e?void 0:e[h]);let v="";i&&!p&&(v=Ft(Object.assign(Object.assign(Object.assign({source:d},(null==u?void 0:u.context)&&{context:u.context}),h&&{id:h}),{dataFormat:"JSX"})));let g=p?null==e?void 0:e[h]:null==e?void 0:e[v];return i&&"error"!==(null==g?void 0:g.state)?"success"===(null==g?void 0:g.state)?f(g.target,[n,o]):s?(c({source:d,targetLocale:n,metadata:Object.assign(Object.assign({},(null==u?void 0:u.context)&&{context:u.context}),{id:h,hash:v||""})}),"replace"===l.method?f(d,[o]):"skeleton"===l.method?"":a?f(d,[o]):""):f(d,[o]):f(d,[o])}),[e,n,o,i,s,c,a])}(U,z,v,N,V,I,K,m),J=$t(F,U,z,v,N,V,I,K,m),X=!(N&&!U||!z);return e.jsx(j.Provider,{value:{registerContentForTranslation:K,registerJsxForTranslation:$,_internalUseGTFunction:W,_internalUseDictFunction:J,runtimeTranslationEnabled:I,locale:z,locales:p,setLocale:R,defaultLocale:v,translations:U,translationRequired:N,dialectTranslationRequired:V,projectId:D,renderSettings:m},children:X?s:k})},exports.LocaleSelector=function(t){var{locales:n}=t,i=o(t,["locales"]);const{locale:a,locales:s,setLocale:c}=Qt(n||void 0),l=e=>{return(t=r.getLocaleProperties(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return s&&0!==s.length&&c?e.jsxs("select",Object.assign({},i,{value:a||"",onChange:e=>c(e.target.value),children:[!a&&e.jsx("option",{value:""}),s.map((t=>e.jsx("option",{value:t,suppressHydrationWarning:!0,children:l(t)},t)))]})):null},exports.Num=P,exports.Plural=Xt,exports.T=Vt,exports.Var=D,exports.useDefaultLocale=function(){return C("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale},exports.useDict=function(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=C(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}},exports.useGT=function(){const{_internalUseGTFunction:e}=C("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}},exports.useLocale=Ut,exports.useLocaleSelector=Qt,exports.useLocales=qt,exports.useSetLocale=Zt;
|
package/dist/index.esm.min.mjs
CHANGED
@@ -15,4 +15,4 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){
|
|
15
15
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
17
|
*/
|
18
|
-
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,A,E,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,H=c.words,z=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],A=m=O[3],E=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?y(f,b,m)+T[3]:g(f,b,m)+T[4],S=(S=_(S|=0,H[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?g(k,B,A)+j[0]:r<32?y(k,B,A)+j[1]:r<48?v(k,B,A)+j[2]:r<64?p(k,B,A)+j[3]:h(k,B,A)+j[4],S=(S=_(S|=0,z[r]))+E|0,w=E,E=A,A=_(B,10),B=k,k=S;S=O[1]+b+A|0,O[1]=O[2]+m+E|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),Je.exports;var e}(),qe(),function(){return Ze||(Ze=1,Qe.exports=(c=fe(),Re(),qe(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=o.finalize(v),o.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),Qe.exports;var e,t,r,n,o,i,a,s,c}(),rt(),it(),ct(),dt(),pt(),gt(),function(){return _t?bt.exports:(_t=1,bt.exports=(t=fe(),it(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return mt?xt.exports:(mt=1,xt.exports=(e=fe(),it(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return wt?kt.exports:(wt=1,kt.exports=(e=fe(),it(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Bt?At.exports:(Bt=1,At.exports=(e=fe(),it(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return Et||(Et=1,St.exports=(e=fe(),it(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),St.exports;var e}(),function(){return Ot?Tt.exports:(Ot=1,Tt.exports=(e=fe(),it(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return jt?Ct.exports:(jt=1,Ct.exports=(n=fe(),it(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return Pt||(Pt=1,Ht.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Ht.exports;var e}(),Rt(),function(){return It||(It=1,Ft.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),Ft.exports;var e}(),function(){return Nt||(Nt=1,Lt.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),Lt.exports;var e}(),function(){return Mt||(Mt=1,Vt.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Vt.exports;var e}(),Kt())),ce.exports),er=oe(Qt),tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tr.apply(this,arguments)};function rr(e){return er.SHA256(e).toString(er.enc.Hex)}function nr(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=rr),t(se(tr(tr(tr({source:ir(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var or=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],ir(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=ir(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return tr({key:e.key},e.variable&&{variable:e.variable})}return e};function ir(e){return Array.isArray(e)?e.map(or):or(e)}function ar({children:r,id:n,context:o}){if(!r)return;const{translations:i,translationRequired:a,runtimeTranslationEnabled:l,dialectTranslationRequired:u,registerJsxForTranslation:d,renderSettings:f,locale:h,defaultLocale:p}=X("<T> used on the client-side outside of <GTProvider>"),v=s((()=>R(r)),[r]),y=n&&(null==i?void 0:i[n]),[g,_]=s((()=>{if(!a||y)return[void 0,""];const e=N(v);return[e,nr(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[v,o,n,a,y]),b=y?null==i?void 0:i[n]:null==i?void 0:i[_];c((()=>{l&&a&&i&&h&&!b&&d({source:g,targetLocale:h,metadata:{id:n,hash:_,context:o}})}),[l,i,b,a,n,_,o,h,r]);const m=()=>z({children:v,defaultLocale:p,renderVariable:ee});if(!a||i&&!b&&!l||"error"===(null==b?void 0:b.state))return e(t,{children:m()});if(!b||"loading"===(null==b?void 0:b.state)){let r;return r="skeleton"===f.method?"":"replace"===f.method||u?m():"",e(t,{children:r})}return e(t,{children:(x=b.target,V({source:v,target:x,locales:[h,p],renderVariable:ee}))});var x}function sr(){const{_internalUseGTFunction:e}=X("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}}function cr(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=X(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}}function lr(){return X("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function ur(){return X("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}ar.gtTransformation="translate-client";function dr({locale:e="",defaultLocale:t=j,locales:r=[],localeCookieName:n=G,ssr:o=!0}){const[i,a]=l(o?e&&y(e,r)||"":fr({_locale:e,locale:e,locales:r,defaultLocale:t,localeCookieName:n})),[s,u]=function({locale:e,locales:t,defaultLocale:r,localeCookieName:n,_setLocale:o}){const i=n=>{const i=y(n,t)||e||r;return i!==n&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(i,n)),o(i),i},a=e=>{const t=i(e);"undefined"!=typeof document&&(document.cookie=`${n}=${t};path=/`)};return[a,i]}({locale:i,locales:r,defaultLocale:t,localeCookieName:n,_setLocale:a});return c((()=>{const o=fr({_locale:e,locale:i,locales:r,defaultLocale:t,localeCookieName:n});u(o)}),[e,i,r,t,n]),[i,s]}function fr({_locale:e,locale:t,locales:r,defaultLocale:n,localeCookieName:o}){var i;if(e&&e===t&&y(e,r)===t)return e;const a=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[n],s="undefined"!=typeof document?null===(i=document.cookie.split("; ").find((e=>e.startsWith(`${o}=`))))||void 0===i?void 0:i.split("=")[1]:void 0,c=y([...e?[e]:[],...s?[s]:[],...a],r)||n;return s&&s!==c&&"undefined"!=typeof document&&(document.cookie=`${o}=${c};path=/`),c}function hr(e,t,r,o,i,a,s,c,l){return d(((u,d={})=>{if(!e)return"";const f=function(e,t){let r=e,o=t.split(".");for(const e of o){if("object"!=typeof r||Array.isArray(r)||n.isValidElement(r))return;r=r[e]}return r}(e,u);if(!f)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(u)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(f))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(u)),"";const{entry:h,metadata:p}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(f);if(!h||"string"!=typeof h)return"";const v=g(h),y=(e,t)=>_(e,t,d.variables,d.variablesOptions);if(!i)return y(v,[o]);let b=nr(Object.assign(Object.assign({source:v},(null==p?void 0:p.context)&&{context:p.context}),{id:u,dataFormat:"JSX"})),m=null==t?void 0:t[b];return"success"===(null==m?void 0:m.state)?y(m.target,[r,o]):"error"===(null==m?void 0:m.state)?y(v,[o]):s?(c({source:v,targetLocale:r,metadata:Object.assign(Object.assign({},(null==p?void 0:p.context)&&{context:p.context}),{id:u,hash:b})}),"replace"===l.method?y(v,[o]):"skeleton"===l.method?"":a?y(v,[o]):""):y(v,[o])}),[e,t,r,o,i,s,c,a])}function pr(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function vr(e,t){return k(this,void 0,void 0,(function*(){var r;let n;try{n=yield t(e)}catch(e){}const o=null===(r=f(e))||void 0===r?void 0:r.languageCode;if(o&&o!==e)try{n=yield t(o)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return n}))}function yr(t){var{children:r,projectId:n="",devApiKey:o,dictionary:i,locales:a=[],defaultLocale:h=j,locale:p,cacheUrl:v=O,runtimeUrl:y=T,renderSettings:B=U,loadDictionary:A,loadTranslations:E,fallback:S,ssr:C=pr(),localeCookieName:P=G,translations:H=null,_versionId:z}=t,R=w(t,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:I,devApiKey:F}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(n,o);a=s((()=>Array.from(new Set([h,...a]))),[h,a]);const[N,L]=dr({defaultLocale:h,locales:a,locale:p,ssr:C,localeCookieName:P}),M=s((()=>!!(I&&y&&F&&"development"===process.env.NODE_ENV)),[I,y,F]),V=s((()=>(E?"custom":v&&I&&"default")||"disabled"),[E]),[K,$]=l(i);c((()=>{if(!A)return;let e=!0;return(()=>{k(this,void 0,void 0,(function*(){const t=W((yield vr(h,A))||{},(yield vr(N,A))||{});e&&$(t||{})}))})(),()=>{e=!1}}),[A,N,h]),s((()=>{if("production"===process.env.NODE_ENV&&F){if(!C)throw new Error("gt-react Error: Production environments cannot include an api key.");if(F.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===V||!v&&!y||I||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),I&&y&&"custom"!==V&&!F&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),y===T||v===O&&"default"===V){const e=(a||a).filter((e=>!x(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=f(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,F,V,v,y,I,a]);const[X,Y]=s((()=>{const e=b(h,N,a);return[e,e&&m(h,N)]}),[h,N,a]),[q,Z]=l(H||X&&"disabled"!==V?null:{});c((()=>Z(X&&"disabled"!==V?null:{})),[N,V]);const{registerContentForTranslation:Q,registerJsxForTranslation:ee}=function(e){var{projectId:t,devApiKey:r,locale:n,versionId:o,defaultLocale:i,runtimeUrl:a,renderSettings:f,setTranslations:h,runtimeTranslationEnabled:p}=e,v=w(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!p)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};v=Object.assign(Object.assign({},v),{projectId:t,sourceLocale:i});const[y,g]=l(0),_=u(new Map),b=u(new Map);c((()=>{_.current.forEach((e=>e.resolve())),_.current.clear()}),[n]);const[m,x]=s((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=b.current.get(r);if(n)return n;const o=new Promise(((n,o)=>{_.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:o})})).catch((e=>{throw e})).finally((()=>{b.current.delete(r)}));return b.current.set(r,o),o};return[e("content"),e("jsx")]}),[]),B=d(((e,n)=>k(this,void 0,void 0,(function*(){if(0===_.current.size)return{};g((e=>e+1));const i=Array.from(e.values()),s={};try{const c=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});h((e=>Object.assign(Object.assign({},e||{}),c)));const l=(e,t,r)=>k(this,void 0,void 0,(function*(){const n=new AbortController,o=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}finally{void 0!==o&&clearTimeout(o)}})),u=yield l(`${a}/v1/runtime/${t}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},r&&{"x-gt-dev-api-key":r}),body:JSON.stringify({requests:i,targetLocale:n,metadata:v,versionId:o})},f.timeout);if(!u.ok)throw new Error(yield u.text());(yield u.json()).forEach(((e,t)=>{const r=i[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;s[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(D(r.metadata.id,r.metadata.hash),e.error),void(s[n]={state:"error",error:e.error,code:e.code});console.error(D(r.metadata.id,r.metadata.hash),e),s[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){e instanceof Error&&"AbortError"===e.name?console.warn("gt-react: Runtime translation timed out."):console.error("Error fetching batched translations:",e),i.forEach((e=>{s[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return g((e=>e-1)),i.forEach((e=>e.resolve(s[e.metadata.hash]))),s}}))),[a,t,r,v,o,f.timeout]),A=u(y);return c((()=>{A.current=y}),[y]),c((()=>{let e=!0;const t=setInterval((()=>{if(_.current.size>0&&A.current<100){const t=Math.min(25,_.current.size),r=new Map(Array.from(_.current.entries()).slice(0,t));(()=>{k(this,void 0,void 0,(function*(){const t=yield B(r,n);e&&h((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>_.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[n]),{registerContentForTranslation:m,registerJsxForTranslation:x}}(Object.assign({locale:N,versionId:z,projectId:I,runtimeTranslationEnabled:M,defaultLocale:h,devApiKey:F,runtimeUrl:y,renderSettings:B,setTranslations:Z},R));c((()=>{if(q||!X||"disabled"===V)return;let e=!0;return(()=>{k(this,void 0,void 0,(function*(){let t;switch(V){case"custom":if(E)try{t=yield E(N)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(N),e)}break;case"default":try{t=yield function(e){return k(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:v,projectId:I,locale:N,versionId:z})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&Z(t)}))})(),()=>{e=!1}}),[q,X,V,v,I,N,z]);const te=function(e,t,r,n,o,i,a,s){return d(((c,l={})=>{if(!c||"string"!=typeof c)return"";const u=g(c),d=(e,t)=>_(e,t,l.variables,l.variablesOptions),f=null==l?void 0:l.id,h=f&&(null==e?void 0:e[f]);let p="";n&&!h&&(p=nr(Object.assign(Object.assign(Object.assign({source:u},(null==l?void 0:l.context)&&{context:l.context}),f&&{id:f}),{dataFormat:"JSX"})));let v=h?null==e?void 0:e[f]:null==e?void 0:e[p];return n&&"error"!==(null==v?void 0:v.state)?"success"===(null==v?void 0:v.state)?d(v.target,[t,r]):i?(a({source:u,targetLocale:t,metadata:Object.assign(Object.assign({},(null==l?void 0:l.context)&&{context:l.context}),{id:f,hash:p||""})}),"replace"===s.method?d(u,[r]):"skeleton"===s.method?"":o?d(u,[r]):""):d(u,[r]):d(u,[r])}),[e,t,r,n,i,a,o])}(q,N,h,X,Y,M,Q,B),re=hr(K,q,N,h,X,Y,M,Q,B),ne=!(X&&!q||!N);return e(J.Provider,{value:{registerContentForTranslation:Q,registerJsxForTranslation:ee,_internalUseGTFunction:te,_internalUseDictFunction:re,runtimeTranslationEnabled:M,locale:N,locales:a,setLocale:L,defaultLocale:h,translations:q,translationRequired:X,dialectTranslationRequired:Y,projectId:I,renderSettings:B},children:ne?r:S})}function gr(r){var{children:n,n:o,locale:i}=r,s=w(r,["children","n","locale"]);const c=a(J);let l;c&&(i||(i=c.locale),l||(l=c.defaultLocale));const u=[...i?[i]:[],l||j];if("number"!=typeof o)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const d=H(o,u,s)||n;return e(t,{children:d})}function _r(r){var{children:n,branch:o}=r,i=w(r,["children","branch"]);const a=(o=null==o?void 0:o.toString())&&void 0!==i[o]?i[o]:n;return e(t,{children:a})}function br(){return X("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function mr(){const{setLocale:e}=X("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function xr(e){const t=ur(),r=br(),n=mr(),o=s((()=>{if(!r||0===r.length)return[];const e=r.sort(((e,t)=>(new Intl.Collator).compare(f(e).nativeNameWithRegionCode,f(t).nativeNameWithRegionCode)));return e}),[r]);return{locale:t,locales:e||o,setLocale:n}}function wr(t){var{locales:n}=t,o=w(t,["locales"]);const{locale:i,locales:a,setLocale:s}=xr(n||void 0),c=e=>{return(t=f(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return a&&0!==a.length&&s?r("select",Object.assign({},o,{value:i||"",onChange:e=>s(e.target.value),children:[!i&&e("option",{value:""}),a.map((t=>e("option",{value:t,suppressHydrationWarning:!0,children:c(t)},t)))]})):null}gr.gtTransformation="plural",_r.gtTransformation="branch";export{_r as Branch,Z as Currency,Q as DateTime,yr as GTProvider,wr as LocaleSelector,Y as Num,gr as Plural,ar as T,q as Var,lr as useDefaultLocale,cr as useDict,sr as useGT,ur as useLocale,xr as useLocaleSelector,br as useLocales,mr as useSetLocale};
|
18
|
+
function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,f,b,m,x,w,k,B,A,E,S,O=this._hash.words,T=u.words,j=d.words,C=a.words,P=s.words,H=c.words,z=l.words;for(w=i=O[0],k=f=O[1],B=b=O[2],A=m=O[3],E=x=O[4],r=0;r<80;r+=1)S=i+e[t+C[r]]|0,S+=r<16?h(f,b,m)+T[0]:r<32?p(f,b,m)+T[1]:r<48?v(f,b,m)+T[2]:r<64?y(f,b,m)+T[3]:g(f,b,m)+T[4],S=(S=_(S|=0,H[r]))+x|0,i=x,x=m,m=_(b,10),b=f,f=S,S=w+e[t+P[r]]|0,S+=r<16?g(k,B,A)+j[0]:r<32?y(k,B,A)+j[1]:r<48?v(k,B,A)+j[2]:r<64?p(k,B,A)+j[3]:h(k,B,A)+j[4],S=(S=_(S|=0,z[r]))+E|0,w=E,E=A,A=_(B,10),B=k,k=S;S=O[1]+b+A|0,O[1]=O[2]+m+E|0,O[2]=O[3]+x+w|0,O[3]=O[4]+i+k|0,O[4]=O[0]+f+B|0,O[0]=S},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160)),Je.exports;var e}(),qe(),function(){return Ze||(Ze=1,Qe.exports=(c=fe(),Re(),qe(),t=(e=c).lib,r=t.Base,n=t.WordArray,o=e.algo,i=o.SHA256,a=o.HMAC,s=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,o=a.create(r.hasher,e),i=n.create(),s=n.create([1]),c=i.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=o.update(t).finalize(s);o.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=o.finalize(v),o.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),Qe.exports;var e,t,r,n,o,i,a,s,c}(),rt(),it(),ct(),dt(),pt(),gt(),function(){return _t?bt.exports:(_t=1,bt.exports=(t=fe(),it(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return mt?xt.exports:(mt=1,xt.exports=(e=fe(),it(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return wt?kt.exports:(wt=1,kt.exports=(e=fe(),it(),e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Bt?At.exports:(Bt=1,At.exports=(e=fe(),it(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return Et||(Et=1,St.exports=(e=fe(),it(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),St.exports;var e}(),function(){return Ot?Tt.exports:(Ot=1,Tt.exports=(e=fe(),it(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return jt?Ct.exports:(jt=1,Ct.exports=(n=fe(),it(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return Pt||(Pt=1,Ht.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<r?i[a]=t[a]:(l=i[a-1],a%r?r>6&&a%r==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=o[(l=l<<8|l>>>24)>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=p[a/r|0]<<24),i[a]=i[a-r]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=i[a];else l=i[a-4];s[c]=c<4||a<=4?l:u[o[l>>>24]]^d[o[l>>>16&255]]^f[o[l>>>8&255]]^h[o[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^o[u>>>16&255]^i[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Ht.exports;var e}(),Rt(),function(){return It||(It=1,Ft.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var c=n[o];n[o]=n[i],n[i]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),Ft.exports;var e}(),function(){return Nt||(Nt=1,Lt.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(o[0]^=l,o[1]^=d,o[2]^=u,o[3]^=f,o[4]^=l,o[5]^=d,o[6]^=u,o[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),Lt.exports;var e}(),function(){return Mt||(Mt=1,Vt.exports=(e=fe(),Be(),je(),rt(),it(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=[],i=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),e[t+n]^=o[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],o=65535&n,s=n>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Vt.exports;var e}(),Kt())),ce.exports),er=oe(Qt),tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tr.apply(this,arguments)};function rr(e){return er.SHA256(e).toString(er.enc.Hex)}function nr(e,t){var r=e.source,n=e.context,o=e.id,i=e.dataFormat;return void 0===t&&(t=rr),t(se(tr(tr(tr({source:ir(r)},o&&{id:o}),n&&{context:n}),i&&{dataFormat:i})))}"function"==typeof SuppressedError&&SuppressedError;var or=function(e){var t,r,n,o;if(e&&"object"==typeof e){if("props"in e){var i={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(i.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],ir(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(i.children=ir(e.props.children)),(null===(o=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===o?void 0:o.transformation)&&(i.transformation=e.props["data-_gt"].transformation),i}if("key"in e)return tr({key:e.key},e.variable&&{variable:e.variable})}return e};function ir(e){return Array.isArray(e)?e.map(or):or(e)}function ar({children:r,id:n,context:o}){if(!r)return null;const{translations:i,translationRequired:a,runtimeTranslationEnabled:l,dialectTranslationRequired:u,registerJsxForTranslation:d,renderSettings:f,locale:h,defaultLocale:p}=X("<T> used on the client-side outside of <GTProvider>"),v=s((()=>R(r)),[r]),y=n&&(null==i?void 0:i[n]),[g,_]=s((()=>{if(!a||y)return[void 0,""];const e=N(v);return[e,nr(Object.assign(Object.assign(Object.assign({source:e},o&&{context:o}),n&&{id:n}),{dataFormat:"JSX"}))]}),[v,o,n,a,y]),b=y?null==i?void 0:i[n]:null==i?void 0:i[_];c((()=>{l&&a&&i&&h&&!b&&d({source:g,targetLocale:h,metadata:{id:n,hash:_,context:o}})}),[l,i,b,a,n,_,o,h,r]);const m=()=>z({children:v,defaultLocale:p,renderVariable:ee});if(!a||i&&!b&&!l||"error"===(null==b?void 0:b.state))return e(t,{children:m()});if(!b||"loading"===(null==b?void 0:b.state)){let r;return r="skeleton"===f.method?"":"replace"===f.method||u?m():"",e(t,{children:r})}return e(t,{children:(x=b.target,V({source:v,target:x,locales:[h,p],renderVariable:ee}))});var x}function sr(){const{_internalUseGTFunction:e}=X("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t,r={}){return e(t,r)}}function cr(e){const t=t=>e?`${e}.${t}`:t,{_internalUseDictFunction:r}=X(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e,n={}){const o=t(e);return r(o,n)}}function lr(){return X("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function ur(){return X("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}ar.gtTransformation="translate-client";function dr({locale:e="",defaultLocale:t=j,locales:r=[],localeCookieName:n=G,ssr:o=!0}){const[i,a]=l(o?e&&y(e,r)||"":fr({_locale:e,locale:e,locales:r,defaultLocale:t,localeCookieName:n})),[s,u]=function({locale:e,locales:t,defaultLocale:r,localeCookieName:n,_setLocale:o}){const i=n=>{const i=y(n,t)||e||r;return i!==n&&console.warn(((e,t)=>`You are trying to switch to "${t}" which is not supported. Update the list of supported locales through your dashboard or your gt.config.json file if you are using a config file. Falling back to "${e}".`)(i,n)),o(i),i},a=e=>{const t=i(e);"undefined"!=typeof document&&(document.cookie=`${n}=${t};path=/`)};return[a,i]}({locale:i,locales:r,defaultLocale:t,localeCookieName:n,_setLocale:a});return c((()=>{const o=fr({_locale:e,locale:i,locales:r,defaultLocale:t,localeCookieName:n});u(o)}),[e,i,r,t,n]),[i,s]}function fr({_locale:e,locale:t,locales:r,defaultLocale:n,localeCookieName:o}){var i;if(e&&e===t&&y(e,r)===t)return e;const a=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[n],s="undefined"!=typeof document?null===(i=document.cookie.split("; ").find((e=>e.startsWith(`${o}=`))))||void 0===i?void 0:i.split("=")[1]:void 0,c=y([...e?[e]:[],...s?[s]:[],...a],r)||n;return s&&s!==c&&"undefined"!=typeof document&&(document.cookie=`${o}=${c};path=/`),c}function hr(e,t,r,o,i,a,s,c,l){return d(((u,d={})=>{if(!e)return"";const f=function(e,t){let r=e,o=t.split(".");for(const e of o){if("object"!=typeof r||Array.isArray(r)||n.isValidElement(r))return;r=r[e]}return r}(e,u);if(!f)return console.warn((e=>`No valid dictionary entry found for id: "${e}"`)(u)),"";if(!function(e){if("string"==typeof e)return!0;if(Array.isArray(e)){if("string"!=typeof(null==e?void 0:e[0]))return!1;const t=null==e?void 0:e[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1}(f))return console.warn((e=>`Invalid dictionary entry found for id: "${e}"`)(u)),"";const{entry:h,metadata:p}=function(e){if(Array.isArray(e)){if(1===e.length)return{entry:e[0]};if(2===e.length)return{entry:e[0],metadata:e[1]}}return{entry:e}}(f);if(!h||"string"!=typeof h)return"";const v=g(h),y=(e,t)=>_(e,t,d.variables,d.variablesOptions);if(!i)return y(v,[o]);let b=nr(Object.assign(Object.assign({source:v},(null==p?void 0:p.context)&&{context:p.context}),{id:u,dataFormat:"JSX"})),m=null==t?void 0:t[b];return"success"===(null==m?void 0:m.state)?y(m.target,[r,o]):"error"===(null==m?void 0:m.state)?y(v,[o]):s?(c({source:v,targetLocale:r,metadata:Object.assign(Object.assign({},(null==p?void 0:p.context)&&{context:p.context}),{id:u,hash:b})}),"replace"===l.method?y(v,[o]):"skeleton"===l.method?"":a?y(v,[o]):""):y(v,[o])}),[e,t,r,o,i,s,c,a])}function pr(){return!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__)}function vr(e,t){return k(this,void 0,void 0,(function*(){var r;let n;try{n=yield t(e)}catch(e){}const o=null===(r=f(e))||void 0===r?void 0:r.languageCode;if(o&&o!==e)try{n=yield t(o)}catch(e){console.warn("gt-react Warning: No dictionary was found. Ensure you are either passing your dictionary to the <GTProvider>.",e)}return n}))}function yr(t){var{children:r,projectId:n="",devApiKey:o,dictionary:i,locales:a=[],defaultLocale:h=j,locale:p,cacheUrl:v=O,runtimeUrl:y=T,renderSettings:B=U,loadDictionary:A,loadTranslations:E,fallback:S,ssr:C=pr(),localeCookieName:P=G,translations:H=null,_versionId:z}=t,R=w(t,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadDictionary","loadTranslations","fallback","ssr","localeCookieName","translations","_versionId"]);const{projectId:I,devApiKey:F}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(n,o);a=s((()=>Array.from(new Set([h,...a]))),[h,a]);const[N,L]=dr({defaultLocale:h,locales:a,locale:p,ssr:C,localeCookieName:P}),M=s((()=>!!(I&&y&&F&&"development"===process.env.NODE_ENV)),[I,y,F]),V=s((()=>(E?"custom":v&&I&&"default")||"disabled"),[E]),[K,$]=l(i);c((()=>{if(!A)return;let e=!0;return(()=>{k(this,void 0,void 0,(function*(){const t=W((yield vr(h,A))||{},(yield vr(N,A))||{});e&&$(t||{})}))})(),()=>{e=!1}}),[A,N,h]),s((()=>{if("production"===process.env.NODE_ENV&&F){if(!C)throw new Error("gt-react Error: Production environments cannot include an api key.");if(F.startsWith("gtx-dev-"))throw new Error("gt-react Error: Production environments cannot include a development api key.")}if("custom"===V||!v&&!y||I||"development"!==process.env.NODE_ENV||console.warn("gt-react: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),I&&y&&"custom"!==V&&!F&&"development"===process.env.NODE_ENV&&console.warn("gt-react: A development API key is required for runtime translation! Find your development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),y===T||v===O&&"default"===V){const e=(a||a).filter((e=>!x(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=f(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,F,V,v,y,I,a]);const[X,Y]=s((()=>{const e=b(h,N,a);return[e,e&&m(h,N)]}),[h,N,a]),[q,Z]=l(H||X&&"disabled"!==V?null:{});c((()=>Z(X&&"disabled"!==V?null:{})),[N,V]);const{registerContentForTranslation:Q,registerJsxForTranslation:ee}=function(e){var{projectId:t,devApiKey:r,locale:n,versionId:o,defaultLocale:i,runtimeUrl:a,renderSettings:f,setTranslations:h,runtimeTranslationEnabled:p}=e,v=w(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!p)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};v=Object.assign(Object.assign({},v),{projectId:t,sourceLocale:i});const[y,g]=l(0),_=u(new Map),b=u(new Map);c((()=>{_.current.forEach((e=>e.resolve())),_.current.clear()}),[n]);const[m,x]=s((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=b.current.get(r);if(n)return n;const o=new Promise(((n,o)=>{_.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:o})})).catch((e=>{throw e})).finally((()=>{b.current.delete(r)}));return b.current.set(r,o),o};return[e("content"),e("jsx")]}),[]),B=d(((e,n)=>k(this,void 0,void 0,(function*(){if(0===_.current.size)return{};g((e=>e+1));const i=Array.from(e.values()),s={};try{const c=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});h((e=>Object.assign(Object.assign({},e||{}),c)));const l=(e,t,r)=>k(this,void 0,void 0,(function*(){const n=new AbortController,o=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}finally{void 0!==o&&clearTimeout(o)}})),u=yield l(`${a}/v1/runtime/${t}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},r&&{"x-gt-dev-api-key":r}),body:JSON.stringify({requests:i,targetLocale:n,metadata:v,versionId:o})},f.timeout);if(!u.ok)throw new Error(yield u.text());(yield u.json()).forEach(((e,t)=>{const r=i[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;s[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(D(r.metadata.id,r.metadata.hash),e.error),void(s[n]={state:"error",error:e.error,code:e.code});console.error(D(r.metadata.id,r.metadata.hash),e),s[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){e instanceof Error&&"AbortError"===e.name?console.warn("gt-react: Runtime translation timed out."):console.error("Error fetching batched translations:",e),i.forEach((e=>{s[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return g((e=>e-1)),i.forEach((e=>e.resolve(s[e.metadata.hash]))),s}}))),[a,t,r,v,o,f.timeout]),A=u(y);return c((()=>{A.current=y}),[y]),c((()=>{let e=!0;const t=setInterval((()=>{if(_.current.size>0&&A.current<100){const t=Math.min(25,_.current.size),r=new Map(Array.from(_.current.entries()).slice(0,t));(()=>{k(this,void 0,void 0,(function*(){const t=yield B(r,n);e&&h((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>_.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[n]),{registerContentForTranslation:m,registerJsxForTranslation:x}}(Object.assign({locale:N,versionId:z,projectId:I,runtimeTranslationEnabled:M,defaultLocale:h,devApiKey:F,runtimeUrl:y,renderSettings:B,setTranslations:Z},R));c((()=>{if(q||!X||"disabled"===V)return;let e=!0;return(()=>{k(this,void 0,void 0,(function*(){let t;switch(V){case"custom":if(E)try{t=yield E(N)}catch(e){console.error(((e="")=>`gt-react Error: fetching locally stored translations. If you are using a custom loadTranslations(${e}), make sure it is correctly implemented.`)(N),e)}break;case"default":try{t=yield function(e){return k(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const o=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield o.json()}))}({cacheUrl:v,projectId:I,locale:N,versionId:z})}catch(e){console.error(e)}}t||(t={});try{t=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{})}catch(e){console.error(e)}e&&Z(t)}))})(),()=>{e=!1}}),[q,X,V,v,I,N,z]);const te=function(e,t,r,n,o,i,a,s){return d(((c,l={})=>{if(!c||"string"!=typeof c)return"";const u=g(c),d=(e,t)=>_(e,t,l.variables,l.variablesOptions),f=null==l?void 0:l.id,h=f&&(null==e?void 0:e[f]);let p="";n&&!h&&(p=nr(Object.assign(Object.assign(Object.assign({source:u},(null==l?void 0:l.context)&&{context:l.context}),f&&{id:f}),{dataFormat:"JSX"})));let v=h?null==e?void 0:e[f]:null==e?void 0:e[p];return n&&"error"!==(null==v?void 0:v.state)?"success"===(null==v?void 0:v.state)?d(v.target,[t,r]):i?(a({source:u,targetLocale:t,metadata:Object.assign(Object.assign({},(null==l?void 0:l.context)&&{context:l.context}),{id:f,hash:p||""})}),"replace"===s.method?d(u,[r]):"skeleton"===s.method?"":o?d(u,[r]):""):d(u,[r]):d(u,[r])}),[e,t,r,n,i,a,o])}(q,N,h,X,Y,M,Q,B),re=hr(K,q,N,h,X,Y,M,Q,B),ne=!(X&&!q||!N);return e(J.Provider,{value:{registerContentForTranslation:Q,registerJsxForTranslation:ee,_internalUseGTFunction:te,_internalUseDictFunction:re,runtimeTranslationEnabled:M,locale:N,locales:a,setLocale:L,defaultLocale:h,translations:q,translationRequired:X,dialectTranslationRequired:Y,projectId:I,renderSettings:B},children:ne?r:S})}function gr(r){var{children:n,n:o,locale:i}=r,s=w(r,["children","n","locale"]);const c=a(J);let l;c&&(i||(i=c.locale),l||(l=c.defaultLocale));const u=[...i?[i]:[],l||j];if("number"!=typeof o)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(n));const d=H(o,u,s)||n;return e(t,{children:d})}function _r(r){var{children:n,branch:o}=r,i=w(r,["children","branch"]);const a=(o=null==o?void 0:o.toString())&&void 0!==i[o]?i[o]:n;return e(t,{children:a})}function br(){return X("useLocales(): Unable to access configured locales outside of a <GTProvider>").locales}function mr(){const{setLocale:e}=X("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function xr(e){const t=ur(),r=br(),n=mr(),o=s((()=>{if(!r||0===r.length)return[];const e=r.sort(((e,t)=>(new Intl.Collator).compare(f(e).nativeNameWithRegionCode,f(t).nativeNameWithRegionCode)));return e}),[r]);return{locale:t,locales:e||o,setLocale:n}}function wr(t){var{locales:n}=t,o=w(t,["locales"]);const{locale:i,locales:a,setLocale:s}=xr(n||void 0),c=e=>{return(t=f(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return a&&0!==a.length&&s?r("select",Object.assign({},o,{value:i||"",onChange:e=>s(e.target.value),children:[!i&&e("option",{value:""}),a.map((t=>e("option",{value:t,suppressHydrationWarning:!0,children:c(t)},t)))]})):null}gr.gtTransformation="plural",_r.gtTransformation="branch";export{_r as Branch,Z as Currency,Q as DateTime,yr as GTProvider,wr as LocaleSelector,Y as Num,gr as Plural,ar as T,q as Var,lr as useDefaultLocale,cr as useDict,sr as useGT,ur as useLocale,xr as useLocaleSelector,br as useLocales,mr as useSetLocale};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/translation/inline/T.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAWzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,CAAC,CAAC,EACT,QAAQ,EACR,EAAE,EACF,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,GAAG,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/translation/inline/T.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAWzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,CAAC,CAAC,EACT,QAAQ,EACR,EAAE,EACF,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,GAAG,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2I3B;kBApJQ,CAAC;;;AAwJV,eAAe,CAAC,CAAC"}
|