@mushi-mushi/web 1.25.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,32 @@
1
- (function(){'use strict';var zo=Object.defineProperty;var ft=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Rn=(t,e)=>{for(var r in e)zo(t,r,{get:e[r],enumerable:true});};function Vo(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}function Cn(t,e=""){if(typeof t!="number"){let r=e&&`"${e}" `;throw new TypeError(`${r}expected number, got ${typeof t}`)}if(!Number.isSafeInteger(t)||t<0){let r=e&&`"${e}" `;throw new RangeError(`${r}expected integer >= 0, got ${t}`)}}function mt(t,e,r=""){let n=Vo(t),s=t?.length,o=e!==void 0;if(!n||o){let a=r&&`"${r}" `,i="",l=n?`length=${s}`:`type=${typeof t}`,f=a+"expected Uint8Array"+i+", got "+l;throw n?new RangeError(f):new TypeError(f)}return t}function Tn(t){if(typeof t!="function"||typeof t.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(Cn(t.outputLen),Cn(t.blockLen),t.outputLen<1)throw new Error('"outputLen" must be >= 1');if(t.blockLen<1)throw new Error('"blockLen" must be >= 1')}function Xe(t,e=true){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function $t(t,e){mt(t,void 0,"digestInto() output");let r=e.outputLen;if(t.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function Ae(...t){for(let e=0;e<t.length;e++)t[e].fill(0);}function Lt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ee(t,e){return t<<32-e|t>>>e}function ze(t,e={}){let r=(s,o)=>t(o).update(s).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=s=>t(s),Object.assign(r,e),Object.freeze(r)}var Ve,At=ft(()=>{"use strict";Ve=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});});function Mn(t,e,r){return t&e^~t&r}function In(t,e,r){return t&e^t&r^e&r}var gt,_e,Pe,ne,se,$n=ft(()=>{"use strict";At();gt=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,s){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(e),this.view=Lt(this.buffer);}update(e){Xe(this),mt(e);let{view:r,buffer:n,blockLen:s}=this,o=e.length;for(let a=0;a<o;){let i=Math.min(s-this.pos,o-a);if(i===s){let l=Lt(e);for(;s<=o-a;a+=s)this.process(l,a);continue}n.set(e.subarray(a,a+i),this.pos),this.pos+=i,a+=i,this.pos===s&&(this.process(r,0),this.pos=0);}return this.length+=e.length,this.roundClean(),this}digestInto(e){Xe(this),$t(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:s,isLE:o}=this,{pos:a}=this;r[a++]=128,Ae(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(n,0),a=0);for(let m=a;m<s;m++)r[m]=0;n.setBigUint64(s-8,BigInt(this.length*8),o),this.process(n,0);let i=Lt(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let f=l/4,h=this.get();if(f>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<f;m++)i.setUint32(4*m,h[m],o);}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:r,buffer:n,length:s,finished:o,destroyed:a,pos:i}=this;return e.destroyed=a,e.finished=o,e.length=s,e.pos=i,s%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}},_e=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Pe=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ne=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),se=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function Ko(t,e=false){return e?{h:Number(t&_t),l:Number(t>>Ln&_t)}:{h:Number(t>>Ln&_t)|0,l:Number(t&_t)|0}}function An(t,e=false){let r=t.length,n=new Uint32Array(r),s=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:i}=Ko(t[o],e);[n[o],s[o]]=[a,i];}return [n,s]}function Re(t,e,r,n){let s=(e>>>0)+(n>>>0);return {h:t+r+(s/2**32|0)|0,l:s|0}}var _t,Ln,xr,wr,Ke,Ge,bt,yt,_n,Pn,Dn,Hn,On,Bn,Nn=ft(()=>{"use strict";_t=BigInt(4294967295),Ln=BigInt(32);xr=(t,e,r)=>t>>>r,wr=(t,e,r)=>t<<32-r|e>>>r,Ke=(t,e,r)=>t>>>r|e<<32-r,Ge=(t,e,r)=>t<<32-r|e>>>r,bt=(t,e,r)=>t<<64-r|e>>>r-32,yt=(t,e,r)=>t>>>r-32|e<<64-r;_n=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Pn=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Dn=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Hn=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,On=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Bn=(t,e,r,n,s,o)=>e+r+n+s+o+(t/2**32|0)|0;});var Sr={};Rn(Sr,{_SHA224:()=>Ht,_SHA256:()=>Dt,_SHA384:()=>Bt,_SHA512:()=>Ot,_SHA512_224:()=>Nt,_SHA512_256:()=>Ft,sha224:()=>Qo,sha256:()=>Zo,sha384:()=>ti,sha512:()=>ei,sha512_224:()=>ni,sha512_256:()=>ri});var Yo,Fe,Pt,Dt,Ht,Fn,Xo,Jo,Ue,qe,Je,Ot,Bt,ce,ue,Nt,Ft,Zo,Qo,ei,ti,ri,ni,Er=ft(()=>{"use strict";$n();Nn();At();Yo=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Fe=new Uint32Array(64),Pt=class extends gt{constructor(e){super(64,e,8,!1);}get(){let{A:e,B:r,C:n,D:s,E:o,F:a,G:i,H:l}=this;return [e,r,n,s,o,a,i,l]}set(e,r,n,s,o,a,i,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=o|0,this.F=a|0,this.G=i|0,this.H=l|0;}process(e,r){for(let m=0;m<16;m++,r+=4)Fe[m]=e.getUint32(r,!1);for(let m=16;m<64;m++){let b=Fe[m-15],d=Fe[m-2],v=Ee(b,7)^Ee(b,18)^b>>>3,x=Ee(d,17)^Ee(d,19)^d>>>10;Fe[m]=x+Fe[m-7]+v+Fe[m-16]|0;}let{A:n,B:s,C:o,D:a,E:i,F:l,G:f,H:h}=this;for(let m=0;m<64;m++){let b=Ee(i,6)^Ee(i,11)^Ee(i,25),d=h+b+Mn(i,l,f)+Yo[m]+Fe[m]|0,x=(Ee(n,2)^Ee(n,13)^Ee(n,22))+In(n,s,o)|0;h=f,f=l,l=i,i=a+d|0,a=o,o=s,s=n,n=d+x|0;}n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,i=i+this.E|0,l=l+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,o,a,i,l,f,h);}roundClean(){Ae(Fe);}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ae(this.buffer);}},Dt=class extends Pt{A=_e[0]|0;B=_e[1]|0;C=_e[2]|0;D=_e[3]|0;E=_e[4]|0;F=_e[5]|0;G=_e[6]|0;H=_e[7]|0;constructor(){super(32);}},Ht=class extends Pt{A=Pe[0]|0;B=Pe[1]|0;C=Pe[2]|0;D=Pe[3]|0;E=Pe[4]|0;F=Pe[5]|0;G=Pe[6]|0;H=Pe[7]|0;constructor(){super(28);}},Fn=An(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Xo=Fn[0],Jo=Fn[1],Ue=new Uint32Array(80),qe=new Uint32Array(80),Je=class extends gt{constructor(e){super(128,e,16,!1);}get(){let{Ah:e,Al:r,Bh:n,Bl:s,Ch:o,Cl:a,Dh:i,Dl:l,Eh:f,El:h,Fh:m,Fl:b,Gh:d,Gl:v,Hh:x,Hl:C}=this;return [e,r,n,s,o,a,i,l,f,h,m,b,d,v,x,C]}set(e,r,n,s,o,a,i,l,f,h,m,b,d,v,x,C){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=o|0,this.Cl=a|0,this.Dh=i|0,this.Dl=l|0,this.Eh=f|0,this.El=h|0,this.Fh=m|0,this.Fl=b|0,this.Gh=d|0,this.Gl=v|0,this.Hh=x|0,this.Hl=C|0;}process(e,r){for(let E=0;E<16;E++,r+=4)Ue[E]=e.getUint32(r),qe[E]=e.getUint32(r+=4);for(let E=16;E<80;E++){let w=Ue[E-15]|0,p=qe[E-15]|0,S=Ke(w,p,1)^Ke(w,p,8)^xr(w,p,7),R=Ge(w,p,1)^Ge(w,p,8)^wr(w,p,7),y=Ue[E-2]|0,O=qe[E-2]|0,N=Ke(y,O,19)^bt(y,O,61)^xr(y,O,6),Z=Ge(y,O,19)^yt(y,O,61)^wr(y,O,6),X=Dn(R,Z,qe[E-7],qe[E-16]),j=Hn(X,S,N,Ue[E-7],Ue[E-16]);Ue[E]=j|0,qe[E]=X|0;}let{Ah:n,Al:s,Bh:o,Bl:a,Ch:i,Cl:l,Dh:f,Dl:h,Eh:m,El:b,Fh:d,Fl:v,Gh:x,Gl:C,Hh:I,Hl:T}=this;for(let E=0;E<80;E++){let w=Ke(m,b,14)^Ke(m,b,18)^bt(m,b,41),p=Ge(m,b,14)^Ge(m,b,18)^yt(m,b,41),S=m&d^~m&x,R=b&v^~b&C,y=On(T,p,R,Jo[E],qe[E]),O=Bn(y,I,w,S,Xo[E],Ue[E]),N=y|0,Z=Ke(n,s,28)^bt(n,s,34)^bt(n,s,39),X=Ge(n,s,28)^yt(n,s,34)^yt(n,s,39),j=n&o^n&i^o&i,V=s&a^s&l^a&l;I=x|0,T=C|0,x=d|0,C=v|0,d=m|0,v=b|0,{h:m,l:b}=Re(f|0,h|0,O|0,N|0),f=i|0,h=l|0,i=o|0,l=a|0,o=n|0,a=s|0;let B=_n(N,X,V);n=Pn(B,O,Z,j),s=B|0;}(({h:n,l:s}=Re(this.Ah|0,this.Al|0,n|0,s|0))),{h:o,l:a}=Re(this.Bh|0,this.Bl|0,o|0,a|0),{h:i,l}=Re(this.Ch|0,this.Cl|0,i|0,l|0),{h:f,l:h}=Re(this.Dh|0,this.Dl|0,f|0,h|0),{h:m,l:b}=Re(this.Eh|0,this.El|0,m|0,b|0),{h:d,l:v}=Re(this.Fh|0,this.Fl|0,d|0,v|0),{h:x,l:C}=Re(this.Gh|0,this.Gl|0,x|0,C|0),{h:I,l:T}=Re(this.Hh|0,this.Hl|0,I|0,T|0),this.set(n,s,o,a,i,l,f,h,m,b,d,v,x,C,I,T);}roundClean(){Ae(Ue,qe);}destroy(){this.destroyed=!0,Ae(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},Ot=class extends Je{Ah=se[0]|0;Al=se[1]|0;Bh=se[2]|0;Bl=se[3]|0;Ch=se[4]|0;Cl=se[5]|0;Dh=se[6]|0;Dl=se[7]|0;Eh=se[8]|0;El=se[9]|0;Fh=se[10]|0;Fl=se[11]|0;Gh=se[12]|0;Gl=se[13]|0;Hh=se[14]|0;Hl=se[15]|0;constructor(){super(64);}},Bt=class extends Je{Ah=ne[0]|0;Al=ne[1]|0;Bh=ne[2]|0;Bl=ne[3]|0;Ch=ne[4]|0;Cl=ne[5]|0;Dh=ne[6]|0;Dl=ne[7]|0;Eh=ne[8]|0;El=ne[9]|0;Fh=ne[10]|0;Fl=ne[11]|0;Gh=ne[12]|0;Gl=ne[13]|0;Hh=ne[14]|0;Hl=ne[15]|0;constructor(){super(48);}},ce=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),ue=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),Nt=class extends Je{Ah=ce[0]|0;Al=ce[1]|0;Bh=ce[2]|0;Bl=ce[3]|0;Ch=ce[4]|0;Cl=ce[5]|0;Dh=ce[6]|0;Dl=ce[7]|0;Eh=ce[8]|0;El=ce[9]|0;Fh=ce[10]|0;Fl=ce[11]|0;Gh=ce[12]|0;Gl=ce[13]|0;Hh=ce[14]|0;Hl=ce[15]|0;constructor(){super(28);}},Ft=class extends Je{Ah=ue[0]|0;Al=ue[1]|0;Bh=ue[2]|0;Bl=ue[3]|0;Ch=ue[4]|0;Cl=ue[5]|0;Dh=ue[6]|0;Dl=ue[7]|0;Eh=ue[8]|0;El=ue[9]|0;Fh=ue[10]|0;Fl=ue[11]|0;Gh=ue[12]|0;Gl=ue[13]|0;Hh=ue[14]|0;Hl=ue[15]|0;constructor(){super(32);}},Zo=ze(()=>new Dt,Ve(1)),Qo=ze(()=>new Ht,Ve(4)),ei=ze(()=>new Ot,Ve(3)),ti=ze(()=>new Bt,Ve(2)),ri=ze(()=>new Ft,Ve(6)),ni=ze(()=>new Nt,Ve(5));});var Un={};Rn(Un,{_HMAC:()=>vt,hmac:()=>si});var vt,si,qn=ft(()=>{"use strict";At();vt=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,r){if(Tn(e),mt(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,s=new Uint8Array(n);s.set(r.length>n?e.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Ae(s);}update(e){return Xe(this),this.iHash.update(e),this}digestInto(e){Xe(this),$t(e,this),this.finished=!0;let r=e.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy();}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:r,iHash:n,finished:s,destroyed:o,blockLen:a,outputLen:i}=this;return e=e,e.finished=s,e.destroyed=o,e.blockLen=a,e.outputLen=i,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy();}},si=(()=>{let t=((e,r,n)=>new vt(e,r).update(n).digest());return t.create=(e,r)=>new vt(e,r),t})();});var oi=4194304,os=1.5*1024*1024;function ii(t){try{return JSON.stringify(t)}catch{return null}}function ai(t,e=oi){let r=ii(t);if(r===null)return {ok:false,bytes:0,maxBytes:e,serializeFailed:true,reason:"Report could not be serialized (circular reference in metadata?)"};let n=new TextEncoder().encode(r).length;return n<=e?{ok:true,bytes:n,maxBytes:e}:{ok:false,bytes:n,maxBytes:e,reason:`Report payload ${jn(n)} exceeds limit ${jn(e)}`}}function jn(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`}function is(){try{let r=globalThis.crypto?.subtle;if(r&&typeof r.digest=="function"&&typeof r.importKey=="function"&&typeof r.sign=="function")return r}catch{}return null}function zt(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}async function Ir(t){let e=is();if(e){let n=await e.digest("SHA-256",new TextEncoder().encode(t));return zt(new Uint8Array(n))}let{sha256:r}=await Promise.resolve().then(()=>(Er(),Sr));return zt(r(new TextEncoder().encode(t)))}async function li(t,e){let r=is();if(r){let a=await r.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},false,["sign"]),i=await r.sign("HMAC",a,new TextEncoder().encode(e));return zt(new Uint8Array(i))}let{hmac:n}=await Promise.resolve().then(()=>(qn(),Un)),{sha256:s}=await Promise.resolve().then(()=>(Er(),Sr)),o=n(s,new TextEncoder().encode(t),new TextEncoder().encode(e));return zt(o)}var Wn=false,ci="X-Mushi-User-Token",ui="X-Mushi-Project",as="X-Mushi-SDK-Package",ls="X-Mushi-SDK-Version";function di(t){let e={"Content-Type":"application/json","X-Mushi-Api-Key":t.apiKey,[ui]:t.projectId};return t.sdkPackage&&(e[as]=t.sdkPackage),t.sdkVersion&&(e[ls]=t.sdkVersion),t.userToken&&(e[ci]=t.userToken),t.internalKind&&(e[xt]=t.internalKind),e}var Vt="https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api",xt="X-Mushi-Internal",tt="__mushiInternal",pi=1e4,hi=2,fi=4,mi=3e4;function cs(t){let{projectId:e,apiKey:r,apiEndpoint:n=Vt,timeout:s=pi,maxRetries:o=hi,getUserToken:a,sdkPackage:i,sdkVersion:l,circuitBreaker:f}=t,h=n.replace(/\/$/,""),m=f?.enabled!==false,b=Math.max(1,f?.threshold??fi),d=Math.max(1e3,f?.cooldownMs??mi),v=0,x=0,C=()=>m&&x>Date.now(),I=()=>{v=0,x=0;},T=()=>{m&&(v+=1,v>=b&&(x=Date.now()+d));};async function E(p,S,R,y=o,O,N){if(C())return {ok:false,error:{code:"CIRCUIT_OPEN",message:"Endpoint temporarily unavailable; retrying later."}};let Z=`${h}${S}`,X=new AbortController,j=setTimeout(()=>X.abort(),s),V=a?.()??null;try{let B=await fetch(Z,{method:p,headers:{...di({apiKey:r,projectId:e,sdkPackage:i,sdkVersion:l,userToken:V,internalKind:O}),...N},body:R?JSON.stringify(R):void 0,signal:X.signal,...O?{[tt]:O}:{}});if(clearTimeout(j),B.status===307||B.status===308){let ee=B.headers.get("Location");if(ee&&y>0){let Q=ee.replace(/\/v1\/.*$/,"").replace(/\/$/,"");if(Q!==h)return h=Q,E(p,S,R,y-1,O,N)}}if(!B.ok){let ee=await B.json().catch(()=>({}));if((B.status===401||B.status===403)&&!Wn){Wn=!0;let Q=h===Vt?"Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects":"Get the correct values from your Mushi console's Projects page.";console.error(`[Mushi] Credentials rejected (HTTP ${B.status}). Check your Project ID and API key scope (must be "report:write"). `+Q);}return B.status>=500&&y>0?(await zn(Vn(o-y)),E(p,S,R,y-1,O,N)):(B.status>=500?T():I(),{ok:!1,error:{code:ee.error?.code||`HTTP_${B.status}`,message:ee.error?.message||ee.message||`HTTP ${B.status} error`}})}let P=await B.json(),$=P&&typeof P=="object"&&"ok"in P&&"data"in P?P.data:P;return I(),{ok:!0,data:$}}catch(B){return clearTimeout(j),y>0&&gi(B)?(await zn(Vn(o-y)),E(p,S,R,y-1,O)):(T(),{ok:false,error:{code:"NETWORK_ERROR",message:B instanceof Error?B.message:"Unknown network error"}})}}async function w(p,S,R,y){let O=await Ir(R),N=String(Date.now()),Z=await li(r,`${e}.${N}.${O}`),X=`${h}${S}`,j=await fetch(X,{method:p,headers:{"Content-Type":"application/json","X-Mushi-Api-Key":r,"X-Mushi-Project":e,...i?{[as]:i}:{},...l?{[ls]:l}:{},[xt]:"reporter-poll","X-Reporter-Token-Hash":O,"X-Reporter-Ts":N,"X-Reporter-Hmac":Z},body:y?JSON.stringify(y):void 0,[tt]:"reporter-poll"});if(!j.ok){let B=await j.json().catch(()=>({}));return {ok:false,error:{code:`HTTP_${j.status}`,message:B.error?.message??B.message??`HTTP ${j.status} error`}}}let V=await j.json();return {ok:true,data:V.data??V}}return {async submitReport(p){let S=ai(p);return S.ok?E("POST","/v1/reports",p,o,"report-submit"):{ok:false,error:{code:S.serializeFailed?"SERIALIZE_FAILED":"PAYLOAD_TOO_LARGE",message:S.reason??"Report payload exceeds size limit"}}},async getReportStatus(p){return E("GET",`/v1/reports/${p}/status`,void 0,o,"report-status")},async getSdkConfig(){return E("GET","/v1/sdk/config",void 0,o,"sdk-config")},async askAssistant(p){return E("POST","/v1/sdk/assistant",{message:p.message,threadId:p.threadId??null,context:p.context??null},1,"community")},async getLatestSdkVersion(p){let S=new URLSearchParams({package:p}).toString();return E("GET",`/v1/sdk/latest-version?${S}`,void 0,o,"sdk-config")},async postDiscoveryEvent(p){return E("POST","/v1/sdk/discovery",p,1,"discovery")},async listReporterReports(p){return w("GET","/v1/reporter/reports",p)},async listReporterComments(p,S){return w("GET",`/v1/reporter/reports/${p}/comments`,S)},async replyToReporterReport(p,S,R,y){return w("POST",`/v1/reporter/reports/${p}/reply`,S,{body:R,...y?{feedback_signal:y}:{}})},async reopenReporterReport(p,S,R){return w("POST",`/v1/reporter/reports/${p}/reopen`,S,{note:R??""})},async listNotifications(p,S){let R=new URLSearchParams;S?.since&&R.set("since",S.since),S?.limit&&R.set("limit",String(S.limit));let y=R.size?`?${R.toString()}`:"";return w("GET",`/v1/notifications${y}`,p)},async markNotificationRead(p,S){return w("POST",`/v1/notifications/${p}/read`,S,{})},async listReporterFeatureBoard(p){return w("GET","/v1/reporter/feature-board",p)},async voteReporterFeatureBoard(p,S){return w("POST",`/v1/reporter/feature-board/${p}/vote`,S,{})},async postSessionEvent(p){return E("POST","/v1/sdk/session",p,1,"discovery")},async submitActivity(p,S,R){return E("POST","/v1/sdk/activity",{user_id:p,user_traits:R?.userTraits,opted_in:R?.optedIn,reporter_token_hash:R?.reporterTokenHash,...R?.hostJwt?{host_jwt:R.hostJwt}:{},events:S},1,"discovery")},async getMyPoints(p){return E("GET",`/v1/sdk/me/points?userId=${encodeURIComponent(p)}`,void 0,1,"reporter-poll")},async getMyTier(p){return E("GET",`/v1/sdk/me/tier?userId=${encodeURIComponent(p)}`,void 0,1,"reporter-poll")},async getMyHistory(p,S){let R=new URLSearchParams({userId:p,...S?.limit?{limit:String(S.limit)}:{}});return E("GET",`/v1/sdk/me/history?${R}`,void 0,1,"reporter-poll")},async getHallOfFame(p=10){return E("GET",`/v1/sdk/hall-of-fame?limit=${p}`,void 0,1,"reporter-poll")},async sendMagicLink(p){return E("POST","/v1/tester/magic-link",{email:p},1,"community")},async linkReporterToken(p,S){return E("POST","/v1/tester/link-reporter",{reporter_token_hash:p},1,"community",{Authorization:`Bearer ${S}`})},async getCrossAppReports(p,S){let R=new URLSearchParams;S?.limit&&R.set("limit",String(S.limit)),S?.offset&&R.set("offset",String(S.offset));let y=R.size?`?${R.toString()}`:"";return E("GET",`/v1/tester/cross-app-reports${y}`,void 0,1,"community",{Authorization:`Bearer ${p}`})},async getMyReputation(p){return E("GET","/v1/tester/reputation",void 0,1,"community",{Authorization:`Bearer ${p}`})},async getPublicLeaderboard(p=20){return E("GET",`/v1/public/tester-leaderboard?limit=${p}`,void 0,1,"reporter-poll")},async getTesterStatus(p){return E("GET","/v1/me/tester-status",void 0,1,"community",{Authorization:`Bearer ${p}`})}}}function zn(t){return new Promise(e=>setTimeout(e,t))}function Vn(t){return Math.min(1e3*2**t+Math.random()*500,1e4)}function gi(t){return t instanceof DOMException&&t.name==="AbortError"||t instanceof TypeError}function kr(...t){return t.find(e=>e!==void 0&&e!=="")}function xe(t){try{let e=undefined;return typeof e=="object"&&e!==null?e[t]:void 0}catch{return}}function De(t){try{return t()}catch{return}}function $r(){let t=kr(xe("VITE_MUSHI_PROJECT_ID"),xe("NEXT_PUBLIC_MUSHI_PROJECT_ID"),xe("NUXT_PUBLIC_MUSHI_PROJECT_ID"),xe("EXPO_PUBLIC_MUSHI_PROJECT_ID"),De(()=>process.env.NEXT_PUBLIC_MUSHI_PROJECT_ID),De(()=>process.env.EXPO_PUBLIC_MUSHI_PROJECT_ID),De(()=>process.env.MUSHI_PROJECT_ID)),e=kr(xe("VITE_MUSHI_API_KEY"),xe("NEXT_PUBLIC_MUSHI_API_KEY"),xe("NUXT_PUBLIC_MUSHI_API_KEY"),xe("EXPO_PUBLIC_MUSHI_API_KEY"),De(()=>process.env.NEXT_PUBLIC_MUSHI_API_KEY),De(()=>process.env.EXPO_PUBLIC_MUSHI_API_KEY),De(()=>process.env.MUSHI_API_KEY)),r=kr(xe("VITE_MUSHI_API_ENDPOINT"),xe("NEXT_PUBLIC_MUSHI_API_ENDPOINT"),xe("NUXT_PUBLIC_MUSHI_API_ENDPOINT"),xe("EXPO_PUBLIC_MUSHI_API_ENDPOINT"),De(()=>process.env.NEXT_PUBLIC_MUSHI_API_ENDPOINT),De(()=>process.env.EXPO_PUBLIC_MUSHI_API_ENDPOINT),De(()=>process.env.MUSHI_API_ENDPOINT)),n={};return t&&(n.projectId=t),e&&(n.apiKey=e),r&&(n.apiEndpoint=r),n}var bi=["VITE_","NEXT_PUBLIC_","NUXT_PUBLIC_","EXPO_PUBLIC_",""],yi={projectId:"MUSHI_PROJECT_ID",apiKey:"MUSHI_API_KEY"};function us(){let t=$r(),e=[];if(t.projectId||e.push("projectId"),t.apiKey||e.push("apiKey"),e.length===0)return {resolved:t,missing:e,nearMisses:[],message:null};let r=(()=>{try{let i=undefined;return typeof i=="object"&&i!==null?i:null}catch{return null}})(),n=(()=>{try{return typeof process<"u"&&process.env?process.env:null}catch{return null}})(),s=[];for(let i of e)for(let l of bi){let f=`${l}${yi[i]}`;r&&r[f]?s.push({field:i,key:f,via:"import.meta.env"}):n&&n[f]&&s.push({field:i,key:f,via:"process.env"});}let o=r?"VITE_MUSHI_*":"NEXT_PUBLIC_MUSHI_* (Next.js), EXPO_PUBLIC_MUSHI_* (Expo), or MUSHI_* (Node / React Native)",a=[`[mushi] Missing ${e.join(" and ")} \u2014 the SDK will not initialize.`];for(let i of s)a.push(`[mushi] Found ${i.key} in ${i.via}, but this runtime did not resolve it \u2014 it is either the wrong prefix for your bundler or not exposed to the client bundle.`);return a.push(`[mushi] This runtime reads: ${o}. Set the matching variable(s) and restart your dev server.`),s.length===0&&a.push("[mushi] If you already set the variable, check the prefix: a mis-prefixed var is stripped from client bundles and resolves to undefined with no error."),{resolved:t,missing:e,nearMisses:s,message:a.join(`
2
- `)}}var Kn=["production-calm","beta-loud","internal-debug","manual-only","minimal","standard","full"],vi=["projectId","apiKey","apiEndpoint","timeout","maxRetries","circuitBreaker","preset","runtimeConfig","sentry","widget","capture","privacy","proactive","preFilter","integrations","offline","rewards","assistant","debug","enabled","appVersion","beforeSendFeedback","onCrashedLastRun"];function xi(t){switch(t){case "manual-only":return {widget:{trigger:"manual",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "beta-loud":return {widget:{trigger:"auto",outdatedBanner:"banner"},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};case "internal-debug":return {widget:{trigger:"auto",outdatedBanner:"banner",brandFooter:true},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true,cooldown:{maxProactivePerSession:10,dismissCooldownHours:0,suppressAfterDismissals:99}}};case "production-calm":return {widget:{trigger:"auto",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "minimal":return {widget:{trigger:"auto"},capture:{console:true,network:false,performance:false,screenshot:"on-report",replay:"off",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "full":return {widget:{trigger:"auto"},capture:{console:true,network:true,performance:true,screenshot:"auto",replay:"lite",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};default:return}}function ds(t){let e=xi(t.preset);return e?{...t,widget:{...e.widget,...t.widget},capture:{...e.capture,...t.capture},proactive:{...e.proactive,...t.proactive,cooldown:{...e.proactive?.cooldown,...t.proactive?.cooldown}}}:t}function wi(){let t=e=>e==="1"||e==="true";try{if(typeof process<"u"&&process.env&&t(process.env.MUSHI_SILENT))return !0}catch{}try{let e=undefined;if(e&&typeof e=="object"&&(t(e.MUSHI_SILENT)||t(e.VITE_MUSHI_SILENT)))return !0}catch{}return false}function ps(t){try{if(wi()||!t||typeof t!="object")return;let e=Object.keys(t).filter(r=>!vi.includes(r));e.length>0&&console.error(`[mushi] Unknown config key${e.length>1?"s":""}: ${e.map(r=>`\`${r}\``).join(", ")} \u2014 check for typos (see MushiConfig). Ignored.`),t.preset!==void 0&&!Kn.includes(t.preset)&&console.error(`[mushi] Unknown preset \`${String(t.preset)}\` \u2014 expected one of ${Kn.map(r=>`'${r}'`).join(", ")}. Preset ignored.`);}catch{}}var Si=10,Ei=2e3,ki=[/^(.)\1{10,}$/,/^[A-Z\s!?]{20,}$/,/^[\d\s]+$/,/^[^a-zA-Z\u00C0-\u024F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF]{10,}$/,/^(asdf|qwerty|lorem ipsum)[.,!?\s]*$/i],Ri=/^[bcdfghjklmnpqrstvwxz]{6,}/i;function hs(t={}){let{enabled:e=true,blockObviousSpam:r=true,minDescriptionLength:n=Si,maxDescriptionLength:s=Ei}=t;function o(i){if(!e)return {passed:true};let l=i.trim();if(l.length<n)return {passed:false,reason:`Too short (min ${n} characters)`};if(l.length>s)return {passed:false,reason:`Too long (max ${s} characters)`};if(r){for(let h of ki)if(h.test(l))return {passed:false,reason:"Detected as spam"};if(Ri.test(l))return {passed:false,reason:"Detected as gibberish"};if(l.split(/\s+/).filter(h=>h.length>1).length<2)return {passed:false,reason:"Description needs at least 2 words"}}return {passed:true}}function a(i){let l=i.trim();return l.length<=s?l:l.slice(0,s)+"..."}return {check:o,truncate:a}}var Gn={debug:10,info:20,warn:30,error:40,fatal:50,silent:99},Ci={debug:"DBG",info:"INF",warn:"WRN",error:"ERR",fatal:"FTL"},me={reset:"\x1B[0m",dim:"\x1B[2m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",white:"\x1B[37m",bgRed:"\x1B[41m"},Ti={debug:me.dim,info:me.green,warn:me.yellow,error:me.red,fatal:`${me.bgRed}${me.white}${me.bold}`};function Mi(){try{if(typeof globalThis.Deno<"u")return "json"}catch{}let t=typeof globalThis.process<"u"?globalThis.process:void 0;if(t?.env){if(t.env.NODE_ENV==="production"||t.env.LOG_FORMAT==="json")return "json";if(t.env.LOG_FORMAT==="pretty"||t.stdout?.isTTY)return "pretty"}return typeof globalThis.window<"u"?"pretty":"json"}function Ii(t){let e=[];for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="object"?e.push(`${r}=${JSON.stringify(n)}`):e.push(`${r}=${String(n)}`));return e.join(" ")}function $i(t){let{ts:e,level:r,scope:n,msg:s,...o}=t,a=e.slice(11,23),i=Ti[r]??"",l=Ci[r]??r.toUpperCase(),f=Object.keys(o).length>0?` ${me.dim}${Ii(o)}${me.reset}`:"";return `${me.dim}${a}${me.reset} ${i}${l}${me.reset} ${me.cyan}[${n}]${me.reset} ${s}${f}`}function Li(t){return JSON.stringify(t)}function Ai(t){return t==="stderr"?(e,r)=>{console.error(r);}:(e,r)=>{switch(e){case "error":case "fatal":console.error(r);break;case "warn":console.warn(r);break;default:console.log(r);}}}function fs(t,e,r,n,s){let o=e;function a(i,l,f){if(Gn[i]<Gn[o])return;let h={ts:new Date().toISOString(),level:i,scope:t,msg:l,...r,...f};s(i,n(h));}return {debug:(i,l)=>a("debug",i,l),info:(i,l)=>a("info",i,l),warn:(i,l)=>a("warn",i,l),error:(i,l)=>a("error",i,l),fatal:(i,l)=>a("fatal",i,l),child(i,l){return fs(`${t}:${i}`,o,{...r,...l},n,s)},setLevel(i){o=i;}}}function Yt(t){let{scope:e,level:r="info",meta:n={},format:s="auto",destination:o="stdout"}=t,i=(s==="auto"?Mi():s)==="json"?Li:$i,l=Ai(o);return fs(e,r,n,i,l)}var Lr={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},fatal:()=>{},child:()=>Lr,setLevel:()=>{}},_i="mushi-mushi-keyring",rt="keys",ms="offline-queue/v1",Ut=null,qt=null;function Pi(){return typeof globalThis<"u"&&typeof globalThis.crypto<"u"&&typeof globalThis.crypto.subtle<"u"&&typeof indexedDB<"u"}function gs(){return new Promise((t,e)=>{let r=indexedDB.open(_i,1);r.onupgradeneeded=()=>{let n=r.result;n.objectStoreNames.contains(rt)||n.createObjectStore(rt);},r.onsuccess=()=>t(r.result),r.onerror=()=>e(r.error);})}async function Di(){let t=await gs();return new Promise((e,r)=>{let s=t.transaction(rt,"readonly").objectStore(rt).get(ms);s.onsuccess=()=>e(s.result??null),s.onerror=()=>r(s.error);})}async function Hi(t){let e=await gs();return new Promise((r,n)=>{let s=e.transaction(rt,"readwrite");s.objectStore(rt).put(t,ms),s.oncomplete=()=>r(),s.onerror=()=>n(s.error);})}async function bs(){if(Ut)return Ut;if(qt)return qt;if(!Pi())throw new Error("Web Crypto + IndexedDB required for offline queue encryption");return qt=(async()=>{let t=await Di();if(t)return Ut=t,t;let e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},false,["encrypt","decrypt"]);return await Hi(e),Ut=e,e})(),qt}function Yn(t){let e="";for(let r of t)e+=String.fromCharCode(r);return btoa(e)}function Xn(t){let e=atob(t),r=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function Oi(t){let e=await bs(),r=crypto.getRandomValues(new Uint8Array(12)),n=new TextEncoder().encode(JSON.stringify(t)),s=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,n));return {_mme:1,iv:Yn(r),ct:Yn(s)}}function Bi(t){return !!t&&typeof t=="object"&&t._mme===1&&typeof t.iv=="string"&&typeof t.ct=="string"}async function Ni(t){let e=await bs(),r=Xn(t.iv),n=Xn(t.ct),s=await crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,n);return JSON.parse(new TextDecoder().decode(s))}var Ce=Yt({scope:"mushi:queue",level:"warn"}),Fi="mushi-mushi",fe="offline-reports",Ui=1,Rr="mushi_offline_queue",qi=10,ji=6e4,Wi=3e4,zi=8,Vi=1440*60*1e3;function ys(t={}){let{enabled:e=true,maxQueueSize:r=50,syncOnReconnect:n=true,encryptAtRest:s=true}=t,o=null,a=null,i=null;async function l(A){let _=new Date().toISOString();if(!s)return {...A,queuedAt:_};try{let D=await Oi(A);return {id:A.id,queuedAt:_,payload:D}}catch(D){return Ce.warn("Offline queue: encryption failed, storing plaintext",{err:String(D)}),{...A,queuedAt:_}}}async function f(A){if(h(A))try{return await Ni(A.payload)}catch(_){return Ce.warn("Offline queue: decrypt failed, dropping row",{err:String(_),id:A.id}),null}return A}function h(A){return !!A.payload&&Bi(A.payload)}function m(A){let _=A.attempts;return typeof _=="number"&&Number.isFinite(_)?_:0}function b(A,_){let D=A.queuedAt;if(!D)return false;let U=Date.parse(D);return Number.isNaN(U)?false:_-U>Vi}function d(){return i||(typeof indexedDB<"u"?i="indexeddb":typeof localStorage<"u"?i="localstorage":i="none",i)}function v(){return new Promise((A,_)=>{let D=indexedDB.open(Fi,Ui);D.onupgradeneeded=()=>{let U=D.result;U.objectStoreNames.contains(fe)||U.createObjectStore(fe,{keyPath:"id"});},D.onsuccess=()=>A(D.result),D.onerror=()=>{i="localstorage",_(D.error);};})}async function x(A){let _=await v(),D=await l(A);return new Promise((U,M)=>{let he=_.transaction(fe,"readwrite");he.objectStore(fe).put(D),he.oncomplete=()=>U(),he.onerror=()=>M(he.error);})}async function C(){let A=await v();return new Promise((_,D)=>{let M=A.transaction(fe,"readonly").objectStore(fe).getAll();M.onsuccess=()=>_(M.result),M.onerror=()=>D(M.error);})}async function I(A){let _=await v();return new Promise((D,U)=>{let M=_.transaction(fe,"readwrite");M.objectStore(fe).delete(A),M.oncomplete=()=>D(),M.onerror=()=>U(M.error);})}async function T(A){let _=await v();return new Promise((D,U)=>{let M=_.transaction(fe,"readwrite");M.objectStore(fe).put(A),M.oncomplete=()=>D(),M.onerror=()=>U(M.error);})}async function E(){let A=await v();return new Promise((_,D)=>{let M=A.transaction(fe,"readonly").objectStore(fe).count();M.onsuccess=()=>_(M.result),M.onerror=()=>D(M.error);})}async function w(){let A=await v();return new Promise((_,D)=>{let U=A.transaction(fe,"readwrite");U.objectStore(fe).clear(),U.oncomplete=()=>_(),U.onerror=()=>D(U.error);})}function p(){try{let A=localStorage.getItem(Rr);return A?JSON.parse(A):[]}catch{return []}}function S(A){try{localStorage.setItem(Rr,JSON.stringify(A));}catch{}}async function R(A){let _=p();_.push(await l(A)),S(_);}function y(A){let _=p().filter(D=>D.id!==A);S(_);}function O(A){let _=p(),D=_.findIndex(U=>U.id===A.id);D>=0&&(_[D]=A,S(_));}async function N(A,_){try{A==="indexeddb"?await I(_):y(_);}catch(D){Ce.debug("Offline queue: row removal failed (will age out)",{id:_,err:String(D)});}}async function Z(A,_){try{return A==="indexeddb"?await T(_):O(_),!0}catch(D){return Ce.debug("Offline queue: row persist failed",{id:_.id,err:String(D)}),false}}async function X(A){if(!e)return;if(await P()>=r){Ce.warn("Offline queue full \u2014 dropping report",{maxQueueSize:r});return}let D=d();if(D==="indexeddb")try{await x(A);return}catch{i="localstorage";}if(D==="localstorage"||i==="localstorage"){await R(A);return}}function j(A){return Math.min(1e3*2**A+Math.random()*500,ji)}function V(A){return new Promise(_=>setTimeout(_,A))}async function B(A){if(!e)return {sent:0,failed:0};let _,D=d();if(D==="indexeddb")try{_=await C();}catch{_=p();}else _=p();let U=Date.now(),M=[];for(let q of _)if(b(q,U)){let te=q.id;await N(D,te),Ce.debug("Offline queue: evicting stale report",{id:te});}else M.push(q);_=M;let he=_.slice(0,qi),Ne=0,ie=0;for(let q=0;q<he.length;q++){let te=he[q],ae=te.id,Ie=await f(te);if(!Ie){await N(D,ae),ie++;continue}let W=await A.submitReport(Ie);if(W.ok)await N(D,ae),Ne++;else {let pt=W.error?.code==="HTTP_400"||W.error?.code==="HTTP_413"||W.error?.code==="HTTP_422"||W.error?.code==="INGEST_ERROR"||W.error?.code==="VALIDATION_ERROR"||W.error?.code==="PAYLOAD_TOO_LARGE"||W.error?.code==="SERIALIZE_FAILED"||typeof W.error?.message=="string"&&/invalid payload|description must be at least|validation/i.test(W.error.message),Mt=!pt&&(W.error?.code==="NETWORK_ERROR"||W.error?.code==="HTTP_403"||W.error?.code==="HTTP_429"||W.error?.code==="HTTP_502"||W.error?.code==="HTTP_503"||W.error?.code==="HTTP_504"||typeof W.error?.code=="string"&&W.error.code.startsWith("HTTP_5"));if(pt)await N(D,ae);else if(Mt){let We=m(te)+1;We>=zi?(await N(D,ae),Ce.warn("Offline queue: giving up on report after repeated failures",{id:ae,attempts:We,code:W.error?.code})):(te.attempts=We,await Z(D,te)?Ce.debug("Offline queue: transient failure, will retry",{id:ae,attempts:We,code:W.error?.code}):(await N(D,ae),Ce.warn("Offline queue: dropping report (attempt counter unpersistable)",{id:ae,code:W.error?.code})));}ie++,q<he.length-1&&await V(j(q));}}return {sent:Ne,failed:ie}}async function P(){if(d()==="indexeddb")try{return await E()}catch{return p().length}return p().length}async function $(){if(d()==="indexeddb")try{await w();}catch{}try{localStorage.removeItem(Rr);}catch{}}function ee(A){if(!e||!n||typeof window>"u")return;o&&Q();let _=()=>{navigator.onLine&&B(A).catch(D=>{Ce.warn("Offline queue auto-flush failed",{err:String(D)});});};window.addEventListener("online",_),a=setInterval(()=>{P().then(D=>{D>0&&_();});},Wi),o=()=>{window.removeEventListener("online",_),a&&(clearInterval(a),a=null);};}function Q(){o?.(),o=null;}return {enqueue:X,flush:B,size:P,clear:$,startAutoSync:ee,stopAutoSync:Q}}function Ar(){let t=typeof navigator<"u"?navigator:void 0,e=typeof window<"u"?window:void 0,r=typeof document<"u"?document:void 0,n=typeof screen<"u"?screen:void 0;Gi(t);let s=t&&"connection"in t?t.connection:void 0,o=e,a=!!o?.Capacitor,i=!!o?.cordova,l=t?.product==="ReactNative"||typeof globalThis.HermesInternal<"u",f=a||i||l?{...a?{capacitor:true}:{},...i?{cordova:true}:{},...l?{reactNative:true}:{}}:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",viewport:{width:e?.innerWidth??0,height:e?.innerHeight??0},url:e?.location?.href??"",referrer:r?.referrer??"",timestamp:new Date().toISOString(),timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",connection:s?{effectiveType:s.effectiveType,downlink:s.downlink,rtt:s.rtt}:void 0,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency,route:e?.location?.pathname,nearestTestid:Ki(r),userAgentData:Xi(t),screen:Ji(n,e),prefersColorScheme:Zi(e),prefersReducedMotion:we(e,"(prefers-reduced-motion: reduce)"),prefersReducedData:we(e,"(prefers-reduced-data: reduce)"),prefersContrast:Qi(e),forcedColors:we(e,"(forced-colors: active)"),online:typeof t?.onLine=="boolean"?t.onLine:void 0,displayMode:ea(e),documentTitle:r?.title?.slice(0,200),buildId:ta(r),pageLoadTiming:ra(e),...f?{native:f}:{}}}function Ki(t){if(!t)return;let e=t.activeElement??null,r=0;for(;e&&r<20;){let n=e.getAttribute?.("data-testid");if(n)return n;e=e.parentElement,r++;}}var ke=null,Jn=false;function Gi(t){if(Jn)return;let e=t?.userAgentData;e?.getHighEntropyValues&&(Jn=true,e.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList"]).then(r=>{ke=r;}).catch(()=>{}));}function Yi(t){if(!t?.length)return;let e=t.filter(n=>!/not.?a.?brand/i.test(n.brand));return e.length===0?void 0:e.find(n=>!/chromium|google chrome/i.test(n.brand))??e[0]}function Xi(t){let e=t?.userAgentData;if(!e&&!ke)return;let r=ke?.fullVersionList,n=Yi(r??e?.brands),s={};return n&&(s.browser=n.brand,s.browserVersion=n.version),e?.platform&&(s.os=e.platform),ke?.platformVersion&&(s.osVersion=ke.platformVersion),typeof e?.mobile=="boolean"&&(s.mobile=e.mobile),ke?.model&&(s.model=ke.model),ke?.architecture&&(s.architecture=ke.architecture),ke?.bitness&&(s.bitness=ke.bitness),Object.keys(s).length===0?void 0:s}function Ji(t,e){if(!t&&!e)return;let r={};typeof t?.width=="number"&&(r.width=t.width),typeof t?.height=="number"&&(r.height=t.height),typeof e?.devicePixelRatio=="number"&&(r.devicePixelRatio=e.devicePixelRatio),typeof t?.colorDepth=="number"&&(r.colorDepth=t.colorDepth);let n=t?.orientation?.type;return n&&(r.orientation=n),Object.keys(r).length===0?void 0:r}function we(t,e){if(t?.matchMedia)try{return t.matchMedia(e).matches}catch{return}}function Zi(t){if(t?.matchMedia)return we(t,"(prefers-color-scheme: dark)")?"dark":we(t,"(prefers-color-scheme: light)")?"light":"no-preference"}function Qi(t){if(t?.matchMedia)return we(t,"(prefers-contrast: more)")?"more":we(t,"(prefers-contrast: less)")?"less":we(t,"(prefers-contrast: custom)")?"custom":"no-preference"}function ea(t){if(t?.matchMedia){if(we(t,"(display-mode: fullscreen)"))return "fullscreen";if(we(t,"(display-mode: standalone)"))return "standalone";if(we(t,"(display-mode: minimal-ui)"))return "minimal-ui";if(we(t,"(display-mode: browser)"))return "browser"}}function ta(t){if(!t)return;let r=t.querySelector?.('meta[name="mushi:build"]')?.content?.trim();if(r)return r.slice(0,64)}function ra(t){let e=t?.performance;if(!e?.getEntriesByType)return;let r;try{r=e.getEntriesByType("navigation")[0];}catch{return}if(!r)return;let n=r.startTime??0,s={};return r.domContentLoadedEventEnd>0&&(s.domContentLoadedMs=Math.round(r.domContentLoadedEventEnd-n)),r.loadEventEnd>0&&(s.loadCompleteMs=Math.round(r.loadEventEnd-n)),r.responseStart>0&&(s.timeToFirstByteMs=Math.round(r.responseStart-n)),typeof r.type=="string"&&(s.navigationType=r.type),Object.keys(s).length===0?void 0:s}var Cr="mushi_reporter_token";function na(t){return `mushi:reporter-token:${t}`}function Zn(){if(typeof crypto<"u"&&crypto.randomUUID)return `mushi_${crypto.randomUUID()}`;let t=new Uint8Array(16);if(typeof crypto<"u")crypto.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);return `mushi_${Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}`}function Tr(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(t);return e&&e.length>0?e:null}catch{return null}}function Qn(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(t,e);}catch{}}function oe(t){if(!t){let o=Tr(Cr);if(o)return o;let a=Zn();return Qn(Cr,a),a}let e=na(t),r=Tr(e);if(r)return r;let s=Tr(Cr)??Zn();return Qn(e,s),s}function _r(){let t=typeof crypto<"u"?crypto:void 0;if(t?.randomUUID)return t.randomUUID();let e=new Uint8Array(16);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return `${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20,32)}`}var es="mushi_fingerprint_hash";function sa(){let t=typeof navigator<"u"?navigator:void 0,e=typeof screen<"u"?screen:void 0,r=typeof window<"u"?window:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",screenWidth:e?.width??0,screenHeight:e?.height??0,pixelRatio:r?.devicePixelRatio??1,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency}}async function oa(t){if(typeof crypto<"u"&&crypto.subtle){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return `fbk_${(e>>>0).toString(16).padStart(8,"0")}`}async function vs(){if(typeof localStorage<"u"){let n=localStorage.getItem(es);if(n)return n}let t=sa(),e=JSON.stringify(t),r=await oa(e);if(typeof localStorage<"u")try{localStorage.setItem(es,r);}catch{}return r}var ts="mushi_session_id",jt=null;function nt(){if(jt)return jt;if(typeof sessionStorage<"u"){let e=sessionStorage.getItem(ts);if(e)return jt=e,e}let t=ia();if(jt=t,typeof sessionStorage<"u")try{sessionStorage.setItem(ts,t);}catch{}return t}function ia(){return `ms_${Date.now().toString(36)}_${aa()}`}function aa(){let t=typeof crypto<"u"?crypto:void 0,e=new Uint8Array(4);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);let r=0;for(let n of e)r=r*256+n>>>0;return r.toString(36).padStart(6,"0").slice(0,6)}var la=6e4,Kt=null,xs,Pr=null,ws=null,Gt=0,Wt=null,Mr=false;function ca(){return new Date().toISOString()}function Ze(){return typeof window>"u"?"":window.location.pathname+window.location.search}function ua(){return typeof navigator>"u"?null:navigator.userAgent??null}function Qe(t,e){return {kind:t,session_id:nt(),ts:ca(),page_view_count:Gt,reporter_token_hash:ws,user_id_hash:Pr,user_agent:ua(),sdk_version:xs,...e}}function et(t){Kt&&Kt.postSessionEvent(t).catch(()=>{});}function Ss(t){if(Mr||typeof window>"u")return;Mr=true,Kt=t.client,xs=t.sdkVersion,ws=t.reporterTokenHash??null,Pr=t.userIdHash??null;let e=Ze();Gt=1,et(Qe("session_start",{route:e,referrer:typeof document<"u"?document.referrer??null:null})),Wt=setInterval(()=>{et(Qe("session_heartbeat",{route:Ze()}));},la);let r=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&et(Qe("session_end",{route:Ze()}));};typeof document<"u"&&document.addEventListener("visibilitychange",r,{passive:true}),typeof window<"u"&&window.addEventListener("pagehide",()=>{et(Qe("session_end",{route:Ze()}));},{passive:true}),da();}function Es(t){Pr=t;}function ks(){Wt!=null&&(clearInterval(Wt),Wt=null),Mr=false,Kt=null;}var rs=false;function da(){if(rs||typeof history>"u")return;rs=true;let t=e=>function(...r){let n=e.apply(this,r);return e===history.pushState&&(Gt+=1,et(Qe("page_view",{route:Ze()}))),n};history.pushState=t(history.pushState),history.replaceState=t(history.replaceState),window.addEventListener("popstate",()=>{Gt+=1,et(Qe("page_view",{route:Ze()}));},{passive:true});}var pa=10,ha=1,fa=5e3;function Rs(t={}){let{maxBurst:e=pa,refillRate:r=ha,refillIntervalMs:n=fa}=t,s=e,o=Date.now();function a(){let h=Date.now(),m=h-o,b=Math.floor(m/n);b>0&&(s=Math.min(e,s+b*r),o=h);}function i(){return a(),s>0?(s--,true):false}function l(){s=e,o=Date.now();}function f(){return a(),s}return {tryConsume:i,reset:l,availableTokens:f}}var ma={patterns:[{id:"ssn",configKey:"ssns",source:"\\b\\d{3}-\\d{2}-\\d{4}\\b",replacement:"[REDACTED_SSN]"},{id:"creditCard",configKey:"creditCards",source:"\\b(?:\\d[ -]*){12,18}\\d\\b",replacement:"[REDACTED_CC]"},{id:"awsAccessKey",configKey:"secretTokens",source:"\\b(?:AKIA|ASIA)[0-9A-Z]{16}\\b",replacement:"[REDACTED_AWS_KEY]"},{id:"awsSecretKey",configKey:"secretTokens",source:`(?:aws_secret_access_key|secret_access_key)["'\\s:=]+[A-Za-z0-9/+=]{40}\\b`,caseInsensitive:true,replacement:"aws_secret_access_key=[REDACTED_AWS_SECRET]"},{id:"stripeSecretKey",configKey:"secretTokens",source:"\\b(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{24,}\\b",replacement:"[REDACTED_STRIPE_KEY]"},{id:"stripePublishableKey",configKey:"secretTokens",source:"\\bpk_(?:live|test)_[A-Za-z0-9]{24,}\\b",replacement:"[REDACTED_STRIPE_PK]"},{id:"slackToken",configKey:"secretTokens",source:"\\bxox[abpor]-[A-Za-z0-9-]{10,}\\b",replacement:"[REDACTED_SLACK_TOKEN]"},{id:"githubPatClassic",configKey:"secretTokens",source:"\\bghp_[A-Za-z0-9]{36}\\b",replacement:"[REDACTED_GITHUB_PAT]"},{id:"githubPatFineGrained",configKey:"secretTokens",source:"\\bgithub_pat_[A-Za-z0-9_]{80,}\\b",replacement:"[REDACTED_GITHUB_PAT]"},{id:"openaiKey",configKey:"secretTokens",source:"\\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\\b",replacement:"[REDACTED_OPENAI_KEY]"},{id:"anthropicKey",configKey:"secretTokens",source:"\\bsk-ant-[A-Za-z0-9_-]{20,}\\b",replacement:"[REDACTED_ANTHROPIC_KEY]"},{id:"googleKey",configKey:"secretTokens",source:"\\bAIza[0-9A-Za-z_-]{35}\\b",replacement:"[REDACTED_GOOGLE_KEY]"},{id:"jwt",configKey:"secretTokens",source:"\\beyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b",replacement:"[REDACTED_JWT]"},{id:"email",configKey:"emails",source:"\\b[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}\\b",replacement:"[REDACTED_EMAIL]"},{id:"phone",configKey:"phones",source:"(?:\\+\\d{1,3}[\\s.-])?\\(?\\d{2,4}\\)?[\\s.-]\\d{3,4}[\\s.-]\\d{3,4}\\b",replacement:"[REDACTED_PHONE]"},{id:"ipv4",configKey:"ipAddresses",source:"\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b",replacement:"[REDACTED_IP]",defaultOn:false},{id:"ipv6",configKey:"ipv6",source:"\\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{0,4}\\b",replacement:"[REDACTED_IPV6]",defaultOn:false}]},Cs=ma.patterns,ga=Cs.map(t=>({key:t.configKey,regex:new RegExp(t.source,t.caseInsensitive?"gi":"g"),replacement:t.replacement})),ba=Cs.reduce((t,e)=>(t[e.configKey]=e.defaultOn!==false,t),{});function Ts(t={}){let e={...ba,...t},r=ga.filter(o=>e[o.key]);function n(o){if(!o)return o;let a=o;for(let{regex:i,replacement:l}of r)a=a.replace(new RegExp(i.source,i.flags),l);return a}function s(o,a){let i={...o};for(let l of a)typeof i[l]=="string"&&(i[l]=n(i[l]));return i}return {scrub:n,scrubObject:s}}var ya=50,va=500;function Ms(t={}){let e=Math.max(1,t.max??ya),r=Math.max(50,t.maxMessageLength??va),n=[];return {add(s){let o=typeof s.timestamp=="number"?s.timestamp:Date.now(),a=typeof s.message=="string"&&s.message.length>r?`${s.message.slice(0,r)}\u2026`:s.message,i={timestamp:o,category:s.category,level:s.level??"info",message:a??"",...s.data?{data:s.data}:{}};for(n.push(i);n.length>e;)n.shift();},getAll(){return n.slice()},clear(){n=[];},size(){return n.length}}}var ns=8*1024,xa=1e3;function Is(t){if(t instanceof Error){let e=t.name||"Error",r=t.message||String(t),n=typeof t.stack=="string"&&t.stack.length>0?t.stack.slice(0,ns):void 0,s=t.cause;return {name:e,message:r,...n?{stack:n}:{},...s!==void 0?{cause:s instanceof Error?s.message:s}:{}}}if(typeof t=="string")return {name:"Error",message:t};if(t&&typeof t=="object"){let e=t,r=typeof e.name=="string"?e.name:"Error",n=typeof e.message=="string"?e.message:(()=>{try{return JSON.stringify(e).slice(0,xa)}catch{return String(e)}})(),s=typeof e.stack=="string"?e.stack.slice(0,ns):void 0;return {name:r,message:n,...s?{stack:s}:{}}}return t===void 0?{name:"Error",message:"unknown"}:{name:"Error",message:String(t)}}var de={paper:"#F8F4ED",paperRaised:"#FFFFFF",ink:"#0E0D0B",inkMuted:"#5C5852",inkFaint:"#9A9489",inkDim:"#6E6760",rule:"rgba(14,13,11,0.10)",ruleStrong:"rgba(14,13,11,0.16)",accent:"#E03C2C",accentWash:"rgba(224,60,44,0.08)",accentInk:"#7A1F15",ok:"#16A34A",danger:"#DC2626"},wa={paper:"#0F0E0C",paperRaised:"#1A1815",ink:"#F2EBDD",inkMuted:"#928B7E",inkFaint:"#5A5650",inkDim:"#7A7268",rule:"rgba(242,235,221,0.10)",ruleStrong:"rgba(242,235,221,0.18)",accent:"#FF5A47",accentWash:"rgba(255,90,71,0.12)",accentInk:"#FFE5E0",ok:"#4ADE80",danger:"#F87171"},Dr={free:de.inkMuted,explorer:"#2563EB",contributor:"#7C3AED",champion:"#D97706",default:de.accent},Xt={bg:"#0FFF50",fg:"#0a1a0a",border:"#00C43A"},$s="#FAF7F0",Ls="#ffffff",Hr={light:"#9A2A1E",dark:"#7A1F15"},Or={light:"#B52F1F",dark:"#C4321E"},As={light:{sent:{fg:"#1E4A8C",bg:"rgba(30,74,140,0.08)",border:"rgba(30,74,140,0.16)"},review:{fg:"#8A5A00",bg:"rgba(180,120,0,0.10)",border:"rgba(180,120,0,0.18)"},fixing:{fg:"#9A3D12",bg:"rgba(224,60,44,0.10)",border:"rgba(224,60,44,0.18)"},fixed:{fg:"#1F6B3A",bg:"rgba(31,107,58,0.10)",border:"rgba(31,107,58,0.18)"}},dark:{sent:{fg:"#A8C4FF",bg:"rgba(120,160,255,0.12)",border:"rgba(120,160,255,0.22)"},review:{fg:"#FFD27A",bg:"rgba(255,190,90,0.12)",border:"rgba(255,190,90,0.22)"},fixing:{fg:"#FFB899",bg:"rgba(255,120,60,0.12)",border:"rgba(255,120,60,0.24)"},fixed:{fg:"#8FE3B0",bg:"rgba(80,200,130,0.12)",border:"rgba(80,200,130,0.22)"}}};function Br(t){return t==="dark"?wa:de}var _s={wide:32},Ps={control:4},st={fontDisplay:"'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif",fontBody:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif",fontMono:"ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace",sizeBody:14,lineBody:1.55},ot={base:99999,banner:99998,panel:1e5,overlay:2147483647},Jt={easeStamp:"cubic-bezier(0.22, 1, 0.36, 1)",durationFast:200},it={bannerHeight:36,fabSize:52,edgeTabWidth:32,gutter:24,panelWidth:360,panelMaxHeight:480,panelSheetBreakpoint:480};function ss(t){return /^#[0-9a-fA-F]{3,8}$/.test(t)?t:""}function Ds(t,e="",r=""){let n=Br(t),s=ss(e),o=ss(r),a=s||n.accent,i=s?t==="dark"?`${a}1F`:`${a}14`:n.accentWash,l=o||n.accentInk;return {accent:a,accentWash:i,accentInk:l}}function Sa(t){let e=t.length%4===0?"":"=".repeat(4-t.length%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e;if(typeof atob=="function")return atob(r);let n=globalThis.Buffer;return n?n.from(r,"base64").toString("binary"):""}function Hs(t){if(typeof t!="string")return null;let e=t.split(".");if(e.length!==3)return null;try{let r=Sa(e[1]),n=JSON.parse(r),s=typeof n.projectId=="string"?n.projectId:void 0,o=typeof n.sub=="string"?n.sub:void 0;return !s||!o?null:{projectId:s,sub:o,...typeof n.email=="string"?{email:n.email}:{},...typeof n.name=="string"?{name:n.name}:{},...typeof n.iat=="number"?{iat:n.iat}:{},...typeof n.exp=="number"?{exp:n.exp}:{}}}catch{return null}}var Ea=new Set(["kensaur.us","www.kensaur.us"]),ka={"glot-it":"glot.it",glotit:"glot.it","solo-boss-cloud":"solo-boss.kensaur.us","mushi-mushi":"kensaur.us"},Ra={"mushi-mushi":"https://kensaur.us/mushi-mushi/admin/favicon.svg","solo-boss-cloud":"https://solo-boss.kensaur.us/favicon.svg","glot-it":"https://kensaur.us/glot-it/apple-touch-icon.png",glotit:"https://kensaur.us/glot-it/apple-touch-icon.png"},Ca=["www.google.com","icons.duckduckgo.com","icon.horse"];function Os(t){try{let e=new URL(t).hostname.toLowerCase();return Ca.some(r=>e===r||e.endsWith(`.${r}`))}catch{return false}}function Ta(t,e=32){return [`https://${t}/favicon.svg`,`https://${t}/favicon.ico`,`https://${t}/favicon-32x32.png`,`https://${t}/apple-touch-icon.png`]}function Bs(t){let e=[],r=s=>{let o=s?.trim().toLowerCase();!o||e.includes(o)||e.push(o);};r(Ia(t.repo_url)),r(ka[t.project_slug.toLowerCase()]);let n=t.sdk_origin?Ma(t.sdk_origin):null;return n&&!Ea.has(n)&&r(n),e}function Ns(t,e=32){if(t.icon_url?.trim())return [t.icon_url.trim()];let r=new Set,n=[],s=a=>{!a||r.has(a)||Os(a)||(r.add(a),n.push(a));},o=Ra[t.project_slug.toLowerCase()];o&&s(o);for(let a of Bs(t))for(let i of Ta(a,e))s(i);return n}function Ma(t){let e=t.trim();if(!e||/^(capacitor|file|content|app):/i.test(e))return null;try{let n=new URL(e.includes("://")?e:`https://${e}`).hostname.toLowerCase();return n==="localhost"||n==="127.0.0.1"||n.endsWith(".local")?null:n}catch{return null}}function Ia(t){if(!t?.trim())return null;try{let e=new URL(t.trim()),r=e.hostname.toLowerCase(),n=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);if(n.length<2)return null;let s=n[1].replace(/\.git$/i,"").toLowerCase();return /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(s)||r==="github.com"&&s.endsWith(".github.io")?s:r!=="github.com"&&r!=="www.github.com"?r:null}catch{return null}}function Fs(t){return Bs(t)[0]??null}function Us(t){if(typeof document>"u"||!t.complete||t.naturalWidth===0||t.naturalHeight===0)return false;try{let e=document.createElement("canvas"),r=t.naturalWidth,n=t.naturalHeight;e.width=r,e.height=n;let s=e.getContext("2d");if(!s)return !1;s.drawImage(t,0,0);let{data:o}=s.getImageData(0,0,r,n),a=0,i=0,l=0;for(let h=0;h<o.length;h+=4){let m=o[h],b=o[h+1],d=o[h+2];if(o[h+3]<128)continue;a++;let x=Math.max(m,b,d),C=Math.min(m,b,d),I=x-C;l=Math.max(l,I),i+=I;}return a===0?!0:i/a<14&&l<24}catch{return Os(t.src)}}function qs(t){let e=t.trim().split(/[\s._-]+/).filter(Boolean);return e.length>=2?`${e[0][0]??""}${e[1][0]??""}`.toUpperCase():(t.replace(/[^a-zA-Z0-9]/g,"").slice(0,2)||t.slice(0,2)||"?").toUpperCase()}function js(){if(typeof document>"u")return null;let t=['link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'];for(let e of t){let n=document.querySelector(e)?.href;if(n&&$a(n))return n}return null}function $a(t){try{let e=typeof location<"u"?location.href:void 0,r=new URL(t,e).protocol;return r==="http:"||r==="https:"}catch{return false}}async function zs(t,e=os){if(!t.startsWith("data:image/")||Ws(t)<=e)return t;if(typeof document>"u")return null;let r=new Image;await new Promise((o,a)=>{r.onload=()=>o(),r.onerror=()=>a(new Error("screenshot_decode_failed")),r.src=t;});let n=[.65,.5,.35,.25],s=[1,.85,.7,.55,.4];for(let o of s){let a=document.createElement("canvas"),i=Math.max(1,Math.round(r.naturalWidth*o)),l=Math.max(1,Math.round(r.naturalHeight*o));a.width=i,a.height=l;let f=a.getContext("2d");if(f){f.drawImage(r,0,0,i,l);for(let h of n){let m=a.toDataURL("image/jpeg",h);if(Ws(m)<=e)return m}}}return null}function Ws(t){let e=t.indexOf(",");if(e<0)return t.length;let r=t.slice(e+1);return Math.ceil(r.length*3/4)}var Zt={widget:{trigger:"Report Issue",title:"Report an Issue",close:"Close",back:"Back",submit:"Submit",submitting:"Submitting\u2026",submitted:"Thank you! Your report has been submitted.",error:"Could not send your report. Check your connection and try again."},step1:{heading:"What kind of issue?",reportSectionLabel:"Report an issue",moreNavLabel:"More",moreNav:{yourReports:"Your reports",yourReportsDesc:"See status, developer replies, and respond",unreadNew:"new",communityIdeas:"Community ideas",communityIdeasDesc:"Vote on features and see what shipped",leaderboard:"Leaderboard",joinCommunity:"Join community \xB7 Track reports across apps",myAccount:"My account"},categories:{bug:"Bug",slow:"Slow / Laggy",visual:"Visual Glitch",confusing:"Confusing",other:"Other"},categoryDescriptions:{bug:"Something is broken or not working",slow:"Performance issue or slow loading",visual:"Layout, styling, or display problem",confusing:"Hard to understand or navigate",other:"Something else"}},step2:{heading:"What happened?",intents:{bug:["Crash","Unresponsive","Data loss","Wrong result","Other"],slow:["Page load","Interaction","API call","Animation","Other"],visual:["Layout broken","Overlapping","Missing element","Wrong color/font","Other"],confusing:["Unclear label","Missing help","Unexpected flow","Lost navigation","Other"],other:["Feature request","Accessibility","Typo","Other"]}},step3:{heading:"Tell us more",descriptionPlaceholder:"Describe what happened\u2026",screenshotButton:"Attach Screenshot",screenshotAttached:"Screenshot attached \u2713",screenshotCapturing:"Taking screenshot\u2026",screenshotFailed:"Couldn't capture \u2014 describe it instead",screenshotPreviewAlt:"Preview of the screenshot that will be sent",screenshotSensitiveHint:"Check the preview \u2014 remove it if any private info (balances, personal details) is visible.",elementButton:"Select Element",elementSelected:"Element selected \u2713",elementCapturing:"Click anything on the page\u2026",elementFailed:"Couldn't select \u2014 describe it instead",elementSelectorHint:"Click any element \xB7 Esc to cancel",optional:"(optional)",tooShort:"A bit more detail helps us fix it faster",examplePrompts:["The save button does nothing","Page froze for 10 seconds","Layout looks broken here"]},assistant:{defaultLabel:"Ask",defaultGreeting:"Ask about this page \u2014 I only use what you see here.",inputPlaceholder:"Type your question\u2026",sendAriaLabel:"Send",hubDescription:"Get help using this app",thinking:"Thinking\u2026",errors:{noResponse:"No response \u2014 check your connection and try again.",generic:"Could not reach the assistant. Try again in a moment."}},flows:{eyebrows:{inbox:"Mushi \xB7 Inbox",roadmap:"Mushi \xB7 Roadmap",community:"Mushi \xB7 Community",identity:"Mushi \xB7 Identity",signIn:"Mushi \xB7 Sign in",allApps:"Mushi \xB7 All apps",receipt:"Mushi \xB7 Receipt",thread:"Mushi \xB7 Inbox"},reports:{title:"Your reports",loading:"Loading reports\u2026",empty:"No reports from this browser yet.",leaderboardLink:"Leaderboard"},roadmap:{title:"Community ideas",loading:"Loading ideas\u2026",empty:"No community ideas yet. Be the first to suggest one.",shipped:"Shipped",vote:"Vote",voted:"Voted",voteCount:"{n} votes",untitled:"Untitled idea"},leaderboard:{title:"Global leaderboard",loading:"Loading leaderboard\u2026",empty:"No contributors yet \u2014 be the first!",signInPrompt:"Sign in to see your rank \u2192",myRank:"You are ranked #{rank} this month",footer:"Global contributors this month \xB7 Points refresh monthly",anon:"Anon"},account:{title:"Mushi account",checkEmailTitle:"Check your email",joinTitle:"Join the community",emailLabel:"Email address",emailPlaceholder:"Email",signInPrompt:"Sign in to see your reports across all apps and climb the global leaderboard. No password needed.",magicLinkSent:"We sent a sign-in link to {email}. Click it to connect your reports across apps.",resendEmail:"Resend email",sendLink:"Send sign-in link",sending:"Sending\u2026",crossAppReports:"My reports across all apps \u2192",viewLeaderboard:"View global leaderboard \u2192",signOut:"Sign out",rankSummary:"Rank #{rank} \xB7 {points} pts this month"},crossApp:{title:"My reports",loading:"Loading your reports\u2026",empty:"No reports filed yet.",unknownApp:"Unknown app"},thread:{title:"Report thread",loading:"Loading thread\u2026",empty:"No developer replies yet.",confirmFixed:"Yes, fixed for me",notFixed:"Not fixed yet",replyPlaceholder:"Reply to the developer\u2026",send:"Send"},success:{trackReport:"Track this report \u203A",receipt:"Receipt",delivering:"Delivering to the team\u2026",queuedOffline:"Queued offline",queuedHint:"We'll send it the moment you're back online.",trackOnMushi:"Track on Mushi",slaDefault:"We will review your report.",screenshotDropped:"Sent without the screenshot \u2014 it was too large to attach."},featureRequest:{label:"Feature request",description:"Suggest a change"},poweredBy:"Powered by Mushi v{version}"}};var Vs={widget:{trigger:"\u554F\u984C\u3092\u5831\u544A",title:"\u554F\u984C\u3092\u5831\u544A\u3059\u308B",close:"\u9589\u3058\u308B",back:"\u623B\u308B",submit:"\u9001\u4FE1",submitting:"\u9001\u4FE1\u4E2D\u2026",submitted:"\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01\u30EC\u30DD\u30FC\u30C8\u304C\u9001\u4FE1\u3055\u308C\u307E\u3057\u305F\u3002",error:"\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},step1:{heading:"\u3069\u306E\u3088\u3046\u306A\u554F\u984C\u3067\u3059\u304B\uFF1F",reportSectionLabel:"\u554F\u984C\u3092\u5831\u544A",moreNavLabel:"\u305D\u306E\u4ED6",moreNav:{yourReports:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",yourReportsDesc:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3001\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u3001\u8FD4\u7B54",unreadNew:"\u4EF6\u306E\u65B0\u7740",communityIdeas:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",communityIdeasDesc:"\u6A5F\u80FD\u306B\u6295\u7968\u3057\u3066\u30EA\u30EA\u30FC\u30B9\u72B6\u6CC1\u3092\u78BA\u8A8D",leaderboard:"\u30EA\u30FC\u30C0\u30FC\u30DC\u30FC\u30C9",joinCommunity:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0 \xB7 \u30A2\u30D7\u30EA\u6A2A\u65AD\u3067\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1",myAccount:"\u30DE\u30A4\u30A2\u30AB\u30A6\u30F3\u30C8"},categories:{bug:"\u30D0\u30B0",slow:"\u9045\u3044\u30FB\u91CD\u3044",visual:"\u8868\u793A\u306E\u554F\u984C",confusing:"\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6"},categoryDescriptions:{bug:"\u52D5\u4F5C\u3057\u306A\u3044\u3001\u58CA\u308C\u3066\u3044\u308B",slow:"\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u60AA\u3044\u3001\u8AAD\u307F\u8FBC\u307F\u304C\u9045\u3044",visual:"\u30EC\u30A4\u30A2\u30A6\u30C8\u3001\u30C7\u30B6\u30A4\u30F3\u3001\u8868\u793A\u306E\u554F\u984C",confusing:"\u7406\u89E3\u3057\u306B\u304F\u3044\u3001\u64CD\u4F5C\u304C\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6\u306E\u554F\u984C"}},step2:{heading:"\u4F55\u304C\u8D77\u304D\u307E\u3057\u305F\u304B\uFF1F",intents:{bug:["\u30AF\u30E9\u30C3\u30B7\u30E5","\u7121\u53CD\u5FDC","\u30C7\u30FC\u30BF\u6D88\u5931","\u8AA4\u3063\u305F\u7D50\u679C","\u305D\u306E\u4ED6"],slow:["\u30DA\u30FC\u30B8\u8AAD\u8FBC","\u64CD\u4F5C\u53CD\u5FDC","API\u901A\u4FE1","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3","\u305D\u306E\u4ED6"],visual:["\u30EC\u30A4\u30A2\u30A6\u30C8\u5D29\u308C","\u8981\u7D20\u306E\u91CD\u306A\u308A","\u8981\u7D20\u304C\u8868\u793A\u3055\u308C\u306A\u3044","\u8272/\u30D5\u30A9\u30F3\u30C8\u304C\u9055\u3046","\u305D\u306E\u4ED6"],confusing:["\u30E9\u30D9\u30EB\u304C\u4E0D\u660E\u77AD","\u30D8\u30EB\u30D7\u304C\u306A\u3044","\u4E88\u60F3\u5916\u306E\u30D5\u30ED\u30FC","\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u8FF7\u5B50","\u305D\u306E\u4ED6"],other:["\u6A5F\u80FD\u8981\u671B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3","\u8AA4\u5B57\u8131\u5B57","\u305D\u306E\u4ED6"]}},step3:{heading:"\u8A73\u7D30\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044",descriptionPlaceholder:"\u4F55\u304C\u8D77\u304D\u305F\u304B\u8AAC\u660E\u3057\u3066\u304F\u3060\u3055\u3044\u2026",screenshotButton:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8",screenshotAttached:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8\u6E08\u307F \u2713",screenshotCapturing:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u64AE\u5F71\u4E2D\u2026",screenshotFailed:"\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",screenshotPreviewAlt:"\u9001\u4FE1\u3055\u308C\u308B\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30D7\u30EC\u30D3\u30E5\u30FC",screenshotSensitiveHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u78BA\u8A8D\u3057\u3001\u6B8B\u9AD8\u3084\u500B\u4EBA\u60C5\u5831\u306A\u3069\u304C\u5199\u3063\u3066\u3044\u308C\u3070\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002",elementButton:"\u8981\u7D20\u3092\u9078\u629E",elementSelected:"\u8981\u7D20\u9078\u629E\u6E08\u307F \u2713",elementCapturing:"\u30DA\u30FC\u30B8\u4E0A\u306E\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF\u2026",elementFailed:"\u9078\u629E\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",elementSelectorHint:"\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF \xB7 Esc \u3067\u30AD\u30E3\u30F3\u30BB\u30EB",optional:"\uFF08\u4EFB\u610F\uFF09",tooShort:"\u3082\u3046\u5C11\u3057\u8A73\u3057\u304F\u6559\u3048\u3066\u304F\u3060\u3055\u3044",examplePrompts:["\u4FDD\u5B58\u30DC\u30BF\u30F3\u304C\u53CD\u5FDC\u3057\u306A\u3044","\u30DA\u30FC\u30B8\u304C10\u79D2\u56FA\u307E\u3063\u305F","\u30EC\u30A4\u30A2\u30A6\u30C8\u304C\u5D29\u308C\u3066\u3044\u308B"]},assistant:{defaultLabel:"\u8CEA\u554F",defaultGreeting:"\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u8868\u793A\u3055\u308C\u3066\u3044\u308B\u5185\u5BB9\u3060\u3051\u3092\u4F7F\u3044\u307E\u3059\u3002",inputPlaceholder:"\u8CEA\u554F\u3092\u5165\u529B\u2026",sendAriaLabel:"\u9001\u4FE1",hubDescription:"\u3053\u306E\u30A2\u30D7\u30EA\u306E\u4F7F\u3044\u65B9\u3092\u805E\u304F",thinking:"\u8003\u3048\u4E2D\u2026",errors:{noResponse:"\u5FDC\u7B54\u304C\u3042\u308A\u307E\u305B\u3093 \u2014 \u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",generic:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u53D7\u4FE1\u7BB1",roadmap:"Mushi \xB7 \u30A2\u30A4\u30C7\u30A2",community:"Mushi \xB7 \u30B3\u30DF\u30E5\u30CB\u30C6\u30A3",identity:"Mushi \xB7 \u30A2\u30AB\u30A6\u30F3\u30C8",signIn:"Mushi \xB7 \u30B5\u30A4\u30F3\u30A4\u30F3",allApps:"Mushi \xB7 \u5168\u30A2\u30D7\u30EA",receipt:"Mushi \xB7 \u53D7\u4ED8",thread:"Mushi \xB7 \u53D7\u4FE1\u7BB1"},reports:{title:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u304B\u3089\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",leaderboardLink:"\u30E9\u30F3\u30AD\u30F3\u30B0"},roadmap:{title:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",loading:"\u30A2\u30A4\u30C7\u30A2\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30A2\u30A4\u30C7\u30A2\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u6700\u521D\u306E\u63D0\u6848\u3092\u3069\u3046\u305E\u3002",shipped:"\u30EA\u30EA\u30FC\u30B9\u6E08\u307F",vote:"\u6295\u7968",voted:"\u6295\u7968\u6E08\u307F",voteCount:"{n} \u7968",untitled:"\u7121\u984C\u306E\u30A2\u30A4\u30C7\u30A2"},leaderboard:{title:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0",loading:"\u30E9\u30F3\u30AD\u30F3\u30B0\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u53C2\u52A0\u8005\u304C\u3044\u307E\u305B\u3093 \u2014 \u6700\u521D\u306E\u4E00\u4EBA\u306B\u306A\u308D\u3046\u3002",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u9806\u4F4D\u3092\u898B\u308B \u2192",myRank:"\u4ECA\u6708\u306E\u9806\u4F4D\u306F #{rank}",footer:"\u4ECA\u6708\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8CA2\u732E\u8005 \xB7 \u30DD\u30A4\u30F3\u30C8\u306F\u6BCE\u6708\u30EA\u30BB\u30C3\u30C8",anon:"\u533F\u540D"},account:{title:"Mushi \u30A2\u30AB\u30A6\u30F3\u30C8",checkEmailTitle:"\u30E1\u30FC\u30EB\u3092\u78BA\u8A8D",joinTitle:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0",emailLabel:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",emailPlaceholder:"\u30E1\u30FC\u30EB",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3059\u308B\u3068\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8\u3068\u30E9\u30F3\u30AD\u30F3\u30B0\u304C\u898B\u3089\u308C\u307E\u3059\u3002\u30D1\u30B9\u30EF\u30FC\u30C9\u4E0D\u8981\u3002",magicLinkSent:"{email} \u306B\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308A\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u3092\u958B\u3044\u3066\u30EC\u30DD\u30FC\u30C8\u3092\u63A5\u7D9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",resendEmail:"\u30E1\u30FC\u30EB\u3092\u518D\u9001",sendLink:"\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308B",sending:"\u9001\u4FE1\u4E2D\u2026",crossAppReports:"\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8 \u2192",viewLeaderboard:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0 \u2192",signOut:"\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",rankSummary:"\u9806\u4F4D #{rank} \xB7 \u4ECA\u6708 {points} pts"},crossApp:{title:"\u30DE\u30A4\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30EC\u30DD\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002",unknownApp:"\u4E0D\u660E\u306A\u30A2\u30D7\u30EA"},thread:{title:"\u30EC\u30DD\u30FC\u30C8\u30B9\u30EC\u30C3\u30C9",loading:"\u30B9\u30EC\u30C3\u30C9\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",confirmFixed:"\u306F\u3044\u3001\u76F4\u308A\u307E\u3057\u305F",notFixed:"\u307E\u3060\u76F4\u3063\u3066\u3044\u307E\u305B\u3093",replyPlaceholder:"\u958B\u767A\u8005\u306B\u8FD4\u4FE1\u2026",send:"\u9001\u4FE1"},success:{trackReport:"\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1 \u203A",receipt:"\u53D7\u4ED8",delivering:"\u30C1\u30FC\u30E0\u306B\u9001\u4FE1\u4E2D\u2026",queuedOffline:"\u30AA\u30D5\u30E9\u30A4\u30F3\u5F85\u6A5F\u4E2D",queuedHint:"\u30AA\u30F3\u30E9\u30A4\u30F3\u306B\u623B\u308A\u6B21\u7B2C\u9001\u4FE1\u3057\u307E\u3059\u3002",trackOnMushi:"Mushi\u3067\u8FFD\u8DE1",slaDefault:"\u30EC\u30DD\u30FC\u30C8\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002",screenshotDropped:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306F\u30B5\u30A4\u30BA\u8D85\u904E\u306E\u305F\u3081\u6DFB\u4ED8\u3067\u304D\u305A\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u307F\u9001\u4FE1\u3057\u307E\u3057\u305F\u3002"},featureRequest:{label:"\u6A5F\u80FD\u30EA\u30AF\u30A8\u30B9\u30C8",description:"\u5909\u66F4\u3092\u63D0\u6848"},poweredBy:"Mushi v{version}"}};var Ks={widget:{trigger:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",close:"\u0E1B\u0E34\u0E14",back:"\u0E01\u0E25\u0E31\u0E1A",submit:"\u0E2A\u0E48\u0E07",submitting:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",submitted:"\u0E02\u0E2D\u0E1A\u0E04\u0E38\u0E13\u0E04\u0E23\u0E31\u0E1A/\u0E04\u0E48\u0E30! \u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07\u0E41\u0E25\u0E49\u0E27",error:"\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},step1:{heading:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19?",reportSectionLabel:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",moreNavLabel:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",moreNav:{yourReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",yourReportsDesc:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E41\u0E25\u0E30\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",unreadNew:"\u0E43\u0E2B\u0E21\u0E48",communityIdeas:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",communityIdeasDesc:"\u0E42\u0E2B\u0E27\u0E15\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C\u0E41\u0E25\u0E30\u0E14\u0E39\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",leaderboard:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33",joinCommunity:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19 \xB7 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21\u0E41\u0E2D\u0E1B",myAccount:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19"},categories:{bug:"\u0E1A\u0E31\u0E01",slow:"\u0E0A\u0E49\u0E32 / \u0E41\u0E25\u0E04",visual:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E1C\u0E34\u0E14\u0E1B\u0E01\u0E15\u0E34",confusing:"\u0E2A\u0E31\u0E1A\u0E2A\u0E19",other:"\u0E2D\u0E37\u0E48\u0E19\u0E46"},categoryDescriptions:{bug:"\u0E21\u0E35\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E33\u0E07\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",slow:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E42\u0E2B\u0E25\u0E14\u0E0A\u0E49\u0E32",visual:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C \u0E2A\u0E44\u0E15\u0E25\u0E4C \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25",confusing:"\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E22\u0E32\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E33\u0E17\u0E32\u0E07\u0E22\u0E32\u0E01",other:"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19"}},step2:{heading:"\u0E40\u0E01\u0E34\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E02\u0E36\u0E49\u0E19?",intents:{bug:["\u0E41\u0E04\u0E23\u0E0A","\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07","\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2B\u0E32\u0E22","\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],slow:["\u0E42\u0E2B\u0E25\u0E14\u0E2B\u0E19\u0E49\u0E32","\u0E01\u0E32\u0E23\u0E42\u0E15\u0E49\u0E15\u0E2D\u0E1A","API","\u0E41\u0E2D\u0E19\u0E34\u0E40\u0E21\u0E0A\u0E31\u0E19","\u0E2D\u0E37\u0E48\u0E19\u0E46"],visual:["\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E40\u0E2A\u0E35\u0E22","\u0E0B\u0E49\u0E2D\u0E19\u0E17\u0E31\u0E1A","\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E2B\u0E32\u0E22","\u0E2A\u0E35/\u0E1F\u0E2D\u0E19\u0E15\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],confusing:["\u0E1B\u0E49\u0E32\u0E22\u0E44\u0E21\u0E48\u0E0A\u0E31\u0E14","\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E41\u0E19\u0E30\u0E19\u0E33","\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E44\u0E21\u0E48\u0E04\u0E32\u0E14\u0E04\u0E34\u0E14","\u0E2B\u0E25\u0E07\u0E17\u0E32\u0E07","\u0E2D\u0E37\u0E48\u0E19\u0E46"],other:["\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C","\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07","\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"]}},step3:{heading:"\u0E1A\u0E2D\u0E01\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",descriptionPlaceholder:"\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u2026",screenshotButton:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15",screenshotAttached:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E41\u0E25\u0E49\u0E27 \u2713",screenshotCapturing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E48\u0E32\u0E22\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u2026",screenshotFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E16\u0E48\u0E32\u0E22\u0E20\u0E32\u0E1E\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",screenshotPreviewAlt:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E17\u0E35\u0E48\u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07",screenshotSensitiveHint:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E20\u0E32\u0E1E \u2014 \u0E2B\u0E32\u0E01\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27 (\u0E22\u0E2D\u0E14\u0E40\u0E07\u0E34\u0E19 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25) \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E1A\u0E2D\u0E2D\u0E01",elementButton:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A",elementSelected:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E41\u0E25\u0E49\u0E27 \u2713",elementCapturing:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u2026",elementFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",elementSelectorHint:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49 \xB7 Esc \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",optional:"(\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",tooShort:"\u0E01\u0E23\u0E38\u0E13\u0E32\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",examplePrompts:["\u0E1B\u0E38\u0E48\u0E21\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19","\u0E2B\u0E19\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E19\u0E32\u0E19 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35","\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E1E\u0E31\u0E07"]},assistant:{defaultLabel:"\u0E16\u0E32\u0E21",defaultGreeting:"\u0E16\u0E32\u0E21\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E2B\u0E47\u0E19\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D",inputPlaceholder:"\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E16\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026",sendAriaLabel:"\u0E2A\u0E48\u0E07",hubDescription:"\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",thinking:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",errors:{noResponse:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A \u2014 \u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",generic:"\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E0A\u0E48\u0E27\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32",roadmap:"Mushi \xB7 \u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22",community:"Mushi \xB7 \u0E0A\u0E38\u0E21\u0E0A\u0E19",identity:"Mushi \xB7 \u0E1A\u0E31\u0E0D\u0E0A\u0E35",signIn:"Mushi \xB7 \u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",allApps:"Mushi \xB7 \u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B",receipt:"Mushi \xB7 \u0E43\u0E1A\u0E23\u0E31\u0E1A",thread:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32"},reports:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E08\u0E32\u0E01\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49",leaderboardLink:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33"},roadmap:{title:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22 \u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D\u0E44\u0E14\u0E49",shipped:"\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",vote:"\u0E42\u0E2B\u0E27\u0E15",voted:"\u0E42\u0E2B\u0E27\u0E15\u0E41\u0E25\u0E49\u0E27",voteCount:"{n} \u0E42\u0E2B\u0E27\u0E15",untitled:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D"},leaderboard:{title:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 \u2014 \u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2192",myRank:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E04\u0E37\u0E2D #{rank} \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49",footer:"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49 \xB7 \u0E04\u0E30\u0E41\u0E19\u0E19\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E17\u0E38\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19",anon:"\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D"},account:{title:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35 Mushi",checkEmailTitle:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E2D\u0E35\u0E40\u0E21\u0E25",joinTitle:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19",emailLabel:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",emailPlaceholder:"\u0E2D\u0E35\u0E40\u0E21\u0E25",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E44\u0E15\u0E48\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19",magicLinkSent:"\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48 {email} \u0E41\u0E25\u0E49\u0E27 \u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",resendEmail:"\u0E2A\u0E48\u0E07\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",sendLink:"\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",sending:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",crossAppReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B \u2192",viewLeaderboard:"\u0E14\u0E39\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01 \u2192",signOut:"\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A",rankSummary:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A #{rank} \xB7 {points} pts \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49"},crossApp:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",unknownApp:"\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D"},thread:{title:"\u0E40\u0E18\u0E23\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E40\u0E18\u0E23\u0E14\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E17\u0E35\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",confirmFixed:"\u0E43\u0E0A\u0E48 \u0E41\u0E01\u0E49\u0E41\u0E25\u0E49\u0E27",notFixed:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E41\u0E01\u0E49",replyPlaceholder:"\u0E15\u0E2D\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u2026",send:"\u0E2A\u0E48\u0E07"},success:{trackReport:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49 \u203A",receipt:"\u0E43\u0E1A\u0E23\u0E31\u0E1A",delivering:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E17\u0E35\u0E21\u2026",queuedOffline:"\u0E04\u0E34\u0E27\u0E2D\u0E2D\u0E1F\u0E44\u0E25\u0E19\u0E4C",queuedHint:"\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E2D\u0E2D\u0E19\u0E44\u0E25\u0E19\u0E4C",trackOnMushi:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1A\u0E19 Mushi",slaDefault:"\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",screenshotDropped:"\u0E2A\u0E48\u0E07\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E20\u0E32\u0E1E\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D \u2014 \u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E41\u0E19\u0E1A\u0E44\u0E14\u0E49"},featureRequest:{label:"\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C",description:"\u0E40\u0E2A\u0E19\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"},poweredBy:"Powered by Mushi v{version}"}};var Gs={widget:{trigger:"Reportar problema",title:"Reportar un problema",close:"Cerrar",back:"Volver",submit:"Enviar",submitting:"Enviando\u2026",submitted:"\xA1Gracias! Tu reporte ha sido enviado.",error:"No se pudo enviar tu reporte. Revisa tu conexi\xF3n e int\xE9ntalo de nuevo."},step1:{heading:"\xBFQu\xE9 tipo de problema?",reportSectionLabel:"Reportar un problema",moreNavLabel:"M\xE1s",moreNav:{yourReports:"Tus reportes",yourReportsDesc:"Ver estado, respuestas del desarrollador y responder",unreadNew:"nuevos",communityIdeas:"Ideas de la comunidad",communityIdeasDesc:"Vota funciones y mira qu\xE9 se lanz\xF3",leaderboard:"Clasificaci\xF3n",joinCommunity:"Unirse a la comunidad \xB7 Rastrea reportes entre apps",myAccount:"Mi cuenta"},categories:{bug:"Error",slow:"Lento",visual:"Problema visual",confusing:"Confuso",other:"Otro"},categoryDescriptions:{bug:"Algo est\xE1 roto o no funciona",slow:"Problema de rendimiento o carga lenta",visual:"Problema de dise\xF1o, estilo o visualizaci\xF3n",confusing:"Dif\xEDcil de entender o navegar",other:"Otro problema"}},step2:{heading:"\xBFQu\xE9 pas\xF3?",intents:{bug:["Cierre inesperado","Sin respuesta","P\xE9rdida de datos","Resultado incorrecto","Otro"],slow:["Carga de p\xE1gina","Interacci\xF3n","Llamada API","Animaci\xF3n","Otro"],visual:["Layout roto","Superposici\xF3n","Elemento faltante","Color/fuente incorrecta","Otro"],confusing:["Etiqueta confusa","Sin ayuda","Flujo inesperado","Navegaci\xF3n perdida","Otro"],other:["Solicitud de funci\xF3n","Accesibilidad","Error tipogr\xE1fico","Otro"]}},step3:{heading:"Cu\xE9ntanos m\xE1s",descriptionPlaceholder:"Describe lo que pas\xF3\u2026",screenshotButton:"Adjuntar captura",screenshotAttached:"Captura adjunta \u2713",screenshotCapturing:"Tomando captura\u2026",screenshotFailed:"No se pudo capturar \u2014 descr\xEDbelo en su lugar",screenshotPreviewAlt:"Vista previa de la captura que se enviar\xE1",screenshotSensitiveHint:"Revisa la vista previa \u2014 qu\xEDtala si se ve informaci\xF3n privada (saldos, datos personales).",elementButton:"Seleccionar elemento",elementSelected:"Elemento seleccionado \u2713",elementCapturing:"Haz clic en cualquier elemento\u2026",elementFailed:"No se pudo seleccionar \u2014 descr\xEDbelo en su lugar",elementSelectorHint:"Clic en cualquier elemento \xB7 Esc para cancelar",optional:"(opcional)",tooShort:"Un poco m\xE1s de detalle nos ayuda a resolverlo",examplePrompts:["El bot\xF3n guardar no responde","La p\xE1gina se congel\xF3 10 segundos","El dise\xF1o se ve roto aqu\xED"]},assistant:{defaultLabel:"Preguntar",defaultGreeting:"Pregunta sobre esta p\xE1gina \u2014 solo uso lo que ves aqu\xED.",inputPlaceholder:"Escribe tu pregunta\u2026",sendAriaLabel:"Enviar",hubDescription:"Obt\xE9n ayuda para usar esta app",thinking:"Pensando\u2026",errors:{noResponse:"Sin respuesta \u2014 revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",generic:"No se pudo contactar al asistente. Int\xE9ntalo en un momento."}},flows:{eyebrows:{inbox:"Mushi \xB7 Bandeja",roadmap:"Mushi \xB7 Ideas",community:"Mushi \xB7 Comunidad",identity:"Mushi \xB7 Cuenta",signIn:"Mushi \xB7 Acceso",allApps:"Mushi \xB7 Todas las apps",receipt:"Mushi \xB7 Recibo",thread:"Mushi \xB7 Bandeja"},reports:{title:"Tus reportes",loading:"Cargando reportes\u2026",empty:"A\xFAn no hay reportes en este navegador.",leaderboardLink:"Clasificaci\xF3n"},roadmap:{title:"Ideas de la comunidad",loading:"Cargando ideas\u2026",empty:"A\xFAn no hay ideas. S\xE9 el primero en sugerir una.",shipped:"Publicado",vote:"Votar",voted:"Votado",voteCount:"{n} votos",untitled:"Idea sin t\xEDtulo"},leaderboard:{title:"Clasificaci\xF3n global",loading:"Cargando clasificaci\xF3n\u2026",empty:"A\xFAn no hay colaboradores \u2014 s\xE9 el primero.",signInPrompt:"Inicia sesi\xF3n para ver tu puesto \u2192",myRank:"Est\xE1s en el puesto #{rank} este mes",footer:"Colaboradores globales este mes \xB7 Los puntos se reinician mensualmente",anon:"An\xF3nimo"},account:{title:"Cuenta Mushi",checkEmailTitle:"Revisa tu correo",joinTitle:"\xDAnete a la comunidad",emailLabel:"Correo electr\xF3nico",emailPlaceholder:"Correo",signInPrompt:"Inicia sesi\xF3n para ver tus reportes en todas las apps y subir en la clasificaci\xF3n. Sin contrase\xF1a.",magicLinkSent:"Enviamos un enlace de acceso a {email}. \xC1brelo para conectar tus reportes.",resendEmail:"Reenviar correo",sendLink:"Enviar enlace de acceso",sending:"Enviando\u2026",crossAppReports:"Mis reportes en todas las apps \u2192",viewLeaderboard:"Ver clasificaci\xF3n global \u2192",signOut:"Cerrar sesi\xF3n",rankSummary:"Puesto #{rank} \xB7 {points} pts este mes"},crossApp:{title:"Mis reportes",loading:"Cargando tus reportes\u2026",empty:"A\xFAn no has enviado reportes.",unknownApp:"App desconocida"},thread:{title:"Hilo del reporte",loading:"Cargando hilo\u2026",empty:"A\xFAn no hay respuestas del equipo.",confirmFixed:"S\xED, qued\xF3 resuelto",notFixed:"A\xFAn no est\xE1 resuelto",replyPlaceholder:"Responder al desarrollador\u2026",send:"Enviar"},success:{trackReport:"Seguir este reporte \u203A",receipt:"Recibo",delivering:"Enviando al equipo\u2026",queuedOffline:"En cola sin conexi\xF3n",queuedHint:"Lo enviaremos en cuanto vuelvas a estar en l\xEDnea.",trackOnMushi:"Seguir en Mushi",slaDefault:"Revisaremos tu reporte.",screenshotDropped:"Enviado sin la captura de pantalla \u2014 era demasiado grande para adjuntarla."},featureRequest:{label:"Solicitud de funci\xF3n",description:"Sugerir un cambio"},poweredBy:"Con tecnolog\xEDa de Mushi v{version}"}};var La={en:Zt,ja:Vs,th:Ks,es:Gs};function Nr(t){let e=t&&t!=="auto"?t:typeof navigator<"u"?navigator.language??navigator.languages?.[0]:void 0;if(!e)return Zt;let r=e.split("-")[0].toLowerCase();return La[r]??Zt}function Ys(t,e="",r=""){let n=t==="dark",s=n?"dark":"light",o=Br(s),a=Ds(s,e,r),i=As[s];return {isDark:n,paper:o.paper,paperRaised:o.paperRaised,ink:o.ink,inkMuted:o.inkMuted,inkFaint:o.inkFaint,inkDim:o.inkDim,rule:o.rule,ruleStrong:o.ruleStrong,widgetAccent:a.accent,widgetAccentWash:a.accentWash,widgetAccentInk:a.accentInk,widgetAccentShadow:n?Hr.dark:Hr.light,ok:o.ok,danger:o.danger,onAccent:$s,inverse:Ls,neonBannerBg:Xt.bg,neonBannerFg:Xt.fg,neonBannerBorder:Xt.border,brandBannerBorder:n?Or.dark:Or.light,statusSent:i.sent,statusReview:i.review,statusFixing:i.fixing,statusFixed:i.fixed,statusClosedBg:n?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.05)",fontDisplay:st.fontDisplay,fontBody:st.fontBody,fontMono:st.fontMono,easeStamp:Jt.easeStamp,zBanner:ot.banner,zPanel:ot.panel,zOverlay:ot.overlay,fabSize:it.fabSize,panelWidth:it.panelWidth,panelSheetBreakpoint:it.panelSheetBreakpoint}}function Xs(t,e="",r=""){let n=Ys(t,e,r),{isDark:s,paper:o,paperRaised:a,ink:i,inkMuted:l,inkFaint:f,inkDim:h,rule:m,ruleStrong:b,widgetAccent:d,widgetAccentWash:v,widgetAccentInk:x,widgetAccentShadow:C,ok:I,danger:T,onAccent:E,inverse:w,neonBannerBg:p,neonBannerFg:S,neonBannerBorder:R,brandBannerBorder:y,statusSent:O,statusReview:N,statusFixing:Z,statusFixed:X,statusClosedBg:j,fontDisplay:V,fontBody:B,fontMono:P,easeStamp:$,zBanner:ee,fabSize:Q}=n,{sizeBody:A,lineBody:_}=st,{durationFast:D}=Jt,{bannerHeight:U,gutter:M,panelWidth:he,panelMaxHeight:Ne,panelSheetBreakpoint:ie,edgeTabWidth:q}=it,te=Q+12,{base:ae}=ot,Ie=Ps.control;return `
1
+ (function(){'use strict';var ai=Object.defineProperty;var xt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Un=(t,e)=>{for(var r in e)ai(t,r,{get:e[r],enumerable:true});};function li(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}function Fn(t,e=""){if(typeof t!="number"){let r=e&&`"${e}" `;throw new TypeError(`${r}expected number, got ${typeof t}`)}if(!Number.isSafeInteger(t)||t<0){let r=e&&`"${e}" `;throw new RangeError(`${r}expected integer >= 0, got ${t}`)}}function wt(t,e,r=""){let n=li(t),s=t?.length,o=e!==void 0;if(!n||o){let a=r&&`"${r}" `,i="",l=n?`length=${s}`:`type=${typeof t}`,f=a+"expected Uint8Array"+i+", got "+l;throw n?new RangeError(f):new TypeError(f)}return t}function qn(t){if(typeof t!="function"||typeof t.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(Fn(t.outputLen),Fn(t.blockLen),t.outputLen<1)throw new Error('"outputLen" must be >= 1');if(t.blockLen<1)throw new Error('"blockLen" must be >= 1')}function st(t,e=true){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Wt(t,e){wt(t,void 0,"digestInto() output");let r=e.outputLen;if(t.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function De(...t){for(let e=0;e<t.length;e++)t[e].fill(0);}function zt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ce(t,e){return t<<32-e|t>>>e}function Xe(t,e={}){let r=(s,o)=>t(o).update(s).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=s=>t(s),Object.assign(r,e),Object.freeze(r)}var Ye,Kt=xt(()=>{"use strict";Ye=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});});function jn(t,e,r){return t&e^~t&r}function Wn(t,e,r){return t&e^t&r^e&r}var St,Oe,Be,ae,le,zn=xt(()=>{"use strict";Kt();St=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,s){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(e),this.view=zt(this.buffer);}update(e){st(this),wt(e);let{view:r,buffer:n,blockLen:s}=this,o=e.length;for(let a=0;a<o;){let i=Math.min(s-this.pos,o-a);if(i===s){let l=zt(e);for(;s<=o-a;a+=s)this.process(l,a);continue}n.set(e.subarray(a,a+i),this.pos),this.pos+=i,a+=i,this.pos===s&&(this.process(r,0),this.pos=0);}return this.length+=e.length,this.roundClean(),this}digestInto(e){st(this),Wt(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:s,isLE:o}=this,{pos:a}=this;r[a++]=128,De(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(n,0),a=0);for(let m=a;m<s;m++)r[m]=0;n.setBigUint64(s-8,BigInt(this.length*8),o),this.process(n,0);let i=zt(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let f=l/4,h=this.get();if(f>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<f;m++)i.setUint32(4*m,h[m],o);}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:r,buffer:n,length:s,finished:o,destroyed:a,pos:i}=this;return e.destroyed=a,e.finished=o,e.length=s,e.pos=i,s%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}},Oe=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Be=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ae=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),le=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function ci(t,e=false){return e?{h:Number(t&Vt),l:Number(t>>Kn&Vt)}:{h:Number(t>>Kn&Vt)|0,l:Number(t&Vt)|0}}function Vn(t,e=false){let r=t.length,n=new Uint32Array(r),s=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:i}=ci(t[o],e);[n[o],s[o]]=[a,i];}return [n,s]}function Ie(t,e,r,n){let s=(e>>>0)+(n>>>0);return {h:t+r+(s/2**32|0)|0,l:s|0}}var Vt,Kn,Hr,Pr,Je,Qe,Et,kt,Gn,Xn,Yn,Jn,Qn,Zn,es=xt(()=>{"use strict";Vt=BigInt(4294967295),Kn=BigInt(32);Hr=(t,e,r)=>t>>>r,Pr=(t,e,r)=>t<<32-r|e>>>r,Je=(t,e,r)=>t>>>r|e<<32-r,Qe=(t,e,r)=>t<<32-r|e>>>r,Et=(t,e,r)=>t<<64-r|e>>>r-32,kt=(t,e,r)=>t>>>r-32|e<<64-r;Gn=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Xn=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Yn=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Jn=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Qn=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Zn=(t,e,r,n,s,o)=>e+r+n+s+o+(t/2**32|0)|0;});var Dr={};Un(Dr,{_SHA224:()=>Yt,_SHA256:()=>Xt,_SHA384:()=>Qt,_SHA512:()=>Jt,_SHA512_224:()=>Zt,_SHA512_256:()=>er,sha224:()=>fi,sha256:()=>mi,sha384:()=>bi,sha512:()=>gi,sha512_224:()=>vi,sha512_256:()=>yi});var di,je,Gt,Xt,Yt,ts,pi,hi,We,ze,ot,Jt,Qt,de,pe,Zt,er,mi,fi,gi,bi,yi,vi,Or=xt(()=>{"use strict";zn();es();Kt();di=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),je=new Uint32Array(64),Gt=class extends St{constructor(e){super(64,e,8,!1);}get(){let{A:e,B:r,C:n,D:s,E:o,F:a,G:i,H:l}=this;return [e,r,n,s,o,a,i,l]}set(e,r,n,s,o,a,i,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=o|0,this.F=a|0,this.G=i|0,this.H=l|0;}process(e,r){for(let m=0;m<16;m++,r+=4)je[m]=e.getUint32(r,!1);for(let m=16;m<64;m++){let b=je[m-15],d=je[m-2],x=Ce(b,7)^Ce(b,18)^b>>>3,v=Ce(d,17)^Ce(d,19)^d>>>10;je[m]=v+je[m-7]+x+je[m-16]|0;}let{A:n,B:s,C:o,D:a,E:i,F:l,G:f,H:h}=this;for(let m=0;m<64;m++){let b=Ce(i,6)^Ce(i,11)^Ce(i,25),d=h+b+jn(i,l,f)+di[m]+je[m]|0,v=(Ce(n,2)^Ce(n,13)^Ce(n,22))+Wn(n,s,o)|0;h=f,f=l,l=i,i=a+d|0,a=o,o=s,s=n,n=d+v|0;}n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,i=i+this.E|0,l=l+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,o,a,i,l,f,h);}roundClean(){De(je);}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),De(this.buffer);}},Xt=class extends Gt{A=Oe[0]|0;B=Oe[1]|0;C=Oe[2]|0;D=Oe[3]|0;E=Oe[4]|0;F=Oe[5]|0;G=Oe[6]|0;H=Oe[7]|0;constructor(){super(32);}},Yt=class extends Gt{A=Be[0]|0;B=Be[1]|0;C=Be[2]|0;D=Be[3]|0;E=Be[4]|0;F=Be[5]|0;G=Be[6]|0;H=Be[7]|0;constructor(){super(28);}},ts=Vn(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),pi=ts[0],hi=ts[1],We=new Uint32Array(80),ze=new Uint32Array(80),ot=class extends St{constructor(e){super(128,e,16,!1);}get(){let{Ah:e,Al:r,Bh:n,Bl:s,Ch:o,Cl:a,Dh:i,Dl:l,Eh:f,El:h,Fh:m,Fl:b,Gh:d,Gl:x,Hh:v,Hl:C}=this;return [e,r,n,s,o,a,i,l,f,h,m,b,d,x,v,C]}set(e,r,n,s,o,a,i,l,f,h,m,b,d,x,v,C){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=o|0,this.Cl=a|0,this.Dh=i|0,this.Dl=l|0,this.Eh=f|0,this.El=h|0,this.Fh=m|0,this.Fl=b|0,this.Gh=d|0,this.Gl=x|0,this.Hh=v|0,this.Hl=C|0;}process(e,r){for(let E=0;E<16;E++,r+=4)We[E]=e.getUint32(r),ze[E]=e.getUint32(r+=4);for(let E=16;E<80;E++){let w=We[E-15]|0,u=ze[E-15]|0,S=Je(w,u,1)^Je(w,u,8)^Hr(w,u,7),k=Qe(w,u,1)^Qe(w,u,8)^Pr(w,u,7),A=We[E-2]|0,y=ze[E-2]|0,B=Je(A,y,19)^Et(A,y,61)^Hr(A,y,6),Z=Qe(A,y,19)^kt(A,y,61)^Pr(A,y,6),ie=Yn(k,Z,ze[E-7],ze[E-16]),W=Jn(ie,S,B,We[E-7],We[E-16]);We[E]=W|0,ze[E]=ie|0;}let{Ah:n,Al:s,Bh:o,Bl:a,Ch:i,Cl:l,Dh:f,Dl:h,Eh:m,El:b,Fh:d,Fl:x,Gh:v,Gl:C,Hh:$,Hl:T}=this;for(let E=0;E<80;E++){let w=Je(m,b,14)^Je(m,b,18)^Et(m,b,41),u=Qe(m,b,14)^Qe(m,b,18)^kt(m,b,41),S=m&d^~m&v,k=b&x^~b&C,A=Qn(T,u,k,hi[E],ze[E]),y=Zn(A,$,w,S,pi[E],We[E]),B=A|0,Z=Je(n,s,28)^Et(n,s,34)^Et(n,s,39),ie=Qe(n,s,28)^kt(n,s,34)^kt(n,s,39),W=n&o^n&i^o&i,me=s&a^s&l^a&l;$=v|0,T=C|0,v=d|0,C=x|0,d=m|0,x=b|0,{h:m,l:b}=Ie(f|0,h|0,y|0,B|0),f=i|0,h=l|0,i=o|0,l=a|0,o=n|0,a=s|0;let U=Gn(B,ie,me);n=Xn(U,y,Z,W),s=U|0;}(({h:n,l:s}=Ie(this.Ah|0,this.Al|0,n|0,s|0))),{h:o,l:a}=Ie(this.Bh|0,this.Bl|0,o|0,a|0),{h:i,l}=Ie(this.Ch|0,this.Cl|0,i|0,l|0),{h:f,l:h}=Ie(this.Dh|0,this.Dl|0,f|0,h|0),{h:m,l:b}=Ie(this.Eh|0,this.El|0,m|0,b|0),{h:d,l:x}=Ie(this.Fh|0,this.Fl|0,d|0,x|0),{h:v,l:C}=Ie(this.Gh|0,this.Gl|0,v|0,C|0),{h:$,l:T}=Ie(this.Hh|0,this.Hl|0,$|0,T|0),this.set(n,s,o,a,i,l,f,h,m,b,d,x,v,C,$,T);}roundClean(){De(We,ze);}destroy(){this.destroyed=!0,De(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},Jt=class extends ot{Ah=le[0]|0;Al=le[1]|0;Bh=le[2]|0;Bl=le[3]|0;Ch=le[4]|0;Cl=le[5]|0;Dh=le[6]|0;Dl=le[7]|0;Eh=le[8]|0;El=le[9]|0;Fh=le[10]|0;Fl=le[11]|0;Gh=le[12]|0;Gl=le[13]|0;Hh=le[14]|0;Hl=le[15]|0;constructor(){super(64);}},Qt=class extends ot{Ah=ae[0]|0;Al=ae[1]|0;Bh=ae[2]|0;Bl=ae[3]|0;Ch=ae[4]|0;Cl=ae[5]|0;Dh=ae[6]|0;Dl=ae[7]|0;Eh=ae[8]|0;El=ae[9]|0;Fh=ae[10]|0;Fl=ae[11]|0;Gh=ae[12]|0;Gl=ae[13]|0;Hh=ae[14]|0;Hl=ae[15]|0;constructor(){super(48);}},de=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),pe=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),Zt=class extends ot{Ah=de[0]|0;Al=de[1]|0;Bh=de[2]|0;Bl=de[3]|0;Ch=de[4]|0;Cl=de[5]|0;Dh=de[6]|0;Dl=de[7]|0;Eh=de[8]|0;El=de[9]|0;Fh=de[10]|0;Fl=de[11]|0;Gh=de[12]|0;Gl=de[13]|0;Hh=de[14]|0;Hl=de[15]|0;constructor(){super(28);}},er=class extends ot{Ah=pe[0]|0;Al=pe[1]|0;Bh=pe[2]|0;Bl=pe[3]|0;Ch=pe[4]|0;Cl=pe[5]|0;Dh=pe[6]|0;Dl=pe[7]|0;Eh=pe[8]|0;El=pe[9]|0;Fh=pe[10]|0;Fl=pe[11]|0;Gh=pe[12]|0;Gl=pe[13]|0;Hh=pe[14]|0;Hl=pe[15]|0;constructor(){super(32);}},mi=Xe(()=>new Xt,Ye(1)),fi=Xe(()=>new Yt,Ye(4)),gi=Xe(()=>new Jt,Ye(3)),bi=Xe(()=>new Qt,Ye(2)),yi=Xe(()=>new er,Ye(6)),vi=Xe(()=>new Zt,Ye(5));});var rs={};Un(rs,{_HMAC:()=>Rt,hmac:()=>xi});var Rt,xi,ns=xt(()=>{"use strict";Kt();Rt=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,r){if(qn(e),wt(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,s=new Uint8Array(n);s.set(r.length>n?e.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),De(s);}update(e){return st(this),this.iHash.update(e),this}digestInto(e){st(this),Wt(e,this),this.finished=!0;let r=e.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy();}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:r,iHash:n,finished:s,destroyed:o,blockLen:a,outputLen:i}=this;return e=e,e.finished=s,e.destroyed=o,e.blockLen=a,e.outputLen=i,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy();}},xi=(()=>{let t=((e,r,n)=>new Rt(e,r).update(n).digest());return t.create=(e,r)=>new Rt(e,r),t})();});var wi=4194304,xs=1.5*1024*1024;function Si(t){try{return JSON.stringify(t)}catch{return null}}function Ei(t,e=wi){let r=Si(t);if(r===null)return {ok:false,bytes:0,maxBytes:e,serializeFailed:true,reason:"Report could not be serialized (circular reference in metadata?)"};let n=new TextEncoder().encode(r).length;return n<=e?{ok:true,bytes:n,maxBytes:e}:{ok:false,bytes:n,maxBytes:e,reason:`Report payload ${ss(n)} exceeds limit ${ss(e)}`}}function ss(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`}function ws(){try{let r=globalThis.crypto?.subtle;if(r&&typeof r.digest=="function"&&typeof r.importKey=="function"&&typeof r.sign=="function")return r}catch{}return null}function or(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}async function jr(t){let e=ws();if(e){let n=await e.digest("SHA-256",new TextEncoder().encode(t));return or(new Uint8Array(n))}let{sha256:r}=await Promise.resolve().then(()=>(Or(),Dr));return or(r(new TextEncoder().encode(t)))}async function ki(t,e){let r=ws();if(r){let a=await r.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},false,["sign"]),i=await r.sign("HMAC",a,new TextEncoder().encode(e));return or(new Uint8Array(i))}let{hmac:n}=await Promise.resolve().then(()=>(ns(),rs)),{sha256:s}=await Promise.resolve().then(()=>(Or(),Dr)),o=n(s,new TextEncoder().encode(t),new TextEncoder().encode(e));return or(o)}var os=false,Ri="X-Mushi-User-Token",Ci="X-Mushi-Project",Ss="X-Mushi-SDK-Package",Es="X-Mushi-SDK-Version";function Ti(t){let e={"Content-Type":"application/json","X-Mushi-Api-Key":t.apiKey,[Ci]:t.projectId};return t.sdkPackage&&(e[Ss]=t.sdkPackage),t.sdkVersion&&(e[Es]=t.sdkVersion),t.userToken&&(e[Ri]=t.userToken),t.internalKind&&(e[Ct]=t.internalKind),e}var ir="https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api",Ct="X-Mushi-Internal",ct="__mushiInternal",$i=1e4,Ii=2,Mi=4,Li=3e4;function ks(t){let{projectId:e,apiKey:r,apiEndpoint:n=ir,timeout:s=$i,maxRetries:o=Ii,getUserToken:a,sdkPackage:i,sdkVersion:l,circuitBreaker:f}=t,h=n.replace(/\/$/,""),m=f?.enabled!==false,b=Math.max(1,f?.threshold??Mi),d=Math.max(1e3,f?.cooldownMs??Li),x=0,v=0,C=()=>m&&v>Date.now(),$=()=>{x=0,v=0;},T=()=>{m&&(x+=1,x>=b&&(v=Date.now()+d));};async function E(u,S,k,A=o,y,B){if(C())return {ok:false,error:{code:"CIRCUIT_OPEN",message:"Endpoint temporarily unavailable; retrying later."}};let Z=`${h}${S}`,ie=new AbortController,W=setTimeout(()=>ie.abort(),s),me=a?.()??null;try{let U=await fetch(Z,{method:u,headers:{...Ti({apiKey:r,projectId:e,sdkPackage:i,sdkVersion:l,userToken:me,internalKind:y}),...B},body:k?JSON.stringify(k):void 0,signal:ie.signal,...y?{[ct]:y}:{}});if(clearTimeout(W),U.status===307||U.status===308){let M=U.headers.get("Location");if(M&&A>0){let L=M.replace(/\/v1\/.*$/,"").replace(/\/$/,"");if(L!==h)return h=L,E(u,S,k,A-1,y,B)}}if(!U.ok){let M=await U.json().catch(()=>({}));if((U.status===401||U.status===403)&&!os){os=!0;let L=h===ir?"Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects":"Get the correct values from your Mushi console's Projects page.";console.error(`[Mushi] Credentials rejected (HTTP ${U.status}). Check your Project ID and API key scope (must be "report:write"). `+L);}return U.status>=500&&A>0?(await is(as(o-A)),E(u,S,k,A-1,y,B)):(U.status>=500?T():$(),{ok:!1,error:{code:M.error?.code||`HTTP_${U.status}`,message:M.error?.message||M.message||`HTTP ${U.status} error`}})}let Y=await U.json(),F=Y&&typeof Y=="object"&&"ok"in Y&&"data"in Y?Y.data:Y;return $(),{ok:!0,data:F}}catch(U){return clearTimeout(W),A>0&&Ai(U)?(await is(as(o-A)),E(u,S,k,A-1,y)):(T(),{ok:false,error:{code:"NETWORK_ERROR",message:U instanceof Error?U.message:"Unknown network error"}})}}async function w(u,S,k,A){let y=await jr(k),B=String(Date.now()),Z=await ki(r,`${e}.${B}.${y}`),ie=`${h}${S}`,W=await fetch(ie,{method:u,headers:{"Content-Type":"application/json","X-Mushi-Api-Key":r,"X-Mushi-Project":e,...i?{[Ss]:i}:{},...l?{[Es]:l}:{},[Ct]:"reporter-poll","X-Reporter-Token-Hash":y,"X-Reporter-Ts":B,"X-Reporter-Hmac":Z},body:A?JSON.stringify(A):void 0,[ct]:"reporter-poll"});if(!W.ok){let U=await W.json().catch(()=>({}));return {ok:false,error:{code:`HTTP_${W.status}`,message:U.error?.message??U.message??`HTTP ${W.status} error`}}}let me=await W.json();return {ok:true,data:me.data??me}}return {async submitReport(u){let S=Ei(u);return S.ok?E("POST","/v1/reports",u,o,"report-submit"):{ok:false,error:{code:S.serializeFailed?"SERIALIZE_FAILED":"PAYLOAD_TOO_LARGE",message:S.reason??"Report payload exceeds size limit"}}},async getReportStatus(u){return E("GET",`/v1/reports/${u}/status`,void 0,o,"report-status")},async getSdkConfig(){return E("GET","/v1/sdk/config",void 0,o,"sdk-config")},async askAssistant(u){return E("POST","/v1/sdk/assistant",{message:u.message,threadId:u.threadId??null,context:u.context??null},1,"community")},async getLatestSdkVersion(u){let S=new URLSearchParams({package:u}).toString();return E("GET",`/v1/sdk/latest-version?${S}`,void 0,o,"sdk-config")},async postDiscoveryEvent(u){return E("POST","/v1/sdk/discovery",u,1,"discovery")},async listReporterReports(u){return w("GET","/v1/reporter/reports",u)},async listReporterComments(u,S){return w("GET",`/v1/reporter/reports/${u}/comments`,S)},async replyToReporterReport(u,S,k,A){return w("POST",`/v1/reporter/reports/${u}/reply`,S,{body:k,...A?{feedback_signal:A}:{}})},async reopenReporterReport(u,S,k){return w("POST",`/v1/reporter/reports/${u}/reopen`,S,{note:k??""})},async listNotifications(u,S){let k=new URLSearchParams;S?.since&&k.set("since",S.since),S?.limit&&k.set("limit",String(S.limit));let A=k.size?`?${k.toString()}`:"";return w("GET",`/v1/notifications${A}`,u)},async markNotificationRead(u,S){return w("POST",`/v1/notifications/${u}/read`,S,{})},async listReporterFeatureBoard(u){return w("GET","/v1/reporter/feature-board",u)},async voteReporterFeatureBoard(u,S){return w("POST",`/v1/reporter/feature-board/${u}/vote`,S,{})},async postSessionEvent(u){return E("POST","/v1/sdk/session",u,1,"discovery")},async submitActivity(u,S,k){return E("POST","/v1/sdk/activity",{user_id:u,user_traits:k?.userTraits,opted_in:k?.optedIn,reporter_token_hash:k?.reporterTokenHash,...k?.hostJwt?{host_jwt:k.hostJwt}:{},events:S},1,"discovery")},async getMyPoints(u){return E("GET",`/v1/sdk/me/points?userId=${encodeURIComponent(u)}`,void 0,1,"reporter-poll")},async getMyTier(u){return E("GET",`/v1/sdk/me/tier?userId=${encodeURIComponent(u)}`,void 0,1,"reporter-poll")},async getMyHistory(u,S){let k=new URLSearchParams({userId:u,...S?.limit?{limit:String(S.limit)}:{}});return E("GET",`/v1/sdk/me/history?${k}`,void 0,1,"reporter-poll")},async getHallOfFame(u=10){return E("GET",`/v1/sdk/hall-of-fame?limit=${u}`,void 0,1,"reporter-poll")},async sendMagicLink(u){return E("POST","/v1/tester/magic-link",{email:u},1,"community")},async linkReporterToken(u,S){return E("POST","/v1/tester/link-reporter",{reporter_token_hash:u},1,"community",{Authorization:`Bearer ${S}`})},async getCrossAppReports(u,S){let k=new URLSearchParams;S?.limit&&k.set("limit",String(S.limit)),S?.offset&&k.set("offset",String(S.offset));let A=k.size?`?${k.toString()}`:"";return E("GET",`/v1/tester/cross-app-reports${A}`,void 0,1,"community",{Authorization:`Bearer ${u}`})},async getMyReputation(u){return E("GET","/v1/tester/reputation",void 0,1,"community",{Authorization:`Bearer ${u}`})},async getPublicLeaderboard(u=20){return E("GET",`/v1/public/tester-leaderboard?limit=${u}`,void 0,1,"reporter-poll")},async getTesterStatus(u){return E("GET","/v1/me/tester-status",void 0,1,"community",{Authorization:`Bearer ${u}`})}}}function is(t){return new Promise(e=>setTimeout(e,t))}function as(t){return Math.min(1e3*2**t+Math.random()*500,1e4)}function Ai(t){return t instanceof DOMException&&t.name==="AbortError"||t instanceof TypeError}function Br(...t){return t.find(e=>e!==void 0&&e!=="")}function Ee(t){try{let e=undefined;return typeof e=="object"&&e!==null?e[t]:void 0}catch{return}}function Ne(t){try{return t()}catch{return}}function Wr(){let t=Br(Ee("VITE_MUSHI_PROJECT_ID"),Ee("NEXT_PUBLIC_MUSHI_PROJECT_ID"),Ee("NUXT_PUBLIC_MUSHI_PROJECT_ID"),Ee("EXPO_PUBLIC_MUSHI_PROJECT_ID"),Ne(()=>process.env.NEXT_PUBLIC_MUSHI_PROJECT_ID),Ne(()=>process.env.EXPO_PUBLIC_MUSHI_PROJECT_ID),Ne(()=>process.env.MUSHI_PROJECT_ID)),e=Br(Ee("VITE_MUSHI_API_KEY"),Ee("NEXT_PUBLIC_MUSHI_API_KEY"),Ee("NUXT_PUBLIC_MUSHI_API_KEY"),Ee("EXPO_PUBLIC_MUSHI_API_KEY"),Ne(()=>process.env.NEXT_PUBLIC_MUSHI_API_KEY),Ne(()=>process.env.EXPO_PUBLIC_MUSHI_API_KEY),Ne(()=>process.env.MUSHI_API_KEY)),r=Br(Ee("VITE_MUSHI_API_ENDPOINT"),Ee("NEXT_PUBLIC_MUSHI_API_ENDPOINT"),Ee("NUXT_PUBLIC_MUSHI_API_ENDPOINT"),Ee("EXPO_PUBLIC_MUSHI_API_ENDPOINT"),Ne(()=>process.env.NEXT_PUBLIC_MUSHI_API_ENDPOINT),Ne(()=>process.env.EXPO_PUBLIC_MUSHI_API_ENDPOINT),Ne(()=>process.env.MUSHI_API_ENDPOINT)),n={};return t&&(n.projectId=t),e&&(n.apiKey=e),r&&(n.apiEndpoint=r),n}var _i=["VITE_","NEXT_PUBLIC_","NUXT_PUBLIC_","EXPO_PUBLIC_",""],Hi={projectId:"MUSHI_PROJECT_ID",apiKey:"MUSHI_API_KEY"};function Rs(){let t=Wr(),e=[];if(t.projectId||e.push("projectId"),t.apiKey||e.push("apiKey"),e.length===0)return {resolved:t,missing:e,nearMisses:[],message:null};let r=(()=>{try{let i=undefined;return typeof i=="object"&&i!==null?i:null}catch{return null}})(),n=(()=>{try{return typeof process<"u"&&process.env?process.env:null}catch{return null}})(),s=[];for(let i of e)for(let l of _i){let f=`${l}${Hi[i]}`;r&&r[f]?s.push({field:i,key:f,via:"import.meta.env"}):n&&n[f]&&s.push({field:i,key:f,via:"process.env"});}let o=r?"VITE_MUSHI_*":"NEXT_PUBLIC_MUSHI_* (Next.js), EXPO_PUBLIC_MUSHI_* (Expo), or MUSHI_* (Node / React Native)",a=[`[mushi] Missing ${e.join(" and ")} \u2014 the SDK will not initialize.`];for(let i of s)a.push(`[mushi] Found ${i.key} in ${i.via}, but this runtime did not resolve it \u2014 it is either the wrong prefix for your bundler or not exposed to the client bundle.`);return a.push(`[mushi] This runtime reads: ${o}. Set the matching variable(s) and restart your dev server.`),s.length===0&&a.push("[mushi] If you already set the variable, check the prefix: a mis-prefixed var is stripped from client bundles and resolves to undefined with no error."),{resolved:t,missing:e,nearMisses:s,message:a.join(`
2
+ `)}}var ls=["production-calm","beta-loud","internal-debug","manual-only","minimal","standard","full"],Pi=["projectId","apiKey","apiEndpoint","timeout","maxRetries","circuitBreaker","preset","runtimeConfig","sentry","widget","capture","privacy","proactive","preFilter","integrations","offline","rewards","assistant","debug","enabled","appVersion","sampleRate","beforeSend","beforeSendFeedback","onCrashedLastRun"];function Di(t){switch(t){case "manual-only":return {widget:{trigger:"manual",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "beta-loud":return {widget:{trigger:"auto",outdatedBanner:"banner"},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};case "internal-debug":return {widget:{trigger:"auto",outdatedBanner:"banner",brandFooter:true},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true,cooldown:{maxProactivePerSession:10,dismissCooldownHours:0,suppressAfterDismissals:99}}};case "production-calm":return {widget:{trigger:"auto",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "minimal":return {widget:{trigger:"auto"},capture:{console:true,network:false,performance:false,screenshot:"on-report",replay:"off",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "full":return {widget:{trigger:"auto"},capture:{console:true,network:true,performance:true,screenshot:"auto",replay:"lite",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};default:return}}function Cs(t){let e=Di(t.preset);return e?{...t,widget:{...e.widget,...t.widget},capture:{...e.capture,...t.capture},proactive:{...e.proactive,...t.proactive,cooldown:{...e.proactive?.cooldown,...t.proactive?.cooldown}}}:t}function Oi(){let t=e=>e==="1"||e==="true";try{if(typeof process<"u"&&process.env&&t(process.env.MUSHI_SILENT))return !0}catch{}try{let e=undefined;if(e&&typeof e=="object"&&(t(e.MUSHI_SILENT)||t(e.VITE_MUSHI_SILENT)))return !0}catch{}return false}function Ts(t){try{if(Oi()||!t||typeof t!="object")return;let e=Object.keys(t).filter(r=>!Pi.includes(r));e.length>0&&console.error(`[mushi] Unknown config key${e.length>1?"s":""}: ${e.map(r=>`\`${r}\``).join(", ")} \u2014 check for typos (see MushiConfig). Ignored.`),t.preset!==void 0&&!ls.includes(t.preset)&&console.error(`[mushi] Unknown preset \`${String(t.preset)}\` \u2014 expected one of ${ls.map(r=>`'${r}'`).join(", ")}. Preset ignored.`);}catch{}}var Bi=10,Ni=2e3,Ui=[/^(.)\1{10,}$/,/^[A-Z\s!?]{20,}$/,/^[\d\s]+$/,/^[^a-zA-Z\u00C0-\u024F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF]{10,}$/,/^(asdf|qwerty|lorem ipsum)[.,!?\s]*$/i],Fi=/^[bcdfghjklmnpqrstvwxz]{6,}/i;function $s(t={}){let{enabled:e=true,blockObviousSpam:r=true,minDescriptionLength:n=Bi,maxDescriptionLength:s=Ni}=t;function o(i){if(!e)return {passed:true};let l=i.trim();if(l.length<n)return {passed:false,reason:`Too short (min ${n} characters)`};if(l.length>s)return {passed:false,reason:`Too long (max ${s} characters)`};if(r){for(let h of Ui)if(h.test(l))return {passed:false,reason:"Detected as spam"};if(Fi.test(l))return {passed:false,reason:"Detected as gibberish"};if(l.split(/\s+/).filter(h=>h.length>1).length<2)return {passed:false,reason:"Description needs at least 2 words"}}return {passed:true}}function a(i){let l=i.trim();return l.length<=s?l:l.slice(0,s)+"..."}return {check:o,truncate:a}}var cs={debug:10,info:20,warn:30,error:40,fatal:50,silent:99},qi={debug:"DBG",info:"INF",warn:"WRN",error:"ERR",fatal:"FTL"},ye={reset:"\x1B[0m",dim:"\x1B[2m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",white:"\x1B[37m",bgRed:"\x1B[41m"},ji={debug:ye.dim,info:ye.green,warn:ye.yellow,error:ye.red,fatal:`${ye.bgRed}${ye.white}${ye.bold}`};function Wi(){try{if(typeof globalThis.Deno<"u")return "json"}catch{}let t=typeof globalThis.process<"u"?globalThis.process:void 0;if(t?.env){if(t.env.NODE_ENV==="production"||t.env.LOG_FORMAT==="json")return "json";if(t.env.LOG_FORMAT==="pretty"||t.stdout?.isTTY)return "pretty"}return typeof globalThis.window<"u"?"pretty":"json"}function zi(t){let e=[];for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="object"?e.push(`${r}=${JSON.stringify(n)}`):e.push(`${r}=${String(n)}`));return e.join(" ")}function Ki(t){let{ts:e,level:r,scope:n,msg:s,...o}=t,a=e.slice(11,23),i=ji[r]??"",l=qi[r]??r.toUpperCase(),f=Object.keys(o).length>0?` ${ye.dim}${zi(o)}${ye.reset}`:"";return `${ye.dim}${a}${ye.reset} ${i}${l}${ye.reset} ${ye.cyan}[${n}]${ye.reset} ${s}${f}`}function Vi(t){return JSON.stringify(t)}function Gi(t){return t==="stderr"?(e,r)=>{console.error(r);}:(e,r)=>{switch(e){case "error":case "fatal":console.error(r);break;case "warn":console.warn(r);break;default:console.log(r);}}}function Is(t,e,r,n,s){let o=e;function a(i,l,f){if(cs[i]<cs[o])return;let h={ts:new Date().toISOString(),level:i,scope:t,msg:l,...r,...f};s(i,n(h));}return {debug:(i,l)=>a("debug",i,l),info:(i,l)=>a("info",i,l),warn:(i,l)=>a("warn",i,l),error:(i,l)=>a("error",i,l),fatal:(i,l)=>a("fatal",i,l),child(i,l){return Is(`${t}:${i}`,o,{...r,...l},n,s)},setLevel(i){o=i;}}}function cr(t){let{scope:e,level:r="info",meta:n={},format:s="auto",destination:o="stdout"}=t,i=(s==="auto"?Wi():s)==="json"?Vi:Ki,l=Gi(o);return Is(e,r,n,i,l)}var zr={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},fatal:()=>{},child:()=>zr,setLevel:()=>{}},Xi="mushi-mushi-keyring",ut="keys",Ms="offline-queue/v1",tr=null,rr=null;function Yi(){return typeof globalThis<"u"&&typeof globalThis.crypto<"u"&&typeof globalThis.crypto.subtle<"u"&&typeof indexedDB<"u"}function Ls(){return new Promise((t,e)=>{let r=indexedDB.open(Xi,1);r.onupgradeneeded=()=>{let n=r.result;n.objectStoreNames.contains(ut)||n.createObjectStore(ut);},r.onsuccess=()=>t(r.result),r.onerror=()=>e(r.error);})}async function Ji(){let t=await Ls();return new Promise((e,r)=>{let s=t.transaction(ut,"readonly").objectStore(ut).get(Ms);s.onsuccess=()=>e(s.result??null),s.onerror=()=>r(s.error);})}async function Qi(t){let e=await Ls();return new Promise((r,n)=>{let s=e.transaction(ut,"readwrite");s.objectStore(ut).put(t,Ms),s.oncomplete=()=>r(),s.onerror=()=>n(s.error);})}async function As(){if(tr)return tr;if(rr)return rr;if(!Yi())throw new Error("Web Crypto + IndexedDB required for offline queue encryption");return rr=(async()=>{let t=await Ji();if(t)return tr=t,t;let e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},false,["encrypt","decrypt"]);return await Qi(e),tr=e,e})(),rr}function us(t){let e="";for(let r of t)e+=String.fromCharCode(r);return btoa(e)}function ds(t){let e=atob(t),r=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function Zi(t){let e=await As(),r=crypto.getRandomValues(new Uint8Array(12)),n=new TextEncoder().encode(JSON.stringify(t)),s=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,n));return {_mme:1,iv:us(r),ct:us(s)}}function ea(t){return !!t&&typeof t=="object"&&t._mme===1&&typeof t.iv=="string"&&typeof t.ct=="string"}async function ta(t){let e=await As(),r=ds(t.iv),n=ds(t.ct),s=await crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,n);return JSON.parse(new TextDecoder().decode(s))}var Me=cr({scope:"mushi:queue",level:"warn"}),ra="mushi-mushi",be="offline-reports",na=1,Nr="mushi_offline_queue",sa=10,oa=6e4,ia=3e4,aa=8,la=1440*60*1e3;function _s(t={}){let{enabled:e=true,maxQueueSize:r=50,syncOnReconnect:n=true,encryptAtRest:s=true}=t,o=null,a=null,i=null;async function l(I){let _=new Date().toISOString();if(!s)return {...I,queuedAt:_};try{let H=await Zi(I);return {id:I.id,queuedAt:_,payload:H}}catch(H){return Me.warn("Offline queue: encryption failed, storing plaintext",{err:String(H)}),{...I,queuedAt:_}}}async function f(I){if(h(I))try{return await ta(I.payload)}catch(_){return Me.warn("Offline queue: decrypt failed, dropping row",{err:String(_),id:I.id}),null}return I}function h(I){return !!I.payload&&ea(I.payload)}function m(I){let _=I.attempts;return typeof _=="number"&&Number.isFinite(_)?_:0}function b(I,_){let H=I.queuedAt;if(!H)return false;let V=Date.parse(H);return Number.isNaN(V)?false:_-V>la}function d(){return i||(typeof indexedDB<"u"?i="indexeddb":typeof localStorage<"u"?i="localstorage":i="none",i)}function x(){return new Promise((I,_)=>{let H=indexedDB.open(ra,na);H.onupgradeneeded=()=>{let V=H.result;V.objectStoreNames.contains(be)||V.createObjectStore(be,{keyPath:"id"});},H.onsuccess=()=>I(H.result),H.onerror=()=>{i="localstorage",_(H.error);};})}async function v(I){let _=await x(),H=await l(I);return new Promise((V,q)=>{let O=_.transaction(be,"readwrite");O.objectStore(be).put(H),O.oncomplete=()=>V(),O.onerror=()=>q(O.error);})}async function C(){let I=await x();return new Promise((_,H)=>{let q=I.transaction(be,"readonly").objectStore(be).getAll();q.onsuccess=()=>_(q.result),q.onerror=()=>H(q.error);})}async function $(I){let _=await x();return new Promise((H,V)=>{let q=_.transaction(be,"readwrite");q.objectStore(be).delete(I),q.oncomplete=()=>H(),q.onerror=()=>V(q.error);})}async function T(I){let _=await x();return new Promise((H,V)=>{let q=_.transaction(be,"readwrite");q.objectStore(be).put(I),q.oncomplete=()=>H(),q.onerror=()=>V(q.error);})}async function E(){let I=await x();return new Promise((_,H)=>{let q=I.transaction(be,"readonly").objectStore(be).count();q.onsuccess=()=>_(q.result),q.onerror=()=>H(q.error);})}async function w(){let I=await x();return new Promise((_,H)=>{let V=I.transaction(be,"readwrite");V.objectStore(be).clear(),V.oncomplete=()=>_(),V.onerror=()=>H(V.error);})}function u(){try{let I=localStorage.getItem(Nr);return I?JSON.parse(I):[]}catch{return []}}function S(I){try{localStorage.setItem(Nr,JSON.stringify(I));}catch{}}async function k(I){let _=u();_.push(await l(I)),S(_);}function A(I){let _=u().filter(H=>H.id!==I);S(_);}function y(I){let _=u(),H=_.findIndex(V=>V.id===I.id);H>=0&&(_[H]=I,S(_));}async function B(I,_){try{I==="indexeddb"?await $(_):A(_);}catch(H){Me.debug("Offline queue: row removal failed (will age out)",{id:_,err:String(H)});}}async function Z(I,_){try{return I==="indexeddb"?await T(_):y(_),!0}catch(H){return Me.debug("Offline queue: row persist failed",{id:_.id,err:String(H)}),false}}async function ie(I){if(!e)return;if(await Y()>=r){Me.warn("Offline queue full \u2014 dropping report",{maxQueueSize:r});return}let H=d();if(H==="indexeddb")try{await v(I);return}catch{i="localstorage";}if(H==="localstorage"||i==="localstorage"){await k(I);return}}function W(I){return Math.min(1e3*2**I+Math.random()*500,oa)}function me(I){return new Promise(_=>setTimeout(_,I))}async function U(I){if(!e)return {sent:0,failed:0};let _,H=d();if(H==="indexeddb")try{_=await C();}catch{_=u();}else _=u();let V=Date.now(),q=[];for(let J of _)if(b(J,V)){let K=J.id;await B(H,K),Me.debug("Offline queue: evicting stale report",{id:K});}else q.push(J);_=q;let O=_.slice(0,sa),ee=0,ne=0;for(let J=0;J<O.length;J++){let K=O[J],ue=K.id,$e=await f(K);if(!$e){await B(H,ue),ne++;continue}let z=await I.submitReport($e);if(z.ok)await B(H,ue),ee++;else {let te=z.error?.code==="HTTP_400"||z.error?.code==="HTTP_413"||z.error?.code==="HTTP_422"||z.error?.code==="INGEST_ERROR"||z.error?.code==="VALIDATION_ERROR"||z.error?.code==="PAYLOAD_TOO_LARGE"||z.error?.code==="SERIALIZE_FAILED"||typeof z.error?.message=="string"&&/invalid payload|description must be at least|validation/i.test(z.error.message),et=!te&&(z.error?.code==="NETWORK_ERROR"||z.error?.code==="HTTP_403"||z.error?.code==="HTTP_429"||z.error?.code==="HTTP_502"||z.error?.code==="HTTP_503"||z.error?.code==="HTTP_504"||typeof z.error?.code=="string"&&z.error.code.startsWith("HTTP_5"));if(te)await B(H,ue);else if(et){let _e=m(K)+1;_e>=aa?(await B(H,ue),Me.warn("Offline queue: giving up on report after repeated failures",{id:ue,attempts:_e,code:z.error?.code})):(K.attempts=_e,await Z(H,K)?Me.debug("Offline queue: transient failure, will retry",{id:ue,attempts:_e,code:z.error?.code}):(await B(H,ue),Me.warn("Offline queue: dropping report (attempt counter unpersistable)",{id:ue,code:z.error?.code})));}ne++,J<O.length-1&&await me(W(J));}}return {sent:ee,failed:ne}}async function Y(){if(d()==="indexeddb")try{return await E()}catch{return u().length}return u().length}async function F(){if(d()==="indexeddb")try{await w();}catch{}try{localStorage.removeItem(Nr);}catch{}}function M(I){if(!e||!n||typeof window>"u")return;o&&L();let _=()=>{navigator.onLine&&U(I).catch(H=>{Me.warn("Offline queue auto-flush failed",{err:String(H)});});};window.addEventListener("online",_),a=setInterval(()=>{Y().then(H=>{H>0&&_();});},ia),o=()=>{window.removeEventListener("online",_),a&&(clearInterval(a),a=null);};}function L(){o?.(),o=null;}return {enqueue:ie,flush:U,size:Y,clear:F,startAutoSync:M,stopAutoSync:L}}function Kr(){let t=typeof navigator<"u"?navigator:void 0,e=typeof window<"u"?window:void 0,r=typeof document<"u"?document:void 0,n=typeof screen<"u"?screen:void 0;ua(t);let s=t&&"connection"in t?t.connection:void 0,o=e,a=!!o?.Capacitor,i=!!o?.cordova,l=t?.product==="ReactNative"||typeof globalThis.HermesInternal<"u",f=a||i||l?{...a?{capacitor:true}:{},...i?{cordova:true}:{},...l?{reactNative:true}:{}}:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",viewport:{width:e?.innerWidth??0,height:e?.innerHeight??0},url:e?.location?.href??"",referrer:r?.referrer??"",timestamp:new Date().toISOString(),timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",connection:s?{effectiveType:s.effectiveType,downlink:s.downlink,rtt:s.rtt}:void 0,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency,route:e?.location?.pathname,nearestTestid:ca(r),userAgentData:pa(t),screen:ha(n,e),prefersColorScheme:ma(e),prefersReducedMotion:ke(e,"(prefers-reduced-motion: reduce)"),prefersReducedData:ke(e,"(prefers-reduced-data: reduce)"),prefersContrast:fa(e),forcedColors:ke(e,"(forced-colors: active)"),online:typeof t?.onLine=="boolean"?t.onLine:void 0,displayMode:ga(e),documentTitle:r?.title?.slice(0,200),buildId:ba(r),pageLoadTiming:ya(e),...f?{native:f}:{}}}function ca(t){if(!t)return;let e=t.activeElement??null,r=0;for(;e&&r<20;){let n=e.getAttribute?.("data-testid");if(n)return n;e=e.parentElement,r++;}}var Te=null,ps=false;function ua(t){if(ps)return;let e=t?.userAgentData;e?.getHighEntropyValues&&(ps=true,e.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList"]).then(r=>{Te=r;}).catch(()=>{}));}function da(t){if(!t?.length)return;let e=t.filter(n=>!/not.?a.?brand/i.test(n.brand));return e.length===0?void 0:e.find(n=>!/chromium|google chrome/i.test(n.brand))??e[0]}function pa(t){let e=t?.userAgentData;if(!e&&!Te)return;let r=Te?.fullVersionList,n=da(r??e?.brands),s={};return n&&(s.browser=n.brand,s.browserVersion=n.version),e?.platform&&(s.os=e.platform),Te?.platformVersion&&(s.osVersion=Te.platformVersion),typeof e?.mobile=="boolean"&&(s.mobile=e.mobile),Te?.model&&(s.model=Te.model),Te?.architecture&&(s.architecture=Te.architecture),Te?.bitness&&(s.bitness=Te.bitness),Object.keys(s).length===0?void 0:s}function ha(t,e){if(!t&&!e)return;let r={};typeof t?.width=="number"&&(r.width=t.width),typeof t?.height=="number"&&(r.height=t.height),typeof e?.devicePixelRatio=="number"&&(r.devicePixelRatio=e.devicePixelRatio),typeof t?.colorDepth=="number"&&(r.colorDepth=t.colorDepth);let n=t?.orientation?.type;return n&&(r.orientation=n),Object.keys(r).length===0?void 0:r}function ke(t,e){if(t?.matchMedia)try{return t.matchMedia(e).matches}catch{return}}function ma(t){if(t?.matchMedia)return ke(t,"(prefers-color-scheme: dark)")?"dark":ke(t,"(prefers-color-scheme: light)")?"light":"no-preference"}function fa(t){if(t?.matchMedia)return ke(t,"(prefers-contrast: more)")?"more":ke(t,"(prefers-contrast: less)")?"less":ke(t,"(prefers-contrast: custom)")?"custom":"no-preference"}function ga(t){if(t?.matchMedia){if(ke(t,"(display-mode: fullscreen)"))return "fullscreen";if(ke(t,"(display-mode: standalone)"))return "standalone";if(ke(t,"(display-mode: minimal-ui)"))return "minimal-ui";if(ke(t,"(display-mode: browser)"))return "browser"}}function ba(t){if(!t)return;let r=t.querySelector?.('meta[name="mushi:build"]')?.content?.trim();if(r)return r.slice(0,64)}function ya(t){let e=t?.performance;if(!e?.getEntriesByType)return;let r;try{r=e.getEntriesByType("navigation")[0];}catch{return}if(!r)return;let n=r.startTime??0,s={};return r.domContentLoadedEventEnd>0&&(s.domContentLoadedMs=Math.round(r.domContentLoadedEventEnd-n)),r.loadEventEnd>0&&(s.loadCompleteMs=Math.round(r.loadEventEnd-n)),r.responseStart>0&&(s.timeToFirstByteMs=Math.round(r.responseStart-n)),typeof r.type=="string"&&(s.navigationType=r.type),Object.keys(s).length===0?void 0:s}var Ur="mushi_reporter_token";function va(t){return `mushi:reporter-token:${t}`}function hs(){if(typeof crypto<"u"&&crypto.randomUUID)return `mushi_${crypto.randomUUID()}`;let t=new Uint8Array(16);if(typeof crypto<"u")crypto.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);return `mushi_${Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}`}function Fr(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(t);return e&&e.length>0?e:null}catch{return null}}function ms(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(t,e);}catch{}}function ce(t){if(!t){let o=Fr(Ur);if(o)return o;let a=hs();return ms(Ur,a),a}let e=va(t),r=Fr(e);if(r)return r;let s=Fr(Ur)??hs();return ms(e,s),s}function Vr(){let t=typeof crypto<"u"?crypto:void 0;if(t?.randomUUID)return t.randomUUID();let e=new Uint8Array(16);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return `${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20,32)}`}var fs="mushi_fingerprint_hash";function xa(){let t=typeof navigator<"u"?navigator:void 0,e=typeof screen<"u"?screen:void 0,r=typeof window<"u"?window:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",screenWidth:e?.width??0,screenHeight:e?.height??0,pixelRatio:r?.devicePixelRatio??1,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency}}async function wa(t){if(typeof crypto<"u"&&crypto.subtle){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return `fbk_${(e>>>0).toString(16).padStart(8,"0")}`}async function Hs(){if(typeof localStorage<"u"){let n=localStorage.getItem(fs);if(n)return n}let t=xa(),e=JSON.stringify(t),r=await wa(e);if(typeof localStorage<"u")try{localStorage.setItem(fs,r);}catch{}return r}var gs="mushi_session_id",nr=null;function dt(){if(nr)return nr;if(typeof sessionStorage<"u"){let e=sessionStorage.getItem(gs);if(e)return nr=e,e}let t=Sa();if(nr=t,typeof sessionStorage<"u")try{sessionStorage.setItem(gs,t);}catch{}return t}function Sa(){return `ms_${Date.now().toString(36)}_${Ea()}`}function Ea(){let t=typeof crypto<"u"?crypto:void 0,e=new Uint8Array(4);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);let r=0;for(let n of e)r=r*256+n>>>0;return r.toString(36).padStart(6,"0").slice(0,6)}var ka=6e4,ar=null,Ps,Gr=null,Ds=null,lr=0,sr=null,qr=false;function Ra(){return new Date().toISOString()}function it(){return typeof window>"u"?"":window.location.pathname+window.location.search}function Ca(){return typeof navigator>"u"?null:navigator.userAgent??null}function at(t,e){return {kind:t,session_id:dt(),ts:Ra(),page_view_count:lr,reporter_token_hash:Ds,user_id_hash:Gr,user_agent:Ca(),sdk_version:Ps,...e}}function lt(t){ar&&ar.postSessionEvent(t).catch(()=>{});}function Os(t){if(qr||typeof window>"u")return;qr=true,ar=t.client,Ps=t.sdkVersion,Ds=t.reporterTokenHash??null,Gr=t.userIdHash??null;let e=it();lr=1,lt(at("session_start",{route:e,referrer:typeof document<"u"?document.referrer??null:null})),sr=setInterval(()=>{lt(at("session_heartbeat",{route:it()}));},ka);let r=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&lt(at("session_end",{route:it()}));};typeof document<"u"&&document.addEventListener("visibilitychange",r,{passive:true}),typeof window<"u"&&window.addEventListener("pagehide",()=>{lt(at("session_end",{route:it()}));},{passive:true}),Ta();}function Bs(t){Gr=t;}function Ns(){sr!=null&&(clearInterval(sr),sr=null),qr=false,ar=null;}var bs=false;function Ta(){if(bs||typeof history>"u")return;bs=true;let t=e=>function(...r){let n=e.apply(this,r);return e===history.pushState&&(lr+=1,lt(at("page_view",{route:it()}))),n};history.pushState=t(history.pushState),history.replaceState=t(history.replaceState),window.addEventListener("popstate",()=>{lr+=1,lt(at("page_view",{route:it()}));},{passive:true});}var $a=10,Ia=1,Ma=5e3;function Us(t={}){let{maxBurst:e=$a,refillRate:r=Ia,refillIntervalMs:n=Ma}=t,s=e,o=Date.now();function a(){let h=Date.now(),m=h-o,b=Math.floor(m/n);b>0&&(s=Math.min(e,s+b*r),o=h);}function i(){return a(),s>0?(s--,true):false}function l(){s=e,o=Date.now();}function f(){return a(),s}return {tryConsume:i,reset:l,availableTokens:f}}var La={patterns:[{id:"ssn",configKey:"ssns",source:"\\b\\d{3}-\\d{2}-\\d{4}\\b",replacement:"[REDACTED_SSN]"},{id:"creditCard",configKey:"creditCards",source:"\\b(?:\\d[ -]*){12,18}\\d\\b",replacement:"[REDACTED_CC]"},{id:"awsAccessKey",configKey:"secretTokens",source:"\\b(?:AKIA|ASIA)[0-9A-Z]{16}\\b",replacement:"[REDACTED_AWS_KEY]"},{id:"awsSecretKey",configKey:"secretTokens",source:`(?:aws_secret_access_key|secret_access_key)["'\\s:=]+[A-Za-z0-9/+=]{40}\\b`,caseInsensitive:true,replacement:"aws_secret_access_key=[REDACTED_AWS_SECRET]"},{id:"stripeSecretKey",configKey:"secretTokens",source:"\\b(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{24,}\\b",replacement:"[REDACTED_STRIPE_KEY]"},{id:"stripePublishableKey",configKey:"secretTokens",source:"\\bpk_(?:live|test)_[A-Za-z0-9]{24,}\\b",replacement:"[REDACTED_STRIPE_PK]"},{id:"slackToken",configKey:"secretTokens",source:"\\bxox[abpor]-[A-Za-z0-9-]{10,}\\b",replacement:"[REDACTED_SLACK_TOKEN]"},{id:"githubPatClassic",configKey:"secretTokens",source:"\\bghp_[A-Za-z0-9]{36}\\b",replacement:"[REDACTED_GITHUB_PAT]"},{id:"githubPatFineGrained",configKey:"secretTokens",source:"\\bgithub_pat_[A-Za-z0-9_]{80,}\\b",replacement:"[REDACTED_GITHUB_PAT]"},{id:"openaiKey",configKey:"secretTokens",source:"\\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\\b",replacement:"[REDACTED_OPENAI_KEY]"},{id:"anthropicKey",configKey:"secretTokens",source:"\\bsk-ant-[A-Za-z0-9_-]{20,}\\b",replacement:"[REDACTED_ANTHROPIC_KEY]"},{id:"googleKey",configKey:"secretTokens",source:"\\bAIza[0-9A-Za-z_-]{35}\\b",replacement:"[REDACTED_GOOGLE_KEY]"},{id:"jwt",configKey:"secretTokens",source:"\\beyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b",replacement:"[REDACTED_JWT]"},{id:"email",configKey:"emails",source:"\\b[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}\\b",replacement:"[REDACTED_EMAIL]"},{id:"phone",configKey:"phones",source:"(?:\\+\\d{1,3}[\\s.-])?\\(?\\d{2,4}\\)?[\\s.-]\\d{3,4}[\\s.-]\\d{3,4}\\b",replacement:"[REDACTED_PHONE]"},{id:"ipv4",configKey:"ipAddresses",source:"\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b",replacement:"[REDACTED_IP]",defaultOn:false},{id:"ipv6",configKey:"ipv6",source:"\\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{0,4}\\b",replacement:"[REDACTED_IPV6]",defaultOn:false}]},Fs=La.patterns,Aa=Fs.map(t=>({key:t.configKey,regex:new RegExp(t.source,t.caseInsensitive?"gi":"g"),replacement:t.replacement})),_a=Fs.reduce((t,e)=>(t[e.configKey]=e.defaultOn!==false,t),{});function Xr(t={}){let e={..._a,...t},r=Aa.filter(o=>e[o.key]);function n(o){if(!o)return o;let a=o;for(let{regex:i,replacement:l}of r)a=a.replace(new RegExp(i.source,i.flags),l);return a}function s(o,a){let i={...o};for(let l of a)typeof i[l]=="string"&&(i[l]=n(i[l]));return i}return {scrub:n,scrubObject:s}}var Ha=/token|jwt|passw|pwd|secret|api[-_]?key|apikey|auth|session|signature|email|phone|ssn/i,Pa=/^(?:key|code|sig)$/i;function Da(t){let e=t;try{e=decodeURIComponent(t);}catch{}return Ha.test(e)||Pa.test(e)}function Oa(t,e){return t.split("&").map(r=>{let n=r.indexOf("=");if(n===-1)return r;let s=r.slice(0,n),o=r.slice(n+1);if(o.length===0)return r;if(Da(s))return `${s}=[Scrubbed]`;let a=o;try{a=decodeURIComponent(o);}catch{}let i=e(a);return i!==a?`${s}=${encodeURIComponent(i)}`:r}).join("&")}function Tt(t,e){if(!t||!t.includes("?")&&!t.includes("#"))return t;let{scrub:r}=Xr(e),n=o=>{let a=o.indexOf("?");return a===-1?o:o.slice(0,a+1)+Oa(o.slice(a+1),r)},s=t.indexOf("#");return s===-1?n(t):n(t.slice(0,s))+n(t.slice(s))}var Ba=50,Na=500;function qs(t={}){let e=Math.max(1,t.max??Ba),r=Math.max(50,t.maxMessageLength??Na),n=[];return {add(s){let o=typeof s.timestamp=="number"?s.timestamp:Date.now(),a=typeof s.message=="string"&&s.message.length>r?`${s.message.slice(0,r)}\u2026`:s.message,i={timestamp:o,category:s.category,level:s.level??"info",message:a??"",...s.data?{data:s.data}:{}};for(n.push(i);n.length>e;)n.shift();},getAll(){return n.slice()},clear(){n=[];},size(){return n.length}}}var ys=8*1024,Ua=1e3;function js(t){if(t instanceof Error){let e=t.name||"Error",r=t.message||String(t),n=typeof t.stack=="string"&&t.stack.length>0?t.stack.slice(0,ys):void 0,s=t.cause;return {name:e,message:r,...n?{stack:n}:{},...s!==void 0?{cause:s instanceof Error?s.message:s}:{}}}if(typeof t=="string")return {name:"Error",message:t};if(t&&typeof t=="object"){let e=t,r=typeof e.name=="string"?e.name:"Error",n=typeof e.message=="string"?e.message:(()=>{try{return JSON.stringify(e).slice(0,Ua)}catch{return String(e)}})(),s=typeof e.stack=="string"?e.stack.slice(0,ys):void 0;return {name:r,message:n,...s?{stack:s}:{}}}return t===void 0?{name:"Error",message:"unknown"}:{name:"Error",message:String(t)}}var he={paper:"#F8F4ED",paperRaised:"#FFFFFF",ink:"#0E0D0B",inkMuted:"#5C5852",inkFaint:"#9A9489",inkDim:"#6E6760",rule:"rgba(14,13,11,0.10)",ruleStrong:"rgba(14,13,11,0.16)",accent:"#E03C2C",accentWash:"rgba(224,60,44,0.08)",accentInk:"#7A1F15",ok:"#2D7A55",danger:"#B83232"},Fa={paper:"#0F0E0C",paperRaised:"#1A1815",ink:"#F2EBDD",inkMuted:"#928B7E",inkFaint:"#5A5650",inkDim:"#7A7268",rule:"rgba(242,235,221,0.10)",ruleStrong:"rgba(242,235,221,0.18)",accent:"#FF5A47",accentWash:"rgba(255,90,71,0.12)",accentInk:"#FFE5E0",ok:"#3A9E6E",danger:"#E05555"},Yr={free:he.inkMuted,explorer:"#2563EB",contributor:"#7C3AED",champion:"#D97706",default:he.accent},ur={bg:"#0FFF50",fg:"#0a1a0a",border:"#00C43A"},Ws="#FAF7F0",zs="#ffffff";var Jr={light:"#9A2A1E",dark:"#7A1F15"},Qr={light:"#B52F1F",dark:"#C4321E"},Ks={light:{sent:{fg:"#1E4A8C",bg:"rgba(30,74,140,0.08)",border:"rgba(30,74,140,0.16)"},review:{fg:"#8A5A00",bg:"rgba(180,120,0,0.10)",border:"rgba(180,120,0,0.18)"},fixing:{fg:"#9A3D12",bg:"rgba(224,60,44,0.10)",border:"rgba(224,60,44,0.18)"},fixed:{fg:"#1F6B3A",bg:"rgba(31,107,58,0.10)",border:"rgba(31,107,58,0.18)"}},dark:{sent:{fg:"#A8C4FF",bg:"rgba(120,160,255,0.12)",border:"rgba(120,160,255,0.22)"},review:{fg:"#FFD27A",bg:"rgba(255,190,90,0.12)",border:"rgba(255,190,90,0.22)"},fixing:{fg:"#FFB899",bg:"rgba(255,120,60,0.12)",border:"rgba(255,120,60,0.24)"},fixed:{fg:"#8FE3B0",bg:"rgba(80,200,130,0.12)",border:"rgba(80,200,130,0.22)"}}};function Zr(t){return t==="dark"?Fa:he}var dr={tight:4,snug:8,comfy:12,roomy:16,lounge:20,open:24,wide:32},en={control:4,card:10},pt={fontDisplay:"'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif",fontBody:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif",fontMono:"ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace",sizeBody:14,sizeLabel:12,lineBody:1.55},ht={base:99999,banner:99998,panel:1e5,overlay:2147483647},pr={easeStamp:"cubic-bezier(0.22, 1, 0.36, 1)",durationFast:200},Vs={instant:120,fast:200,base:220,panel:300,slow:420,ring:700};var mt={bannerHeight:36,fabSize:52,edgeTabWidth:32,gutter:24,panelWidth:360,panelMaxHeight:480,panelSheetBreakpoint:480};function vs(t){return /^#[0-9a-fA-F]{3,8}$/.test(t)?t:""}function Gs(t,e="",r=""){let n=Zr(t),s=vs(e),o=vs(r),a=s||n.accent,i=s?t==="dark"?`${a}1F`:`${a}14`:n.accentWash,l=o||n.accentInk;return {accent:a,accentWash:i,accentInk:l}}function qa(t){let e=t.length%4===0?"":"=".repeat(4-t.length%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e;if(typeof atob=="function")return atob(r);let n=globalThis.Buffer;return n?n.from(r,"base64").toString("binary"):""}function Xs(t){if(typeof t!="string")return null;let e=t.split(".");if(e.length!==3)return null;try{let r=qa(e[1]),n=JSON.parse(r),s=typeof n.projectId=="string"?n.projectId:void 0,o=typeof n.sub=="string"?n.sub:void 0;return !s||!o?null:{projectId:s,sub:o,...typeof n.email=="string"?{email:n.email}:{},...typeof n.name=="string"?{name:n.name}:{},...typeof n.iat=="number"?{iat:n.iat}:{},...typeof n.exp=="number"?{exp:n.exp}:{}}}catch{return null}}var ja=new Set(["kensaur.us","www.kensaur.us"]),Wa={"glot-it":"glot.it",glotit:"glot.it","solo-boss-cloud":"solo-boss.kensaur.us","mushi-mushi":"kensaur.us"},za={"mushi-mushi":"https://kensaur.us/mushi-mushi/admin/favicon.svg","solo-boss-cloud":"https://solo-boss.kensaur.us/favicon.svg","glot-it":"https://kensaur.us/glot-it/apple-touch-icon.png",glotit:"https://kensaur.us/glot-it/apple-touch-icon.png"},Ka=["www.google.com","icons.duckduckgo.com","icon.horse"];function Ys(t){try{let e=new URL(t).hostname.toLowerCase();return Ka.some(r=>e===r||e.endsWith(`.${r}`))}catch{return false}}function Va(t,e=32){return [`https://${t}/favicon.svg`,`https://${t}/favicon.ico`,`https://${t}/favicon-32x32.png`,`https://${t}/apple-touch-icon.png`]}function Js(t){let e=[],r=s=>{let o=s?.trim().toLowerCase();!o||e.includes(o)||e.push(o);};r(Xa(t.repo_url)),r(Wa[t.project_slug.toLowerCase()]);let n=t.sdk_origin?Ga(t.sdk_origin):null;return n&&!ja.has(n)&&r(n),e}function Qs(t,e=32){if(t.icon_url?.trim())return [t.icon_url.trim()];let r=new Set,n=[],s=a=>{!a||r.has(a)||Ys(a)||(r.add(a),n.push(a));},o=za[t.project_slug.toLowerCase()];o&&s(o);for(let a of Js(t))for(let i of Va(a,e))s(i);return n}function Ga(t){let e=t.trim();if(!e||/^(capacitor|file|content|app):/i.test(e))return null;try{let n=new URL(e.includes("://")?e:`https://${e}`).hostname.toLowerCase();return n==="localhost"||n==="127.0.0.1"||n.endsWith(".local")?null:n}catch{return null}}function Xa(t){if(!t?.trim())return null;try{let e=new URL(t.trim()),r=e.hostname.toLowerCase(),n=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);if(n.length<2)return null;let s=n[1].replace(/\.git$/i,"").toLowerCase();return /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(s)||r==="github.com"&&s.endsWith(".github.io")?s:r!=="github.com"&&r!=="www.github.com"?r:null}catch{return null}}function Zs(t){return Js(t)[0]??null}function eo(t){if(typeof document>"u"||!t.complete||t.naturalWidth===0||t.naturalHeight===0)return false;try{let e=document.createElement("canvas"),r=t.naturalWidth,n=t.naturalHeight;e.width=r,e.height=n;let s=e.getContext("2d");if(!s)return !1;s.drawImage(t,0,0);let{data:o}=s.getImageData(0,0,r,n),a=0,i=0,l=0;for(let h=0;h<o.length;h+=4){let m=o[h],b=o[h+1],d=o[h+2];if(o[h+3]<128)continue;a++;let v=Math.max(m,b,d),C=Math.min(m,b,d),$=v-C;l=Math.max(l,$),i+=$;}return a===0?!0:i/a<14&&l<24}catch{return Ys(t.src)}}function to(t){let e=t.trim().split(/[\s._-]+/).filter(Boolean);return e.length>=2?`${e[0][0]??""}${e[1][0]??""}`.toUpperCase():(t.replace(/[^a-zA-Z0-9]/g,"").slice(0,2)||t.slice(0,2)||"?").toUpperCase()}function ro(){if(typeof document>"u")return null;let t=['link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'];for(let e of t){let n=document.querySelector(e)?.href;if(n&&Ya(n))return n}return null}function Ya(t){try{let e=typeof location<"u"?location.href:void 0,r=new URL(t,e).protocol;return r==="http:"||r==="https:"}catch{return false}}async function so(t,e=xs){if(!t.startsWith("data:image/")||no(t)<=e)return t;if(typeof document>"u")return null;let r=new Image;await new Promise((o,a)=>{r.onload=()=>o(),r.onerror=()=>a(new Error("screenshot_decode_failed")),r.src=t;});let n=[.65,.5,.35,.25],s=[1,.85,.7,.55,.4];for(let o of s){let a=document.createElement("canvas"),i=Math.max(1,Math.round(r.naturalWidth*o)),l=Math.max(1,Math.round(r.naturalHeight*o));a.width=i,a.height=l;let f=a.getContext("2d");if(f){f.drawImage(r,0,0,i,l);for(let h of n){let m=a.toDataURL("image/jpeg",h);if(no(m)<=e)return m}}}return null}function no(t){let e=t.indexOf(",");if(e<0)return t.length;let r=t.slice(e+1);return Math.ceil(r.length*3/4)}var hr={widget:{trigger:"Report Issue",title:"Report an Issue",close:"Close",back:"Back",submit:"Submit",submitting:"Submitting\u2026",submitted:"Thank you! Your report has been submitted.",error:"Could not send your report. Check your connection and try again."},step1:{heading:"What kind of issue?",reportSectionLabel:"Report an issue",moreNavLabel:"More",moreNav:{yourReports:"Your reports",yourReportsDesc:"See status, developer replies, and respond",unreadNew:"new",communityIdeas:"Community ideas",communityIdeasDesc:"Vote on features and see what shipped",leaderboard:"Leaderboard",joinCommunity:"Join community \xB7 Track reports across apps",myAccount:"My account"},categories:{bug:"Bug",slow:"Slow / Laggy",visual:"Visual Glitch",confusing:"Confusing",other:"Other"},categoryDescriptions:{bug:"Something is broken or not working",slow:"Performance issue or slow loading",visual:"Layout, styling, or display problem",confusing:"Hard to understand or navigate",other:"Something else"}},step2:{heading:"What happened?",intents:{bug:["Crash","Unresponsive","Data loss","Wrong result","Other"],slow:["Page load","Interaction","API call","Animation","Other"],visual:["Layout broken","Overlapping","Missing element","Wrong color/font","Other"],confusing:["Unclear label","Missing help","Unexpected flow","Lost navigation","Other"],other:["Feature request","Accessibility","Typo","Other"]}},step3:{heading:"Tell us more",descriptionPlaceholder:"Describe what happened\u2026",screenshotButton:"Attach Screenshot",screenshotAttached:"Screenshot attached \u2713",screenshotCapturing:"Taking screenshot\u2026",screenshotFailed:"Couldn't capture \u2014 describe it instead",screenshotPreviewAlt:"Preview of the screenshot that will be sent",screenshotSensitiveHint:"Check the preview \u2014 remove it if any private info (balances, personal details) is visible.",elementButton:"Select Element",elementSelected:"Element selected \u2713",elementCapturing:"Click anything on the page\u2026",elementFailed:"Couldn't select \u2014 describe it instead",elementSelectorHint:"Click any element \xB7 Esc to cancel",optional:"(optional)",tooShort:"A bit more detail helps us fix it faster",examplePrompts:["The save button does nothing","Page froze for 10 seconds","Layout looks broken here"]},assistant:{defaultLabel:"Ask",defaultGreeting:"Ask about this page \u2014 I only use what you see here.",inputPlaceholder:"Type your question\u2026",sendAriaLabel:"Send",hubDescription:"Get help using this app",thinking:"Thinking\u2026",fileReportCta:"File a report instead",stillStuckCta:"Still stuck? File a report",errors:{noResponse:"No response \u2014 check your connection and try again.",generic:"Could not reach the assistant. Try again in a moment."}},flows:{eyebrows:{inbox:"Mushi \xB7 Inbox",roadmap:"Mushi \xB7 Roadmap",community:"Mushi \xB7 Community",identity:"Mushi \xB7 Identity",signIn:"Mushi \xB7 Sign in",allApps:"Mushi \xB7 All apps",receipt:"Mushi \xB7 Receipt",thread:"Mushi \xB7 Inbox"},reports:{title:"Your reports",loading:"Loading reports\u2026",empty:"No reports from this browser yet.",leaderboardLink:"Leaderboard"},roadmap:{title:"Community ideas",loading:"Loading ideas\u2026",empty:"No community ideas yet. Be the first to suggest one.",shipped:"Shipped",vote:"Vote",voted:"Voted",voteCount:"{n} votes",untitled:"Untitled idea"},leaderboard:{title:"Global leaderboard",loading:"Loading leaderboard\u2026",empty:"No contributors yet \u2014 be the first!",signInPrompt:"Sign in to see your rank \u2192",myRank:"You are ranked #{rank} this month",footer:"Global contributors this month \xB7 Points refresh monthly",anon:"Anon"},account:{title:"Mushi account",checkEmailTitle:"Check your email",joinTitle:"Join the community",emailLabel:"Email address",emailPlaceholder:"Email",signInPrompt:"Sign in to see your reports across all apps and climb the global leaderboard. No password needed.",magicLinkSent:"We sent a sign-in link to {email}. Click it to connect your reports across apps.",resendEmail:"Resend email",sendLink:"Send sign-in link",sending:"Sending\u2026",crossAppReports:"My reports across all apps \u2192",viewLeaderboard:"View global leaderboard \u2192",signOut:"Sign out",rankSummary:"Rank #{rank} \xB7 {points} pts this month"},crossApp:{title:"My reports",loading:"Loading your reports\u2026",empty:"No reports filed yet.",unknownApp:"Unknown app"},thread:{title:"Report thread",loading:"Loading thread\u2026",empty:"No developer replies yet.",confirmFixed:"Yes, fixed for me",notFixed:"Not fixed yet",replyPlaceholder:"Reply to the developer\u2026",send:"Send"},success:{trackReport:"Track this report \u203A",receipt:"Receipt",delivering:"Delivering to the team\u2026",queuedOffline:"Queued offline",queuedHint:"We'll send it the moment you're back online.",rateLimited:"Sending too fast",rateLimitedHint:"Wait about a minute \u2014 we queued this report and will retry automatically.",quotaBlocked:"Could not accept this report",quotaBlockedHint:"This project's quota or plan blocked the send. Ask the app owner to check Billing.",permanentFailed:"Could not send this report",permanentFailedHint:"The payload was rejected (often too large). Try again with a shorter note or without a screenshot.",retrying:"Queued \u2014 retrying",retryingHint:"We could not reach the server just now. We'll keep trying in the background.",trackOnMushi:"Track on Mushi",slaDefault:"We will review your report.",screenshotDropped:"Sent without the screenshot \u2014 it was too large to attach."},featureRequest:{label:"Feature request",description:"Suggest a change"},poweredBy:"Powered by Mushi v{version}"}};var oo={widget:{trigger:"\u554F\u984C\u3092\u5831\u544A",title:"\u554F\u984C\u3092\u5831\u544A\u3059\u308B",close:"\u9589\u3058\u308B",back:"\u623B\u308B",submit:"\u9001\u4FE1",submitting:"\u9001\u4FE1\u4E2D\u2026",submitted:"\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01\u30EC\u30DD\u30FC\u30C8\u304C\u9001\u4FE1\u3055\u308C\u307E\u3057\u305F\u3002",error:"\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},step1:{heading:"\u3069\u306E\u3088\u3046\u306A\u554F\u984C\u3067\u3059\u304B\uFF1F",reportSectionLabel:"\u554F\u984C\u3092\u5831\u544A",moreNavLabel:"\u305D\u306E\u4ED6",moreNav:{yourReports:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",yourReportsDesc:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3001\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u3001\u8FD4\u7B54",unreadNew:"\u4EF6\u306E\u65B0\u7740",communityIdeas:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",communityIdeasDesc:"\u6A5F\u80FD\u306B\u6295\u7968\u3057\u3066\u30EA\u30EA\u30FC\u30B9\u72B6\u6CC1\u3092\u78BA\u8A8D",leaderboard:"\u30EA\u30FC\u30C0\u30FC\u30DC\u30FC\u30C9",joinCommunity:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0 \xB7 \u30A2\u30D7\u30EA\u6A2A\u65AD\u3067\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1",myAccount:"\u30DE\u30A4\u30A2\u30AB\u30A6\u30F3\u30C8"},categories:{bug:"\u30D0\u30B0",slow:"\u9045\u3044\u30FB\u91CD\u3044",visual:"\u8868\u793A\u306E\u554F\u984C",confusing:"\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6"},categoryDescriptions:{bug:"\u52D5\u4F5C\u3057\u306A\u3044\u3001\u58CA\u308C\u3066\u3044\u308B",slow:"\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u60AA\u3044\u3001\u8AAD\u307F\u8FBC\u307F\u304C\u9045\u3044",visual:"\u30EC\u30A4\u30A2\u30A6\u30C8\u3001\u30C7\u30B6\u30A4\u30F3\u3001\u8868\u793A\u306E\u554F\u984C",confusing:"\u7406\u89E3\u3057\u306B\u304F\u3044\u3001\u64CD\u4F5C\u304C\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6\u306E\u554F\u984C"}},step2:{heading:"\u4F55\u304C\u8D77\u304D\u307E\u3057\u305F\u304B\uFF1F",intents:{bug:["\u30AF\u30E9\u30C3\u30B7\u30E5","\u7121\u53CD\u5FDC","\u30C7\u30FC\u30BF\u6D88\u5931","\u8AA4\u3063\u305F\u7D50\u679C","\u305D\u306E\u4ED6"],slow:["\u30DA\u30FC\u30B8\u8AAD\u8FBC","\u64CD\u4F5C\u53CD\u5FDC","API\u901A\u4FE1","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3","\u305D\u306E\u4ED6"],visual:["\u30EC\u30A4\u30A2\u30A6\u30C8\u5D29\u308C","\u8981\u7D20\u306E\u91CD\u306A\u308A","\u8981\u7D20\u304C\u8868\u793A\u3055\u308C\u306A\u3044","\u8272/\u30D5\u30A9\u30F3\u30C8\u304C\u9055\u3046","\u305D\u306E\u4ED6"],confusing:["\u30E9\u30D9\u30EB\u304C\u4E0D\u660E\u77AD","\u30D8\u30EB\u30D7\u304C\u306A\u3044","\u4E88\u60F3\u5916\u306E\u30D5\u30ED\u30FC","\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u8FF7\u5B50","\u305D\u306E\u4ED6"],other:["\u6A5F\u80FD\u8981\u671B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3","\u8AA4\u5B57\u8131\u5B57","\u305D\u306E\u4ED6"]}},step3:{heading:"\u8A73\u7D30\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044",descriptionPlaceholder:"\u4F55\u304C\u8D77\u304D\u305F\u304B\u8AAC\u660E\u3057\u3066\u304F\u3060\u3055\u3044\u2026",screenshotButton:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8",screenshotAttached:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8\u6E08\u307F \u2713",screenshotCapturing:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u64AE\u5F71\u4E2D\u2026",screenshotFailed:"\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",screenshotPreviewAlt:"\u9001\u4FE1\u3055\u308C\u308B\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30D7\u30EC\u30D3\u30E5\u30FC",screenshotSensitiveHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u78BA\u8A8D\u3057\u3001\u6B8B\u9AD8\u3084\u500B\u4EBA\u60C5\u5831\u306A\u3069\u304C\u5199\u3063\u3066\u3044\u308C\u3070\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002",elementButton:"\u8981\u7D20\u3092\u9078\u629E",elementSelected:"\u8981\u7D20\u9078\u629E\u6E08\u307F \u2713",elementCapturing:"\u30DA\u30FC\u30B8\u4E0A\u306E\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF\u2026",elementFailed:"\u9078\u629E\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",elementSelectorHint:"\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF \xB7 Esc \u3067\u30AD\u30E3\u30F3\u30BB\u30EB",optional:"\uFF08\u4EFB\u610F\uFF09",tooShort:"\u3082\u3046\u5C11\u3057\u8A73\u3057\u304F\u6559\u3048\u3066\u304F\u3060\u3055\u3044",examplePrompts:["\u4FDD\u5B58\u30DC\u30BF\u30F3\u304C\u53CD\u5FDC\u3057\u306A\u3044","\u30DA\u30FC\u30B8\u304C10\u79D2\u56FA\u307E\u3063\u305F","\u30EC\u30A4\u30A2\u30A6\u30C8\u304C\u5D29\u308C\u3066\u3044\u308B"]},assistant:{defaultLabel:"\u8CEA\u554F",defaultGreeting:"\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u8868\u793A\u3055\u308C\u3066\u3044\u308B\u5185\u5BB9\u3060\u3051\u3092\u4F7F\u3044\u307E\u3059\u3002",inputPlaceholder:"\u8CEA\u554F\u3092\u5165\u529B\u2026",sendAriaLabel:"\u9001\u4FE1",hubDescription:"\u3053\u306E\u30A2\u30D7\u30EA\u306E\u4F7F\u3044\u65B9\u3092\u805E\u304F",thinking:"\u8003\u3048\u4E2D\u2026",fileReportCta:"\u4EE3\u308F\u308A\u306B\u30D0\u30B0\u3092\u5831\u544A",stillStuckCta:"\u89E3\u6C7A\u3057\u306A\u3044\u5834\u5408\u306F\u5831\u544A\u3059\u308B",errors:{noResponse:"\u5FDC\u7B54\u304C\u3042\u308A\u307E\u305B\u3093 \u2014 \u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",generic:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u53D7\u4FE1\u7BB1",roadmap:"Mushi \xB7 \u30A2\u30A4\u30C7\u30A2",community:"Mushi \xB7 \u30B3\u30DF\u30E5\u30CB\u30C6\u30A3",identity:"Mushi \xB7 \u30A2\u30AB\u30A6\u30F3\u30C8",signIn:"Mushi \xB7 \u30B5\u30A4\u30F3\u30A4\u30F3",allApps:"Mushi \xB7 \u5168\u30A2\u30D7\u30EA",receipt:"Mushi \xB7 \u53D7\u4ED8",thread:"Mushi \xB7 \u53D7\u4FE1\u7BB1"},reports:{title:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u304B\u3089\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",leaderboardLink:"\u30E9\u30F3\u30AD\u30F3\u30B0"},roadmap:{title:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",loading:"\u30A2\u30A4\u30C7\u30A2\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30A2\u30A4\u30C7\u30A2\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u6700\u521D\u306E\u63D0\u6848\u3092\u3069\u3046\u305E\u3002",shipped:"\u30EA\u30EA\u30FC\u30B9\u6E08\u307F",vote:"\u6295\u7968",voted:"\u6295\u7968\u6E08\u307F",voteCount:"{n} \u7968",untitled:"\u7121\u984C\u306E\u30A2\u30A4\u30C7\u30A2"},leaderboard:{title:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0",loading:"\u30E9\u30F3\u30AD\u30F3\u30B0\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u53C2\u52A0\u8005\u304C\u3044\u307E\u305B\u3093 \u2014 \u6700\u521D\u306E\u4E00\u4EBA\u306B\u306A\u308D\u3046\u3002",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u9806\u4F4D\u3092\u898B\u308B \u2192",myRank:"\u4ECA\u6708\u306E\u9806\u4F4D\u306F #{rank}",footer:"\u4ECA\u6708\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8CA2\u732E\u8005 \xB7 \u30DD\u30A4\u30F3\u30C8\u306F\u6BCE\u6708\u30EA\u30BB\u30C3\u30C8",anon:"\u533F\u540D"},account:{title:"Mushi \u30A2\u30AB\u30A6\u30F3\u30C8",checkEmailTitle:"\u30E1\u30FC\u30EB\u3092\u78BA\u8A8D",joinTitle:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0",emailLabel:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",emailPlaceholder:"\u30E1\u30FC\u30EB",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3059\u308B\u3068\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8\u3068\u30E9\u30F3\u30AD\u30F3\u30B0\u304C\u898B\u3089\u308C\u307E\u3059\u3002\u30D1\u30B9\u30EF\u30FC\u30C9\u4E0D\u8981\u3002",magicLinkSent:"{email} \u306B\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308A\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u3092\u958B\u3044\u3066\u30EC\u30DD\u30FC\u30C8\u3092\u63A5\u7D9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",resendEmail:"\u30E1\u30FC\u30EB\u3092\u518D\u9001",sendLink:"\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308B",sending:"\u9001\u4FE1\u4E2D\u2026",crossAppReports:"\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8 \u2192",viewLeaderboard:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0 \u2192",signOut:"\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",rankSummary:"\u9806\u4F4D #{rank} \xB7 \u4ECA\u6708 {points} pts"},crossApp:{title:"\u30DE\u30A4\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30EC\u30DD\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002",unknownApp:"\u4E0D\u660E\u306A\u30A2\u30D7\u30EA"},thread:{title:"\u30EC\u30DD\u30FC\u30C8\u30B9\u30EC\u30C3\u30C9",loading:"\u30B9\u30EC\u30C3\u30C9\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",confirmFixed:"\u306F\u3044\u3001\u76F4\u308A\u307E\u3057\u305F",notFixed:"\u307E\u3060\u76F4\u3063\u3066\u3044\u307E\u305B\u3093",replyPlaceholder:"\u958B\u767A\u8005\u306B\u8FD4\u4FE1\u2026",send:"\u9001\u4FE1"},success:{trackReport:"\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1 \u203A",receipt:"\u53D7\u4ED8",delivering:"\u30C1\u30FC\u30E0\u306B\u9001\u4FE1\u4E2D\u2026",queuedOffline:"\u30AA\u30D5\u30E9\u30A4\u30F3\u5F85\u6A5F\u4E2D",queuedHint:"\u30AA\u30F3\u30E9\u30A4\u30F3\u306B\u623B\u308A\u6B21\u7B2C\u9001\u4FE1\u3057\u307E\u3059\u3002",rateLimited:"\u9001\u4FE1\u304C\u65E9\u3059\u304E\u307E\u3059",rateLimitedHint:"\u7D041\u5206\u5F85\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u30EC\u30DD\u30FC\u30C8\u306F\u30AD\u30E5\u30FC\u306B\u5165\u308A\u3001\u81EA\u52D5\u3067\u518D\u9001\u3057\u307E\u3059\u3002",quotaBlocked:"\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u53D7\u3051\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F",quotaBlockedHint:"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u67A0\u307E\u305F\u306F\u30D7\u30E9\u30F3\u3067\u62D2\u5426\u3055\u308C\u307E\u3057\u305F\u3002\u30A2\u30D7\u30EA\u7BA1\u7406\u8005\u306B Billing \u3092\u78BA\u8A8D\u3057\u3066\u3082\u3089\u3063\u3066\u304F\u3060\u3055\u3044\u3002",permanentFailed:"\u30EC\u30DD\u30FC\u30C8\u3092\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F",permanentFailedHint:"\u30DA\u30A4\u30ED\u30FC\u30C9\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F\uFF08\u30B5\u30A4\u30BA\u8D85\u904E\u306A\u3069\uFF09\u3002\u77ED\u3044\u6587\u9762\u304B\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306A\u3057\u3067\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",retrying:"\u30AD\u30E5\u30FC \u2014 \u518D\u8A66\u884C\u4E2D",retryingHint:"\u3044\u307E\u30B5\u30FC\u30D0\u30FC\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u518D\u9001\u3057\u307E\u3059\u3002",trackOnMushi:"Mushi\u3067\u8FFD\u8DE1",slaDefault:"\u30EC\u30DD\u30FC\u30C8\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002",screenshotDropped:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306F\u30B5\u30A4\u30BA\u8D85\u904E\u306E\u305F\u3081\u6DFB\u4ED8\u3067\u304D\u305A\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u307F\u9001\u4FE1\u3057\u307E\u3057\u305F\u3002"},featureRequest:{label:"\u6A5F\u80FD\u30EA\u30AF\u30A8\u30B9\u30C8",description:"\u5909\u66F4\u3092\u63D0\u6848"},poweredBy:"Mushi v{version}"}};var io={widget:{trigger:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",close:"\u0E1B\u0E34\u0E14",back:"\u0E01\u0E25\u0E31\u0E1A",submit:"\u0E2A\u0E48\u0E07",submitting:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",submitted:"\u0E02\u0E2D\u0E1A\u0E04\u0E38\u0E13\u0E04\u0E23\u0E31\u0E1A/\u0E04\u0E48\u0E30! \u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07\u0E41\u0E25\u0E49\u0E27",error:"\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},step1:{heading:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19?",reportSectionLabel:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",moreNavLabel:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",moreNav:{yourReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",yourReportsDesc:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E41\u0E25\u0E30\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",unreadNew:"\u0E43\u0E2B\u0E21\u0E48",communityIdeas:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",communityIdeasDesc:"\u0E42\u0E2B\u0E27\u0E15\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C\u0E41\u0E25\u0E30\u0E14\u0E39\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",leaderboard:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33",joinCommunity:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19 \xB7 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21\u0E41\u0E2D\u0E1B",myAccount:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19"},categories:{bug:"\u0E1A\u0E31\u0E01",slow:"\u0E0A\u0E49\u0E32 / \u0E41\u0E25\u0E04",visual:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E1C\u0E34\u0E14\u0E1B\u0E01\u0E15\u0E34",confusing:"\u0E2A\u0E31\u0E1A\u0E2A\u0E19",other:"\u0E2D\u0E37\u0E48\u0E19\u0E46"},categoryDescriptions:{bug:"\u0E21\u0E35\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E33\u0E07\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",slow:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E42\u0E2B\u0E25\u0E14\u0E0A\u0E49\u0E32",visual:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C \u0E2A\u0E44\u0E15\u0E25\u0E4C \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25",confusing:"\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E22\u0E32\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E33\u0E17\u0E32\u0E07\u0E22\u0E32\u0E01",other:"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19"}},step2:{heading:"\u0E40\u0E01\u0E34\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E02\u0E36\u0E49\u0E19?",intents:{bug:["\u0E41\u0E04\u0E23\u0E0A","\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07","\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2B\u0E32\u0E22","\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],slow:["\u0E42\u0E2B\u0E25\u0E14\u0E2B\u0E19\u0E49\u0E32","\u0E01\u0E32\u0E23\u0E42\u0E15\u0E49\u0E15\u0E2D\u0E1A","API","\u0E41\u0E2D\u0E19\u0E34\u0E40\u0E21\u0E0A\u0E31\u0E19","\u0E2D\u0E37\u0E48\u0E19\u0E46"],visual:["\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E40\u0E2A\u0E35\u0E22","\u0E0B\u0E49\u0E2D\u0E19\u0E17\u0E31\u0E1A","\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E2B\u0E32\u0E22","\u0E2A\u0E35/\u0E1F\u0E2D\u0E19\u0E15\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],confusing:["\u0E1B\u0E49\u0E32\u0E22\u0E44\u0E21\u0E48\u0E0A\u0E31\u0E14","\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E41\u0E19\u0E30\u0E19\u0E33","\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E44\u0E21\u0E48\u0E04\u0E32\u0E14\u0E04\u0E34\u0E14","\u0E2B\u0E25\u0E07\u0E17\u0E32\u0E07","\u0E2D\u0E37\u0E48\u0E19\u0E46"],other:["\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C","\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07","\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"]}},step3:{heading:"\u0E1A\u0E2D\u0E01\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",descriptionPlaceholder:"\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u2026",screenshotButton:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15",screenshotAttached:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E41\u0E25\u0E49\u0E27 \u2713",screenshotCapturing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E48\u0E32\u0E22\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u2026",screenshotFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E16\u0E48\u0E32\u0E22\u0E20\u0E32\u0E1E\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",screenshotPreviewAlt:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E17\u0E35\u0E48\u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07",screenshotSensitiveHint:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E20\u0E32\u0E1E \u2014 \u0E2B\u0E32\u0E01\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27 (\u0E22\u0E2D\u0E14\u0E40\u0E07\u0E34\u0E19 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25) \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E1A\u0E2D\u0E2D\u0E01",elementButton:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A",elementSelected:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E41\u0E25\u0E49\u0E27 \u2713",elementCapturing:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u2026",elementFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",elementSelectorHint:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49 \xB7 Esc \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",optional:"(\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",tooShort:"\u0E01\u0E23\u0E38\u0E13\u0E32\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",examplePrompts:["\u0E1B\u0E38\u0E48\u0E21\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19","\u0E2B\u0E19\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E19\u0E32\u0E19 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35","\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E1E\u0E31\u0E07"]},assistant:{defaultLabel:"\u0E16\u0E32\u0E21",defaultGreeting:"\u0E16\u0E32\u0E21\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E2B\u0E47\u0E19\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D",inputPlaceholder:"\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E16\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026",sendAriaLabel:"\u0E2A\u0E48\u0E07",hubDescription:"\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",thinking:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",fileReportCta:"\u0E2A\u0E48\u0E07\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E41\u0E17\u0E19",stillStuckCta:"\u0E22\u0E31\u0E07\u0E41\u0E01\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49? \u0E2A\u0E48\u0E07\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",errors:{noResponse:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A \u2014 \u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",generic:"\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E0A\u0E48\u0E27\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32",roadmap:"Mushi \xB7 \u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22",community:"Mushi \xB7 \u0E0A\u0E38\u0E21\u0E0A\u0E19",identity:"Mushi \xB7 \u0E1A\u0E31\u0E0D\u0E0A\u0E35",signIn:"Mushi \xB7 \u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",allApps:"Mushi \xB7 \u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B",receipt:"Mushi \xB7 \u0E43\u0E1A\u0E23\u0E31\u0E1A",thread:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32"},reports:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E08\u0E32\u0E01\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49",leaderboardLink:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33"},roadmap:{title:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22 \u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D\u0E44\u0E14\u0E49",shipped:"\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",vote:"\u0E42\u0E2B\u0E27\u0E15",voted:"\u0E42\u0E2B\u0E27\u0E15\u0E41\u0E25\u0E49\u0E27",voteCount:"{n} \u0E42\u0E2B\u0E27\u0E15",untitled:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D"},leaderboard:{title:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 \u2014 \u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2192",myRank:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E04\u0E37\u0E2D #{rank} \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49",footer:"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49 \xB7 \u0E04\u0E30\u0E41\u0E19\u0E19\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E17\u0E38\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19",anon:"\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D"},account:{title:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35 Mushi",checkEmailTitle:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E2D\u0E35\u0E40\u0E21\u0E25",joinTitle:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19",emailLabel:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",emailPlaceholder:"\u0E2D\u0E35\u0E40\u0E21\u0E25",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E44\u0E15\u0E48\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19",magicLinkSent:"\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48 {email} \u0E41\u0E25\u0E49\u0E27 \u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",resendEmail:"\u0E2A\u0E48\u0E07\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",sendLink:"\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",sending:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",crossAppReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B \u2192",viewLeaderboard:"\u0E14\u0E39\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01 \u2192",signOut:"\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A",rankSummary:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A #{rank} \xB7 {points} pts \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49"},crossApp:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",unknownApp:"\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D"},thread:{title:"\u0E40\u0E18\u0E23\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E40\u0E18\u0E23\u0E14\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E17\u0E35\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",confirmFixed:"\u0E43\u0E0A\u0E48 \u0E41\u0E01\u0E49\u0E41\u0E25\u0E49\u0E27",notFixed:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E41\u0E01\u0E49",replyPlaceholder:"\u0E15\u0E2D\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u2026",send:"\u0E2A\u0E48\u0E07"},success:{trackReport:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49 \u203A",receipt:"\u0E43\u0E1A\u0E23\u0E31\u0E1A",delivering:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E17\u0E35\u0E21\u2026",queuedOffline:"\u0E04\u0E34\u0E27\u0E2D\u0E2D\u0E1F\u0E44\u0E25\u0E19\u0E4C",queuedHint:"\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E2D\u0E2D\u0E19\u0E44\u0E25\u0E19\u0E4C",rateLimited:"\u0E2A\u0E48\u0E07\u0E16\u0E35\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B",rateLimitedHint:"\u0E23\u0E2D\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E19\u0E32\u0E17\u0E35 \u2014 \u0E40\u0E23\u0E32\u0E08\u0E31\u0E14\u0E04\u0E34\u0E27\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E44\u0E27\u0E49\u0E41\u0E25\u0E30\u0E08\u0E30\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E43\u0E2B\u0E49\u0E2D\u0E31\u0E15\u0E42\u0E19\u0E21\u0E31\u0E15\u0E34",quotaBlocked:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E31\u0E1A\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E44\u0E14\u0E49",quotaBlockedHint:"\u0E42\u0E04\u0E27\u0E15\u0E49\u0E32\u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E1E\u0E25\u0E19\u0E02\u0E2D\u0E07\u0E42\u0E1B\u0E23\u0E40\u0E08\u0E01\u0E15\u0E4C\u0E1A\u0E25\u0E47\u0E2D\u0E01\u0E01\u0E32\u0E23\u0E2A\u0E48\u0E07 \u0E02\u0E2D\u0E43\u0E2B\u0E49\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B\u0E15\u0E23\u0E27\u0E08 Billing",permanentFailed:"\u0E2A\u0E48\u0E07\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49",permanentFailedHint:"\u0E40\u0E1E\u0E22\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E16\u0E39\u0E01\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18 (\u0E21\u0E31\u0E01\u0E40\u0E1E\u0E23\u0E32\u0E30\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B) \u0E25\u0E2D\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E31\u0E49\u0E19\u0E25\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48\u0E41\u0E19\u0E1A\u0E20\u0E32\u0E1E\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D",retrying:"\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E04\u0E34\u0E27 \u2014 \u0E01\u0E33\u0E25\u0E31\u0E07\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",retryingHint:"\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E40\u0E0B\u0E34\u0E23\u0E4C\u0E1F\u0E40\u0E27\u0E2D\u0E23\u0E4C\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E40\u0E23\u0E32\u0E08\u0E30\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E43\u0E19\u0E1E\u0E37\u0E49\u0E19\u0E2B\u0E25\u0E31\u0E07",trackOnMushi:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1A\u0E19 Mushi",slaDefault:"\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",screenshotDropped:"\u0E2A\u0E48\u0E07\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E20\u0E32\u0E1E\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D \u2014 \u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E01\u0E27\u0E48\u0E32\u0E08\u0E30\u0E41\u0E19\u0E1A\u0E44\u0E14\u0E49"},featureRequest:{label:"\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C",description:"\u0E40\u0E2A\u0E19\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"},poweredBy:"Powered by Mushi v{version}"}};var ao={widget:{trigger:"Reportar problema",title:"Reportar un problema",close:"Cerrar",back:"Volver",submit:"Enviar",submitting:"Enviando\u2026",submitted:"\xA1Gracias! Tu reporte ha sido enviado.",error:"No se pudo enviar tu reporte. Revisa tu conexi\xF3n e int\xE9ntalo de nuevo."},step1:{heading:"\xBFQu\xE9 tipo de problema?",reportSectionLabel:"Reportar un problema",moreNavLabel:"M\xE1s",moreNav:{yourReports:"Tus reportes",yourReportsDesc:"Ver estado, respuestas del desarrollador y responder",unreadNew:"nuevos",communityIdeas:"Ideas de la comunidad",communityIdeasDesc:"Vota funciones y mira qu\xE9 se lanz\xF3",leaderboard:"Clasificaci\xF3n",joinCommunity:"Unirse a la comunidad \xB7 Rastrea reportes entre apps",myAccount:"Mi cuenta"},categories:{bug:"Error",slow:"Lento",visual:"Problema visual",confusing:"Confuso",other:"Otro"},categoryDescriptions:{bug:"Algo est\xE1 roto o no funciona",slow:"Problema de rendimiento o carga lenta",visual:"Problema de dise\xF1o, estilo o visualizaci\xF3n",confusing:"Dif\xEDcil de entender o navegar",other:"Otro problema"}},step2:{heading:"\xBFQu\xE9 pas\xF3?",intents:{bug:["Cierre inesperado","Sin respuesta","P\xE9rdida de datos","Resultado incorrecto","Otro"],slow:["Carga de p\xE1gina","Interacci\xF3n","Llamada API","Animaci\xF3n","Otro"],visual:["Layout roto","Superposici\xF3n","Elemento faltante","Color/fuente incorrecta","Otro"],confusing:["Etiqueta confusa","Sin ayuda","Flujo inesperado","Navegaci\xF3n perdida","Otro"],other:["Solicitud de funci\xF3n","Accesibilidad","Error tipogr\xE1fico","Otro"]}},step3:{heading:"Cu\xE9ntanos m\xE1s",descriptionPlaceholder:"Describe lo que pas\xF3\u2026",screenshotButton:"Adjuntar captura",screenshotAttached:"Captura adjunta \u2713",screenshotCapturing:"Tomando captura\u2026",screenshotFailed:"No se pudo capturar \u2014 descr\xEDbelo en su lugar",screenshotPreviewAlt:"Vista previa de la captura que se enviar\xE1",screenshotSensitiveHint:"Revisa la vista previa \u2014 qu\xEDtala si se ve informaci\xF3n privada (saldos, datos personales).",elementButton:"Seleccionar elemento",elementSelected:"Elemento seleccionado \u2713",elementCapturing:"Haz clic en cualquier elemento\u2026",elementFailed:"No se pudo seleccionar \u2014 descr\xEDbelo en su lugar",elementSelectorHint:"Clic en cualquier elemento \xB7 Esc para cancelar",optional:"(opcional)",tooShort:"Un poco m\xE1s de detalle nos ayuda a resolverlo",examplePrompts:["El bot\xF3n guardar no responde","La p\xE1gina se congel\xF3 10 segundos","El dise\xF1o se ve roto aqu\xED"]},assistant:{defaultLabel:"Preguntar",defaultGreeting:"Pregunta sobre esta p\xE1gina \u2014 solo uso lo que ves aqu\xED.",inputPlaceholder:"Escribe tu pregunta\u2026",sendAriaLabel:"Enviar",hubDescription:"Obt\xE9n ayuda para usar esta app",thinking:"Pensando\u2026",fileReportCta:"Enviar un informe en su lugar",stillStuckCta:"\xBFSigues atascado? Env\xEDa un informe",errors:{noResponse:"Sin respuesta \u2014 revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",generic:"No se pudo contactar al asistente. Int\xE9ntalo en un momento."}},flows:{eyebrows:{inbox:"Mushi \xB7 Bandeja",roadmap:"Mushi \xB7 Ideas",community:"Mushi \xB7 Comunidad",identity:"Mushi \xB7 Cuenta",signIn:"Mushi \xB7 Acceso",allApps:"Mushi \xB7 Todas las apps",receipt:"Mushi \xB7 Recibo",thread:"Mushi \xB7 Bandeja"},reports:{title:"Tus reportes",loading:"Cargando reportes\u2026",empty:"A\xFAn no hay reportes en este navegador.",leaderboardLink:"Clasificaci\xF3n"},roadmap:{title:"Ideas de la comunidad",loading:"Cargando ideas\u2026",empty:"A\xFAn no hay ideas. S\xE9 el primero en sugerir una.",shipped:"Publicado",vote:"Votar",voted:"Votado",voteCount:"{n} votos",untitled:"Idea sin t\xEDtulo"},leaderboard:{title:"Clasificaci\xF3n global",loading:"Cargando clasificaci\xF3n\u2026",empty:"A\xFAn no hay colaboradores \u2014 s\xE9 el primero.",signInPrompt:"Inicia sesi\xF3n para ver tu puesto \u2192",myRank:"Est\xE1s en el puesto #{rank} este mes",footer:"Colaboradores globales este mes \xB7 Los puntos se reinician mensualmente",anon:"An\xF3nimo"},account:{title:"Cuenta Mushi",checkEmailTitle:"Revisa tu correo",joinTitle:"\xDAnete a la comunidad",emailLabel:"Correo electr\xF3nico",emailPlaceholder:"Correo",signInPrompt:"Inicia sesi\xF3n para ver tus reportes en todas las apps y subir en la clasificaci\xF3n. Sin contrase\xF1a.",magicLinkSent:"Enviamos un enlace de acceso a {email}. \xC1brelo para conectar tus reportes.",resendEmail:"Reenviar correo",sendLink:"Enviar enlace de acceso",sending:"Enviando\u2026",crossAppReports:"Mis reportes en todas las apps \u2192",viewLeaderboard:"Ver clasificaci\xF3n global \u2192",signOut:"Cerrar sesi\xF3n",rankSummary:"Puesto #{rank} \xB7 {points} pts este mes"},crossApp:{title:"Mis reportes",loading:"Cargando tus reportes\u2026",empty:"A\xFAn no has enviado reportes.",unknownApp:"App desconocida"},thread:{title:"Hilo del reporte",loading:"Cargando hilo\u2026",empty:"A\xFAn no hay respuestas del equipo.",confirmFixed:"S\xED, qued\xF3 resuelto",notFixed:"A\xFAn no est\xE1 resuelto",replyPlaceholder:"Responder al desarrollador\u2026",send:"Enviar"},success:{trackReport:"Seguir este reporte \u203A",receipt:"Recibo",delivering:"Enviando al equipo\u2026",queuedOffline:"En cola sin conexi\xF3n",queuedHint:"Lo enviaremos en cuanto vuelvas a estar en l\xEDnea.",rateLimited:"Demasiado r\xE1pido",rateLimitedHint:"Espera un minuto \u2014 encolamos el reporte y lo reintentaremos autom\xE1ticamente.",quotaBlocked:"No se pudo aceptar este reporte",quotaBlockedHint:"La cuota o el plan del proyecto bloque\xF3 el env\xEDo. Pide al due\xF1o que revise Billing.",permanentFailed:"No se pudo enviar este reporte",permanentFailedHint:"El payload fue rechazado (a menudo por tama\xF1o). Intenta con un texto m\xE1s corto o sin captura.",retrying:"En cola \u2014 reintentando",retryingHint:"No pudimos llegar al servidor ahora. Seguiremos intentando en segundo plano.",trackOnMushi:"Seguir en Mushi",slaDefault:"Revisaremos tu reporte.",screenshotDropped:"Enviado sin la captura de pantalla \u2014 era demasiado grande para adjuntarla."},featureRequest:{label:"Solicitud de funci\xF3n",description:"Sugerir un cambio"},poweredBy:"Con tecnolog\xEDa de Mushi v{version}"}};var Ja={en:hr,ja:oo,th:io,es:ao};function tn(t){let e=t&&t!=="auto"?t:typeof navigator<"u"?navigator.language??navigator.languages?.[0]:void 0;if(!e)return hr;let r=e.split("-")[0].toLowerCase();return Ja[r]??hr}function Qa(t){let e=t.replace("#",""),r=e.length===3?e[0]+e[0]+e[1]+e[1]+e[2]+e[2]:e.slice(0,6),n=parseInt(r.slice(0,2),16),s=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return `${n},${s},${o}`}function lo(t,e="",r=""){let n=t==="dark",s=n?"dark":"light",o=Zr(s),a=Gs(s,e,r),i=Ks[s];return {isDark:n,paper:o.paper,paperRaised:o.paperRaised,ink:o.ink,inkMuted:o.inkMuted,inkFaint:o.inkFaint,inkDim:o.inkDim,rule:o.rule,ruleStrong:o.ruleStrong,widgetAccent:a.accent,widgetAccentWash:a.accentWash,widgetAccentInk:a.accentInk,widgetAccentShadow:n?Jr.dark:Jr.light,accentRgb:Qa(a.accent),shadowInk:n?"0,0,0":"14,13,11",ok:o.ok,danger:o.danger,onAccent:Ws,inverse:zs,neonBannerBg:ur.bg,neonBannerFg:ur.fg,neonBannerBorder:ur.border,brandBannerBorder:n?Qr.dark:Qr.light,statusSent:i.sent,statusReview:i.review,statusFixing:i.fixing,statusFixed:i.fixed,statusClosedBg:n?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.05)",fontDisplay:pt.fontDisplay,fontBody:pt.fontBody,fontMono:pt.fontMono,easeStamp:pr.easeStamp,zBanner:ht.banner,zPanel:ht.panel,zOverlay:ht.overlay,fabSize:mt.fabSize,panelWidth:mt.panelWidth,panelSheetBreakpoint:mt.panelSheetBreakpoint}}function co(t,e="",r=""){let n=lo(t,e,r),{isDark:s,paper:o,paperRaised:a,ink:i,inkMuted:l,inkFaint:f,inkDim:h,rule:m,ruleStrong:b,widgetAccent:d,widgetAccentWash:x,widgetAccentInk:v,widgetAccentShadow:C,accentRgb:$,shadowInk:T,ok:E,danger:w,onAccent:u,inverse:S,neonBannerBg:k,neonBannerFg:A,neonBannerBorder:y,brandBannerBorder:B,statusSent:Z,statusReview:ie,statusFixing:W,statusFixed:me,statusClosedBg:U,fontDisplay:Y,fontBody:F,fontMono:M,easeStamp:L,zBanner:I,fabSize:_}=n,{sizeBody:H,sizeLabel:V,lineBody:q}=pt,{durationFast:O}=pr,{instant:ee,fast:ne,base:J,panel:K,slow:ue,ring:$e}=Vs,{bannerHeight:z,gutter:te,panelWidth:et,panelMaxHeight:_e,panelSheetBreakpoint:tt,edgeTabWidth:Dt}=mt,Ge=_+dr.comfy,{base:Ot}=ht,ve=en.control,oe=en.card,{tight:Hn,snug:rt,comfy:nt,roomy:Bt,lounge:Nt,open:Ut,wide:Ft}=dr;return `
3
3
  :host {
4
4
  all: initial;
5
- font-family: ${B};
6
- font-size: ${A}px;
7
- line-height: ${_};
5
+ font-family: ${F};
6
+ font-size: ${H}px;
7
+ line-height: ${q};
8
8
  color: ${i};
9
9
  -webkit-font-smoothing: antialiased;
10
10
  -moz-osx-font-smoothing: grayscale;
11
11
  font-feature-settings: 'ss01', 'cv11'; /* nicer system-ui glyphs where supported */
12
- --mushi-ok: ${I};
12
+ --mushi-ok: ${E};
13
+ /* Spacing + radius scales (MUSHI_SPACING / MUSHI_RADIUS) \u2014 prefer these
14
+ over literal px so web + RN stay aligned with brand.tokens.json. */
15
+ --mushi-space-tight: ${Hn}px;
16
+ --mushi-space-snug: ${rt}px;
17
+ --mushi-space-comfy: ${nt}px;
18
+ --mushi-space-roomy: ${Bt}px;
19
+ --mushi-space-lounge: ${Nt}px;
20
+ --mushi-space-open: ${Ut}px;
21
+ --mushi-space-wide: ${Ft}px;
22
+ --mushi-radius-control: ${ve}px;
23
+ --mushi-radius-card: ${oe}px;
24
+ --mushi-touch-min: 44px;
25
+ /* Derived channel vars \u2014 accent RGB triplet + shadow-ink triplet.
26
+ Lets Shadow-DOM CSS compose rgba() values that respect host-accent
27
+ overrides and dark-mode ink without repeating the hex guard. */
28
+ --mushi-accent-rgb: ${$};
29
+ --mushi-shadow-ink: ${T};
13
30
  /* SDK contract: the host element is always pass-through. Only the
14
31
  interactive surfaces (.mushi-trigger, .mushi-banner, .mushi-panel)
15
32
  opt back into pointer events so the widget never creates an
@@ -27,24 +44,26 @@
27
44
 
28
45
  .mushi-trigger {
29
46
  position: fixed;
30
- width: ${Q}px;
31
- height: ${Q}px;
47
+ width: ${_}px;
48
+ height: ${_}px;
49
+ min-width: var(--mushi-touch-min);
50
+ min-height: var(--mushi-touch-min);
32
51
  border: 1px solid ${b};
33
- border-radius: ${Ie}px;
52
+ border-radius: ${ve}px;
34
53
  background: ${o};
35
54
  color: ${i};
36
55
  cursor: pointer;
37
56
  display: flex;
38
57
  align-items: center;
39
58
  justify-content: center;
40
- font-family: ${V};
59
+ font-family: ${Y};
41
60
  font-size: 22px;
42
61
  line-height: 1;
43
62
  box-shadow:
44
63
  0 1px 0 ${m},
45
- 0 6px 14px -8px rgba(14,13,11,0.35),
64
+ 0 6px 14px -8px rgba(${T},0.35),
46
65
  inset 0 -3px 0 ${d};
47
- transition: transform ${D}ms ${$}, box-shadow ${D}ms ${$};
66
+ transition: transform ${O}ms ${L}, opacity ${O}ms ${L};
48
67
  overflow: visible;
49
68
  isolation: isolate;
50
69
  }
@@ -58,20 +77,21 @@
58
77
  border-radius: 50%;
59
78
  background: ${d};
60
79
  box-shadow: 0 0 0 0 ${d};
61
- animation: mushi-pulse 2.4s ${$} infinite;
80
+ animation: mushi-pulse 2.4s ${L} infinite;
62
81
  }
63
82
  .mushi-trigger:hover {
64
83
  transform: translateY(-2px) rotate(-1.5deg);
65
84
  box-shadow:
66
85
  0 1px 0 ${m},
67
- 0 14px 24px -10px rgba(14,13,11,0.45),
86
+ 0 14px 24px -10px rgba(${T},0.45),
87
+ 0 0 20px -6px rgba(${$},0.22),
68
88
  inset 0 -3px 0 ${d};
69
89
  }
70
90
  .mushi-trigger:active {
71
91
  transform: translateY(0) rotate(0);
72
92
  box-shadow:
73
93
  0 1px 0 ${m},
74
- 0 2px 4px -2px rgba(14,13,11,0.35),
94
+ 0 2px 4px -2px rgba(${T},0.35),
75
95
  inset 0 -2px 0 ${d};
76
96
  }
77
97
  .mushi-trigger:focus-visible {
@@ -83,42 +103,42 @@
83
103
  can compose with the hover transform without fighting it. Respects
84
104
  prefers-reduced-motion. */
85
105
  @keyframes mushi-trigger-pulse {
86
- 0% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0.55), 0 1px 0 ${m}, 0 10px 24px -14px rgba(14,13,11,0.45); }
87
- 70% { box-shadow: 0 0 0 16px rgba(212, 67, 50, 0), 0 1px 0 ${m}, 0 10px 24px -14px rgba(14,13,11,0.45); }
88
- 100% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0), 0 1px 0 ${m}, 0 10px 24px -14px rgba(14,13,11,0.45); }
106
+ 0% { box-shadow: 0 0 0 0 rgba(${$},0.55), 0 1px 0 ${m}, 0 10px 24px -14px rgba(${T},0.45); }
107
+ 70% { box-shadow: 0 0 0 16px rgba(${$},0), 0 1px 0 ${m}, 0 10px 24px -14px rgba(${T},0.45); }
108
+ 100% { box-shadow: 0 0 0 0 rgba(${$},0), 0 1px 0 ${m}, 0 10px 24px -14px rgba(${T},0.45); }
89
109
  }
90
110
  .mushi-trigger-pulse {
91
- animation: mushi-trigger-pulse 800ms ${$} 3;
111
+ animation: mushi-trigger-pulse 800ms ${L} 3;
92
112
  }
93
113
  @media (prefers-reduced-motion: reduce) {
94
114
  .mushi-trigger-pulse { animation: none; }
95
115
  }
96
116
  .mushi-trigger.bottom-right {
97
- bottom: var(--mushi-bottom, calc(${M}px + env(safe-area-inset-bottom, 0px)));
98
- right: var(--mushi-right, calc(${M}px + env(safe-area-inset-right, 0px)));
117
+ bottom: var(--mushi-bottom, calc(${te}px + env(safe-area-inset-bottom, 0px)));
118
+ right: var(--mushi-right, calc(${te}px + env(safe-area-inset-right, 0px)));
99
119
  }
100
120
  .mushi-trigger.bottom-left {
101
- bottom: var(--mushi-bottom, calc(${M}px + env(safe-area-inset-bottom, 0px)));
102
- left: var(--mushi-left, calc(${M}px + env(safe-area-inset-left, 0px)));
121
+ bottom: var(--mushi-bottom, calc(${te}px + env(safe-area-inset-bottom, 0px)));
122
+ left: var(--mushi-left, calc(${te}px + env(safe-area-inset-left, 0px)));
103
123
  }
104
124
  .mushi-trigger.top-right {
105
- top: var(--mushi-top, calc(${M}px + env(safe-area-inset-top, 0px)));
106
- right: var(--mushi-right, calc(${M}px + env(safe-area-inset-right, 0px)));
125
+ top: var(--mushi-top, calc(${te}px + env(safe-area-inset-top, 0px)));
126
+ right: var(--mushi-right, calc(${te}px + env(safe-area-inset-right, 0px)));
107
127
  }
108
128
  .mushi-trigger.top-left {
109
- top: var(--mushi-top, calc(${M}px + env(safe-area-inset-top, 0px)));
110
- left: var(--mushi-left, calc(${M}px + env(safe-area-inset-left, 0px)));
129
+ top: var(--mushi-top, calc(${te}px + env(safe-area-inset-top, 0px)));
130
+ left: var(--mushi-left, calc(${te}px + env(safe-area-inset-left, 0px)));
111
131
  }
112
132
  .mushi-trigger.edge-tab {
113
- width: ${q}px;
133
+ width: ${Dt}px;
114
134
  height: 88px;
115
- border-radius: 4px 0 0 4px;
135
+ border-radius: ${ve}px 0 0 ${ve}px;
116
136
  writing-mode: vertical-rl;
117
137
  text-orientation: upright;
118
138
  font-size: 16px;
119
139
  box-shadow:
120
140
  0 1px 0 ${m},
121
- 0 10px 24px -14px rgba(14,13,11,0.45),
141
+ 0 10px 24px -14px rgba(${T},0.45),
122
142
  inset -3px 0 0 ${d};
123
143
  }
124
144
  .mushi-trigger.edge-tab.bottom-right,
@@ -128,15 +148,15 @@
128
148
  .mushi-trigger.edge-tab.bottom-left,
129
149
  .mushi-trigger.edge-tab.top-left {
130
150
  left: var(--mushi-left, 0);
131
- border-radius: 0 4px 4px 0;
151
+ border-radius: 0 ${ve}px ${ve}px 0;
132
152
  box-shadow:
133
153
  0 1px 0 ${m},
134
- 0 10px 24px -14px rgba(14,13,11,0.45),
154
+ 0 10px 24px -14px rgba(${T},0.45),
135
155
  inset 3px 0 0 ${d};
136
156
  }
137
157
  .mushi-trigger.shrunk {
138
- width: ${U}px;
139
- height: ${U}px;
158
+ width: ${z}px;
159
+ height: ${z}px;
140
160
  opacity: 0.82;
141
161
  transform: scale(0.92);
142
162
  }
@@ -156,11 +176,11 @@
156
176
  }
157
177
  .mushi-trigger.dragging {
158
178
  cursor: grabbing !important;
159
- z-index: calc(var(--z, ${ae}) + 2);
179
+ z-index: calc(var(--z, ${Ot}) + 2);
160
180
  transition: none !important;
161
181
  box-shadow:
162
182
  0 1px 0 ${m},
163
- 0 20px 40px -12px rgba(14,13,11,0.55),
183
+ 0 20px 40px -12px rgba(${T},0.55),
164
184
  inset 0 -3px 0 ${d};
165
185
  opacity: 0.92;
166
186
  }
@@ -176,28 +196,29 @@
176
196
 
177
197
  .mushi-panel {
178
198
  position: fixed;
179
- width: ${he}px;
180
- max-width: calc(100vw - ${_s.wide}px);
181
- max-height: min(${Ne}px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
199
+ width: ${et}px;
200
+ max-width: calc(100vw - ${dr.wide}px);
201
+ max-height: min(${_e}px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
182
202
  background: ${o};
183
203
  border: 1px solid ${b};
184
204
  border-radius: 6px;
185
205
  box-shadow:
186
206
  0 1px 0 ${m},
187
- 0 24px 56px -20px rgba(14,13,11,0.30),
188
- 0 8px 16px -8px rgba(14,13,11,0.20);
207
+ 0 24px 56px -20px rgba(${T},0.30),
208
+ 0 8px 16px -8px rgba(${T},0.20);
189
209
  overflow: hidden;
190
210
  display: flex;
191
211
  flex-direction: column;
192
212
  transform-origin: var(--mushi-origin, bottom right);
193
- transition: bottom 120ms ease, top 120ms ease, max-height 120ms ease;
213
+ /* Keyboard inset \u2014 layout exception (IME), not decorative (docs/MOTION.md) */
214
+ transition: bottom ${ee}ms ease, top ${ee}ms ease, max-height ${ee}ms ease;
194
215
  }
195
216
  /* Keyboard-safe: on narrow viewports lift above the keyboard */
196
217
  .mushi-panel.keyboard-open {
197
218
  bottom: calc(var(--mushi-keyboard-inset, 0px) + 8px) !important;
198
219
  }
199
220
  /* On narrow mobile, fill the width as a bottom sheet */
200
- @media (max-width: ${ie}px) {
221
+ @media (max-width: ${tt}px) {
201
222
  .mushi-panel {
202
223
  left: 0 !important;
203
224
  right: 0 !important;
@@ -211,41 +232,41 @@
211
232
  bottom: calc(var(--mushi-keyboard-inset, 0px) + 4px) !important;
212
233
  }
213
234
  }
214
- .mushi-panel.open { animation: mushi-stamp-in 320ms ${$} both; }
235
+ .mushi-panel.open { animation: mushi-stamp-in ${K}ms ${L} both; }
215
236
  .mushi-panel.closed { display: none; }
216
237
  .mushi-panel.bottom-right {
217
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${M}px) + ${te}px));
218
- right: var(--mushi-right, calc(${M}px + env(safe-area-inset-right, 0px)));
238
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${te}px) + ${Ge}px));
239
+ right: var(--mushi-right, calc(${te}px + env(safe-area-inset-right, 0px)));
219
240
  --mushi-origin: bottom right;
220
241
  }
221
242
  .mushi-panel.bottom-left {
222
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${M}px) + ${te}px));
223
- left: var(--mushi-left, calc(${M}px + env(safe-area-inset-left, 0px)));
243
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${te}px) + ${Ge}px));
244
+ left: var(--mushi-left, calc(${te}px + env(safe-area-inset-left, 0px)));
224
245
  --mushi-origin: bottom left;
225
246
  }
226
247
  .mushi-panel.top-right {
227
- top: var(--mushi-panel-top, calc(var(--mushi-top, ${M}px) + ${te}px));
228
- right: var(--mushi-right, calc(${M}px + env(safe-area-inset-right, 0px)));
248
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${te}px) + ${Ge}px));
249
+ right: var(--mushi-right, calc(${te}px + env(safe-area-inset-right, 0px)));
229
250
  --mushi-origin: top right;
230
251
  }
231
252
  .mushi-panel.top-left {
232
- top: var(--mushi-panel-top, calc(var(--mushi-top, ${M}px) + ${te}px));
233
- left: var(--mushi-left, calc(${M}px + env(safe-area-inset-left, 0px)));
253
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${te}px) + ${Ge}px));
254
+ left: var(--mushi-left, calc(${te}px + env(safe-area-inset-left, 0px)));
234
255
  --mushi-origin: top left;
235
256
  }
236
257
  .mushi-outdated {
237
258
  margin: 12px 14px 0;
238
259
  padding: 10px 12px;
239
- border: 1px solid ${v};
240
- background: ${v};
241
- color: ${x};
242
- font-family: ${B};
260
+ border: 1px solid ${x};
261
+ background: ${x};
262
+ color: ${v};
263
+ font-family: ${F};
243
264
  font-size: 12px;
244
265
  line-height: 1.4;
245
266
  }
246
267
  .mushi-outdated strong {
247
268
  display: block;
248
- font-family: ${P};
269
+ font-family: ${M};
249
270
  font-size: 10px;
250
271
  letter-spacing: 0.12em;
251
272
  text-transform: uppercase;
@@ -279,8 +300,8 @@
279
300
  height: 22px;
280
301
  border-radius: 3px;
281
302
  background: ${d};
282
- color: ${E};
283
- font-family: ${V};
303
+ color: ${u};
304
+ font-family: ${Y};
284
305
  font-size: 14px;
285
306
  font-weight: 600;
286
307
  line-height: 1;
@@ -295,14 +316,14 @@
295
316
  gap: 2px;
296
317
  }
297
318
  .mushi-header-eyebrow {
298
- font-family: ${P};
319
+ font-family: ${M};
299
320
  font-size: 10px;
300
321
  letter-spacing: 0.18em;
301
322
  text-transform: uppercase;
302
323
  color: ${l};
303
324
  }
304
325
  .mushi-header h3 {
305
- font-family: ${V};
326
+ font-family: ${Y};
306
327
  font-size: 19px;
307
328
  font-weight: 500;
308
329
  line-height: 1.15;
@@ -316,7 +337,7 @@
316
337
  gap: 6px;
317
338
  }
318
339
  .mushi-step-counter {
319
- font-family: ${P};
340
+ font-family: ${M};
320
341
  font-size: 11px;
321
342
  color: ${l};
322
343
  letter-spacing: 0.06em;
@@ -333,11 +354,11 @@
333
354
  cursor: pointer;
334
355
  padding: 2px 4px;
335
356
  color: ${l};
336
- font-family: ${B};
357
+ font-family: ${F};
337
358
  font-size: 16px;
338
359
  line-height: 1;
339
360
  border-radius: 0;
340
- transition: color 150ms ${$};
361
+ transition: opacity ${ee}ms ${L};
341
362
  }
342
363
  .mushi-back {
343
364
  align-self: flex-start;
@@ -348,7 +369,7 @@
348
369
  margin: 0 0 2px;
349
370
  min-height: 22px;
350
371
  color: ${l};
351
- font-family: ${P};
372
+ font-family: ${M};
352
373
  font-size: 11px;
353
374
  font-weight: 500;
354
375
  letter-spacing: 0.06em;
@@ -358,7 +379,7 @@
358
379
  display: inline-flex;
359
380
  align-items: center;
360
381
  gap: 4px;
361
- transition: color 150ms ${$};
382
+ transition: opacity ${ee}ms ${L};
362
383
  white-space: nowrap;
363
384
  }
364
385
  .mushi-close:hover { color: ${d}; }
@@ -392,24 +413,29 @@
392
413
  display: grid;
393
414
  grid-template-columns: auto 1fr auto;
394
415
  align-items: center;
395
- gap: 12px;
416
+ gap: ${nt}px;
396
417
  width: 100%;
397
- padding: 11px 0;
418
+ min-height: var(--mushi-touch-min);
419
+ padding: ${nt}px 0;
398
420
  border: none;
399
421
  border-bottom: 1px solid ${m};
400
422
  background: transparent;
401
423
  cursor: pointer;
402
424
  color: inherit;
403
425
  text-align: left;
404
- transition: padding 220ms ${$}, color 220ms ${$};
426
+ transition: transform ${J}ms ${L}, opacity ${J}ms ${L};
405
427
  position: relative;
406
428
  }
407
429
  .mushi-option-btn:last-child { border-bottom: none; }
408
- .mushi-option-btn:hover { padding-left: 6px; color: ${d}; }
430
+ .mushi-option-btn:hover {
431
+ transform: translateX(6px);
432
+ color: ${d};
433
+ background: linear-gradient(90deg, rgba(${$},0.07), transparent 55%);
434
+ }
409
435
  .mushi-option-btn:hover .mushi-option-arrow { opacity: 1; transform: translateX(0); color: ${d}; }
410
436
  .mushi-option-btn:focus-visible {
411
437
  outline: none;
412
- padding-left: 6px;
438
+ transform: translateX(6px);
413
439
  box-shadow: inset 2px 0 0 ${d};
414
440
  }
415
441
  .mushi-option-icon {
@@ -420,7 +446,7 @@
420
446
  }
421
447
  .mushi-option-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
422
448
  .mushi-option-label {
423
- font-family: ${V};
449
+ font-family: ${Y};
424
450
  font-size: 16px;
425
451
  font-weight: 500;
426
452
  letter-spacing: -0.005em;
@@ -432,12 +458,12 @@
432
458
  letter-spacing: 0.005em;
433
459
  }
434
460
  .mushi-option-arrow {
435
- font-family: ${P};
461
+ font-family: ${M};
436
462
  font-size: 14px;
437
463
  color: ${f};
438
464
  opacity: 0;
439
465
  transform: translateX(-4px);
440
- transition: opacity 220ms ${$}, transform 220ms ${$}, color 220ms ${$};
466
+ transition: opacity ${J}ms ${L}, transform ${J}ms ${L};
441
467
  }
442
468
  /* Feature-request and Reports-inbox entries sit above the five
443
469
  category cards as discoverable shortcuts. We give them a subtle
@@ -448,7 +474,7 @@
448
474
  .mushi-reports-entry {
449
475
  padding-left: 10px;
450
476
  border-left: 2px solid ${f};
451
- transition: padding 220ms ${$}, color 220ms ${$}, border-color 220ms ${$};
477
+ transition: opacity ${J}ms ${L}, transform ${J}ms ${L};
452
478
  }
453
479
  .mushi-feature-entry:hover,
454
480
  .mushi-reports-entry:hover {
@@ -471,7 +497,7 @@
471
497
  color: ${i};
472
498
  cursor: pointer;
473
499
  text-align: left;
474
- transition: background 180ms ${$}, padding-left 180ms ${$};
500
+ transition: opacity ${ne}ms ${L}, transform ${ne}ms ${L};
475
501
  }
476
502
  .mushi-report-row:hover,
477
503
  .mushi-report-row:focus-visible {
@@ -500,7 +526,7 @@
500
526
  .mushi-report-status {
501
527
  display: inline-flex;
502
528
  align-items: center;
503
- font-family: ${P};
529
+ font-family: ${M};
504
530
  font-size: 10px;
505
531
  font-weight: 600;
506
532
  letter-spacing: 0.04em;
@@ -510,33 +536,33 @@
510
536
  border: 1px solid transparent;
511
537
  }
512
538
  .mushi-status-sent {
513
- color: ${O.fg};
514
- background: ${O.bg};
515
- border-color: ${O.border};
539
+ color: ${Z.fg};
540
+ background: ${Z.bg};
541
+ border-color: ${Z.border};
516
542
  }
517
543
  .mushi-status-review {
518
- color: ${N.fg};
519
- background: ${N.bg};
520
- border-color: ${N.border};
544
+ color: ${ie.fg};
545
+ background: ${ie.bg};
546
+ border-color: ${ie.border};
521
547
  }
522
548
  .mushi-status-fixing {
523
- color: ${Z.fg};
524
- background: ${Z.bg};
525
- border-color: ${Z.border};
549
+ color: ${W.fg};
550
+ background: ${W.bg};
551
+ border-color: ${W.border};
526
552
  }
527
553
  .mushi-status-fixed {
528
- color: ${X.fg};
529
- background: ${X.bg};
530
- border-color: ${X.border};
554
+ color: ${me.fg};
555
+ background: ${me.bg};
556
+ border-color: ${me.border};
531
557
  }
532
558
  .mushi-status-closed,
533
559
  .mushi-status-unknown {
534
560
  color: ${l};
535
- background: ${j};
561
+ background: ${U};
536
562
  border-color: ${b};
537
563
  }
538
564
  .mushi-report-when {
539
- font-family: ${P};
565
+ font-family: ${M};
540
566
  font-size: 10px;
541
567
  color: ${f};
542
568
  }
@@ -548,17 +574,17 @@
548
574
  height: 18px;
549
575
  padding: 0 5px;
550
576
  border-radius: 999px;
551
- font-family: ${P};
577
+ font-family: ${M};
552
578
  font-size: 10px;
553
579
  font-weight: 700;
554
- color: ${x};
580
+ color: ${v};
555
581
  background: ${d};
556
582
  }
557
583
  .mushi-report-chevron {
558
584
  font-size: 18px;
559
585
  line-height: 1;
560
586
  color: ${f};
561
- transition: color 180ms ${$}, transform 180ms ${$};
587
+ transition: opacity ${ne}ms ${L}, transform ${ne}ms ${L};
562
588
  }
563
589
  .mushi-report-row:hover .mushi-report-chevron,
564
590
  .mushi-report-row:focus-visible .mushi-report-chevron {
@@ -590,12 +616,12 @@
590
616
  background: ${s?"rgba(242,235,221,0.04)":"rgba(14,13,11,0.03)"};
591
617
  }
592
618
  .mushi-thread-comment.reporter {
593
- border-color: ${v};
594
- background: ${v};
619
+ border-color: ${x};
620
+ background: ${x};
595
621
  }
596
622
  .mushi-thread-comment strong {
597
623
  display: block;
598
- font-family: ${P};
624
+ font-family: ${M};
599
625
  font-size: 10px;
600
626
  letter-spacing: 0.04em;
601
627
  margin-bottom: 3px;
@@ -615,9 +641,9 @@
615
641
  gap: 8px;
616
642
  padding: 6px 10px 6px 12px;
617
643
  border-left: 2px solid ${d};
618
- background: ${v};
619
- color: ${x};
620
- font-family: ${V};
644
+ background: ${x};
645
+ color: ${v};
646
+ font-family: ${Y};
621
647
  font-size: 13px;
622
648
  margin: 4px 0 14px;
623
649
  border-radius: 0 3px 3px 0;
@@ -645,10 +671,10 @@
645
671
  border-radius: 12px;
646
672
  background: transparent;
647
673
  color: ${l};
648
- font-family: ${B};
674
+ font-family: ${F};
649
675
  font-size: 11px;
650
676
  cursor: pointer;
651
- transition: color 150ms ${$}, border-color 150ms ${$}, background 150ms ${$};
677
+ transition: opacity ${ee}ms ${L}, transform ${ee}ms ${L};
652
678
  white-space: nowrap;
653
679
  }
654
680
  .mushi-example-chip:hover {
@@ -669,12 +695,12 @@
669
695
  position: absolute;
670
696
  bottom: 4px;
671
697
  right: 0;
672
- font-family: ${P};
698
+ font-family: ${M};
673
699
  font-size: 10px;
674
700
  letter-spacing: 0.04em;
675
701
  color: ${f};
676
702
  pointer-events: none;
677
- transition: color 200ms ${$};
703
+ transition: opacity ${ne}ms ${L};
678
704
  }
679
705
 
680
706
  .mushi-textarea {
@@ -685,12 +711,12 @@
685
711
  border-bottom: 1px solid ${b};
686
712
  background: transparent;
687
713
  color: ${i};
688
- font-family: ${B};
714
+ font-family: ${F};
689
715
  font-size: 14px;
690
716
  line-height: 1.5;
691
717
  resize: vertical;
692
718
  outline: none;
693
- transition: border-color 200ms ${$};
719
+ transition: opacity ${ne}ms ${L}, transform ${ne}ms ${L};
694
720
  }
695
721
  .mushi-textarea::placeholder {
696
722
  color: ${f};
@@ -713,12 +739,12 @@
713
739
  border-radius: 3px;
714
740
  background: transparent;
715
741
  color: ${l};
716
- font-family: ${P};
742
+ font-family: ${M};
717
743
  font-size: 11px;
718
744
  letter-spacing: 0.04em;
719
745
  text-transform: uppercase;
720
746
  cursor: pointer;
721
- transition: color 180ms ${$}, border-color 180ms ${$}, background 180ms ${$};
747
+ transition: opacity ${ne}ms ${L}, transform ${ne}ms ${L};
722
748
  }
723
749
  .mushi-attach-btn:hover {
724
750
  color: ${i};
@@ -727,17 +753,17 @@
727
753
  .mushi-attach-btn.active {
728
754
  color: ${d};
729
755
  border-color: ${d};
730
- background: ${v};
756
+ background: ${x};
731
757
  }
732
758
  .mushi-attach-btn.danger {
733
- color: ${x};
734
- border-color: ${v};
759
+ color: ${v};
760
+ border-color: ${x};
735
761
  background: transparent;
736
762
  }
737
763
  .mushi-attach-btn.danger:hover {
738
764
  color: ${d};
739
765
  border-color: ${d};
740
- background: ${v};
766
+ background: ${x};
741
767
  }
742
768
  .mushi-attach-btn.loading {
743
769
  opacity: 0.7;
@@ -745,7 +771,7 @@
745
771
  }
746
772
  .mushi-attach-btn.error {
747
773
  color: ${d};
748
- border-color: ${v};
774
+ border-color: ${x};
749
775
  }
750
776
  .mushi-attach-btn:focus-visible {
751
777
  outline: 2px solid ${d};
@@ -777,7 +803,7 @@
777
803
  .mushi-screenshot-hint {
778
804
  margin: 0;
779
805
  color: ${l};
780
- font-family: ${P};
806
+ font-family: ${M};
781
807
  font-size: 10.5px;
782
808
  line-height: 1.4;
783
809
  letter-spacing: 0.02em;
@@ -812,7 +838,7 @@
812
838
  border: 1.5px solid currentColor;
813
839
  border-top-color: transparent;
814
840
  border-radius: 50%;
815
- animation: mushi-spin 0.7s linear infinite;
841
+ animation: mushi-spin ${$e}ms linear infinite;
816
842
  }
817
843
 
818
844
  .mushi-footer {
@@ -824,7 +850,7 @@
824
850
  gap: 12px;
825
851
  }
826
852
  .mushi-footer-hint {
827
- font-family: ${P};
853
+ font-family: ${M};
828
854
  font-size: 10px;
829
855
  letter-spacing: 0.10em;
830
856
  text-transform: uppercase;
@@ -834,19 +860,20 @@
834
860
  position: relative;
835
861
  display: inline-flex;
836
862
  align-items: center;
837
- gap: 8px;
838
- padding: 10px 18px;
863
+ gap: ${rt}px;
864
+ min-height: var(--mushi-touch-min);
865
+ padding: ${nt}px ${Nt}px;
839
866
  border: 1px solid ${d};
840
- border-radius: 3px;
841
- background: ${d};
842
- color: ${E};
843
- font-family: ${P};
844
- font-size: 11px;
867
+ border-radius: ${ve}px;
868
+ background: linear-gradient(160deg, ${d} 0%, ${C} 100%);
869
+ color: ${u};
870
+ font-family: ${M};
871
+ font-size: ${V}px;
845
872
  letter-spacing: 0.16em;
846
873
  text-transform: uppercase;
847
874
  cursor: pointer;
848
875
  overflow: hidden;
849
- transition: transform 180ms ${$}, box-shadow 180ms ${$};
876
+ transition: transform ${ne}ms ${L}, opacity ${ne}ms ${L};
850
877
  box-shadow: 0 2px 0 ${C};
851
878
  }
852
879
  .mushi-submit::after {
@@ -856,12 +883,15 @@
856
883
  background: radial-gradient(circle at center, rgba(255,255,255,0.35) 0%, transparent 60%);
857
884
  opacity: 0;
858
885
  transform: scale(0.4);
859
- transition: opacity 280ms ${$}, transform 380ms ${$};
886
+ transition: opacity ${K}ms ${L}, transform ${ue}ms ${L};
860
887
  pointer-events: none;
861
888
  }
862
889
  .mushi-submit:hover {
863
890
  transform: translateY(-1px);
864
- box-shadow: 0 3px 0 ${C};
891
+ box-shadow:
892
+ 0 3px 0 ${C},
893
+ 0 0 0 3px rgba(${$},0.18),
894
+ 0 4px 16px -4px rgba(${$},0.35);
865
895
  }
866
896
  .mushi-submit:hover::after { opacity: 1; transform: scale(1.4); }
867
897
  .mushi-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 ${C}; }
@@ -875,7 +905,7 @@
875
905
  }
876
906
  .mushi-submit-arrow {
877
907
  display: inline-block;
878
- transition: transform 220ms ${$};
908
+ transition: transform ${J}ms ${L};
879
909
  }
880
910
  .mushi-submit:hover .mushi-submit-arrow { transform: translateX(3px); }
881
911
 
@@ -883,7 +913,7 @@
883
913
  padding: 9px 14px 11px;
884
914
  border-top: 1px solid ${m};
885
915
  color: ${f};
886
- font-family: ${P};
916
+ font-family: ${M};
887
917
  font-size: 9px;
888
918
  letter-spacing: 0.16em;
889
919
  text-align: center;
@@ -897,7 +927,7 @@
897
927
  gap: 8px;
898
928
  padding: 10px 22px 14px;
899
929
  color: ${f};
900
- font-family: ${P};
930
+ font-family: ${M};
901
931
  font-size: 11px;
902
932
  letter-spacing: 0.10em;
903
933
  }
@@ -905,12 +935,12 @@
905
935
  display: inline-flex;
906
936
  align-items: baseline;
907
937
  gap: 4px;
908
- transition: color 200ms ${$};
938
+ transition: opacity ${ne}ms ${L};
909
939
  }
910
940
  .mushi-step-num.done { color: ${l}; text-decoration: line-through; text-decoration-color: ${f}; }
911
941
  .mushi-step-num.active {
912
942
  color: ${d};
913
- font-family: ${V};
943
+ font-family: ${Y};
914
944
  font-size: 14px;
915
945
  font-weight: 600;
916
946
  letter-spacing: 0;
@@ -944,27 +974,28 @@
944
974
  stroke-dashoffset: 280;
945
975
  transform: rotate(-90deg);
946
976
  transform-origin: center;
947
- animation: mushi-stamp-ring 700ms ${$} 80ms forwards;
977
+ animation: mushi-stamp-ring 700ms ${L} 80ms forwards;
978
+ filter: drop-shadow(0 0 6px rgba(${$},0.5));
948
979
  }
949
980
  .mushi-success-stamp-label {
950
- font-family: ${V};
981
+ font-family: ${Y};
951
982
  font-size: 18px;
952
983
  font-weight: 600;
953
984
  color: ${d};
954
985
  letter-spacing: 0.04em;
955
986
  transform: rotate(-6deg);
956
987
  opacity: 0;
957
- animation: mushi-stamp-press 360ms ${$} 600ms forwards;
988
+ animation: mushi-stamp-press 360ms ${L} 600ms forwards;
958
989
  }
959
990
  .mushi-success-headline {
960
- font-family: ${V};
991
+ font-family: ${Y};
961
992
  font-size: 18px;
962
993
  font-weight: 500;
963
994
  color: ${i};
964
995
  margin-bottom: 4px;
965
996
  }
966
997
  .mushi-success-meta {
967
- font-family: ${P};
998
+ font-family: ${M};
968
999
  font-size: 11px;
969
1000
  letter-spacing: 0.10em;
970
1001
  text-transform: uppercase;
@@ -990,7 +1021,7 @@
990
1021
  align-items: center;
991
1022
  justify-content: center;
992
1023
  gap: 8px;
993
- font-family: ${P};
1024
+ font-family: ${M};
994
1025
  font-size: 11px;
995
1026
  letter-spacing: 0.05em;
996
1027
  color: ${l};
@@ -1009,15 +1040,15 @@
1009
1040
  background: transparent;
1010
1041
  border: 1px dashed ${m};
1011
1042
  color: inherit;
1012
- font-family: ${P};
1043
+ font-family: ${M};
1013
1044
  font-size: 12px;
1014
1045
  letter-spacing: 0.02em;
1015
1046
  cursor: pointer;
1016
- transition: background 120ms ease, border-color 120ms ease;
1047
+ transition: opacity ${ee}ms ${L};
1017
1048
  }
1018
1049
  .mushi-success-receipt-id:hover,
1019
1050
  .mushi-success-receipt-id:focus-visible {
1020
- background: rgba(217, 65, 47, 0.06);
1051
+ background: rgba(${$},0.06);
1021
1052
  border-color: ${d};
1022
1053
  color: ${d};
1023
1054
  outline: none;
@@ -1034,13 +1065,13 @@
1034
1065
  padding: 6px 10px;
1035
1066
  border-radius: 4px;
1036
1067
  background: ${d};
1037
- color: ${w};
1038
- font-family: ${P};
1068
+ color: ${S};
1069
+ font-family: ${M};
1039
1070
  font-size: 11px;
1040
1071
  letter-spacing: 0.10em;
1041
1072
  text-transform: uppercase;
1042
1073
  text-decoration: none;
1043
- transition: filter 120ms ease;
1074
+ transition: filter ${ee}ms ease;
1044
1075
  }
1045
1076
  .mushi-success-receipt-track:hover,
1046
1077
  .mushi-success-receipt-track:focus-visible {
@@ -1069,7 +1100,7 @@
1069
1100
  display: block;
1070
1101
  margin: 12px auto 0;
1071
1102
  font-size: 12px;
1072
- font-family: ${P};
1103
+ font-family: ${M};
1073
1104
  color: ${d};
1074
1105
  text-decoration: underline;
1075
1106
  text-underline-offset: 2px;
@@ -1081,7 +1112,7 @@
1081
1112
  .mushi-success-my-reports:hover { opacity: 0.75; }
1082
1113
  .mushi-success-sla {
1083
1114
  margin-top: 2px;
1084
- font-family: ${V};
1115
+ font-family: ${Y};
1085
1116
  font-size: 12px;
1086
1117
  line-height: 1.45;
1087
1118
  text-align: center;
@@ -1107,7 +1138,7 @@
1107
1138
  border-left: 2px solid ${d};
1108
1139
  color: ${d};
1109
1140
  font-size: 12px;
1110
- font-family: ${P};
1141
+ font-family: ${M};
1111
1142
  letter-spacing: 0.02em;
1112
1143
  }
1113
1144
 
@@ -1130,20 +1161,20 @@
1130
1161
  flex-shrink: 0;
1131
1162
  }
1132
1163
  .mushi-rewards-tier-name {
1133
- font-family: ${P};
1164
+ font-family: ${M};
1134
1165
  font-size: 11px;
1135
1166
  letter-spacing: 0.08em;
1136
1167
  text-transform: uppercase;
1137
1168
  color: ${i};
1138
1169
  }
1139
1170
  .mushi-rewards-pts-count {
1140
- font-family: ${P};
1171
+ font-family: ${M};
1141
1172
  font-size: 11px;
1142
1173
  color: ${l};
1143
1174
  margin-right: auto;
1144
1175
  }
1145
1176
  .mushi-rewards-pts-earn {
1146
- font-family: ${P};
1177
+ font-family: ${M};
1147
1178
  font-size: 10px;
1148
1179
  color: ${d};
1149
1180
  letter-spacing: 0.04em;
@@ -1158,12 +1189,16 @@
1158
1189
  }
1159
1190
  .mushi-tier-bar-fill {
1160
1191
  height: 100%;
1192
+ width: 100%;
1161
1193
  background: ${d};
1162
1194
  border-radius: 2px;
1163
- transition: width 600ms ${$};
1195
+ /* Meter fill \u2014 scaleX keeps compositor-friendly motion (docs/MOTION.md). */
1196
+ transform-origin: left center;
1197
+ transform: scaleX(var(--mushi-tier-pct, 0));
1198
+ transition: transform ${ue}ms ${L};
1164
1199
  }
1165
1200
  .mushi-rewards-next-label {
1166
- font-family: ${P};
1201
+ font-family: ${M};
1167
1202
  font-size: 10px;
1168
1203
  color: ${l};
1169
1204
  text-align: right;
@@ -1178,7 +1213,7 @@
1178
1213
  width: 100%;
1179
1214
  }
1180
1215
  .mushi-success-pts-award {
1181
- font-family: ${P};
1216
+ font-family: ${M};
1182
1217
  font-size: 22px;
1183
1218
  font-weight: 700;
1184
1219
  color: ${d};
@@ -1186,7 +1221,7 @@
1186
1221
  letter-spacing: 0.06em;
1187
1222
  margin-bottom: 10px;
1188
1223
  opacity: 0;
1189
- animation: mushi-pts-pop 420ms ${$} 900ms forwards;
1224
+ animation: mushi-pts-pop ${ue}ms ${L} 900ms forwards;
1190
1225
  }
1191
1226
  .success-bar { margin: 0 0 5px; }
1192
1227
 
@@ -1204,8 +1239,8 @@
1204
1239
  .mushi-beta-strip {
1205
1240
  margin: 0 16px 2px;
1206
1241
  padding: 9px 12px;
1207
- background: ${v};
1208
- border: 1px solid ${s?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.16)"};
1242
+ background: ${x};
1243
+ border: 1px solid rgba(${$},${s?"0.22":"0.16"});
1209
1244
  border-radius: 4px;
1210
1245
  display: flex;
1211
1246
  flex-direction: column;
@@ -1224,8 +1259,8 @@
1224
1259
  padding: 1px 6px;
1225
1260
  border-radius: 3px;
1226
1261
  background: ${d};
1227
- color: ${E};
1228
- font-family: ${P};
1262
+ color: ${u};
1263
+ font-family: ${M};
1229
1264
  font-size: 9px;
1230
1265
  font-weight: 700;
1231
1266
  letter-spacing: 0.14em;
@@ -1244,7 +1279,7 @@
1244
1279
  .mushi-beta-contact-hint {
1245
1280
  font-size: 10px;
1246
1281
  color: ${f};
1247
- font-family: ${P};
1282
+ font-family: ${M};
1248
1283
  letter-spacing: 0.06em;
1249
1284
  }
1250
1285
 
@@ -1259,7 +1294,7 @@
1259
1294
 
1260
1295
  .mushi-beta-perks li {
1261
1296
  font-size: 12px;
1262
- color: ${x};
1297
+ color: ${v};
1263
1298
  font-weight: 500;
1264
1299
  }
1265
1300
 
@@ -1284,7 +1319,7 @@
1284
1319
  content: '\u25B6';
1285
1320
  font-size: 7px;
1286
1321
  opacity: 0.6;
1287
- transition: transform 0.15s ease;
1322
+ transition: transform ${ee}ms ${L};
1288
1323
  }
1289
1324
 
1290
1325
  .mushi-changelog[open] .mushi-changelog-summary::before {
@@ -1311,8 +1346,8 @@
1311
1346
  .mushi-beta-success-footer {
1312
1347
  margin-top: 14px;
1313
1348
  padding: 10px 14px;
1314
- background: ${v};
1315
- border: 1px solid ${s?"rgba(255,90,71,0.18)":"rgba(224,60,44,0.14)"};
1349
+ background: ${x};
1350
+ border: 1px solid rgba(${$},${s?"0.18":"0.14"});
1316
1351
  border-radius: 4px;
1317
1352
  display: flex;
1318
1353
  flex-direction: column;
@@ -1322,7 +1357,7 @@
1322
1357
 
1323
1358
  .mushi-beta-success-line {
1324
1359
  font-size: 12px;
1325
- color: ${x};
1360
+ color: ${v};
1326
1361
  line-height: 1.5;
1327
1362
  }
1328
1363
 
@@ -1343,19 +1378,19 @@
1343
1378
  fix \u2014 Workstream C). Horizontal padding also clears the left/right
1344
1379
  insets for landscape notches. */
1345
1380
  box-sizing: border-box;
1346
- min-height: ${U}px;
1381
+ min-height: ${z}px;
1347
1382
  display: flex;
1348
1383
  align-items: center;
1349
1384
  justify-content: center;
1350
1385
  gap: 10px;
1351
1386
  padding: 0 calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px));
1352
- font-family: ${P};
1387
+ font-family: ${M};
1353
1388
  font-size: 12px;
1354
1389
  letter-spacing: 0.04em;
1355
1390
  white-space: nowrap;
1356
1391
  overflow: hidden;
1357
- z-index: var(--mushi-banner-z, ${ee});
1358
- animation: mushi-banner-slide-in 0.3s ${$} both;
1392
+ z-index: var(--mushi-banner-z, ${I});
1393
+ animation: mushi-banner-slide-in ${K}ms ${L} both;
1359
1394
  }
1360
1395
 
1361
1396
  .mushi-banner.top { top: 0; padding-top: env(safe-area-inset-top, 0px); }
@@ -1363,17 +1398,17 @@
1363
1398
 
1364
1399
  /* --- neon variant (electric lime \u2014 dev / beta tool aesthetic) --- */
1365
1400
  .mushi-banner.neon {
1366
- background: ${p};
1367
- color: ${S};
1368
- border-bottom: 1.5px solid ${R};
1401
+ background: ${k};
1402
+ color: ${A};
1403
+ border-bottom: 1.5px solid ${y};
1369
1404
  }
1370
1405
  .mushi-banner.neon.bottom {
1371
- border-top: 1.5px solid ${R};
1406
+ border-top: 1.5px solid ${y};
1372
1407
  border-bottom: none;
1373
1408
  }
1374
1409
  .mushi-banner.neon .mushi-banner-btn {
1375
1410
  background: rgba(0,0,0,0.14);
1376
- color: ${S};
1411
+ color: ${A};
1377
1412
  border: 1px solid rgba(0,0,0,0.22);
1378
1413
  }
1379
1414
  .mushi-banner.neon .mushi-banner-btn:hover {
@@ -1383,16 +1418,16 @@
1383
1418
  /* --- brand variant (widgetAccent \u2014 editorial, app-quality) --- */
1384
1419
  .mushi-banner.brand {
1385
1420
  background: ${d};
1386
- color: ${w};
1387
- border-bottom: 1.5px solid ${y};
1421
+ color: ${S};
1422
+ border-bottom: 1.5px solid ${B};
1388
1423
  }
1389
1424
  .mushi-banner.brand.bottom {
1390
- border-top: 1.5px solid ${y};
1425
+ border-top: 1.5px solid ${B};
1391
1426
  border-bottom: none;
1392
1427
  }
1393
1428
  .mushi-banner.brand .mushi-banner-btn {
1394
1429
  background: rgba(255,255,255,0.18);
1395
- color: ${w};
1430
+ color: ${S};
1396
1431
  border: 1px solid rgba(255,255,255,0.32);
1397
1432
  }
1398
1433
  .mushi-banner.brand .mushi-banner-btn:hover {
@@ -1435,7 +1470,7 @@
1435
1470
  .mushi-banner--rich {
1436
1471
  justify-content: space-between;
1437
1472
  gap: 12px;
1438
- min-height: ${U}px;
1473
+ min-height: ${z}px;
1439
1474
  height: auto;
1440
1475
  padding: 4px 12px 4px 16px;
1441
1476
  white-space: normal;
@@ -1496,7 +1531,7 @@
1496
1531
  font-size: 11px;
1497
1532
  }
1498
1533
  .mushi-banner-actions::-webkit-scrollbar { display: none; }
1499
- @media (max-width: ${ie}px) {
1534
+ @media (max-width: ${tt}px) {
1500
1535
  /* Phones: keep only the primary bug CTA (+ dismiss outside the nav). */
1501
1536
  .mushi-banner-actions .mushi-banner-extra { display: none; }
1502
1537
  }
@@ -1512,7 +1547,7 @@
1512
1547
  letter-spacing: inherit;
1513
1548
  text-decoration: none;
1514
1549
  opacity: 0.88;
1515
- transition: opacity 0.15s ease;
1550
+ transition: opacity ${ee}ms ${L};
1516
1551
  flex-shrink: 0;
1517
1552
  }
1518
1553
  .mushi-banner-link:hover { opacity: 1; }
@@ -1540,7 +1575,7 @@
1540
1575
  cursor: pointer;
1541
1576
  font: inherit;
1542
1577
  letter-spacing: inherit;
1543
- transition: background 0.15s ease, opacity 0.15s ease;
1578
+ transition: opacity ${ee}ms ${L};
1544
1579
  flex-shrink: 0;
1545
1580
  height: 24px;
1546
1581
  line-height: 1;
@@ -1562,7 +1597,7 @@
1562
1597
  flex-shrink: 0;
1563
1598
  color: inherit;
1564
1599
  border-radius: 3px;
1565
- transition: opacity 0.15s, background 0.15s;
1600
+ transition: opacity ${ee}ms ${L};
1566
1601
  }
1567
1602
  .mushi-banner-dismiss:hover {
1568
1603
  opacity: 1;
@@ -1576,14 +1611,14 @@
1576
1611
  border: none;
1577
1612
  cursor: pointer;
1578
1613
  font-size: 11px;
1579
- font-family: ${P};
1614
+ font-family: ${M};
1580
1615
  opacity: 0.75;
1581
1616
  color: inherit;
1582
1617
  padding: 2px 6px;
1583
1618
  border-radius: 3px;
1584
1619
  white-space: nowrap;
1585
1620
  flex-shrink: 0;
1586
- transition: opacity 0.15s, background 0.15s;
1621
+ transition: opacity ${ee}ms ${L};
1587
1622
  margin-left: 4px;
1588
1623
  }
1589
1624
  .mushi-banner-my-reports:hover {
@@ -1621,7 +1656,7 @@
1621
1656
  .mushi-community-btn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1622
1657
  .mushi-section-label{
1623
1658
  margin:0 0 6px;
1624
- font-family:${P};
1659
+ font-family:${M};
1625
1660
  font-size:11px;
1626
1661
  letter-spacing:0.06em;
1627
1662
  text-transform:uppercase;
@@ -1642,16 +1677,16 @@
1642
1677
  background: transparent;
1643
1678
  cursor: pointer;
1644
1679
  color: ${l};
1645
- font-family: ${B};
1680
+ font-family: ${F};
1646
1681
  font-size: 13px;
1647
1682
  text-align: left;
1648
- transition: color 180ms ${$};
1683
+ transition: opacity ${ne}ms ${L};
1649
1684
  }
1650
1685
  .mushi-more-toggle:hover { color: ${d}; }
1651
1686
  .mushi-more-toggle:hover .mushi-more-toggle-arrow { transform: translateX(3px); }
1652
1687
  .mushi-more-toggle-text { flex: 1; }
1653
1688
  .mushi-more-toggle-count {
1654
- font-family: ${P};
1689
+ font-family: ${M};
1655
1690
  font-size: 10px;
1656
1691
  letter-spacing: 0.08em;
1657
1692
  text-transform: uppercase;
@@ -1663,7 +1698,7 @@
1663
1698
  .mushi-more-toggle-arrow {
1664
1699
  font-size: 14px;
1665
1700
  opacity: 0.5;
1666
- transition: transform 180ms ${$};
1701
+ transition: transform ${ne}ms ${L};
1667
1702
  }
1668
1703
  /* \u2500\u2500 Step slide-in \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1669
1704
  @keyframes mushi-step-in {
@@ -1678,18 +1713,18 @@
1678
1713
  }
1679
1714
  /* Expanded secondary categories animate in */
1680
1715
  .mushi-categories-expanded {
1681
- animation: mushi-step-in 180ms ease both;
1716
+ animation: mushi-step-in ${ne}ms ${L} both;
1682
1717
  }
1683
- .mushi-link-btn{background:none;border:none;padding:4px 2px;cursor:pointer;color:${d};font-size:12px;font-family:${P};text-decoration:underline;text-underline-offset:2px}
1718
+ .mushi-link-btn{background:none;border:none;padding:4px 2px;cursor:pointer;color:${d};font-size:12px;font-family:${M};text-decoration:underline;text-underline-offset:2px}
1684
1719
  .mushi-link-btn:hover{opacity:0.8}
1685
1720
  .mushi-link-btn:focus-visible,.mushi-nav-item:focus-visible{outline:2px solid ${d};outline-offset:2px;border-radius:2px}
1686
- .mushi-nav-item{display:block;width:100%;text-align:left;background:${s?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"};border:1px solid ${s?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"};border-radius:8px;padding:10px 14px;margin-bottom:8px;cursor:pointer;font-size:13px;color:${i};transition:background .15s,border-color .15s}
1721
+ .mushi-nav-item{display:block;width:100%;text-align:left;background:${s?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"};border:1px solid ${s?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"};border-radius:8px;padding:10px 14px;margin-bottom:8px;cursor:pointer;font-size:13px;color:${i};transition:opacity ${ee}ms ${L}}
1687
1722
  .mushi-nav-item:hover{background:${s?"rgba(255,255,255,0.09)":"rgba(0,0,0,0.07)"}}
1688
1723
  .mushi-account-card{display:flex;align-items:center;gap:12px;background:${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"};border-radius:10px;padding:12px 14px;margin-bottom:14px}
1689
- .mushi-account-avatar{width:40px;height:40px;border-radius:50%;background:${v};color:${x};display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex-shrink:0}
1724
+ .mushi-account-avatar{width:40px;height:40px;border-radius:50%;background:${x};color:${v};display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex-shrink:0}
1690
1725
  .mushi-account-info{display:flex;flex-direction:column;gap:2px;min-width:0}
1691
1726
  .mushi-account-info strong{font:700 14px/1.3 inherit;color:${i}}
1692
- .mushi-account-rank,.mushi-xapp-app-name,.mushi-label{font-size:12px;color:${h};font-family:${P}}
1727
+ .mushi-account-rank,.mushi-xapp-app-name,.mushi-label{font-size:12px;color:${h};font-family:${M}}
1693
1728
  .mushi-account-rank{display:block}
1694
1729
  .mushi-xapp-app-head{display:flex;align-items:center;gap:8px;margin:0 0 6px}
1695
1730
  .mushi-xapp-app-name{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin:0}
@@ -1704,34 +1739,49 @@
1704
1739
  /* \u2500\u2500 Assistant tab (P5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1705
1740
  .mushi-assistant{display:flex;flex-direction:column;height:100%;min-height:0;max-height:60vh}
1706
1741
  .mushi-assistant-log{flex:1;min-height:120px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:4px 2px 8px}
1707
- .mushi-assistant-greeting{font:400 14px/1.5 ${B};color:${l};padding:6px 2px}
1742
+ .mushi-assistant-greeting{font:400 14px/1.5 ${F};color:${l};padding:6px 2px}
1708
1743
  .mushi-assistant-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
1709
- .mushi-assistant-chip{background:${v};color:${x};border:1px solid ${b};border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer;font-family:${B};transition:background .15s}
1710
- .mushi-assistant-chip:hover{background:${s?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.14)"}}
1744
+ .mushi-assistant-chip{background:${x};color:${v};border:1px solid ${b};border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer;font-family:${F};transition:opacity ${ee}ms ${L},transform ${ee}ms ${L}}
1745
+ .mushi-assistant-chip:hover{background:rgba(${$},${s?"0.22":"0.14"})}
1711
1746
  .mushi-assistant-chip:focus-visible{outline:2px solid ${d};outline-offset:2px}
1712
- .mushi-assistant-msg{max-width:85%;padding:8px 12px;border-radius:12px;font:400 14px/1.45 ${B};white-space:pre-wrap;word-break:break-word}
1713
- .mushi-assistant-msg-user{align-self:flex-end;background:${d};color:${w};border-bottom-right-radius:4px}
1747
+ .mushi-assistant-msg{max-width:85%;padding:8px 12px;border-radius:12px;font:400 14px/1.45 ${F};white-space:pre-wrap;word-break:break-word}
1748
+ .mushi-assistant-msg-user{align-self:flex-end;background:${d};color:${S};border-bottom-right-radius:4px}
1714
1749
  .mushi-assistant-msg-bot{align-self:flex-start;background:${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${i};border-bottom-left-radius:4px}
1715
1750
  .mushi-assistant-thinking{opacity:0.6;font-size:18px;letter-spacing:2px}
1716
- .mushi-assistant-error{align-self:flex-start;color:${T};font-size:12px;padding:4px 2px}
1751
+ .mushi-assistant-error{align-self:flex-start;color:${w};font-size:12px;padding:4px 2px;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
1752
+ .mushi-assistant-recovery{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
1753
+ .mushi-assistant-recovery-footer{margin-top:4px;padding-top:4px}
1754
+ .mushi-assistant-report-cta{background:${d};color:${S};border:none;border-radius:999px;padding:6px 14px;font-size:12px;cursor:pointer;font-family:${F};font-weight:600}
1755
+ .mushi-assistant-report-cta:hover{opacity:0.92}
1756
+ .mushi-assistant-report-cta:focus-visible{outline:2px solid ${d};outline-offset:2px}
1757
+ .mushi-assistant-report-link{background:transparent;color:${v};border:none;padding:0;font-size:12px;cursor:pointer;font-family:${F};text-decoration:underline;text-underline-offset:2px}
1758
+ .mushi-assistant-report-link:hover{opacity:0.85}
1759
+ .mushi-assistant-report-link:focus-visible{outline:2px solid ${d};outline-offset:2px}
1717
1760
  .mushi-assistant-form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid ${m};padding-top:8px}
1718
- .mushi-assistant-input{flex:1;resize:none;max-height:120px;border:1px solid ${b};border-radius:10px;padding:8px 12px;font:400 14px/1.4 ${B};background:${o};color:${i}}
1761
+ .mushi-assistant-input{flex:1;resize:none;max-height:120px;border:1px solid ${b};border-radius:10px;padding:8px 12px;font:400 14px/1.4 ${F};background:${o};color:${i}}
1719
1762
  .mushi-assistant-input:focus-visible{outline:2px solid ${d};outline-offset:1px}
1720
- .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${d};color:${w};font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
1763
+ .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${d};color:${S};font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
1721
1764
  .mushi-assistant-submit:hover{transform:translateY(-1px)}
1722
1765
  .mushi-assistant-submit:disabled{opacity:0.5;cursor:default;transform:none}
1723
1766
  .mushi-assistant-submit:focus-visible{outline:2px solid ${d};outline-offset:2px}
1724
- `}var He="@mushi-mushi/web",pe="1.25.0";var Qt={bug:"\u26A0\uFE0F",slow:"\u{1F40C}",visual:"\u{1F3A8}",confusing:"\u{1F615}",other:"\u{1F4DD}"},Fr="Feature request";function Ur(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Sent";case "classified":case "triaged":case "grouped":case "dispatched":return "Review";case "fixing":return "Fixing";case "fixed":case "resolved":case "completed":return "Fixed";case "dismissed":return "Closed";default:return t.replace(/_/g," ").slice(0,12)}}function Js(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Submitted";case "classified":case "triaged":case "grouped":case "dispatched":return "In review";case "fixing":return "Fix in progress";case "fixed":case "resolved":case "completed":return "Fixed \u2014 confirm?";case "verified":return "Verified";case "reopened":return "Reopened";case "dismissed":return "Closed";default:return t.replace(/_/g," ")}}function er(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "sent";case "classified":case "triaged":case "grouped":case "dispatched":return "review";case "fixing":return "fixing";case "fixed":case "resolved":case "completed":return "fixed";case "verified":return "fixed";case "reopened":return "fixing";case "dismissed":return "closed";default:return "unknown"}}function tr(t){let e=Date.parse(t);if(Number.isNaN(e))return "";let r=Date.now()-e;if(r<0)return "just now";let n=Math.floor(r/1e3);if(n<60)return "just now";let s=Math.floor(n/60);if(s<60)return `${s}m ago`;let o=Math.floor(s/60);if(o<24)return `${o}h ago`;let a=Math.floor(o/24);if(a<7)return `${a}d ago`;let i=Math.floor(a/7);return i<5?`${i}w ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function qr(t){return t<10?`0${t}`:String(t)}var jr=3,rr={category:1,intent:2,details:3};function Zs(t){return (t.metaKey||t.ctrlKey)&&t.key==="Enter"}function g(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Qs(t){let e=t.appDomain??Fs({project_slug:t.appSlug??""}),r=g(qs(t.appName)),n=Ns({project_slug:t.appSlug??"",sdk_origin:t.appDomain?`https://${t.appDomain}`:null});return n.length?`<span class="mushi-app-icon" data-mushi-favicon data-candidates="${g(JSON.stringify(n))}" data-initials="${r}" aria-hidden="true" title="${g(e??t.appName)}">
1767
+ `}var Ue="@mushi-mushi/web",fe="1.27.0";var mr="mushi-assistant-session-v1";function uo(){try{if(typeof sessionStorage>"u")return null;let t=sessionStorage.getItem(mr);if(!t)return null;let e=JSON.parse(t);if(!e||typeof e!="object")return null;let r=e,n=Array.isArray(r.turns)?r.turns:null;if(!n)return null;let s=[];for(let a of n){if(!a||typeof a!="object")continue;let i=a;if(i.role!=="user"&&i.role!=="assistant"||typeof i.text!="string")continue;let l={role:i.role,text:i.text};if(Array.isArray(i.options)){let f=i.options.filter(h=>typeof h=="string");f.length&&(l.options=f);}i.offerReport===!0&&(l.offerReport=!0),s.push(l);}let o=typeof r.threadId=="string"&&r.threadId.length>0?r.threadId:null;return {turns:s,threadId:o}}catch{return null}}function po(t){try{if(typeof sessionStorage>"u")return;if(!t.turns.length&&!t.threadId){sessionStorage.removeItem(mr);return}sessionStorage.setItem(mr,JSON.stringify(t));}catch{}}function ho(){try{if(typeof sessionStorage>"u")return;sessionStorage.removeItem(mr);}catch{}}var fr={bug:"\u26A0\uFE0F",slow:"\u{1F40C}",visual:"\u{1F3A8}",confusing:"\u{1F615}",other:"\u{1F4DD}"},rn="Feature request";function nn(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Sent";case "classified":case "triaged":case "grouped":case "dispatched":return "Review";case "fixing":return "Fixing";case "fixed":case "resolved":case "completed":return "Fixed";case "dismissed":return "Closed";default:return t.replace(/_/g," ").slice(0,12)}}function mo(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Submitted";case "classified":case "triaged":case "grouped":case "dispatched":return "In review";case "fixing":return "Fix in progress";case "fixed":case "resolved":case "completed":return "Fixed \u2014 confirm?";case "verified":return "Verified";case "reopened":return "Reopened";case "dismissed":return "Closed";default:return t.replace(/_/g," ")}}function gr(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "sent";case "classified":case "triaged":case "grouped":case "dispatched":return "review";case "fixing":return "fixing";case "fixed":case "resolved":case "completed":return "fixed";case "verified":return "fixed";case "reopened":return "fixing";case "dismissed":return "closed";default:return "unknown"}}function br(t){let e=Date.parse(t);if(Number.isNaN(e))return "";let r=Date.now()-e;if(r<0)return "just now";let n=Math.floor(r/1e3);if(n<60)return "just now";let s=Math.floor(n/60);if(s<60)return `${s}m ago`;let o=Math.floor(s/60);if(o<24)return `${o}h ago`;let a=Math.floor(o/24);if(a<7)return `${a}d ago`;let i=Math.floor(a/7);return i<5?`${i}w ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function sn(t){return t<10?`0${t}`:String(t)}var on=3,yr={category:1,intent:2,details:3};function fo(t){return (t.metaKey||t.ctrlKey)&&t.key==="Enter"}function g(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function go(t){let e=t.appDomain??Zs({project_slug:t.appSlug??""}),r=g(to(t.appName)),n=Qs({project_slug:t.appSlug??"",sdk_origin:t.appDomain?`https://${t.appDomain}`:null});return n.length?`<span class="mushi-app-icon" data-mushi-favicon data-candidates="${g(JSON.stringify(n))}" data-initials="${r}" aria-hidden="true" title="${g(e??t.appName)}">
1725
1768
  <img class="mushi-app-icon-img" src="${g(n[0])}" alt="" referrerpolicy="no-referrer" width="16" height="16" />
1726
1769
  <span class="mushi-app-icon-initials" hidden>${r}</span>
1727
- </span>`:`<span class="mushi-app-icon mushi-app-icon-initials-only" aria-hidden="true">${r}</span>`}function eo(t){t.querySelectorAll("[data-mushi-favicon]").forEach(e=>{let r=e.querySelector(".mushi-app-icon-img"),n=e.querySelector(".mushi-app-icon-initials");if(!r||!n)return;let s=[];try{s=JSON.parse(e.dataset.candidates??"[]");}catch{s=[];}let o=0,a=()=>{o+=1,o<s.length?r.src=s[o]:(r.remove(),n.hidden=false,e.classList.add("mushi-app-icon-initials-only"));};r.onerror=a,r.onload=()=>{Us(r)&&a();};});}function ro(t){switch(t.step){case "category":return Da(t);case "intent":return za(t);case "details":return Va(t);case "success":return Ka(t);case "reports":return Na(t);case "report-detail":return Wa(t);case "leaderboard":return Ua(t);case "roadmap":return Fa(t);case "account":return qa(t);case "cross-app-reports":return ja(t);case "assistant":return Aa(t)}}function Aa(t){let e=t.locale,r=t.callbacks.assistantLabel||e.assistant.defaultLabel,n=t.callbacks.assistantGreeting||e.assistant.defaultGreeting,s=t.callbacks.assistantSuggestions??[],a=t.assistantTurns.length===0?`<div class="mushi-assistant-greeting">${g(n)}</div>
1728
- ${s.length?`<div class="mushi-assistant-suggestions">${s.map(f=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${g(f)}">${g(f)}</button>`).join("")}</div>`:""}`:t.assistantTurns.map(f=>{let h=f.role==="user"?"mushi-assistant-msg-user":"mushi-assistant-msg-bot",m=f.options&&f.options.length?`<div class="mushi-assistant-suggestions">${f.options.map(b=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${g(b)}">${g(b)}</button>`).join("")}</div>`:"";return `<div class="mushi-assistant-msg ${h}">${g(f.text)}</div>${m}`}).join(""),i=t.assistantSending?`<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking" role="status" aria-live="polite">${g(e.assistant.thinking)}</div>`:"",l=t.assistantError?`<div class="mushi-assistant-error" role="alert">${g(t.assistantError)}</div>`:"";return `
1729
- ${ge(t,{title:r,showBack:true})}
1770
+ </span>`:`<span class="mushi-app-icon mushi-app-icon-initials-only" aria-hidden="true">${r}</span>`}function bo(t){t.querySelectorAll("[data-mushi-favicon]").forEach(e=>{let r=e.querySelector(".mushi-app-icon-img"),n=e.querySelector(".mushi-app-icon-initials");if(!r||!n)return;let s=[];try{s=JSON.parse(e.dataset.candidates??"[]");}catch{s=[];}let o=0,a=()=>{o+=1,o<s.length?r.src=s[o]:(r.remove(),n.hidden=false,e.classList.add("mushi-app-icon-initials-only"));};r.onerror=a,r.onload=()=>{eo(r)&&a();};});}function vo(t){switch(t.step){case "category":return rl(t);case "intent":return pl(t);case "details":return hl(t);case "success":return ml(t);case "reports":return il(t);case "report-detail":return dl(t);case "leaderboard":return ll(t);case "roadmap":return al(t);case "account":return cl(t);case "cross-app-reports":return ul(t);case "assistant":return Za(t)}}function Za(t){let e=t.locale,r=t.callbacks.assistantLabel||e.assistant.defaultLabel,n=t.callbacks.assistantGreeting||e.assistant.defaultGreeting,s=t.callbacks.assistantSuggestions??[],o=t.assistantTurns.length===0,a=o?`<div class="mushi-assistant-greeting">${g(n)}</div>
1771
+ ${s.length?`<div class="mushi-assistant-suggestions">${s.map(h=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${g(h)}">${g(h)}</button>`).join("")}</div>`:""}`:t.assistantTurns.map(h=>{let m=h.role==="user"?"mushi-assistant-msg-user":"mushi-assistant-msg-bot",b=h.options&&h.options.length?`<div class="mushi-assistant-suggestions">${h.options.map(x=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${g(x)}">${g(x)}</button>`).join("")}</div>`:"",d=h.offerReport?`<div class="mushi-assistant-recovery">
1772
+ <button type="button" class="mushi-assistant-report-cta" data-action="assistant-report">${g(e.assistant.fileReportCta)}</button>
1773
+ </div>`:"";return `<div class="mushi-assistant-msg ${m}">${g(h.text)}</div>${b}${d}`}).join(""),i=t.assistantSending?`<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking" role="status" aria-live="polite">${g(e.assistant.thinking)}</div>`:"",l=t.assistantError?`<div class="mushi-assistant-error" role="alert">${g(t.assistantError)}
1774
+ <button type="button" class="mushi-assistant-report-cta" data-action="assistant-report">${g(e.assistant.fileReportCta)}</button>
1775
+ </div>`:"",f=!o&&!t.assistantSending&&!t.assistantError?`<div class="mushi-assistant-recovery mushi-assistant-recovery-footer">
1776
+ <button type="button" class="mushi-assistant-report-link" data-action="assistant-report">${g(e.assistant.stillStuckCta)}</button>
1777
+ </div>`:"";return `
1778
+ ${xe(t,{title:r,showBack:true})}
1730
1779
  <div class="mushi-assistant">
1731
1780
  <div class="mushi-assistant-log">
1732
1781
  ${a}
1733
1782
  ${i}
1734
1783
  ${l}
1784
+ ${f}
1735
1785
  </div>
1736
1786
  <form class="mushi-assistant-form" data-action="assistant-send">
1737
1787
  <textarea
@@ -1743,13 +1793,13 @@
1743
1793
  <button type="submit" class="mushi-assistant-submit" ${t.assistantSending?"disabled":""} aria-label="${g(e.assistant.sendAriaLabel)}">\u2191</button>
1744
1794
  </form>
1745
1795
  </div>
1746
- `}function no(t){if(!t.sdkFreshness||t.config.outdatedBanner==="off"||t.config.outdatedBanner==="console-only")return "";let{latest:e,current:r,deprecated:n,message:s}=t.sdkFreshness;return !e&&!n?"":`
1796
+ `}function xo(t){if(!t.sdkFreshness||t.config.outdatedBanner==="off"||t.config.outdatedBanner==="console-only")return "";let{latest:e,current:r,deprecated:n,message:s}=t.sdkFreshness;return !e&&!n?"":`
1747
1797
  <div class="mushi-outdated" role="status">
1748
1798
  <strong>Mushi SDK ${g(r)}</strong>
1749
1799
  ${e?`latest is ${g(e)}.`:"needs attention."}
1750
1800
  ${s?`<span>${g(s)}</span>`:""}
1751
1801
  </div>
1752
- `}function so(t){return t.config.brandFooter===false?"":`<div class="mushi-brand-footer">${g(t.locale.flows.poweredBy.replace("{version}",t.sdkVersion))}</div>`}function ge(t,e){let r=t.locale,{title:n,showBack:s=false,step:o,eyebrow:a}=e,i=s?`<button type="button" class="mushi-back" data-action="back" aria-label="${g(r.widget.back)}">\u2190 ${g(r.widget.back)}</button>`:`<span class="mushi-header-eyebrow">${g(a??"Mushi \xB7 Report")}</span>`,l=o?`<span class="mushi-step-counter" aria-label="Step ${o} of ${jr}"><b>${qr(o)}</b> / ${qr(jr)}</span>`:"";return `
1802
+ `}function wo(t){return t.config.brandFooter===false?"":`<div class="mushi-brand-footer">${g(t.locale.flows.poweredBy.replace("{version}",t.sdkVersion))}</div>`}function xe(t,e){let r=t.locale,{title:n,showBack:s=false,step:o,eyebrow:a}=e,i=s?`<button type="button" class="mushi-back" data-action="back" aria-label="${g(r.widget.back)}">\u2190 ${g(r.widget.back)}</button>`:`<span class="mushi-header-eyebrow">${g(a??"Mushi \xB7 Report")}</span>`,l=o?`<span class="mushi-step-counter" aria-label="Step ${o} of ${on}"><b>${sn(o)}</b> / ${sn(on)}</span>`:"";return `
1753
1803
  <div class="mushi-header">
1754
1804
  <div class="mushi-header-mark" aria-hidden="true">${t.pageFaviconHref?`<img class="mushi-header-host-icon" src="${g(t.pageFaviconHref)}" alt="" referrerpolicy="no-referrer" width="20" height="20" />`:"\u866B"}</div>
1755
1805
  <div class="mushi-header-titles">
@@ -1761,7 +1811,7 @@
1761
1811
  <button type="button" class="mushi-close" data-action="close" aria-label="${g(r.widget.close)}">\u2715</button>
1762
1812
  </div>
1763
1813
  </div>
1764
- `}function _a(t){let e=1;return t.callbacks.onFeatureBoardRequest&&(e+=1),t.callbacks.assistantEnabled&&(e+=1),t.rewardsState&&(e+=1),e+=1,e}function Pa(t){let e=t.locale,r=e.step1.moreNav,n=_a(t),s=`${e.step1.moreNavLabel} (${n})`,o=t.unreadCount(),a=o?`${r.yourReports} (${o} ${r.unreadNew})`:r.yourReports,i=[`<button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
1814
+ `}function el(t){let e=1;return t.callbacks.onFeatureBoardRequest&&(e+=1),t.callbacks.assistantEnabled&&(e+=1),t.rewardsState&&(e+=1),e+=1,e}function tl(t){let e=t.locale,r=e.step1.moreNav,n=el(t),s=`${e.step1.moreNavLabel} (${n})`,o=t.unreadCount(),a=o?`${r.yourReports} (${o} ${r.unreadNew})`:r.yourReports,i=[`<button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
1765
1815
  <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
1766
1816
  <div class="mushi-option-text">
1767
1817
  <span class="mushi-option-label">${g(a)}</span>
@@ -1801,12 +1851,12 @@
1801
1851
  </button>
1802
1852
  ${l}
1803
1853
  </div>
1804
- `}function Da(t){let e=t.locale,r=t.config.categories&&t.config.categories.length>0?t.config.categories.map(b=>({id:b.id,icon:b.icon??"\u{1F4AC}",label:b.label,desc:b.description??""})):["bug","slow","visual","confusing","other"].map(b=>({id:b,icon:Qt[b],label:e.step1.categories[b],desc:e.step1.categoryDescriptions[b]})),n=({id:b,icon:d,label:v,desc:x})=>`
1854
+ `}function rl(t){let e=t.locale,r=t.config.categories&&t.config.categories.length>0?t.config.categories.map(b=>({id:b.id,icon:b.icon??"\u{1F4AC}",label:b.label,desc:b.description??""})):["bug","slow","visual","confusing","other"].map(b=>({id:b,icon:fr[b],label:e.step1.categories[b],desc:e.step1.categoryDescriptions[b]})),n=({id:b,icon:d,label:x,desc:v})=>`
1805
1855
  <button type="button" class="mushi-option-btn" data-category="${g(b)}" role="radio" aria-checked="false">
1806
1856
  <span class="mushi-option-icon" aria-hidden="true">${g(d)}</span>
1807
1857
  <div class="mushi-option-text">
1808
- <span class="mushi-option-label">${g(v)}</span>
1809
- ${x?`<span class="mushi-option-desc">${g(x)}</span>`:""}
1858
+ <span class="mushi-option-label">${g(x)}</span>
1859
+ ${v?`<span class="mushi-option-desc">${g(v)}</span>`:""}
1810
1860
  </div>
1811
1861
  <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1812
1862
  </button>
@@ -1815,17 +1865,17 @@
1815
1865
  <span class="mushi-more-toggle-count">${i.length} more</span>
1816
1866
  <span class="mushi-more-toggle-arrow" aria-hidden="true">\u2192</span>
1817
1867
  </button>`:"";return `
1818
- ${ge(t,{title:e.step1.heading,step:rr.category})}
1819
- ${t.config.betaMode?.enabled?Ba(t):""}
1868
+ ${xe(t,{title:e.step1.heading,step:yr.category})}
1869
+ ${t.config.betaMode?.enabled?ol(t):""}
1820
1870
  <div class="mushi-body" role="radiogroup" aria-label="${g(e.step1.heading)}">
1821
1871
  <p class="mushi-section-label">${g(e.step1.reportSectionLabel)}</p>
1822
- ${Ha(t)}
1872
+ ${nl(t)}
1823
1873
  ${f}
1824
1874
  ${m}
1825
- ${t.rewardsState?Xa(t):""}
1826
- ${Pa(t)}
1875
+ ${t.rewardsState?bl(t):""}
1876
+ ${tl(t)}
1827
1877
  </div>
1828
- `}function Ha(t){if(!(t.config.featureRequestCard!==false))return "";let r=t.locale.flows.featureRequest,n=t.config.featureRequestLabel||r.label,s=t.config.featureRequestDescription||r.description;return `
1878
+ `}function nl(t){if(!(t.config.featureRequestCard!==false))return "";let r=t.locale.flows.featureRequest,n=t.config.featureRequestLabel||r.label,s=t.config.featureRequestDescription||r.description;return `
1829
1879
  <button
1830
1880
  type="button"
1831
1881
  class="mushi-option-btn mushi-feature-entry"
@@ -1839,12 +1889,12 @@
1839
1889
  </div>
1840
1890
  <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1841
1891
  </button>
1842
- `}function Oa(t){let e=t.config.betaMode?.changelogItems;if(!e?.length)return "";let r=e[0],n=r.items.map(o=>`<li>\u2022 ${g(o)}</li>`).join("");return `
1892
+ `}function sl(t){let e=t.config.betaMode?.changelogItems;if(!e?.length)return "";let r=e[0],n=r.items.map(o=>`<li>\u2022 ${g(o)}</li>`).join("");return `
1843
1893
  <details class="mushi-changelog">
1844
1894
  <summary class="mushi-changelog-summary">${r.date?`What\u2019s new in ${g(r.version)} \xB7 ${g(r.date)}`:`What\u2019s new in ${g(r.version)}`}</summary>
1845
1895
  <ul class="mushi-changelog-list">${n}</ul>
1846
1896
  </details>
1847
- `}function Ba(t){let e=t.config.betaMode,r=g(e.appName??"This app"),n=e.message?g(e.message):`${r} is in early development`,s=e.contactEmail?g(e.contactEmail):null,o=e.perks??[];return `
1897
+ `}function ol(t){let e=t.config.betaMode,r=g(e.appName??"This app"),n=e.message?g(e.message):`${r} is in early development`,s=e.contactEmail?g(e.contactEmail):null,o=e.perks??[];return `
1848
1898
  <div class="mushi-beta-strip" role="note" aria-label="Beta status">
1849
1899
  <div class="mushi-beta-strip-row">
1850
1900
  <span class="mushi-beta-tag" aria-hidden="true">BETA</span>
@@ -1856,28 +1906,28 @@
1856
1906
  ${o.map(a=>`<li>\u2713 ${g(a)}</li>`).join("")}
1857
1907
  </ul>
1858
1908
  `:""}
1859
- ${Oa(t)}
1909
+ ${sl(t)}
1860
1910
  </div>
1861
- `}function Na(t){let e=t.locale.flows,r=t.reporterReports.map(s=>{let o=s.summary??s.description??`Report ${s.id.slice(0,8)}`,a=er(s.status),i=tr(s.created_at),l=s.unread_count&&s.unread_count>0?`<span class="mushi-unread-badge" aria-label="${s.unread_count} unread">${s.unread_count}</span>`:"";return `
1911
+ `}function il(t){let e=t.locale.flows,r=t.reporterReports.map(s=>{let o=s.summary??s.description??`Report ${s.id.slice(0,8)}`,a=gr(s.status),i=br(s.created_at),l=s.unread_count&&s.unread_count>0?`<span class="mushi-unread-badge" aria-label="${s.unread_count} unread">${s.unread_count}</span>`:"";return `
1862
1912
  <button type="button" class="mushi-report-row" data-report-id="${g(s.id)}" aria-label="View report: ${g(o)}">
1863
1913
  <div class="mushi-report-main">
1864
1914
  <span class="mushi-report-title">${g(o)}</span>
1865
1915
  <span class="mushi-report-meta">
1866
- <span class="mushi-report-status mushi-status-${a}">${g(Ur(s.status))}</span>
1916
+ <span class="mushi-report-status mushi-status-${a}">${g(nn(s.status))}</span>
1867
1917
  ${i?`<span class="mushi-report-when">${g(i)}</span>`:""}
1868
1918
  ${l}
1869
1919
  </span>
1870
1920
  </div>
1871
1921
  <span class="mushi-report-chevron" aria-hidden="true">\u203A</span>
1872
1922
  </button>`}).join(""),n=t.rewardsState?`<button type="button" class="mushi-leaderboard-link" data-action="open-leaderboard">\u{1F3C6} ${g(e.reports.leaderboardLink)}</button>`:"";return `
1873
- ${ge(t,{title:e.reports.title,showBack:true,eyebrow:e.eyebrows.inbox})}
1923
+ ${xe(t,{title:e.reports.title,showBack:true,eyebrow:e.eyebrows.inbox})}
1874
1924
  <div class="mushi-body">
1875
1925
  ${t.reporterLoading?`<p class="mushi-muted">${g(e.reports.loading)}</p>`:""}
1876
1926
  ${t.reporterError?`<p class="mushi-error-inline">${g(t.reporterError)}</p>`:""}
1877
1927
  ${r||(t.reporterLoading?"":`<p class="mushi-muted">${g(e.reports.empty)}</p>`)}
1878
1928
  ${n}
1879
1929
  </div>
1880
- `}function Fa(t){let e=t.locale.flows,r=t.featureBoard.map(n=>{let s=String(n.id??""),o=g(String(n.subject??e.roadmap.untitled)),a=Number(n.vote_count??0),i=!!n.shipped_at,l=!!n.my_vote,f=i?e.roadmap.shipped:String(n.status_label??n.status??"open"),h=e.roadmap.voteCount.replace("{n}",String(a));return `
1930
+ `}function al(t){let e=t.locale.flows,r=t.featureBoard.map(n=>{let s=String(n.id??""),o=g(String(n.subject??e.roadmap.untitled)),a=Number(n.vote_count??0),i=!!n.shipped_at,l=!!n.my_vote,f=i?e.roadmap.shipped:String(n.status_label??n.status??"open"),h=e.roadmap.voteCount.replace("{n}",String(a));return `
1881
1931
  <div class="mushi-report-row mushi-roadmap-row">
1882
1932
  <div class="mushi-report-main">
1883
1933
  <span class="mushi-report-title">${o}</span>
@@ -1891,20 +1941,20 @@
1891
1941
  ${l?g(e.roadmap.voted):g(e.roadmap.vote)}
1892
1942
  </button>`:""}
1893
1943
  </div>`}).join("");return `
1894
- ${ge(t,{title:e.roadmap.title,showBack:true,eyebrow:e.eyebrows.roadmap})}
1944
+ ${xe(t,{title:e.roadmap.title,showBack:true,eyebrow:e.eyebrows.roadmap})}
1895
1945
  <div class="mushi-body">
1896
1946
  ${t.reporterLoading?`<p class="mushi-muted">${g(e.roadmap.loading)}</p>`:""}
1897
1947
  ${t.reporterError?`<p class="mushi-error-inline">${g(t.reporterError)}</p>`:""}
1898
1948
  ${r||(t.reporterLoading?"":`<p class="mushi-muted">${g(e.roadmap.empty)}</p>`)}
1899
1949
  </div>
1900
- `}function Ua(t){let e=t.locale.flows,r=t.globalLeaderboard!==null||t.globalLeaderboardLoading,n=r?t.globalLeaderboard??[]:(t.leaderboardEntries??[]).map(l=>({tester_id:"",public_handle:null,display_name:l.display_name,rank:0,points_30d:l.points_30d,total_points:l.total_points})),s=r?t.globalLeaderboardLoading:t.leaderboardLoading,o=t.testerReputation?.rank??null,a=n.map((l,f)=>{let h=l.rank||f+1,m=t.testerReputation&&l.tester_id===t.testerReputation.tester_id;return `
1950
+ `}function ll(t){let e=t.locale.flows,r=t.globalLeaderboard!==null||t.globalLeaderboardLoading,n=r?t.globalLeaderboard??[]:(t.leaderboardEntries??[]).map(l=>({tester_id:"",public_handle:null,display_name:l.display_name,rank:0,points_30d:l.points_30d,total_points:l.total_points})),s=r?t.globalLeaderboardLoading:t.leaderboardLoading,o=t.testerReputation?.rank??null,a=n.map((l,f)=>{let h=l.rank||f+1,m=t.testerReputation&&l.tester_id===t.testerReputation.tester_id;return `
1901
1951
  <div class="mushi-lb-row ${h===1?"mushi-lb-top":""}${m?" mushi-lb-me":""}">
1902
1952
  <span class="mushi-lb-rank">#${h}</span>
1903
1953
  <span class="mushi-lb-name">${g(l.public_handle??l.display_name??e.leaderboard.anon)}</span>
1904
1954
  <span class="mushi-lb-pts">${(l.points_30d??l.total_points).toLocaleString()} pts</span>
1905
1955
  </div>
1906
1956
  `}).join(""),i=o?`<div class="mushi-lb-myrank">${g(e.leaderboard.myRank.replace("{rank}",String(o)))}</div>`:t.testerJwt?"":`<button type="button" class="mushi-link-btn" data-action="open-account">${g(e.leaderboard.signInPrompt)}</button>`;return `
1907
- ${ge(t,{title:e.leaderboard.title,showBack:true,eyebrow:e.eyebrows.community})}
1957
+ ${xe(t,{title:e.leaderboard.title,showBack:true,eyebrow:e.eyebrows.community})}
1908
1958
  <div class="mushi-body">
1909
1959
  ${s?`<p class="mushi-muted">${g(e.leaderboard.loading)}</p>`:""}
1910
1960
  ${!s&&!n.length?`<p class="mushi-muted">${g(e.leaderboard.empty)}</p>`:""}
@@ -1912,8 +1962,8 @@
1912
1962
  ${i}
1913
1963
  <p class="mushi-lb-note">${g(e.leaderboard.footer)}</p>
1914
1964
  </div>
1915
- `}function qa(t){let e=t.locale.flows,r=t.testerInfo;if(r){let n=r.public_handle??r.display_name??e.leaderboard.anon,s=t.testerReputation,o=s?e.account.rankSummary.replace("{rank}",String(s.rank??"\u2014")).replace("{points}",(s.points_30d??0).toLocaleString()):"";return `
1916
- ${ge(t,{title:e.account.title,showBack:true,eyebrow:e.eyebrows.identity})}
1965
+ `}function cl(t){let e=t.locale.flows,r=t.testerInfo;if(r){let n=r.public_handle??r.display_name??e.leaderboard.anon,s=t.testerReputation,o=s?e.account.rankSummary.replace("{rank}",String(s.rank??"\u2014")).replace("{points}",(s.points_30d??0).toLocaleString()):"";return `
1966
+ ${xe(t,{title:e.account.title,showBack:true,eyebrow:e.eyebrows.identity})}
1917
1967
  <div class="mushi-body">
1918
1968
  <div class="mushi-account-card">
1919
1969
  <div class="mushi-account-avatar">${g(n.charAt(0).toUpperCase())}</div>
@@ -1931,14 +1981,14 @@
1931
1981
  <button type="button" class="mushi-link-btn" data-action="sign-out-tester">${g(e.account.signOut)}</button>
1932
1982
  </div>
1933
1983
  `}return t.magicLinkSent?`
1934
- ${ge(t,{title:e.account.checkEmailTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1984
+ ${xe(t,{title:e.account.checkEmailTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1935
1985
  <div class="mushi-body">
1936
1986
  <p class="mushi-muted">${g(e.account.magicLinkSent.replace("{email}",t.magicLinkEmail))}</p>
1937
1987
  <button type="button" class="mushi-link-btn" data-action="resend-magic-link">${g(e.account.resendEmail)}</button>
1938
1988
  ${t.magicLinkError?`<p class="mushi-error">${g(t.magicLinkError)}</p>`:""}
1939
1989
  </div>
1940
1990
  `:`
1941
- ${ge(t,{title:e.account.joinTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1991
+ ${xe(t,{title:e.account.joinTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1942
1992
  <div class="mushi-body">
1943
1993
  <p class="mushi-muted">${g(e.account.signInPrompt)}</p>
1944
1994
  <label class="mushi-label" for="mushi-email-input">${g(e.account.emailLabel)}</label>
@@ -1957,38 +2007,38 @@
1957
2007
  <span>${t.magicLinkSending?g(e.account.sending):g(e.account.sendLink)}</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
1958
2008
  </button>
1959
2009
  </div>
1960
- `}function ja(t){let e=t.locale.flows,r=t.crossAppReports??[],n=new Map;for(let o of r){let a=o.project_id??"unknown";n.has(a)||n.set(a,{name:o.app_name??e.crossApp.unknownApp,slug:o.app_slug??null,domain:o.app_domain??null,reports:[]}),n.get(a).reports.push(o);}let s=[...n.entries()].map(([o,a])=>`
2010
+ `}function ul(t){let e=t.locale.flows,r=t.crossAppReports??[],n=new Map;for(let o of r){let a=o.project_id??"unknown";n.has(a)||n.set(a,{name:o.app_name??e.crossApp.unknownApp,slug:o.app_slug??null,domain:o.app_domain??null,reports:[]}),n.get(a).reports.push(o);}let s=[...n.entries()].map(([o,a])=>`
1961
2011
  <div class="mushi-xapp-group">
1962
2012
  <div class="mushi-xapp-app-head">
1963
- ${Qs({appName:a.name,appSlug:a.slug,appDomain:a.domain})}
2013
+ ${go({appName:a.name,appSlug:a.slug,appDomain:a.domain})}
1964
2014
  <h4 class="mushi-xapp-app-name">${g(a.name)}</h4>
1965
2015
  </div>
1966
- ${a.reports.map(l=>{let f=er(l.status);return `
2016
+ ${a.reports.map(l=>{let f=gr(l.status);return `
1967
2017
  <div class="mushi-report-row" data-report-id="${g(l.id)}" tabindex="0" role="button">
1968
- <span class="mushi-report-status mushi-status-${f}">${g(Ur(l.status))}</span>
2018
+ <span class="mushi-report-status mushi-status-${f}">${g(nn(l.status))}</span>
1969
2019
  <span class="mushi-report-title">${g(l.title??l.category)}</span>
1970
- <span class="mushi-report-when">${g(tr(l.created_at))}</span>
2020
+ <span class="mushi-report-when">${g(br(l.created_at))}</span>
1971
2021
  </div>
1972
2022
  `}).join("")}
1973
2023
  </div>
1974
2024
  `).join("");return `
1975
- ${ge(t,{title:e.crossApp.title,showBack:true,eyebrow:e.eyebrows.allApps})}
2025
+ ${xe(t,{title:e.crossApp.title,showBack:true,eyebrow:e.eyebrows.allApps})}
1976
2026
  <div class="mushi-body">
1977
2027
  ${t.crossAppLoading?`<p class="mushi-muted">${g(e.crossApp.loading)}</p>`:""}
1978
2028
  ${!t.crossAppLoading&&!r.length?`<p class="mushi-muted">${g(e.crossApp.empty)}</p>`:""}
1979
2029
  ${s}
1980
2030
  </div>
1981
- `}function Wa(t){let e=t.locale.flows,r=t.reporterReports.find(i=>i.id===t.selectedReportId),n=r?.status??"unknown",s=er(n),o=r?.created_at?tr(r.created_at):"",a=t.reporterComments.map(i=>`
2031
+ `}function dl(t){let e=t.locale.flows,r=t.reporterReports.find(i=>i.id===t.selectedReportId),n=r?.status??"unknown",s=gr(n),o=r?.created_at?br(r.created_at):"",a=t.reporterComments.map(i=>`
1982
2032
  <div class="mushi-thread-comment ${i.author_kind}">
1983
2033
  <strong>${g(i.author_kind==="reporter"?"You":i.author_name??"Developer")}</strong>
1984
2034
  <p>${g(i.body)}</p>
1985
2035
  </div>
1986
2036
  `).join("");return `
1987
- ${ge(t,{title:e.thread.title,showBack:true,eyebrow:e.eyebrows.thread})}
2037
+ ${xe(t,{title:e.thread.title,showBack:true,eyebrow:e.eyebrows.thread})}
1988
2038
  <div class="mushi-body">
1989
2039
  <div class="mushi-thread-summary">
1990
2040
  <div class="mushi-thread-summary-meta">
1991
- <span class="mushi-report-status mushi-status-${s}">${g(Js(n))}</span>
2041
+ <span class="mushi-report-status mushi-status-${s}">${g(mo(n))}</span>
1992
2042
  ${o?`<span class="mushi-report-when">Reported ${g(o)}</span>`:""}
1993
2043
  </div>
1994
2044
  <p>${g(r?.summary??r?.description??"Report details")}</p>
@@ -2007,13 +2057,13 @@
2007
2057
  <span>Reply</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2008
2058
  </button>
2009
2059
  </div>
2010
- `}function za(t){let e=t.locale,r=t.selectedCategory,o=(t.resolveCustomCategory(r)?.intents??(e.step2.intents[r]||[])).map(l=>`
2060
+ `}function pl(t){let e=t.locale,r=t.selectedCategory,o=(t.resolveCustomCategory(r)?.intents??(e.step2.intents[r]||[])).map(l=>`
2011
2061
  <button type="button" class="mushi-option-btn" data-intent="${g(l)}">
2012
2062
  <span class="mushi-option-text"><span class="mushi-option-label">${g(l)}</span></span>
2013
2063
  <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2014
2064
  </button>
2015
2065
  `).join(""),a=t.categoryIcon(r),i=t.categoryLabel(r);return `
2016
- ${ge(t,{title:e.step2.heading,showBack:true,step:rr.intent})}
2066
+ ${xe(t,{title:e.step2.heading,showBack:true,step:yr.intent})}
2017
2067
  <div class="mushi-body">
2018
2068
  <div class="mushi-selected-category">
2019
2069
  <span aria-hidden="true">${g(a)}</span>
@@ -2023,8 +2073,8 @@
2023
2073
  ${o}
2024
2074
  </div>
2025
2075
  </div>
2026
- `}function Va(t){let e=t.locale,r=t.effectiveMinLength(),n=t.screenshotCapturing?e.step3.screenshotCapturing:t.screenshotError?e.step3.screenshotFailed:t.screenshotAttached?e.step3.screenshotAttached:e.step3.screenshotButton,s=["mushi-attach-btn",t.screenshotAttached?"active":"",t.screenshotError?"error":"",t.screenshotCapturing?"loading":""].filter(Boolean).join(" "),o=t.elementCapturing?e.step3.elementCapturing:t.elementError?e.step3.elementFailed:t.elementSelected?e.step3.elementSelected:e.step3.elementButton,a=["mushi-attach-btn",t.elementSelected?"active":"",t.elementError?"error":"",t.elementCapturing?"loading":""].filter(Boolean).join(" "),i=e.step3.examplePrompts.map(l=>`<button type="button" class="mushi-example-chip" data-example="${g(l)}">${g(l)}</button>`).join("");return `
2027
- ${ge(t,{title:e.step3.heading,showBack:true,step:rr.details})}
2076
+ `}function hl(t){let e=t.locale,r=t.effectiveMinLength(),n=t.screenshotCapturing?e.step3.screenshotCapturing:t.screenshotError?e.step3.screenshotFailed:t.screenshotAttached?e.step3.screenshotAttached:e.step3.screenshotButton,s=["mushi-attach-btn",t.screenshotAttached?"active":"",t.screenshotError?"error":"",t.screenshotCapturing?"loading":""].filter(Boolean).join(" "),o=t.elementCapturing?e.step3.elementCapturing:t.elementError?e.step3.elementFailed:t.elementSelected?e.step3.elementSelected:e.step3.elementButton,a=["mushi-attach-btn",t.elementSelected?"active":"",t.elementError?"error":"",t.elementCapturing?"loading":""].filter(Boolean).join(" "),i=e.step3.examplePrompts.map(l=>`<button type="button" class="mushi-example-chip" data-example="${g(l)}">${g(l)}</button>`).join("");return `
2077
+ ${xe(t,{title:e.step3.heading,showBack:true,step:yr.details})}
2028
2078
  <div class="mushi-body">
2029
2079
  <div class="mushi-example-chips" aria-label="Example prompts">${i}</div>
2030
2080
  <div class="mushi-textarea-wrap">
@@ -2032,6 +2082,7 @@
2032
2082
  class="mushi-textarea"
2033
2083
  placeholder="${g(e.step3.descriptionPlaceholder)}"
2034
2084
  rows="4"
2085
+ maxlength="4000"
2035
2086
  aria-label="${g(e.step3.heading)}"
2036
2087
  autofocus
2037
2088
  ></textarea>
@@ -2073,8 +2124,8 @@
2073
2124
  <span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2074
2125
  </button>
2075
2126
  </div>
2076
- `}function Ka(t){let e=t.locale,n=(t.submittedAt??new Date).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false});return `
2077
- ${ge(t,{title:e.widget.title,showBack:true,eyebrow:"Mushi \xB7 Receipt"})}
2127
+ `}function ml(t){let e=t.locale,n=(t.submittedAt??new Date).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false});return `
2128
+ ${xe(t,{title:e.widget.title,showBack:true,eyebrow:"Mushi \xB7 Receipt"})}
2078
2129
  <div class="mushi-body">
2079
2130
  <div class="mushi-success">
2080
2131
  <div class="mushi-success-stamp" aria-hidden="true">
@@ -2083,30 +2134,30 @@
2083
2134
  </div>
2084
2135
  <div class="mushi-success-headline">${e.widget.submitted}</div>
2085
2136
  <div class="mushi-success-meta">REPORT \xB7 ${n}</div>
2086
- ${Ga(t)}
2087
- ${t.rewardsState?Ja(t):""}
2088
- ${t.config.betaMode?.enabled?Ya(t):""}
2137
+ ${fl(t)}
2138
+ ${t.rewardsState?yl(t):""}
2139
+ ${t.config.betaMode?.enabled?gl(t):""}
2089
2140
  <button type="button" class="mushi-link-btn mushi-success-my-reports" data-action="view-my-reports">
2090
2141
  ${g(t.locale.flows.success.trackReport)}
2091
2142
  </button>
2092
2143
  </div>
2093
2144
  </div>
2094
- `}function Ga(t){let e=t.locale.flows.success;if(t.lastSubmitQueuedOffline)return `
2145
+ `}function fl(t){let e=t.locale.flows.success,r=t.lastSubmitFailureKind;if(r==="rate_limited"||r==="quota"||r==="permanent"||r==="retrying"||t.lastSubmitQueuedOffline){let i=r==="rate_limited"?e.rateLimited:r==="quota"?e.quotaBlocked:r==="permanent"?e.permanentFailed:r==="retrying"?e.retrying:e.queuedOffline,l=r==="rate_limited"?e.rateLimitedHint:r==="quota"?e.quotaBlockedHint:r==="permanent"?e.permanentFailedHint:r==="retrying"?e.retryingHint:e.queuedHint;return `
2095
2146
  <div class="mushi-success-receipt" role="status">
2096
2147
  <div class="mushi-success-receipt-row mushi-success-receipt-warn">
2097
- <span class="mushi-success-receipt-label">${g(e.queuedOffline)}</span>
2098
- <span class="mushi-success-receipt-hint">${g(e.queuedHint)}</span>
2148
+ <span class="mushi-success-receipt-label">${g(i)}</span>
2149
+ <span class="mushi-success-receipt-hint">${g(l)}</span>
2099
2150
  </div>
2100
2151
  </div>
2101
- `;if(!t.lastReportId)return `
2152
+ `}if(!t.lastReportId)return `
2102
2153
  <div class="mushi-success-receipt" role="status">
2103
2154
  <div class="mushi-success-receipt-row">
2104
2155
  <span class="mushi-success-receipt-spinner" aria-hidden="true"></span>
2105
2156
  <span class="mushi-success-receipt-hint">${g(e.delivering)}</span>
2106
2157
  </div>
2107
- ${to(t)}
2158
+ ${yo(t)}
2108
2159
  </div>
2109
- `;let r=`#${t.lastReportId.slice(0,8)}`,n=(t.config.dashboardUrl??"").replace(/\/$/,""),s=n?`${n}/reports/${encodeURIComponent(t.lastReportId)}`:"",o=t.lastSubmitScreenshotDropped?`
2160
+ `;let n=`#${t.lastReportId.slice(0,8)}`,s=(t.config.dashboardUrl??"").replace(/\/$/,""),o=s?`${s}/reports/${encodeURIComponent(t.lastReportId)}`:"",a=t.lastSubmitScreenshotDropped?`
2110
2161
  <div class="mushi-success-receipt-row mushi-success-receipt-warn">
2111
2162
  <span class="mushi-success-receipt-hint">${g(e.screenshotDropped)}</span>
2112
2163
  </div>
@@ -2121,24 +2172,24 @@
2121
2172
  data-copy-id="${g(t.lastReportId)}"
2122
2173
  title="Copy report id ${g(t.lastReportId)}"
2123
2174
  aria-label="Copy report id ${g(t.lastReportId)}"
2124
- >${g(r)}<span class="mushi-success-receipt-copy" aria-hidden="true">\u2398</span></button>
2175
+ >${g(n)}<span class="mushi-success-receipt-copy" aria-hidden="true">\u2398</span></button>
2125
2176
  </div>
2126
- ${s?`
2177
+ ${o?`
2127
2178
  <a
2128
2179
  class="mushi-success-receipt-track"
2129
- href="${g(s)}"
2180
+ href="${g(o)}"
2130
2181
  target="_blank"
2131
2182
  rel="noopener noreferrer"
2132
2183
  >${g(e.trackOnMushi)} <span aria-hidden="true">\u2197</span></a>
2133
2184
  `:""}
2134
- ${o}
2135
- ${to(t)}
2185
+ ${a}
2186
+ ${yo(t)}
2136
2187
  </div>
2137
- `}function to(t){let e=(t.config.responseSlaLabel??"").trim();return e?`<div class="mushi-success-sla">${g(e)}</div>`:`<div class="mushi-success-sla mushi-success-sla-default">${g(t.locale.flows.success.slaDefault)}</div>`}function Ya(t){let e=t.config.betaMode,r=e.contactEmail?g(e.contactEmail):null,n=g(e.appName??"the team");return `
2188
+ `}function yo(t){let e=(t.config.responseSlaLabel??"").trim();return e?`<div class="mushi-success-sla">${g(e)}</div>`:`<div class="mushi-success-sla mushi-success-sla-default">${g(t.locale.flows.success.slaDefault)}</div>`}function gl(t){let e=t.config.betaMode,r=e.contactEmail?g(e.contactEmail):null,n=g(e.appName??"the team");return `
2138
2189
  <div class="mushi-beta-success-footer" role="note" aria-label="Beta feedback acknowledgement">
2139
2190
  ${r?`<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${r}</div>`:`<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${n}</div>`}
2140
2191
  </div>
2141
- `}function Xa(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=e?.displayName??"Free",a=e?.slug??"free",i=t.tierColor(a),l=100,f="";if(r){let h=e?.pointsThreshold??0,m=r.pointsThreshold;l=m>h?Math.round(Math.min(1,(n-h)/(m-h))*100):100,f=`${Math.max(0,m-n).toLocaleString()} pts to ${g(r.displayName)}`;}return `
2192
+ `}function bl(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=e?.displayName??"Free",a=e?.slug??"free",i=t.tierColor(a),l=100,f="";if(r){let h=e?.pointsThreshold??0,m=r.pointsThreshold;l=m>h?Math.round(Math.min(1,(n-h)/(m-h))*100):100,f=`${Math.max(0,m-n).toLocaleString()} pts to ${g(r.displayName)}`;}return `
2142
2193
  <div class="mushi-rewards-nudge" aria-label="Rewards progress">
2143
2194
  <div class="mushi-rewards-row">
2144
2195
  <span class="mushi-tier-pip" style="background:${i}" aria-hidden="true"></span>
@@ -2148,22 +2199,22 @@
2148
2199
  </div>
2149
2200
  ${r?`
2150
2201
  <div class="mushi-tier-bar-track" role="progressbar" aria-valuenow="${l}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${g(r.displayName)}">
2151
- <div class="mushi-tier-bar-fill" style="width:${l}%"></div>
2202
+ <div class="mushi-tier-bar-fill" style="--mushi-tier-pct:${l/100}"></div>
2152
2203
  </div>
2153
2204
  <div class="mushi-rewards-next-label">${f}</div>
2154
2205
  `:""}
2155
2206
  </div>
2156
- `}function Ja(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=n+s,a=100,i="";if(r){let l=e?.pointsThreshold??0,f=r.pointsThreshold;a=f>l?Math.round(Math.min(1,(o-l)/(f-l))*100):100;let h=Math.max(0,f-o);i=h>0?`${h.toLocaleString()} pts to ${g(r.displayName)}`:`\u{1F389} ${g(r.displayName)} reached!`;}return `
2207
+ `}function yl(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=n+s,a=100,i="";if(r){let l=e?.pointsThreshold??0,f=r.pointsThreshold;a=f>l?Math.round(Math.min(1,(o-l)/(f-l))*100):100;let h=Math.max(0,f-o);i=h>0?`${h.toLocaleString()} pts to ${g(r.displayName)}`:`\u{1F389} ${g(r.displayName)} reached!`;}return `
2157
2208
  <div class="mushi-success-rewards">
2158
2209
  <div class="mushi-success-pts-award">+${s} pts</div>
2159
2210
  ${r?`
2160
2211
  <div class="mushi-tier-bar-track success-bar" role="progressbar" aria-valuenow="${a}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${g(r.displayName)}">
2161
- <div class="mushi-tier-bar-fill" style="width:${a}%"></div>
2212
+ <div class="mushi-tier-bar-fill" style="--mushi-tier-pct:${a/100}"></div>
2162
2213
  </div>
2163
2214
  <div class="mushi-rewards-next-label">${i}</div>
2164
2215
  `:""}
2165
2216
  </div>
2166
- `}var nr=class t{constructor(e={},r,n=pe){this.sdkVersion=n;this.config={position:e.position??"bottom-right",anchor:e.anchor??{},theme:e.theme??"auto",triggerText:e.triggerText||"\u{1F41B}",expandedTitle:e.expandedTitle??"",mode:e.mode??"conversational",locale:e.locale??"auto",zIndex:e.zIndex??99999,trigger:e.trigger??"auto",bannerConfig:e.bannerConfig??{},attachToSelector:e.attachToSelector??"",inset:e.inset??{},respectSafeArea:e.respectSafeArea??true,hideOnSelector:e.hideOnSelector??"",hideOnRoutes:e.hideOnRoutes??[],environments:e.environments??{},smartHide:e.smartHide??false,draggable:e.draggable??false,brandFooter:e.brandFooter??false,outdatedBanner:e.outdatedBanner??"auto",screenshotSensitiveHint:e.screenshotSensitiveHint??true,betaMode:e.betaMode??{},minDescriptionLength:e.minDescriptionLength??20,dashboardUrl:e.dashboardUrl??"",responseSlaLabel:e.responseSlaLabel??"",featureRequestCard:e.featureRequestCard??true,featureRequestLabel:e.featureRequestLabel||"Feature request",featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise",avoidSelectors:e.avoidSelectors??[],categories:e.categories??[],accent:e.accent??"",accentText:e.accentText??""},this.callbacks=r,this.locale=Nr(this.config.locale==="auto"?void 0:this.config.locale),this.host=document.createElement("div"),this.host.id="mushi-mushi-widget",this.shadow=this.host.attachShadow({mode:"open"});}sdkVersion;host;shadow;config;callbacks;locale;isOpen=false;step="category";selectedCategory=null;selectedIntent=null;viaFeatureRequest=false;showAllCategories=false;showMoreNav=false;screenshotAttached=false;screenshotCapturing=false;screenshotError=false;allowScreenshotRemove=true;screenshotAvailable=true;elementAvailable=true;draftDescription="";draftEmail="";draftReply="";draftFocus=null;draftSelStart=0;draftSelEnd=0;screenshotPreview=null;elementSelected=false;elementCapturing=false;elementError=false;submitting=false;selectorHint=null;triggerVisible=true;triggerShrunk=false;triggerHiddenByScroll=false;mountedAt=null;nudgeShown=false;nudgeEl=null;nudgeTimer=null;sdkFreshness=null;reporterReports=[];featureBoard=[];reporterComments=[];selectedReportId=null;reporterLoading=false;reporterError=null;attachedLaunchers=[];smartHideCleanup=null;smartHideTimer=null;submittedAt=null;successTimer=null;autoCloseTimer=null;rewardsState=null;leaderboardEntries=null;leaderboardLoading=false;lastReportId=null;lastSubmitQueuedOffline=false;lastSubmitScreenshotDropped=false;bannerDismissed=false;bannerResizeObserver=null;fabPos=null;vvCleanup=null;identifiedUser=null;testerJwt=null;testerInfo=null;crossAppReports=null;crossAppLoading=false;globalLeaderboard=null;globalLeaderboardLoading=false;testerReputation=null;magicLinkSent=false;magicLinkEmail="";magicLinkError="";magicLinkSending=false;assistantTurns=[];assistantThreadId=null;assistantSending=false;assistantError=null;mount(){this.host.isConnected||(this.syncHostChromeState(),document.body.appendChild(this.host),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render(),this.mountedAt=Date.now());}getIsMounted(){return this.host.isConnected}updateConfig(e={}){let r=this.config.trigger,n=JSON.stringify(this.config.bannerConfig??null);this.config={...this.config,...e.position?{position:e.position}:{},...e.anchor!==void 0?{anchor:e.anchor}:{},...e.theme?{theme:e.theme}:{},...e.triggerText!==void 0?{triggerText:e.triggerText||"\u{1F41B}"}:{},...e.expandedTitle!==void 0?{expandedTitle:e.expandedTitle}:{},...e.mode?{mode:e.mode}:{},...e.locale?{locale:e.locale}:{},...e.zIndex!==void 0?{zIndex:e.zIndex}:{},...e.trigger?{trigger:e.trigger}:{},...e.attachToSelector!==void 0?{attachToSelector:e.attachToSelector}:{},...e.inset!==void 0?{inset:e.inset}:{},...e.respectSafeArea!==void 0?{respectSafeArea:e.respectSafeArea}:{},...e.hideOnSelector!==void 0?{hideOnSelector:e.hideOnSelector}:{},...e.hideOnRoutes!==void 0?{hideOnRoutes:e.hideOnRoutes}:{},...e.environments!==void 0?{environments:e.environments}:{},...e.smartHide!==void 0?{smartHide:e.smartHide}:{},...e.draggable!==void 0?{draggable:e.draggable}:{},...e.brandFooter!==void 0?{brandFooter:e.brandFooter}:{},...e.outdatedBanner!==void 0?{outdatedBanner:e.outdatedBanner}:{},...e.screenshotSensitiveHint!==void 0?{screenshotSensitiveHint:e.screenshotSensitiveHint}:{},...e.betaMode!==void 0?{betaMode:e.betaMode}:{},...e.minDescriptionLength!==void 0?{minDescriptionLength:e.minDescriptionLength}:{},...e.dashboardUrl!==void 0?{dashboardUrl:e.dashboardUrl}:{},...e.responseSlaLabel!==void 0?{responseSlaLabel:e.responseSlaLabel}:{},...e.featureRequestCard!==void 0?{featureRequestCard:e.featureRequestCard}:{},...e.featureRequestLabel!==void 0?{featureRequestLabel:e.featureRequestLabel||"Feature request"}:{},...e.featureRequestDescription!==void 0?{featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise"}:{},...e.bannerConfig!==void 0?{bannerConfig:e.bannerConfig}:{},...e.categories!==void 0?{categories:e.categories}:{}},this.locale=Nr(this.config.locale==="auto"?void 0:this.config.locale);let s=this.config.trigger==="banner"&&r!=="banner",o=JSON.stringify(this.config.bannerConfig??null)!==n;(s||o)&&(this.bannerDismissed=false),this.host.isConnected&&this.syncHostChromeState(),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render();}resolveCustomCategory(e){return this.config.categories?.find(r=>r.id===e)}resolveBaseCategory(e){return ["bug","slow","visual","confusing","other"].includes(e)?e:this.resolveCustomCategory(e)?.baseCategory??"other"}categoryIcon(e){let r=this.resolveCustomCategory(e);return r?.icon?r.icon:Qt[e]??"\u{1F4AC}"}categoryLabel(e){let r=this.resolveCustomCategory(e);return r?r.label:this.locale.step1.categories[e]??e}open(e){if(!this.isOpen){if(this.isOpen=true,this.screenshotAttached=false,this.screenshotCapturing=false,this.screenshotError=false,this.screenshotPreview=null,this.elementSelected=false,this.elementCapturing=false,this.elementError=false,this.submitting=false,this.submittedAt=null,this.removeSelectorHint(),this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.lastSubmitScreenshotDropped=false,this.viaFeatureRequest=false,this.clearFormDrafts(),e?.featureRequest)this.selectedCategory="other",this.selectedIntent=Fr,this.viaFeatureRequest=true,this.step="details";else if(e?.category){let r=this.resolveCustomCategory(e.category);["bug","slow","visual","confusing","other"].includes(e.category)||r!==void 0?(this.selectedCategory=e.category,this.selectedIntent=null,this.step=r&&(!r.intents||r.intents.length===0)?"details":"intent"):(this.selectedCategory=null,this.selectedIntent=null,this.step="category");}else this.selectedCategory=null,this.selectedIntent=null,this.step="category";this.render(),this.callbacks.onOpen();}}close(){this.isOpen&&(this.isOpen=false,this.showAllCategories=false,this.showMoreNav=false,this.render(),this.callbacks.onClose());}openAssistantTab(){if(!this.callbacks.assistantEnabled){this.open();return}this.isOpen||(this.isOpen=true,this.callbacks.onOpen()),this.step="assistant",this.assistantError=null,this.render(),setTimeout(()=>{this.shadow.querySelector(".mushi-assistant-input")?.focus();},0);}async sendAssistantMessage(e){let r=e.trim();if(!(!r||this.assistantSending||!this.callbacks.onAssistantAsk)){this.assistantSending=true,this.assistantError=null,this.assistantTurns.push({role:"user",text:r}),this.render();try{let n=await this.callbacks.onAssistantAsk(r,this.assistantThreadId);n?(n.threadId&&(this.assistantThreadId=n.threadId),n.kind==="clarify"?this.assistantTurns.push({role:"assistant",text:n.question??"Could you tell me a bit more?",...n.options&&n.options.length?{options:n.options}:{}}):this.assistantTurns.push({role:"assistant",text:n.text??"\u2026"})):this.assistantError=this.locale.assistant.errors.noResponse;}catch{this.assistantError=this.locale.assistant.errors.generic;}finally{this.assistantSending=false,this.render(),setTimeout(()=>{let n=this.shadow.querySelector(".mushi-assistant-log");n&&(n.scrollTop=n.scrollHeight);},0);}}}pulseTrigger(){if(this.isOpen)return;let e=this.shadow.querySelector(".mushi-trigger");e&&(e.classList.add("mushi-trigger-pulse"),window.setTimeout(()=>{e.classList.remove("mushi-trigger-pulse");},2400));}getIsOpen(){return this.isOpen}showTrigger(){this.triggerVisible=true,this.render();}hideTrigger(){this.triggerVisible=false,this.render();}setTrigger(e){this.updateConfig({trigger:e});}attachTo(e,r={}){let s=(typeof e=="string"?Array.from(document.querySelectorAll(e)):[e]).map(o=>{let a=i=>{i.preventDefault(),this.updateConfig(r),this.open();};return o.addEventListener("click",a),()=>o.removeEventListener("click",a)});return ()=>s.forEach(o=>o())}setScreenshotAttached(e){this.screenshotAttached=e,this.screenshotCapturing=false,e&&(this.screenshotError=false),e||(this.screenshotPreview=null),this.isOpen&&this.render();}setScreenshotPreview(e){this.screenshotPreview=e,this.isOpen&&this.render();}resolveScreenshotHint(){let e=this.config.screenshotSensitiveHint;return e===false?null:typeof e=="string"?e.trim()?e:null:this.locale.step3.screenshotSensitiveHint}setAllowScreenshotRemove(e){this.allowScreenshotRemove=e,this.isOpen&&this.render();}setCaptureAvailability(e){let r=e.screenshot??this.screenshotAvailable,n=e.element??this.elementAvailable;r===this.screenshotAvailable&&n===this.elementAvailable||(this.screenshotAvailable=r,this.elementAvailable=n,this.isOpen&&this.render());}setElementSelected(e){this.elementSelected=e,this.elementCapturing=false,e&&(this.elementError=false),this.removeSelectorHint(),this.isOpen&&this.render();}setElementError(e){this.elementError=e,this.elementCapturing=false,this.removeSelectorHint(),this.isOpen&&this.render();}setScreenshotCapturing(e){this.screenshotCapturing=e,this.screenshotError=false,this.isOpen&&this.render();}setScreenshotError(e){this.screenshotError=e,this.screenshotCapturing=false,this.isOpen&&this.render();}setElementCapturing(e){this.elementCapturing=e,e?(this.elementError=false,this.showSelectorHint()):this.removeSelectorHint(),this.isOpen&&this.render();}hidePanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="none");}showPanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="");}showSelectorHint(){this.removeSelectorHint();let e=document.createElement("div");e.id="mushi-selector-hint",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.cssText=`
2217
+ `}function vl(t){let e=t.toLowerCase();return /i('m| am) not sure|i don't know|not sure|cannot help|can't help|unable to|don't have enough|outside (my|of) (scope|knowledge)|file a (bug )?report|報告/.test(e)||/わかりません|分かりません|不明|報告して/.test(t)}var vr=class t{constructor(e={},r,n=fe){this.sdkVersion=n;this.config={position:e.position??"bottom-right",anchor:e.anchor??{},theme:e.theme??"auto",triggerText:e.triggerText||"\u{1F41B}",expandedTitle:e.expandedTitle??"",mode:e.mode??"conversational",locale:e.locale??"auto",zIndex:e.zIndex??99999,trigger:e.trigger??"auto",bannerConfig:e.bannerConfig??{},attachToSelector:e.attachToSelector??"",inset:e.inset??{},respectSafeArea:e.respectSafeArea??true,hideOnSelector:e.hideOnSelector??"",hideOnRoutes:e.hideOnRoutes??[],environments:e.environments??{},smartHide:e.smartHide??false,draggable:e.draggable??false,brandFooter:e.brandFooter??false,outdatedBanner:e.outdatedBanner??"auto",screenshotSensitiveHint:e.screenshotSensitiveHint??true,betaMode:e.betaMode??{},minDescriptionLength:e.minDescriptionLength??20,dashboardUrl:e.dashboardUrl??"",responseSlaLabel:e.responseSlaLabel??"",featureRequestCard:e.featureRequestCard??true,featureRequestLabel:e.featureRequestLabel||"Feature request",featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise",avoidSelectors:e.avoidSelectors??[],categories:e.categories??[],accent:e.accent??"",accentText:e.accentText??""},this.callbacks=r,this.locale=tn(this.config.locale==="auto"?void 0:this.config.locale);let s=uo();s?.turns.length&&(this.assistantTurns=s.turns,this.assistantThreadId=s.threadId),this.host=document.createElement("div"),this.host.id="mushi-mushi-widget",this.shadow=this.host.attachShadow({mode:"open"});}sdkVersion;host;shadow;colorSchemeMq=null;onColorSchemeChange=null;config;callbacks;locale;isOpen=false;step="category";selectedCategory=null;selectedIntent=null;viaFeatureRequest=false;showAllCategories=false;showMoreNav=false;screenshotAttached=false;screenshotCapturing=false;screenshotError=false;allowScreenshotRemove=true;screenshotAvailable=true;elementAvailable=true;draftDescription="";draftEmail="";draftReply="";draftFocus=null;draftSelStart=0;draftSelEnd=0;screenshotPreview=null;elementSelected=false;elementCapturing=false;elementError=false;submitting=false;selectorHint=null;triggerVisible=true;triggerShrunk=false;triggerHiddenByScroll=false;mountedAt=null;nudgeShown=false;nudgeEl=null;nudgeTimer=null;sdkFreshness=null;reporterReports=[];featureBoard=[];reporterComments=[];selectedReportId=null;reporterLoading=false;reporterError=null;attachedLaunchers=[];smartHideCleanup=null;smartHideTimer=null;submittedAt=null;successTimer=null;autoCloseTimer=null;rewardsState=null;leaderboardEntries=null;leaderboardLoading=false;lastReportId=null;lastSubmitQueuedOffline=false;lastSubmitFailureKind;lastSubmitScreenshotDropped=false;bannerDismissed=false;bannerResizeObserver=null;fabPos=null;vvCleanup=null;identifiedUser=null;testerJwt=null;testerInfo=null;crossAppReports=null;crossAppLoading=false;globalLeaderboard=null;globalLeaderboardLoading=false;testerReputation=null;magicLinkSent=false;magicLinkEmail="";magicLinkError="";magicLinkSending=false;assistantTurns=[];assistantThreadId=null;assistantSending=false;assistantError=null;mount(){this.host.isConnected||(this.syncHostChromeState(),document.body.appendChild(this.host),this.syncAttachedLaunchers(),this.syncSmartHide(),this.bindColorSchemeListener(),this.render(),this.mountedAt=Date.now());}getIsMounted(){return this.host.isConnected}updateConfig(e={}){let r=this.config.trigger,n=JSON.stringify(this.config.bannerConfig??null);this.config={...this.config,...e.position?{position:e.position}:{},...e.anchor!==void 0?{anchor:e.anchor}:{},...e.theme?{theme:e.theme}:{},...e.triggerText!==void 0?{triggerText:e.triggerText||"\u{1F41B}"}:{},...e.expandedTitle!==void 0?{expandedTitle:e.expandedTitle}:{},...e.mode?{mode:e.mode}:{},...e.locale?{locale:e.locale}:{},...e.zIndex!==void 0?{zIndex:e.zIndex}:{},...e.trigger?{trigger:e.trigger}:{},...e.attachToSelector!==void 0?{attachToSelector:e.attachToSelector}:{},...e.inset!==void 0?{inset:e.inset}:{},...e.respectSafeArea!==void 0?{respectSafeArea:e.respectSafeArea}:{},...e.hideOnSelector!==void 0?{hideOnSelector:e.hideOnSelector}:{},...e.hideOnRoutes!==void 0?{hideOnRoutes:e.hideOnRoutes}:{},...e.environments!==void 0?{environments:e.environments}:{},...e.smartHide!==void 0?{smartHide:e.smartHide}:{},...e.draggable!==void 0?{draggable:e.draggable}:{},...e.brandFooter!==void 0?{brandFooter:e.brandFooter}:{},...e.outdatedBanner!==void 0?{outdatedBanner:e.outdatedBanner}:{},...e.screenshotSensitiveHint!==void 0?{screenshotSensitiveHint:e.screenshotSensitiveHint}:{},...e.betaMode!==void 0?{betaMode:e.betaMode}:{},...e.minDescriptionLength!==void 0?{minDescriptionLength:e.minDescriptionLength}:{},...e.dashboardUrl!==void 0?{dashboardUrl:e.dashboardUrl}:{},...e.responseSlaLabel!==void 0?{responseSlaLabel:e.responseSlaLabel}:{},...e.featureRequestCard!==void 0?{featureRequestCard:e.featureRequestCard}:{},...e.featureRequestLabel!==void 0?{featureRequestLabel:e.featureRequestLabel||"Feature request"}:{},...e.featureRequestDescription!==void 0?{featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise"}:{},...e.bannerConfig!==void 0?{bannerConfig:e.bannerConfig}:{},...e.categories!==void 0?{categories:e.categories}:{}},this.locale=tn(this.config.locale==="auto"?void 0:this.config.locale);let s=this.config.trigger==="banner"&&r!=="banner",o=JSON.stringify(this.config.bannerConfig??null)!==n;(s||o)&&(this.bannerDismissed=false),this.host.isConnected&&this.syncHostChromeState(),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render();}resolveCustomCategory(e){return this.config.categories?.find(r=>r.id===e)}resolveBaseCategory(e){return ["bug","slow","visual","confusing","other"].includes(e)?e:this.resolveCustomCategory(e)?.baseCategory??"other"}categoryIcon(e){let r=this.resolveCustomCategory(e);return r?.icon?r.icon:fr[e]??"\u{1F4AC}"}categoryLabel(e){let r=this.resolveCustomCategory(e);return r?r.label:this.locale.step1.categories[e]??e}open(e){if(!this.isOpen){if(this.isOpen=true,this.screenshotAttached=false,this.screenshotCapturing=false,this.screenshotError=false,this.screenshotPreview=null,this.elementSelected=false,this.elementCapturing=false,this.elementError=false,this.submitting=false,this.submittedAt=null,this.removeSelectorHint(),this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.lastSubmitFailureKind=void 0,this.lastSubmitScreenshotDropped=false,this.viaFeatureRequest=false,this.clearFormDrafts(),e?.featureRequest)this.selectedCategory="other",this.selectedIntent=rn,this.viaFeatureRequest=true,this.step="details";else if(e?.category){let r=this.resolveCustomCategory(e.category);["bug","slow","visual","confusing","other"].includes(e.category)||r!==void 0?(this.selectedCategory=e.category,this.selectedIntent=null,this.step=r&&(!r.intents||r.intents.length===0)?"details":"intent"):(this.selectedCategory=null,this.selectedIntent=null,this.step="category");}else this.selectedCategory=null,this.selectedIntent=null,this.step="category";this.render(),this.callbacks.onOpen();}}close(){this.isOpen&&(this.isOpen=false,this.showAllCategories=false,this.showMoreNav=false,this.render(),this.callbacks.onClose());}openAssistantTab(){if(!this.callbacks.assistantEnabled){this.open();return}this.isOpen||(this.isOpen=true,this.callbacks.onOpen()),this.step="assistant",this.assistantError=null,this.render(),setTimeout(()=>{this.shadow.querySelector(".mushi-assistant-input")?.focus();},0);}async sendAssistantMessage(e){let r=e.trim();if(!(!r||this.assistantSending||!this.callbacks.onAssistantAsk)){this.assistantSending=true,this.assistantError=null,this.assistantTurns.push({role:"user",text:r}),this.persistAssistantSession(),this.render();try{let n=await this.callbacks.onAssistantAsk(r,this.assistantThreadId);if(n){if(n.threadId&&(this.assistantThreadId=n.threadId),n.kind==="clarify")this.assistantTurns.push({role:"assistant",text:n.question??"Could you tell me a bit more?",...n.options&&n.options.length?{options:n.options}:{},offerReport:!0});else {let s=n.text??"\u2026",o=vl(s);this.assistantTurns.push({role:"assistant",text:s,...o?{offerReport:!0}:{}});}this.persistAssistantSession();}else this.assistantError=this.locale.assistant.errors.noResponse;}catch{this.assistantError=this.locale.assistant.errors.generic;}finally{this.assistantSending=false,this.render(),setTimeout(()=>{let n=this.shadow.querySelector(".mushi-assistant-log");n&&(n.scrollTop=n.scrollHeight);},0);}}}persistAssistantSession(){po({turns:this.assistantTurns,threadId:this.assistantThreadId});}clearAssistantTranscript(){this.assistantTurns=[],this.assistantThreadId=null,this.assistantError=null,ho(),this.step==="assistant"&&this.render();}openReportFromAssistant(){this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false,this.step="category",this.isOpen||(this.isOpen=true,this.callbacks.onOpen()),this.render();}pulseTrigger(){if(this.isOpen)return;let e=this.shadow.querySelector(".mushi-trigger");e&&(e.classList.add("mushi-trigger-pulse"),window.setTimeout(()=>{e.classList.remove("mushi-trigger-pulse");},2400));}getIsOpen(){return this.isOpen}showTrigger(){this.triggerVisible=true,this.render();}hideTrigger(){this.triggerVisible=false,this.render();}setTrigger(e){this.updateConfig({trigger:e});}attachTo(e,r={}){let s=(typeof e=="string"?Array.from(document.querySelectorAll(e)):[e]).map(o=>{let a=i=>{i.preventDefault(),this.updateConfig(r),this.open();};return o.addEventListener("click",a),()=>o.removeEventListener("click",a)});return ()=>s.forEach(o=>o())}setScreenshotAttached(e){this.screenshotAttached=e,this.screenshotCapturing=false,e&&(this.screenshotError=false),e||(this.screenshotPreview=null),this.isOpen&&this.render();}setScreenshotPreview(e){this.screenshotPreview=e,this.isOpen&&this.render();}resolveScreenshotHint(){let e=this.config.screenshotSensitiveHint;return e===false?null:typeof e=="string"?e.trim()?e:null:this.locale.step3.screenshotSensitiveHint}setAllowScreenshotRemove(e){this.allowScreenshotRemove=e,this.isOpen&&this.render();}setCaptureAvailability(e){let r=e.screenshot??this.screenshotAvailable,n=e.element??this.elementAvailable;r===this.screenshotAvailable&&n===this.elementAvailable||(this.screenshotAvailable=r,this.elementAvailable=n,this.isOpen&&this.render());}setElementSelected(e){this.elementSelected=e,this.elementCapturing=false,e&&(this.elementError=false),this.removeSelectorHint(),this.isOpen&&this.render();}setElementError(e){this.elementError=e,this.elementCapturing=false,this.removeSelectorHint(),this.isOpen&&this.render();}setScreenshotCapturing(e){this.screenshotCapturing=e,this.screenshotError=false,this.isOpen&&this.render();}setScreenshotError(e){this.screenshotError=e,this.screenshotCapturing=false,this.isOpen&&this.render();}setElementCapturing(e){this.elementCapturing=e,e?(this.elementError=false,this.showSelectorHint()):this.removeSelectorHint(),this.isOpen&&this.render();}hidePanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="none");}showPanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="");}showSelectorHint(){this.removeSelectorHint();let e=document.createElement("div");e.id="mushi-selector-hint",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.cssText=`
2167
2218
  position: fixed;
2168
2219
  bottom: 24px;
2169
2220
  left: 50%;
@@ -2196,7 +2247,7 @@
2196
2247
  backdrop-filter: blur(4px);
2197
2248
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
2198
2249
  animation: mushi-fade-in 0.15s ease forwards;
2199
- `,n.textContent=this.locale.step3.tooShort.startsWith("A bit")?"Found a bug? One sentence is enough \u{1F41B}":"\u30D0\u30B0\u3092\u898B\u3064\u3051\u305F\uFF1F\u4E00\u884C\u3067\u5927\u4E08\u592B\u3067\u3059 \u{1F41B}",document.body.appendChild(n),this.nudgeEl=n,this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),5e3);}removeNudge(){this.nudgeTimer!==null&&(clearTimeout(this.nudgeTimer),this.nudgeTimer=null),this.nudgeEl?.remove(),this.nudgeEl=null,document.getElementById("mushi-nudge-bubble")?.remove();}setSdkFreshness(e){this.sdkFreshness=e,this.isOpen&&this.render();}setRewardsState(e){this.rewardsState=e,this.isOpen&&this.render();}setLeaderboard(e,r=false){this.leaderboardEntries=e,this.leaderboardLoading=r,this.isOpen&&this.step==="leaderboard"&&this.render();}setIdentifiedUser(e){this.identifiedUser=e,this.isOpen&&this.render();}setTesterSession(e,r){this.testerJwt=e,this.testerInfo=r,this.isOpen&&this.render();}setGlobalLeaderboard(e,r=false){this.globalLeaderboard=e,this.globalLeaderboardLoading=r,this.isOpen&&(this.step==="leaderboard"||this.step==="account")&&this.render();}setCrossAppReports(e,r=false){this.crossAppReports=e,this.crossAppLoading=r,this.isOpen&&this.step==="cross-app-reports"&&this.render();}setTesterReputation(e){this.testerReputation=e,this.isOpen&&(this.step==="account"||this.step==="leaderboard")&&this.render();}destroy(){this.successTimer!==null&&(clearTimeout(this.successTimer),this.successTimer=null),this.autoCloseTimer!==null&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.smartHideTimer!==null&&(clearTimeout(this.smartHideTimer),this.smartHideTimer=null),this.smartHideCleanup?.(),this.smartHideCleanup=null,this.teardownViewportHandlers(),this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],this.removeSelectorHint(),this.removeNudge(),this.removeBodyNudge(),this.host.remove();}syncHostChromeState(){let e=this.host.style;e.setProperty("position","fixed"),e.setProperty("top","0"),e.setProperty("left","0"),e.setProperty("width","0"),e.setProperty("height","0"),e.setProperty("overflow","visible"),e.setProperty("pointer-events","none"),e.setProperty("z-index",String(this.config.zIndex)),e.setProperty("margin","0"),e.setProperty("padding","0"),e.setProperty("border","none"),e.setProperty("background","none");}isSuppressedByHost(){if(!this.config.hideOnSelector||typeof document>"u")return false;try{return !!document.querySelector(this.config.hideOnSelector)}catch{return false}}getWidgetDiagnostics(){let e=this.host.style,r=e.pointerEvents==="none"&&(e.width==="0"||e.width==="0px")&&(e.height==="0"||e.height==="0px"),n=this.host.isConnected?{width:this.host.offsetWidth,height:this.host.offsetHeight}:null,s=this.isSuppressedByHost()||this.isRouteHidden()||!this.triggerVisible,o=this.config.trigger==="banner"&&!this.bannerDismissed&&!this.isSuppressedByHost()&&!this.isRouteHidden()&&this.triggerVisible;return {widgetHostPointerSafe:r,widgetHostBounds:n,widgetSuppressed:s,bannerRendered:o}}syncAttachedLaunchers(){this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],!(this.config.trigger!=="attach"||!this.config.attachToSelector)&&(typeof document>"u"||this.attachedLaunchers.push(this.attachTo(this.config.attachToSelector)));}syncSmartHide(){if(this.smartHideCleanup?.(),this.smartHideCleanup=null,this.triggerShrunk=false,this.triggerHiddenByScroll=false,!this.config.smartHide||typeof window>"u")return;let e=this.config.smartHide===true?{onScroll:"shrink",onIdleMs:900}:this.config.smartHide;if(!e.onScroll)return;let r=()=>{e.onScroll==="hide"?this.triggerHiddenByScroll=true:this.triggerShrunk=true,this.render(),this.smartHideTimer!==null&&clearTimeout(this.smartHideTimer),this.smartHideTimer=setTimeout(()=>{this.triggerHiddenByScroll=false,this.triggerShrunk=false,this.render();},e.onIdleMs??900);};window.addEventListener("scroll",r,{passive:true}),this.smartHideCleanup=()=>window.removeEventListener("scroll",r);}shouldRenderTrigger(){if(!this.triggerVisible||this.triggerHiddenByScroll||this.config.trigger==="manual"||this.config.trigger==="hidden"||this.config.trigger==="attach"||this.config.trigger==="banner"||this.isMobileSmartHidden()||this.isRouteHidden()||this.isSuppressedByHost())return false;let e=this.config.environments[this.detectEnvironment()];return e!=="never"&&e!=="manual"}static BANNER_HEIGHT=36;static BODY_NUDGE_PROP="--mushi-banner-offset";applyBodyNudge(e,r=t.BANNER_HEIGHT){let n=`${r}px`;document.documentElement.style.setProperty(t.BODY_NUDGE_PROP,n),e==="top"?document.body.dataset.mushiBannerNudged==="top"?document.body.style.paddingTop=n:document.body.style.paddingTop||(document.body.style.paddingTop=n,document.body.dataset.mushiBannerNudged="top"):document.body.dataset.mushiBannerNudged==="bottom"?document.body.style.paddingBottom=n:document.body.style.paddingBottom||(document.body.style.paddingBottom=n,document.body.dataset.mushiBannerNudged="bottom");}trackBannerHeight(e,r){let n=()=>{let s=e.getBoundingClientRect().height;s>0&&this.applyBodyNudge(r,s);};requestAnimationFrame(n),typeof ResizeObserver<"u"&&(this.bannerResizeObserver=new ResizeObserver(n),this.bannerResizeObserver.observe(e));}removeBodyNudge(){this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,document.documentElement.style.removeProperty(t.BODY_NUDGE_PROP);let e=document.body.dataset.mushiBannerNudged;e==="top"?(document.body.style.paddingTop="",delete document.body.dataset.mushiBannerNudged):e==="bottom"&&(document.body.style.paddingBottom="",delete document.body.dataset.mushiBannerNudged);}renderBanner(){if(this.config.trigger!=="banner")return;if(this.bannerDismissed){this.removeBodyNudge();return}if(!this.triggerVisible){this.removeBodyNudge();return}if(this.isRouteHidden()){this.removeBodyNudge();return}if(this.isSuppressedByHost()){this.removeBodyNudge();return}let e=this.config.bannerConfig??{},r=e.variant??"brand",n=e.position??"top",s=e.message?.trim()??"",o=s.length>0,a=e.bugCta??"\u{1F41B} Report a bug",i=e.featureCta!==false,l=e.featureCtaLabel??"Request feature",f=e.zIndex??(this.config.zIndex??99999)-1,h=document.createElement("div");h.className=`mushi-banner ${r} ${n}${o?" mushi-banner--rich":""}`,h.style.setProperty("--mushi-banner-z",String(f)),h.setAttribute("role","banner");let m=document.createElement("button");if(m.className="mushi-banner-dismiss",m.textContent="\u2715",m.setAttribute("aria-label","Dismiss feedback banner"),m.addEventListener("click",()=>{this.bannerDismissed=true,this.removeBodyNudge(),this.render();}),o){let b=document.createElement("div");b.className="mushi-banner-body";let d=e.label===false?null:e.label??"Beta";if(d){let T=document.createElement("span");T.className="mushi-banner-pill",T.textContent=d,b.appendChild(T);}let v=document.createElement("span");v.className="mushi-banner-message",v.textContent=s,b.appendChild(v),h.appendChild(b);let x=document.createElement("nav");x.className="mushi-banner-actions",x.setAttribute("aria-label","Feedback banner actions");let C=(T=false)=>{let E=document.createElement("span");E.className=`mushi-banner-divider${T?" mushi-banner-extra":""}`,E.setAttribute("aria-hidden","true"),E.textContent="|",x.appendChild(E);},I=(T,E,w=false)=>{let p=document.createElement("button");p.type="button",p.className=`mushi-banner-link${w?" mushi-banner-extra":""}`,p.textContent=T,p.addEventListener("click",E),x.appendChild(p);};I(a,()=>this.open()),i&&(C(true),I(l,()=>this.open({featureRequest:true}),true));for(let T of e.links??[]){let E=T.label?.trim();if(!E)continue;let w=T.href&&(/^https?:\/\//i.test(T.href)||T.href.startsWith("/"))?T.href:void 0;if(C(true),w){let p=document.createElement("a");p.className="mushi-banner-link mushi-banner-extra",p.href=w,p.textContent=E,p.target="_blank",p.rel="noopener noreferrer",x.appendChild(p);}else I(E,()=>{T.featureRequest?this.open({featureRequest:true}):this.open();},true);}C(true),I("\u{1F4EC} My reports",()=>this.openReporter(),true),h.appendChild(x),h.appendChild(m);}else {let b=document.createElement("button");if(b.className="mushi-banner-btn",b.textContent=a,b.addEventListener("click",()=>this.open()),h.appendChild(b),i){let v=document.createElement("button");v.className="mushi-banner-btn",v.textContent=l,v.addEventListener("click",()=>this.open({featureRequest:true})),h.appendChild(v);}let d=document.createElement("button");d.className="mushi-banner-my-reports",d.textContent="\u{1F4EC} My reports",d.setAttribute("aria-label","View my submitted reports"),d.addEventListener("click",()=>this.openReporter()),h.appendChild(d),h.appendChild(m);}this.shadow.appendChild(h),this.applyBodyNudge(n),this.trackBannerHeight(h,n);}effectiveTrigger(){if(!this.config.smartHide||typeof window>"u")return this.config.trigger;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="edge-tab"?"edge-tab":this.config.trigger}isMobileSmartHidden(){if(!this.config.smartHide||typeof window>"u")return false;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="hide"}detectEnvironment(){let e=typeof location<"u"?location.hostname:"";return e==="localhost"||e==="127.0.0.1"||e.endsWith(".local")?"development":/\b(staging|stage|preview|dev)\b/i.test(e)?"staging":"production"}isRouteHidden(){return !this.config.hideOnRoutes.length||typeof location>"u"?false:this.config.hideOnRoutes.some(e=>location.pathname.includes(e))}getTheme(){let e=this.config.theme;if(e==="light"||e==="dark")return e;if(e==="inherit"){let r=document.documentElement,n=r.getAttribute("data-color-scheme")||r.getAttribute("data-theme")||r.getAttribute("color-scheme")||"";if(/dark/i.test(n))return "dark";if(/light/i.test(n))return "light";if(r.classList.contains("dark"))return "dark";if(r.classList.contains("light"))return "light";try{let o=getComputedStyle(r).backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return .299*+o[1]+.587*+o[2]+.114*+o[3]<128?"dark":"light"}catch{}}return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}captureFormDrafts(){let e=this.shadow.querySelector('textarea.mushi-textarea:not([data-role="reporter-reply"])'),r=this.shadow.querySelector('[data-role="magic-link-email"]'),n=this.shadow.querySelector('textarea[data-role="reporter-reply"]');e&&(this.draftDescription=e.value),r&&(this.draftEmail=r.value),n&&(this.draftReply=n.value);let s=this.shadow.activeElement;if(this.draftFocus=s&&s===e?"description":s&&s===r?"email":s&&s===n?"reply":null,this.draftFocus&&s){let o=s;this.draftSelStart=o.selectionStart??o.value.length,this.draftSelEnd=o.selectionEnd??o.value.length;}}restoreFormDrafts(e){let r=[{selector:'textarea.mushi-textarea:not([data-role="reporter-reply"])',value:this.draftDescription,key:"description"},{selector:'[data-role="magic-link-email"]',value:this.draftEmail,key:"email"},{selector:'textarea[data-role="reporter-reply"]',value:this.draftReply,key:"reply"}];for(let n of r){let s=e.querySelector(n.selector);if(s&&(n.value&&s.value!==n.value&&(s.value=n.value,s.dispatchEvent(new Event("input"))),this.draftFocus===n.key)){let o=()=>{s.focus();try{s.setSelectionRange(this.draftSelStart,this.draftSelEnd);}catch{}};typeof requestAnimationFrame=="function"?requestAnimationFrame(o):o();}}}clearFormDrafts(){this.draftDescription="",this.draftEmail="",this.draftReply="",this.draftFocus=null,this.draftSelStart=0,this.draftSelEnd=0;}render(){let e=this.getTheme(),r=this.config.position,n=this.locale;this.isOpen&&this.captureFormDrafts(),this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,this.shadow.innerHTML="";let s=document.createElement("style");if(s.textContent=Xs(e,this.config.accent??"",this.config.accentText??""),this.shadow.appendChild(s),this.renderBanner(),this.shouldRenderTrigger()){let a=this.effectiveTrigger(),i=document.createElement("button");if(i.className=`mushi-trigger ${r}${a==="edge-tab"?" edge-tab":""}${this.triggerShrunk?" shrunk":""}`,i.textContent=this.config.triggerText,i.setAttribute("aria-label",n.widget.trigger),i.setAttribute("aria-haspopup","dialog"),i.setAttribute("aria-expanded",String(this.isOpen)),i.style.zIndex=String(this.config.zIndex),this.applyInsetVars(i),i.addEventListener("click",()=>{this.removeNudge(),this.isOpen?this.close():this.open();}),i.addEventListener("mouseenter",()=>{let l=this.mountedAt?Date.now()-this.mountedAt:0;!this.nudgeShown&&!this.isOpen&&l>=3e4&&this.showNudge();}),i.addEventListener("mouseleave",()=>{this.nudgeEl&&(this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),2e3));}),i.addEventListener("keydown",l=>{let f=this.config.draggable;if(!f)return;let h=8,m=typeof f=="object"?f.axis??"both":"both",b=0,d=0;if(m!=="y"&&(l.key==="ArrowLeft"?b=-h:l.key==="ArrowRight"&&(b=h)),m!=="x"&&(l.key==="ArrowUp"?d=-h:l.key==="ArrowDown"&&(d=h)),b!==0||d!==0){l.preventDefault();let v=this.fabPos??{x:0,y:0};this.moveFab(i,v.x+b,v.y+d,false);}}),this.config.draggable&&this.attachDragHandlers(i),this.shadow.appendChild(i),this.fabPos&&this.config.draggable){let l=this.fabPos;this.fabPos={x:0,y:0},this.moveFab(i,l.x,l.y,false);}}let o=document.createElement("div");if(o.className=`mushi-panel ${r}${this.isOpen?" open":" closed"}`,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label",n.widget.title),o.style.zIndex=String(this.config.zIndex+1),this.applyInsetVars(o),this.isOpen){let a=this.renderCtx();o.innerHTML=`${no(a)}${ro(a)}${so(a)}`,this.shadow.appendChild(o),this.attachHandlers(o),this.trapFocus(o),this.restoreFormDrafts(o),this.attachViewportHandlers(o);}else this.teardownViewportHandlers();}computeAvoidTopPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let a=o.getBoundingClientRect();a.bottom>n&&a.width>0&&a.height>0&&(n=a.bottom);}catch{}return n>0?Math.ceil(n)+e:null}computeAvoidBottomPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let a=o.getBoundingClientRect();if(a.width>0&&a.height>0){let i=window.innerHeight-a.top+e;i>n&&(n=i);}}catch{}return n>0?Math.ceil(n):null}applyInsetVars(e){let{anchor:r}=this.config;if(r&&Object.keys(r).length>0)["top","right","bottom","left"].forEach(o=>{let a=r[o];a!==void 0&&e.style.setProperty(`--mushi-${o}`,a);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");else {let{inset:o}=this.config;this.config.respectSafeArea||["top","right","bottom","left"].forEach(a=>{o[a]===void 0&&e.style.setProperty(`--mushi-${a}`,"24px");}),["top","right","bottom","left"].forEach(a=>{let i=o[a];i!==void 0&&e.style.setProperty(`--mushi-${a}`,i==="auto"?"auto":`${i}px`);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");}let n=r?.top!==void 0||this.config.position?.startsWith("top"),s=r?.bottom!==void 0||this.config.position?.startsWith("bottom")||!this.config.position;if(n){let o=this.computeAvoidTopPx();o!==null&&e.style.setProperty("--mushi-top",`${o}px`);}if(s){let o=this.computeAvoidBottomPx();o!==null&&e.style.setProperty("--mushi-bottom",`${o}px`);}}fabStorageKey(){let e=this.config.projectId??"";return `mushi_fab_pos${e?`_${e}`:""}`}moveFab(e,r,n,s){let o=(()=>{let j=this.config.draggable;return j&&typeof j=="object"?j.axis??"both":"both"})(),a=window.innerWidth,i=window.innerHeight,l=e.offsetWidth||52,f=e.offsetHeight||52,h=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-left")||"0")||0,m=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-right")||"0")||0,b=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-top")||"0")||0,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-bottom")||"0")||0,v=8,x=e.getBoundingClientRect(),C=this.fabPos?.x??0,I=this.fabPos?.y??0,T=x.left-C,E=x.top-I,w=h+v-T,p=a-m-v-l-T,S=b+v-E,R=i-d-v-f-E,y=o==="y"?0:Math.max(w,Math.min(p,r)),O=o==="x"?0:Math.max(S,Math.min(R,n)),N=y;if(s){let j=this.config.draggable;(j===true||typeof j=="object"&&(j.snapToEdge??true))&&o!=="y"&&(N=x.left+l/2<a/2?h+v-T:a-m-v-l-T);}this.fabPos={x:N,y:O},e.style.setProperty("--mushi-drag-x",`${N}px`),e.style.setProperty("--mushi-drag-y",`${O}px`),e.style.setProperty("--mushi-drag-active","1");let Z=this.config.draggable;if(Z===true||typeof Z=="object"&&(Z.persist??true))try{localStorage.setItem(this.fabStorageKey(),JSON.stringify(this.fabPos));}catch{}}loadFabPos(){let e=this.config.draggable;if(!(!e||!(e===true||typeof e=="object"&&(e.persist??true))))try{let n=localStorage.getItem(this.fabStorageKey());if(n){let s=JSON.parse(n);typeof s?.x=="number"&&typeof s?.y=="number"&&(this.fabPos=s);}}catch{}}attachDragHandlers(e){this.fabPos===null&&this.loadFabPos();let r=0,n=0,s=0,o=0,a=false,i=false,l=b=>{if(b.button!==0&&b.pointerType!=="touch")return;e.setPointerCapture(b.pointerId),r=b.clientX,n=b.clientY;let d=this.fabPos??{x:0,y:0};s=d.x,o=d.y,a=true,i=false;},f=6,h=b=>{if(!a)return;let d=b.clientX-r,v=b.clientY-n;!i&&Math.hypot(d,v)>f&&(i=true,e.classList.add("dragging"),e.setAttribute("aria-grabbed","true")),i&&(b.preventDefault(),this.moveFab(e,s+d,o+v,false));},m=b=>{if(a){if(a=false,e.classList.remove("dragging"),e.removeAttribute("aria-grabbed"),i){let d=b.clientX-r,v=b.clientY-n;this.moveFab(e,s+d,o+v,true);let x=C=>{C.stopImmediatePropagation(),e.removeEventListener("click",x,{capture:true});};e.addEventListener("click",x,{capture:true});}i=false;}};e.addEventListener("pointerdown",l),e.addEventListener("pointermove",h),e.addEventListener("pointerup",m),e.addEventListener("pointercancel",m);}attachViewportHandlers(e){this.teardownViewportHandlers();let r=window.visualViewport;if(!r)return;let n=()=>{let o=window.innerHeight-r.height-r.offsetTop;o>50?(e.style.setProperty("--mushi-keyboard-inset",`${Math.round(o)}px`),e.classList.add("keyboard-open"),e.querySelector('textarea, input[type="text"]')?.scrollIntoView({block:"nearest",behavior:"smooth"})):(e.style.setProperty("--mushi-keyboard-inset","0px"),e.classList.remove("keyboard-open"));};r.addEventListener("resize",n,{passive:true}),r.addEventListener("scroll",n,{passive:true});let s=()=>requestAnimationFrame(n);e.addEventListener("focusin",s),this.vvCleanup=()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n),e.removeEventListener("focusin",s);};}teardownViewportHandlers(){this.vvCleanup?.(),this.vvCleanup=null;}effectiveMinLength(){let e=this.config.minDescriptionLength??20,r=this.config.locale==="auto"?typeof navigator<"u"?navigator.language??"":"":this.config.locale??"";return /^(ja|zh|ko)/i.test(r)?Math.max(4,Math.floor(e/2)):e}tierColor(e){return Dr[e]??Dr.default}renderCtx(){return {config:this.config,rewardsState:this.rewardsState,lastReportId:this.lastReportId,reporterLoading:this.reporterLoading,locale:this.locale,identifiedUser:this.identifiedUser,testerReputation:this.testerReputation,testerInfo:this.testerInfo,screenshotCapturing:this.screenshotCapturing,screenshotAttached:this.screenshotAttached,screenshotPreview:this.screenshotPreview,screenshotHint:this.resolveScreenshotHint(),screenshotAvailable:this.screenshotAvailable,elementAvailable:this.elementAvailable,reporterError:this.reporterError,magicLinkError:this.magicLinkError,elementCapturing:this.elementCapturing,submitting:this.submitting,sdkFreshness:this.sdkFreshness,screenshotError:this.screenshotError,reporterReports:this.reporterReports,magicLinkSending:this.magicLinkSending,magicLinkEmail:this.magicLinkEmail,globalLeaderboardLoading:this.globalLeaderboardLoading,globalLeaderboard:this.globalLeaderboard,elementSelected:this.elementSelected,elementError:this.elementError,crossAppLoading:this.crossAppLoading,callbacks:this.callbacks,testerJwt:this.testerJwt,submittedAt:this.submittedAt,step:this.step,selectedReportId:this.selectedReportId,selectedCategory:this.selectedCategory,sdkVersion:this.sdkVersion,reporterComments:this.reporterComments,magicLinkSent:this.magicLinkSent,leaderboardLoading:this.leaderboardLoading,leaderboardEntries:this.leaderboardEntries,lastSubmitQueuedOffline:this.lastSubmitQueuedOffline,lastSubmitScreenshotDropped:this.lastSubmitScreenshotDropped,featureBoard:this.featureBoard,crossAppReports:this.crossAppReports,allowScreenshotRemove:this.allowScreenshotRemove,unreadCount:()=>this.unreadCount(),tierColor:e=>this.tierColor(e),resolveCustomCategory:e=>this.resolveCustomCategory(e),effectiveMinLength:()=>this.effectiveMinLength(),categoryLabel:e=>this.categoryLabel(e),categoryIcon:e=>this.categoryIcon(e),assistantTurns:this.assistantTurns,assistantSending:this.assistantSending,assistantError:this.assistantError,showAllCategories:this.showAllCategories,showMoreNav:this.showMoreNav,pageFaviconHref:js()}}attachHandlers(e){let r=this.locale;eo(e),e.querySelector('[data-action="close"]')?.addEventListener("click",()=>this.close()),e.querySelector('[data-action="back"]')?.addEventListener("click",()=>{this.step==="intent"?(this.step="category",this.selectedCategory=null):this.step==="details"?this.viaFeatureRequest?(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false):(this.step="intent",this.selectedIntent=null):this.step==="reports"?this.step="category":this.step==="report-detail"?(this.step="reports",this.selectedReportId=null):this.step==="leaderboard"?this.step="reports":this.step==="roadmap"?this.step="category":this.step==="assistant"?this.step="category":this.step==="account"?this.step="category":this.step==="cross-app-reports"?this.step="account":this.step==="success"&&(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false),this.step==="category"&&(this.showAllCategories=false,this.showMoreNav=false),this.render();}),e.querySelector('[data-action="show-all-categories"]')?.addEventListener("click",()=>{this.showAllCategories=true,this.render();}),e.querySelector('[data-action="toggle-more-nav"]')?.addEventListener("click",()=>{this.showMoreNav=!this.showMoreNav,this.render();}),e.querySelector('[data-action="assistant"]')?.addEventListener("click",()=>{this.openAssistantTab();}),e.querySelectorAll('[data-action="assistant-suggest"]').forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.value;i&&this.sendAssistantMessage(i);});});{let a=e.querySelector('[data-action="assistant-send"]');if(a){let i=a.querySelector(".mushi-assistant-input");a.addEventListener("submit",l=>{l.preventDefault();let f=i?.value??"";i&&(i.value=""),this.sendAssistantMessage(f);}),i?.addEventListener("keydown",l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),a.requestSubmit());});}}e.querySelector('[data-action="reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="roadmap"]')?.addEventListener("click",()=>{this.loadFeatureBoard();}),e.querySelectorAll("[data-vote-id]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.voteId;i&&this.voteFeatureBoard(i);});}),e.querySelector('[data-action="feature-request"]')?.addEventListener("click",()=>{this.selectedCategory="other",this.selectedIntent=Fr,this.viaFeatureRequest=true,this.step="details",this.render();}),e.querySelectorAll("[data-report-id]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.reportId;i&&this.loadReporterComments(i);});}),e.querySelector('[data-action="open-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.callbacks.onLeaderboardOpen?.(),this.callbacks.onGlobalLeaderboardOpen?.(),this.render();}),e.querySelector('[data-action="open-account"]')?.addEventListener("click",()=>{this.step="account",this.render();}),e.querySelector('[data-action="open-cross-app-reports"]')?.addEventListener("click",()=>{this.step="cross-app-reports",this.crossAppLoading=true,this.crossAppReports=null,this.render(),this.callbacks.onCrossAppReportsOpen?this.callbacks.onCrossAppReportsOpen():(this.crossAppLoading=false,this.crossAppReports=[],this.render());}),e.querySelector('[data-action="open-global-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.globalLeaderboard=null,this.globalLeaderboardLoading=true,this.render(),this.callbacks.onGlobalLeaderboardOpen?this.callbacks.onGlobalLeaderboardOpen():(this.globalLeaderboardLoading=false,this.globalLeaderboard=[],this.render());}),e.querySelector('[data-action="send-magic-link"]')?.addEventListener("click",()=>{this.handleMagicLinkSend(e);}),e.querySelector('[data-action="resend-magic-link"]')?.addEventListener("click",()=>{this.magicLinkSent=false,this.magicLinkError="",this.render();}),e.querySelector('[data-action="sign-out-tester"]')?.addEventListener("click",()=>{this.testerJwt=null,this.testerInfo=null,this.testerReputation=null,this.crossAppReports=null,this.magicLinkSent=false,this.magicLinkEmail="",this.step="category",this.callbacks.onTesterSignOut?.(),this.render();}),e.querySelector('[data-action="reporter-reply"]')?.addEventListener("click",()=>{this.submitReporterReply(e);}),e.querySelector('[data-action="reporter-confirms"]')?.addEventListener("click",()=>{this.submitReporterFeedback("confirms");}),e.querySelector('[data-action="reporter-not-fixed"]')?.addEventListener("click",()=>{this.submitReporterReopen();}),e.querySelector('[data-action="view-my-reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="copy-report-id"]')?.addEventListener("click",a=>{let i=a.currentTarget,l=i.dataset.copyId;if(!l)return;let f=i.innerHTML,h=()=>{i.innerHTML="Copied \u2713",window.setTimeout(()=>{i.isConnected&&(i.innerHTML=f);},1600);};try{navigator.clipboard?.writeText?navigator.clipboard.writeText(l).then(h).catch(()=>h()):h();}catch{h();}}),e.querySelectorAll("[data-category]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.category??"other";this.selectedCategory=i;let l=this.resolveCustomCategory(i);this.step=l&&(!l.intents||l.intents.length===0)?"details":"intent",this.render();});}),e.querySelectorAll("[data-intent]").forEach(a=>{a.addEventListener("click",()=>{this.selectedIntent=a.dataset.intent??null,this.step="details",this.render();});});let n=e.querySelector(".mushi-textarea"),s=e.querySelector('[data-role="char-current"]');if(n&&s){let a=this.effectiveMinLength(),i=()=>{let l=n.value.trim().length;s.textContent=String(l);let f=e.querySelector('[data-role="char-counter"]');f&&(f.style.color=l>=a?"var(--mushi-ok, #22c55e)":"");};n.addEventListener("input",i);}e.querySelectorAll("[data-example]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.example??"";n&&(n.value=i,n.focus(),n.dispatchEvent(new Event("input")));});}),e.querySelector('[data-action="screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRequest();}),e.querySelector('[data-action="remove-screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRemove?.();}),e.querySelector('[data-action="annotate-screenshot"]')?.addEventListener("click",()=>{let a=e.querySelector('[data-role="annotate-host"]');a&&this.callbacks.onScreenshotAnnotateRequest&&this.callbacks.onScreenshotAnnotateRequest(a);}),e.querySelector('[data-action="element"]')?.addEventListener("click",()=>{this.callbacks.onElementSelectorRequest?.();});let o=()=>{let a=e.querySelector(".mushi-textarea"),i=a?.value?.trim()??"",l=e.querySelector(".mushi-error"),f=this.effectiveMinLength();if(i.length<f){if(l){let m=`${r.step3.tooShort} (${i.length}/${f})`;l.textContent=m,l.style.display="block",a?.focus();}return}this.submitting=true,this.submittedAt=new Date,this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.lastSubmitScreenshotDropped=false,this.render();let h=(async()=>{try{let m=this.selectedCategory,b=this.resolveBaseCategory(m),d=this.config.categories&&this.config.categories.length>0,v=this.callbacks.onSubmit({category:b,...d?{userCategory:m}:{},description:i,intent:this.selectedIntent??void 0});return v&&typeof v.then=="function"?await v??null:null}catch{return {reportId:null,queuedOffline:true}}})();this.successTimer=setTimeout(()=>{this.successTimer=null,this.submitting=false,this.step="success",this.render(),this.draftDescription="",h.then(m=>{if(this.step!=="success")return;m&&(this.lastReportId=m.reportId??null,this.lastSubmitQueuedOffline=!!m.queuedOffline,this.lastSubmitScreenshotDropped=!!m.screenshotDropped,this.render()),this.autoCloseTimer!==null&&clearTimeout(this.autoCloseTimer);let b=this.lastReportId&&this.config.dashboardUrl?6e3:2800;this.autoCloseTimer=setTimeout(()=>{this.autoCloseTimer=null,this.step==="success"&&this.close();},b);});},500);};e.querySelector('[data-action="submit"]')?.addEventListener("click",o),e.addEventListener("keydown",a=>{if(a.key==="Escape"){this.close();return}this.step==="details"&&Zs(a)&&(a.preventDefault(),o());});}trapFocus(e){requestAnimationFrame(()=>{let r=e.querySelector("textarea");if(r){r.focus();return}let n=e.querySelectorAll("button, textarea, [tabindex]");n.length>0&&n[0].focus();});}unreadCount(){return this.reporterReports.reduce((e,r)=>e+(r.unread_count??0),0)}async loadFeatureBoard(){this.step="roadmap",this.reporterLoading=true,this.reporterError=null,this.render();try{this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load community ideas.";}finally{this.reporterLoading=false,this.render();}}async voteFeatureBoard(e){if(!(!this.callbacks.onFeatureBoardVote||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onFeatureBoardVote(e),this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??this.featureBoard;}catch(r){this.reporterError=r instanceof Error?r.message:"Could not update vote.";}finally{this.reporterLoading=false,this.render();}}}async submitReporterReopen(){let e=this.selectedReportId;if(!(!e||this.reporterLoading)){this.reporterLoading=true,this.render();try{this.callbacks.onReporterReopen?await this.callbacks.onReporterReopen(e,"Not fixed for me"):await this.callbacks.onReporterFeedback?.(e,"not_fixed","Not fixed for me"),await this.loadReporterReports();}catch(r){this.reporterError=r instanceof Error?r.message:"Could not reopen report.";}finally{this.reporterLoading=false,this.render();}}}async refreshReporterInboxQuiet(){try{if(this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[],!this.isOpen)return;this.step==="reports"?this.render():this.updateReportsBadgeText();}catch{}}updateReportsBadgeText(){let e=this.shadow.querySelector(".mushi-reports-entry .mushi-option-label");if(!e)return;let r=this.locale.step1.moreNav,n=this.unreadCount();e.textContent=n?`${r.yourReports} (${n} ${r.unreadNew})`:r.yourReports;}async loadReporterReports(){this.step="reports",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load reports.";}finally{this.reporterLoading=false,this.render();}}async loadReporterComments(e){this.selectedReportId!==e&&(this.draftReply=""),this.selectedReportId=e,this.step="report-detail",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterComments=await this.callbacks.onReporterCommentsRequest?.(e)??[];}catch(r){this.reporterError=r instanceof Error?r.message:"Could not load thread.";}finally{this.reporterLoading=false,this.render();}}async submitReporterFeedback(e){let r=this.selectedReportId;if(!(!r||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onReporterFeedback?.(r,e),await this.loadReporterReports(),r&&await this.loadReporterComments(r);}catch(n){this.reporterError=n instanceof Error?n.message:"Could not send feedback.",this.reporterLoading=false,this.render();}}}async submitReporterReply(e){let r=this.selectedReportId,n=e.querySelector('[data-role="reporter-reply"]'),s=e.querySelector('[data-action="reporter-reply"]'),o=n?.value.trim()??"";if(!(!r||!o||this.reporterLoading)){this.reporterLoading=true,s&&(s.disabled=true),this.render();try{await this.callbacks.onReporterReply?.(r,o),n&&(n.value=""),this.draftReply="",await this.loadReporterComments(r);}catch(a){this.reporterError=a instanceof Error?a.message:"Could not send reply.",this.reporterLoading=false,this.render();}}}async handleMagicLinkSend(e){if(this.magicLinkSending)return;let n=(e.querySelector('[data-role="magic-link-email"]')?.value??this.magicLinkEmail).trim();if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){this.magicLinkError="Please enter a valid email address.",this.render();return}this.magicLinkEmail=n,this.magicLinkError="",this.magicLinkSending=true,this.render();try{await this.callbacks.onMushiSignIn?.(n),this.magicLinkSent=!0;}catch(s){this.magicLinkError=s instanceof Error?s.message:"Could not send sign-in link. Try again.";}finally{this.magicLinkSending=false,this.render();}}getRecorderStep(){return this.step}getRecorderCategoryStepIA(){return {sectionLabel:this.shadow.querySelector(".mushi-section-label")?.textContent?.trim()??"",moreToggle:!!this.shadow.querySelector('[data-action="toggle-more-nav"]'),footerStepIndicators:this.shadow.querySelectorAll(".mushi-step-indicator").length}}getRecorderTrigger(){return this.shadow.querySelector(".mushi-trigger")}getRecorderCategoryButton(e){return this.shadow.querySelector(`[data-category="${e}"]`)}getRecorderIntentButton(e){return Array.from(this.shadow.querySelectorAll("[data-intent]")).find(r=>r.dataset.intent===e)??null}getRecorderSubmitButton(){return this.shadow.querySelector('[data-action="submit"]')}recorderClickTrigger(){this.isOpen&&this.close(),this.open();}openReporter(){this.isOpen||(this.isOpen=true,this.render()),this.loadReporterReports();}recorderSelectCategory(e){this.isOpen||this.open(),this.step!=="category"&&(this.selectedCategory=null,this.selectedIntent=null,this.step="category",this.render()),this.selectedCategory=e,this.step="intent",this.render();}recorderSelectIntent(e){!this.isOpen||this.step!=="intent"||(this.selectedIntent=e,this.step="details",this.render());}recorderFocusDescription(){this.shadow.querySelector(".mushi-textarea")?.focus();}recorderSubmit(){this.shadow.querySelector('[data-action="submit"]')?.click();}recorderOpenMyReports(){this.isOpen||this.open(),this.loadReporterReports();}};function Za(t,e){let r={...t};if(e)for(let[n,s]of Object.entries(e))s!==void 0&&(r[n]=s);return r}function oo(t,e){let r=e.native?.triggerMode,n=e.widget?.launcher,s=t.widget?.trigger,o=n??e.widget?.trigger,i=(o==="auto"&&s&&s!=="auto"?void 0:o)??(r==="none"||r==="shake"?"manual":void 0),l=n==="hidden"||e.widget?.trigger==="hidden",f=i==="hidden"&&!l&&s&&s!=="hidden"?s:i,h=e.widget,m=h?.bannerVariant,b=h?.bannerPosition,d=h?.bannerMessage,v=h?.bannerLabel,x=h?.bannerBugCta,C=h?.bannerFeatureCta,I=m||b||d!=null||v!=null||x!=null||C!=null?{...t.widget?.bannerConfig??{},...m?{variant:m}:{},...b?{position:b}:{},...d!=null?{message:d}:{},...v!=null?{label:v===""?false:v}:{},...x!=null?{bugCta:x??void 0}:{},...C!=null?{featureCta:C}:{}}:void 0,T={};if(e.widget)for(let[E,w]of Object.entries(e.widget))E==="trigger"||E==="launcher"||w!=null&&(T[E]=w);return {...t,widget:{...t.widget,...T,...f?{trigger:f}:{},...I?{bannerConfig:I}:{},...t.widget?.betaMode?{betaMode:t.widget.betaMode}:{}},capture:Za(t.capture,e.capture),privacy:{...t.privacy}}}function sr(t){if(!t)return null;let e=t.getBoundingClientRect();return e.width===0&&e.height===0?null:{x:e.left+e.width/2,y:e.top+e.height/2}}function io(t){if(typeof globalThis>"u")return;let e={ready:()=>t.getIsMounted(),getStep:()=>t.getRecorderStep(),getCategoryStepIA:()=>t.getRecorderCategoryStepIA(),getTriggerCenter:()=>sr(t.getRecorderTrigger()),getCategoryCenter:r=>sr(t.getRecorderCategoryButton(r)),getIntentCenter:r=>sr(t.getRecorderIntentButton(r)),getSubmitCenter:()=>sr(t.getRecorderSubmitButton()),clickTrigger:()=>t.recorderClickTrigger(),selectCategory:r=>t.recorderSelectCategory(r),selectIntent:r=>t.recorderSelectIntent(r),focusDescription:()=>t.recorderFocusDescription(),submit:()=>t.recorderSubmit(),openMyReports:()=>t.recorderOpenMyReports()};globalThis.__mushiRecorder=e;}var Wr=null,zr=null,wt=null,St=null,Et=null,kt=null,Rt=null,or=false,Ye=new Set;function Qa(){for(let t of Ye)try{t.onPush?.();}catch{}}function el(){for(let t of Ye)try{t.onReplace?.();}catch{}}function tl(){for(let t of Ye)try{t.onPop?.();}catch{}}function rl(){or||typeof window>"u"||(wt=History.prototype.pushState,St=History.prototype.replaceState,Wr=wt.bind(history),zr=St.bind(history),Et=function(...e){let n=(Wr??History.prototype.pushState.bind(history))(...e);return Qa(),n},kt=function(...e){let n=(zr??History.prototype.replaceState.bind(history))(...e);return el(),n},history.pushState=Et,history.replaceState=kt,Rt=()=>tl(),window.addEventListener("popstate",Rt),or=true);}function ao(){!or||typeof window>"u"||(Rt&&(window.removeEventListener("popstate",Rt),Rt=null),Et&&history.pushState===Et&&wt&&(history.pushState=wt),kt&&history.replaceState===kt&&St&&(history.replaceState=St),Et=null,kt=null,Wr=null,zr=null,wt=null,St=null,or=false);}function Te(t){return rl(),Ye.add(t),()=>{Ye.delete(t),Ye.size===0&&ao();}}function lo(){Ye.clear(),ao();}var nl=3e4,sl=3e5,ol=6e4,il=60,po="mushi_session_min_day_",at=[],lt=null,ct=null,Be=null,ho=null,Vr=null,ut=null,je=false,Tt=null,fo=0,al=300*1e3,Yr=0,ll=900*1e3;function Xr(){return Date.now()<Yr}function Jr(t){t?.startsWith("HTTP_4")&&(Yr=Date.now()+ll);}var co=new Set;function Kr(t){return `mushi_rewards_consent_${t}`}function cl(t){try{return localStorage.getItem(Kr(t))==="1"}catch{return false}}function Gr(t,e){try{e?localStorage.setItem(Kr(t),"1"):localStorage.removeItem(Kr(t)),je=e;}catch{}}function mo(){return new Date().toISOString().slice(0,10)}function go(t){try{let e=sessionStorage.getItem(`${po}${t}_${mo()}`);return e?parseInt(e,10):0}catch{return 0}}function ul(t){let e=mo(),r=`${po}${t}_${e}`;try{let n=go(t)+1;return sessionStorage.setItem(r,String(n)),n}catch{return 99}}function bo(t){ut=t.client,Be=t.userId,ho=t.traits??null,Vr=t.reporterToken??null;let{projectId:e}=t,r=Math.max(nl,t.config.flushIntervalMs??sl);t.config.consentMode==="auto"?(je=true,Gr(e,true)):je=cl(e),t.config.trackActivity&&pl(e),lt&&clearInterval(lt),lt=setInterval(()=>dl(t),r),ct&&clearInterval(ct),ct=setInterval(()=>{if(!je||!Be)return;let n=go(e);n<il&&(ul(e),dt({action:"session_minute",metadata:{minutes_today:n+1}}));},ol),t.config.showInWidget&&Zr(Be).then(n=>{n&&So(n,t.config);}),t.config.consentMode!=="auto"&&!je&&fl(e,t.config);}function dt(t){!je||!Be||at.push({...t,queuedAt:Date.now()});}async function dl(t){if(!je||!Be||at.length===0)return;let e=null;if(t.config.verifyUserToken)try{e=await t.config.verifyUserToken();}catch{}if(Xr())return;let r=at.splice(0,100);try{let n=Vr?await Ir(Vr):void 0,s=await t.client.submitActivity(Be,r,{userTraits:ho??void 0,reporterTokenHash:n,optedIn:!0,hostJwt:e??void 0});s.ok||(Jr(s.error?.code),s.error?.code?.startsWith("HTTP_4")||at.unshift(...r.slice(0,50)));}catch{at.unshift(...r.slice(0,50));}}async function yo(t){let e=Date.now();return Tt&&e-fo<al?Tt:Zr(t)}async function Zr(t){if(!ut||Xr())return null;let e=await ut.getMyTier(t);return e.ok&&e.data?(Tt=e.data,fo=Date.now(),Tt):(Jr(e.error?.code),null)}async function vo(t=10){if(!ut||Xr())return null;try{let e=await ut.getHallOfFame(t);return e.ok&&e.data?(e.data.data??[]).map(r=>({display_name:r.display_name,tier_name:r.tier_name,total_points:r.total_points,points_30d:r.points_30d})):(Jr(e.error?.code),null)}catch{return null}}function xo(){lt&&(clearInterval(lt),lt=null),ct&&(clearInterval(ct),ct=null),wo(),hl(),be&&(be.remove(),be=null),at=[],Be=null,ut=null,je=false,Tt=null,Yr=0;}var ar=null,Ct=null,lr=null,uo="",ir=false;function pl(t){if(ir&&lr)return;ir&&wo(),ir=true;let e=()=>{let n=location.pathname;if(n===uo)return;uo=n,!co.has(`${t}:${n}`)&&(co.add(`${t}:${n}`),dt({action:"screen_view_unique_per_day",metadata:{route:n}}));};lr=Te({onPush:e,onPop:e}),e(),ar=new MutationObserver(()=>e());let r=document.querySelector("main")??document.body;ar.observe(r,{childList:true,subtree:false}),Ct=n=>{let s=n.target.closest("[data-testid]");if(!s)return;let o=s.dataset.testid;o&&dt({action:"element_selected",metadata:{testid:o,route:location.pathname}});},document.addEventListener("click",Ct,{capture:true,passive:true});}function wo(){ir=false,lr?.(),lr=null,ar?.disconnect(),ar=null,Ct&&(document.removeEventListener("click",Ct,{capture:true}),Ct=null);}var Oe=null;function So(t,e){if(!e.showInWidget)return;Oe&&Oe.remove(),Oe=document.createElement("div"),Oe.id="mushi-tier-badge",Object.assign(Oe.style,{position:"fixed",bottom:"56px",right:"16px",zIndex:"2147483645",fontFamily:"system-ui, sans-serif"});let r=Oe.attachShadow({mode:"closed"});r.innerHTML=`
2250
+ `,n.textContent=this.locale.step3.tooShort.startsWith("A bit")?"Found a bug? One sentence is enough \u{1F41B}":"\u30D0\u30B0\u3092\u898B\u3064\u3051\u305F\uFF1F\u4E00\u884C\u3067\u5927\u4E08\u592B\u3067\u3059 \u{1F41B}",document.body.appendChild(n),this.nudgeEl=n,this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),5e3);}removeNudge(){this.nudgeTimer!==null&&(clearTimeout(this.nudgeTimer),this.nudgeTimer=null),this.nudgeEl?.remove(),this.nudgeEl=null,document.getElementById("mushi-nudge-bubble")?.remove();}setSdkFreshness(e){this.sdkFreshness=e,this.isOpen&&this.render();}setRewardsState(e){this.rewardsState=e,this.isOpen&&this.render();}setLeaderboard(e,r=false){this.leaderboardEntries=e,this.leaderboardLoading=r,this.isOpen&&this.step==="leaderboard"&&this.render();}setIdentifiedUser(e){this.identifiedUser=e,this.isOpen&&this.render();}setTesterSession(e,r){this.testerJwt=e,this.testerInfo=r,this.isOpen&&this.render();}setGlobalLeaderboard(e,r=false){this.globalLeaderboard=e,this.globalLeaderboardLoading=r,this.isOpen&&(this.step==="leaderboard"||this.step==="account")&&this.render();}setCrossAppReports(e,r=false){this.crossAppReports=e,this.crossAppLoading=r,this.isOpen&&this.step==="cross-app-reports"&&this.render();}setTesterReputation(e){this.testerReputation=e,this.isOpen&&(this.step==="account"||this.step==="leaderboard")&&this.render();}destroy(){this.successTimer!==null&&(clearTimeout(this.successTimer),this.successTimer=null),this.autoCloseTimer!==null&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.smartHideTimer!==null&&(clearTimeout(this.smartHideTimer),this.smartHideTimer=null),this.unbindColorSchemeListener(),this.smartHideCleanup?.(),this.smartHideCleanup=null,this.teardownViewportHandlers(),this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],this.removeSelectorHint(),this.removeNudge(),this.removeBodyNudge(),this.host.remove();}bindColorSchemeListener(){if(this.unbindColorSchemeListener(),typeof window>"u"||!window.matchMedia)return;let e=this.config.theme;e!=="auto"&&e!=="inherit"||(this.colorSchemeMq=window.matchMedia("(prefers-color-scheme: dark)"),this.onColorSchemeChange=()=>{this.host.isConnected&&this.render();},typeof this.colorSchemeMq.addEventListener=="function"?this.colorSchemeMq.addEventListener("change",this.onColorSchemeChange):typeof this.colorSchemeMq.addListener=="function"&&this.colorSchemeMq.addListener(this.onColorSchemeChange));}unbindColorSchemeListener(){this.colorSchemeMq&&this.onColorSchemeChange&&(typeof this.colorSchemeMq.removeEventListener=="function"?this.colorSchemeMq.removeEventListener("change",this.onColorSchemeChange):typeof this.colorSchemeMq.removeListener=="function"&&this.colorSchemeMq.removeListener(this.onColorSchemeChange)),this.colorSchemeMq=null,this.onColorSchemeChange=null;}syncHostChromeState(){let e=this.host.style;e.setProperty("position","fixed"),e.setProperty("top","0"),e.setProperty("left","0"),e.setProperty("width","0"),e.setProperty("height","0"),e.setProperty("overflow","visible"),e.setProperty("pointer-events","none"),e.setProperty("z-index",String(this.config.zIndex)),e.setProperty("margin","0"),e.setProperty("padding","0"),e.setProperty("border","none"),e.setProperty("background","none");}isSuppressedByHost(){if(!this.config.hideOnSelector||typeof document>"u")return false;try{return !!document.querySelector(this.config.hideOnSelector)}catch{return false}}getWidgetDiagnostics(){let e=this.host.style,r=e.pointerEvents==="none"&&(e.width==="0"||e.width==="0px")&&(e.height==="0"||e.height==="0px"),n=this.host.isConnected?{width:this.host.offsetWidth,height:this.host.offsetHeight}:null,s=this.isSuppressedByHost()||this.isRouteHidden()||!this.triggerVisible,o=this.config.trigger==="banner"&&!this.bannerDismissed&&!this.isSuppressedByHost()&&!this.isRouteHidden()&&this.triggerVisible;return {widgetHostPointerSafe:r,widgetHostBounds:n,widgetSuppressed:s,bannerRendered:o}}syncAttachedLaunchers(){this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],!(this.config.trigger!=="attach"||!this.config.attachToSelector)&&(typeof document>"u"||this.attachedLaunchers.push(this.attachTo(this.config.attachToSelector)));}syncSmartHide(){if(this.smartHideCleanup?.(),this.smartHideCleanup=null,this.triggerShrunk=false,this.triggerHiddenByScroll=false,!this.config.smartHide||typeof window>"u")return;let e=this.config.smartHide===true?{onScroll:"shrink",onIdleMs:900}:this.config.smartHide;if(!e.onScroll)return;let r=()=>{e.onScroll==="hide"?this.triggerHiddenByScroll=true:this.triggerShrunk=true,this.render(),this.smartHideTimer!==null&&clearTimeout(this.smartHideTimer),this.smartHideTimer=setTimeout(()=>{this.triggerHiddenByScroll=false,this.triggerShrunk=false,this.render();},e.onIdleMs??900);};window.addEventListener("scroll",r,{passive:true}),this.smartHideCleanup=()=>window.removeEventListener("scroll",r);}shouldRenderTrigger(){if(!this.triggerVisible||this.triggerHiddenByScroll||this.config.trigger==="manual"||this.config.trigger==="hidden"||this.config.trigger==="attach"||this.config.trigger==="banner"||this.isMobileSmartHidden()||this.isRouteHidden()||this.isSuppressedByHost())return false;let e=this.config.environments[this.detectEnvironment()];return e!=="never"&&e!=="manual"}static BANNER_HEIGHT=36;static BODY_NUDGE_PROP="--mushi-banner-offset";applyBodyNudge(e,r=t.BANNER_HEIGHT){let n=`${r}px`;document.documentElement.style.setProperty(t.BODY_NUDGE_PROP,n),e==="top"?document.body.dataset.mushiBannerNudged==="top"?document.body.style.paddingTop=n:document.body.style.paddingTop||(document.body.style.paddingTop=n,document.body.dataset.mushiBannerNudged="top"):document.body.dataset.mushiBannerNudged==="bottom"?document.body.style.paddingBottom=n:document.body.style.paddingBottom||(document.body.style.paddingBottom=n,document.body.dataset.mushiBannerNudged="bottom");}trackBannerHeight(e,r){let n=()=>{let s=e.getBoundingClientRect().height;s>0&&this.applyBodyNudge(r,s);};requestAnimationFrame(n),typeof ResizeObserver<"u"&&(this.bannerResizeObserver=new ResizeObserver(n),this.bannerResizeObserver.observe(e));}removeBodyNudge(){this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,document.documentElement.style.removeProperty(t.BODY_NUDGE_PROP);let e=document.body.dataset.mushiBannerNudged;e==="top"?(document.body.style.paddingTop="",delete document.body.dataset.mushiBannerNudged):e==="bottom"&&(document.body.style.paddingBottom="",delete document.body.dataset.mushiBannerNudged);}renderBanner(){if(this.config.trigger!=="banner")return;if(this.bannerDismissed){this.removeBodyNudge();return}if(!this.triggerVisible){this.removeBodyNudge();return}if(this.isRouteHidden()){this.removeBodyNudge();return}if(this.isSuppressedByHost()){this.removeBodyNudge();return}let e=this.config.bannerConfig??{},r=e.variant??"brand",n=e.position??"top",s=e.message?.trim()??"",o=s.length>0,a=e.bugCta??"\u{1F41B} Report a bug",i=e.featureCta!==false,l=e.featureCtaLabel??"Request feature",f=e.zIndex??(this.config.zIndex??99999)-1,h=document.createElement("div");h.className=`mushi-banner ${r} ${n}${o?" mushi-banner--rich":""}`,h.style.setProperty("--mushi-banner-z",String(f)),h.setAttribute("role","banner");let m=document.createElement("button");if(m.className="mushi-banner-dismiss",m.textContent="\u2715",m.setAttribute("aria-label","Dismiss feedback banner"),m.addEventListener("click",()=>{this.bannerDismissed=true,this.removeBodyNudge(),this.render();}),o){let b=document.createElement("div");b.className="mushi-banner-body";let d=e.label===false?null:e.label??"Beta";if(d){let T=document.createElement("span");T.className="mushi-banner-pill",T.textContent=d,b.appendChild(T);}let x=document.createElement("span");x.className="mushi-banner-message",x.textContent=s,b.appendChild(x),h.appendChild(b);let v=document.createElement("nav");v.className="mushi-banner-actions",v.setAttribute("aria-label","Feedback banner actions");let C=(T=false)=>{let E=document.createElement("span");E.className=`mushi-banner-divider${T?" mushi-banner-extra":""}`,E.setAttribute("aria-hidden","true"),E.textContent="|",v.appendChild(E);},$=(T,E,w=false)=>{let u=document.createElement("button");u.type="button",u.className=`mushi-banner-link${w?" mushi-banner-extra":""}`,u.textContent=T,u.addEventListener("click",E),v.appendChild(u);};$(a,()=>this.open()),i&&(C(true),$(l,()=>this.open({featureRequest:true}),true));for(let T of e.links??[]){let E=T.label?.trim();if(!E)continue;let w=T.href&&(/^https?:\/\//i.test(T.href)||T.href.startsWith("/"))?T.href:void 0;if(C(true),w){let u=document.createElement("a");u.className="mushi-banner-link mushi-banner-extra",u.href=w,u.textContent=E,u.target="_blank",u.rel="noopener noreferrer",v.appendChild(u);}else $(E,()=>{T.featureRequest?this.open({featureRequest:true}):this.open();},true);}C(true),$("\u{1F4EC} My reports",()=>this.openReporter(),true),h.appendChild(v),h.appendChild(m);}else {let b=document.createElement("button");if(b.className="mushi-banner-btn",b.textContent=a,b.addEventListener("click",()=>this.open()),h.appendChild(b),i){let x=document.createElement("button");x.className="mushi-banner-btn",x.textContent=l,x.addEventListener("click",()=>this.open({featureRequest:true})),h.appendChild(x);}let d=document.createElement("button");d.className="mushi-banner-my-reports",d.textContent="\u{1F4EC} My reports",d.setAttribute("aria-label","View my submitted reports"),d.addEventListener("click",()=>this.openReporter()),h.appendChild(d),h.appendChild(m);}this.shadow.appendChild(h),this.applyBodyNudge(n),this.trackBannerHeight(h,n);}effectiveTrigger(){if(!this.config.smartHide||typeof window>"u")return this.config.trigger;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="edge-tab"?"edge-tab":this.config.trigger}isMobileSmartHidden(){if(!this.config.smartHide||typeof window>"u")return false;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="hide"}detectEnvironment(){let e=typeof location<"u"?location.hostname:"";return e==="localhost"||e==="127.0.0.1"||e.endsWith(".local")?"development":/\b(staging|stage|preview|dev)\b/i.test(e)?"staging":"production"}isRouteHidden(){return !this.config.hideOnRoutes.length||typeof location>"u"?false:this.config.hideOnRoutes.some(e=>location.pathname.includes(e))}getTheme(){let e=this.config.theme;if(e==="light"||e==="dark")return e;if(e==="inherit"){let r=document.documentElement,n=r.getAttribute("data-color-scheme")||r.getAttribute("data-theme")||r.getAttribute("color-scheme")||"";if(/dark/i.test(n))return "dark";if(/light/i.test(n))return "light";if(r.classList.contains("dark"))return "dark";if(r.classList.contains("light"))return "light";try{let o=getComputedStyle(r).backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return .299*+o[1]+.587*+o[2]+.114*+o[3]<128?"dark":"light"}catch{}}return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}captureFormDrafts(){let e=this.shadow.querySelector('textarea.mushi-textarea:not([data-role="reporter-reply"])'),r=this.shadow.querySelector('[data-role="magic-link-email"]'),n=this.shadow.querySelector('textarea[data-role="reporter-reply"]');e&&(this.draftDescription=e.value),r&&(this.draftEmail=r.value),n&&(this.draftReply=n.value);let s=this.shadow.activeElement;if(this.draftFocus=s&&s===e?"description":s&&s===r?"email":s&&s===n?"reply":null,this.draftFocus&&s){let o=s;this.draftSelStart=o.selectionStart??o.value.length,this.draftSelEnd=o.selectionEnd??o.value.length;}}restoreFormDrafts(e){let r=[{selector:'textarea.mushi-textarea:not([data-role="reporter-reply"])',value:this.draftDescription,key:"description"},{selector:'[data-role="magic-link-email"]',value:this.draftEmail,key:"email"},{selector:'textarea[data-role="reporter-reply"]',value:this.draftReply,key:"reply"}];for(let n of r){let s=e.querySelector(n.selector);if(s&&(n.value&&s.value!==n.value&&(s.value=n.value,s.dispatchEvent(new Event("input"))),this.draftFocus===n.key)){let o=()=>{s.focus();try{s.setSelectionRange(this.draftSelStart,this.draftSelEnd);}catch{}};typeof requestAnimationFrame=="function"?requestAnimationFrame(o):o();}}}clearFormDrafts(){this.draftDescription="",this.draftEmail="",this.draftReply="",this.draftFocus=null,this.draftSelStart=0,this.draftSelEnd=0;}render(){let e=this.getTheme(),r=this.config.position,n=this.locale;this.isOpen&&this.captureFormDrafts(),this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,this.shadow.innerHTML="";let s=document.createElement("style");if(s.textContent=co(e,this.config.accent??"",this.config.accentText??""),this.shadow.appendChild(s),this.renderBanner(),this.shouldRenderTrigger()){let a=this.effectiveTrigger(),i=document.createElement("button");if(i.className=`mushi-trigger ${r}${a==="edge-tab"?" edge-tab":""}${this.triggerShrunk?" shrunk":""}`,i.textContent=this.config.triggerText,i.setAttribute("aria-label",n.widget.trigger),i.setAttribute("aria-haspopup","dialog"),i.setAttribute("aria-expanded",String(this.isOpen)),i.style.zIndex=String(this.config.zIndex),this.applyInsetVars(i),i.addEventListener("click",()=>{this.removeNudge(),this.isOpen?this.close():this.open();}),i.addEventListener("mouseenter",()=>{let l=this.mountedAt?Date.now()-this.mountedAt:0;!this.nudgeShown&&!this.isOpen&&l>=3e4&&this.showNudge();}),i.addEventListener("mouseleave",()=>{this.nudgeEl&&(this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),2e3));}),i.addEventListener("keydown",l=>{let f=this.config.draggable;if(!f)return;let h=8,m=typeof f=="object"?f.axis??"both":"both",b=0,d=0;if(m!=="y"&&(l.key==="ArrowLeft"?b=-h:l.key==="ArrowRight"&&(b=h)),m!=="x"&&(l.key==="ArrowUp"?d=-h:l.key==="ArrowDown"&&(d=h)),b!==0||d!==0){l.preventDefault();let x=this.fabPos??{x:0,y:0};this.moveFab(i,x.x+b,x.y+d,false);}}),this.config.draggable&&this.attachDragHandlers(i),this.shadow.appendChild(i),this.fabPos&&this.config.draggable){let l=this.fabPos;this.fabPos={x:0,y:0},this.moveFab(i,l.x,l.y,false);}}let o=document.createElement("div");if(o.className=`mushi-panel ${r}${this.isOpen?" open":" closed"}`,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label",n.widget.title),o.style.zIndex=String(this.config.zIndex+1),this.applyInsetVars(o),this.isOpen){let a=this.renderCtx();o.innerHTML=`${xo(a)}${vo(a)}${wo(a)}`,this.shadow.appendChild(o),this.attachHandlers(o),this.trapFocus(o),this.restoreFormDrafts(o),this.attachViewportHandlers(o);}else this.teardownViewportHandlers();}computeAvoidTopPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let a=o.getBoundingClientRect();a.bottom>n&&a.width>0&&a.height>0&&(n=a.bottom);}catch{}return n>0?Math.ceil(n)+e:null}computeAvoidBottomPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let a=o.getBoundingClientRect();if(a.width>0&&a.height>0){let i=window.innerHeight-a.top+e;i>n&&(n=i);}}catch{}return n>0?Math.ceil(n):null}applyInsetVars(e){let{anchor:r}=this.config;if(r&&Object.keys(r).length>0)["top","right","bottom","left"].forEach(o=>{let a=r[o];a!==void 0&&e.style.setProperty(`--mushi-${o}`,a);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");else {let{inset:o}=this.config;this.config.respectSafeArea||["top","right","bottom","left"].forEach(a=>{o[a]===void 0&&e.style.setProperty(`--mushi-${a}`,"24px");}),["top","right","bottom","left"].forEach(a=>{let i=o[a];i!==void 0&&e.style.setProperty(`--mushi-${a}`,i==="auto"?"auto":`${i}px`);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");}let n=r?.top!==void 0||this.config.position?.startsWith("top"),s=r?.bottom!==void 0||this.config.position?.startsWith("bottom")||!this.config.position;if(n){let o=this.computeAvoidTopPx();o!==null&&e.style.setProperty("--mushi-top",`${o}px`);}if(s){let o=this.computeAvoidBottomPx();o!==null&&e.style.setProperty("--mushi-bottom",`${o}px`);}}fabStorageKey(){let e=this.config.projectId??"";return `mushi_fab_pos${e?`_${e}`:""}`}moveFab(e,r,n,s){let o=(()=>{let W=this.config.draggable;return W&&typeof W=="object"?W.axis??"both":"both"})(),a=window.innerWidth,i=window.innerHeight,l=e.offsetWidth||52,f=e.offsetHeight||52,h=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-left")||"0")||0,m=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-right")||"0")||0,b=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-top")||"0")||0,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-bottom")||"0")||0,x=8,v=e.getBoundingClientRect(),C=this.fabPos?.x??0,$=this.fabPos?.y??0,T=v.left-C,E=v.top-$,w=h+x-T,u=a-m-x-l-T,S=b+x-E,k=i-d-x-f-E,A=o==="y"?0:Math.max(w,Math.min(u,r)),y=o==="x"?0:Math.max(S,Math.min(k,n)),B=A;if(s){let W=this.config.draggable;(W===true||typeof W=="object"&&(W.snapToEdge??true))&&o!=="y"&&(B=v.left+l/2<a/2?h+x-T:a-m-x-l-T);}this.fabPos={x:B,y},e.style.setProperty("--mushi-drag-x",`${B}px`),e.style.setProperty("--mushi-drag-y",`${y}px`),e.style.setProperty("--mushi-drag-active","1");let Z=this.config.draggable;if(Z===true||typeof Z=="object"&&(Z.persist??true))try{localStorage.setItem(this.fabStorageKey(),JSON.stringify(this.fabPos));}catch{}}loadFabPos(){let e=this.config.draggable;if(!(!e||!(e===true||typeof e=="object"&&(e.persist??true))))try{let n=localStorage.getItem(this.fabStorageKey());if(n){let s=JSON.parse(n);typeof s?.x=="number"&&typeof s?.y=="number"&&(this.fabPos=s);}}catch{}}attachDragHandlers(e){this.fabPos===null&&this.loadFabPos();let r=0,n=0,s=0,o=0,a=false,i=false,l=b=>{if(b.button!==0&&b.pointerType!=="touch")return;e.setPointerCapture(b.pointerId),r=b.clientX,n=b.clientY;let d=this.fabPos??{x:0,y:0};s=d.x,o=d.y,a=true,i=false;},f=6,h=b=>{if(!a)return;let d=b.clientX-r,x=b.clientY-n;!i&&Math.hypot(d,x)>f&&(i=true,e.classList.add("dragging"),e.setAttribute("aria-grabbed","true")),i&&(b.preventDefault(),this.moveFab(e,s+d,o+x,false));},m=b=>{if(a){if(a=false,e.classList.remove("dragging"),e.removeAttribute("aria-grabbed"),i){let d=b.clientX-r,x=b.clientY-n;this.moveFab(e,s+d,o+x,true);let v=C=>{C.stopImmediatePropagation(),e.removeEventListener("click",v,{capture:true});};e.addEventListener("click",v,{capture:true});}i=false;}};e.addEventListener("pointerdown",l),e.addEventListener("pointermove",h),e.addEventListener("pointerup",m),e.addEventListener("pointercancel",m);}attachViewportHandlers(e){this.teardownViewportHandlers();let r=window.visualViewport;if(!r)return;let n=()=>{let o=window.innerHeight-r.height-r.offsetTop;o>50?(e.style.setProperty("--mushi-keyboard-inset",`${Math.round(o)}px`),e.classList.add("keyboard-open"),e.querySelector('textarea, input[type="text"]')?.scrollIntoView({block:"nearest",behavior:"smooth"})):(e.style.setProperty("--mushi-keyboard-inset","0px"),e.classList.remove("keyboard-open"));};r.addEventListener("resize",n,{passive:true}),r.addEventListener("scroll",n,{passive:true});let s=()=>requestAnimationFrame(n);e.addEventListener("focusin",s),this.vvCleanup=()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n),e.removeEventListener("focusin",s);};}teardownViewportHandlers(){this.vvCleanup?.(),this.vvCleanup=null;}effectiveMinLength(){let e=this.config.minDescriptionLength??20,r=this.config.locale==="auto"?typeof navigator<"u"?navigator.language??"":"":this.config.locale??"";return /^(ja|zh|ko)/i.test(r)?Math.max(4,Math.floor(e/2)):e}tierColor(e){return Yr[e]??Yr.default}renderCtx(){return {config:this.config,rewardsState:this.rewardsState,lastReportId:this.lastReportId,reporterLoading:this.reporterLoading,locale:this.locale,identifiedUser:this.identifiedUser,testerReputation:this.testerReputation,testerInfo:this.testerInfo,screenshotCapturing:this.screenshotCapturing,screenshotAttached:this.screenshotAttached,screenshotPreview:this.screenshotPreview,screenshotHint:this.resolveScreenshotHint(),screenshotAvailable:this.screenshotAvailable,elementAvailable:this.elementAvailable,reporterError:this.reporterError,magicLinkError:this.magicLinkError,elementCapturing:this.elementCapturing,submitting:this.submitting,sdkFreshness:this.sdkFreshness,screenshotError:this.screenshotError,reporterReports:this.reporterReports,magicLinkSending:this.magicLinkSending,magicLinkEmail:this.magicLinkEmail,globalLeaderboardLoading:this.globalLeaderboardLoading,globalLeaderboard:this.globalLeaderboard,elementSelected:this.elementSelected,elementError:this.elementError,crossAppLoading:this.crossAppLoading,callbacks:this.callbacks,testerJwt:this.testerJwt,submittedAt:this.submittedAt,step:this.step,selectedReportId:this.selectedReportId,selectedCategory:this.selectedCategory,sdkVersion:this.sdkVersion,reporterComments:this.reporterComments,magicLinkSent:this.magicLinkSent,leaderboardLoading:this.leaderboardLoading,leaderboardEntries:this.leaderboardEntries,lastSubmitQueuedOffline:this.lastSubmitQueuedOffline,lastSubmitFailureKind:this.lastSubmitFailureKind,lastSubmitScreenshotDropped:this.lastSubmitScreenshotDropped,featureBoard:this.featureBoard,crossAppReports:this.crossAppReports,allowScreenshotRemove:this.allowScreenshotRemove,unreadCount:()=>this.unreadCount(),tierColor:e=>this.tierColor(e),resolveCustomCategory:e=>this.resolveCustomCategory(e),effectiveMinLength:()=>this.effectiveMinLength(),categoryLabel:e=>this.categoryLabel(e),categoryIcon:e=>this.categoryIcon(e),assistantTurns:this.assistantTurns,assistantSending:this.assistantSending,assistantError:this.assistantError,showAllCategories:this.showAllCategories,showMoreNav:this.showMoreNav,pageFaviconHref:ro()}}attachHandlers(e){let r=this.locale;bo(e),e.querySelector('[data-action="close"]')?.addEventListener("click",()=>this.close()),e.querySelector('[data-action="back"]')?.addEventListener("click",()=>{this.step==="intent"?(this.step="category",this.selectedCategory=null):this.step==="details"?this.viaFeatureRequest?(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false):(this.step="intent",this.selectedIntent=null):this.step==="reports"?this.step="category":this.step==="report-detail"?(this.step="reports",this.selectedReportId=null):this.step==="leaderboard"?this.step="reports":this.step==="roadmap"?this.step="category":this.step==="assistant"?this.step="category":this.step==="account"?this.step="category":this.step==="cross-app-reports"?this.step="account":this.step==="success"&&(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false),this.step==="category"&&(this.showAllCategories=false,this.showMoreNav=false),this.render();}),e.querySelector('[data-action="show-all-categories"]')?.addEventListener("click",()=>{this.showAllCategories=true,this.render();}),e.querySelector('[data-action="toggle-more-nav"]')?.addEventListener("click",()=>{this.showMoreNav=!this.showMoreNav,this.render();}),e.querySelector('[data-action="assistant"]')?.addEventListener("click",()=>{this.openAssistantTab();}),e.querySelectorAll('[data-action="assistant-suggest"]').forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.value;i&&this.sendAssistantMessage(i);});}),e.querySelectorAll('[data-action="assistant-report"]').forEach(a=>{a.addEventListener("click",()=>{this.openReportFromAssistant();});});{let a=e.querySelector('[data-action="assistant-send"]');if(a){let i=a.querySelector(".mushi-assistant-input");a.addEventListener("submit",l=>{l.preventDefault();let f=i?.value??"";i&&(i.value=""),this.sendAssistantMessage(f);}),i?.addEventListener("keydown",l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),a.requestSubmit());});}}e.querySelector('[data-action="reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="roadmap"]')?.addEventListener("click",()=>{this.loadFeatureBoard();}),e.querySelectorAll("[data-vote-id]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.voteId;i&&this.voteFeatureBoard(i);});}),e.querySelector('[data-action="feature-request"]')?.addEventListener("click",()=>{this.selectedCategory="other",this.selectedIntent=rn,this.viaFeatureRequest=true,this.step="details",this.render();}),e.querySelectorAll("[data-report-id]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.reportId;i&&this.loadReporterComments(i);});}),e.querySelector('[data-action="open-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.callbacks.onLeaderboardOpen?.(),this.callbacks.onGlobalLeaderboardOpen?.(),this.render();}),e.querySelector('[data-action="open-account"]')?.addEventListener("click",()=>{this.step="account",this.render();}),e.querySelector('[data-action="open-cross-app-reports"]')?.addEventListener("click",()=>{this.step="cross-app-reports",this.crossAppLoading=true,this.crossAppReports=null,this.render(),this.callbacks.onCrossAppReportsOpen?this.callbacks.onCrossAppReportsOpen():(this.crossAppLoading=false,this.crossAppReports=[],this.render());}),e.querySelector('[data-action="open-global-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.globalLeaderboard=null,this.globalLeaderboardLoading=true,this.render(),this.callbacks.onGlobalLeaderboardOpen?this.callbacks.onGlobalLeaderboardOpen():(this.globalLeaderboardLoading=false,this.globalLeaderboard=[],this.render());}),e.querySelector('[data-action="send-magic-link"]')?.addEventListener("click",()=>{this.handleMagicLinkSend(e);}),e.querySelector('[data-action="resend-magic-link"]')?.addEventListener("click",()=>{this.magicLinkSent=false,this.magicLinkError="",this.render();}),e.querySelector('[data-action="sign-out-tester"]')?.addEventListener("click",()=>{this.testerJwt=null,this.testerInfo=null,this.testerReputation=null,this.crossAppReports=null,this.magicLinkSent=false,this.magicLinkEmail="",this.step="category",this.callbacks.onTesterSignOut?.(),this.render();}),e.querySelector('[data-action="reporter-reply"]')?.addEventListener("click",()=>{this.submitReporterReply(e);}),e.querySelector('[data-action="reporter-confirms"]')?.addEventListener("click",()=>{this.submitReporterFeedback("confirms");}),e.querySelector('[data-action="reporter-not-fixed"]')?.addEventListener("click",()=>{this.submitReporterReopen();}),e.querySelector('[data-action="view-my-reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="copy-report-id"]')?.addEventListener("click",a=>{let i=a.currentTarget,l=i.dataset.copyId;if(!l)return;let f=i.innerHTML,h=()=>{i.innerHTML="Copied \u2713",window.setTimeout(()=>{i.isConnected&&(i.innerHTML=f);},1600);};try{navigator.clipboard?.writeText?navigator.clipboard.writeText(l).then(h).catch(()=>h()):h();}catch{h();}}),e.querySelectorAll("[data-category]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.category??"other";this.selectedCategory=i;let l=this.resolveCustomCategory(i);this.step=l&&(!l.intents||l.intents.length===0)?"details":"intent",this.render();});}),e.querySelectorAll("[data-intent]").forEach(a=>{a.addEventListener("click",()=>{this.selectedIntent=a.dataset.intent??null,this.step="details",this.render();});});let n=e.querySelector(".mushi-textarea"),s=e.querySelector('[data-role="char-current"]');if(n&&s){let a=this.effectiveMinLength(),i=()=>{let l=n.value.trim().length;s.textContent=String(l);let f=e.querySelector('[data-role="char-counter"]');f&&(f.style.color=l>=a?"var(--mushi-ok, #22c55e)":"");};n.addEventListener("input",i);}e.querySelectorAll("[data-example]").forEach(a=>{a.addEventListener("click",()=>{let i=a.dataset.example??"";n&&(n.value=i,n.focus(),n.dispatchEvent(new Event("input")));});}),e.querySelector('[data-action="screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRequest();}),e.querySelector('[data-action="remove-screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRemove?.();}),e.querySelector('[data-action="annotate-screenshot"]')?.addEventListener("click",()=>{let a=e.querySelector('[data-role="annotate-host"]');a&&this.callbacks.onScreenshotAnnotateRequest&&this.callbacks.onScreenshotAnnotateRequest(a);}),e.querySelector('[data-action="element"]')?.addEventListener("click",()=>{this.callbacks.onElementSelectorRequest?.();});let o=()=>{let a=e.querySelector(".mushi-textarea"),i=a?.value?.trim()??"",l=e.querySelector(".mushi-error"),f=this.effectiveMinLength();if(i.length<f){if(l){let m=`${r.step3.tooShort} (${i.length}/${f})`;l.textContent=m,l.style.display="block",a?.focus();}return}this.submitting=true,this.submittedAt=new Date,this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.lastSubmitFailureKind=void 0,this.lastSubmitScreenshotDropped=false,this.render();let h=(async()=>{try{let m=this.selectedCategory,b=this.resolveBaseCategory(m),d=this.config.categories&&this.config.categories.length>0,x=this.callbacks.onSubmit({category:b,...d?{userCategory:m}:{},description:i,intent:this.selectedIntent??void 0});return x&&typeof x.then=="function"?await x??null:null}catch{return {reportId:null,queuedOffline:true}}})();this.successTimer=setTimeout(()=>{this.successTimer=null,this.submitting=false,this.step="success",this.render(),this.draftDescription="",h.then(m=>{if(this.step!=="success")return;m&&(this.lastReportId=m.reportId??null,this.lastSubmitQueuedOffline=!!m.queuedOffline,this.lastSubmitFailureKind=m.failureKind,this.lastSubmitScreenshotDropped=!!m.screenshotDropped,this.render()),this.autoCloseTimer!==null&&clearTimeout(this.autoCloseTimer);let b=this.lastReportId&&this.config.dashboardUrl?6e3:2800;this.autoCloseTimer=setTimeout(()=>{this.autoCloseTimer=null,this.step==="success"&&this.close();},b);});},500);};e.querySelector('[data-action="submit"]')?.addEventListener("click",o),e.addEventListener("keydown",a=>{if(a.key==="Escape"){this.close();return}this.step==="details"&&fo(a)&&(a.preventDefault(),o());});}trapFocus(e){requestAnimationFrame(()=>{let r=e.querySelector("textarea");if(r){r.focus();return}let n=e.querySelectorAll("button, textarea, [tabindex]");n.length>0&&n[0].focus();});}unreadCount(){return this.reporterReports.reduce((e,r)=>e+(r.unread_count??0),0)}async loadFeatureBoard(){this.step="roadmap",this.reporterLoading=true,this.reporterError=null,this.render();try{this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load community ideas.";}finally{this.reporterLoading=false,this.render();}}async voteFeatureBoard(e){if(!(!this.callbacks.onFeatureBoardVote||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onFeatureBoardVote(e),this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??this.featureBoard;}catch(r){this.reporterError=r instanceof Error?r.message:"Could not update vote.";}finally{this.reporterLoading=false,this.render();}}}async submitReporterReopen(){let e=this.selectedReportId;if(!(!e||this.reporterLoading)){this.reporterLoading=true,this.render();try{this.callbacks.onReporterReopen?await this.callbacks.onReporterReopen(e,"Not fixed for me"):await this.callbacks.onReporterFeedback?.(e,"not_fixed","Not fixed for me"),await this.loadReporterReports();}catch(r){this.reporterError=r instanceof Error?r.message:"Could not reopen report.";}finally{this.reporterLoading=false,this.render();}}}async refreshReporterInboxQuiet(){try{if(this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[],!this.isOpen)return;this.step==="reports"?this.render():this.updateReportsBadgeText();}catch{}}updateReportsBadgeText(){let e=this.shadow.querySelector(".mushi-reports-entry .mushi-option-label");if(!e)return;let r=this.locale.step1.moreNav,n=this.unreadCount();e.textContent=n?`${r.yourReports} (${n} ${r.unreadNew})`:r.yourReports;}async loadReporterReports(){this.step="reports",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load reports.";}finally{this.reporterLoading=false,this.render();}}async loadReporterComments(e){this.selectedReportId!==e&&(this.draftReply=""),this.selectedReportId=e,this.step="report-detail",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterComments=await this.callbacks.onReporterCommentsRequest?.(e)??[];}catch(r){this.reporterError=r instanceof Error?r.message:"Could not load thread.";}finally{this.reporterLoading=false,this.render();}}async submitReporterFeedback(e){let r=this.selectedReportId;if(!(!r||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onReporterFeedback?.(r,e),await this.loadReporterReports(),r&&await this.loadReporterComments(r);}catch(n){this.reporterError=n instanceof Error?n.message:"Could not send feedback.",this.reporterLoading=false,this.render();}}}async submitReporterReply(e){let r=this.selectedReportId,n=e.querySelector('[data-role="reporter-reply"]'),s=e.querySelector('[data-action="reporter-reply"]'),o=n?.value.trim()??"";if(!(!r||!o||this.reporterLoading)){this.reporterLoading=true,s&&(s.disabled=true),this.render();try{await this.callbacks.onReporterReply?.(r,o),n&&(n.value=""),this.draftReply="",await this.loadReporterComments(r);}catch(a){this.reporterError=a instanceof Error?a.message:"Could not send reply.",this.reporterLoading=false,this.render();}}}async handleMagicLinkSend(e){if(this.magicLinkSending)return;let n=(e.querySelector('[data-role="magic-link-email"]')?.value??this.magicLinkEmail).trim();if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){this.magicLinkError="Please enter a valid email address.",this.render();return}this.magicLinkEmail=n,this.magicLinkError="",this.magicLinkSending=true,this.render();try{await this.callbacks.onMushiSignIn?.(n),this.magicLinkSent=!0;}catch(s){this.magicLinkError=s instanceof Error?s.message:"Could not send sign-in link. Try again.";}finally{this.magicLinkSending=false,this.render();}}getRecorderStep(){return this.step}getRecorderCategoryStepIA(){return {sectionLabel:this.shadow.querySelector(".mushi-section-label")?.textContent?.trim()??"",moreToggle:!!this.shadow.querySelector('[data-action="toggle-more-nav"]'),footerStepIndicators:this.shadow.querySelectorAll(".mushi-step-indicator").length}}getRecorderTrigger(){return this.shadow.querySelector(".mushi-trigger")}getRecorderCategoryButton(e){return this.shadow.querySelector(`[data-category="${e}"]`)}getRecorderIntentButton(e){return Array.from(this.shadow.querySelectorAll("[data-intent]")).find(r=>r.dataset.intent===e)??null}getRecorderSubmitButton(){return this.shadow.querySelector('[data-action="submit"]')}recorderClickTrigger(){this.isOpen&&this.close(),this.open();}openReporter(){this.isOpen||(this.isOpen=true,this.render()),this.loadReporterReports();}recorderSelectCategory(e){this.isOpen||this.open(),this.step!=="category"&&(this.selectedCategory=null,this.selectedIntent=null,this.step="category",this.render()),this.selectedCategory=e,this.step="intent",this.render();}recorderSelectIntent(e){!this.isOpen||this.step!=="intent"||(this.selectedIntent=e,this.step="details",this.render());}recorderFocusDescription(){this.shadow.querySelector(".mushi-textarea")?.focus();}recorderSubmit(){this.shadow.querySelector('[data-action="submit"]')?.click();}recorderOpenMyReports(){this.isOpen||this.open(),this.loadReporterReports();}};function xl(t,e){let r={...t};if(e)for(let[n,s]of Object.entries(e))s!==void 0&&(r[n]=s);return r}function So(t,e){let r=e.native?.triggerMode,n=e.widget?.launcher,s=t.widget?.trigger,o=n??e.widget?.trigger,i=(o==="auto"&&s&&s!=="auto"?void 0:o)??(r==="none"||r==="shake"?"manual":void 0),l=n==="hidden"||e.widget?.trigger==="hidden",f=i==="hidden"&&!l&&s&&s!=="hidden"?s:i,h=e.widget,m=h?.bannerVariant,b=h?.bannerPosition,d=h?.bannerMessage,x=h?.bannerLabel,v=h?.bannerBugCta,C=h?.bannerFeatureCta,$=m||b||d!=null||x!=null||v!=null||C!=null?{...t.widget?.bannerConfig??{},...m?{variant:m}:{},...b?{position:b}:{},...d!=null?{message:d}:{},...x!=null?{label:x===""?false:x}:{},...v!=null?{bugCta:v??void 0}:{},...C!=null?{featureCta:C}:{}}:void 0,T={};if(e.widget)for(let[E,w]of Object.entries(e.widget))E==="trigger"||E==="launcher"||w!=null&&(T[E]=w);return {...t,widget:{...t.widget,...T,...f?{trigger:f}:{},...$?{bannerConfig:$}:{},...t.widget?.betaMode?{betaMode:t.widget.betaMode}:{}},capture:xl(t.capture,e.capture),privacy:{...t.privacy}}}function xr(t){if(!t)return null;let e=t.getBoundingClientRect();return e.width===0&&e.height===0?null:{x:e.left+e.width/2,y:e.top+e.height/2}}function Eo(t){if(typeof globalThis>"u")return;let e={ready:()=>t.getIsMounted(),getStep:()=>t.getRecorderStep(),getCategoryStepIA:()=>t.getRecorderCategoryStepIA(),getTriggerCenter:()=>xr(t.getRecorderTrigger()),getCategoryCenter:r=>xr(t.getRecorderCategoryButton(r)),getIntentCenter:r=>xr(t.getRecorderIntentButton(r)),getSubmitCenter:()=>xr(t.getRecorderSubmitButton()),clickTrigger:()=>t.recorderClickTrigger(),selectCategory:r=>t.recorderSelectCategory(r),selectIntent:r=>t.recorderSelectIntent(r),focusDescription:()=>t.recorderFocusDescription(),submit:()=>t.recorderSubmit(),openMyReports:()=>t.recorderOpenMyReports()};globalThis.__mushiRecorder=e;}var an=null,ln=null,$t=null,It=null,Mt=null,Lt=null,At=null,wr=false,Ze=new Set;function wl(){for(let t of Ze)try{t.onPush?.();}catch{}}function Sl(){for(let t of Ze)try{t.onReplace?.();}catch{}}function El(){for(let t of Ze)try{t.onPop?.();}catch{}}function kl(){wr||typeof window>"u"||($t=History.prototype.pushState,It=History.prototype.replaceState,an=$t.bind(history),ln=It.bind(history),Mt=function(...e){let n=(an??History.prototype.pushState.bind(history))(...e);return wl(),n},Lt=function(...e){let n=(ln??History.prototype.replaceState.bind(history))(...e);return Sl(),n},history.pushState=Mt,history.replaceState=Lt,At=()=>El(),window.addEventListener("popstate",At),wr=true);}function ko(){!wr||typeof window>"u"||(At&&(window.removeEventListener("popstate",At),At=null),Mt&&history.pushState===Mt&&$t&&(history.pushState=$t),Lt&&history.replaceState===Lt&&It&&(history.replaceState=It),Mt=null,Lt=null,an=null,ln=null,$t=null,It=null,wr=false);}function Le(t){return kl(),Ze.add(t),()=>{Ze.delete(t),Ze.size===0&&ko();}}function Ro(){Ze.clear(),ko();}var Rl=3e4,Cl=3e5,Tl=6e4,$l=60,$o="mushi_session_min_day_",ft=[],gt=null,bt=null,qe=null,Io=null,cn=null,yt=null,Ke=false,Ht=null,Mo=0,Il=300*1e3,pn=0,Ml=900*1e3;function hn(){return Date.now()<pn}function mn(t){t?.startsWith("HTTP_4")&&(pn=Date.now()+Ml);}var Co=new Set;function un(t){return `mushi_rewards_consent_${t}`}function Ll(t){try{return localStorage.getItem(un(t))==="1"}catch{return false}}function dn(t,e){try{e?localStorage.setItem(un(t),"1"):localStorage.removeItem(un(t)),Ke=e;}catch{}}function Lo(){return new Date().toISOString().slice(0,10)}function Ao(t){try{let e=sessionStorage.getItem(`${$o}${t}_${Lo()}`);return e?parseInt(e,10):0}catch{return 0}}function Al(t){let e=Lo(),r=`${$o}${t}_${e}`;try{let n=Ao(t)+1;return sessionStorage.setItem(r,String(n)),n}catch{return 99}}function _o(t){yt=t.client,qe=t.userId,Io=t.traits??null,cn=t.reporterToken??null;let{projectId:e}=t,r=Math.max(Rl,t.config.flushIntervalMs??Cl);t.config.consentMode==="auto"?(Ke=true,dn(e,true)):Ke=Ll(e),t.config.trackActivity&&Hl(e),gt&&clearInterval(gt),gt=setInterval(()=>_l(t),r),bt&&clearInterval(bt),bt=setInterval(()=>{if(!Ke||!qe)return;let n=Ao(e);n<$l&&(Al(e),vt({action:"session_minute",metadata:{minutes_today:n+1}}));},Tl),t.config.showInWidget&&fn(qe).then(n=>{n&&Bo(n,t.config);}),t.config.consentMode!=="auto"&&!Ke&&Dl(e,t.config);}function vt(t){!Ke||!qe||ft.push({...t,queuedAt:Date.now()});}async function _l(t){if(!Ke||!qe||ft.length===0)return;let e=null;if(t.config.verifyUserToken)try{e=await t.config.verifyUserToken();}catch{}if(hn())return;let r=ft.splice(0,100);try{let n=cn?await jr(cn):void 0,s=await t.client.submitActivity(qe,r,{userTraits:Io??void 0,reporterTokenHash:n,optedIn:!0,hostJwt:e??void 0});s.ok||(mn(s.error?.code),s.error?.code?.startsWith("HTTP_4")||ft.unshift(...r.slice(0,50)));}catch{ft.unshift(...r.slice(0,50));}}async function Ho(t){let e=Date.now();return Ht&&e-Mo<Il?Ht:fn(t)}async function fn(t){if(!yt||hn())return null;let e=await yt.getMyTier(t);return e.ok&&e.data?(Ht=e.data,Mo=Date.now(),Ht):(mn(e.error?.code),null)}async function Po(t=10){if(!yt||hn())return null;try{let e=await yt.getHallOfFame(t);return e.ok&&e.data?(e.data.data??[]).map(r=>({display_name:r.display_name,tier_name:r.tier_name,total_points:r.total_points,points_30d:r.points_30d})):(mn(e.error?.code),null)}catch{return null}}function Do(){gt&&(clearInterval(gt),gt=null),bt&&(clearInterval(bt),bt=null),Oo(),Pl(),we&&(we.remove(),we=null),ft=[],qe=null,yt=null,Ke=false,Ht=null,pn=0;}var Er=null,_t=null,kr=null,To="",Sr=false;function Hl(t){if(Sr&&kr)return;Sr&&Oo(),Sr=true;let e=()=>{let n=location.pathname;if(n===To)return;To=n,!Co.has(`${t}:${n}`)&&(Co.add(`${t}:${n}`),vt({action:"screen_view_unique_per_day",metadata:{route:n}}));};kr=Le({onPush:e,onPop:e}),e(),Er=new MutationObserver(()=>e());let r=document.querySelector("main")??document.body;Er.observe(r,{childList:true,subtree:false}),_t=n=>{let s=n.target.closest("[data-testid]");if(!s)return;let o=s.dataset.testid;o&&vt({action:"element_selected",metadata:{testid:o,route:location.pathname}});},document.addEventListener("click",_t,{capture:true,passive:true});}function Oo(){Sr=false,kr?.(),kr=null,Er?.disconnect(),Er=null,_t&&(document.removeEventListener("click",_t,{capture:true}),_t=null);}var Fe=null;function Bo(t,e){if(!e.showInWidget)return;Fe&&Fe.remove(),Fe=document.createElement("div"),Fe.id="mushi-tier-badge",Object.assign(Fe.style,{position:"fixed",bottom:"56px",right:"16px",zIndex:"2147483645",fontFamily:"system-ui, sans-serif"});let r=Fe.attachShadow({mode:"closed"});r.innerHTML=`
2200
2251
  <style>
2201
2252
  :host { display: block; }
2202
2253
  .badge {
@@ -2218,7 +2269,7 @@
2218
2269
  width: 6px;
2219
2270
  height: 6px;
2220
2271
  border-radius: 50%;
2221
- background: ${de.accent};
2272
+ background: ${he.accent};
2222
2273
  flex-shrink: 0;
2223
2274
  }
2224
2275
  </style>
@@ -2226,20 +2277,20 @@
2226
2277
  <span class="dot"></span>
2227
2278
  <span>${t.displayName}</span>
2228
2279
  </div>
2229
- `,document.body.appendChild(Oe);}function hl(){Oe?.remove(),Oe=null;}var be=null;function fl(t,e){if(be)return;be=document.createElement("div"),be.id="mushi-consent-banner",Object.assign(be.style,{position:"fixed",bottom:"80px",right:"16px",zIndex:"2147483646",maxWidth:"280px",fontFamily:"system-ui, sans-serif"});let r=be.attachShadow({mode:"closed"});r.innerHTML=`
2280
+ `,document.body.appendChild(Fe);}function Pl(){Fe?.remove(),Fe=null;}var we=null;function Dl(t,e){if(we)return;we=document.createElement("div"),we.id="mushi-consent-banner",Object.assign(we.style,{position:"fixed",bottom:"80px",right:"16px",zIndex:"2147483646",maxWidth:"280px",fontFamily:"system-ui, sans-serif"});let r=we.attachShadow({mode:"closed"});r.innerHTML=`
2230
2281
  <style>
2231
2282
  :host { display: block; }
2232
2283
  .banner {
2233
- background: ${de.paperRaised};
2234
- border: 1px solid ${de.ruleStrong};
2284
+ background: ${he.paperRaised};
2285
+ border: 1px solid ${he.ruleStrong};
2235
2286
  border-radius: 12px;
2236
2287
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
2237
2288
  padding: 14px 16px;
2238
2289
  font-size: 13px;
2239
2290
  line-height: 1.5;
2240
- color: ${de.inkMuted};
2291
+ color: ${he.inkMuted};
2241
2292
  }
2242
- .title { font-weight: 700; margin-bottom: 6px; color: ${de.ink}; }
2293
+ .title { font-weight: 700; margin-bottom: 6px; color: ${he.ink}; }
2243
2294
  .actions { display: flex; gap: 8px; margin-top: 10px; }
2244
2295
  button {
2245
2296
  flex: 1;
@@ -2250,8 +2301,8 @@
2250
2301
  font-size: 12px;
2251
2302
  font-weight: 600;
2252
2303
  }
2253
- .accept { background: ${de.accent}; color: ${de.paperRaised}; }
2254
- .decline { background: ${de.paper}; color: ${de.inkMuted}; }
2304
+ .accept { background: ${he.accent}; color: ${he.paperRaised}; }
2305
+ .decline { background: ${he.paper}; color: ${he.inkMuted}; }
2255
2306
  </style>
2256
2307
  <div class="banner">
2257
2308
  <div class="title">\u{1F3AF} Earn rewards</div>
@@ -2261,7 +2312,7 @@
2261
2312
  <button class="decline" id="decline">No thanks</button>
2262
2313
  </div>
2263
2314
  </div>
2264
- `,r.getElementById("accept")?.addEventListener("click",()=>{Gr(t,true),be?.remove(),be=null,e.showInWidget&&Be&&Zr(Be).then(n=>{n&&So(n,e);});}),r.getElementById("decline")?.addEventListener("click",()=>{Gr(t,false),be?.remove(),be=null;}),document.body.appendChild(be);}function Qr(){let t=[],e={},r={},n=["log","warn","error","info","debug"];for(let s of n){let o=console[s];e[s]=o;let a=(...i)=>{let l=i.map(h=>{try{return typeof h=="string"?h:JSON.stringify(h)}catch{return String(h)}}).join(" ").slice(0,500),f={level:s,message:l,timestamp:Date.now()};s==="error"&&i[0]instanceof Error&&(f.stack=i[0].stack?.slice(0,1e3)),t.push(f),t.length>50&&t.shift(),o.call(console,...i);};r[s]=a,console[s]=a;}return {getEntries(){return [...t]},clear(){t.length=0;},destroy(){for(let s of n)e[s]&&console[s]===r[s]&&(console[s]=e[s]);}}}var ml=[/\/v1\/sdk(?:\/|$)/,/\/v1\/reports(?:\/|$)/,/\/v1\/notifications(?:\/|$)/,/\/v1\/reputation(?:\/|$)/];function cr(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}function ur(t,e){let r=e?.[tt];if(r)return r;let n=yl(e?.headers,xt);if(n)return n;if(typeof Request<"u"&&t instanceof Request){let s=t.headers.get(xt);if(s)return s}return null}function dr(t,e={}){if([...ml,...e.ignoreUrls??[]].some(s=>gl(t,s)))return true;let n=bl(e.apiEndpoint);return n?en(t).startsWith(n):false}function gl(t,e){return typeof e=="string"?en(t).includes(e):(e.lastIndex=0,e.test(t))}function bl(t){if(!t)return null;let e=en(t),r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)}function en(t){try{return new URL(t,typeof location<"u"?location.href:"http://localhost").href}catch{return t}}function yl(t,e){if(!t)return null;if(typeof Headers<"u"&&t instanceof Headers)return t.get(e);if(Array.isArray(t))return t.find(([s])=>s.toLowerCase()===e.toLowerCase())?.[1]??null;let r=t;return r[e]??r[e.toLowerCase()]??null}var vl=30,xl="00";function wl(){let t=crypto.getRandomValues(new Uint8Array(16)),e=crypto.getRandomValues(new Uint8Array(8)),r=o=>Array.from(o).map(a=>a.toString(16).padStart(2,"0")).join(""),n=r(t),s=r(e);return {traceparent:`${xl}-${n}-${s}-01`,traceId:n,spanId:s}}function Sl(t,e){for(let r of e)if(typeof r=="string"){if(t.includes(r))return true}else if(r.test(t))return true;return false}function tn(t={}){let e=[],r=globalThis.fetch,n=t,s;globalThis.fetch=s=async function(i,l){let f=Date.now(),h=l?.method?.toUpperCase()??"GET",m=cr(i),d=!ur(i,l)&&!dr(m,n),v,x=l,C=n.tracePropagation;if(d&&C?.enabled&&C.corsUrls?.length&&Sl(m,C.corsUrls)){let{traceparent:I,traceId:T}=wl();v=T;let E=l?.headers?new Headers(l.headers):new Headers;E.set("traceparent",I),n.sessionId&&E.set("x-mushi-session",n.sessionId),x={...l,headers:E};}try{let I=await r.call(globalThis,i,x);return d&&o({method:h,url:Eo(m),status:I.status,duration:Date.now()-f,timestamp:f,...v?{traceId:v}:{}}),I}catch(I){throw d&&o({method:h,url:Eo(m),status:0,duration:Date.now()-f,timestamp:f,error:I instanceof Error?I.message:"Network error",...v?{traceId:v}:{}}),I}};function o(a){e.push(a),e.length>vl&&e.shift();}return {getEntries(){return [...e]},clear(){e.length=0;},updateOptions(a){n=a;},destroy(){globalThis.fetch===s&&(globalThis.fetch=r);}}}function Eo(t){try{let e=new URL(t),r=e.pathname+e.search;return r.length>200?e.origin+r.slice(0,200)+"...":e.origin+r}catch{return t.slice(0,200)}}function sn(t={}){let e=t;async function r(){try{if(typeof document>"u")return null;let n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return null;let o=window.innerWidth,a=window.innerHeight,i=Math.min(window.devicePixelRatio||1,2);n.width=o*i,n.height=a*i,s.scale(i,i);let l=kl(e.privacy),f=`
2315
+ `,r.getElementById("accept")?.addEventListener("click",()=>{dn(t,true),we?.remove(),we=null,e.showInWidget&&qe&&fn(qe).then(n=>{n&&Bo(n,e);});}),r.getElementById("decline")?.addEventListener("click",()=>{dn(t,false),we?.remove(),we=null;}),document.body.appendChild(we);}var Ol=[/\/v1\/sdk(?:\/|$)/,/\/v1\/reports(?:\/|$)/,/\/v1\/notifications(?:\/|$)/,/\/v1\/reputation(?:\/|$)/];function Rr(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}function Cr(t,e){let r=e?.[ct];if(r)return r;let n=Ul(e?.headers,Ct);if(n)return n;if(typeof Request<"u"&&t instanceof Request){let s=t.headers.get(Ct);if(s)return s}return null}function Pt(t,e={}){if([...Ol,...e.ignoreUrls??[]].some(s=>Bl(t,s)))return true;let n=Nl(e.apiEndpoint);return n?gn(t).startsWith(n):false}function Bl(t,e){return typeof e=="string"?gn(t).includes(e):(e.lastIndex=0,e.test(t))}function Nl(t){if(!t)return null;let e=gn(t),r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)}function gn(t){try{return new URL(t,typeof location<"u"?location.href:"http://localhost").href}catch{return t}}function Ul(t,e){if(!t)return null;if(typeof Headers<"u"&&t instanceof Headers)return t.get(e);if(Array.isArray(t))return t.find(([s])=>s.toLowerCase()===e.toLowerCase())?.[1]??null;let r=t;return r[e]??r[e.toLowerCase()]??null}var Fl=30,ql="00";function No(){let t=crypto.getRandomValues(new Uint8Array(16)),e=crypto.getRandomValues(new Uint8Array(8)),r=o=>Array.from(o).map(a=>a.toString(16).padStart(2,"0")).join(""),n=r(t),s=r(e);return {traceparent:`${ql}-${n}-${s}-01`,traceId:n,spanId:s}}function Uo(t,e){for(let r of e)if(typeof r=="string"){if(t.includes(r))return true}else if(r.test(t))return true;return false}var Ve=[];function qo(){return Ve[Ve.length-1]}function Fo(){let t=crypto.getRandomValues(new Uint8Array(4));return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}function yn(t={}){let e=[],r=globalThis.fetch,n=typeof XMLHttpRequest<"u"?XMLHttpRequest:null,s=n?XMLHttpRequest.prototype.open:null,o=n?XMLHttpRequest.prototype.send:null,a=n?XMLHttpRequest.prototype.setRequestHeader:null,i=t,l;globalThis.fetch=l=async function(x,v){let C=Date.now(),$=v?.method?.toUpperCase()??"GET",T=Rr(x),w=!Cr(x,v)&&!Pt(T,i),u=w?Fo():void 0,S,k=v,A=i.tracePropagation;if(w&&A?.enabled&&A.corsUrls?.length&&Uo(T,A.corsUrls)){let{traceparent:y,traceId:B}=No();S=B;let Z=v?.headers?new Headers(v.headers):new Headers;Z.set("traceparent",y),i.sessionId&&Z.set("x-mushi-session",i.sessionId),k={...v,headers:Z};}u&&Ve.push(u);try{let y=await r.call(globalThis,x,k);return w&&b({method:$,url:bn(T),status:y.status,duration:Date.now()-C,timestamp:C,captureMethod:"fetch",...S?{traceId:S}:{},...u?{correlationId:u}:{}}),y}catch(y){throw w&&b({method:$,url:bn(T),status:0,duration:Date.now()-C,timestamp:C,error:y instanceof Error?y.message:"Network error",captureMethod:"fetch",...S?{traceId:S}:{},...u?{correlationId:u}:{}}),y}finally{if(u){let y=Ve.lastIndexOf(u);y!==-1&&Ve.splice(y,1);}}};let f=typeof WeakMap<"u"?new WeakMap:null;if(n&&s&&o&&a&&f){let d=s;XMLHttpRequest.prototype.open=function(...v){let[C,$]=v,T=typeof $=="string"?$:String($),E=!Pt(T,i),w=E?Fo():void 0,u,S,k=i.tracePropagation;if(E&&k?.enabled&&k.corsUrls?.length&&Uo(T,k.corsUrls)){let y=No();u=y.traceId,S=y.traceparent;}let A=f.get(this);A?._listener&&this.removeEventListener("readystatechange",A._listener),f.set(this,{method:String(C).toUpperCase(),url:bn(T),startTime:0,shouldRecord:E,...u?{traceId:u}:{},...w?{correlationId:w}:{},...S?{_traceparent:S}:{}}),d.apply(this,v);},XMLHttpRequest.prototype.send=function(v){let C=f.get(this);if(C){C.startTime=Date.now();let $=C._traceparent;$&&(a.call(this,"traceparent",$),i.sessionId&&a.call(this,"x-mushi-session",i.sessionId)),C.correlationId&&Ve.push(C.correlationId);let T=()=>{if(this.readyState===4){if(C.shouldRecord){let E=Date.now()-C.startTime,w={method:C.method,url:C.url,status:this.status,duration:E,timestamp:C.startTime,captureMethod:"xhr",...C.traceId?{traceId:C.traceId}:{},...C.correlationId?{correlationId:C.correlationId}:{}};this.status===0&&(w.error="XHR network error or aborted"),b(w);}if(C.correlationId){let E=Ve.lastIndexOf(C.correlationId);E!==-1&&Ve.splice(E,1);}}};C._listener=T,this.addEventListener("readystatechange",T);}o.call(this,v);};}let h=n?XMLHttpRequest.prototype.open:null,m=n?XMLHttpRequest.prototype.send:null;function b(d){e.push(d),e.length>Fl&&e.shift();}return {getEntries(){return [...e]},clear(){e.length=0;},updateOptions(d){i=d;},destroy(){globalThis.fetch===l&&(globalThis.fetch=r),n&&s&&o&&(h&&XMLHttpRequest.prototype.open===h&&(XMLHttpRequest.prototype.open=s),m&&XMLHttpRequest.prototype.send===m&&(XMLHttpRequest.prototype.send=o));}}}function bn(t){let e=Tt(t);try{let r=new URL(e),n=r.pathname+r.search;return n.length>200?r.origin+n.slice(0,200)+"...":r.origin+n}catch{return e.slice(0,200)}}var jl=50,Wl=500;function vn(){let t=[],e={},r={},n=["log","warn","error","info","debug"];for(let s of n){let o=console[s];e[s]=o;let a=(...i)=>{let l=i.map(m=>{try{return typeof m=="string"?m:JSON.stringify(m)}catch{return String(m)}}).join(" ").slice(0,Wl),f=qo(),h={level:s,message:l,timestamp:Date.now(),...f?{correlationId:f}:{}};s==="error"&&i[0]instanceof Error&&(h.stack=i[0].stack?.slice(0,1e3)),t.push(h),t.length>jl&&t.shift(),o.call(console,...i);};r[s]=a,console[s]=a;}return {getEntries(){return [...t]},clear(){t.length=0;},destroy(){for(let s of n)e[s]&&console[s]===r[s]&&(console[s]=e[s]);}}}function Sn(t={}){let e=t;async function r(){try{if(typeof document>"u")return null;let n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return null;let o=window.innerWidth,a=window.innerHeight,i=Math.min(window.devicePixelRatio||1,2);n.width=o*i,n.height=a*i,s.scale(i,i);let l=Kl(e.privacy),f=`
2265
2316
  <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${a}">
2266
2317
  <foreignObject width="100%" height="100%">
2267
2318
  <div xmlns="http://www.w3.org/1999/xhtml">
@@ -2269,14 +2320,14 @@
2269
2320
  </div>
2270
2321
  </foreignObject>
2271
2322
  </svg>
2272
- `,h=new Image,m=new Blob([f],{type:"image/svg+xml;charset=utf-8"}),b=URL.createObjectURL(m);return new Promise(d=>{let v=!1,x=(I,T)=>{v||(v=!0,clearTimeout(C),URL.revokeObjectURL(b),T&&(e.onFailed?.(T),ko(T)),d(I));},C=setTimeout(()=>x(null,"error"),5e3);h.onload=()=>{try{if(s.drawImage(h,0,0,o,a),Ml(s,o,a)){x(null,"error");return}x(n.toDataURL("image/jpeg",.7));}catch{x(null,"taint");}},h.onerror=()=>x(null,"error"),h.src=b;})}catch{return e.onFailed?.("error"),ko("error"),null}}return {take:r,updateOptions(n){e=n;}}}function ko(t){try{document.dispatchEvent(new CustomEvent("mushi:screenshot_failed",{detail:{reason:t},bubbles:!1}));}catch{}}var El=['input[type="password"]',"[data-mushi-redact]"];function kl(t){let e=document.documentElement.cloneNode(true);e.querySelector("#mushi-mushi-widget")?.remove(),Cl(e),Tl(e);let r=t?.redactSelectors!==void 0?t.redactSelectors:El;for(let n of r)for(let s of rn(e,n))Rl(s);for(let n of t?.blockSelectors??[])for(let s of rn(e,n))s.remove();for(let n of t?.maskSelectors??[])for(let s of rn(e,n))$l(s);return e}function rn(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return []}}function Rl(t){for((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value","")),t.textContent="",t.setAttribute("style",`${t.getAttribute("style")??""};background:#000!important;color:#000!important;text-shadow:none!important;border-color:#000!important;`),t.setAttribute("data-mushi-redacted","true");t.firstChild;)t.removeChild(t.firstChild);}function Cl(t){let e=typeof location<"u"?location.origin:"";for(let r of t.querySelectorAll("img, video, iframe, object, embed, picture"))r.remove();for(let r of t.querySelectorAll('link[rel="stylesheet"], link[as="style"]'))r.remove();for(let r of t.querySelectorAll("style")){let n=nn(r.textContent??"",e);n!==r.textContent&&(r.textContent=n);}for(let r of t.querySelectorAll("[style]")){let n=r.getAttribute("style");if(!n)continue;let s=nn(n,e);s!==n&&r.setAttribute("style",s);}for(let r of t.querySelectorAll("script"))r.remove();}function nn(t,e){return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(r,n,s)=>{let o=s.trim();return !o||o.startsWith("data:")||o.startsWith("#")?r:Il(o,e)?"none":r})}function Tl(t){let e=typeof location<"u"?location.origin:"",r=[],n=[...Array.from(document.styleSheets),...document.adoptedStyleSheets??[]];for(let a of n){let i=a.ownerNode;i instanceof Element&&i.tagName==="STYLE"||r.push(Ro(a));}let s=nn(r.filter(Boolean).join(`
2273
- `),e);if(!s)return;let o=document.createElement("style");o.textContent=s,(t.querySelector("head")??t).appendChild(o);}function Ro(t){let e;try{e=t.cssRules;}catch{return ""}let r="";for(let n of Array.from(e)){if(n instanceof CSSImportRule){n.styleSheet&&(r+=Ro(n.styleSheet));continue}r+=`${n.cssText}
2274
- `;}return r}function Ml(t,e,r){try{let n=Math.max(1,Math.floor(e/8)),s=Math.max(1,Math.floor(r/8));for(let o=0;o<r;o+=s)for(let a=0;a<e;a+=n)if(t.getImageData(a,o,1,1).data[3]!==0)return !1;return !0}catch{return false}}function Il(t,e){if(!t||t.startsWith("data:")||t.startsWith("blob:"))return false;try{let r=new URL(t,typeof location<"u"?location.href:"http://localhost/");return !!e&&r.origin!==e}catch{return true}}function $l(t){(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value",""),t.setAttribute("placeholder","\u2022\u2022\u2022\u2022")),t.textContent=t.children.length===0?"\u2022\u2022\u2022\u2022":t.textContent,t.setAttribute("style",`${t.getAttribute("style")??""};background:#8f8f8f!important;color:transparent!important;text-shadow:none!important;`),t.setAttribute("data-mushi-masked","true");}function Ll(t){if(!t||!t.tagName)return;let e=t,r=e.tagName.toLowerCase(),n=e.id?`#${e.id}`:"",s=e.classList&&e.classList.length>0?`.${e.classList[0]}`:"";return `${r}${n}${s}`}function on(){let t={},e=[];if(typeof PerformanceObserver<"u"){try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())s.name==="first-contentful-paint"&&(t.fcp=s.startTime);});r.observe({type:"paint",buffered:!0}),e.push(r);}catch{}try{let r=new PerformanceObserver(n=>{let s=n.getEntries();s.length>0&&(t.lcp=s[s.length-1].startTime);});r.observe({type:"largest-contentful-paint",buffered:!0}),e.push(r);}catch{}try{let r=0,n=new PerformanceObserver(s=>{for(let o of s.getEntries())o.hadRecentInput||(r+=o.value??0,t.cls=r);});n.observe({type:"layout-shift",buffered:!0}),e.push(n);}catch{}try{let r=0,n=new PerformanceObserver(s=>{r+=s.getEntries().length,t.longTasks=r;});n.observe({type:"longtask",buffered:!0}),e.push(n);}catch{}try{let r=new Map,n=new PerformanceObserver(s=>{for(let o of s.getEntries()){let a=o.interactionId;if(!a)continue;let i=r.get(a)??0;if(o.duration>i&&r.set(a,o.duration),o.duration>(t.inp??0)){t.inp=o.duration;let l=o.processingStart-o.startTime,f=o.processingEnd-o.processingStart,h=o.startTime+o.duration-o.processingEnd;t.inpAttribution={eventType:o.name,targetSelector:Ll(o.target),inputDelay:Math.max(0,l),processingDuration:Math.max(0,f),presentationDelay:Math.max(0,h)};}}});n.observe({type:"event",durationThreshold:40,buffered:!0}),e.push(n);}catch{}try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())t.fid===void 0&&(t.fid=s.processingStart-s.startTime);});r.observe({type:"first-input",buffered:!0}),e.push(r);}catch{}}if(typeof performance<"u"&&performance.getEntriesByType)try{let r=performance.getEntriesByType("navigation");r.length>0&&r[0]&&(t.ttfb=r[0].responseStart-r[0].requestStart);}catch{}return {getMetrics(){return {...t}},destroy(){for(let r of e)r.disconnect();e.length=0;}}}function an(){let t=false,e=null,r=null,n=null,s=null;function o(w){let p=w,S=0;for(;p&&S<20;){let R=p.getAttribute?.("data-testid");if(R)return R;p=p.parentElement,S++;}return null}function a(w){let p=[],S=w;for(;S&&S!==document.body;){let R=1,y=S.previousElementSibling;for(;y;)y.tagName===S.tagName&&R++,y=y.previousElementSibling;let O=S.tagName.toLowerCase();p.unshift(R>1?`${O}[${R}]`:O),S=S.parentElement;}return "//"+p.join("/")}function i(w){let p=w.getBoundingClientRect(),S=typeof w.className=="string"?w.className:w.getAttribute("class")??"";return {tagName:w.tagName.toLowerCase(),id:w.id||void 0,className:S||void 0,textContent:w.textContent?.trim().slice(0,200)||void 0,xpath:a(w),rect:{x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height)},nearestTestid:o(w)||void 0,route:typeof window<"u"?window.location.pathname:void 0}}function l(){let w=document.createElement("div");return w.style.cssText=`
2323
+ `,h=new Image,m=new Blob([f],{type:"image/svg+xml;charset=utf-8"}),b=URL.createObjectURL(m);return new Promise(d=>{let x=!1,v=($,T)=>{x||(x=!0,clearTimeout(C),URL.revokeObjectURL(b),T&&(e.onFailed?.(T),jo(T)),d($));},C=setTimeout(()=>v(null,"error"),5e3);h.onload=()=>{try{if(s.drawImage(h,0,0,o,a),Yl(s,o,a)){v(null,"error");return}v(n.toDataURL("image/jpeg",.7));}catch{v(null,"taint");}},h.onerror=()=>v(null,"error"),h.src=b;})}catch{return e.onFailed?.("error"),jo("error"),null}}return {take:r,updateOptions(n){e=n;}}}function jo(t){try{document.dispatchEvent(new CustomEvent("mushi:screenshot_failed",{detail:{reason:t},bubbles:!1}));}catch{}}var zl=['input[type="password"]',"[data-mushi-redact]"];function Kl(t){let e=document.documentElement.cloneNode(true);e.querySelector("#mushi-mushi-widget")?.remove(),Gl(e),Xl(e);let r=t?.redactSelectors!==void 0?t.redactSelectors:zl;for(let n of r)for(let s of xn(e,n))Vl(s);for(let n of t?.blockSelectors??[])for(let s of xn(e,n))s.remove();for(let n of t?.maskSelectors??[])for(let s of xn(e,n))Ql(s);return e}function xn(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return []}}function Vl(t){for((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value","")),t.textContent="",t.setAttribute("style",`${t.getAttribute("style")??""};background:#000!important;color:#000!important;text-shadow:none!important;border-color:#000!important;`),t.setAttribute("data-mushi-redacted","true");t.firstChild;)t.removeChild(t.firstChild);}function Gl(t){let e=typeof location<"u"?location.origin:"";for(let r of t.querySelectorAll("img, video, iframe, object, embed, picture"))r.remove();for(let r of t.querySelectorAll('link[rel="stylesheet"], link[as="style"]'))r.remove();for(let r of t.querySelectorAll("style")){let n=wn(r.textContent??"",e);n!==r.textContent&&(r.textContent=n);}for(let r of t.querySelectorAll("[style]")){let n=r.getAttribute("style");if(!n)continue;let s=wn(n,e);s!==n&&r.setAttribute("style",s);}for(let r of t.querySelectorAll("script"))r.remove();}function wn(t,e){return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(r,n,s)=>{let o=s.trim();return !o||o.startsWith("data:")||o.startsWith("#")?r:Jl(o,e)?"none":r})}function Xl(t){let e=typeof location<"u"?location.origin:"",r=[],n=[...Array.from(document.styleSheets),...document.adoptedStyleSheets??[]];for(let a of n){let i=a.ownerNode;i instanceof Element&&i.tagName==="STYLE"||r.push(Wo(a));}let s=wn(r.filter(Boolean).join(`
2324
+ `),e);if(!s)return;let o=document.createElement("style");o.textContent=s,(t.querySelector("head")??t).appendChild(o);}function Wo(t){let e;try{e=t.cssRules;}catch{return ""}let r="";for(let n of Array.from(e)){if(n instanceof CSSImportRule){n.styleSheet&&(r+=Wo(n.styleSheet));continue}r+=`${n.cssText}
2325
+ `;}return r}function Yl(t,e,r){try{let n=Math.max(1,Math.floor(e/8)),s=Math.max(1,Math.floor(r/8));for(let o=0;o<r;o+=s)for(let a=0;a<e;a+=n)if(t.getImageData(a,o,1,1).data[3]!==0)return !1;return !0}catch{return false}}function Jl(t,e){if(!t||t.startsWith("data:")||t.startsWith("blob:"))return false;try{let r=new URL(t,typeof location<"u"?location.href:"http://localhost/");return !!e&&r.origin!==e}catch{return true}}function Ql(t){(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value",""),t.setAttribute("placeholder","\u2022\u2022\u2022\u2022")),t.textContent=t.children.length===0?"\u2022\u2022\u2022\u2022":t.textContent,t.setAttribute("style",`${t.getAttribute("style")??""};background:#8f8f8f!important;color:transparent!important;text-shadow:none!important;`),t.setAttribute("data-mushi-masked","true");}function Zl(t){if(!t||!t.tagName)return;let e=t,r=e.tagName.toLowerCase(),n=e.id?`#${e.id}`:"",s=e.classList&&e.classList.length>0?`.${e.classList[0]}`:"";return `${r}${n}${s}`}function En(){let t={},e=[];if(typeof PerformanceObserver<"u"){try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())s.name==="first-contentful-paint"&&(t.fcp=s.startTime);});r.observe({type:"paint",buffered:!0}),e.push(r);}catch{}try{let r=new PerformanceObserver(n=>{let s=n.getEntries();s.length>0&&(t.lcp=s[s.length-1].startTime);});r.observe({type:"largest-contentful-paint",buffered:!0}),e.push(r);}catch{}try{let r=0,n=new PerformanceObserver(s=>{for(let o of s.getEntries())o.hadRecentInput||(r+=o.value??0,t.cls=r);});n.observe({type:"layout-shift",buffered:!0}),e.push(n);}catch{}try{let r=0,n=new PerformanceObserver(s=>{r+=s.getEntries().length,t.longTasks=r;});n.observe({type:"longtask",buffered:!0}),e.push(n);}catch{}try{let r=new Map,n=new PerformanceObserver(s=>{for(let o of s.getEntries()){let a=o.interactionId;if(!a)continue;let i=r.get(a)??0;if(o.duration>i&&r.set(a,o.duration),o.duration>(t.inp??0)){t.inp=o.duration;let l=o.processingStart-o.startTime,f=o.processingEnd-o.processingStart,h=o.startTime+o.duration-o.processingEnd;t.inpAttribution={eventType:o.name,targetSelector:Zl(o.target),inputDelay:Math.max(0,l),processingDuration:Math.max(0,f),presentationDelay:Math.max(0,h)};}}});n.observe({type:"event",durationThreshold:40,buffered:!0}),e.push(n);}catch{}try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())t.fid===void 0&&(t.fid=s.processingStart-s.startTime);});r.observe({type:"first-input",buffered:!0}),e.push(r);}catch{}}if(typeof performance<"u"&&performance.getEntriesByType)try{let r=performance.getEntriesByType("navigation");r.length>0&&r[0]&&(t.ttfb=r[0].responseStart-r[0].requestStart);}catch{}return {getMetrics(){return {...t}},destroy(){for(let r of e)r.disconnect();e.length=0;}}}function kn(){let t=false,e=null,r=null,n=null,s=null;function o(w){let u=w,S=0;for(;u&&S<20;){let k=u.getAttribute?.("data-testid");if(k)return k;u=u.parentElement,S++;}return null}function a(w){let u=[],S=w;for(;S&&S!==document.body;){let k=1,A=S.previousElementSibling;for(;A;)A.tagName===S.tagName&&k++,A=A.previousElementSibling;let y=S.tagName.toLowerCase();u.unshift(k>1?`${y}[${k}]`:y),S=S.parentElement;}return "//"+u.join("/")}function i(w){let u=w.getBoundingClientRect(),S=typeof w.className=="string"?w.className:w.getAttribute("class")??"";return {tagName:w.tagName.toLowerCase(),id:w.id||void 0,className:S||void 0,textContent:w.textContent?.trim().slice(0,200)||void 0,xpath:a(w),rect:{x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height)},nearestTestid:o(w)||void 0,route:typeof window<"u"?window.location.pathname:void 0}}function l(){let w=document.createElement("div");return w.style.cssText=`
2275
2326
  position: fixed;
2276
2327
  pointer-events: none;
2277
2328
  z-index: 2147483647;
2278
- border: 2px solid ${de.accent};
2279
- background: ${de.accentWash};
2329
+ border: 2px solid ${he.accent};
2330
+ background: ${he.accentWash};
2280
2331
  border-radius: 4px;
2281
2332
  transition: all 0.1s ease;
2282
2333
  display: none;
@@ -2286,6 +2337,6 @@
2286
2337
  z-index: 2147483647;
2287
2338
  cursor: crosshair;
2288
2339
  background: transparent;
2289
- `,document.body.appendChild(w),w}function h(w,p){let S=document.elementsFromPoint(w,p),R=null;for(let O of S)if(!(O===r||O===e)){if(O.id==="mushi-mushi-widget"||O.closest("#mushi-mushi-widget"))return null;R=O;break}let y=0;for(;R?.shadowRoot&&y<20;){let O=R.shadowRoot.elementFromPoint(w,p);if(!O||O===R)break;R=O,y++;}return R}function m(w){if(!e)return;let p=w.getBoundingClientRect();e.style.left=`${p.left}px`,e.style.top=`${p.top}px`,e.style.width=`${p.width}px`,e.style.height=`${p.height}px`,e.style.display="block";}function b(w){let p=h(w.clientX,w.clientY);if(!p){n=null,e&&(e.style.display="none");return}n=p,m(p);}function d(w){w.preventDefault(),w.stopPropagation();}function v(w){w.preventDefault(),w.stopPropagation();let p=h(w.clientX,w.clientY);p&&I(i(p));}function x(w){w.key==="Escape"&&I(null);}function C(){n?.isConnected&&m(n);}function I(w){E(),s?.(w),s=null;}function T(){return t&&E(),new Promise(w=>{s=w,t=true,e=l(),r=f(),r.addEventListener("mousemove",b),r.addEventListener("click",v),r.addEventListener("pointerdown",d),r.addEventListener("mousedown",d),r.addEventListener("mouseup",d),document.addEventListener("keydown",x,true),window.addEventListener("scroll",C,{capture:true,passive:true});})}function E(){t&&(t=false,n=null,document.removeEventListener("keydown",x,true),window.removeEventListener("scroll",C,{capture:true}),r&&(r.remove(),r=null),e&&(e.remove(),e=null));}return {activate:T,deactivate:E,isActive:()=>t}}var Co=120;function ln(){let t=[],e=()=>n("hashchange");n("initial");function r(a){t.push(a),t.length>Co&&t.shift();}function n(a){typeof location>"u"||r({ts:Date.now(),kind:"route",payload:{source:a,route:`${location.pathname}${location.search}${location.hash}`,href:location.href}});}function s(a){let i=a.target instanceof Element?a.target:null;if(!i)return;let l=i.closest('button,a,[role="button"],input,textarea,select,[data-mushi-track]')??i;r({ts:Date.now(),kind:"click",payload:{tag:l.tagName.toLowerCase(),id:l.id||void 0,text:Al(l)}});}let o=Te({onPush:()=>n("pushState"),onReplace:()=>n("replaceState"),onPop:()=>n("popstate")});return window.addEventListener("hashchange",e),document.addEventListener("click",s,true),{setScreen(a){r({ts:Date.now(),kind:"screen",payload:a});},getEntries(a={}){return [...t,...(a.consoleLogs??[]).map(l=>({ts:l.timestamp,kind:"log",payload:{level:l.level,message:l.message}})),...(a.networkLogs??[]).map(l=>({ts:l.timestamp,kind:"request",payload:{method:l.method,url:l.url,status:l.status,duration:l.duration,error:l.error}}))].sort((l,f)=>l.ts-f.ts).slice(-Co)},clear(){t.length=0;},destroy(){o(),window.removeEventListener("hashchange",e),document.removeEventListener("click",s,true);}}}function Al(t){let e=(t.textContent??"").replace(/\s+/g," ").trim();return e?e.slice(0,80):void 0}var _l=6e4,Pl=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Dl=/^[0-9a-f]{20,}$/i,Hl=/^\d+$/,Ol=/^[a-z0-9]{16,}$/i;function To(t){return t.length===0?t:Pl.test(t)||Dl.test(t)||Hl.test(t)||Ol.test(t)&&/\d/.test(t)?"[id]":t}function Mo(t,e){let r=t.length>1&&t.endsWith("/")?t.slice(0,-1):t;if(e?.length){let n=Bl(r,e);if(n)return n}return "/"+r.split("/").filter(n=>n.length>0).map(To).join("/")}function Bl(t,e){let r=t.split("/").filter(s=>s.length>0),n=[...e].sort((s,o)=>o.split("/").length-s.split("/").length);for(let s of n){let o=s.split("/").filter(i=>i.length>0);if(o.length!==r.length)continue;let a=true;for(let i=0;i<o.length;i++){let l=o[i],f=r[i];if(!(l.startsWith("[")&&l.endsWith("]"))&&!l.startsWith(":")&&l!==f){a=false;break}}if(a)return "/"+o.join("/")}return null}function Nl(){if(typeof document>"u")return [];let t=new Set,e=document.querySelectorAll("[data-testid]");for(let r of Array.from(e)){let n=r.getAttribute("data-testid");n&&n.length>0&&n.length<120&&t.add(n);}return Array.from(t).sort()}function Fl(){if(typeof window>"u")return [];try{let t=new URLSearchParams(window.location.search),e=new Set;return t.forEach((r,n)=>e.add(n)),Array.from(e).sort()}catch{return []}}function Ul(){if(typeof document>"u")return null;let t=s=>(s??"").replace(/\s+/g," ").trim().slice(0,200),e=t(document.querySelector("h1")?.textContent);if(e)return e;let r=t(document.title);return r||t(document.querySelector("main")?.textContent)||null}async function ql(t){if(!t||typeof crypto>"u"||!crypto.subtle)return null;try{let e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),s="";for(let o=0;o<n.length;o++)s+=n[o].toString(16).padStart(2,"0");return s}catch{return null}}function cn(t){let{config:e,getRecentNetworkPaths:r,getUserId:n,getSessionId:s,onEvent:o}=t,a=e.throttleMs??_l,i=e.captureDomSummary!==false,l=e.userIdSource??"auto",f=new Map,h=null,m=null;async function b(){if(typeof window>"u")return;let I=Mo(window.location.pathname,e.routeTemplates),T=Date.now(),E=f.get(I)??0;if(T-E<a)return;f.set(I,T);let w=null;l==="auto"?w=n()??s():l==="session-only"&&(w=s());let p={route:I,page_title:typeof document<"u"&&(document.title||"").slice(0,300)||null,dom_summary:i?Ul():null,testids:Nl(),network_paths:r().slice(-50),query_param_keys:Fl(),user_id_hash:await ql(w),observed_at:new Date().toISOString()};o(p);}function d(){m||(m=setTimeout(()=>{m=null,b();},100));}function v(){if(typeof window>"u")return;let I=window.location.pathname+window.location.search;I!==h&&(h=I,d());}if(typeof window>"u")return {destroy:()=>{},flushNow:()=>{}};let x=()=>v(),C=Te({onPush:x,onReplace:x,onPop:x});return d(),{destroy(){C(),m&&(clearTimeout(m),m=null),f.clear();},flushNow(){f.clear(),b();}}}function Io(t,e,r){let n=l=>l.timestamp,s=l=>l.type===2,o=l=>l.type===4,a=Date.now()-e,i=0;for(let l=0;l<t.length;l++){let f=n(t[l]);if(typeof f=="number"&&f>=a)break;s(t[l])&&(i=o(t[l-1])?l-1:l);}if(t.length-i>r){for(let l=i+1;l<t.length;l++)if(s(t[l])&&t.length-l<=r){i=o(t[l-1])?l-1:l;break}}i>0&&t.splice(0,i);}function jl(t){let e=[],r=false,n=o=>{if(!r)return;let a=o.target instanceof Element?o.target:null,i=a?.tagName?.toLowerCase()??"unknown",l=a?.closest("[data-testid]")?.getAttribute("data-testid")??void 0;e.push({type:"lite_click",timestamp:Date.now(),data:{tag:i,testId:l}}),e.length>400&&e.shift();},s=()=>{r=false,document.removeEventListener("click",n,true);};return {start(){r||(r=true,document.addEventListener("click",n,true));},stop:s,flush(){let o=Date.now()-t;return e.filter(a=>a.timestamp>=o)},destroy(){s(),e.length=0;}}}var pr=null;async function Wl(){if(pr)return pr;try{return pr=await import('rrweb'),pr}catch{return null}}async function $o(t){let e=t.maxDurationMs??3e4,r=await Wl();if(!r?.record)return jl(e);let n=r.record,s=[],o=null,a=false,i=['input[type="password"]',...t.redactSelectors??[]],l=()=>{o?.(),o=null,a=false;};return {start(){a||(a=true,o=n({emit(f){s.push(f),Io(s,e,400);},maskAllInputs:true,maskAllText:true,maskTextSelector:i.join(","),checkoutEveryNms:e,sampling:{mousemove:false,mouseInteraction:true,scroll:150,media:800}})??null);},stop:l,flush(){return Io(s,e,400),[...s]},destroy(){l(),s.length=0;}}}function Lo(t,e){return new Promise((r,n)=>{let s=new Image;s.onload=()=>{let o=document.createElement("div");o.style.position="relative",o.style.display="inline-block",o.style.maxWidth="100%";let a=document.createElement("canvas"),i=document.createElement("canvas"),l=Math.min(1,720/s.width),f=Math.round(s.width*l),h=Math.round(s.height*l);for(let p of [a,i])p.width=f,p.height=h,p.style.width="100%",p.style.height="auto",p.style.display="block";i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.cursor="crosshair";let m=a.getContext("2d"),b=i.getContext("2d");if(!m||!b){n(new Error("Canvas not supported"));return}m.drawImage(s,0,0,f,h),o.appendChild(a),o.appendChild(i),e.appendChild(o);let d="highlight",v=false,x=null,C=[],I=p=>{let S=i.getBoundingClientRect(),R="touches"in p?p.touches[0]??p.changedTouches[0]:null,y=R?R.clientX:p.clientX,O=R?R.clientY:p.clientY;return {x:(y-S.left)/S.width*f,y:(O-S.top)/S.height*h}},T=()=>{b.clearRect(0,0,f,h);for(let p of C)if(p.tool==="highlight"&&p.points.length>=2){let[S,R]=p.points;b.fillStyle="rgba(255, 230, 0, 0.35)",b.fillRect(Math.min(S.x,R.x),Math.min(S.y,R.y),Math.abs(R.x-S.x),Math.abs(R.y-S.y));}else if(p.tool==="arrow"&&p.points.length>=2){let[S,R]=p.points;b.strokeStyle="#ef4444",b.lineWidth=3,b.beginPath(),b.moveTo(S.x,S.y),b.lineTo(R.x,R.y),b.stroke();}},E=p=>{v=true,x=I(p);},w=p=>{if(!v||!x)return;v=false;let S=I(p);if(d==="blur"){let R=Math.min(x.x,S.x),y=Math.min(x.y,S.y),O=Math.abs(S.x-x.x),N=Math.abs(S.y-x.y);O>=1&&N>=1&&(m.filter="blur(8px)",m.drawImage(a,R,y,O,N,R,y,O,N),m.filter="none");}else C.push({tool:d,points:[x,S]});x=null,T();};i.addEventListener("mousedown",E),i.addEventListener("mouseup",w),i.addEventListener("touchstart",E,{passive:true}),i.addEventListener("touchend",w),r({canvas:a,setTool(p){d=p;},getDataUrl(){let p=document.createElement("canvas");p.width=f,p.height=h;let S=p.getContext("2d");return S?(S.drawImage(a,0,0),S.drawImage(i,0,0),p.toDataURL("image/jpeg",.85)):t},destroy(){i.removeEventListener("mousedown",E),i.removeEventListener("mouseup",w),i.removeEventListener("touchstart",E),i.removeEventListener("touchend",w),o.remove();}});},s.onerror=()=>n(new Error("Failed to load screenshot")),s.src=t;})}function Ao(){try{let t=globalThis;return t.Sentry?t.Sentry:void 0}catch{return}}function zl(){try{return globalThis.__SENTRY_REPLAY__}catch{return}}function Vl(){try{let t=globalThis,e=t.__SENTRY__,r=t.Sentry;return e?.version==="9"||r&&typeof r.lastEventId=="function"?e?.version==="9"?"v9":"v8":e?.version==="8"?"v8":r&&typeof r.getCurrentHub=="function"?"v7":"unknown"}catch{return "unknown"}}function un(t,e={}){let r=Math.max(0,e.breadcrumbsLimit??30),n={},s=Ao();if(!s)return n;n.sdk=Vl();try{let i=s;if(typeof i.lastEventId=="function")n.eventId=i.lastEventId()??void 0;else {let f=s.getCurrentHub?.()?.getScope?.();n.eventId=f?.getLastEventId?.()??void 0;}}catch{}let o;try{let i=s;typeof i.getCurrentScope=="function"?o=i.getCurrentScope():o=s.getCurrentHub?.()?.getScope?.();}catch{}if(o){try{let i=o.getUser?.();i&&(n.user={id:typeof i.id=="string"?i.id:void 0,email:typeof i.email=="string"?i.email:void 0,username:typeof i.username=="string"?i.username:void 0,ip_address:typeof i.ip_address=="string"?i.ip_address:void 0});}catch{}try{let i=o.getTags?.();if(i&&typeof i=="object"){let l={};for(let[f,h]of Object.entries(i))(typeof h=="string"||typeof h=="number"||typeof h=="boolean")&&(l[f]=h);Object.keys(l).length>0&&(n.tags=l);}}catch{}try{n.transactionName=o.getTransactionName?.()??o.getTransaction?.()?.name??void 0;}catch{}try{n.sessionId=o.getSession?.()?.sid??void 0;}catch{}try{let i=o.getBreadcrumbs?.()??o._breadcrumbs??[];if(Array.isArray(i)&&i.length>0){let l=i.slice(-r);n.breadcrumbs=l.map(f=>{let h=f;return {timestamp:typeof h.timestamp=="number"?h.timestamp<1e12?Math.round(h.timestamp*1e3):h.timestamp:void 0,category:typeof h.category=="string"?h.category:void 0,level:typeof h.level=="string"?h.level:void 0,message:typeof h.message=="string"?h.message:void 0,type:typeof h.type=="string"?h.type:void 0,data:h.data&&typeof h.data=="object"?h.data:void 0}});}}catch{}}try{let i=s,l;if(typeof i.getActiveSpan=="function"?l=i.getActiveSpan():o?.getSpan&&(l=o.getSpan()),l){let f=l.spanContext?.();n.traceId=f?.traceId??l.traceId??void 0,n.spanId=f?.spanId??l.spanId??void 0;}}catch{}let a;try{let i=s;typeof i.getClient=="function"?a=i.getClient():a=s.getCurrentHub?.()?.getClient?.();}catch{}if(a){try{let i=a.getOptions?.();i?.release&&(n.release=i.release),i?.environment&&(n.environment=i.environment);}catch{}try{let i=a.getDsn?.();if(i?.host&&i?.projectId&&n.eventId){let l=i.host.replace(/^o\d+\./,"");n.issueUrl=`https://${l}/issues/?query=${encodeURIComponent(n.eventId)}`;}}catch{}}try{let l=s.getReplay?.()??zl();n.replayId=l?.getReplayId?.()??void 0;}catch{}return n}function dn(t,e={}){let r=Ao();if(r){try{let n=r;typeof n.setTag=="function"&&(n.setTag("mushi.report_id",t),e.reportUrl&&n.setTag("mushi.report_url",e.reportUrl)),typeof n.setContext=="function"&&n.setContext("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{},captured_at:new Date().toISOString()}),typeof n.addBreadcrumb=="function"&&n.addBreadcrumb({category:"mushi",type:"info",level:"info",message:`Mushi report submitted (${t})`,data:{report_id:t,...e.reportUrl?{url:e.reportUrl}:{}}});}catch{}try{let s=r.getCurrentHub?.()?.getScope?.();s&&(s.setTag?.("mushi.report_id",t),e.reportUrl&&s.setTag?.("mushi.report_url",e.reportUrl),s.setContext?.("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{}}));}catch{}}}var Kl=["/login","/logout","/signup","/sso/*","/auth/*"];function Po(t,e={}){let r=[];if(e.rageClick!==false){let x=function(C){let I=Date.now();if(C.target===v){if(d.push(I),d=d.filter(T=>I-T<500),d.length>=3){let T=C.target;t.onTrigger("rage_click",{element:T.tagName,id:T.id,text:T.textContent?.slice(0,50)}),d=[];}}else v=C.target,d=[I];};let d=[],v=null;document.addEventListener("click",x,true),r.push(()=>document.removeEventListener("click",x,true));}if(e.longTask!==false&&typeof PerformanceObserver<"u")try{let d=new PerformanceObserver(v=>{for(let x of v.getEntries())x.duration>5e3&&t.onTrigger("long_task",{duration:Math.round(x.duration),startTime:Math.round(x.startTime)});});d.observe({entryTypes:["longtask"]}),r.push(()=>d.disconnect());}catch{}let n=Gl(e.apiCascade);if(n.enabled){let d=[],v=globalThis.fetch;globalThis.fetch=async function(...x){let[C,I]=x,T=cr(C),E=!!ur(C,I)||dr(T,{apiEndpoint:e.apiEndpoint,ignoreUrls:n.ignoreUrls});try{let w=await v.apply(this,x);return !E&&!w.ok&&w.status>=400&&_o(d,t),w}catch(w){throw E||_o(d,t),w}},r.push(()=>{globalThis.fetch=v;});}if((e.pageDwell===true||typeof e.pageDwell=="object"&&e.pageDwell!==null)&&typeof window<"u"){let T=function(R){return x.some(y=>y.endsWith("/*")?R.startsWith(y.slice(0,-2)):R===y||R.startsWith(y+"/"))},E=function(){let R=window.location?.pathname??"";T(R)||t.onTrigger("page_dwell",{thresholdMs:v,path:R});},w=function(){C&&clearTimeout(C);let R=window.location?.pathname??"";T(R)||(C=setTimeout(E,v));},p=function(){let R=window.location?.pathname??"";R!==I&&(I=R,w());};let d=typeof e.pageDwell=="object"?e.pageDwell??{}:{},v=d.thresholdMs||300*1e3,x=d.excludeRoutes!==void 0?d.excludeRoutes:Kl,C=null,I=window.location?.pathname??"";w();let S=Te({onPush:p,onReplace:p,onPop:p});r.push(()=>{C&&clearTimeout(C),S();});}if((e.firstSession===true||typeof e.firstSession=="object"&&e.firstSession!==null)&&typeof window<"u"){let d=typeof e.firstSession=="object"?e.firstSession??{}:{},v=d.delayMs??45*1e3,x=d.storageKey??(e.projectId?`mushi:${e.projectId}:firstSessionShown`:"mushi:firstSessionShown"),C=false;try{C=window.localStorage?.getItem(x)==="1";}catch{}if(!C){let I=setTimeout(()=>{try{window.localStorage?.setItem(x,"1");}catch{}t.onTrigger("first_session",{delayMs:v});},v);r.push(()=>clearTimeout(I));}}if(e.errorBoundary){let d=function(x){t.onTrigger("error_boundary",{message:x.message,filename:x.filename,lineno:x.lineno,colno:x.colno});},v=function(x){t.onTrigger("error_boundary",{message:x.reason instanceof Error?x.reason.message:String(x.reason),type:"unhandled_rejection"});};window.addEventListener("error",d),window.addEventListener("unhandledrejection",v),r.push(()=>{window.removeEventListener("error",d),window.removeEventListener("unhandledrejection",v);});}return {destroy(){r.forEach(d=>d());}}}function Gl(t){return t===false?{enabled:false,ignoreUrls:[]}:t&&typeof t=="object"?{enabled:t.enabled!==false,ignoreUrls:t.ignoreUrls??[]}:{enabled:true,ignoreUrls:[]}}function _o(t,e){let r=Date.now();t.push(r);let n=t.filter(s=>r-s<1e4);n.length>=3&&(e.onTrigger("api_cascade",{failureCount:n.length,windowMs:1e4}),t.length=0);}var Do="mushi:lastDismiss",hr="mushi:consecDismiss",pn="mushi:lastShown";function fr(t){try{return localStorage.getItem(t)}catch{return null}}function mr(t,e){try{localStorage.setItem(t,e);}catch{}}function Ho(t={}){let e=t.maxProactivePerSession??2,r=t.dismissCooldownHours??24,n=t.suppressAfterDismissals??3,s=(t.reshowCooldownMinutes??30)*60*1e3,o=0,a=new Set;function i(m){let b=Date.now();if(parseInt(fr(hr)??"0",10)>=n)return false;let v=fr(Do);if(v&&b-parseInt(v,10)<r*60*60*1e3)return false;if(s>0&&o===0){let x=fr(pn);if(x&&b-parseInt(x,10)<s)return false}return o>=e||a.has(m)?false:(a.add(m),o++,mr(pn,String(b)),true)}function l(){mr(Do,String(Date.now()));let m=parseInt(fr(hr)??"0",10);mr(hr,String(m+1));}function f(){mr(hr,"0");}function h(){o=0,a.clear();try{localStorage.removeItem(pn);}catch{}}return {shouldShow:i,recordDismissal:l,recordSubmission:f,reset:h}}function Oo(t,e){if(t.appVersion)return t.appVersion;let r=t.integrations?.vercel?.analyticsId;return r||e?.buildId}var Me=null,gr=class{constructor(){}static init(e){if(Me)return Yt({scope:"mushi",level:"warn",format:"pretty"}).warn("Already initialized \u2014 call destroy() first to reinitialize"),Me;if(typeof document>"u"||typeof window>"u")return No();let r={...$r(),...e};if(!r.projectId||!r.apiKey){let n=us();throw new Error(n.message??"[mushi] projectId and apiKey are required \u2014 set NEXT_PUBLIC_MUSHI_* / VITE_MUSHI_* / MUSHI_* or pass them explicitly")}return r.enabled===false?No():(Me=Yl(r),Me)}static getInstance(){return Me}static destroy(){Me?.destroy(),Me=null;}static diagnose(){return Me?.diagnose()??fn()}};function Yl(t){ps(t);let e=ds(t),r=e.projectId,n=()=>oe(r),s=e,o=t.debug??false?Yt({scope:"mushi",level:"debug",format:"pretty"}):Lr,a=null,i=null,l=cs({projectId:e.projectId,apiKey:e.apiKey,...e.apiEndpoint?{apiEndpoint:e.apiEndpoint}:{},...typeof e.timeout=="number"?{timeout:e.timeout}:{},...typeof e.maxRetries=="number"?{maxRetries:e.maxRetries}:{},...e.circuitBreaker?{circuitBreaker:e.circuitBreaker}:{},getUserToken:()=>a,sdkPackage:He,sdkVersion:pe});e.trackSessions!==false&&Ss({client:l,sdkVersion:pe,reporterTokenHash:oe(e.projectId)??null});let f=hs(e.preFilter),h=ys(e.offline),m=Rs({maxBurst:10,refillRate:1,refillIntervalMs:5e3}),b=Ts();function d(c){return c.map(u=>{let k={...u};if(typeof u.message=="string"&&(k.message=b.scrub(u.message)),u.data&&typeof u.data=="object"){let H={};for(let[L,F]of Object.entries(u.data))H[L]=typeof F=="string"?b.scrub(F):F;k.data=H;}return k})}function v(c){if(!c)return;let u={};for(let[k,H]of Object.entries(c))u[k]=typeof H=="string"?b.scrub(H):H;return u}let x=null,C=null,I=null,T=null,E=null,w=null,p=ln(),S=null,R=0,y,O=`mushi:tester-jwt:${e.projectId}`;function N(){try{return typeof localStorage<"u"?localStorage.getItem(O):null}catch{return null}}function X(){try{typeof localStorage<"u"&&localStorage.removeItem(O);}catch{}}async function j(c){let u=await l.getTesterStatus(c);if(!u.ok||!u.data){X();return}let k=u.data;if(!k.is_tester||!k.tester_id){X();return}y.setTesterSession(c,{id:k.tester_id,public_handle:k.public_handle??null,display_name:k.display_name??null});let H=await l.getMyReputation(c);if(H.ok&&H.data){let L=H.data;L.reputation&&y.setTesterReputation(L.reputation);}}function V(){if(s.capture?.console!==false?x??=Qr():(x?.destroy(),x=null),s.capture?.network!==false){let L={apiEndpoint:hn(s),ignoreUrls:s.capture?.ignoreUrls,tracePropagation:s.capture?.tracePropagation,sessionId:nt()};C?C.updateOptions(L):C=tn(L);}else C?.destroy(),C=null;if(s.capture?.performance!==false?I??=on():(I?.destroy(),I=null),s.capture?.screenshot!=="off"){let L={privacy:s.privacy,onFailed:()=>y.setScreenshotError(true)};s.capture?.screenshotProvider?T=null:T?T.updateOptions(L):T=sn(L);}else T=null;!T&&!s.capture?.screenshotProvider&&($=null),y.setAllowScreenshotRemove(s.privacy?.allowUserRemoveScreenshot!==false),s.capture?.elementSelector!==false?E??=an():(E?.deactivate(),E=null,ee=null),y.setCaptureAvailability({screenshot:(!!T||!!s.capture?.screenshotProvider)&&s.capture?.screenshot!=="off",element:!!E});let c=s.capture?.discoverInventory,u=c===true?{}:c&&typeof c=="object"?c:null;u!=null&&u.enabled!==false?(w?.destroy(),w=cn({config:u,getRecentNetworkPaths:()=>C?C.getEntries().map(L=>{try{let F=new URL(L.url,typeof window<"u"?window.location.href:"http://localhost");return F.host&&typeof window<"u"&&F.host!==window.location.host?null:F.pathname}catch{return null}}).filter(L=>L!=null&&L.length>0&&L.length<200):[],getUserId:()=>M?.id??null,getSessionId:nt,onEvent:L=>{l.postDiscoveryEvent({...L,sdk_version:pe}).catch(F=>{o.debug("discovery emit failed",{err:String(F)});});}})):(w?.destroy(),w=null);let H=s.capture?.replay??"off";if(H==="rrweb"||H==="lite"){let L=++R;$o({redactSelectors:s.privacy?.redactSelectors}).then(F=>{if(L!==R){F.destroy();return}S?.destroy(),S=F,S.start();});}else R++,S?.destroy(),S=null;}let B=new Map;function P(c,u){B.get(c)?.forEach(k=>k({type:c,data:u}));}let $=null,ee=null,Q=null,A=false,_=true,D=null,U=null,M=null,he=null,Ne={},ie={},q=Ms({max:50});q.add({category:"lifecycle",level:"info",message:"Mushi SDK init",data:{projectId:e.projectId,sdkVersion:pe}});let te=null;te=oc(q);let ae=false;function Ie(){y.refreshReporterInboxQuiet();}function W(){D&&clearInterval(D),D=null,U&&typeof document<"u"&&document.removeEventListener("visibilitychange",U),U=null;}function pt(){if(W(),!_)return;D=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||Ie();},6e4),typeof document<"u"&&(U=()=>{document.visibilityState==="visible"&&Ie();},document.addEventListener("visibilitychange",U)),Ie();}function Mt(c,u){if(!s.rewards?.enabled)return;let k={client:l,config:s.rewards,projectId:r,userId:c,traits:u,reporterToken:n()};bo(k),s.rewards.showInWidget!==false&&l.getMyPoints(c).then(H=>{if(!H.ok)return;let L=H.data;y.setRewardsState({tier:L.tier?{slug:L.tier.slug??"free",displayName:L.tier.display_name??"Free",pointsThreshold:L.tier.points_threshold??0}:null,nextTier:L.next_tier?{displayName:L.next_tier.display_name??"",pointsThreshold:L.next_tier.points_threshold??0}:null,totalPoints:L.total_points??0,pointsForReport:L.report_submit_pts??50});}).catch(()=>{});}async function We(){if(ae)return null;let c=s.capture?.screenshotProvider;if(c){ae=true;try{let L=await c();if(L)return L}catch(L){o.warn("screenshotProvider threw, falling back to built-in capturer",{error:L instanceof Error?L.message:String(L)});}finally{ae=false;}}if(!T)return null;ae=true;let u=y.getIsOpen();u&&y.hidePanel();let k=document.getElementById("mushi-mushi-widget"),H=k?.style.visibility??"";k&&(k.style.visibility="hidden"),await new Promise(L=>{requestAnimationFrame(()=>requestAnimationFrame(()=>L()));});try{return await T.take()}finally{ae=false,k&&(k.style.visibility=H),u&&y.showPanel();}}async function br(c){let u=s.capture?.screenshot;!(T||s.capture?.screenshotProvider)||u==="off"||$||c==="open"&&u!=="auto"||c==="submit"&&u!=="on-report"&&u!=="auto"||(o.debug("Auto-capturing screenshot",{when:c,mode:u}),$=await We(),y.setScreenshotAttached($!==null),y.setScreenshotPreview($));}y=new nr(e.widget,{onSubmit:async({category:c,userCategory:u,description:k,intent:H})=>(o.info("Report submitted",{category:c,userCategory:u,intent:H}),ht?.recordSubmission(),await br("submit"),await jo(c,k,H,u)??{reportId:null,queuedOffline:true}),onOpen:()=>{o.debug("Widget opened"),br("open"),S?.start(),P("widget:opened");},onClose:()=>{o.debug("Widget closed"),Q&&(ht?.recordDismissal(),P("proactive:dismissed",{type:Q})),$=null,ee=null,Q=null,P("widget:closed");},onScreenshotRequest:async()=>{if(!(!!T||!!s.capture?.screenshotProvider)||s.capture?.screenshot==="off"){o.warn("Screenshot requested but capture is disabled"),y.setScreenshotError(true);return}o.debug("Taking screenshot"),y.setScreenshotCapturing(true);try{$=await We();}catch(u){o.warn("Screenshot capture threw",{error:u instanceof Error?u.message:String(u)}),$=null;}y.setScreenshotAttached($!==null),y.setScreenshotPreview($),$===null&&y.setScreenshotError(true);},onScreenshotRemove:()=>{o.debug("Screenshot attachment removed"),$=null,y.setScreenshotAttached(false);},onScreenshotAnnotateRequest:async c=>{if(!$||c.childElementCount>0)return;let u;try{u=await Lo($,c);}catch(re){o.warn("Screenshot annotation failed",{error:re instanceof Error?re.message:String(re)});return}let k=document.createElement("div");k.className="mushi-annotate-toolbar";let H=re=>{($=u.getDataUrl(),y.setScreenshotAttached(true),y.setScreenshotPreview($)),u.destroy(),k.remove();},L=[{id:"highlight",label:"\u270F\uFE0F Highlight"},{id:"blur",label:"\u{1F512} Blur"},{id:"arrow",label:"\u2197\uFE0F Arrow"}];for(let re of L){let K=document.createElement("button");K.type="button",K.className="mushi-attach-btn",K.dataset.tool=re.id,K.textContent=re.label,K.addEventListener("click",()=>{u.setTool(re.id),k.querySelectorAll("button[data-tool]").forEach(le=>le.classList.remove("active")),K.classList.add("active");}),k.appendChild(K);}k.querySelector('button[data-tool="highlight"]')?.classList.add("active");let F=document.createElement("button");F.type="button",F.className="mushi-attach-btn",F.textContent="\u2713 Done",F.addEventListener("click",()=>H()),k.appendChild(F),c.insertBefore(k,c.firstChild);},onElementSelectorRequest:async()=>{if(!E||s.capture?.elementSelector===false){o.warn("Element selector requested but it is disabled/unavailable"),y.setElementError(true);return}o.debug("Element selector activated"),y.setElementCapturing(true),y.hidePanel();try{let c=await E.activate();c?(ee=c,y.setElementSelected(!0),o.debug("Element selected",{tagName:c.tagName,xpath:c.xpath})):y.setElementCapturing(!1);}catch(c){o.warn("Element selector threw",{error:c instanceof Error?c.message:String(c)}),y.setElementError(true);}finally{y.showPanel();}},async onReporterReportsRequest(){let c=await l.listReporterReports(oe(r));if(!c.ok)throw new Error(c.error?.message??"Could not load reports");return c.data?.reports??[]},async onReporterCommentsRequest(c){let u=await l.listReporterComments(c,oe(r));if(!u.ok)throw new Error(u.error?.message??"Could not load thread");return u.data?.comments??[]},async onReporterReply(c,u){let k=await l.replyToReporterReport(c,oe(r),u);if(!k.ok)throw new Error(k.error?.message??"Could not send reply")},async onReporterFeedback(c,u,k){let H=await l.replyToReporterReport(c,oe(r),k??"",u);if(!H.ok)throw new Error(H.error?.message??"Could not send feedback");return H.data?.feedback??null},async onReporterReopen(c,u){let k=await l.reopenReporterReport(c,oe(r),u);if(!k.ok)throw new Error(k.error?.message??"Could not reopen report");return k.data?.outcome??null},async onFeatureBoardRequest(){let c=await l.listReporterFeatureBoard(oe(r));if(!c.ok)throw new Error(c.error?.message??"Could not load community ideas");return c.data?.tickets??[]},async onFeatureBoardVote(c){let u=await l.voteReporterFeatureBoard(c,oe(r));if(!u.ok)throw new Error(u.error?.message??"Could not vote");return u.data??{voted:true,action:"added"}},onLeaderboardOpen(){y.setLeaderboard(null,true),vo(10).then(c=>{y.setLeaderboard(c,false);});},async onMushiSignIn(c){let u=await l.sendMagicLink(c);if(!u.ok)throw new Error(u.error?.message??"Could not send sign-in link");return {ok:true}},async onGlobalLeaderboardOpen(){y.setGlobalLeaderboard(null,true);try{let c=N(),u=await l.getPublicLeaderboard(50),H=(u.ok?u.data?.leaderboard??[]:[]).map(L=>({tester_id:L.tester_id,rank:L.rank,public_handle:L.public_handle,display_name:L.display_name,points_30d:L.points_30d,total_points:L.total_points??0,badge:L.badge_slug}));if(y.setGlobalLeaderboard(H,!1),c){let L=await l.getMyReputation(c);if(L.ok&&L.data){let F=L.data;F.reputation&&y.setTesterReputation(F.reputation);}}}catch{y.setGlobalLeaderboard([],false);}},async onCrossAppReportsOpen(){let c=N();if(!c){y.setCrossAppReports([],false);return}try{let u=await l.getCrossAppReports(c),k=u.ok?u.data?.reports??[]:[];y.setCrossAppReports(k,!1);}catch{y.setCrossAppReports([],false);}},onTesterSignOut(){X();},assistantEnabled:e.assistant?.enabled===true,...e.assistant?.label?{assistantLabel:e.assistant.label}:{},...e.assistant?.greeting?{assistantGreeting:e.assistant.greeting}:{},...e.assistant?.suggestions?{assistantSuggestions:e.assistant.suggestions}:{},async onAssistantAsk(c,u){let k=await l.askAssistant({message:c,threadId:u,context:i});return k.ok?k.data??null:null}},pe),V(),typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>y.mount()):y.mount());let gn=N();gn&&j(gn).catch(()=>X());let bn=null,ht=null,J=s.proactive;J&&(J.rageClick!==false||J.longTask!==false||J.apiCascade!==false||J.errorBoundary===true||J.pageDwell||J.firstSession)&&typeof document<"u"&&(ht=Ho(J?.cooldown),bn=Po({onTrigger:(c,u)=>{if(typeof navigator<"u"&&!navigator.onLine){o.debug("Proactive trigger suppressed: offline",{type:c});return}if(!ht.shouldShow(c)){o.debug("Proactive trigger suppressed by fatigue prevention",{type:c});return}o.info("Proactive trigger fired",{type:c,context:u}),Q=c,P("proactive:triggered",{type:c,context:u}),c==="first_session"?y.pulseTrigger?.():y.open();}},{rageClick:J?.rageClick,longTask:J?.longTask,apiCascade:J?.apiCascade,apiEndpoint:hn(s),errorBoundary:J?.errorBoundary,pageDwell:J?.pageDwell,firstSession:J?.firstSession,projectId:e.projectId}),o.debug("Proactive triggers enabled",{rageClick:J?.rageClick!==false,longTask:J?.longTask!==false,apiCascade:J?.apiCascade!==false,errorBoundary:J?.errorBoundary===true,pageDwell:!!J?.pageDwell,firstSession:!!J?.firstSession})),h.startAutoSync(l),h.flush(l).then(c=>{c.sent>0&&o.info("Synced offline reports",{sent:c.sent});});function yr(c){if(A=true,_=c.reporterNotificationsEnabled!==false,c.enabled===false){s=e,tc(t.projectId),V(),y.updateConfig(s.widget),W(),o.debug("Runtime SDK config disabled; using bootstrap config",{version:c.version});return}s=oo(s,c),V(),c.widget&&y.updateConfig(s.widget),_?pt():W(),o.debug("Applied runtime SDK config",{version:c.version});}if(Xl(t)){let c=Ql(t.projectId);c&&yr(c),l.getSdkConfig().then(u=>{u.ok&&u.data?(ec(t.projectId,u.data),yr(u.data)):u.error&&o.debug("Runtime SDK config unavailable",u.error);}).catch(u=>{o.debug("Runtime SDK config fetch failed",{error:u instanceof Error?u.message:String(u)});});}else o.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");qo(),pt(),o.info("Initialized",{projectId:t.projectId});async function qo(){if(s.widget?.outdatedBanner==="off")return;let c=rc(He);c&&yn(c);let u=await l.getLatestSdkVersion(He);!u.ok||!u.data||(nc(He,u.data),yn(u.data));}function yn(c){let u=c.latest,k=!!(u&&sc(pe,u));if(!k&&!c.deprecated)return;let H=c.deprecationMessage??(k?`Update ${He} to ${u}.`:null);o.warn("Mushi SDK is outdated",{package:He,current:pe,latest:u,deprecated:c.deprecated,message:H}),s.widget?.outdatedBanner!=="console-only"&&y.setSdkFreshness({latest:u,current:pe,deprecated:c.deprecated,message:H});}async function jo(c,u,k,H){let L=f.check(u);if(!L.passed){o.info("Report blocked by pre-filter",{reason:L.reason});return}let F=t.preFilter?.wasmClassifier;if(F)try{let Y=await F.classify({description:u,category:c,url:typeof location<"u"?location.href:void 0,hasScreenshot:$!==null,hasSelectedElement:ee!==null,hasNetworkErrors:C?.getEntries()?.some(ve=>ve.status>=400||!!ve.error)??!1,hasConsoleErrors:x?.getEntries()?.some(ve=>ve.level==="error")??!1,proactiveTrigger:Q??void 0});if(Y.verdict==="block"){o.info("Report blocked by on-device classifier",{modelId:Y.modelId,confidence:Y.confidence,reason:Y.reason});return}o.debug("On-device classifier verdict",{...Y});}catch(Y){o.warn("On-device classifier threw \u2014 falling through to server",{error:Y instanceof Error?Y.message:String(Y)});}if(!m.tryConsume()){o.warn("Report throttled \u2014 rate limit exceeded");return}let re=b.scrub(f.truncate(u)),K=t.sentry?un(t.sentry):void 0,le=await vs().catch(()=>null),ye=s.capture?.console===false?void 0:x?.getEntries(),$e=s.capture?.network===false?void 0:C?.getEntries(),Le=d(q.getAll()),It=v(Object.keys(ie).length>0?{...ie}:void 0),Sn=K?{...K,...K.breadcrumbs?{breadcrumbs:d(K.breadcrumbs)}:{},...K.tags?{tags:v(K.tags)}:{}}:void 0,En=$?await zs($).catch(()=>null):null,vr=false;$&&!En&&(vr=true,o.warn("Screenshot dropped \u2014 could not compress under wire budget"));let kn=Ar(),Se={id:_r(),projectId:t.projectId,category:c,...H?{userCategory:H}:{},description:re,userIntent:k,environment:kn,consoleLogs:ye,networkLogs:$e,performanceMetrics:s.capture?.performance===false?void 0:I?.getMetrics(),timeline:p.getEntries({consoleLogs:ye,networkLogs:$e}),screenshotDataUrl:En??void 0,selectedElement:ee??void 0,...S?{replayEvents:S.flush()}:{},metadata:{...Ne,...M?{user:M}:{},...K?.release?{sentryRelease:K.release}:{}},sessionId:nt(),reporterToken:oe(r),...le?{fingerprintHash:le}:{},appVersion:Oo(s,kn),sdkPackage:He,sdkVersion:pe,proactiveTrigger:Q??void 0,...Le.length>0?{breadcrumbs:Le}:{},...It?{tags:It}:{},...Sn?{sentryContext:Sn}:{},sentryEventId:K?.eventId,sentryReplayId:K?.replayId,createdAt:new Date().toISOString()};if(q.add({category:"lifecycle",level:"info",message:`Mushi report submitting (${c})`,data:{reportId:Se.id,category:c}}),t.integrations?.custom){let Y={addMetadata(ve,Wo){Se.metadata[ve]=Wo;},setCategory(ve){Se.category=ve;},setDescription(ve){Se.description=ve;}};t.integrations.custom(Y);}let z=Se;if(t.beforeSendFeedback)try{let Y=await Promise.race([Promise.resolve(t.beforeSendFeedback(Se)),new Promise(ve=>setTimeout(()=>ve(Se),2e3))]);if(Y===null){o.info("Report dropped by beforeSendFeedback hook",{reportId:Se.id});return}z=Y;}catch(Y){o.warn("beforeSendFeedback hook threw \u2014 sending unmodified report",{error:Y instanceof Error?Y.message:String(Y)});}if(P("report:submitted",{reportId:z.id}),typeof navigator<"u"&&!navigator.onLine)return await h.enqueue(z),o.info("Offline \u2014 report queued",{reportId:z.id}),P("report:queued",{reportId:z.id}),{reportId:null,queuedOffline:true};let G=await l.submitReport(z);if(!G.ok&&G.error?.code==="PAYLOAD_TOO_LARGE"&&(Array.isArray(z.replayEvents)&&z.replayEvents.length>0&&(o.warn("Report too large \u2014 dropping replay buffer and retrying",{reportId:z.id}),z={...z,replayEvents:void 0},G=await l.submitReport(z)),!G.ok&&G.error?.code==="PAYLOAD_TOO_LARGE"&&z.screenshotDataUrl&&(o.warn("Report still too large \u2014 dropping screenshot and retrying",{reportId:z.id}),vr=true,z={...z,screenshotDataUrl:void 0},G=await l.submitReport(z))),G.ok){if(o.info("Report sent",{reportId:G.data?.reportId}),P("report:sent",{reportId:G.data?.reportId}),Ie(),G.data?.cursorAgentId){let Y=G.data;P("report:dispatched",{reportId:Y.reportId,agentId:Y.cursorAgentId,fixId:Y.fixId});}q.add({category:"lifecycle",level:"info",message:`Mushi report sent (${G.data?.reportId??Se.id})`}),dt({action:"report_submit",metadata:{category:c,reportId:G.data?.reportId??Se.id}});try{t.sentry&&G.data?.reportId&&dn(G.data.reportId);}catch{}}else G.error?.code==="PAYLOAD_TOO_LARGE"||G.error?.code==="SERIALIZE_FAILED"?(o.warn("Report exceeds size limit after degradation \u2014 dropping",{reportId:z.id,error:G.error}),P("report:failed",{reportId:z.id,error:G.error}),q.add({category:"lifecycle",level:"error",message:`Mushi report dropped \u2014 payload too large (${z.id})`})):(o.warn("Report failed, queuing for retry",{reportId:z.id,error:G.error}),await h.enqueue(z),P("report:failed",{reportId:z.id,error:G.error}),q.add({category:"lifecycle",level:"warning",message:`Mushi report queued for retry (${z.id})`}));return $=null,ee=null,Q=null,G?.ok?{reportId:G.data?.reportId??Se.id,queuedOffline:false,screenshotDropped:vr}:{reportId:null,queuedOffline:true}}let vn={report(c){y.open(c);},on(c,u){return B.has(c)||B.set(c,new Set),B.get(c).add(u),()=>B.get(c)?.delete(u)},setUser(c){M=c;},setMetadata(c,u){Ne[c]=u;},setScreen(c){p.setScreen(c);},isOpen(){return y.getIsOpen()},open(){y.open();},openWith(c){y.open({category:c});},show(){y.showTrigger();},hide(){y.hideTrigger();},attachTo(c,u){return y.attachTo(c,u)},setTrigger(c){y.setTrigger(c);},openReporter(){y.openReporter();},close(){y.close();},updateConfig(c){yr(c);},diagnose(){return Jl({apiEndpoint:hn(s),widgetMounted:y.getIsMounted(),runtimeConfigLoaded:A,captureScreenshotAvailable:T!==null,captureNetworkIntercepting:C!==null,widgetDiagnostics:y.getWidgetDiagnostics()})},destroy(){bn?.destroy(),ht?.reset(),y.destroy(),x?.destroy(),C?.destroy(),I?.destroy(),E?.deactivate(),xo(),te?.(),te=null,w?.destroy(),w=null,p.destroy(),lo(),S?.destroy(),S=null,h.stopAutoSync(),W(),ks(),q.clear(),B.clear(),Me=null,o.debug("Destroyed");},async captureEvent(c){if(!m.tryConsume())return o.warn("captureEvent throttled \u2014 rate limit exceeded"),null;let u=b.scrub(f.truncate(c.description)),k=c.category??"bug",H=t.sentry?un(t.sentry):void 0,L=d(q.getAll()),F=v(Object.keys(ie).length===0&&!c.tags?void 0:{...ie,...c.tags??{}}),re=H?{...H,...H.breadcrumbs?{breadcrumbs:d(H.breadcrumbs)}:{},...H.tags?{tags:v(H.tags)}:{}}:void 0,K=Ar(),le={id:_r(),projectId:t.projectId,category:k,description:u,environment:K,timeline:p.getEntries(),metadata:{...c.metadata??{},...M?{user:M}:{},...c.error?{error:c.error}:{},...c.severity?{severity:c.severity}:{},...c.component?{component:c.component}:{},...c.source?{source:c.source}:{source:"captureEvent"}},...L.length>0?{breadcrumbs:L}:{},...F&&Object.keys(F).length>0?{tags:F}:{},...re?{sentryContext:re}:{},sessionId:nt(),reporterToken:oe(r),appVersion:Oo(s,K),sdkPackage:He,sdkVersion:pe,sentryEventId:H?.eventId,sentryReplayId:H?.replayId,createdAt:new Date().toISOString()},ye=le;if(s.beforeSendFeedback)try{let Le=await Promise.race([Promise.resolve(s.beforeSendFeedback(le)),new Promise(It=>setTimeout(()=>It(le),2e3))]);if(Le===null)return o.info("captureEvent dropped by beforeSendFeedback hook",{reportId:le.id}),null;ye=Le;}catch(Le){o.warn("captureEvent beforeSendFeedback threw \u2014 sending unmodified report",{error:Le instanceof Error?Le.message:String(Le)});}if(P("report:submitted",{reportId:ye.id}),typeof navigator<"u"&&!navigator.onLine)return await h.enqueue(ye),P("report:queued",{reportId:ye.id}),null;let $e=await l.submitReport(ye);if($e.ok){P("report:sent",{reportId:$e.data?.reportId});try{t.sentry&&$e.data?.reportId&&dn($e.data.reportId);}catch{}return $e.data?.reportId??null}return await h.enqueue(ye),P("report:failed",{reportId:ye.id,error:$e.error}),null},async captureException(c,u){let k=Is(c);q.add({category:"lifecycle",level:"error",message:`Mushi.captureException(${k.name}): ${k.message}`,...k.stack?{data:{stack:k.stack.slice(0,500)}}:{}});let H=u?.description?.trim()||`${k.name}: ${k.message}`||"Uncaught exception";return vn.captureEvent({description:H,category:u?.category??"bug",severity:u?.severity??"high",...u?.component?{component:u.component}:{},...u?.tags?{tags:u.tags}:{},source:u?.source??"captureException",error:{name:k.name,message:k.message,...k.stack?{stack:k.stack}:{}},metadata:{...u?.metadata??{},...k.cause?{cause:k.cause}:{}}})},identify(c,u){let k=`${c}::${u?JSON.stringify(u):""}`;if(k!==he){if(he=k,M={id:c,...u?.email?{email:u.email}:{},...u?.name?{name:u.name}:{}},y.setIdentifiedUser(M.name||M.email?{name:M.name,email:M.email}:null),u)for(let[H,L]of Object.entries(u))H!=="email"&&H!=="name"&&(Ne[`user.${H}`]=L);q.add({category:"lifecycle",level:"info",message:`Mushi.identify(${c})`}),Mt(c,u?{email:u.email,name:u.name,provider:u.provider}:void 0);}},identifyWithToken(c){if(a=c&&typeof c=="string"?c:null,a){let u=Hs(a);if(u?.sub){if(M?.id===u.sub){q.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken() refreshed"});return}Es(u.sub),M={id:u.sub,...u.email?{email:u.email}:{},...u.name?{name:u.name}:{}},y.setIdentifiedUser(M.name||M.email?{name:M.name,email:M.email}:null),Mt(M.id,{email:M.email,name:M.name});}q.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken()"});}else M=null,he=null,y.setIdentifiedUser(null),q.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken(null)"});},publishPageContext(c){i=c&&c.route?c:null;},openAssistant(){y.openAssistantTab();},addBreadcrumb(c){q.add(c);},getBreadcrumbs(){return q.getAll()},setTag(c,u){typeof c!="string"||c.length===0||(ie[c]=u);},setTags(c){if(!(!c||typeof c!="object"))for(let[u,k]of Object.entries(c))typeof u=="string"&&u.length>0&&(ie[u]=k);},clearTag(c){if(typeof c=="string"&&c.length>0){delete ie[c];return}for(let u of Object.keys(ie))delete ie[u];},async getReputation(){if(!M?.id)return null;let c=await l.getMyPoints(M.id);return c.ok?{totalPoints:c.data.total_points??0,points30d:c.data.points_30d??0,reputation:1,confirmedBugs:0,totalReports:0}:null},async getTier(){return M?.id?yo(M.id):null},recordActivity(c,u){s.rewards?.enabled&&dt({action:c,metadata:u});},pulseTrigger(){y.pulseTrigger?.();},async listMyReports(){let c=await l.listReporterReports(oe(r));return c.ok?c.data?.reports??[]:[]},async listMyComments(c){let u=await l.listReporterComments(c,oe(r));return u.ok?u.data?.comments??[]:[]},async replyToReport(c,u){let k=await l.replyToReporterReport(c,oe(r),u);return k.ok?k.data?.comment??null:null},async submitFeedbackSignal(c,u,k){let H=await l.replyToReporterReport(c,oe(r),k??"",u);return H.ok?H.data?.feedback??null:null},async reopenReport(c,u){let k=await l.reopenReporterReport(c,oe(r),u);return k.ok?k.data?.outcome??null:null},openMyReports(){y.recorderOpenMyReports();},async getHallOfFame(c=20){let u=await l.getHallOfFame(c);return u.ok?u.data?.data??[]:[]}};if(typeof globalThis<"u"&&(e.debug??false)&&io(y),typeof window<"u"&&typeof localStorage<"u"){let c="mushi:last-run",u=null;try{let k=localStorage.getItem(c);u=k===null?null:k==="unfinished",localStorage.setItem(c,"unfinished");}catch{u=null;}try{window.addEventListener("pagehide",()=>{try{localStorage.setItem(c,"clean");}catch{}});}catch{}if(typeof e.onCrashedLastRun=="function")try{e.onCrashedLastRun(u);}catch(k){o.warn("onCrashedLastRun hook threw",{error:k instanceof Error?k.message:String(k)});}}let xn={on:()=>{},isOpen:false,getBreadcrumbs:[],captureEvent:null,captureException:null,getReputation:null,getTier:null,listMyReports:[],listMyComments:[],getHallOfFame:[],replyToReport:null,submitFeedbackSignal:null,reopenReport:null},wn=(c,u)=>{let k=u instanceof Error?u.message:String(u);o.debug(`Mushi.${c}() failed (swallowed)`,{error:k});try{q.add({category:"custom",level:"warning",message:`mushi.${c}() threw`,data:{error:k}});}catch{}};return (c=>new Proxy(c,{get(u,k,H){let L=Reflect.get(u,k,H);if(typeof L!="function")return L;let F=String(k),re=()=>F==="diagnose"?fn():F in xn?xn[F]:void 0;return (...K)=>{try{let le=L.apply(u,K);return le&&typeof le.then=="function"?le.catch(ye=>(wn(F,ye),re())):le}catch(le){return wn(F,le),re()}}}}))(vn)}function hn(t){return t.apiEndpoint??Vt}function Xl(t){return t.runtimeConfig!==false}async function Jl(t){let e=await Zl(t.apiEndpoint);return {apiEndpointReachable:e.reachable,cspAllowsEndpoint:e.cspAllowed,widgetMounted:t.widgetMounted,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:t.runtimeConfigLoaded,captureScreenshotAvailable:t.captureScreenshotAvailable,captureNetworkIntercepting:t.captureNetworkIntercepting,sdkVersion:pe,widgetHostPointerSafe:t.widgetDiagnostics?.widgetHostPointerSafe??false,widgetHostBounds:t.widgetDiagnostics?.widgetHostBounds??null,widgetSuppressed:t.widgetDiagnostics?.widgetSuppressed??false,bannerRendered:t.widgetDiagnostics?.bannerRendered??false}}async function fn(){return {apiEndpointReachable:false,cspAllowsEndpoint:false,widgetMounted:false,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:false,captureScreenshotAvailable:false,captureNetworkIntercepting:false,sdkVersion:pe,widgetHostPointerSafe:false,widgetHostBounds:null,widgetSuppressed:false,bannerRendered:false}}async function Zl(t){if(typeof fetch>"u")return {reachable:false,cspAllowed:false};let e=typeof AbortController<"u"?new AbortController:null,r=e?setTimeout(()=>e.abort(),3e3):null;try{return {reachable:(await fetch(`${t.replace(/\/$/,"")}/health`,{method:"GET",cache:"no-store",...e?{signal:e.signal}:{},[tt]:"diagnose"})).ok,cspAllowed:!0}}catch{return {reachable:false,cspAllowed:false}}finally{r&&clearTimeout(r);}}function mn(t){return `mushi:sdk-config:${t}`}function Uo(t){return `mushi:sdk-version:${t}`}function Ql(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(mn(t));return e?JSON.parse(e).config??null:null}catch{return null}}function ec(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(mn(t),JSON.stringify({cachedAt:Date.now(),config:e}));}catch{}}function tc(t){if(!(typeof localStorage>"u"))try{localStorage.removeItem(mn(t));}catch{}}function rc(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(Uo(t));if(!e)return null;let r=JSON.parse(e);return !r.data||!r.cachedAt||Date.now()-r.cachedAt>864e5?null:r.data}catch{return null}}function nc(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Uo(t),JSON.stringify({cachedAt:Date.now(),data:e}));}catch{}}function sc(t,e){let r=Bo(t),n=Bo(e);for(let s=0;s<Math.max(r.length,n.length);s++){let o=r[s]??0,a=n[s]??0;if(o<a)return true;if(o>a)return false}return false}function Bo(t){return t.split(/[.-]/).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e))}function No(){return {report:()=>{},on:()=>()=>{},setUser:()=>{},setMetadata:()=>{},setScreen:()=>{},isOpen:()=>false,open:()=>{},close:()=>{},updateConfig:()=>{},diagnose:fn,openWith:()=>{},show:()=>{},hide:()=>{},attachTo:()=>()=>{},setTrigger:()=>{},openReporter:()=>{},destroy:()=>{Me=null;},captureEvent:async()=>null,captureException:async()=>null,identify:()=>{},identifyWithToken:()=>{},publishPageContext:()=>{},openAssistant:()=>{},addBreadcrumb:()=>{},getBreadcrumbs:()=>[],setTag:()=>{},setTags:()=>{},clearTag:()=>{},getReputation:async()=>null,getTier:async()=>null,recordActivity:()=>{},pulseTrigger:()=>{},listMyReports:async()=>[],listMyComments:async()=>[],replyToReport:async()=>null,submitFeedbackSignal:async()=>null,reopenReport:async()=>null,openMyReports:()=>{},getHallOfFame:async()=>[]}}function oc(t){if(typeof window>"u")return ()=>{};let e=[];try{let r=s=>{t.add({category:"navigation",level:"info",message:`${s}: ${window.location.pathname}`,data:{url:window.location.href,kind:s}});},n=Te({onPush:()=>r("pushState"),onReplace:()=>r("replaceState"),onPop:()=>r("popstate")});e.push(n);}catch{}try{let r=console.error,n=console.warn,s=function(...a){try{t.add({category:"console",level:"error",message:a.map(Fo).join(" ")});}catch{}return r.apply(this,a)},o=function(...a){try{t.add({category:"console",level:"warning",message:a.map(Fo).join(" ")});}catch{}return n.apply(this,a)};console.error=s,console.warn=o,e.push(()=>{console.error===s&&(console.error=r),console.warn===o&&(console.warn=n);});}catch{}try{let r=n=>{try{let s=n.target;if(!(s instanceof Element))return;let o=s,a=0;for(;o&&a<10;){let i=o.getAttribute("data-testid");if(i){let l=(o.textContent??"").trim().slice(0,80);t.add({category:"ui.click",level:"info",message:`clicked ${i}${l?` \u2014 ${l}`:""}`,data:{testid:i,tag:o.tagName.toLowerCase()}});return}o=o.parentElement,a++;}}catch{}};document.addEventListener("click",r,{passive:!0,capture:!0}),e.push(()=>document.removeEventListener("click",r,!0));}catch{}return ()=>{for(let r of e)try{r();}catch{}}}function Fo(t){try{if(t instanceof Error)return `${t.name}: ${t.message}`;if(typeof t=="object"&&t!==null){let r=JSON.stringify(t);return r.length>200?`${r.slice(0,200)}\u2026`:r}let e=String(t);return e.length>200?`${e.slice(0,200)}\u2026`:e}catch{return `[${typeof t}]`}}function ic(){let t=document.currentScript;if(t&&t.dataset&&t.dataset.project)return t;let e=Array.from(document.querySelectorAll("script[data-project][data-key]"));return e.length>0?e[e.length-1]:null}function ac(t){let e=t.project?.trim(),r=t.key?.trim();if(!e||!r)return null;let n={};t.trigger&&(n.trigger=t.trigger),t.theme&&(n.theme=t.theme),t.position&&(n.position=t.position),t.triggerText&&(n.triggerText=t.triggerText);let s=t.bannerVariant,o=t.bannerPosition;(s||o)&&(n.bannerConfig={...s?{variant:s}:{},...o?{position:o}:{}});let a={projectId:e,apiKey:r};return t.endpoint&&(a.apiEndpoint=t.endpoint),t.debug==="true"&&(a.debug=true),Object.keys(n).length>0&&(a.widget=n),a}function lc(){if(typeof document>"u"||typeof window>"u")return;let t=window;if(t.__mushiLoaderInit)return;let e=ic();if(!e)return;let r=ac(e.dataset);if(r){t.__mushiLoaderInit=true;try{gr.init(r);}catch{}}}lc();
2340
+ `,document.body.appendChild(w),w}function h(w,u){let S=document.elementsFromPoint(w,u),k=null;for(let y of S)if(!(y===r||y===e)){if(y.id==="mushi-mushi-widget"||y.closest("#mushi-mushi-widget"))return null;k=y;break}let A=0;for(;k?.shadowRoot&&A<20;){let y=k.shadowRoot.elementFromPoint(w,u);if(!y||y===k)break;k=y,A++;}return k}function m(w){if(!e)return;let u=w.getBoundingClientRect();e.style.left=`${u.left}px`,e.style.top=`${u.top}px`,e.style.width=`${u.width}px`,e.style.height=`${u.height}px`,e.style.display="block";}function b(w){let u=h(w.clientX,w.clientY);if(!u){n=null,e&&(e.style.display="none");return}n=u,m(u);}function d(w){w.preventDefault(),w.stopPropagation();}function x(w){w.preventDefault(),w.stopPropagation();let u=h(w.clientX,w.clientY);u&&$(i(u));}function v(w){w.key==="Escape"&&$(null);}function C(){n?.isConnected&&m(n);}function $(w){E(),s?.(w),s=null;}function T(){return t&&E(),new Promise(w=>{s=w,t=true,e=l(),r=f(),r.addEventListener("mousemove",b),r.addEventListener("click",x),r.addEventListener("pointerdown",d),r.addEventListener("mousedown",d),r.addEventListener("mouseup",d),document.addEventListener("keydown",v,true),window.addEventListener("scroll",C,{capture:true,passive:true});})}function E(){t&&(t=false,n=null,document.removeEventListener("keydown",v,true),window.removeEventListener("scroll",C,{capture:true}),r&&(r.remove(),r=null),e&&(e.remove(),e=null));}return {activate:T,deactivate:E,isActive:()=>t}}var zo=120;function Rn(){let t=[],e=()=>n("hashchange");n("initial");function r(a){t.push(a),t.length>zo&&t.shift();}function n(a){typeof location>"u"||r({ts:Date.now(),kind:"route",payload:{source:a,route:Tt(`${location.pathname}${location.search}${location.hash}`),href:Tt(location.href)}});}function s(a){let i=a.target instanceof Element?a.target:null;if(!i)return;let l=i.closest('button,a,[role="button"],input,textarea,select,[data-mushi-track]')??i;r({ts:Date.now(),kind:"click",payload:{tag:l.tagName.toLowerCase(),id:l.id||void 0,text:ec(l)}});}let o=Le({onPush:()=>n("pushState"),onReplace:()=>n("replaceState"),onPop:()=>n("popstate")});return window.addEventListener("hashchange",e),document.addEventListener("click",s,true),{setScreen(a){r({ts:Date.now(),kind:"screen",payload:a});},getEntries(a={}){return [...t,...(a.consoleLogs??[]).map(l=>({ts:l.timestamp,kind:"log",payload:{level:l.level,message:l.message}})),...(a.networkLogs??[]).map(l=>({ts:l.timestamp,kind:"request",payload:{method:l.method,url:l.url,status:l.status,duration:l.duration,error:l.error}}))].sort((l,f)=>l.ts-f.ts).slice(-zo)},clear(){t.length=0;},destroy(){o(),window.removeEventListener("hashchange",e),document.removeEventListener("click",s,true);}}}function ec(t){let e=(t.textContent??"").replace(/\s+/g," ").trim();return e?e.slice(0,80):void 0}var tc=6e4,rc=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,nc=/^[0-9a-f]{20,}$/i,sc=/^\d+$/,oc=/^[a-z0-9]{16,}$/i;function Ko(t){return t.length===0?t:rc.test(t)||nc.test(t)||sc.test(t)||oc.test(t)&&/\d/.test(t)?"[id]":t}function ic(t,e,r){if(e.startsWith("#/")){let n=e.slice(1),s=n.indexOf("?"),o=s===-1?n:n.slice(0,s),a=r?.map(i=>i.startsWith("/#/")?i.slice(2):i);return "/#"+Cn(o,a)}return Cn(t,r)}function Cn(t,e){let r=t.length>1&&t.endsWith("/")?t.slice(0,-1):t;if(e?.length){let n=ac(r,e);if(n)return n}return "/"+r.split("/").filter(n=>n.length>0).map(Ko).join("/")}function ac(t,e){let r=t.split("/").filter(s=>s.length>0),n=[...e].sort((s,o)=>o.split("/").length-s.split("/").length);for(let s of n){let o=s.split("/").filter(i=>i.length>0);if(o.length!==r.length)continue;let a=true;for(let i=0;i<o.length;i++){let l=o[i],f=r[i];if(!(l.startsWith("[")&&l.endsWith("]"))&&!l.startsWith(":")&&l!==f){a=false;break}}if(a)return "/"+o.join("/")}return null}function lc(){if(typeof document>"u")return [];let t=new Set,e=document.querySelectorAll("[data-testid]");for(let r of Array.from(e)){let n=r.getAttribute("data-testid");n&&n.length>0&&n.length<120&&t.add(n);}return Array.from(t).sort()}function cc(){if(typeof window>"u")return [];try{let t=new Set,e=s=>{new URLSearchParams(s).forEach((o,a)=>t.add(a));};e(window.location.search);let r=window.location.hash,n=r.indexOf("?");return r.startsWith("#/")&&n!==-1&&e(r.slice(n+1)),Array.from(t).sort()}catch{return []}}function uc(){if(typeof document>"u")return null;let t=s=>(s??"").replace(/\s+/g," ").trim().slice(0,200),e=t(document.querySelector("h1")?.textContent);if(e)return e;let r=t(document.title);return r||t(document.querySelector("main")?.textContent)||null}async function dc(t){if(!t||typeof crypto>"u"||!crypto.subtle)return null;try{let e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),s="";for(let o=0;o<n.length;o++)s+=n[o].toString(16).padStart(2,"0");return s}catch{return null}}function Tn(t){let{config:e,getRecentNetworkPaths:r,getUserId:n,getSessionId:s,onEvent:o}=t,a=e.throttleMs??tc,i=e.captureDomSummary!==false,l=e.userIdSource??"auto",f=new Map,h=null,m=null;async function b(){if(typeof window>"u")return;let $=ic(window.location.pathname,window.location.hash,e.routeTemplates),T=Date.now(),E=f.get($)??0;if(T-E<a)return;f.set($,T);let w=null;l==="auto"?w=n()??s():l==="session-only"&&(w=s());let u={route:$,page_title:typeof document<"u"&&(document.title||"").slice(0,300)||null,dom_summary:i?uc():null,testids:lc(),network_paths:r().slice(-50),query_param_keys:cc(),user_id_hash:await dc(w),observed_at:new Date().toISOString()};o(u);}function d(){m||(m=setTimeout(()=>{m=null,b();},100));}function x(){if(typeof window>"u")return;let $=window.location.hash.startsWith("#/")?window.location.hash:"",T=window.location.pathname+window.location.search+$;T!==h&&(h=T,d());}if(typeof window>"u")return {destroy:()=>{},flushNow:()=>{}};let v=()=>x(),C=Le({onPush:v,onReplace:v,onPop:v});return window.addEventListener("hashchange",v),d(),{destroy(){C(),window.removeEventListener("hashchange",v),m&&(clearTimeout(m),m=null),f.clear();},flushNow(){f.clear(),b();}}}function Vo(t,e,r){let n=l=>l.timestamp,s=l=>l.type===2,o=l=>l.type===4,a=Date.now()-e,i=0;for(let l=0;l<t.length;l++){let f=n(t[l]);if(typeof f=="number"&&f>=a)break;s(t[l])&&(i=o(t[l-1])?l-1:l);}if(t.length-i>r){for(let l=i+1;l<t.length;l++)if(s(t[l])&&t.length-l<=r){i=o(t[l-1])?l-1:l;break}}i>0&&t.splice(0,i);}function pc(t){let e=[],r=false,n=o=>{if(!r)return;let a=o.target instanceof Element?o.target:null,i=a?.tagName?.toLowerCase()??"unknown",l=a?.closest("[data-testid]")?.getAttribute("data-testid")??void 0;e.push({type:"lite_click",timestamp:Date.now(),data:{tag:i,testId:l}}),e.length>400&&e.shift();},s=()=>{r=false,document.removeEventListener("click",n,true);};return {start(){r||(r=true,document.addEventListener("click",n,true));},stop:s,flush(){let o=Date.now()-t;return e.filter(a=>a.timestamp>=o)},destroy(){s(),e.length=0;}}}var Tr=null;async function hc(){if(Tr)return Tr;try{return Tr=await import('rrweb'),Tr}catch{return null}}async function Go(t){let e=t.maxDurationMs??3e4,r=await hc();if(!r?.record)return pc(e);let n=r.record,s=[],o=null,a=false,i=['input[type="password"]',...t.redactSelectors??[]],l=()=>{o?.(),o=null,a=false;};return {start(){a||(a=true,o=n({emit(f){s.push(f),Vo(s,e,400);},maskAllInputs:true,maskAllText:true,maskTextSelector:i.join(","),checkoutEveryNms:e,sampling:{mousemove:false,mouseInteraction:true,scroll:150,media:800}})??null);},stop:l,flush(){return Vo(s,e,400),[...s]},destroy(){l(),s.length=0;}}}function Xo(t,e){return new Promise((r,n)=>{let s=new Image;s.onload=()=>{let o=document.createElement("div");o.style.position="relative",o.style.display="inline-block",o.style.maxWidth="100%";let a=document.createElement("canvas"),i=document.createElement("canvas"),l=Math.min(1,720/s.width),f=Math.round(s.width*l),h=Math.round(s.height*l);for(let u of [a,i])u.width=f,u.height=h,u.style.width="100%",u.style.height="auto",u.style.display="block";i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.cursor="crosshair";let m=a.getContext("2d"),b=i.getContext("2d");if(!m||!b){n(new Error("Canvas not supported"));return}m.drawImage(s,0,0,f,h),o.appendChild(a),o.appendChild(i),e.appendChild(o);let d="highlight",x=false,v=null,C=[],$=u=>{let S=i.getBoundingClientRect(),k="touches"in u?u.touches[0]??u.changedTouches[0]:null,A=k?k.clientX:u.clientX,y=k?k.clientY:u.clientY;return {x:(A-S.left)/S.width*f,y:(y-S.top)/S.height*h}},T=()=>{b.clearRect(0,0,f,h);for(let u of C)if(u.tool==="highlight"&&u.points.length>=2){let[S,k]=u.points;b.fillStyle="rgba(255, 230, 0, 0.35)",b.fillRect(Math.min(S.x,k.x),Math.min(S.y,k.y),Math.abs(k.x-S.x),Math.abs(k.y-S.y));}else if(u.tool==="arrow"&&u.points.length>=2){let[S,k]=u.points;b.strokeStyle="#ef4444",b.lineWidth=3,b.beginPath(),b.moveTo(S.x,S.y),b.lineTo(k.x,k.y),b.stroke();}},E=u=>{x=true,v=$(u);},w=u=>{if(!x||!v)return;x=false;let S=$(u);if(d==="blur"){let k=Math.min(v.x,S.x),A=Math.min(v.y,S.y),y=Math.abs(S.x-v.x),B=Math.abs(S.y-v.y);y>=1&&B>=1&&(m.filter="blur(8px)",m.drawImage(a,k,A,y,B,k,A,y,B),m.filter="none");}else C.push({tool:d,points:[v,S]});v=null,T();};i.addEventListener("mousedown",E),i.addEventListener("mouseup",w),i.addEventListener("touchstart",E,{passive:true}),i.addEventListener("touchend",w),r({canvas:a,setTool(u){d=u;},getDataUrl(){let u=document.createElement("canvas");u.width=f,u.height=h;let S=u.getContext("2d");return S?(S.drawImage(a,0,0),S.drawImage(i,0,0),u.toDataURL("image/jpeg",.85)):t},destroy(){i.removeEventListener("mousedown",E),i.removeEventListener("mouseup",w),i.removeEventListener("touchstart",E),i.removeEventListener("touchend",w),o.remove();}});},s.onerror=()=>n(new Error("Failed to load screenshot")),s.src=t;})}function Yo(){try{let t=globalThis;return t.Sentry?t.Sentry:void 0}catch{return}}function mc(){try{return globalThis.__SENTRY_REPLAY__}catch{return}}function fc(){try{let t=globalThis,e=t.__SENTRY__,r=t.Sentry;return e?.version==="9"||r&&typeof r.lastEventId=="function"?e?.version==="9"?"v9":"v8":e?.version==="8"?"v8":r&&typeof r.getCurrentHub=="function"?"v7":"unknown"}catch{return "unknown"}}function $n(t,e={}){let r=Math.max(0,e.breadcrumbsLimit??30),n={},s=Yo();if(!s)return n;n.sdk=fc();try{let i=s;if(typeof i.lastEventId=="function")n.eventId=i.lastEventId()??void 0;else {let f=s.getCurrentHub?.()?.getScope?.();n.eventId=f?.getLastEventId?.()??void 0;}}catch{}let o;try{let i=s;typeof i.getCurrentScope=="function"?o=i.getCurrentScope():o=s.getCurrentHub?.()?.getScope?.();}catch{}if(o){try{let i=o.getUser?.();i&&(n.user={id:typeof i.id=="string"?i.id:void 0,email:typeof i.email=="string"?i.email:void 0,username:typeof i.username=="string"?i.username:void 0,ip_address:typeof i.ip_address=="string"?i.ip_address:void 0});}catch{}try{let i=o.getTags?.();if(i&&typeof i=="object"){let l={};for(let[f,h]of Object.entries(i))(typeof h=="string"||typeof h=="number"||typeof h=="boolean")&&(l[f]=h);Object.keys(l).length>0&&(n.tags=l);}}catch{}try{n.transactionName=o.getTransactionName?.()??o.getTransaction?.()?.name??void 0;}catch{}try{n.sessionId=o.getSession?.()?.sid??void 0;}catch{}try{let i=o.getBreadcrumbs?.()??o._breadcrumbs??[];if(Array.isArray(i)&&i.length>0){let l=i.slice(-r);n.breadcrumbs=l.map(f=>{let h=f;return {timestamp:typeof h.timestamp=="number"?h.timestamp<1e12?Math.round(h.timestamp*1e3):h.timestamp:void 0,category:typeof h.category=="string"?h.category:void 0,level:typeof h.level=="string"?h.level:void 0,message:typeof h.message=="string"?h.message:void 0,type:typeof h.type=="string"?h.type:void 0,data:h.data&&typeof h.data=="object"?h.data:void 0}});}}catch{}}try{let i=s,l;if(typeof i.getActiveSpan=="function"?l=i.getActiveSpan():o?.getSpan&&(l=o.getSpan()),l){let f=l.spanContext?.();n.traceId=f?.traceId??l.traceId??void 0,n.spanId=f?.spanId??l.spanId??void 0;}}catch{}let a;try{let i=s;typeof i.getClient=="function"?a=i.getClient():a=s.getCurrentHub?.()?.getClient?.();}catch{}if(a){try{let i=a.getOptions?.();i?.release&&(n.release=i.release),i?.environment&&(n.environment=i.environment);}catch{}try{let i=a.getDsn?.();if(i?.host&&i?.projectId&&n.eventId){let l=i.host.replace(/^o\d+\./,"");n.issueUrl=`https://${l}/issues/?query=${encodeURIComponent(n.eventId)}`;}}catch{}}try{let l=s.getReplay?.()??mc();n.replayId=l?.getReplayId?.()??void 0;}catch{}return n}function In(t,e={}){let r=Yo();if(r){try{let n=r;typeof n.setTag=="function"&&(n.setTag("mushi.report_id",t),e.reportUrl&&n.setTag("mushi.report_url",e.reportUrl)),typeof n.setContext=="function"&&n.setContext("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{},captured_at:new Date().toISOString()}),typeof n.addBreadcrumb=="function"&&n.addBreadcrumb({category:"mushi",type:"info",level:"info",message:`Mushi report submitted (${t})`,data:{report_id:t,...e.reportUrl?{url:e.reportUrl}:{}}});}catch{}try{let s=r.getCurrentHub?.()?.getScope?.();s&&(s.setTag?.("mushi.report_id",t),e.reportUrl&&s.setTag?.("mushi.report_url",e.reportUrl),s.setContext?.("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{}}));}catch{}}}var gc=["/login","/logout","/signup","/sso/*","/auth/*"];function Qo(t,e={}){let r=[];if(e.rageClick!==false){let v=function(C){let $=Date.now();if(C.target===x){if(d.push($),d=d.filter(T=>$-T<500),d.length>=3){let T=C.target;t.onTrigger("rage_click",{element:T.tagName,id:T.id,text:T.textContent?.slice(0,50)}),d=[];}}else x=C.target,d=[$];};let d=[],x=null;document.addEventListener("click",v,true),r.push(()=>document.removeEventListener("click",v,true));}if(e.longTask!==false&&typeof PerformanceObserver<"u")try{let d=new PerformanceObserver(x=>{for(let v of x.getEntries())v.duration>5e3&&t.onTrigger("long_task",{duration:Math.round(v.duration),startTime:Math.round(v.startTime)});});d.observe({entryTypes:["longtask"]}),r.push(()=>d.disconnect());}catch{}let n=bc(e.apiCascade);if(n.enabled){let d=[],x=globalThis.fetch;globalThis.fetch=async function(...v){let[C,$]=v,T=Rr(C),E=!!Cr(C,$)||Pt(T,{apiEndpoint:e.apiEndpoint,ignoreUrls:n.ignoreUrls});try{let w=await x.apply(this,v);return !E&&!w.ok&&w.status>=400&&Jo(d,t),w}catch(w){throw E||Jo(d,t),w}},r.push(()=>{globalThis.fetch=x;});}if((e.pageDwell===true||typeof e.pageDwell=="object"&&e.pageDwell!==null)&&typeof window<"u"){let T=function(k){return v.some(A=>A.endsWith("/*")?k.startsWith(A.slice(0,-2)):k===A||k.startsWith(A+"/"))},E=function(){let k=window.location?.pathname??"";T(k)||t.onTrigger("page_dwell",{thresholdMs:x,path:k});},w=function(){C&&clearTimeout(C);let k=window.location?.pathname??"";T(k)||(C=setTimeout(E,x));},u=function(){let k=window.location?.pathname??"";k!==$&&($=k,w());};let d=typeof e.pageDwell=="object"?e.pageDwell??{}:{},x=d.thresholdMs||300*1e3,v=d.excludeRoutes!==void 0?d.excludeRoutes:gc,C=null,$=window.location?.pathname??"";w();let S=Le({onPush:u,onReplace:u,onPop:u});r.push(()=>{C&&clearTimeout(C),S();});}if((e.firstSession===true||typeof e.firstSession=="object"&&e.firstSession!==null)&&typeof window<"u"){let d=typeof e.firstSession=="object"?e.firstSession??{}:{},x=d.delayMs??45*1e3,v=d.storageKey??(e.projectId?`mushi:${e.projectId}:firstSessionShown`:"mushi:firstSessionShown"),C=false;try{C=window.localStorage?.getItem(v)==="1";}catch{}if(!C){let $=setTimeout(()=>{try{window.localStorage?.setItem(v,"1");}catch{}t.onTrigger("first_session",{delayMs:x});},x);r.push(()=>clearTimeout($));}}if(e.errorBoundary){let d=function(v){t.onTrigger("error_boundary",{message:v.message,filename:v.filename,lineno:v.lineno,colno:v.colno});},x=function(v){t.onTrigger("error_boundary",{message:v.reason instanceof Error?v.reason.message:String(v.reason),type:"unhandled_rejection"});};window.addEventListener("error",d),window.addEventListener("unhandledrejection",x),r.push(()=>{window.removeEventListener("error",d),window.removeEventListener("unhandledrejection",x);});}return {destroy(){r.forEach(d=>d());}}}function bc(t){return t===false?{enabled:false,ignoreUrls:[]}:t&&typeof t=="object"?{enabled:t.enabled!==false,ignoreUrls:t.ignoreUrls??[]}:{enabled:true,ignoreUrls:[]}}function Jo(t,e){let r=Date.now();t.push(r);let n=t.filter(s=>r-s<1e4);n.length>=3&&(e.onTrigger("api_cascade",{failureCount:n.length,windowMs:1e4}),t.length=0);}var Zo="mushi:lastDismiss",$r="mushi:consecDismiss",Mn="mushi:lastShown";function Ir(t){try{return localStorage.getItem(t)}catch{return null}}function Mr(t,e){try{localStorage.setItem(t,e);}catch{}}function ei(t={}){let e=t.maxProactivePerSession??2,r=t.dismissCooldownHours??24,n=t.suppressAfterDismissals??3,s=(t.reshowCooldownMinutes??30)*60*1e3,o=0,a=new Set;function i(m){let b=Date.now();if(parseInt(Ir($r)??"0",10)>=n)return false;let x=Ir(Zo);if(x&&b-parseInt(x,10)<r*60*60*1e3)return false;if(s>0&&o===0){let v=Ir(Mn);if(v&&b-parseInt(v,10)<s)return false}return o>=e||a.has(m)?false:(a.add(m),o++,Mr(Mn,String(b)),true)}function l(){Mr(Zo,String(Date.now()));let m=parseInt(Ir($r)??"0",10);Mr($r,String(m+1));}function f(){Mr($r,"0");}function h(){o=0,a.clear();try{localStorage.removeItem(Mn);}catch{}}return {shouldShow:i,recordDismissal:l,recordSubmission:f,reset:h}}function ti(t,e){if(t.appVersion)return t.appVersion;let r=t.integrations?.vercel?.analyticsId;return r||e?.buildId}var Ae=null,Lr=class{constructor(){}static init(e){if(Ae)return cr({scope:"mushi",level:"warn",format:"pretty"}).warn("Already initialized \u2014 call destroy() first to reinitialize"),Ae;if(typeof document>"u"||typeof window>"u")return ni();let r={...Wr(),...e};if(!r.projectId||!r.apiKey){let n=Rs();throw new Error(n.message??"[mushi] projectId and apiKey are required \u2014 set NEXT_PUBLIC_MUSHI_* / VITE_MUSHI_* / MUSHI_* or pass them explicitly")}return r.enabled===false?ni():(Ae=yc(r),Ae)}static getInstance(){return Ae}static destroy(){Ae?.destroy(),Ae=null;}static diagnose(){return Ae?.diagnose()??An()}};function yc(t){Ts(t);let e=Cs(t),r=e.projectId,n=()=>ce(r),s=e,o=t.debug??false?cr({scope:"mushi",level:"debug",format:"pretty"}):zr,a=null,i=null,l=ks({projectId:e.projectId,apiKey:e.apiKey,...e.apiEndpoint?{apiEndpoint:e.apiEndpoint}:{},...typeof e.timeout=="number"?{timeout:e.timeout}:{},...typeof e.maxRetries=="number"?{maxRetries:e.maxRetries}:{},...e.circuitBreaker?{circuitBreaker:e.circuitBreaker}:{},getUserToken:()=>a,sdkPackage:Ue,sdkVersion:fe});e.trackSessions!==false&&Os({client:l,sdkVersion:fe,reporterTokenHash:ce(e.projectId)??null});let f=$s(e.preFilter),h=_s(e.offline),m=Us({maxBurst:10,refillRate:1,refillIntervalMs:5e3}),b=Xr();function d(c){return c.map(p=>{let R={...p};if(typeof p.message=="string"&&(R.message=b.scrub(p.message)),p.data&&typeof p.data=="object"){let P={};for(let[D,Q]of Object.entries(p.data))P[D]=typeof Q=="string"?b.scrub(Q):Q;R.data=P;}return R})}function x(c){return c&&c.map(p=>({...p,message:b.scrub(p.message),...p.stack?{stack:b.scrub(p.stack)}:{}}))}function v(c){if(!c)return;let p={};for(let[R,P]of Object.entries(c))p[R]=typeof P=="string"?b.scrub(P):P;return p}let C=null,$=null,T=null,E=null,w=null,u=null,S=Rn(),k=null,A=0,y,B=`mushi:tester-jwt:${e.projectId}`;function Z(){try{return typeof localStorage<"u"?localStorage.getItem(B):null}catch{return null}}function W(){try{typeof localStorage<"u"&&localStorage.removeItem(B);}catch{}}async function me(c){let p=await l.getTesterStatus(c);if(!p.ok||!p.data){W();return}let R=p.data;if(!R.is_tester||!R.tester_id){W();return}y.setTesterSession(c,{id:R.tester_id,public_handle:R.public_handle??null,display_name:R.display_name??null});let P=await l.getMyReputation(c);if(P.ok&&P.data){let D=P.data;D.reputation&&y.setTesterReputation(D.reputation);}}function U(){if(s.capture?.console!==false?C??=vn():(C?.destroy(),C=null),s.capture?.network!==false){let j={apiEndpoint:Ln(s),ignoreUrls:s.capture?.ignoreUrls,tracePropagation:s.capture?.tracePropagation,sessionId:dt()};$?$.updateOptions(j):$=yn(j);}else $?.destroy(),$=null;if(s.capture?.performance!==false?T??=En():(T?.destroy(),T=null),s.capture?.screenshot!=="off"){let j={privacy:s.privacy,onFailed:()=>y.setScreenshotError(true)};s.capture?.screenshotProvider?E=null:E?E.updateOptions(j):E=Sn(j);}else E=null;!E&&!s.capture?.screenshotProvider&&(M=null),y.setAllowScreenshotRemove(s.privacy?.allowUserRemoveScreenshot!==false),s.capture?.elementSelector!==false?w??=kn():(w?.deactivate(),w=null,L=null),y.setCaptureAvailability({screenshot:(!!E||!!s.capture?.screenshotProvider)&&s.capture?.screenshot!=="off",element:!!w});let c=s.capture?.discoverInventory,p=c===true?{}:c&&typeof c=="object"?c:null;p!=null&&p.enabled!==false?(u?.destroy(),u=Tn({config:p,getRecentNetworkPaths:()=>$?$.getEntries().map(j=>{try{let se=new URL(j.url,typeof window<"u"?window.location.href:"http://localhost");return se.host&&typeof window<"u"&&se.host!==window.location.host?null:se.pathname}catch{return null}}).filter(j=>j!=null&&j.length>0&&j.length<200):[],getUserId:()=>O?.id??null,getSessionId:dt,onEvent:j=>{l.postDiscoveryEvent({...j,sdk_version:fe}).catch(se=>{o.debug("discovery emit failed",{err:String(se)});});}})):(u?.destroy(),u=null);let P=s.capture?.replay??"off",D=s.replaySampleRate??1,Q=D>=1||Math.random()<D;if((P==="rrweb"||P==="lite")&&Q){let j=++A;Go({redactSelectors:s.privacy?.redactSelectors}).then(se=>{if(j!==A){se.destroy();return}k?.destroy(),k=se,k.start();});}else A++,k?.destroy(),k=null;}let Y=new Map;function F(c,p){Y.get(c)?.forEach(R=>R({type:c,data:p}));}let M=null,L=null,I=null,_=false,H=true,V=null,q=null,O=null,ee=null,ne={},J={},K=qs({max:50});K.add({category:"lifecycle",level:"info",message:"Mushi SDK init",data:{projectId:e.projectId,sdkVersion:fe}});let ue=null;ue=$c(K);let $e=false;function z(){y.refreshReporterInboxQuiet();}function te(){V&&clearInterval(V),V=null,q&&typeof document<"u"&&document.removeEventListener("visibilitychange",q),q=null;}function et(){if(te(),!H)return;V=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||z();},6e4),typeof document<"u"&&(q=()=>{document.visibilityState==="visible"&&z();},document.addEventListener("visibilitychange",q)),z();}function _e(c,p){if(!s.rewards?.enabled)return;let R={client:l,config:s.rewards,projectId:r,userId:c,traits:p,reporterToken:n()};_o(R),s.rewards.showInWidget!==false&&l.getMyPoints(c).then(P=>{if(!P.ok)return;let D=P.data;y.setRewardsState({tier:D.tier?{slug:D.tier.slug??"free",displayName:D.tier.display_name??"Free",pointsThreshold:D.tier.points_threshold??0}:null,nextTier:D.next_tier?{displayName:D.next_tier.display_name??"",pointsThreshold:D.next_tier.points_threshold??0}:null,totalPoints:D.total_points??0,pointsForReport:D.report_submit_pts??50});}).catch(()=>{});}async function tt(){if($e)return null;let c=s.capture?.screenshotProvider;if(c){$e=true;try{let D=await c();if(D)return D}catch(D){o.warn("screenshotProvider threw, falling back to built-in capturer",{error:D instanceof Error?D.message:String(D)});}finally{$e=false;}}if(!E)return null;$e=true;let p=y.getIsOpen();p&&y.hidePanel();let R=document.getElementById("mushi-mushi-widget"),P=R?.style.visibility??"";R&&(R.style.visibility="hidden"),await new Promise(D=>{requestAnimationFrame(()=>requestAnimationFrame(()=>D()));});try{return await E.take()}finally{$e=false,R&&(R.style.visibility=P),p&&y.showPanel();}}async function Dt(c){let p=s.capture?.screenshot;!(E||s.capture?.screenshotProvider)||p==="off"||M||c==="open"&&p!=="auto"||c==="submit"&&p!=="on-report"&&p!=="auto"||(o.debug("Auto-capturing screenshot",{when:c,mode:p}),M=await tt(),y.setScreenshotAttached(M!==null),y.setScreenshotPreview(M));}y=new vr(e.widget,{onSubmit:async({category:c,userCategory:p,description:R,intent:P})=>(o.info("Report submitted",{category:c,userCategory:p,intent:P}),ve?.recordSubmission(),await Dt("submit"),await Nt(c,R,P,p)??{reportId:null,queuedOffline:true}),onOpen:()=>{o.debug("Widget opened"),Dt("open"),k?.start(),F("widget:opened");},onClose:()=>{o.debug("Widget closed"),I&&(ve?.recordDismissal(),F("proactive:dismissed",{type:I})),M=null,L=null,I=null,F("widget:closed");},onScreenshotRequest:async()=>{if(!(!!E||!!s.capture?.screenshotProvider)||s.capture?.screenshot==="off"){o.warn("Screenshot requested but capture is disabled"),y.setScreenshotError(true);return}o.debug("Taking screenshot"),y.setScreenshotCapturing(true);try{M=await tt();}catch(p){o.warn("Screenshot capture threw",{error:p instanceof Error?p.message:String(p)}),M=null;}y.setScreenshotAttached(M!==null),y.setScreenshotPreview(M),M===null&&y.setScreenshotError(true);},onScreenshotRemove:()=>{o.debug("Screenshot attachment removed"),M=null,y.setScreenshotAttached(false);},onScreenshotAnnotateRequest:async c=>{if(!M||c.childElementCount>0)return;let p;try{p=await Xo(M,c);}catch(j){o.warn("Screenshot annotation failed",{error:j instanceof Error?j.message:String(j)});return}let R=document.createElement("div");R.className="mushi-annotate-toolbar";let P=j=>{(M=p.getDataUrl(),y.setScreenshotAttached(true),y.setScreenshotPreview(M)),p.destroy(),R.remove();},D=[{id:"highlight",label:"\u270F\uFE0F Highlight"},{id:"blur",label:"\u{1F512} Blur"},{id:"arrow",label:"\u2197\uFE0F Arrow"}];for(let j of D){let se=document.createElement("button");se.type="button",se.className="mushi-attach-btn",se.dataset.tool=j.id,se.textContent=j.label,se.addEventListener("click",()=>{p.setTool(j.id),R.querySelectorAll("button[data-tool]").forEach(re=>re.classList.remove("active")),se.classList.add("active");}),R.appendChild(se);}R.querySelector('button[data-tool="highlight"]')?.classList.add("active");let Q=document.createElement("button");Q.type="button",Q.className="mushi-attach-btn",Q.textContent="\u2713 Done",Q.addEventListener("click",()=>P()),R.appendChild(Q),c.insertBefore(R,c.firstChild);},onElementSelectorRequest:async()=>{if(!w||s.capture?.elementSelector===false){o.warn("Element selector requested but it is disabled/unavailable"),y.setElementError(true);return}o.debug("Element selector activated"),y.setElementCapturing(true),y.hidePanel();try{let c=await w.activate();c?(L=c,y.setElementSelected(!0),o.debug("Element selected",{tagName:c.tagName,xpath:c.xpath})):y.setElementCapturing(!1);}catch(c){o.warn("Element selector threw",{error:c instanceof Error?c.message:String(c)}),y.setElementError(true);}finally{y.showPanel();}},async onReporterReportsRequest(){let c=await l.listReporterReports(ce(r));if(!c.ok)throw new Error(c.error?.message??"Could not load reports");return c.data?.reports??[]},async onReporterCommentsRequest(c){let p=await l.listReporterComments(c,ce(r));if(!p.ok)throw new Error(p.error?.message??"Could not load thread");return p.data?.comments??[]},async onReporterReply(c,p){let R=await l.replyToReporterReport(c,ce(r),p);if(!R.ok)throw new Error(R.error?.message??"Could not send reply")},async onReporterFeedback(c,p,R){let P=await l.replyToReporterReport(c,ce(r),R??"",p);if(!P.ok)throw new Error(P.error?.message??"Could not send feedback");return P.data?.feedback??null},async onReporterReopen(c,p){let R=await l.reopenReporterReport(c,ce(r),p);if(!R.ok)throw new Error(R.error?.message??"Could not reopen report");return R.data?.outcome??null},async onFeatureBoardRequest(){let c=await l.listReporterFeatureBoard(ce(r));if(!c.ok)throw new Error(c.error?.message??"Could not load community ideas");return c.data?.tickets??[]},async onFeatureBoardVote(c){let p=await l.voteReporterFeatureBoard(c,ce(r));if(!p.ok)throw new Error(p.error?.message??"Could not vote");return p.data??{voted:true,action:"added"}},onLeaderboardOpen(){y.setLeaderboard(null,true),Po(10).then(c=>{y.setLeaderboard(c,false);});},async onMushiSignIn(c){let p=await l.sendMagicLink(c);if(!p.ok)throw new Error(p.error?.message??"Could not send sign-in link");return {ok:true}},async onGlobalLeaderboardOpen(){y.setGlobalLeaderboard(null,true);try{let c=Z(),p=await l.getPublicLeaderboard(50),P=(p.ok?p.data?.leaderboard??[]:[]).map(D=>({tester_id:D.tester_id,rank:D.rank,public_handle:D.public_handle,display_name:D.display_name,points_30d:D.points_30d,total_points:D.total_points??0,badge:D.badge_slug}));if(y.setGlobalLeaderboard(P,!1),c){let D=await l.getMyReputation(c);if(D.ok&&D.data){let Q=D.data;Q.reputation&&y.setTesterReputation(Q.reputation);}}}catch{y.setGlobalLeaderboard([],false);}},async onCrossAppReportsOpen(){let c=Z();if(!c){y.setCrossAppReports([],false);return}try{let p=await l.getCrossAppReports(c),R=p.ok?p.data?.reports??[]:[];y.setCrossAppReports(R,!1);}catch{y.setCrossAppReports([],false);}},onTesterSignOut(){W();},assistantEnabled:e.assistant?.enabled===true,...e.assistant?.label?{assistantLabel:e.assistant.label}:{},...e.assistant?.greeting?{assistantGreeting:e.assistant.greeting}:{},...e.assistant?.suggestions?{assistantSuggestions:e.assistant.suggestions}:{},async onAssistantAsk(c,p){let R=await l.askAssistant({message:c,threadId:p,context:i});return R.ok?R.data??null:null}},fe),U(),typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>y.mount()):y.mount());let Ge=Z();Ge&&me(Ge).catch(()=>W());let Ot=null,ve=null,oe=s.proactive;oe&&(oe.rageClick!==false||oe.longTask!==false||oe.apiCascade!==false||oe.errorBoundary===true||oe.pageDwell||oe.firstSession)&&typeof document<"u"&&(ve=ei(oe?.cooldown),Ot=Qo({onTrigger:(c,p)=>{if(typeof navigator<"u"&&!navigator.onLine){o.debug("Proactive trigger suppressed: offline",{type:c});return}if(!ve.shouldShow(c)){o.debug("Proactive trigger suppressed by fatigue prevention",{type:c});return}o.info("Proactive trigger fired",{type:c,context:p}),I=c,F("proactive:triggered",{type:c,context:p}),c==="first_session"?y.pulseTrigger?.():y.open();}},{rageClick:oe?.rageClick,longTask:oe?.longTask,apiCascade:oe?.apiCascade,apiEndpoint:Ln(s),errorBoundary:oe?.errorBoundary,pageDwell:oe?.pageDwell,firstSession:oe?.firstSession,projectId:e.projectId}),o.debug("Proactive triggers enabled",{rageClick:oe?.rageClick!==false,longTask:oe?.longTask!==false,apiCascade:oe?.apiCascade!==false,errorBoundary:oe?.errorBoundary===true,pageDwell:!!oe?.pageDwell,firstSession:!!oe?.firstSession})),h.startAutoSync(l),h.flush(l).then(c=>{c.sent>0&&o.info("Synced offline reports",{sent:c.sent});});function rt(c){if(_=true,H=c.reporterNotificationsEnabled!==false,c.enabled===false){s=e,kc(t.projectId),U(),y.updateConfig(s.widget),te(),o.debug("Runtime SDK config disabled; using bootstrap config",{version:c.version});return}s=So(s,c),U(),c.widget&&y.updateConfig(s.widget),H?et():te(),o.debug("Applied runtime SDK config",{version:c.version});}if(vc(t)){let c=Sc(t.projectId);c&&rt(c),l.getSdkConfig().then(p=>{p.ok&&p.data?(Ec(t.projectId,p.data),rt(p.data)):p.error&&o.debug("Runtime SDK config unavailable",p.error);}).catch(p=>{o.debug("Runtime SDK config fetch failed",{error:p instanceof Error?p.message:String(p)});});}else o.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");nt(),et(),o.info("Initialized",{projectId:t.projectId});async function nt(){if(s.widget?.outdatedBanner==="off")return;let c=Rc(Ue);c&&Bt(c);let p=await l.getLatestSdkVersion(Ue);!p.ok||!p.data||(Cc(Ue,p.data),Bt(p.data));}function Bt(c){let p=c.latest,R=!!(p&&Tc(fe,p));if(!R&&!c.deprecated)return;let P=c.deprecationMessage??(R?`Update ${Ue} to ${p}.`:null);o.warn("Mushi SDK is outdated",{package:Ue,current:fe,latest:p,deprecated:c.deprecated,message:P}),s.widget?.outdatedBanner!=="console-only"&&y.setSdkFreshness({latest:p,current:fe,deprecated:c.deprecated,message:P});}async function Nt(c,p,R,P){let D=f.check(p);if(!D.passed){o.info("Report blocked by pre-filter",{reason:D.reason});return}let Q=t.preFilter?.wasmClassifier;if(Q)try{let N=await Q.classify({description:p,category:c,url:typeof location<"u"?location.href:void 0,hasScreenshot:M!==null,hasSelectedElement:L!==null,hasNetworkErrors:$?.getEntries()?.some(ge=>ge.status>=400||!!ge.error)??!1,hasConsoleErrors:C?.getEntries()?.some(ge=>ge.level==="error")??!1,proactiveTrigger:I??void 0});if(N.verdict==="block"){o.info("Report blocked by on-device classifier",{modelId:N.modelId,confidence:N.confidence,reason:N.reason});return}o.debug("On-device classifier verdict",{...N});}catch(N){o.warn("On-device classifier threw \u2014 falling through to server",{error:N instanceof Error?N.message:String(N)});}if(I!==null&&t.sampleRate!==void 0&&t.sampleRate<1&&(t.sampleRate<=0||Math.random()>t.sampleRate)){o.debug("Report dropped by sampleRate",{sampleRate:t.sampleRate,trigger:I});return}if(!m.tryConsume()){o.warn("Report throttled \u2014 rate limit exceeded");return}let se=b.scrub(f.truncate(p)),re=t.sentry?$n(t.sentry):void 0,Se=await Hs().catch(()=>null),He=s.capture?.console===false?void 0:x(C?.getEntries()),Pe=s.capture?.network===false?void 0:$?.getEntries(),qt=d(K.getAll()),Pn=v(Object.keys(J).length>0?{...J}:void 0),Dn=re?{...re,...re.breadcrumbs?{breadcrumbs:d(re.breadcrumbs)}:{},...re.tags?{tags:v(re.tags)}:{}}:void 0,On=M?await so(M).catch(()=>null):null,jt=false;M&&!On&&(jt=true,o.warn("Screenshot dropped \u2014 could not compress under wire budget"));let Bn=Kr(),Re={id:Vr(),projectId:t.projectId,category:c,...P?{userCategory:P}:{},description:se,userIntent:R,environment:Bn,consoleLogs:He,networkLogs:Pe,performanceMetrics:s.capture?.performance===false?void 0:T?.getMetrics(),timeline:S.getEntries({consoleLogs:He,networkLogs:Pe}),screenshotDataUrl:On??void 0,selectedElement:L??void 0,...k?{replayEvents:k.flush()}:{},metadata:{...ne,...O?{user:O}:{},...re?.release?{sentryRelease:re.release}:{}},sessionId:dt(),reporterToken:ce(r),...Se?{fingerprintHash:Se}:{},appVersion:ti(s,Bn),sdkPackage:Ue,sdkVersion:fe,proactiveTrigger:I??void 0,...qt.length>0?{breadcrumbs:qt}:{},...Pn?{tags:Pn}:{},...Dn?{sentryContext:Dn}:{},sentryEventId:re?.eventId,sentryReplayId:re?.replayId,createdAt:new Date().toISOString()};if(K.add({category:"lifecycle",level:"info",message:`Mushi report submitting (${c})`,data:{reportId:Re.id,category:c}}),t.integrations?.custom){let N={addMetadata(ge,_r){Re.metadata[ge]=_r;},setCategory(ge){Re.category=ge;},setDescription(ge){Re.description=ge;}};t.integrations.custom(N);}let G=Re,Nn=t.beforeSend??t.beforeSendFeedback;if(Nn)try{let N=await Promise.race([Promise.resolve(Nn(Re)),new Promise(ge=>setTimeout(()=>ge(Re),2e3))]);if(N===null){o.info("Report dropped by beforeSend hook",{reportId:Re.id});return}G=N;}catch(N){o.warn("beforeSend hook threw \u2014 sending unmodified report",{error:N instanceof Error?N.message:String(N)});}if(F("report:submitted",{reportId:G.id}),typeof navigator<"u"&&!navigator.onLine)return await h.enqueue(G),o.info("Offline \u2014 report queued",{reportId:G.id}),F("report:queued",{reportId:G.id}),{reportId:null,queuedOffline:true,failureKind:"offline"};let X=await l.submitReport(G);if(!X.ok&&X.error?.code==="PAYLOAD_TOO_LARGE"&&(Array.isArray(G.replayEvents)&&G.replayEvents.length>0&&(o.warn("Report too large \u2014 dropping replay buffer and retrying",{reportId:G.id}),G={...G,replayEvents:void 0},X=await l.submitReport(G)),!X.ok&&X.error?.code==="PAYLOAD_TOO_LARGE"&&G.screenshotDataUrl&&(o.warn("Report still too large \u2014 dropping screenshot and retrying",{reportId:G.id}),jt=true,G={...G,screenshotDataUrl:void 0},X=await l.submitReport(G))),X.ok){if(o.info("Report sent",{reportId:X.data?.reportId}),F("report:sent",{reportId:X.data?.reportId}),z(),X.data?.cursorAgentId){let N=X.data;F("report:dispatched",{reportId:N.reportId,agentId:N.cursorAgentId,fixId:N.fixId});}K.add({category:"lifecycle",level:"info",message:`Mushi report sent (${X.data?.reportId??Re.id})`}),vt({action:"report_submit",metadata:{category:c,reportId:X.data?.reportId??Re.id}});try{t.sentry&&X.data?.reportId&&In(X.data.reportId);}catch{}}else {if(X.error?.code==="PAYLOAD_TOO_LARGE"||X.error?.code==="SERIALIZE_FAILED")return o.warn("Report exceeds size limit after degradation \u2014 dropping",{reportId:G.id,error:X.error}),F("report:failed",{reportId:G.id,error:X.error}),K.add({category:"lifecycle",level:"error",message:`Mushi report dropped \u2014 payload too large (${G.id})`}),M=null,L=null,I=null,{reportId:null,queuedOffline:false,failureKind:"permanent",screenshotDropped:jt};{let N=X.error?.code??"",ge=N==="HTTP_429"||N.includes("RATE_LIMIT"),_r=N==="HTTP_401"||N.includes("UNAUTHORIZED")||N.includes("INVALID_API_KEY")||N.includes("MISSING_API_KEY"),ii=N==="HTTP_403"||N.includes("QUOTA")||N.includes("FORBIDDEN")||N==="feature_not_in_plan";if(_r||ii)return o.warn("Report rejected \u2014 credentials/quota",{reportId:G.id,error:X.error}),F("report:failed",{reportId:G.id,error:X.error}),M=null,L=null,I=null,{reportId:null,queuedOffline:false,failureKind:"quota"};if(ge)return o.warn("Report rate-limited \u2014 queued for retry",{reportId:G.id,error:X.error}),await h.enqueue(G),F("report:failed",{reportId:G.id,error:X.error}),M=null,L=null,I=null,{reportId:null,queuedOffline:true,failureKind:"rate_limited"};o.warn("Report failed, queuing for retry",{reportId:G.id,error:X.error}),await h.enqueue(G),F("report:failed",{reportId:G.id,error:X.error}),K.add({category:"lifecycle",level:"warning",message:`Mushi report queued for retry (${G.id})`});}}return M=null,L=null,I=null,X?.ok?{reportId:X.data?.reportId??Re.id,queuedOffline:false,screenshotDropped:jt}:{reportId:null,queuedOffline:true,failureKind:"retrying"}}let Ut={report(c){y.open(c);},on(c,p){return Y.has(c)||Y.set(c,new Set),Y.get(c).add(p),()=>Y.get(c)?.delete(p)},setUser(c){O=c;},setMetadata(c,p){ne[c]=p;},setScreen(c){S.setScreen(c);},isOpen(){return y.getIsOpen()},open(){y.open();},openWith(c){y.open({category:c});},show(){y.showTrigger();},hide(){y.hideTrigger();},attachTo(c,p){return y.attachTo(c,p)},setTrigger(c){y.setTrigger(c);},openReporter(){y.openReporter();},close(){y.close();},updateConfig(c){rt(c);},diagnose(){return xc({apiEndpoint:Ln(s),widgetMounted:y.getIsMounted(),runtimeConfigLoaded:_,captureScreenshotAvailable:E!==null,captureNetworkIntercepting:$!==null,widgetDiagnostics:y.getWidgetDiagnostics()})},destroy(){Ot?.destroy(),ve?.reset(),y.destroy(),C?.destroy(),$?.destroy(),T?.destroy(),w?.deactivate(),Do(),ue?.(),ue=null,u?.destroy(),u=null,S.destroy(),Ro(),k?.destroy(),k=null,h.stopAutoSync(),te(),Ns(),K.clear(),Y.clear(),Ae=null,o.debug("Destroyed");},async captureEvent(c){if(!m.tryConsume())return o.warn("captureEvent throttled \u2014 rate limit exceeded"),null;let p=b.scrub(f.truncate(c.description)),R=c.category??"bug",P=t.sentry?$n(t.sentry):void 0,D=d(K.getAll()),Q=v(Object.keys(J).length===0&&!c.tags?void 0:{...J,...c.tags??{}}),j=P?{...P,...P.breadcrumbs?{breadcrumbs:d(P.breadcrumbs)}:{},...P.tags?{tags:v(P.tags)}:{}}:void 0,se=Kr(),re={id:Vr(),projectId:t.projectId,category:R,description:p,environment:se,timeline:S.getEntries(),metadata:{...c.metadata??{},...O?{user:O}:{},...c.error?{error:c.error}:{},...c.severity?{severity:c.severity}:{},...c.component?{component:c.component}:{},...c.source?{source:c.source}:{source:"captureEvent"}},...D.length>0?{breadcrumbs:D}:{},...Q&&Object.keys(Q).length>0?{tags:Q}:{},...j?{sentryContext:j}:{},sessionId:dt(),reporterToken:ce(r),appVersion:ti(s,se),sdkPackage:Ue,sdkVersion:fe,sentryEventId:P?.eventId,sentryReplayId:P?.replayId,createdAt:new Date().toISOString()},Se=re;if(s.beforeSendFeedback)try{let Pe=await Promise.race([Promise.resolve(s.beforeSendFeedback(re)),new Promise(qt=>setTimeout(()=>qt(re),2e3))]);if(Pe===null)return o.info("captureEvent dropped by beforeSendFeedback hook",{reportId:re.id}),null;Se=Pe;}catch(Pe){o.warn("captureEvent beforeSendFeedback threw \u2014 sending unmodified report",{error:Pe instanceof Error?Pe.message:String(Pe)});}if(F("report:submitted",{reportId:Se.id}),typeof navigator<"u"&&!navigator.onLine)return await h.enqueue(Se),F("report:queued",{reportId:Se.id}),null;let He=await l.submitReport(Se);if(He.ok){F("report:sent",{reportId:He.data?.reportId});try{t.sentry&&He.data?.reportId&&In(He.data.reportId);}catch{}return He.data?.reportId??null}return await h.enqueue(Se),F("report:failed",{reportId:Se.id,error:He.error}),null},async captureException(c,p){let R=js(c);K.add({category:"lifecycle",level:"error",message:`Mushi.captureException(${R.name}): ${R.message}`,...R.stack?{data:{stack:R.stack.slice(0,500)}}:{}});let P=p?.description?.trim()||`${R.name}: ${R.message}`||"Uncaught exception";return Ut.captureEvent({description:P,category:p?.category??"bug",severity:p?.severity??"high",...p?.component?{component:p.component}:{},...p?.tags?{tags:p.tags}:{},source:p?.source??"captureException",error:{name:R.name,message:R.message,...R.stack?{stack:R.stack}:{}},metadata:{...p?.metadata??{},...R.cause?{cause:R.cause}:{}}})},identify(c,p){let R=`${c}::${p?JSON.stringify(p):""}`;if(R!==ee){if(ee=R,O={id:c,...p?.email?{email:p.email}:{},...p?.name?{name:p.name}:{}},y.setIdentifiedUser(O.name||O.email?{name:O.name,email:O.email}:null),p)for(let[P,D]of Object.entries(p))P!=="email"&&P!=="name"&&(ne[`user.${P}`]=D);K.add({category:"lifecycle",level:"info",message:`Mushi.identify(${c})`}),_e(c,p?{email:p.email,name:p.name,provider:p.provider}:void 0);}},identifyWithToken(c){if(a=c&&typeof c=="string"?c:null,a){let p=Xs(a);if(p?.sub){if(O?.id===p.sub){K.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken() refreshed"});return}Bs(p.sub),O={id:p.sub,...p.email?{email:p.email}:{},...p.name?{name:p.name}:{}},y.setIdentifiedUser(O.name||O.email?{name:O.name,email:O.email}:null),_e(O.id,{email:O.email,name:O.name});}K.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken()"});}else O=null,ee=null,y.setIdentifiedUser(null),K.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken(null)"});},publishPageContext(c){i=c&&c.route?c:null;},openAssistant(){y.openAssistantTab();},addBreadcrumb(c){K.add(c);},getBreadcrumbs(){return K.getAll()},setTag(c,p){typeof c!="string"||c.length===0||(J[c]=p);},setTags(c){if(!(!c||typeof c!="object"))for(let[p,R]of Object.entries(c))typeof p=="string"&&p.length>0&&(J[p]=R);},clearTag(c){if(typeof c=="string"&&c.length>0){delete J[c];return}for(let p of Object.keys(J))delete J[p];},async getReputation(){if(!O?.id)return null;let c=await l.getMyPoints(O.id);return c.ok?{totalPoints:c.data.total_points??0,points30d:c.data.points_30d??0,reputation:1,confirmedBugs:0,totalReports:0}:null},async getTier(){return O?.id?Ho(O.id):null},recordActivity(c,p){s.rewards?.enabled&&vt({action:c,metadata:p});},pulseTrigger(){y.pulseTrigger?.();},async listMyReports(){let c=await l.listReporterReports(ce(r));return c.ok?c.data?.reports??[]:[]},async listMyComments(c){let p=await l.listReporterComments(c,ce(r));return p.ok?p.data?.comments??[]:[]},async replyToReport(c,p){let R=await l.replyToReporterReport(c,ce(r),p);return R.ok?R.data?.comment??null:null},async submitFeedbackSignal(c,p,R){let P=await l.replyToReporterReport(c,ce(r),R??"",p);return P.ok?P.data?.feedback??null:null},async reopenReport(c,p){let R=await l.reopenReporterReport(c,ce(r),p);return R.ok?R.data?.outcome??null:null},openMyReports(){y.recorderOpenMyReports();},async getHallOfFame(c=20){let p=await l.getHallOfFame(c);return p.ok?p.data?.data??[]:[]}};if(typeof globalThis<"u"&&(e.debug??false)&&Eo(y),typeof window<"u"&&typeof localStorage<"u"){let c="mushi:last-run",p=null;try{let R=localStorage.getItem(c);p=R===null?null:R==="unfinished",localStorage.setItem(c,"unfinished");}catch{p=null;}try{window.addEventListener("pagehide",()=>{try{localStorage.setItem(c,"clean");}catch{}});}catch{}if(typeof e.onCrashedLastRun=="function")try{e.onCrashedLastRun(p);}catch(R){o.warn("onCrashedLastRun hook threw",{error:R instanceof Error?R.message:String(R)});}}let Ft={on:()=>{},isOpen:false,getBreadcrumbs:[],captureEvent:null,captureException:null,getReputation:null,getTier:null,listMyReports:[],listMyComments:[],getHallOfFame:[],replyToReport:null,submitFeedbackSignal:null,reopenReport:null},Ar=(c,p)=>{let R=p instanceof Error?p.message:String(p);o.debug(`Mushi.${c}() failed (swallowed)`,{error:R});try{K.add({category:"custom",level:"warning",message:`mushi.${c}() threw`,data:{error:R}});}catch{}};return (c=>new Proxy(c,{get(p,R,P){let D=Reflect.get(p,R,P);if(typeof D!="function")return D;let Q=String(R),j=()=>Q==="diagnose"?An():Q in Ft?Ft[Q]:void 0;return (...se)=>{try{let re=D.apply(p,se);return re&&typeof re.then=="function"?re.catch(Se=>(Ar(Q,Se),j())):re}catch(re){return Ar(Q,re),j()}}}}))(Ut)}function Ln(t){return t.apiEndpoint??ir}function vc(t){return t.runtimeConfig!==false}async function xc(t){let e=await wc(t.apiEndpoint);return {apiEndpointReachable:e.reachable,cspAllowsEndpoint:e.cspAllowed,widgetMounted:t.widgetMounted,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:t.runtimeConfigLoaded,captureScreenshotAvailable:t.captureScreenshotAvailable,captureNetworkIntercepting:t.captureNetworkIntercepting,sdkVersion:fe,widgetHostPointerSafe:t.widgetDiagnostics?.widgetHostPointerSafe??false,widgetHostBounds:t.widgetDiagnostics?.widgetHostBounds??null,widgetSuppressed:t.widgetDiagnostics?.widgetSuppressed??false,bannerRendered:t.widgetDiagnostics?.bannerRendered??false}}async function An(){return {apiEndpointReachable:false,cspAllowsEndpoint:false,widgetMounted:false,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:false,captureScreenshotAvailable:false,captureNetworkIntercepting:false,sdkVersion:fe,widgetHostPointerSafe:false,widgetHostBounds:null,widgetSuppressed:false,bannerRendered:false}}async function wc(t){if(typeof fetch>"u")return {reachable:false,cspAllowed:false};let e=typeof AbortController<"u"?new AbortController:null,r=e?setTimeout(()=>e.abort(),3e3):null;try{return {reachable:(await fetch(`${t.replace(/\/$/,"")}/health`,{method:"GET",cache:"no-store",...e?{signal:e.signal}:{},[ct]:"diagnose"})).ok,cspAllowed:!0}}catch{return {reachable:false,cspAllowed:false}}finally{r&&clearTimeout(r);}}function _n(t){return `mushi:sdk-config:${t}`}function oi(t){return `mushi:sdk-version:${t}`}function Sc(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(_n(t));return e?JSON.parse(e).config??null:null}catch{return null}}function Ec(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(_n(t),JSON.stringify({cachedAt:Date.now(),config:e}));}catch{}}function kc(t){if(!(typeof localStorage>"u"))try{localStorage.removeItem(_n(t));}catch{}}function Rc(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(oi(t));if(!e)return null;let r=JSON.parse(e);return !r.data||!r.cachedAt||Date.now()-r.cachedAt>864e5?null:r.data}catch{return null}}function Cc(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(oi(t),JSON.stringify({cachedAt:Date.now(),data:e}));}catch{}}function Tc(t,e){let r=ri(t),n=ri(e);for(let s=0;s<Math.max(r.length,n.length);s++){let o=r[s]??0,a=n[s]??0;if(o<a)return true;if(o>a)return false}return false}function ri(t){return t.split(/[.-]/).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e))}function ni(){return {report:()=>{},on:()=>()=>{},setUser:()=>{},setMetadata:()=>{},setScreen:()=>{},isOpen:()=>false,open:()=>{},close:()=>{},updateConfig:()=>{},diagnose:An,openWith:()=>{},show:()=>{},hide:()=>{},attachTo:()=>()=>{},setTrigger:()=>{},openReporter:()=>{},destroy:()=>{Ae=null;},captureEvent:async()=>null,captureException:async()=>null,identify:()=>{},identifyWithToken:()=>{},publishPageContext:()=>{},openAssistant:()=>{},addBreadcrumb:()=>{},getBreadcrumbs:()=>[],setTag:()=>{},setTags:()=>{},clearTag:()=>{},getReputation:async()=>null,getTier:async()=>null,recordActivity:()=>{},pulseTrigger:()=>{},listMyReports:async()=>[],listMyComments:async()=>[],replyToReport:async()=>null,submitFeedbackSignal:async()=>null,reopenReport:async()=>null,openMyReports:()=>{},getHallOfFame:async()=>[]}}function $c(t){if(typeof window>"u")return ()=>{};let e=[];try{let r=s=>{t.add({category:"navigation",level:"info",message:`${s}: ${window.location.pathname}`,data:{url:window.location.href,kind:s}});},n=Le({onPush:()=>r("pushState"),onReplace:()=>r("replaceState"),onPop:()=>r("popstate")});e.push(n);}catch{}try{let r=console.error,n=console.warn,s=function(...a){try{t.add({category:"console",level:"error",message:a.map(si).join(" ")});}catch{}return r.apply(this,a)},o=function(...a){try{t.add({category:"console",level:"warning",message:a.map(si).join(" ")});}catch{}return n.apply(this,a)};console.error=s,console.warn=o,e.push(()=>{console.error===s&&(console.error=r),console.warn===o&&(console.warn=n);});}catch{}try{let r=n=>{try{let s=n.target;if(!(s instanceof Element))return;let o=s,a=0;for(;o&&a<10;){let i=o.getAttribute("data-testid");if(i){let l=(o.textContent??"").trim().slice(0,80);t.add({category:"ui.click",level:"info",message:`clicked ${i}${l?` \u2014 ${l}`:""}`,data:{testid:i,tag:o.tagName.toLowerCase()}});return}o=o.parentElement,a++;}}catch{}};document.addEventListener("click",r,{passive:!0,capture:!0}),e.push(()=>document.removeEventListener("click",r,!0));}catch{}return ()=>{for(let r of e)try{r();}catch{}}}function si(t){try{if(t instanceof Error)return `${t.name}: ${t.message}`;if(typeof t=="object"&&t!==null){let r=JSON.stringify(t);return r.length>200?`${r.slice(0,200)}\u2026`:r}let e=String(t);return e.length>200?`${e.slice(0,200)}\u2026`:e}catch{return `[${typeof t}]`}}function Ic(){let t=document.currentScript;if(t&&t.dataset&&t.dataset.project)return t;let e=Array.from(document.querySelectorAll("script[data-project][data-key]"));return e.length>0?e[e.length-1]:null}function Mc(t){let e=t.project?.trim(),r=t.key?.trim();if(!e||!r)return null;let n={};t.trigger&&(n.trigger=t.trigger),t.theme&&(n.theme=t.theme),t.position&&(n.position=t.position),t.triggerText&&(n.triggerText=t.triggerText);let s=t.bannerVariant,o=t.bannerPosition;(s||o)&&(n.bannerConfig={...s?{variant:s}:{},...o?{position:o}:{}});let a={projectId:e,apiKey:r};return t.endpoint&&(a.apiEndpoint=t.endpoint),t.debug==="true"&&(a.debug=true),Object.keys(n).length>0&&(a.widget=n),a}function Lc(){if(typeof document>"u"||typeof window>"u")return;let t=window;if(t.__mushiLoaderInit)return;let e=Ic();if(!e)return;let r=Mc(e.dataset);if(r){t.__mushiLoaderInit=true;try{Lr.init(r);}catch{}}}Lc();
2290
2341
  })();//# sourceMappingURL=mushi.loader.global.js.map
2291
2342
  //# sourceMappingURL=mushi.loader.global.js.map