@flowe-ai/cli 0.3.0 → 0.3.2

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,9 +1,9 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><title>Flowe</title><style>:root{--fl-sans:'Flowe Sans',-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,sans-serif;--fl-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--fl-bg:#fff4e8;--fl-card:rgba(255,252,247,0.78);--fl-card-solid:#fffaf2;--fl-card-edge:rgba(43,38,34,0.11);--fl-well:rgba(43,38,34,0.055);--fl-sel:rgba(110,97,137,0.14);--fl-fg:#1a1611;--fl-body:#4f4842;--fl-label:#6b645c;--fl-line:rgba(43,38,34,0.11);--fl-track:rgba(43,38,34,0.1);--fl-track-strong:rgba(43,38,34,0.13);--fl-chip:rgba(255,255,255,0.62);--fl-chip-edge:rgba(43,38,34,0.12);--fl-accent:#6e6189;--fl-accent-deep:#5a4e75;--fl-on-accent:#ffffff;--fl-accent-ink:#6e6189;--fl-accent-soft:rgba(110,97,137,0.12);--fl-accent-edge:rgba(110,97,137,0.34);--fl-accent-shadow:rgba(110,97,137,0.2);--fl-ok-soft:rgba(95,138,121,0.15);--fl-ok-ink:#3f6b5a;--fl-sage:#5f8a79;--fl-sand-soft:rgba(196,149,106,0.18);--fl-sand-ink:#7a4f24;--fl-danger:#a3361f;--fl-peek-body:#8b7ba4;--fl-peek-muzzle:#f1eaf6;--fl-peek-ink:#2b2338;--fl-peek-blush:#e9a99a;--fl-peek-grey:#6b645c;--fl-peek-moon:#dccfe9;--fl-atmos:radial-gradient(62% 52% at 92% 0%,rgba(139,123,164,0.22) 0%,rgba(139,123,164,0) 70%),radial-gradient(56% 48% at 0% 100%,rgba(196,149,106,0.16) 0%,rgba(196,149,106,0) 70%);--fl-grain-opacity:0.11;--fl-grain-blend:multiply;}:root[data-theme='dark']{--fl-bg:#15120f;--fl-card:rgba(36,30,25,0.72);--fl-card-solid:#1e1813;--fl-card-edge:rgba(255,244,232,0.11);--fl-well:rgba(255,244,232,0.075);--fl-sel:rgba(185,163,204,0.2);--fl-fg:#fff5e3;--fl-body:#d4c8ba;--fl-label:#bfb2a3;--fl-line:rgba(255,244,232,0.11);--fl-track:rgba(255,244,232,0.08);--fl-track-strong:rgba(255,244,232,0.14);--fl-chip:rgba(255,244,232,0.06);--fl-chip-edge:rgba(255,244,232,0.12);--fl-accent:#b9a3cc;--fl-accent-deep:#d3c3e2;--fl-on-accent:#15120f;--fl-accent-ink:#c3b0d6;--fl-accent-soft:rgba(185,163,204,0.16);--fl-accent-edge:rgba(185,163,204,0.36);--fl-accent-shadow:rgba(0,0,0,0.32);--fl-ok-soft:rgba(143,181,165,0.16);--fl-ok-ink:#a8cbbb;--fl-sage:#8fb5a5;--fl-sand-soft:rgba(215,166,118,0.16);--fl-sand-ink:#e8c39b;--fl-danger:#f0a58c;--fl-peek-body:#b9a3cc;--fl-peek-muzzle:#f1eaf6;--fl-peek-ink:#2b2338;--fl-peek-blush:#e7a493;--fl-peek-grey:#bfb2a3;--fl-peek-moon:#4d4263;--fl-atmos:radial-gradient(62% 52% at 92% 0%,rgba(185,163,204,0.16) 0%,rgba(185,163,204,0) 70%),radial-gradient(56% 48% at 0% 100%,rgba(196,149,106,0.12) 0%,rgba(196,149,106,0) 70%);--fl-grain-opacity:0.15;--fl-grain-blend:overlay;}*,*::before,*::after{box-sizing:border-box;}html,body{margin:0;padding:0;background:transparent;color:var(--fl-fg);font-family:var(--fl-sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}.fl-shell{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;background-color:var(--fl-bg);background-image:var(--fl-atmos);border:1px solid var(--fl-card-edge);padding:18px 20px;color:var(--fl-fg);animation:fl-enter 0.36s cubic-bezier(0.2,0.7,0.2,1) both;}.fl-shell::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:2;opacity:var(--fl-grain-opacity);mix-blend-mode:var(--fl-grain-blend);background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");}.fl-shell>*{position:relative;z-index:1;}@keyframes fl-enter{from{transform:translateY(8px) scale(0.992);}to{transform:none;}}.fl-mono{font-family:var(--fl-mono);font-size:10.5px;font-weight:500;letter-spacing:0.18em;text-transform:uppercase;color:var(--fl-label);}.fl-title{margin:0;font-size:18px;font-weight:600;letter-spacing:-0.02em;line-height:1.25;color:var(--fl-fg);}.fl-body{margin:0;font-size:14px;line-height:1.5;color:var(--fl-body);}.fl-tabular{font-variant-numeric:tabular-nums;}.fl-header{display:flex;align-items:center;justify-content:space-between;gap:12px;}.fl-brand-row{display:flex;align-items:center;gap:10px;min-width:0;}.fl-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;}.fl-stack{display:flex;flex-direction:column;gap:14px;}.fl-divider{height:1px;background:var(--fl-line);margin:2px 0;}.fl-btn-primary{appearance:none;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 20px;border-radius:999px;background:var(--fl-accent);color:var(--fl-on-accent);font-family:var(--fl-sans);font-size:14px;font-weight:600;box-shadow:0 8px 20px var(--fl-accent-shadow);transition:opacity 150ms ease,transform 150ms ease;}.fl-btn-primary:hover:not(:disabled){opacity:0.92;}.fl-btn-primary:active:not(:disabled){transform:scale(0.985);}.fl-btn-primary:disabled{opacity:0.5;cursor:not-allowed;}.fl-btn-secondary{appearance:none;border:1px solid var(--fl-chip-edge);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 14px;border-radius:999px;background:var(--fl-well);color:var(--fl-fg);font-family:var(--fl-sans);font-size:13px;font-weight:500;transition:background 150ms ease;}.fl-btn-secondary:hover:not(:disabled){background:var(--fl-sel);}.fl-btn-link{appearance:none;border:0;background:transparent;cursor:pointer;display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:0 6px;border-radius:8px;color:var(--fl-label);font-family:var(--fl-sans);font-size:13px;font-weight:500;transition:color 140ms ease;}.fl-btn-link:hover{color:var(--fl-fg);}.fl-chip{appearance:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--fl-chip-edge);background:var(--fl-chip);color:var(--fl-body);font-family:var(--fl-sans);font-size:12.5px;font-weight:500;transition:background 140ms ease,border-color 140ms ease,color 140ms ease;}.fl-chip:hover{border-color:var(--fl-accent-edge);color:var(--fl-fg);}.fl-chip[data-selected='true']{background:var(--fl-accent-soft);border-color:var(--fl-accent-edge);color:var(--fl-accent-ink);font-weight:600;}.fl-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:var(--fl-accent-soft);color:var(--fl-accent-ink);font-family:var(--fl-mono);font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;}.fl-badge-ok{background:var(--fl-ok-soft);color:var(--fl-ok-ink);}.fl-badge-sand{background:var(--fl-sand-soft);color:var(--fl-sand-ink);}.fl-btn-primary:focus-visible,.fl-btn-secondary:focus-visible,.fl-btn-link:focus-visible,.fl-chip:focus-visible{outline:2px solid var(--fl-accent);outline-offset:2px;}.fl-runner-stage{display:flex;align-items:center;gap:20px;padding:4px 0;}@media (max-width:420px){.fl-runner-stage{flex-direction:column;text-align:center;}}.fl-ring-wrap{position:relative;flex-shrink:0;display:grid;place-items:center;}.fl-ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;}.fl-ring-time{font-size:26px;font-weight:600;letter-spacing:-0.02em;line-height:1;font-variant-numeric:tabular-nums;color:var(--fl-fg);}.fl-cue-label{font-size:20px;font-weight:600;letter-spacing:-0.02em;color:var(--fl-fg);margin:0;}.fl-breath-halo{position:absolute;inset:14px;border-radius:50%;background:radial-gradient(circle,var(--fl-accent-soft) 0%,transparent 72%);pointer-events:none;transition:transform 900ms cubic-bezier(0.35,0,0.25,1);}.fl-pips{display:flex;align-items:center;gap:6px;}.fl-pip{height:5px;width:22px;border-radius:999px;background:var(--fl-track-strong);transition:background 240ms ease;}.fl-pip[data-state='done']{background:var(--fl-accent);opacity:0.55;}.fl-pip[data-state='active']{background:var(--fl-accent);}.fl-code-box{display:inline-flex;align-items:center;gap:10px;padding:8px 14px;border-radius:12px;background:var(--fl-card-solid);border:1px solid var(--fl-line);font-family:var(--fl-mono);font-size:16px;font-weight:600;letter-spacing:0.16em;color:var(--fl-fg);}.fl-qr-tile{width:112px;height:112px;padding:8px;border-radius:14px;background:#ffffff;border:1px solid var(--fl-line);flex-shrink:0;display:grid;place-items:center;}.fl-panel{border-radius:14px;background:var(--fl-card);border:1px solid var(--fl-line);padding:12px 14px;}.fl-error{font-size:13px;color:var(--fl-danger);margin:0;}@keyframes peek-face{from{opacity:0;transform:scaleY(0.3);}to{opacity:1;transform:none;}}@keyframes peek-bob{0%,100%{transform:translateY(0);}50%{transform:translateY(-2.5px);}}@keyframes peek-ripple{0%{opacity:0;transform:scale(0.94);}18%{opacity:0.42;}100%{opacity:0;transform:scale(1.3);}}@keyframes peek-blink{0%,93%,100%{transform:scaleY(1);}96.5%{transform:scaleY(0.08);}}@keyframes peek-look{0%,100%{transform:translateX(-2px);}50%{transform:translateX(2.5px);}}.peek-anim-bob{animation:peek-bob 3.6s ease-in-out infinite;}.peek-anim-ripple{animation:peek-ripple 3.6s ease-out infinite;}.peek-anim-blink{animation:peek-blink 5.2s linear infinite;}.peek-anim-look{animation:peek-look 3s ease-in-out infinite;}.peek-anim-face{animation:peek-face 320ms cubic-bezier(0.22,1,0.36,1) both;}@media (prefers-reduced-motion:reduce){.fl-shell,.peek-anim-bob,.peek-anim-ripple,.peek-anim-blink,.peek-anim-look,.peek-anim-face{animation:none !important;}.fl-breath-halo{transition:none !important;}}@media (prefers-reduced-transparency:reduce){.fl-shell::after{display:none;}.fl-shell{background-image:none;}}</style></head><body><div id="app"></div><script type="module">var ao=Object.create;var At=Object.defineProperty;var co=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var fo=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var ho=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of uo(e))!_o.call(t,r)&&r!==n&&At(t,r,{get:()=>e[r],enumerable:!(o=co(e,r))||o.enumerable});return t};var po=(t,e,n)=>(n=t!=null?ao(fo(t)):{},ho(e||!t||!t.__esModule?At(n,"default",{value:t,enumerable:!0}):n,t));var on=P((si,nn)=>{nn.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var W=P(ee=>{var it,Ho=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];ee.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};ee.getSymbolTotalCodewords=function(e){return Ho[e]};ee.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};ee.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};ee.isKanjiModeEnabled=function(){return typeof it<"u"};ee.toSJIS=function(e){return it(e)}});var Be=P(q=>{q.L={bit:1};q.M={bit:0};q.Q={bit:3};q.H={bit:2};function $o(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return q.L;case"m":case"medium":return q.M;case"q":case"quartile":return q.Q;case"h":case"high":return q.H;default:throw new Error("Unknown EC Level: "+t)}}q.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};q.from=function(e,n){if(q.isValid(e))return e;try{return $o(e)}catch{return n}}});var ln=P((ci,sn)=>{function rn(){this.buffer=[],this.length=0}rn.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};sn.exports=rn});var cn=P((ui,an)=>{function _e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}_e.prototype.set=function(t,e,n,o){let r=t*this.size+e;this.data[r]=n,o&&(this.reservedBit[r]=!0)};_e.prototype.get=function(t,e){return this.data[t*this.size+e]};_e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};_e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};an.exports=_e});var un=P(Ie=>{var Vo=W().getSymbolSize;Ie.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,o=Vo(e),r=o===145?26:Math.ceil((o-13)/(2*n-2))*2,i=[o-7];for(let s=1;s<n-1;s++)i[s]=i[s-1]-r;return i.push(6),i.reverse()};Ie.getPositions=function(e){let n=[],o=Ie.getRowColCoords(e),r=o.length;for(let i=0;i<r;i++)for(let s=0;s<r;s++)i===0&&s===0||i===0&&s===r-1||i===r-1&&s===0||n.push([o[i],o[s]]);return n}});var _n=P(fn=>{var jo=W().getSymbolSize,dn=7;fn.getPositions=function(e){let n=jo(e);return[[0,0],[n-dn,0],[0,n-dn]]}});var hn=P(S=>{S.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var te={N1:3,N2:3,N3:40,N4:10};S.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};S.from=function(e){return S.isValid(e)?parseInt(e,10):void 0};S.getPenaltyN1=function(e){let n=e.size,o=0,r=0,i=0,s=null,l=null;for(let c=0;c<n;c++){r=i=0,s=l=null;for(let f=0;f<n;f++){let d=e.get(c,f);d===s?r++:(r>=5&&(o+=te.N1+(r-5)),s=d,r=1),d=e.get(f,c),d===l?i++:(i>=5&&(o+=te.N1+(i-5)),l=d,i=1)}r>=5&&(o+=te.N1+(r-5)),i>=5&&(o+=te.N1+(i-5))}return o};S.getPenaltyN2=function(e){let n=e.size,o=0;for(let r=0;r<n-1;r++)for(let i=0;i<n-1;i++){let s=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(s===4||s===0)&&o++}return o*te.N2};S.getPenaltyN3=function(e){let n=e.size,o=0,r=0,i=0;for(let s=0;s<n;s++){r=i=0;for(let l=0;l<n;l++)r=r<<1&2047|e.get(s,l),l>=10&&(r===1488||r===93)&&o++,i=i<<1&2047|e.get(l,s),l>=10&&(i===1488||i===93)&&o++}return o*te.N3};S.getPenaltyN4=function(e){let n=0,o=e.data.length;for(let i=0;i<o;i++)n+=e.data[i];return Math.abs(Math.ceil(n*100/o/5)-10)*te.N4};function Ko(t,e,n){switch(t){case S.Patterns.PATTERN000:return(e+n)%2===0;case S.Patterns.PATTERN001:return e%2===0;case S.Patterns.PATTERN010:return n%3===0;case S.Patterns.PATTERN011:return(e+n)%3===0;case S.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2===0;case S.Patterns.PATTERN101:return e*n%2+e*n%3===0;case S.Patterns.PATTERN110:return(e*n%2+e*n%3)%2===0;case S.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}S.applyMask=function(e,n){let o=n.size;for(let r=0;r<o;r++)for(let i=0;i<o;i++)n.isReserved(i,r)||n.xor(i,r,Ko(e,i,r))};S.getBestMask=function(e,n){let o=Object.keys(S.Patterns).length,r=0,i=1/0;for(let s=0;s<o;s++){n(s),S.applyMask(s,e);let l=S.getPenaltyN1(e)+S.getPenaltyN2(e)+S.getPenaltyN3(e)+S.getPenaltyN4(e);S.applyMask(s,e),l<i&&(i=l,r=s)}return r}});var lt=P(st=>{var J=Be(),Re=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Ne=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];st.getBlocksCount=function(e,n){switch(n){case J.L:return Re[(e-1)*4+0];case J.M:return Re[(e-1)*4+1];case J.Q:return Re[(e-1)*4+2];case J.H:return Re[(e-1)*4+3];default:return}};st.getTotalCodewordsCount=function(e,n){switch(n){case J.L:return Ne[(e-1)*4+0];case J.M:return Ne[(e-1)*4+1];case J.Q:return Ne[(e-1)*4+2];case J.H:return Ne[(e-1)*4+3];default:return}}});var pn=P(Fe=>{var he=new Uint8Array(512),Le=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)he[n]=e,Le[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)he[n]=he[n-255]})();Fe.log=function(e){if(e<1)throw new Error("log("+e+")");return Le[e]};Fe.exp=function(e){return he[e]};Fe.mul=function(e,n){return e===0||n===0?0:he[Le[e]+Le[n]]}});var gn=P(pe=>{var at=pn();pe.mul=function(e,n){let o=new Uint8Array(e.length+n.length-1);for(let r=0;r<e.length;r++)for(let i=0;i<n.length;i++)o[r+i]^=at.mul(e[r],n[i]);return o};pe.mod=function(e,n){let o=new Uint8Array(e);for(;o.length-n.length>=0;){let r=o[0];for(let s=0;s<n.length;s++)o[s]^=at.mul(n[s],r);let i=0;for(;i<o.length&&o[i]===0;)i++;o=o.slice(i)}return o};pe.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=pe.mul(n,new Uint8Array([1,at.exp(o)]));return n}});var wn=P((mi,yn)=>{var mn=gn();function ct(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}ct.prototype.initialize=function(e){this.degree=e,this.genPoly=mn.generateECPolynomial(this.degree)};ct.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(e.length+this.degree);n.set(e);let o=mn.mod(n,this.genPoly),r=this.degree-o.length;if(r>0){let i=new Uint8Array(this.degree);return i.set(o,r),i}return o};yn.exports=ct});var ut=P(vn=>{vn.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var dt=P(V=>{var bn="[0-9]+",Wo="[A-Z $%*+\\-./:]+",ge="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ge=ge.replace(/u/g,"\\u");var Jo="(?:(?![A-Z0-9 $%*+\\-./:]|"+ge+`)(?:.|[\r
2
- ]))+`;V.KANJI=new RegExp(ge,"g");V.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");V.BYTE=new RegExp(Jo,"g");V.NUMERIC=new RegExp(bn,"g");V.ALPHANUMERIC=new RegExp(Wo,"g");var Qo=new RegExp("^"+ge+"$"),Go=new RegExp("^"+bn+"$"),Yo=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");V.testKanji=function(e){return Qo.test(e)};V.testNumeric=function(e){return Go.test(e)};V.testAlphanumeric=function(e){return Yo.test(e)}});var Q=P(B=>{var Xo=ut(),ft=dt();B.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};B.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};B.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};B.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};B.MIXED={bit:-1};B.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Xo.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]};B.getBestModeForData=function(e){return ft.testNumeric(e)?B.NUMERIC:ft.testAlphanumeric(e)?B.ALPHANUMERIC:ft.testKanji(e)?B.KANJI:B.BYTE};B.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};B.isValid=function(e){return e&&e.bit&&e.ccBits};function Zo(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return B.NUMERIC;case"alphanumeric":return B.ALPHANUMERIC;case"kanji":return B.KANJI;case"byte":return B.BYTE;default:throw new Error("Unknown mode: "+t)}}B.from=function(e,n){if(B.isValid(e))return e;try{return Zo(e)}catch{return n}}});var xn=P(ne=>{var De=W(),er=lt(),kn=Be(),G=Q(),_t=ut(),En=7973,Cn=De.getBCHDigit(En);function tr(t,e,n){for(let o=1;o<=40;o++)if(e<=ne.getCapacity(o,n,t))return o}function Mn(t,e){return G.getCharCountIndicator(t,e)+4}function nr(t,e){let n=0;return t.forEach(function(o){let r=Mn(o.mode,e);n+=r+o.getBitsLength()}),n}function or(t,e){for(let n=1;n<=40;n++)if(nr(t,n)<=ne.getCapacity(n,e,G.MIXED))return n}ne.from=function(e,n){return _t.isValid(e)?parseInt(e,10):n};ne.getCapacity=function(e,n,o){if(!_t.isValid(e))throw new Error("Invalid QR Code version");typeof o>"u"&&(o=G.BYTE);let r=De.getSymbolTotalCodewords(e),i=er.getTotalCodewordsCount(e,n),s=(r-i)*8;if(o===G.MIXED)return s;let l=s-Mn(o,e);switch(o){case G.NUMERIC:return Math.floor(l/10*3);case G.ALPHANUMERIC:return Math.floor(l/11*2);case G.KANJI:return Math.floor(l/13);case G.BYTE:default:return Math.floor(l/8)}};ne.getBestVersionForData=function(e,n){let o,r=kn.from(n,kn.M);if(Array.isArray(e)){if(e.length>1)return or(e,r);if(e.length===0)return 1;o=e[0]}else o=e;return tr(o.mode,o.getLength(),r)};ne.getEncodedBits=function(e){if(!_t.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;De.getBCHDigit(n)-Cn>=0;)n^=En<<De.getBCHDigit(n)-Cn;return e<<12|n}});var An=P(Tn=>{var ht=W(),Sn=1335,rr=21522,Pn=ht.getBCHDigit(Sn);Tn.getEncodedBits=function(e,n){let o=e.bit<<3|n,r=o<<10;for(;ht.getBCHDigit(r)-Pn>=0;)r^=Sn<<ht.getBCHDigit(r)-Pn;return(o<<10|r)^rr}});var In=P((Ci,Bn)=>{var ir=Q();function ie(t){this.mode=ir.NUMERIC,this.data=t.toString()}ie.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};ie.prototype.getLength=function(){return this.data.length};ie.prototype.getBitsLength=function(){return ie.getBitsLength(this.data.length)};ie.prototype.write=function(e){let n,o,r;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),r=parseInt(o,10),e.put(r,10);let i=this.data.length-n;i>0&&(o=this.data.substr(n),r=parseInt(o,10),e.put(r,i*3+1))};Bn.exports=ie});var Nn=P((Ei,Rn)=>{var sr=Q(),pt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function se(t){this.mode=sr.ALPHANUMERIC,this.data=t}se.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};se.prototype.getLength=function(){return this.data.length};se.prototype.getBitsLength=function(){return se.getBitsLength(this.data.length)};se.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let o=pt.indexOf(this.data[n])*45;o+=pt.indexOf(this.data[n+1]),e.put(o,11)}this.data.length%2&&e.put(pt.indexOf(this.data[n]),6)};Rn.exports=se});var Fn=P((Mi,Ln)=>{var lr=Q();function le(t){this.mode=lr.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}le.getBitsLength=function(e){return e*8};le.prototype.getLength=function(){return this.data.length};le.prototype.getBitsLength=function(){return le.getBitsLength(this.data.length)};le.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};Ln.exports=le});var Un=P((xi,Dn)=>{var ar=Q(),cr=W();function ae(t){this.mode=ar.KANJI,this.data=t}ae.getBitsLength=function(e){return e*13};ae.prototype.getLength=function(){return this.data.length};ae.prototype.getBitsLength=function(){return ae.getBitsLength(this.data.length)};ae.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=cr.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};Dn.exports=ae});var qn=P((Pi,gt)=>{"use strict";var me={single_source_shortest_paths:function(t,e,n){var o={},r={};r[e]=0;var i=me.PriorityQueue.make();i.push(e,0);for(var s,l,c,f,d,g,_,u,p;!i.empty();){s=i.pop(),l=s.value,f=s.cost,d=t[l]||{};for(c in d)d.hasOwnProperty(c)&&(g=d[c],_=f+g,u=r[c],p=typeof r[c]>"u",(p||u>_)&&(r[c]=_,i.push(c,_),o[c]=l))}if(typeof n<"u"&&typeof r[n]>"u"){var C=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(C)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],o=e,r;o;)n.push(o),r=t[o],o=t[o];return n.reverse(),n},find_path:function(t,e,n){var o=me.single_source_shortest_paths(t,e,n);return me.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e=me.PriorityQueue,n={},o;t=t||{};for(o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n.queue=[],n.sorter=t.sorter||e.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof gt<"u"&&(gt.exports=me)});var Wn=P(ce=>{var M=Q(),Hn=In(),$n=Nn(),Vn=Fn(),jn=Un(),ye=dt(),Ue=W(),ur=qn();function On(t){return unescape(encodeURIComponent(t)).length}function we(t,e,n){let o=[],r;for(;(r=t.exec(n))!==null;)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function Kn(t){let e=we(ye.NUMERIC,M.NUMERIC,t),n=we(ye.ALPHANUMERIC,M.ALPHANUMERIC,t),o,r;return Ue.isKanjiModeEnabled()?(o=we(ye.BYTE,M.BYTE,t),r=we(ye.KANJI,M.KANJI,t)):(o=we(ye.BYTE_KANJI,M.BYTE,t),r=[]),e.concat(n,o,r).sort(function(s,l){return s.index-l.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function mt(t,e){switch(e){case M.NUMERIC:return Hn.getBitsLength(t);case M.ALPHANUMERIC:return $n.getBitsLength(t);case M.KANJI:return jn.getBitsLength(t);case M.BYTE:return Vn.getBitsLength(t)}}function dr(t){return t.reduce(function(e,n){let o=e.length-1>=0?e[e.length-1]:null;return o&&o.mode===n.mode?(e[e.length-1].data+=n.data,e):(e.push(n),e)},[])}function fr(t){let e=[];for(let n=0;n<t.length;n++){let o=t[n];switch(o.mode){case M.NUMERIC:e.push([o,{data:o.data,mode:M.ALPHANUMERIC,length:o.length},{data:o.data,mode:M.BYTE,length:o.length}]);break;case M.ALPHANUMERIC:e.push([o,{data:o.data,mode:M.BYTE,length:o.length}]);break;case M.KANJI:e.push([o,{data:o.data,mode:M.BYTE,length:On(o.data)}]);break;case M.BYTE:e.push([{data:o.data,mode:M.BYTE,length:On(o.data)}])}}return e}function _r(t,e){let n={},o={start:{}},r=["start"];for(let i=0;i<t.length;i++){let s=t[i],l=[];for(let c=0;c<s.length;c++){let f=s[c],d=""+i+c;l.push(d),n[d]={node:f,lastCount:0},o[d]={};for(let g=0;g<r.length;g++){let _=r[g];n[_]&&n[_].node.mode===f.mode?(o[_][d]=mt(n[_].lastCount+f.length,f.mode)-mt(n[_].lastCount,f.mode),n[_].lastCount+=f.length):(n[_]&&(n[_].lastCount=f.length),o[_][d]=mt(f.length,f.mode)+4+M.getCharCountIndicator(f.mode,e))}}r=l}for(let i=0;i<r.length;i++)o[r[i]].end=0;return{map:o,table:n}}function zn(t,e){let n,o=M.getBestModeForData(t);if(n=M.from(e,o),n!==M.BYTE&&n.bit<o.bit)throw new Error('"'+t+'" cannot be encoded with mode '+M.toString(n)+`.
4
- Suggested mode is: `+M.toString(o));switch(n===M.KANJI&&!Ue.isKanjiModeEnabled()&&(n=M.BYTE),n){case M.NUMERIC:return new Hn(t);case M.ALPHANUMERIC:return new $n(t);case M.KANJI:return new jn(t);case M.BYTE:return new Vn(t)}}ce.fromArray=function(e){return e.reduce(function(n,o){return typeof o=="string"?n.push(zn(o,null)):o.data&&n.push(zn(o.data,o.mode)),n},[])};ce.fromString=function(e,n){let o=Kn(e,Ue.isKanjiModeEnabled()),r=fr(o),i=_r(r,n),s=ur.find_path(i.map,"start","end"),l=[];for(let c=1;c<s.length-1;c++)l.push(i.table[s[c]].node);return ce.fromArray(dr(l))};ce.rawSplit=function(e){return ce.fromArray(Kn(e,Ue.isKanjiModeEnabled()))}});var Qn=P(Jn=>{var Oe=W(),yt=Be(),hr=ln(),pr=cn(),gr=un(),mr=_n(),bt=hn(),kt=lt(),yr=wn(),qe=xn(),wr=An(),vr=Q(),wt=Wn();function br(t,e){let n=t.size,o=mr.getPositions(e);for(let r=0;r<o.length;r++){let i=o[r][0],s=o[r][1];for(let l=-1;l<=7;l++)if(!(i+l<=-1||n<=i+l))for(let c=-1;c<=7;c++)s+c<=-1||n<=s+c||(l>=0&&l<=6&&(c===0||c===6)||c>=0&&c<=6&&(l===0||l===6)||l>=2&&l<=4&&c>=2&&c<=4?t.set(i+l,s+c,!0,!0):t.set(i+l,s+c,!1,!0))}}function kr(t){let e=t.size;for(let n=8;n<e-8;n++){let o=n%2===0;t.set(n,6,o,!0),t.set(6,n,o,!0)}}function Cr(t,e){let n=gr.getPositions(e);for(let o=0;o<n.length;o++){let r=n[o][0],i=n[o][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(r+s,i+l,!0,!0):t.set(r+s,i+l,!1,!0)}}function Er(t,e){let n=t.size,o=qe.getEncodedBits(e),r,i,s;for(let l=0;l<18;l++)r=Math.floor(l/3),i=l%3+n-8-3,s=(o>>l&1)===1,t.set(r,i,s,!0),t.set(i,r,s,!0)}function vt(t,e,n){let o=t.size,r=wr.getEncodedBits(e,n),i,s;for(i=0;i<15;i++)s=(r>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(o-15+i,8,s,!0),i<8?t.set(8,o-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(o-8,8,1,!0)}function Mr(t,e){let n=t.size,o=-1,r=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(l===6&&l--;;){for(let c=0;c<2;c++)if(!t.isReserved(r,l-c)){let f=!1;s<e.length&&(f=(e[s]>>>i&1)===1),t.set(r,l-c,f),i--,i===-1&&(s++,i=7)}if(r+=o,r<0||n<=r){r-=o,o=-o;break}}}function xr(t,e,n){let o=new hr;n.forEach(function(c){o.put(c.mode.bit,4),o.put(c.getLength(),vr.getCharCountIndicator(c.mode,t)),c.write(o)});let r=Oe.getSymbolTotalCodewords(t),i=kt.getTotalCodewordsCount(t,e),s=(r-i)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);let l=(s-o.getLengthInBits())/8;for(let c=0;c<l;c++)o.put(c%2?17:236,8);return Pr(o,t,e)}function Pr(t,e,n){let o=Oe.getSymbolTotalCodewords(e),r=kt.getTotalCodewordsCount(e,n),i=o-r,s=kt.getBlocksCount(e,n),l=o%s,c=s-l,f=Math.floor(o/s),d=Math.floor(i/s),g=d+1,_=f-d,u=new yr(_),p=0,C=new Array(s),h=new Array(s),v=0,b=new Uint8Array(t.buffer);for(let E=0;E<s;E++){let T=E<c?d:g;C[E]=b.slice(p,p+T),h[E]=u.encode(C[E]),p+=T,v=Math.max(v,T)}let m=new Uint8Array(o),k=0,w,y;for(w=0;w<v;w++)for(y=0;y<s;y++)w<C[y].length&&(m[k++]=C[y][w]);for(w=0;w<_;w++)for(y=0;y<s;y++)m[k++]=h[y][w];return m}function Sr(t,e,n,o){let r;if(Array.isArray(t))r=wt.fromArray(t);else if(typeof t=="string"){let f=e;if(!f){let d=wt.rawSplit(t);f=qe.getBestVersionForData(d,n)}r=wt.fromString(t,f||40)}else throw new Error("Invalid data");let i=qe.getBestVersionForData(r,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(`
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><title>Flowe</title><style>:root{--fl-sans:'Flowe Sans',-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,sans-serif;--fl-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--fl-bg:#fff4e8;--fl-card:rgba(255,252,247,0.78);--fl-card-solid:#fffaf2;--fl-card-edge:rgba(43,38,34,0.11);--fl-well:rgba(43,38,34,0.055);--fl-sel:rgba(110,97,137,0.14);--fl-fg:#1a1611;--fl-body:#4f4842;--fl-label:#6b645c;--fl-line:rgba(43,38,34,0.11);--fl-track:rgba(43,38,34,0.1);--fl-track-strong:rgba(43,38,34,0.13);--fl-chip:rgba(255,255,255,0.62);--fl-chip-edge:rgba(43,38,34,0.12);--fl-accent:#6e6189;--fl-accent-deep:#5a4e75;--fl-on-accent:#ffffff;--fl-accent-ink:#6e6189;--fl-accent-soft:rgba(110,97,137,0.12);--fl-accent-edge:rgba(110,97,137,0.34);--fl-accent-shadow:rgba(110,97,137,0.2);--fl-ok-soft:rgba(95,138,121,0.15);--fl-ok-ink:#3f6b5a;--fl-sage:#5f8a79;--fl-sand-soft:rgba(196,149,106,0.18);--fl-sand-ink:#7a4f24;--fl-danger:#a3361f;--fl-peek-body:#8b7ba4;--fl-peek-muzzle:#f1eaf6;--fl-peek-ink:#2b2338;--fl-peek-blush:#e9a99a;--fl-peek-grey:#6b645c;--fl-peek-moon:#dccfe9;--fl-atmos:radial-gradient(62% 52% at 92% 0%,rgba(139,123,164,0.22) 0%,rgba(139,123,164,0) 70%),radial-gradient(56% 48% at 0% 100%,rgba(196,149,106,0.16) 0%,rgba(196,149,106,0) 70%);--fl-grain-opacity:0.11;--fl-grain-blend:multiply;}:root[data-theme='dark']{--fl-bg:#15120f;--fl-card:rgba(36,30,25,0.72);--fl-card-solid:#1e1813;--fl-card-edge:rgba(255,244,232,0.11);--fl-well:rgba(255,244,232,0.075);--fl-sel:rgba(185,163,204,0.2);--fl-fg:#fff5e3;--fl-body:#d4c8ba;--fl-label:#bfb2a3;--fl-line:rgba(255,244,232,0.11);--fl-track:rgba(255,244,232,0.08);--fl-track-strong:rgba(255,244,232,0.14);--fl-chip:rgba(255,244,232,0.06);--fl-chip-edge:rgba(255,244,232,0.12);--fl-accent:#b9a3cc;--fl-accent-deep:#d3c3e2;--fl-on-accent:#15120f;--fl-accent-ink:#c3b0d6;--fl-accent-soft:rgba(185,163,204,0.16);--fl-accent-edge:rgba(185,163,204,0.36);--fl-accent-shadow:rgba(0,0,0,0.32);--fl-ok-soft:rgba(143,181,165,0.16);--fl-ok-ink:#a8cbbb;--fl-sage:#8fb5a5;--fl-sand-soft:rgba(215,166,118,0.16);--fl-sand-ink:#e8c39b;--fl-danger:#f0a58c;--fl-peek-body:#b9a3cc;--fl-peek-muzzle:#f1eaf6;--fl-peek-ink:#2b2338;--fl-peek-blush:#e7a493;--fl-peek-grey:#bfb2a3;--fl-peek-moon:#4d4263;--fl-atmos:radial-gradient(62% 52% at 92% 0%,rgba(185,163,204,0.16) 0%,rgba(185,163,204,0) 70%),radial-gradient(56% 48% at 0% 100%,rgba(196,149,106,0.12) 0%,rgba(196,149,106,0) 70%);--fl-grain-opacity:0.15;--fl-grain-blend:overlay;}*,*::before,*::after{box-sizing:border-box;}html,body{margin:0;padding:0;background:transparent;color:var(--fl-fg);font-family:var(--fl-sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}.fl-shell{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;background-color:var(--fl-bg);background-image:var(--fl-atmos);border:1px solid var(--fl-card-edge);padding:18px 20px;color:var(--fl-fg);animation:fl-enter 0.36s cubic-bezier(0.2,0.7,0.2,1) both;}.fl-shell::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:2;opacity:var(--fl-grain-opacity);mix-blend-mode:var(--fl-grain-blend);background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");}.fl-shell>*{position:relative;z-index:1;}@keyframes fl-enter{from{transform:translateY(8px) scale(0.992);}to{transform:none;}}.fl-mono{font-family:var(--fl-mono);font-size:10.5px;font-weight:500;letter-spacing:0.18em;text-transform:uppercase;color:var(--fl-label);}.fl-title{margin:0;font-size:18px;font-weight:600;letter-spacing:-0.02em;line-height:1.25;color:var(--fl-fg);}.fl-body{margin:0;font-size:14px;line-height:1.5;color:var(--fl-body);}.fl-tabular{font-variant-numeric:tabular-nums;}.fl-header{display:flex;align-items:center;justify-content:space-between;gap:12px;}.fl-brand-row{display:flex;align-items:center;gap:10px;min-width:0;}.fl-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;}.fl-stack{display:flex;flex-direction:column;gap:14px;}.fl-divider{height:1px;background:var(--fl-line);margin:2px 0;}.fl-btn-primary{appearance:none;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 20px;border-radius:999px;background:var(--fl-accent);color:var(--fl-on-accent);font-family:var(--fl-sans);font-size:14px;font-weight:600;box-shadow:0 8px 20px var(--fl-accent-shadow);transition:opacity 150ms ease,transform 150ms ease;}.fl-btn-primary:hover:not(:disabled){opacity:0.92;}.fl-btn-primary:active:not(:disabled){transform:scale(0.985);}.fl-btn-primary:disabled{opacity:0.5;cursor:not-allowed;}.fl-btn-secondary{appearance:none;border:1px solid var(--fl-chip-edge);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 14px;border-radius:999px;background:var(--fl-well);color:var(--fl-fg);font-family:var(--fl-sans);font-size:13px;font-weight:500;transition:background 150ms ease;}.fl-btn-secondary:hover:not(:disabled){background:var(--fl-sel);}.fl-btn-link{appearance:none;border:0;background:transparent;cursor:pointer;display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:0 6px;border-radius:8px;color:var(--fl-label);font-family:var(--fl-sans);font-size:13px;font-weight:500;transition:color 140ms ease;}.fl-btn-link:hover{color:var(--fl-fg);}.fl-chip{appearance:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--fl-chip-edge);background:var(--fl-chip);color:var(--fl-body);font-family:var(--fl-sans);font-size:12.5px;font-weight:500;transition:background 140ms ease,border-color 140ms ease,color 140ms ease;}.fl-chip:hover{border-color:var(--fl-accent-edge);color:var(--fl-fg);}.fl-chip[data-selected='true']{background:var(--fl-accent-soft);border-color:var(--fl-accent-edge);color:var(--fl-accent-ink);font-weight:600;}.fl-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:var(--fl-accent-soft);color:var(--fl-accent-ink);font-family:var(--fl-mono);font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;}.fl-badge-ok{background:var(--fl-ok-soft);color:var(--fl-ok-ink);}.fl-badge-sand{background:var(--fl-sand-soft);color:var(--fl-sand-ink);}.fl-btn-primary:focus-visible,.fl-btn-secondary:focus-visible,.fl-btn-link:focus-visible,.fl-chip:focus-visible{outline:2px solid var(--fl-accent);outline-offset:2px;}.fl-runner-stage{display:flex;align-items:center;gap:20px;padding:4px 0;}@media (max-width:420px){.fl-runner-stage{flex-direction:column;text-align:center;}}.fl-ring-wrap{position:relative;flex-shrink:0;display:grid;place-items:center;}.fl-ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;}.fl-ring-time{font-size:26px;font-weight:600;letter-spacing:-0.02em;line-height:1;font-variant-numeric:tabular-nums;color:var(--fl-fg);}.fl-cue-label{font-size:20px;font-weight:600;letter-spacing:-0.02em;color:var(--fl-fg);margin:0;}.fl-breath-halo{position:absolute;inset:14px;border-radius:50%;background:radial-gradient(circle,var(--fl-accent-soft) 0%,transparent 72%);pointer-events:none;transition:transform 900ms cubic-bezier(0.35,0,0.25,1);}.fl-pips{display:flex;align-items:center;gap:6px;}.fl-pip{height:5px;width:22px;border-radius:999px;background:var(--fl-track-strong);transition:background 240ms ease;}.fl-pip[data-state='done']{background:var(--fl-accent);opacity:0.55;}.fl-pip[data-state='active']{background:var(--fl-accent);}.fl-code-box{display:inline-flex;align-items:center;gap:10px;padding:8px 14px;border-radius:12px;background:var(--fl-card-solid);border:1px solid var(--fl-line);font-family:var(--fl-mono);font-size:16px;font-weight:600;letter-spacing:0.16em;color:var(--fl-fg);}.fl-qr-tile{width:112px;height:112px;padding:8px;border-radius:14px;background:#ffffff;border:1px solid var(--fl-line);flex-shrink:0;display:grid;place-items:center;}.fl-panel{border-radius:14px;background:var(--fl-card);border:1px solid var(--fl-line);padding:12px 14px;}.fl-error{font-size:13px;color:var(--fl-danger);margin:0;}@keyframes peek-face{from{opacity:0;transform:scaleY(0.3);}to{opacity:1;transform:none;}}@keyframes peek-bob{0%,100%{transform:translateY(0);}50%{transform:translateY(-2.5px);}}@keyframes peek-ripple{0%{opacity:0;transform:scale(0.94);}18%{opacity:0.42;}100%{opacity:0;transform:scale(1.3);}}@keyframes peek-blink{0%,93%,100%{transform:scaleY(1);}96.5%{transform:scaleY(0.08);}}@keyframes peek-look{0%,100%{transform:translateX(-2px);}50%{transform:translateX(2.5px);}}.peek-anim-bob{animation:peek-bob 3.6s ease-in-out infinite;}.peek-anim-ripple{animation:peek-ripple 3.6s ease-out infinite;}.peek-anim-blink{animation:peek-blink 5.2s linear infinite;}.peek-anim-look{animation:peek-look 3s ease-in-out infinite;}.peek-anim-face{animation:peek-face 320ms cubic-bezier(0.22,1,0.36,1) both;}@media (prefers-reduced-motion:reduce){.fl-shell,.peek-anim-bob,.peek-anim-ripple,.peek-anim-blink,.peek-anim-look,.peek-anim-face{animation:none !important;}.fl-breath-halo{transition:none !important;}}@media (prefers-reduced-transparency:reduce){.fl-shell::after{display:none;}.fl-shell{background-image:none;}}</style></head><body><div id="app"></div><script type="module">var ao=Object.create;var At=Object.defineProperty;var co=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var fo=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var po=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of uo(e))!_o.call(t,r)&&r!==n&&At(t,r,{get:()=>e[r],enumerable:!(o=co(e,r))||o.enumerable});return t};var ho=(t,e,n)=>(n=t!=null?ao(fo(t)):{},po(e||!t||!t.__esModule?At(n,"default",{value:t,enumerable:!0}):n,t));var on=P((si,nn)=>{nn.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var W=P(ee=>{var it,Ho=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];ee.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};ee.getSymbolTotalCodewords=function(e){return Ho[e]};ee.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};ee.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};ee.isKanjiModeEnabled=function(){return typeof it<"u"};ee.toSJIS=function(e){return it(e)}});var Be=P(q=>{q.L={bit:1};q.M={bit:0};q.Q={bit:3};q.H={bit:2};function $o(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return q.L;case"m":case"medium":return q.M;case"q":case"quartile":return q.Q;case"h":case"high":return q.H;default:throw new Error("Unknown EC Level: "+t)}}q.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};q.from=function(e,n){if(q.isValid(e))return e;try{return $o(e)}catch{return n}}});var ln=P((ci,sn)=>{function rn(){this.buffer=[],this.length=0}rn.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};sn.exports=rn});var cn=P((ui,an)=>{function _e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}_e.prototype.set=function(t,e,n,o){let r=t*this.size+e;this.data[r]=n,o&&(this.reservedBit[r]=!0)};_e.prototype.get=function(t,e){return this.data[t*this.size+e]};_e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};_e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};an.exports=_e});var un=P(Ie=>{var Vo=W().getSymbolSize;Ie.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,o=Vo(e),r=o===145?26:Math.ceil((o-13)/(2*n-2))*2,i=[o-7];for(let s=1;s<n-1;s++)i[s]=i[s-1]-r;return i.push(6),i.reverse()};Ie.getPositions=function(e){let n=[],o=Ie.getRowColCoords(e),r=o.length;for(let i=0;i<r;i++)for(let s=0;s<r;s++)i===0&&s===0||i===0&&s===r-1||i===r-1&&s===0||n.push([o[i],o[s]]);return n}});var _n=P(fn=>{var jo=W().getSymbolSize,dn=7;fn.getPositions=function(e){let n=jo(e);return[[0,0],[n-dn,0],[0,n-dn]]}});var pn=P(S=>{S.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var te={N1:3,N2:3,N3:40,N4:10};S.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};S.from=function(e){return S.isValid(e)?parseInt(e,10):void 0};S.getPenaltyN1=function(e){let n=e.size,o=0,r=0,i=0,s=null,l=null;for(let c=0;c<n;c++){r=i=0,s=l=null;for(let f=0;f<n;f++){let d=e.get(c,f);d===s?r++:(r>=5&&(o+=te.N1+(r-5)),s=d,r=1),d=e.get(f,c),d===l?i++:(i>=5&&(o+=te.N1+(i-5)),l=d,i=1)}r>=5&&(o+=te.N1+(r-5)),i>=5&&(o+=te.N1+(i-5))}return o};S.getPenaltyN2=function(e){let n=e.size,o=0;for(let r=0;r<n-1;r++)for(let i=0;i<n-1;i++){let s=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(s===4||s===0)&&o++}return o*te.N2};S.getPenaltyN3=function(e){let n=e.size,o=0,r=0,i=0;for(let s=0;s<n;s++){r=i=0;for(let l=0;l<n;l++)r=r<<1&2047|e.get(s,l),l>=10&&(r===1488||r===93)&&o++,i=i<<1&2047|e.get(l,s),l>=10&&(i===1488||i===93)&&o++}return o*te.N3};S.getPenaltyN4=function(e){let n=0,o=e.data.length;for(let i=0;i<o;i++)n+=e.data[i];return Math.abs(Math.ceil(n*100/o/5)-10)*te.N4};function Ko(t,e,n){switch(t){case S.Patterns.PATTERN000:return(e+n)%2===0;case S.Patterns.PATTERN001:return e%2===0;case S.Patterns.PATTERN010:return n%3===0;case S.Patterns.PATTERN011:return(e+n)%3===0;case S.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2===0;case S.Patterns.PATTERN101:return e*n%2+e*n%3===0;case S.Patterns.PATTERN110:return(e*n%2+e*n%3)%2===0;case S.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}S.applyMask=function(e,n){let o=n.size;for(let r=0;r<o;r++)for(let i=0;i<o;i++)n.isReserved(i,r)||n.xor(i,r,Ko(e,i,r))};S.getBestMask=function(e,n){let o=Object.keys(S.Patterns).length,r=0,i=1/0;for(let s=0;s<o;s++){n(s),S.applyMask(s,e);let l=S.getPenaltyN1(e)+S.getPenaltyN2(e)+S.getPenaltyN3(e)+S.getPenaltyN4(e);S.applyMask(s,e),l<i&&(i=l,r=s)}return r}});var lt=P(st=>{var J=Be(),Re=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Ne=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];st.getBlocksCount=function(e,n){switch(n){case J.L:return Re[(e-1)*4+0];case J.M:return Re[(e-1)*4+1];case J.Q:return Re[(e-1)*4+2];case J.H:return Re[(e-1)*4+3];default:return}};st.getTotalCodewordsCount=function(e,n){switch(n){case J.L:return Ne[(e-1)*4+0];case J.M:return Ne[(e-1)*4+1];case J.Q:return Ne[(e-1)*4+2];case J.H:return Ne[(e-1)*4+3];default:return}}});var hn=P(Fe=>{var pe=new Uint8Array(512),Le=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)pe[n]=e,Le[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)pe[n]=pe[n-255]})();Fe.log=function(e){if(e<1)throw new Error("log("+e+")");return Le[e]};Fe.exp=function(e){return pe[e]};Fe.mul=function(e,n){return e===0||n===0?0:pe[Le[e]+Le[n]]}});var gn=P(he=>{var at=hn();he.mul=function(e,n){let o=new Uint8Array(e.length+n.length-1);for(let r=0;r<e.length;r++)for(let i=0;i<n.length;i++)o[r+i]^=at.mul(e[r],n[i]);return o};he.mod=function(e,n){let o=new Uint8Array(e);for(;o.length-n.length>=0;){let r=o[0];for(let s=0;s<n.length;s++)o[s]^=at.mul(n[s],r);let i=0;for(;i<o.length&&o[i]===0;)i++;o=o.slice(i)}return o};he.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=he.mul(n,new Uint8Array([1,at.exp(o)]));return n}});var wn=P((mi,yn)=>{var mn=gn();function ct(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}ct.prototype.initialize=function(e){this.degree=e,this.genPoly=mn.generateECPolynomial(this.degree)};ct.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(e.length+this.degree);n.set(e);let o=mn.mod(n,this.genPoly),r=this.degree-o.length;if(r>0){let i=new Uint8Array(this.degree);return i.set(o,r),i}return o};yn.exports=ct});var ut=P(vn=>{vn.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var dt=P(V=>{var bn="[0-9]+",Wo="[A-Z $%*+\\-./:]+",ge="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ge=ge.replace(/u/g,"\\u");var Jo="(?:(?![A-Z0-9 $%*+\\-./:]|"+ge+`)(?:.|[\r
2
+ ]))+`;V.KANJI=new RegExp(ge,"g");V.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");V.BYTE=new RegExp(Jo,"g");V.NUMERIC=new RegExp(bn,"g");V.ALPHANUMERIC=new RegExp(Wo,"g");var Qo=new RegExp("^"+ge+"$"),Yo=new RegExp("^"+bn+"$"),Go=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");V.testKanji=function(e){return Qo.test(e)};V.testNumeric=function(e){return Yo.test(e)};V.testAlphanumeric=function(e){return Go.test(e)}});var Q=P(B=>{var Xo=ut(),ft=dt();B.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};B.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};B.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};B.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};B.MIXED={bit:-1};B.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Xo.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]};B.getBestModeForData=function(e){return ft.testNumeric(e)?B.NUMERIC:ft.testAlphanumeric(e)?B.ALPHANUMERIC:ft.testKanji(e)?B.KANJI:B.BYTE};B.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};B.isValid=function(e){return e&&e.bit&&e.ccBits};function Zo(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return B.NUMERIC;case"alphanumeric":return B.ALPHANUMERIC;case"kanji":return B.KANJI;case"byte":return B.BYTE;default:throw new Error("Unknown mode: "+t)}}B.from=function(e,n){if(B.isValid(e))return e;try{return Zo(e)}catch{return n}}});var xn=P(ne=>{var De=W(),er=lt(),kn=Be(),Y=Q(),_t=ut(),En=7973,Cn=De.getBCHDigit(En);function tr(t,e,n){for(let o=1;o<=40;o++)if(e<=ne.getCapacity(o,n,t))return o}function Mn(t,e){return Y.getCharCountIndicator(t,e)+4}function nr(t,e){let n=0;return t.forEach(function(o){let r=Mn(o.mode,e);n+=r+o.getBitsLength()}),n}function or(t,e){for(let n=1;n<=40;n++)if(nr(t,n)<=ne.getCapacity(n,e,Y.MIXED))return n}ne.from=function(e,n){return _t.isValid(e)?parseInt(e,10):n};ne.getCapacity=function(e,n,o){if(!_t.isValid(e))throw new Error("Invalid QR Code version");typeof o>"u"&&(o=Y.BYTE);let r=De.getSymbolTotalCodewords(e),i=er.getTotalCodewordsCount(e,n),s=(r-i)*8;if(o===Y.MIXED)return s;let l=s-Mn(o,e);switch(o){case Y.NUMERIC:return Math.floor(l/10*3);case Y.ALPHANUMERIC:return Math.floor(l/11*2);case Y.KANJI:return Math.floor(l/13);case Y.BYTE:default:return Math.floor(l/8)}};ne.getBestVersionForData=function(e,n){let o,r=kn.from(n,kn.M);if(Array.isArray(e)){if(e.length>1)return or(e,r);if(e.length===0)return 1;o=e[0]}else o=e;return tr(o.mode,o.getLength(),r)};ne.getEncodedBits=function(e){if(!_t.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;De.getBCHDigit(n)-Cn>=0;)n^=En<<De.getBCHDigit(n)-Cn;return e<<12|n}});var An=P(Tn=>{var pt=W(),Sn=1335,rr=21522,Pn=pt.getBCHDigit(Sn);Tn.getEncodedBits=function(e,n){let o=e.bit<<3|n,r=o<<10;for(;pt.getBCHDigit(r)-Pn>=0;)r^=Sn<<pt.getBCHDigit(r)-Pn;return(o<<10|r)^rr}});var In=P((Ci,Bn)=>{var ir=Q();function ie(t){this.mode=ir.NUMERIC,this.data=t.toString()}ie.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};ie.prototype.getLength=function(){return this.data.length};ie.prototype.getBitsLength=function(){return ie.getBitsLength(this.data.length)};ie.prototype.write=function(e){let n,o,r;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),r=parseInt(o,10),e.put(r,10);let i=this.data.length-n;i>0&&(o=this.data.substr(n),r=parseInt(o,10),e.put(r,i*3+1))};Bn.exports=ie});var Nn=P((Ei,Rn)=>{var sr=Q(),ht=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function se(t){this.mode=sr.ALPHANUMERIC,this.data=t}se.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};se.prototype.getLength=function(){return this.data.length};se.prototype.getBitsLength=function(){return se.getBitsLength(this.data.length)};se.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let o=ht.indexOf(this.data[n])*45;o+=ht.indexOf(this.data[n+1]),e.put(o,11)}this.data.length%2&&e.put(ht.indexOf(this.data[n]),6)};Rn.exports=se});var Fn=P((Mi,Ln)=>{var lr=Q();function le(t){this.mode=lr.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}le.getBitsLength=function(e){return e*8};le.prototype.getLength=function(){return this.data.length};le.prototype.getBitsLength=function(){return le.getBitsLength(this.data.length)};le.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};Ln.exports=le});var Un=P((xi,Dn)=>{var ar=Q(),cr=W();function ae(t){this.mode=ar.KANJI,this.data=t}ae.getBitsLength=function(e){return e*13};ae.prototype.getLength=function(){return this.data.length};ae.prototype.getBitsLength=function(){return ae.getBitsLength(this.data.length)};ae.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=cr.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};Dn.exports=ae});var qn=P((Pi,gt)=>{"use strict";var me={single_source_shortest_paths:function(t,e,n){var o={},r={};r[e]=0;var i=me.PriorityQueue.make();i.push(e,0);for(var s,l,c,f,d,g,_,u,h;!i.empty();){s=i.pop(),l=s.value,f=s.cost,d=t[l]||{};for(c in d)d.hasOwnProperty(c)&&(g=d[c],_=f+g,u=r[c],h=typeof r[c]>"u",(h||u>_)&&(r[c]=_,i.push(c,_),o[c]=l))}if(typeof n<"u"&&typeof r[n]>"u"){var C=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(C)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],o=e,r;o;)n.push(o),r=t[o],o=t[o];return n.reverse(),n},find_path:function(t,e,n){var o=me.single_source_shortest_paths(t,e,n);return me.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e=me.PriorityQueue,n={},o;t=t||{};for(o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n.queue=[],n.sorter=t.sorter||e.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof gt<"u"&&(gt.exports=me)});var Wn=P(ce=>{var M=Q(),Hn=In(),$n=Nn(),Vn=Fn(),jn=Un(),ye=dt(),Ue=W(),ur=qn();function On(t){return unescape(encodeURIComponent(t)).length}function we(t,e,n){let o=[],r;for(;(r=t.exec(n))!==null;)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function Kn(t){let e=we(ye.NUMERIC,M.NUMERIC,t),n=we(ye.ALPHANUMERIC,M.ALPHANUMERIC,t),o,r;return Ue.isKanjiModeEnabled()?(o=we(ye.BYTE,M.BYTE,t),r=we(ye.KANJI,M.KANJI,t)):(o=we(ye.BYTE_KANJI,M.BYTE,t),r=[]),e.concat(n,o,r).sort(function(s,l){return s.index-l.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function mt(t,e){switch(e){case M.NUMERIC:return Hn.getBitsLength(t);case M.ALPHANUMERIC:return $n.getBitsLength(t);case M.KANJI:return jn.getBitsLength(t);case M.BYTE:return Vn.getBitsLength(t)}}function dr(t){return t.reduce(function(e,n){let o=e.length-1>=0?e[e.length-1]:null;return o&&o.mode===n.mode?(e[e.length-1].data+=n.data,e):(e.push(n),e)},[])}function fr(t){let e=[];for(let n=0;n<t.length;n++){let o=t[n];switch(o.mode){case M.NUMERIC:e.push([o,{data:o.data,mode:M.ALPHANUMERIC,length:o.length},{data:o.data,mode:M.BYTE,length:o.length}]);break;case M.ALPHANUMERIC:e.push([o,{data:o.data,mode:M.BYTE,length:o.length}]);break;case M.KANJI:e.push([o,{data:o.data,mode:M.BYTE,length:On(o.data)}]);break;case M.BYTE:e.push([{data:o.data,mode:M.BYTE,length:On(o.data)}])}}return e}function _r(t,e){let n={},o={start:{}},r=["start"];for(let i=0;i<t.length;i++){let s=t[i],l=[];for(let c=0;c<s.length;c++){let f=s[c],d=""+i+c;l.push(d),n[d]={node:f,lastCount:0},o[d]={};for(let g=0;g<r.length;g++){let _=r[g];n[_]&&n[_].node.mode===f.mode?(o[_][d]=mt(n[_].lastCount+f.length,f.mode)-mt(n[_].lastCount,f.mode),n[_].lastCount+=f.length):(n[_]&&(n[_].lastCount=f.length),o[_][d]=mt(f.length,f.mode)+4+M.getCharCountIndicator(f.mode,e))}}r=l}for(let i=0;i<r.length;i++)o[r[i]].end=0;return{map:o,table:n}}function zn(t,e){let n,o=M.getBestModeForData(t);if(n=M.from(e,o),n!==M.BYTE&&n.bit<o.bit)throw new Error('"'+t+'" cannot be encoded with mode '+M.toString(n)+`.
4
+ Suggested mode is: `+M.toString(o));switch(n===M.KANJI&&!Ue.isKanjiModeEnabled()&&(n=M.BYTE),n){case M.NUMERIC:return new Hn(t);case M.ALPHANUMERIC:return new $n(t);case M.KANJI:return new jn(t);case M.BYTE:return new Vn(t)}}ce.fromArray=function(e){return e.reduce(function(n,o){return typeof o=="string"?n.push(zn(o,null)):o.data&&n.push(zn(o.data,o.mode)),n},[])};ce.fromString=function(e,n){let o=Kn(e,Ue.isKanjiModeEnabled()),r=fr(o),i=_r(r,n),s=ur.find_path(i.map,"start","end"),l=[];for(let c=1;c<s.length-1;c++)l.push(i.table[s[c]].node);return ce.fromArray(dr(l))};ce.rawSplit=function(e){return ce.fromArray(Kn(e,Ue.isKanjiModeEnabled()))}});var Qn=P(Jn=>{var Oe=W(),yt=Be(),pr=ln(),hr=cn(),gr=un(),mr=_n(),bt=pn(),kt=lt(),yr=wn(),qe=xn(),wr=An(),vr=Q(),wt=Wn();function br(t,e){let n=t.size,o=mr.getPositions(e);for(let r=0;r<o.length;r++){let i=o[r][0],s=o[r][1];for(let l=-1;l<=7;l++)if(!(i+l<=-1||n<=i+l))for(let c=-1;c<=7;c++)s+c<=-1||n<=s+c||(l>=0&&l<=6&&(c===0||c===6)||c>=0&&c<=6&&(l===0||l===6)||l>=2&&l<=4&&c>=2&&c<=4?t.set(i+l,s+c,!0,!0):t.set(i+l,s+c,!1,!0))}}function kr(t){let e=t.size;for(let n=8;n<e-8;n++){let o=n%2===0;t.set(n,6,o,!0),t.set(6,n,o,!0)}}function Cr(t,e){let n=gr.getPositions(e);for(let o=0;o<n.length;o++){let r=n[o][0],i=n[o][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(r+s,i+l,!0,!0):t.set(r+s,i+l,!1,!0)}}function Er(t,e){let n=t.size,o=qe.getEncodedBits(e),r,i,s;for(let l=0;l<18;l++)r=Math.floor(l/3),i=l%3+n-8-3,s=(o>>l&1)===1,t.set(r,i,s,!0),t.set(i,r,s,!0)}function vt(t,e,n){let o=t.size,r=wr.getEncodedBits(e,n),i,s;for(i=0;i<15;i++)s=(r>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(o-15+i,8,s,!0),i<8?t.set(8,o-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(o-8,8,1,!0)}function Mr(t,e){let n=t.size,o=-1,r=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(l===6&&l--;;){for(let c=0;c<2;c++)if(!t.isReserved(r,l-c)){let f=!1;s<e.length&&(f=(e[s]>>>i&1)===1),t.set(r,l-c,f),i--,i===-1&&(s++,i=7)}if(r+=o,r<0||n<=r){r-=o,o=-o;break}}}function xr(t,e,n){let o=new pr;n.forEach(function(c){o.put(c.mode.bit,4),o.put(c.getLength(),vr.getCharCountIndicator(c.mode,t)),c.write(o)});let r=Oe.getSymbolTotalCodewords(t),i=kt.getTotalCodewordsCount(t,e),s=(r-i)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);let l=(s-o.getLengthInBits())/8;for(let c=0;c<l;c++)o.put(c%2?17:236,8);return Pr(o,t,e)}function Pr(t,e,n){let o=Oe.getSymbolTotalCodewords(e),r=kt.getTotalCodewordsCount(e,n),i=o-r,s=kt.getBlocksCount(e,n),l=o%s,c=s-l,f=Math.floor(o/s),d=Math.floor(i/s),g=d+1,_=f-d,u=new yr(_),h=0,C=new Array(s),p=new Array(s),v=0,b=new Uint8Array(t.buffer);for(let E=0;E<s;E++){let T=E<c?d:g;C[E]=b.slice(h,h+T),p[E]=u.encode(C[E]),h+=T,v=Math.max(v,T)}let m=new Uint8Array(o),k=0,w,y;for(w=0;w<v;w++)for(y=0;y<s;y++)w<C[y].length&&(m[k++]=C[y][w]);for(w=0;w<_;w++)for(y=0;y<s;y++)m[k++]=p[y][w];return m}function Sr(t,e,n,o){let r;if(Array.isArray(t))r=wt.fromArray(t);else if(typeof t=="string"){let f=e;if(!f){let d=wt.rawSplit(t);f=qe.getBestVersionForData(d,n)}r=wt.fromString(t,f||40)}else throw new Error("Invalid data");let i=qe.getBestVersionForData(r,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(`
5
5
  The chosen QR Code version cannot contain this amount of data.
6
6
  Minimum version required to store current data is: `+i+`.
7
- `);let s=xr(e,n,r),l=Oe.getSymbolSize(e),c=new pr(l);return br(c,e),kr(c),Cr(c,e),vt(c,n,0),e>=7&&Er(c,e),Mr(c,s),isNaN(o)&&(o=bt.getBestMask(c,vt.bind(null,c,n))),bt.applyMask(o,c),vt(c,n,o),{modules:c,version:e,errorCorrectionLevel:n,maskPattern:o,segments:r}}Jn.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let o=yt.M,r,i;return typeof n<"u"&&(o=yt.from(n.errorCorrectionLevel,yt.M),r=qe.from(n.version),i=bt.from(n.maskPattern),n.toSJISFunc&&Oe.setToSJISFunction(n.toSJISFunc)),Sr(e,r,o,i)}});var Ct=P(oe=>{function Gn(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(o){return[o,o]}))),e.length===6&&e.push("F","F");let n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}oe.getOptions=function(e){e||(e={}),e.color||(e.color={});let n=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,o=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:o,scale:o?4:r,margin:n,color:{dark:Gn(e.color.dark||"#000000ff"),light:Gn(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};oe.getScale=function(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale};oe.getImageWidth=function(e,n){let o=oe.getScale(e,n);return Math.floor((e+n.margin*2)*o)};oe.qrToImageData=function(e,n,o){let r=n.modules.size,i=n.modules.data,s=oe.getScale(r,o),l=Math.floor((r+o.margin*2)*s),c=o.margin*s,f=[o.color.light,o.color.dark];for(let d=0;d<l;d++)for(let g=0;g<l;g++){let _=(d*l+g)*4,u=o.color.light;if(d>=c&&g>=c&&d<l-c&&g<l-c){let p=Math.floor((d-c)/s),C=Math.floor((g-c)/s);u=f[i[p*r+C]?1:0]}e[_++]=u.r,e[_++]=u.g,e[_++]=u.b,e[_]=u.a}}});var Yn=P(ze=>{var Et=Ct();function Tr(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}function Ar(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}ze.render=function(e,n,o){let r=o,i=n;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),n||(i=Ar()),r=Et.getOptions(r);let s=Et.getImageWidth(e.modules.size,r),l=i.getContext("2d"),c=l.createImageData(s,s);return Et.qrToImageData(c.data,e,r),Tr(l,i,s),l.putImageData(c,0,0),i};ze.renderToDataURL=function(e,n,o){let r=o;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),r||(r={});let i=ze.render(e,n,r),s=r.type||"image/png",l=r.rendererOpts||{};return i.toDataURL(s,l.quality)}});var eo=P(Zn=>{var Br=Ct();function Xn(t,e){let n=t.a/255,o=e+'="'+t.hex+'"';return n<1?o+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function Mt(t,e,n){let o=t+e;return typeof n<"u"&&(o+=" "+n),o}function Ir(t,e,n){let o="",r=0,i=!1,s=0;for(let l=0;l<t.length;l++){let c=Math.floor(l%e),f=Math.floor(l/e);!c&&!i&&(i=!0),t[l]?(s++,l>0&&c>0&&t[l-1]||(o+=i?Mt("M",c+n,.5+f+n):Mt("m",r,0),r=0,i=!1),c+1<e&&t[l+1]||(o+=Mt("h",s),s=0)):r++}return o}Zn.render=function(e,n,o){let r=Br.getOptions(n),i=e.modules.size,s=e.modules.data,l=i+r.margin*2,c=r.color.light.a?"<path "+Xn(r.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",f="<path "+Xn(r.color.dark,"stroke")+' d="'+Ir(s,i,r.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+f+`</svg>
8
- `;return typeof o=="function"&&o(null,_),_}});var no=P(ve=>{var Rr=on(),xt=Qn(),to=Yn(),Nr=eo();function Pt(t,e,n,o,r){let i=[].slice.call(arguments,1),s=i.length,l=typeof i[s-1]=="function";if(!l&&!Rr())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(r=n,n=e,e=o=void 0):s===3&&(e.getContext&&typeof r>"u"?(r=o,o=void 0):(r=o,o=n,n=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=e,e=o=void 0):s===2&&!e.getContext&&(o=n,n=e,e=void 0),new Promise(function(c,f){try{let d=xt.create(n,o);c(t(d,e,o))}catch(d){f(d)}})}try{let c=xt.create(n,o);r(null,t(c,e,o))}catch(c){r(c)}}ve.create=xt.create;ve.toCanvas=Pt.bind(null,to.render);ve.toDataURL=Pt.bind(null,to.renderToDataURL);ve.toString=Pt.bind(null,function(t,e,n){return Nr.render(t,n)})});var x,Rt,go,j,Ve,xe,Nt,ke,Lt,Ke,je,mo,ue=Symbol.for("pv"),Pe={},Se=[],yo=/^m(i|n|o|s|text|space)$/,We=Array.isArray,Ft=Se.slice,Z=Object.assign;function X(t){t&&t.parentNode&&t.remove()}function Ce(t,e,n,o,r){var i={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:ue,__v:r||++Rt,__i:-1,__u:0};return!r&&x.vnode&&x.vnode(i),i}function U(t){return t.children}function Ee(t,e){this.props=t,this.context=e,this.__g=0}function K(t,e){if(e==null)return t.__&&K(t.__,t.__i+1);for(var n;e<t.__k.length;e++)if((n=t.__k[e])&&n.__e)return n.__e;return typeof t.type!="function"||t.props.__P?null:K(t)}function wo(t){var e,n=t.__v,o=n.__e,r=[],i=[],s=t.__P;s&&((e=Z({constructor:ue},n)).__v=n.__v+1,x.vnode&&x.vnode(e),Je(s,e,n,t.__n,s.namespaceURI,32&n.__u?[o]:null,r,o||K(n),32&n.__u,i),e.__v=n.__v,e.__.__k[e.__i]=e,Ht(r,e,i),n.__=n.__e=null,e.__e!=o&&Dt(e))}function Dt(t){if((t=t.__)&&t.__c&&!t.props.__P)return t.__e=null,t.__k.some(function(e){return e&&(t.__e=e.__e)}),Dt(t)}function Bt(t){(8&t.__g||(t.__g|=8,j.push(t),xe++))&&Ve==x.debounceRendering||((Ve=x.debounceRendering)||queueMicrotask)(Ut)}function Ut(){try{for(var t,e=1;j.length;)j.length>e&&j.sort(Nt),t=j.shift(),e=j.length,8&t.__g&&wo(t)}finally{(xe=j.length)&&(Ve||queueMicrotask)(Ut)}}function qt(t,e,n,o,r,i,s,l,c,f,d){var g,_,u,p,C,h,v=o.__k||Se,b=e.length;for(c=vo(n,e,v,c,b),g=0;g<b;g++)(u=n.__k[g])!=null&&(_=~u.__i&&v[u.__i]||Pe,u.__i=g,h=Je(t,u,_,r,i,s,l,c,f,d),p=u.__e,(_.ref!=u.ref||8&_.__u)&&(_.ref&&Qe(_.ref,null,u,_),u.ref&&d.push(u.ref,u.__c||p,u)),C=C||p,4&u.__u?(c=Ot(u,c,t,!_.__v),_.__e&&(_.__e=null)):typeof u.type=="function"&&h!==void 0?c=h:p&&(c=p.nextSibling),u.__u&=-21);return n.__e=C,c}function vo(t,e,n,o,r){var i,s,l,c,f,d,g,_,u,p=n.length,C=p,h=0,v=0,b=t.__k=Array(r);for(i=0;i<r;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s!="object"||s.constructor===String?s=b[i]=Ce(null,s):We(s)?s=b[i]=Ce(U,{children:s}):s.constructor===ue&&s.__b?s=b[i]=Ce(s.type,s.props,s.key,s.ref,s.__v):b[i]=s,c=i+h,s.__=t,s.__b=t.__b+1,l=null,~(f=s.__i=bo(s,n,c,C))&&(C--,(l=n[f])&&(l.__u|=2)),l&&l.__v?(s.__u|=16,f==c-1?h--:f==c+1?h++:f!=c&&(f>c?h--:h++,v=1)):(~f||(r>p?h--:r<p&&h++),typeof s.type!="function"&&(s.__u|=4))):b[i]=null;if(v){for(d=[],g=[],i=0;i<r;i++)if((s=b[i])&&16&s.__u){for(h=0,_=d.length;h<_;)d[u=h+_>>1]<s.__i?h=u+1:_=u;d[h]=s.__i,g[i]=h+1}for(h=d.length;i--;)g[i]&&(g[i]==h?h--:b[i].__u|=4)}if(C)for(i=0;i<p;i++)!(l=n[i])||2&l.__u||(l.__e==o&&(o=K(l)),Ge(l,l));return o}function Ot(t,e,n,o){var r,i,s,l;if(typeof t.type=="function"){if(t.props.__P)return e;if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&(r[i].__=t,e=Ot(r[i],e,n,!1));return e}for(e&&!e.parentNode&&(e=K(t))&&!e.parentNode&&(e=null),s=t.__e,l=e;l&&l.nodeType==8;)l=l.nextSibling;for(s!=l&&(!o&&n.moveBefore&&s.parentNode?n.moveBefore(s,e):n.insertBefore(s,e||null)),e=s;(e=e&&e.nextSibling)&&e.nodeType==8&&!e.data.startsWith("$s"););return e}function bo(t,e,n,o){var r,i=t.key,s=t.type,l=e[n],c=l&&!(2&l.__u);if(l===null&&i==null||c&&i==l.key&&s==l.type)return n;if(o>(c?1:0)){for(r=n-1;r>=0;r--)if((l=e[r])&&!(2&l.__u)&&i==l.key&&s==l.type)return r;for(r=n+1;r<e.length;r++)if((l=e[r])&&!(2&l.__u)&&i==l.key&&s==l.type)return r}return-1}function It(t,e,n){n==null&&(n=""),e[0]=="-"?t.setProperty(e,n):t[e]=n}function be(t,e,n,o,r){var i,s;if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||It(t.style,e);if(n)for(e in n)o&&n[e]==o[e]||It(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")typeof n!="function"&&(n=null),typeof o!="function"&&(o=null),(t.__e||(t.__e={}))[e]=n,n&&o||(s=je[e]||(je[e]=ko(e)),(t.__a||(t.__a={}))[e]=Ke,i=e!=(e=e.replace(Lt,"$1")),(e=e.slice(2))[0]<"a"&&(e=e.toLowerCase()),n?t.addEventListener(e,s,i):t.removeEventListener(e,s,i));else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{return void(t[e]=n??"")}catch{}if(typeof n=="function")return;n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n)}}function ko(t){return function(e){var n=this.__e;if(n){if(n=n[t],e[ke]==null)e[ke]=Ke++;else if(e[ke]<this.__a[t])return;return n(x.event?x.event(e):e)}}}function Je(t,e,n,o,r,i,s,l,c,f){var d,g,_,u,p,C,h,v,b,m,k,w,y,E,T,$,D,F,R=e.type;if(e.constructor!==ue)return null;128&n.__u&&(c=32&n.__u,d=n.__c.__z)&&(e.__u|=c,g=i=[],d.nodeType==8?l=Me(d,i):i.push(d),l=i[0]||l),(d=x.__b)&&d(e);e:if(typeof R=="function"){_=s.length;try{if(v=e.props,b=(d=R.prototype)&&d.render,m=(d=R.contextType)&&o[d.__c],k=d?m?m.props.value:d.__:o,(u=n.__c)?(e.__c=u,2&u.__g&&(u.__g|=1)):(b?e.__c=u=new R(v,k):(e.__c=u=new Ee(v,k),u.constructor=R,u.render=Eo),m&&m.sub(u),u.state||(u.state={}),u.__n=o,u.__g|=8,u.__h=[],u.__k=[]),b&&(u.__s||(u.__s=u.state),R.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Z({},u.__s)),Z(u.__s,R.getDerivedStateFromProps(v,u.__s)))),p=u.props,C=u.state,u.__v=e,n.__c){if(v!==p&&b&&!R.getDerivedStateFromProps&&u.componentWillReceiveProps&&u.componentWillReceiveProps(v,k),e.__v==n.__v&&!(8&u.__g)||!(4&u.__g)&&u.shouldComponentUpdate&&u.shouldComponentUpdate(v,u.__s,k)===!1){e.__v!=n.__v&&(u.props=v,u.state=u.__s,u.__g&=-9),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),Se.push.apply(u.__h,u.__k),u.__k=[],u.__h.length&&s.push(u),l=K(n);break e}u.componentWillUpdate&&u.componentWillUpdate(v,u.__s,k),b&&u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(p,C,h)})}else b&&!R.getDerivedStateFromProps&&u.componentWillMount&&u.componentWillMount(),b&&u.componentDidMount&&u.__h.push(u.componentDidMount);u.context=k,u.props=v,u.__P=t,u.__g&=-5,w=x.__r,y=b?25:0;do u.__g&=-9,w&&w(e),d=u.render(u.props,u.state=u.__s,u.context);while(8&u.__g&&++y<25);b&&(Se.push.apply(u.__h,u.__k),u.__k=[]),u.state=u.__s,u.getChildContext&&(o=Z({},o,u.getChildContext())),b&&n.__c&&u.getSnapshotBeforeUpdate&&(h=u.getSnapshotBeforeUpdate(p,C)),E=d&&d.type===U&&d.key==null?d.props.children:d,v.__P&&(d=l,r=(t=v.__P).namespaceURI,c=i=null,n.props&&n.props.__P!=t&&(n.__k.some(function(N){N&&Ge(N,N)}),n.__k=null),l=n.__k?K(n,0):null),l=qt(t,We(E)?E:[E],e,n,o,r,i,s,l,c,f),v.__P&&(e.__e=null,l=d),e.__u&=-161,g&&g.some(X),u.__h.length&&s.push(u),1&u.__g&&(u.__g&=-4)}catch(N){if(s.length=_,e.__v=null,c||i)if(N&&N.then){if(e.__u|=128|c,i){for(~(D=i.indexOf(l||void 0))||(D=i.length);(F=i[D-1])&&F.nodeType==8;)D--;for(;D<i.length;D++)if(F=i[D])if(i[D]=null,T){if(F==$)break}else{if(F.nodeType!=8)break;F.data.startsWith("$s")&&($=Me(T=F))}}if(!T){for(;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;T=l}(d=Me(T=e.__c.__z||(e.__c.__z=T)))?(e.__e=T,l=d):e.__e=l,l=l&&l.nextSibling}else i&&i.some(X);else e.__e=n.__e;e.__k||(e.__k=n.__k||[]),N&&N.then||zt(e),x.__e(N,e,n)}}else l=e.__e=Co(n.__e,e,n,o,r,i,s,c,f,t);return(d=x.diffed)&&d(e),l}function Me(t,e){if(t&&t.nodeType==8&&t.data.startsWith("$s"))for(var n=1;t=t.nextSibling;){if(t.nodeType==8){if(t.data.startsWith("$s"))n++;else if(t.data.startsWith("/$s")&&!--n)return t}e&&e.push(t)}}function zt(t){t&&(t.__c&&(t.__c.__g|=4),t.__k&&t.__k.some(zt))}function Ht(t,e,n){for(var o=0;o<n.length;)Qe(n[o++],n[o++],n[o++]);x.__c&&x.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(i){i.call(r)})}catch(i){x.__e(i,r.__v)}})}function Co(t,e,n,o,r,i,s,l,c,f){var d,g,_,u,p,C,h,v,b=n.props||Pe,m=e.props,k=e.type;if(k=="svg"?r="http://www.w3.org/2000/svg":k=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),i){for(d=0;d<i.length;d++)if((p=i[d])&&(k?p.localName==k:p.nodeType==3)){t=p,i[d]=null;break}}if(!t){if(v=f.ownerDocument||document,!k)return v.createTextNode(m);t=v.createElementNS(r,k,m.is?m:f),l&&(x.__m&&x.__m(e,i),l=!1),i=null}if(k){if(f=k=="template"&&t.content||t,i=k=="textarea"&&m.defaultValue!=null?null:i&&Ft.call(f.childNodes),!l&&i)for(b={},d=0;d<t.attributes.length;d++)b[(p=t.attributes[d]).name]=p.value;for(d in b)p=b[d],d=="dangerouslySetInnerHTML"?_=p:d=="children"||d in m||d=="value"&&"defaultValue"in m||d=="checked"&&"defaultChecked"in m||be(t,d,null,p,r);for(d in m)p=m[d],d=="children"?u=p:d=="dangerouslySetInnerHTML"?g=p:d=="value"?C=p:d=="checked"?h=p:l&&typeof p!="function"||b[d]===p||be(t,d,p,b[d],r);g?(l||_&&(g.__html==_.__html||g.__html==t.innerHTML)||(t.innerHTML=g.__html),e.__k=[]):(_&&(t.textContent=""),(k=="foreignObject"||r=="http://www.w3.org/1998/Math/MathML"&&yo.test(k))&&(r="http://www.w3.org/1999/xhtml"),qt(f,We(u)?u:[u],e,n,o,r,i,s,i?i[0]:n.__k&&K(n,0),l,c),i&&i.some(X)),l&&k!="textarea"||(d="value",k=="progress"&&C==null?t.removeAttribute(d):C==null||C===t[d]&&(k!="progress"||C)||be(t,d,C,b[d],r),d="checked",h!=null&&h!=t[d]&&be(t,d,h,b[d],r))}else b===m||l&&t.data==m||(t.data=m);return t}function Qe(t,e,n,o){try{typeof t=="function"?e?e.__x=t(e)||1:o&&(o=o.__c||o.__e)&&(e=o.__x)&&(o.__x=null,typeof e=="function"?e():t(null)):t.current=e}catch(r){x.__e(r,n)}}function Ge(t,e,n){var o,r,i,s;if(x.unmount&&x.unmount(t),!(o=t.ref)||o.current&&o.current!=t.__e||Qe(o,null,e,t),o=t.__c){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(l){x.__e(l,e)}o.__P=o.__n=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&Ge(o[s],e,typeof t.type!="function"||n&&!t.props.__P);!n&&(o=t.__c)&&(o=o.__z)&&(r=Me(o,i=[]))&&(o==t.__e&&i.some(X),X(r),X(o)),n||X(t.__e),t.__e=t.__c=t.__=null}function Eo(t,e,n){return this.constructor(t,n)}function $t(t,e){var n,o,r,i;x.__&&x.__(t,e),e.nodeType==9&&(e=e.documentElement),o=(n=t&&32&t.__u)?null:e.__k,e.__k=Ce(U,{children:[t]}),r=[],i=[],Je(e,e.__k,o||Pe,Pe,e.namespaceURI,o?null:e.firstChild?Ft.call(e.childNodes):null,r,o?o.__e:e.firstChild,n,i),Ht(r,e.__k,i),e.__k.props.children=null}x={__e:function(t,e,n,o){for(var r,i,s;e=e.__;)if((r=e.__c)&&!(1&r.__g)){r.__g|=4;try{if((s=(i=r.constructor)&&i.getDerivedStateFromError)&&r.setState(i.getDerivedStateFromError(t)),r.componentDidCatch&&(r.componentDidCatch(t,o||{}),s=1),s&&8&r.__g)return void(r.__g|=2)}catch(l){t=l}}throw xe=0,t}},Rt=0,go=function(t){return t!=null&&t.constructor===ue},Ee.prototype.setState=function(t,e){var n=this.__s;n&&n!=this.state||(n=this.__s=Z({},this.state)),typeof t=="function"&&(t=t(Z({},n),this.props)),t&&(Z(n,t),this.__v&&(e&&this.__k.push(e),Bt(this)))},Ee.prototype.forceUpdate=function(t){this.__v&&(this.__g|=4,t&&this.__h.push(t),Bt(this))},Ee.prototype.render=U,j=[],xe=0,Nt=function(t,e){return t.__v.__b-e.__v.__b},ke=Symbol(),Lt=/(PointerCapture)$|Capture$/i,Ke=0,je={},mo=0;var fe,I,Ye,Vt,Xe=Object.is,Te=0,Zt=[],Ze=[],A=x,jt=A.__b,Kt=A.__r,Wt=A.diffed,Jt=A.__c,Qt=A.unmount,Gt=A.__;function tt(t,e){A.__h&&A.__h(I,t,Te||e),Te=0;var n=I.__H||(I.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function L(t){return Te=1,Mo(tn,t)}function Mo(t,e,n){var o=tt(fe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):tn(void 0,e),function(i){var s=(o.__N||o.__)[0],l=o.t(s,i);Xe(s,l)||(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=I,!I.__f)){I.__f=!0;var r=I.shouldComponentUpdate;I.shouldComponentUpdate=function(i,s,l){var c=this.__H;if(!c)return!0;var f=!1,d=this.props!=i;if(c.__.some(function(_){_.__N&&(f=!0,Xe(_.__[0],_.__N[0])||(d=!0))}),r){var g=r.call(this,i,s,l);return f?g||d:g}return!f||d}}return o.__}function re(t,e){var n=tt(fe++,3);!A.__s&&en(n.__H,e)&&(n.__P=!0,n.__=t,n.u=e,I.__H.__h.push(n))}function Ae(t){return Te=5,xo(function(){return{current:t}},[])}function xo(t,e){var n=tt(fe++,7);return en(n.__H,e)&&(n.__=t(),n.__H=e),n.__}function Po(){var t;do{for(;t=Ze.shift();)try{de(t)}catch(n){A.__e(n,{__:(t=t.__P)&&t.__v})}for(;t=Zt.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(de),e.__h.some(et),e.__h=[]}catch(n){e.__h=[],A.__e(n,t.__v)}}}while(Ze.length)}A.__b=function(t){I=null,jt&&jt(t)},A.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Gt&&Gt(t,e)},A.__r=function(t){Kt&&Kt(t),fe=0;var e=(I=t.__c).__H;e&&(Ye==I?I.__h=[]:(e.__h.some(de),e.__h.some(et),fe=0),e.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})),Ye=I},A.diffed=function(t){Wt&&Wt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&Xt(Zt.push(e)),e.__H.__.some(function(n){n.u&&(n.__H=n.u)})),Ye=I=null},A.__c=function(t,e){e.some(function(n){try{n.__h.some(de),n.__h=n.__h.filter(function(o){return!o.__||et(o)})}catch(o){n.__h=[function(){throw o}]}}),Jt&&Jt(t,e)},A.unmount=function(t){Qt&&Qt(t);var e,n,o=t.__c;o&&o.__H&&(o.__H.__.some(function(r){try{if(r.__P&&r.__c){if(n===void 0){for(n=t.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,Xt(Ze.push(r))}else de(r)}catch(i){e=i}}),o.__H=void 0,e&&A.__e(e,o.__v))};var Yt=typeof requestAnimationFrame=="function";function So(t){var e,n=function(){clearTimeout(o),Yt&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);Yt&&(e=requestAnimationFrame(n))}function Xt(t){t!=1&&Vt==A.requestAnimationFrame||((Vt=A.requestAnimationFrame)||So)(Po)}function de(t){var e=I,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),I=e}function et(t){var e=I;t.__c=t.__(),I=e}function en(t,e){return!t||t.length!=e.length||e.some(function(n,o){return!Xe(n,t[o])})}function tn(t,e){return typeof e=="function"?e(t):e}var To=Symbol.for("pv"),Ao=0;function a(t,e,n,o,r,i){e||(e={});var s,l,c=e;if("ref"in c&&typeof t!="function")for(l in c={},e)l=="ref"?s=e[l]:c[l]=e[l];var f={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:To,__v:--Ao,__i:-1,__u:0};return(r||i)&&(f.__source=r,f.__self=i),x.vnode&&x.vnode(f),f}var z={body:"var(--fl-peek-body, #8b7ba4)",grey:"var(--fl-peek-grey, #6b645c)",muzzle:"var(--fl-peek-muzzle, #f1eaf6)",ink:"var(--fl-peek-ink, #2b2338)",blush:"var(--fl-peek-blush, #e9a99a)",moon:"var(--fl-peek-moon, #dccfe9)"},Bo="M38.5 117 C36 104 37 90 40 78 C45 55 61 40 80 40 C99 40 115 55 120 78 C123 90 124 104 121.5 117 Z",Io="M52 58 Q60 47 72 44",Ro="M74 89 Q80 86 86 89 Q83.5 95 80 95 Q76.5 95 74 89 Z",No="M80 95 v3 M74.2 100 q2.9 2.8 5.8 0 q2.9 2.8 5.8 0",Lo=[[64,95],[62.5,101],[68.5,102.5],[96,95],[97.5,101],[91.5,102.5]],Fo="M 18 116 A 62 15 0 0 1 142 116",Do="M 142 116 A 62 15 0 0 1 30.2 124.8",Uo="M 146 131 A 76 18 0 0 1 40 142",qo="M 44 116 A 60 60 0 1 1 116 116 Z",nt=[[61,72],[99,72]],Oo={resting:7e3,listening:3600,awake:2400,thinking:3e3},ot={transformBox:"fill-box",transformOrigin:"center"},O=t=>Math.round(t*100)/100;function zo({state:t,small:e}){if(t==="awake"||t==="listening"||t==="thinking"){let[r,i]=t==="listening"?[5.4,7.2]:[5,6.6];e&&([r,i]=[r*1.35,i*1.25]);let[s,l]=t==="thinking"?[3.8,-4.8]:[0,0];return a(U,{children:nt.map(([c,f])=>a("g",{children:[a("ellipse",{cx:O(c+s),cy:O(f+l),rx:O(r),ry:O(i),style:{fill:z.ink}}),e?null:a("circle",{cx:O(c+s+r*.34),cy:O(f+l-i*.4),r:1.8,fill:"#ffffff"})]},c))})}if(t==="glad")return a(U,{children:nt.map(([r,i])=>a("path",{d:`M${O(r-6.3)} ${O(i+2.4)} q6.3 -8.6 12.6 0`,fill:"none",strokeWidth:e?6.2:4.4,strokeLinecap:"round",style:{stroke:z.ink}},r))});let[n,o]=e?[7.2,6.6]:[6.8,4.6];return a(U,{children:nt.map(([r,i])=>a("path",{d:`M${O(r-n)} ${O(i-1.4)} q${n} 6.8 ${O(2*n)} 0`,fill:"none",strokeWidth:o,strokeLinecap:"round",style:{stroke:z.ink}},r))})}function H({state:t="resting",size:e=32,live:n,pro:o=!1,label:r}){let i=e<=32,s=t==="grey"?z.grey:z.body,l=n??(t==="listening"||t==="thinking")?Oo[t]:void 0,c=l?{animationDuration:`${l}ms`}:void 0;return a("svg",{viewBox:"0 0 160 160",width:e,height:e,role:r?"img":void 0,"aria-label":r,"aria-hidden":r?void 0:!0,style:{display:"block",flexShrink:0,overflow:"visible"},children:[o?a("path",{d:qo,style:{fill:z.moon}}):null,t==="listening"?a("ellipse",{cx:80,cy:116,rx:74,ry:18,fill:"none",strokeWidth:3.5,opacity:.32,style:{stroke:s}}):null,l&&t!=="thinking"?[0,l/2].map(f=>a("ellipse",{cx:80,cy:116,rx:62,ry:15,fill:"none",strokeWidth:i?6:3.5,opacity:0,class:"peek-anim-ripple",style:{...ot,...c,animationDelay:`${f}ms`,stroke:s}},f)):null,a("path",{d:Fo,fill:"none",strokeWidth:i?7:5,strokeLinecap:"round",opacity:.5,style:{stroke:s}}),a("g",{class:l?"peek-anim-bob":void 0,style:c,children:[a("path",{d:Bo,style:{fill:s}}),i?null:a("path",{d:Io,fill:"none",stroke:"#ffffff",strokeWidth:4,strokeLinecap:"round",opacity:.3}),a("ellipse",{cx:80,cy:96,rx:25,ry:15,style:{fill:z.muzzle}}),a("path",{d:Ro,style:{fill:z.ink}}),i?null:a(U,{children:[a("path",{d:No,fill:"none",strokeWidth:2.1,strokeLinecap:"round",style:{stroke:z.ink}}),Lo.map(([f,d])=>a("circle",{cx:f,cy:d,r:1.6,opacity:.4,style:{fill:z.ink}},`${f}-${d}`))]}),a("g",{style:ot,children:[a("g",{class:!l||t==="resting"?void 0:t==="thinking"?"peek-anim-look":"peek-anim-blink",style:ot,children:a(zo,{state:t,small:i})}),t==="glad"?[54.5,105.5].map(f=>a("ellipse",{cx:f,cy:82.5,rx:6.2,ry:3.6,opacity:.85,style:{fill:z.blush}},f)):null]},t)]}),a("path",{d:Do,fill:"none",strokeWidth:i?8:6,strokeLinecap:"round",opacity:.8,style:{stroke:s}}),i?null:a("path",{d:Uo,fill:"none",strokeWidth:3,strokeLinecap:"round",opacity:.3,style:{stroke:s}})]})}function rt({size:t=132,stroke:e=3.5,fraction:n,breathScale:o,label:r,children:i}){let s=50-e/2,l=2*Math.PI*s,c=Math.min(1,Math.max(0,n));return a("div",{class:"fl-ring-wrap",style:{width:`${t}px`,height:`${t}px`},role:r?"timer":void 0,"aria-label":r,children:[typeof o=="number"?a("div",{class:"fl-breath-halo",style:{transform:`scale(${o.toFixed(3)})`},"aria-hidden":"true"}):null,a("svg",{viewBox:"0 0 100 100",width:t,height:t,"aria-hidden":"true",children:[a("circle",{cx:"50",cy:"50",r:s,fill:"none","stroke-width":e,style:{stroke:"var(--fl-track-strong)"}}),a("circle",{cx:"50",cy:"50",r:s,fill:"none","stroke-width":e,"stroke-linecap":"round","stroke-dasharray":l,"stroke-dashoffset":l*(1-c),transform:"rotate(-90 50 50)",style:{stroke:"var(--fl-accent)",transition:"stroke-dashoffset 220ms linear"}})]}),i?a("div",{class:"fl-ring-center",children:i}):null]})}var oo=po(no(),1);function ro({value:t,size:e=96}){let n="",o=21;try{let r=oo.default.create(t,{errorCorrectionLevel:"M"});o=r.modules.size;let i=r.modules.data,s=[];for(let l=0;l<o;l++)for(let c=0;c<o;c++)i[l*o+c]&&s.push(`M${c},${l}h1v1h-1z`);n=s.join("")}catch{n=""}return a("div",{class:"fl-qr-tile","aria-label":`QR code for ${t}`,children:a("svg",{viewBox:`0 0 ${o} ${o}`,width:e,height:e,shapeRendering:"crispEdges",role:"img","aria-label":"Scan to open in Flowe",children:[a("rect",{width:o,height:o,fill:"#ffffff"}),a("path",{d:n,fill:"#1a1611"})]})})}var Lr="2026-01-26";function He(t){let e=t==="dark"||!t&&window.matchMedia?.("(prefers-color-scheme: dark)").matches;document.documentElement.dataset.theme=e?"dark":"light"}function io(t){if(t.structuredContent&&typeof t.structuredContent=="object")return t.structuredContent;let e=t.content?.find(n=>n.type==="text"&&typeof n.text=="string");if(e?.text)try{let n=JSON.parse(e.text);if(n&&typeof n=="object")return n}catch{return{message:e.text}}return null}function so(t,e){He(void 0);let n=window.matchMedia?.("(prefers-color-scheme: dark)"),o,r=()=>{o||He(void 0)};n?.addEventListener?.("change",r);let i=null,s=e??null,l=1,c=new Map,f=w=>{s=w,i?.(w)},d=typeof window<"u"&&window.parent&&window.parent!==window;function g(w){d&&window.parent.postMessage(w,"*")}function _(w,y,E=15e3){if(!d)return Promise.reject(new Error("MCP host not connected"));let T=l++;return new Promise(($,D)=>{let F=window.setTimeout(()=>{c.delete(T),D(new Error(`MCP host timeout (${w})`))},E);c.set(T,{resolve:R=>{clearTimeout(F),$(R)},reject:R=>{clearTimeout(F),D(R)}}),g({jsonrpc:"2.0",id:T,method:w,params:y})})}function u(w,y={}){g({jsonrpc:"2.0",method:w,params:y})}let p=w=>{let y=w.data;if(!(!y||typeof y!="object"||y.jsonrpc!=="2.0")){if(typeof y.id=="number"&&!y.method&&c.has(y.id)){let E=c.get(y.id);c.delete(y.id),y.error?E.reject(new Error(y.error.message||"MCP host error")):E.resolve(y.result??{});return}if(y.method==="ui/resource-teardown"&&y.id!==void 0){g({jsonrpc:"2.0",id:y.id,result:{}});return}if(y.method==="ui/notifications/host-context-changed"){let E=y.params?.theme;E&&(o=E,He(E));return}if(y.method==="ui/notifications/tool-result"&&y.params){let E=io(y.params);E&&f(E)}}};window.addEventListener("message",p);let C=null,h=0,v=0;function b(){let w=document.documentElement,y=Math.ceil(w.scrollWidth),E=Math.ceil(document.body.scrollHeight||w.scrollHeight);E>0&&(y!==h||E!==v)&&(h=y,v=E,u("ui/notifications/size-changed",{width:y,height:E}))}typeof ResizeObserver<"u"&&(C=new ResizeObserver(()=>b()),C.observe(document.body));let m=!1,k=d?_("ui/initialize",{protocolVersion:Lr,appInfo:{name:t,version:"0.3.0"},appCapabilities:{}},4e3).then(w=>{m=!0;let y=w.hostContext;y?.theme&&(o=y.theme,He(y.theme)),u("ui/notifications/initialized",{}),b()}).catch(()=>{}):Promise.resolve();return{callTool:async(w,y={})=>{if(await k,!m)throw new Error("MCP host not connected");let E=await _("tools/call",{name:w,arguments:y}),T=io(E);if(E.isError){let $=T?.message||(E.content?.[0]?.text??"Tool call failed");throw new Error($)}return T??{}},openLink:async w=>{if(await k,m)try{await _("ui/open-link",{url:w},4e3);return}catch{}window.open(w,"_blank","noopener,noreferrer")},updateContext:async w=>{if(await k,!!m)try{await _("ui/update-model-context",{content:[{type:"text",text:w}]},4e3)}catch{}},onPayload:w=>{i=w,s&&w(s)},destroy:()=>{window.removeEventListener("message",p),n?.removeEventListener?.("change",r),C?.disconnect()}}}var Y=null;function St(t){try{let e=window.AudioContext||window.webkitAudioContext;if(!e)return;Y||(Y=new e),Y.state==="suspended"&&Y.resume();let n=Y.currentTime,o=Y.createOscillator(),r=Y.createGain(),i=t==="inhale"?396:t==="exhale"?288:t==="done"?528:352;o.type="sine",o.frequency.setValueAtTime(i,n),r.gain.setValueAtTime(1e-4,n),r.gain.exponentialRampToValueAtTime(.06,n+.08),r.gain.exponentialRampToValueAtTime(1e-4,n+(t==="done"?1.1:.55)),o.connect(r),r.connect(Y.destination),o.start(n),o.stop(n+(t==="done"?1.15:.6))}catch{}}var $e=[{label:"30s Sigh",duration:30,protocol:"physiological_sigh"},{label:"60s Box Breath",duration:60,protocol:"box_breath"},{label:"60s Palming",duration:60,protocol:"palming"},{label:"45s Neck",duration:45,protocol:"neck_rotation"}],Fr=[{id:"deploy_anxiety",label:"Calm Down \xB7 5m",mins:5},{id:"quick_reset",label:"Reset \xB7 10m",mins:10},{id:"logic_lock",label:"Unstuck \xB7 10m",mins:10},{id:"context_switch",label:"Clear \xB7 8m",mins:8}],Dr=[{id:"pomodoro",label:"Pomodoro",sub:"25 / 5"},{id:"dev",label:"Dev block",sub:"50 / 10"},{id:"ultradian",label:"Ultradian",sub:"90 / 15"}],Ur=[{id:"rain_window_soft",label:"Soft rain"},{id:"nature_spring_birds",label:"Spring birds"},{id:"tones_deep_brown_noise",label:"Brown noise"},{id:"interiors_quiet_cafe",label:"Quiet cafe"},{id:"none",label:"Silence"}];function qr(t){let e=t.toLowerCase().trim();if(e.includes("double inhale"))return"Double inhale through the nose";if(e.includes("inhale"))return"Inhale slowly";if(e.includes("long exhale"))return"Long, unhurried exhale";if(e.includes("exhale"))return"Exhale gently";if(e.includes("hold"))return"Hold softly";let n=e.replace(/^\d+\s+/,"");return n.charAt(0).toUpperCase()+n.slice(1)}function Tt(t){let e=Math.max(0,Math.ceil(t)),n=Math.floor(e/60),o=e%60;return`${n}:${String(o).padStart(2,"0")}`}function Or(t,e){if(!e.length||t<e[0].start_ms)return null;for(let n=0;n<e.length;n++)if(t<e[n].end_ms)return e[n];return e[e.length-1]}function zr(t){if(!t?.phase)return .94;switch(t.phase){case"inhale":return 1.12;case"hold_in":return 1.14;case"exhale":return .86;case"hold_out":return .84}}function Hr({payload:t,bridge:e,onTransition:n}){let o=$e.find(h=>h.protocol===t.recommended_protocol&&h.duration===t.recommended_duration)??$e.find(h=>h.duration===t.recommended_duration)??$e[0],[r,i]=L(o),[s,l]=L(!1),[c,f]=L(null),d=!!t.account?.is_pro,g=!!t.account?.authenticated;async function _(){l(!0),f(null);try{let h=await e.callTool("flowe_reset",{duration_seconds:r.duration,protocol:r.protocol,trigger:"harness_suggested"});n({...h,view:"micro_reset",account:t.account})}catch(h){f(h.message)}finally{l(!1)}}async function u(h){l(!0),f(null);try{let v=await e.callTool("flowe_quick_reset",{session_type:h});v.view==="auth"&&v.auth?n(v):v.message&&n({...v,view:"complete",account:t.account})}catch(v){f(v.message)}finally{l(!1)}}async function p(h){l(!0);try{await e.callTool("flowe_reset_control",{action:"snooze",snooze_minutes:h}),await e.updateContext(`User snoozed Flowe reset suggestions for ${h} minutes.`),n({view:"snoozed",snooze_minutes:h,account:t.account})}catch(v){f(v.message)}finally{l(!1)}}async function C(){l(!0),f(null);try{let h=await e.callTool("flowe_auth",{});n(h)}catch(h){f(h.message)}finally{l(!1)}}return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"awake",size:32,pro:d,label:"Flowe"}),a("div",{children:[a("div",{class:"fl-mono",children:t.eyebrow||(t.session_minutes?`LONG SESSION \xB7 ${t.session_minutes} MIN`:"MOMENT TO RESET")}),a("h2",{class:"fl-title",children:t.headline||"Take a quick breath before the next step"})]})]}),d?a("span",{class:"fl-badge",children:"Flowe Pro"}):null]}),t.reason?a("p",{class:"fl-body",children:t.reason}):null,a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"INSTANT MICRO-RESET \xB7 OFFLINE"}),a("div",{class:"fl-row",children:$e.map(h=>a("button",{type:"button",class:"fl-chip","data-selected":r.protocol===h.protocol&&r.duration===h.duration,onClick:()=>i(h),children:h.label},`${h.protocol}-${h.duration}`))})]}),a("div",{class:"fl-row",style:{justifyContent:"space-between"},children:[a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",disabled:s,onClick:_,children:s?"Starting\u2026":`Start ${r.label}`}),a("button",{type:"button",class:"fl-btn-link",disabled:s,onClick:()=>p(25),children:"Snooze 25m"})]}),g?null:a("button",{type:"button",class:"fl-btn-link",disabled:s,onClick:C,children:"Sign in for live resets \u2192"})]}),g?a(U,{children:[a("div",{class:"fl-divider"}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-header",children:[a("span",{class:"fl-mono",children:"LIVE QUICK RESET \xB7 GUIDED VOICE"}),t.account?.quick_reset_quota&&t.account.quick_reset_quota.cap>0?a("span",{class:"fl-mono",children:[Math.max(0,t.account.quick_reset_quota.cap-t.account.quick_reset_quota.used)," ","free left this week"]}):null]}),a("div",{class:"fl-row",children:Fr.map(h=>a("button",{type:"button",class:"fl-chip",disabled:s,onClick:()=>u(h.id),children:h.label},h.id))})]})]}):null,c?a("p",{class:"fl-error",children:c}):null]})}function $r({payload:t,bridge:e,onDone:n}){let o=t.duration_seconds??60,r=o*1e3,i=Ae(t.started_at_unix?t.started_at_unix*1e3:Date.now()),[s,l]=L(()=>Math.max(0,Date.now()-i.current)),[c,f]=L(t.audio_mode==="chime"),[d,g]=L(!1),_=Ae(-1),u=Ae(!1),p=t.cues??[];re(()=>{let y=0,E=0,T=()=>{let D=Date.now(),F=Math.min(r,Math.max(0,D-i.current));if(l(F),c&&p.length>0){let R=p.findIndex(N=>F>=N.start_ms&&F<N.end_ms);if(R>=0&&R!==_.current){_.current=R;let N=p[R].phase;St(N==="inhale"?"inhale":N==="exhale"?"exhale":"hold")}}if(F>=r&&!u.current){u.current=!0,c&&St("done"),C();return}document.hidden?E=window.setTimeout(T,500):y=window.requestAnimationFrame(T)},$=()=>{document.hidden||T()};return document.addEventListener("visibilitychange",$),T(),()=>{document.removeEventListener("visibilitychange",$),cancelAnimationFrame(y),clearTimeout(E)}},[r,c]);async function C(){let y={};try{y=await e.callTool("flowe_reset_control",{action:"complete",session_id:t.session_id})}catch{}await e.updateContext(`User completed their ${o}s ${t.protocol_display_name??"reset"}.`),n({...t,...y,view:"complete"})}async function h(){g(!0),u.current=!0;try{await e.callTool("flowe_reset_control",{action:"stop",session_id:t.session_id})}catch{}n({view:"suggest",eyebrow:"RESET PAUSED",headline:"Whenever you want another moment",account:t.account})}let v=Math.max(0,(r-s)/1e3),b=r>0?s/r:1,m=Or(s,p),k=m?qr(m.label):"Settle in and listen",w=t.rounds&&t.rounds>0?Math.min(t.rounds,Math.floor(s/r*t.rounds)+1):null;return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:32,live:!0,pro:!!t.account?.is_pro,label:"Flowe resting"}),a("div",{children:[a("div",{class:"fl-mono",children:["MICRO-RESET \xB7 ",o,"S \xB7 ",(t.voice??"ellie").toUpperCase()]}),a("h2",{class:"fl-title",children:t.protocol_display_name||"Guided Reset"})]})]}),w?a("span",{class:"fl-badge",children:["Round ",w," / ",t.rounds]}):null]}),a("div",{class:"fl-runner-stage",children:[a(rt,{size:128,stroke:3.5,fraction:b,breathScale:zr(m),label:`${Math.ceil(v)} seconds remaining`,children:[a("span",{class:"fl-ring-time",children:Tt(v)}),a("span",{class:"fl-mono",style:{letterSpacing:"0.14em"},children:m?.phase?m.phase.replace("_"," "):"left"})]}),a("div",{class:"fl-stack",style:{gap:"8px",flex:1},children:[a("p",{class:"fl-cue-label","aria-live":"polite",children:k}),a("p",{class:"fl-body",children:"Stay right here while your agent works. Eyes soft, shoulders loose."}),a("div",{class:"fl-row",style:{marginTop:"4px"},children:[a("button",{type:"button",class:"fl-btn-secondary",disabled:d,onClick:h,children:d?"Stopping\u2026":"Stop"}),a("button",{type:"button",class:"fl-chip","data-selected":c,onClick:()=>f(y=>!y),children:c?"Chime on":"Soft chime"})]})]})]})]})}function Vr({payload:t,bridge:e,onUpdate:n}){let[o,r]=L(t.focus??null),[i,s]=L("pomodoro"),[l,c]=L("rain_window_soft"),[f,d]=L(!1),[g,_]=L(null);re(()=>{r(t.focus??null)},[t.focus]),re(()=>{if(!o||o.paused||o.status==="CYCLE_DONE")return;let m=window.setInterval(()=>{document.hidden||r(w=>w&&!w.paused?{...w,remainingSec:Math.max(0,w.remainingSec-1)}:w)},1e3),k=window.setInterval(async()=>{if(!document.hidden)try{let w=await e.callTool("flowe_focus_control",{action:"status"});r(w.focus??null)}catch{}},1e4);return()=>{clearInterval(m),clearInterval(k)}},[o?.status,o?.paused]);async function u(){d(!0),_(null);try{let m=await e.callTool("flowe_focus",{action:"start",preset:i,ambient:l});r(m.focus??null),n({...t,focus:m.focus??null})}catch(m){_(m.message)}finally{d(!1)}}async function p(m){d(!0),_(null);try{let k=await e.callTool("flowe_focus_control",{action:m});r(k.focus??null)}catch(k){_(k.message)}finally{d(!1)}}let C=!!t.account?.is_pro;if(!o)return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:32,pro:C,label:"Flowe focus"}),a("div",{children:[a("div",{class:"fl-mono",children:"FOCUS ROOM \xB7 DETACHED CYCLE"}),a("h2",{class:"fl-title",children:"Set a work and break rhythm"})]})]})}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"CADENCE"}),a("div",{class:"fl-row",children:Dr.map(m=>a("button",{type:"button",class:"fl-chip","data-selected":i===m.id,onClick:()=>s(m.id),children:[m.label," \xB7 ",m.sub]},m.id))})]}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"AMBIENCE"}),a("div",{class:"fl-row",children:Ur.map(m=>a("button",{type:"button",class:"fl-chip","data-selected":l===m.id,onClick:()=>c(m.id),children:m.label},m.id))})]}),a("div",{class:"fl-row",children:a("button",{type:"button",class:"fl-btn-primary",disabled:f,onClick:u,children:f?"Starting\u2026":`Start ${i} focus`})}),g?a("p",{class:"fl-error",children:g}):null]});let h=o.status==="FOCUS_BLOCK"?o.preset==="ultradian"?5400:o.preset==="dev"?3e3:1500:600,v=Math.max(0,Math.min(1,1-o.remainingSec/Math.max(1,h))),b=o.status==="BREAK"||o.status==="LONG_BREAK";return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:o.paused?"grey":b?"awake":"resting",size:32,live:!o.paused,pro:C}),a("div",{children:[a("div",{class:"fl-mono",children:[o.preset.toUpperCase()," \xB7 BLOCK ",o.blockIndex," OF ",o.blocks]}),a("h2",{class:"fl-title",children:o.paused?"Focus paused":b?"Break window":"Deep focus block"})]})]}),o.ambient?a("span",{class:"fl-badge",children:o.ambient.replace(/_/g," ")}):null]}),a("div",{class:"fl-runner-stage",children:[a(rt,{size:116,stroke:3.5,fraction:v,label:`${Tt(o.remainingSec)} left`,children:[a("span",{class:"fl-ring-time",children:Tt(o.remainingSec)}),a("span",{class:"fl-mono",children:o.paused?"paused":b?"break":"focus"})]}),a("div",{class:"fl-stack",style:{gap:"10px",flex:1},children:[a("div",{class:"fl-pips","aria-label":`Block ${o.blockIndex} of ${o.blocks}`,children:Array.from({length:o.blocks}).map((m,k)=>a("span",{class:"fl-pip","data-state":k+1<o.blockIndex?"done":k+1===o.blockIndex?"active":"todo"},k))}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",disabled:f,onClick:()=>p(o.paused?"resume":"pause"),children:o.paused?"Resume":"Pause"}),a("button",{type:"button",class:"fl-btn-secondary",disabled:f,onClick:()=>p("skip"),children:"Skip phase"}),a("button",{type:"button",class:"fl-btn-link",disabled:f,onClick:()=>p("quit"),children:"End cycle"})]})]})]}),g?a("p",{class:"fl-error",children:g}):null]})}function jr({payload:t,bridge:e,onSignedIn:n}){let o=t.auth,[r,i]=L("pending"),[s,l]=L(!1),[c,f]=L(t.account??null);return re(()=>{if(!o||r!=="pending")return;let d=Math.max(2e3,(o.interval||3)*1e3),g=!1,_=window.setInterval(async()=>{if(!g)try{let u=await e.callTool("flowe_auth_poll",{device_code:o.device_code});if(u.status==="authorized"){g=!0,clearInterval(_),i("authorized");let p=u.account??{authenticated:!0,is_pro:!1,plan_type:"free"};f(p),await e.updateContext(`User signed in to Flowe${p.first_name?` as ${p.first_name}`:""}. Live Quick and Deep Resets are now unlocked.`),n(p)}else u.status==="expired"&&(g=!0,clearInterval(_),i("expired"))}catch{}},d);return()=>{g=!0,clearInterval(_)}},[o?.device_code,r]),r==="authorized"?a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"glad",size:36,pro:!!c?.is_pro,label:"Signed in"}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE CONNECTED"}),a("h2",{class:"fl-title",children:["Welcome",c?.first_name?`, ${c.first_name}`:"","."]})]})]}),c?.is_pro?a("span",{class:"fl-badge",children:"Flowe Pro"}):a("span",{class:"fl-badge fl-badge-ok",children:"Signed in"})]}),a("p",{class:"fl-body",children:"Your Flowe account is linked. Ask for any Quick Reset (5\u201315 min) or Deep Reset (15\u201325 min) whenever you need real guided voice recovery."})]}):a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"awake",size:34,label:"Sign in to Flowe"}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE ACCOUNT \xB7 DEVICE SIGN-IN"}),a("h2",{class:"fl-title",children:"Sign in for live Quick & Deep Resets"})]})]})}),a("p",{class:"fl-body",children:"Connect your Flowe account to run real AI-guided Quick Resets and interactive Deep Resets synced with your Journey."}),o?a("div",{class:"fl-runner-stage",style:{alignItems:"center"},children:[a(ro,{value:o.verification_uri_complete,size:96}),a("div",{class:"fl-stack",style:{gap:"10px",flex:1},children:[a("div",{class:"fl-row",children:[a("span",{class:"fl-code-box",children:o.user_code}),a("button",{type:"button",class:"fl-btn-link",onClick:()=>{navigator.clipboard?.writeText(o.user_code),l(!0),setTimeout(()=>l(!1),1800)},children:s?"Copied":"Copy code"})]}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",onClick:()=>e.openLink(o.verification_uri_complete),children:"Continue in browser"}),a("span",{class:"fl-mono",children:r==="expired"?"CODE EXPIRED":"WAITING FOR APPROVAL\u2026"})]})]})]}):a("p",{class:"fl-body",children:"Preparing sign-in link\u2026"})]})}function Kr({payload:t,bridge:e,onRestart:n}){let[o,r]=L(!1);async function i(){r(!0);try{let s=await e.callTool("flowe_reset",{duration_seconds:t.duration_seconds??60,protocol:t.protocol?.replace(/_\d+$/,""),trigger:"user_requested"});n({...s,view:"micro_reset",account:t.account})}finally{r(!1)}}return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"glad",size:38,pro:!!t.account?.is_pro,label:"Reset complete"}),a("div",{children:[a("div",{class:"fl-mono",children:"RESET COMPLETE"}),a("h2",{class:"fl-title",children:"Back to it."})]})]}),a("div",{class:"fl-row",children:[typeof t.sessions_today=="number"?a("span",{class:"fl-badge fl-badge-ok",children:["Today \xB7 ",t.sessions_today]}):null,typeof t.streak_days=="number"&&t.streak_days>0?a("span",{class:"fl-badge",children:["Streak \xB7 ",t.streak_days,"d"]}):null]})]}),a("p",{class:"fl-body",children:t.protocol_display_name?`${t.duration_seconds??60}s ${t.protocol_display_name} complete.`:t.message||"Your reset is complete."}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-secondary",disabled:o,onClick:i,children:"Repeat"}),a("button",{type:"button",class:"fl-btn-link",onClick:()=>n({view:"focus",focus:null,account:t.account}),children:"Start focus cycle \u2192"})]})]})}function Wr({bridge:t}){let[e,n]=L(null);if(re(()=>(t.onPayload(r=>n(r)),()=>t.destroy()),[t]),!e)return a("div",{class:"fl-shell",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"thinking",size:32,live:!0}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE"}),a("p",{class:"fl-body",children:"Preparing your reset\u2026"})]})]})});let o=e.view??(e.cues?"micro_reset":e.auth?"auth":"suggest");return a("div",{class:"fl-shell",children:o==="micro_reset"?a($r,{payload:e,bridge:t,onDone:n}):o==="focus"?a(Vr,{payload:e,bridge:t,onUpdate:n}):o==="auth"?a(jr,{payload:e,bridge:t,onSignedIn:r=>n(i=>({...i,account:r}))}):o==="complete"?a(Kr,{payload:e,bridge:t,onRestart:n}):o==="snoozed"?a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:30,pro:!!e.account?.is_pro}),a("div",{children:[a("div",{class:"fl-mono",children:["SNOOZED \xB7 ",e.snooze_minutes??25," MIN"]}),a("p",{class:"fl-body",children:"Got it \u2014 Flowe will stay quiet while you work."})]})]}):a(Hr,{payload:e,bridge:t,onTransition:n})})}var Jr=so("flowe-micro"),lo=document.getElementById("app");lo&&$t(a(Wr,{bridge:Jr}),lo);
7
+ `);let s=xr(e,n,r),l=Oe.getSymbolSize(e),c=new hr(l);return br(c,e),kr(c),Cr(c,e),vt(c,n,0),e>=7&&Er(c,e),Mr(c,s),isNaN(o)&&(o=bt.getBestMask(c,vt.bind(null,c,n))),bt.applyMask(o,c),vt(c,n,o),{modules:c,version:e,errorCorrectionLevel:n,maskPattern:o,segments:r}}Jn.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let o=yt.M,r,i;return typeof n<"u"&&(o=yt.from(n.errorCorrectionLevel,yt.M),r=qe.from(n.version),i=bt.from(n.maskPattern),n.toSJISFunc&&Oe.setToSJISFunction(n.toSJISFunc)),Sr(e,r,o,i)}});var Ct=P(oe=>{function Yn(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(o){return[o,o]}))),e.length===6&&e.push("F","F");let n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}oe.getOptions=function(e){e||(e={}),e.color||(e.color={});let n=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,o=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:o,scale:o?4:r,margin:n,color:{dark:Yn(e.color.dark||"#000000ff"),light:Yn(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};oe.getScale=function(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale};oe.getImageWidth=function(e,n){let o=oe.getScale(e,n);return Math.floor((e+n.margin*2)*o)};oe.qrToImageData=function(e,n,o){let r=n.modules.size,i=n.modules.data,s=oe.getScale(r,o),l=Math.floor((r+o.margin*2)*s),c=o.margin*s,f=[o.color.light,o.color.dark];for(let d=0;d<l;d++)for(let g=0;g<l;g++){let _=(d*l+g)*4,u=o.color.light;if(d>=c&&g>=c&&d<l-c&&g<l-c){let h=Math.floor((d-c)/s),C=Math.floor((g-c)/s);u=f[i[h*r+C]?1:0]}e[_++]=u.r,e[_++]=u.g,e[_++]=u.b,e[_]=u.a}}});var Gn=P(ze=>{var Et=Ct();function Tr(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}function Ar(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}ze.render=function(e,n,o){let r=o,i=n;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),n||(i=Ar()),r=Et.getOptions(r);let s=Et.getImageWidth(e.modules.size,r),l=i.getContext("2d"),c=l.createImageData(s,s);return Et.qrToImageData(c.data,e,r),Tr(l,i,s),l.putImageData(c,0,0),i};ze.renderToDataURL=function(e,n,o){let r=o;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),r||(r={});let i=ze.render(e,n,r),s=r.type||"image/png",l=r.rendererOpts||{};return i.toDataURL(s,l.quality)}});var eo=P(Zn=>{var Br=Ct();function Xn(t,e){let n=t.a/255,o=e+'="'+t.hex+'"';return n<1?o+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function Mt(t,e,n){let o=t+e;return typeof n<"u"&&(o+=" "+n),o}function Ir(t,e,n){let o="",r=0,i=!1,s=0;for(let l=0;l<t.length;l++){let c=Math.floor(l%e),f=Math.floor(l/e);!c&&!i&&(i=!0),t[l]?(s++,l>0&&c>0&&t[l-1]||(o+=i?Mt("M",c+n,.5+f+n):Mt("m",r,0),r=0,i=!1),c+1<e&&t[l+1]||(o+=Mt("h",s),s=0)):r++}return o}Zn.render=function(e,n,o){let r=Br.getOptions(n),i=e.modules.size,s=e.modules.data,l=i+r.margin*2,c=r.color.light.a?"<path "+Xn(r.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",f="<path "+Xn(r.color.dark,"stroke")+' d="'+Ir(s,i,r.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+f+`</svg>
8
+ `;return typeof o=="function"&&o(null,_),_}});var no=P(ve=>{var Rr=on(),xt=Qn(),to=Gn(),Nr=eo();function Pt(t,e,n,o,r){let i=[].slice.call(arguments,1),s=i.length,l=typeof i[s-1]=="function";if(!l&&!Rr())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(r=n,n=e,e=o=void 0):s===3&&(e.getContext&&typeof r>"u"?(r=o,o=void 0):(r=o,o=n,n=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=e,e=o=void 0):s===2&&!e.getContext&&(o=n,n=e,e=void 0),new Promise(function(c,f){try{let d=xt.create(n,o);c(t(d,e,o))}catch(d){f(d)}})}try{let c=xt.create(n,o);r(null,t(c,e,o))}catch(c){r(c)}}ve.create=xt.create;ve.toCanvas=Pt.bind(null,to.render);ve.toDataURL=Pt.bind(null,to.renderToDataURL);ve.toString=Pt.bind(null,function(t,e,n){return Nr.render(t,n)})});var x,Rt,go,j,Ve,xe,Nt,ke,Lt,Ke,je,mo,ue=Symbol.for("pv"),Pe={},Se=[],yo=/^m(i|n|o|s|text|space)$/,We=Array.isArray,Ft=Se.slice,Z=Object.assign;function X(t){t&&t.parentNode&&t.remove()}function Ce(t,e,n,o,r){var i={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:ue,__v:r||++Rt,__i:-1,__u:0};return!r&&x.vnode&&x.vnode(i),i}function U(t){return t.children}function Ee(t,e){this.props=t,this.context=e,this.__g=0}function K(t,e){if(e==null)return t.__&&K(t.__,t.__i+1);for(var n;e<t.__k.length;e++)if((n=t.__k[e])&&n.__e)return n.__e;return typeof t.type!="function"||t.props.__P?null:K(t)}function wo(t){var e,n=t.__v,o=n.__e,r=[],i=[],s=t.__P;s&&((e=Z({constructor:ue},n)).__v=n.__v+1,x.vnode&&x.vnode(e),Je(s,e,n,t.__n,s.namespaceURI,32&n.__u?[o]:null,r,o||K(n),32&n.__u,i),e.__v=n.__v,e.__.__k[e.__i]=e,Ht(r,e,i),n.__=n.__e=null,e.__e!=o&&Dt(e))}function Dt(t){if((t=t.__)&&t.__c&&!t.props.__P)return t.__e=null,t.__k.some(function(e){return e&&(t.__e=e.__e)}),Dt(t)}function Bt(t){(8&t.__g||(t.__g|=8,j.push(t),xe++))&&Ve==x.debounceRendering||((Ve=x.debounceRendering)||queueMicrotask)(Ut)}function Ut(){try{for(var t,e=1;j.length;)j.length>e&&j.sort(Nt),t=j.shift(),e=j.length,8&t.__g&&wo(t)}finally{(xe=j.length)&&(Ve||queueMicrotask)(Ut)}}function qt(t,e,n,o,r,i,s,l,c,f,d){var g,_,u,h,C,p,v=o.__k||Se,b=e.length;for(c=vo(n,e,v,c,b),g=0;g<b;g++)(u=n.__k[g])!=null&&(_=~u.__i&&v[u.__i]||Pe,u.__i=g,p=Je(t,u,_,r,i,s,l,c,f,d),h=u.__e,(_.ref!=u.ref||8&_.__u)&&(_.ref&&Qe(_.ref,null,u,_),u.ref&&d.push(u.ref,u.__c||h,u)),C=C||h,4&u.__u?(c=Ot(u,c,t,!_.__v),_.__e&&(_.__e=null)):typeof u.type=="function"&&p!==void 0?c=p:h&&(c=h.nextSibling),u.__u&=-21);return n.__e=C,c}function vo(t,e,n,o,r){var i,s,l,c,f,d,g,_,u,h=n.length,C=h,p=0,v=0,b=t.__k=Array(r);for(i=0;i<r;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s!="object"||s.constructor===String?s=b[i]=Ce(null,s):We(s)?s=b[i]=Ce(U,{children:s}):s.constructor===ue&&s.__b?s=b[i]=Ce(s.type,s.props,s.key,s.ref,s.__v):b[i]=s,c=i+p,s.__=t,s.__b=t.__b+1,l=null,~(f=s.__i=bo(s,n,c,C))&&(C--,(l=n[f])&&(l.__u|=2)),l&&l.__v?(s.__u|=16,f==c-1?p--:f==c+1?p++:f!=c&&(f>c?p--:p++,v=1)):(~f||(r>h?p--:r<h&&p++),typeof s.type!="function"&&(s.__u|=4))):b[i]=null;if(v){for(d=[],g=[],i=0;i<r;i++)if((s=b[i])&&16&s.__u){for(p=0,_=d.length;p<_;)d[u=p+_>>1]<s.__i?p=u+1:_=u;d[p]=s.__i,g[i]=p+1}for(p=d.length;i--;)g[i]&&(g[i]==p?p--:b[i].__u|=4)}if(C)for(i=0;i<h;i++)!(l=n[i])||2&l.__u||(l.__e==o&&(o=K(l)),Ye(l,l));return o}function Ot(t,e,n,o){var r,i,s,l;if(typeof t.type=="function"){if(t.props.__P)return e;if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&(r[i].__=t,e=Ot(r[i],e,n,!1));return e}for(e&&!e.parentNode&&(e=K(t))&&!e.parentNode&&(e=null),s=t.__e,l=e;l&&l.nodeType==8;)l=l.nextSibling;for(s!=l&&(!o&&n.moveBefore&&s.parentNode?n.moveBefore(s,e):n.insertBefore(s,e||null)),e=s;(e=e&&e.nextSibling)&&e.nodeType==8&&!e.data.startsWith("$s"););return e}function bo(t,e,n,o){var r,i=t.key,s=t.type,l=e[n],c=l&&!(2&l.__u);if(l===null&&i==null||c&&i==l.key&&s==l.type)return n;if(o>(c?1:0)){for(r=n-1;r>=0;r--)if((l=e[r])&&!(2&l.__u)&&i==l.key&&s==l.type)return r;for(r=n+1;r<e.length;r++)if((l=e[r])&&!(2&l.__u)&&i==l.key&&s==l.type)return r}return-1}function It(t,e,n){n==null&&(n=""),e[0]=="-"?t.setProperty(e,n):t[e]=n}function be(t,e,n,o,r){var i,s;if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||It(t.style,e);if(n)for(e in n)o&&n[e]==o[e]||It(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")typeof n!="function"&&(n=null),typeof o!="function"&&(o=null),(t.__e||(t.__e={}))[e]=n,n&&o||(s=je[e]||(je[e]=ko(e)),(t.__a||(t.__a={}))[e]=Ke,i=e!=(e=e.replace(Lt,"$1")),(e=e.slice(2))[0]<"a"&&(e=e.toLowerCase()),n?t.addEventListener(e,s,i):t.removeEventListener(e,s,i));else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{return void(t[e]=n??"")}catch{}if(typeof n=="function")return;n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n)}}function ko(t){return function(e){var n=this.__e;if(n){if(n=n[t],e[ke]==null)e[ke]=Ke++;else if(e[ke]<this.__a[t])return;return n(x.event?x.event(e):e)}}}function Je(t,e,n,o,r,i,s,l,c,f){var d,g,_,u,h,C,p,v,b,m,k,w,y,E,T,$,D,F,R=e.type;if(e.constructor!==ue)return null;128&n.__u&&(c=32&n.__u,d=n.__c.__z)&&(e.__u|=c,g=i=[],d.nodeType==8?l=Me(d,i):i.push(d),l=i[0]||l),(d=x.__b)&&d(e);e:if(typeof R=="function"){_=s.length;try{if(v=e.props,b=(d=R.prototype)&&d.render,m=(d=R.contextType)&&o[d.__c],k=d?m?m.props.value:d.__:o,(u=n.__c)?(e.__c=u,2&u.__g&&(u.__g|=1)):(b?e.__c=u=new R(v,k):(e.__c=u=new Ee(v,k),u.constructor=R,u.render=Eo),m&&m.sub(u),u.state||(u.state={}),u.__n=o,u.__g|=8,u.__h=[],u.__k=[]),b&&(u.__s||(u.__s=u.state),R.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Z({},u.__s)),Z(u.__s,R.getDerivedStateFromProps(v,u.__s)))),h=u.props,C=u.state,u.__v=e,n.__c){if(v!==h&&b&&!R.getDerivedStateFromProps&&u.componentWillReceiveProps&&u.componentWillReceiveProps(v,k),e.__v==n.__v&&!(8&u.__g)||!(4&u.__g)&&u.shouldComponentUpdate&&u.shouldComponentUpdate(v,u.__s,k)===!1){e.__v!=n.__v&&(u.props=v,u.state=u.__s,u.__g&=-9),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),Se.push.apply(u.__h,u.__k),u.__k=[],u.__h.length&&s.push(u),l=K(n);break e}u.componentWillUpdate&&u.componentWillUpdate(v,u.__s,k),b&&u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(h,C,p)})}else b&&!R.getDerivedStateFromProps&&u.componentWillMount&&u.componentWillMount(),b&&u.componentDidMount&&u.__h.push(u.componentDidMount);u.context=k,u.props=v,u.__P=t,u.__g&=-5,w=x.__r,y=b?25:0;do u.__g&=-9,w&&w(e),d=u.render(u.props,u.state=u.__s,u.context);while(8&u.__g&&++y<25);b&&(Se.push.apply(u.__h,u.__k),u.__k=[]),u.state=u.__s,u.getChildContext&&(o=Z({},o,u.getChildContext())),b&&n.__c&&u.getSnapshotBeforeUpdate&&(p=u.getSnapshotBeforeUpdate(h,C)),E=d&&d.type===U&&d.key==null?d.props.children:d,v.__P&&(d=l,r=(t=v.__P).namespaceURI,c=i=null,n.props&&n.props.__P!=t&&(n.__k.some(function(N){N&&Ye(N,N)}),n.__k=null),l=n.__k?K(n,0):null),l=qt(t,We(E)?E:[E],e,n,o,r,i,s,l,c,f),v.__P&&(e.__e=null,l=d),e.__u&=-161,g&&g.some(X),u.__h.length&&s.push(u),1&u.__g&&(u.__g&=-4)}catch(N){if(s.length=_,e.__v=null,c||i)if(N&&N.then){if(e.__u|=128|c,i){for(~(D=i.indexOf(l||void 0))||(D=i.length);(F=i[D-1])&&F.nodeType==8;)D--;for(;D<i.length;D++)if(F=i[D])if(i[D]=null,T){if(F==$)break}else{if(F.nodeType!=8)break;F.data.startsWith("$s")&&($=Me(T=F))}}if(!T){for(;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;T=l}(d=Me(T=e.__c.__z||(e.__c.__z=T)))?(e.__e=T,l=d):e.__e=l,l=l&&l.nextSibling}else i&&i.some(X);else e.__e=n.__e;e.__k||(e.__k=n.__k||[]),N&&N.then||zt(e),x.__e(N,e,n)}}else l=e.__e=Co(n.__e,e,n,o,r,i,s,c,f,t);return(d=x.diffed)&&d(e),l}function Me(t,e){if(t&&t.nodeType==8&&t.data.startsWith("$s"))for(var n=1;t=t.nextSibling;){if(t.nodeType==8){if(t.data.startsWith("$s"))n++;else if(t.data.startsWith("/$s")&&!--n)return t}e&&e.push(t)}}function zt(t){t&&(t.__c&&(t.__c.__g|=4),t.__k&&t.__k.some(zt))}function Ht(t,e,n){for(var o=0;o<n.length;)Qe(n[o++],n[o++],n[o++]);x.__c&&x.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(i){i.call(r)})}catch(i){x.__e(i,r.__v)}})}function Co(t,e,n,o,r,i,s,l,c,f){var d,g,_,u,h,C,p,v,b=n.props||Pe,m=e.props,k=e.type;if(k=="svg"?r="http://www.w3.org/2000/svg":k=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),i){for(d=0;d<i.length;d++)if((h=i[d])&&(k?h.localName==k:h.nodeType==3)){t=h,i[d]=null;break}}if(!t){if(v=f.ownerDocument||document,!k)return v.createTextNode(m);t=v.createElementNS(r,k,m.is?m:f),l&&(x.__m&&x.__m(e,i),l=!1),i=null}if(k){if(f=k=="template"&&t.content||t,i=k=="textarea"&&m.defaultValue!=null?null:i&&Ft.call(f.childNodes),!l&&i)for(b={},d=0;d<t.attributes.length;d++)b[(h=t.attributes[d]).name]=h.value;for(d in b)h=b[d],d=="dangerouslySetInnerHTML"?_=h:d=="children"||d in m||d=="value"&&"defaultValue"in m||d=="checked"&&"defaultChecked"in m||be(t,d,null,h,r);for(d in m)h=m[d],d=="children"?u=h:d=="dangerouslySetInnerHTML"?g=h:d=="value"?C=h:d=="checked"?p=h:l&&typeof h!="function"||b[d]===h||be(t,d,h,b[d],r);g?(l||_&&(g.__html==_.__html||g.__html==t.innerHTML)||(t.innerHTML=g.__html),e.__k=[]):(_&&(t.textContent=""),(k=="foreignObject"||r=="http://www.w3.org/1998/Math/MathML"&&yo.test(k))&&(r="http://www.w3.org/1999/xhtml"),qt(f,We(u)?u:[u],e,n,o,r,i,s,i?i[0]:n.__k&&K(n,0),l,c),i&&i.some(X)),l&&k!="textarea"||(d="value",k=="progress"&&C==null?t.removeAttribute(d):C==null||C===t[d]&&(k!="progress"||C)||be(t,d,C,b[d],r),d="checked",p!=null&&p!=t[d]&&be(t,d,p,b[d],r))}else b===m||l&&t.data==m||(t.data=m);return t}function Qe(t,e,n,o){try{typeof t=="function"?e?e.__x=t(e)||1:o&&(o=o.__c||o.__e)&&(e=o.__x)&&(o.__x=null,typeof e=="function"?e():t(null)):t.current=e}catch(r){x.__e(r,n)}}function Ye(t,e,n){var o,r,i,s;if(x.unmount&&x.unmount(t),!(o=t.ref)||o.current&&o.current!=t.__e||Qe(o,null,e,t),o=t.__c){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(l){x.__e(l,e)}o.__P=o.__n=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&Ye(o[s],e,typeof t.type!="function"||n&&!t.props.__P);!n&&(o=t.__c)&&(o=o.__z)&&(r=Me(o,i=[]))&&(o==t.__e&&i.some(X),X(r),X(o)),n||X(t.__e),t.__e=t.__c=t.__=null}function Eo(t,e,n){return this.constructor(t,n)}function $t(t,e){var n,o,r,i;x.__&&x.__(t,e),e.nodeType==9&&(e=e.documentElement),o=(n=t&&32&t.__u)?null:e.__k,e.__k=Ce(U,{children:[t]}),r=[],i=[],Je(e,e.__k,o||Pe,Pe,e.namespaceURI,o?null:e.firstChild?Ft.call(e.childNodes):null,r,o?o.__e:e.firstChild,n,i),Ht(r,e.__k,i),e.__k.props.children=null}x={__e:function(t,e,n,o){for(var r,i,s;e=e.__;)if((r=e.__c)&&!(1&r.__g)){r.__g|=4;try{if((s=(i=r.constructor)&&i.getDerivedStateFromError)&&r.setState(i.getDerivedStateFromError(t)),r.componentDidCatch&&(r.componentDidCatch(t,o||{}),s=1),s&&8&r.__g)return void(r.__g|=2)}catch(l){t=l}}throw xe=0,t}},Rt=0,go=function(t){return t!=null&&t.constructor===ue},Ee.prototype.setState=function(t,e){var n=this.__s;n&&n!=this.state||(n=this.__s=Z({},this.state)),typeof t=="function"&&(t=t(Z({},n),this.props)),t&&(Z(n,t),this.__v&&(e&&this.__k.push(e),Bt(this)))},Ee.prototype.forceUpdate=function(t){this.__v&&(this.__g|=4,t&&this.__h.push(t),Bt(this))},Ee.prototype.render=U,j=[],xe=0,Nt=function(t,e){return t.__v.__b-e.__v.__b},ke=Symbol(),Lt=/(PointerCapture)$|Capture$/i,Ke=0,je={},mo=0;var fe,I,Ge,Vt,Xe=Object.is,Te=0,Zt=[],Ze=[],A=x,jt=A.__b,Kt=A.__r,Wt=A.diffed,Jt=A.__c,Qt=A.unmount,Yt=A.__;function tt(t,e){A.__h&&A.__h(I,t,Te||e),Te=0;var n=I.__H||(I.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function L(t){return Te=1,Mo(tn,t)}function Mo(t,e,n){var o=tt(fe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):tn(void 0,e),function(i){var s=(o.__N||o.__)[0],l=o.t(s,i);Xe(s,l)||(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=I,!I.__f)){I.__f=!0;var r=I.shouldComponentUpdate;I.shouldComponentUpdate=function(i,s,l){var c=this.__H;if(!c)return!0;var f=!1,d=this.props!=i;if(c.__.some(function(_){_.__N&&(f=!0,Xe(_.__[0],_.__N[0])||(d=!0))}),r){var g=r.call(this,i,s,l);return f?g||d:g}return!f||d}}return o.__}function re(t,e){var n=tt(fe++,3);!A.__s&&en(n.__H,e)&&(n.__P=!0,n.__=t,n.u=e,I.__H.__h.push(n))}function Ae(t){return Te=5,xo(function(){return{current:t}},[])}function xo(t,e){var n=tt(fe++,7);return en(n.__H,e)&&(n.__=t(),n.__H=e),n.__}function Po(){var t;do{for(;t=Ze.shift();)try{de(t)}catch(n){A.__e(n,{__:(t=t.__P)&&t.__v})}for(;t=Zt.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(de),e.__h.some(et),e.__h=[]}catch(n){e.__h=[],A.__e(n,t.__v)}}}while(Ze.length)}A.__b=function(t){I=null,jt&&jt(t)},A.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Yt&&Yt(t,e)},A.__r=function(t){Kt&&Kt(t),fe=0;var e=(I=t.__c).__H;e&&(Ge==I?I.__h=[]:(e.__h.some(de),e.__h.some(et),fe=0),e.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})),Ge=I},A.diffed=function(t){Wt&&Wt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&Xt(Zt.push(e)),e.__H.__.some(function(n){n.u&&(n.__H=n.u)})),Ge=I=null},A.__c=function(t,e){e.some(function(n){try{n.__h.some(de),n.__h=n.__h.filter(function(o){return!o.__||et(o)})}catch(o){n.__h=[function(){throw o}]}}),Jt&&Jt(t,e)},A.unmount=function(t){Qt&&Qt(t);var e,n,o=t.__c;o&&o.__H&&(o.__H.__.some(function(r){try{if(r.__P&&r.__c){if(n===void 0){for(n=t.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,Xt(Ze.push(r))}else de(r)}catch(i){e=i}}),o.__H=void 0,e&&A.__e(e,o.__v))};var Gt=typeof requestAnimationFrame=="function";function So(t){var e,n=function(){clearTimeout(o),Gt&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);Gt&&(e=requestAnimationFrame(n))}function Xt(t){t!=1&&Vt==A.requestAnimationFrame||((Vt=A.requestAnimationFrame)||So)(Po)}function de(t){var e=I,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),I=e}function et(t){var e=I;t.__c=t.__(),I=e}function en(t,e){return!t||t.length!=e.length||e.some(function(n,o){return!Xe(n,t[o])})}function tn(t,e){return typeof e=="function"?e(t):e}var To=Symbol.for("pv"),Ao=0;function a(t,e,n,o,r,i){e||(e={});var s,l,c=e;if("ref"in c&&typeof t!="function")for(l in c={},e)l=="ref"?s=e[l]:c[l]=e[l];var f={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:To,__v:--Ao,__i:-1,__u:0};return(r||i)&&(f.__source=r,f.__self=i),x.vnode&&x.vnode(f),f}var z={body:"var(--fl-peek-body, #8b7ba4)",grey:"var(--fl-peek-grey, #6b645c)",muzzle:"var(--fl-peek-muzzle, #f1eaf6)",ink:"var(--fl-peek-ink, #2b2338)",blush:"var(--fl-peek-blush, #e9a99a)",moon:"var(--fl-peek-moon, #dccfe9)"},Bo="M38.5 117 C36 104 37 90 40 78 C45 55 61 40 80 40 C99 40 115 55 120 78 C123 90 124 104 121.5 117 Z",Io="M52 58 Q60 47 72 44",Ro="M74 89 Q80 86 86 89 Q83.5 95 80 95 Q76.5 95 74 89 Z",No="M80 95 v3 M74.2 100 q2.9 2.8 5.8 0 q2.9 2.8 5.8 0",Lo=[[64,95],[62.5,101],[68.5,102.5],[96,95],[97.5,101],[91.5,102.5]],Fo="M 18 116 A 62 15 0 0 1 142 116",Do="M 142 116 A 62 15 0 0 1 30.2 124.8",Uo="M 146 131 A 76 18 0 0 1 40 142",qo="M 44 116 A 60 60 0 1 1 116 116 Z",nt=[[61,72],[99,72]],Oo={resting:7e3,listening:3600,awake:2400,thinking:3e3},ot={transformBox:"fill-box",transformOrigin:"center"},O=t=>Math.round(t*100)/100;function zo({state:t,small:e}){if(t==="awake"||t==="listening"||t==="thinking"){let[r,i]=t==="listening"?[5.4,7.2]:[5,6.6];e&&([r,i]=[r*1.35,i*1.25]);let[s,l]=t==="thinking"?[3.8,-4.8]:[0,0];return a(U,{children:nt.map(([c,f])=>a("g",{children:[a("ellipse",{cx:O(c+s),cy:O(f+l),rx:O(r),ry:O(i),style:{fill:z.ink}}),e?null:a("circle",{cx:O(c+s+r*.34),cy:O(f+l-i*.4),r:1.8,fill:"#ffffff"})]},c))})}if(t==="glad")return a(U,{children:nt.map(([r,i])=>a("path",{d:`M${O(r-6.3)} ${O(i+2.4)} q6.3 -8.6 12.6 0`,fill:"none",strokeWidth:e?6.2:4.4,strokeLinecap:"round",style:{stroke:z.ink}},r))});let[n,o]=e?[7.2,6.6]:[6.8,4.6];return a(U,{children:nt.map(([r,i])=>a("path",{d:`M${O(r-n)} ${O(i-1.4)} q${n} 6.8 ${O(2*n)} 0`,fill:"none",strokeWidth:o,strokeLinecap:"round",style:{stroke:z.ink}},r))})}function H({state:t="resting",size:e=32,live:n,pro:o=!1,label:r}){let i=e<=32,s=t==="grey"?z.grey:z.body,l=n??(t==="listening"||t==="thinking")?Oo[t]:void 0,c=l?{animationDuration:`${l}ms`}:void 0;return a("svg",{viewBox:"0 0 160 160",width:e,height:e,role:r?"img":void 0,"aria-label":r,"aria-hidden":r?void 0:!0,style:{display:"block",flexShrink:0,overflow:"visible"},children:[o?a("path",{d:qo,style:{fill:z.moon}}):null,t==="listening"?a("ellipse",{cx:80,cy:116,rx:74,ry:18,fill:"none",strokeWidth:3.5,opacity:.32,style:{stroke:s}}):null,l&&t!=="thinking"?[0,l/2].map(f=>a("ellipse",{cx:80,cy:116,rx:62,ry:15,fill:"none",strokeWidth:i?6:3.5,opacity:0,class:"peek-anim-ripple",style:{...ot,...c,animationDelay:`${f}ms`,stroke:s}},f)):null,a("path",{d:Fo,fill:"none",strokeWidth:i?7:5,strokeLinecap:"round",opacity:.5,style:{stroke:s}}),a("g",{class:l?"peek-anim-bob":void 0,style:c,children:[a("path",{d:Bo,style:{fill:s}}),i?null:a("path",{d:Io,fill:"none",stroke:"#ffffff",strokeWidth:4,strokeLinecap:"round",opacity:.3}),a("ellipse",{cx:80,cy:96,rx:25,ry:15,style:{fill:z.muzzle}}),a("path",{d:Ro,style:{fill:z.ink}}),i?null:a(U,{children:[a("path",{d:No,fill:"none",strokeWidth:2.1,strokeLinecap:"round",style:{stroke:z.ink}}),Lo.map(([f,d])=>a("circle",{cx:f,cy:d,r:1.6,opacity:.4,style:{fill:z.ink}},`${f}-${d}`))]}),a("g",{style:ot,children:[a("g",{class:!l||t==="resting"?void 0:t==="thinking"?"peek-anim-look":"peek-anim-blink",style:ot,children:a(zo,{state:t,small:i})}),t==="glad"?[54.5,105.5].map(f=>a("ellipse",{cx:f,cy:82.5,rx:6.2,ry:3.6,opacity:.85,style:{fill:z.blush}},f)):null]},t)]}),a("path",{d:Do,fill:"none",strokeWidth:i?8:6,strokeLinecap:"round",opacity:.8,style:{stroke:s}}),i?null:a("path",{d:Uo,fill:"none",strokeWidth:3,strokeLinecap:"round",opacity:.3,style:{stroke:s}})]})}function rt({size:t=132,stroke:e=3.5,fraction:n,breathScale:o,label:r,children:i}){let s=50-e/2,l=2*Math.PI*s,c=Math.min(1,Math.max(0,n));return a("div",{class:"fl-ring-wrap",style:{width:`${t}px`,height:`${t}px`},role:r?"timer":void 0,"aria-label":r,children:[typeof o=="number"?a("div",{class:"fl-breath-halo",style:{transform:`scale(${o.toFixed(3)})`},"aria-hidden":"true"}):null,a("svg",{viewBox:"0 0 100 100",width:t,height:t,"aria-hidden":"true",children:[a("circle",{cx:"50",cy:"50",r:s,fill:"none","stroke-width":e,style:{stroke:"var(--fl-track-strong)"}}),a("circle",{cx:"50",cy:"50",r:s,fill:"none","stroke-width":e,"stroke-linecap":"round","stroke-dasharray":l,"stroke-dashoffset":l*(1-c),transform:"rotate(-90 50 50)",style:{stroke:"var(--fl-accent)",transition:"stroke-dashoffset 220ms linear"}})]}),i?a("div",{class:"fl-ring-center",children:i}):null]})}var oo=ho(no(),1);function ro({value:t,size:e=96}){let n="",o=21;try{let r=oo.default.create(t,{errorCorrectionLevel:"M"});o=r.modules.size;let i=r.modules.data,s=[];for(let l=0;l<o;l++)for(let c=0;c<o;c++)i[l*o+c]&&s.push(`M${c},${l}h1v1h-1z`);n=s.join("")}catch{n=""}return a("div",{class:"fl-qr-tile","aria-label":`QR code for ${t}`,children:a("svg",{viewBox:`0 0 ${o} ${o}`,width:e,height:e,shapeRendering:"crispEdges",role:"img","aria-label":"Scan to open in Flowe",children:[a("rect",{width:o,height:o,fill:"#ffffff"}),a("path",{d:n,fill:"#1a1611"})]})})}var Lr="2026-01-26";function He(t){let e=t==="dark"||!t&&window.matchMedia?.("(prefers-color-scheme: dark)").matches;document.documentElement.dataset.theme=e?"dark":"light"}function io(t){if(t.structuredContent&&typeof t.structuredContent=="object")return t.structuredContent;let e=t.content?.find(n=>n.type==="text"&&typeof n.text=="string");if(e?.text)try{let n=JSON.parse(e.text);if(n&&typeof n=="object")return n}catch{return{message:e.text}}return null}function so(t,e){He(void 0);let n=window.matchMedia?.("(prefers-color-scheme: dark)"),o,r=()=>{o||He(void 0)};n?.addEventListener?.("change",r);let i=null,s=e??null,l=1,c=new Map,f=w=>{s=w,i?.(w)},d=typeof window<"u"&&window.parent&&window.parent!==window;function g(w){d&&window.parent.postMessage(w,"*")}function _(w,y,E=15e3){if(!d)return Promise.reject(new Error("MCP host not connected"));let T=l++;return new Promise(($,D)=>{let F=window.setTimeout(()=>{c.delete(T),D(new Error(`MCP host timeout (${w})`))},E);c.set(T,{resolve:R=>{clearTimeout(F),$(R)},reject:R=>{clearTimeout(F),D(R)}}),g({jsonrpc:"2.0",id:T,method:w,params:y})})}function u(w,y={}){g({jsonrpc:"2.0",method:w,params:y})}let h=w=>{let y=w.data;if(!(!y||typeof y!="object"||y.jsonrpc!=="2.0")){if(typeof y.id=="number"&&!y.method&&c.has(y.id)){let E=c.get(y.id);c.delete(y.id),y.error?E.reject(new Error(y.error.message||"MCP host error")):E.resolve(y.result??{});return}if(y.method==="ui/resource-teardown"&&y.id!==void 0){g({jsonrpc:"2.0",id:y.id,result:{}});return}if(y.method==="ui/notifications/host-context-changed"){let E=y.params?.theme;E&&(o=E,He(E));return}if(y.method==="ui/notifications/tool-result"&&y.params){let E=io(y.params);E&&f(E)}}};window.addEventListener("message",h);let C=null,p=0,v=0;function b(){let w=document.documentElement,y=Math.ceil(w.scrollWidth),E=Math.ceil(document.body.scrollHeight||w.scrollHeight);E>0&&(y!==p||E!==v)&&(p=y,v=E,u("ui/notifications/size-changed",{width:y,height:E}))}typeof ResizeObserver<"u"&&(C=new ResizeObserver(()=>b()),C.observe(document.body));let m=!1,k=d?_("ui/initialize",{protocolVersion:Lr,appInfo:{name:t,version:"0.3.2"},appCapabilities:{}},4e3).then(w=>{m=!0;let y=w.hostContext;y?.theme&&(o=y.theme,He(y.theme)),u("ui/notifications/initialized",{}),b()}).catch(()=>{}):Promise.resolve();return{callTool:async(w,y={})=>{if(await k,!m)throw new Error("MCP host not connected");let E=await _("tools/call",{name:w,arguments:y}),T=io(E);if(E.isError){let $=T?.message||(E.content?.[0]?.text??"Tool call failed");throw new Error($)}return T??{}},openLink:async w=>{if(await k,m)try{await _("ui/open-link",{url:w},4e3);return}catch{}window.open(w,"_blank","noopener,noreferrer")},updateContext:async w=>{if(await k,!!m)try{await _("ui/update-model-context",{content:[{type:"text",text:w}]},4e3)}catch{}},onPayload:w=>{i=w,s&&w(s)},destroy:()=>{window.removeEventListener("message",h),n?.removeEventListener?.("change",r),C?.disconnect()}}}var G=null;function St(t){try{let e=window.AudioContext||window.webkitAudioContext;if(!e)return;G||(G=new e),G.state==="suspended"&&G.resume();let n=G.currentTime,o=G.createOscillator(),r=G.createGain(),i=t==="inhale"?396:t==="exhale"?288:t==="done"?528:352;o.type="sine",o.frequency.setValueAtTime(i,n),r.gain.setValueAtTime(1e-4,n),r.gain.exponentialRampToValueAtTime(.06,n+.08),r.gain.exponentialRampToValueAtTime(1e-4,n+(t==="done"?1.1:.55)),o.connect(r),r.connect(G.destination),o.start(n),o.stop(n+(t==="done"?1.15:.6))}catch{}}var $e=[{label:"30s Sigh",duration:30,protocol:"physiological_sigh"},{label:"60s Box Breath",duration:60,protocol:"box_breath"},{label:"60s Palming",duration:60,protocol:"palming"},{label:"45s Neck",duration:45,protocol:"neck_rotation"}],Fr=[{id:"deploy_anxiety",label:"Calm Down \xB7 5m",mins:5},{id:"quick_reset",label:"Reset \xB7 10m",mins:10},{id:"logic_lock",label:"Unstuck \xB7 10m",mins:10},{id:"context_switch",label:"Clear \xB7 8m",mins:8}],Dr=[{id:"pomodoro",label:"Pomodoro",sub:"25 / 5"},{id:"dev",label:"Dev block",sub:"50 / 10"},{id:"ultradian",label:"Ultradian",sub:"90 / 15"}],Ur=[{id:"rain_window_soft",label:"Soft rain"},{id:"nature_spring_birds",label:"Spring birds"},{id:"tones_deep_brown_noise",label:"Brown noise"},{id:"interiors_quiet_cafe",label:"Quiet cafe"},{id:"none",label:"Silence"}];function qr(t){let e=t.toLowerCase().trim();if(e.includes("double inhale"))return"Double inhale through the nose";if(e.includes("inhale"))return"Inhale slowly";if(e.includes("long exhale"))return"Long, unhurried exhale";if(e.includes("exhale"))return"Exhale gently";if(e.includes("hold"))return"Hold softly";let n=e.replace(/^\d+\s+/,"");return n.charAt(0).toUpperCase()+n.slice(1)}function Tt(t){let e=Math.max(0,Math.ceil(t)),n=Math.floor(e/60),o=e%60;return`${n}:${String(o).padStart(2,"0")}`}function Or(t,e){if(!e.length||t<e[0].start_ms)return null;for(let n=0;n<e.length;n++)if(t<e[n].end_ms)return e[n];return e[e.length-1]}function zr(t){if(!t?.phase)return .94;switch(t.phase){case"inhale":return 1.12;case"hold_in":return 1.14;case"exhale":return .86;case"hold_out":return .84}}function Hr({payload:t,bridge:e,onTransition:n}){let o=$e.find(p=>p.protocol===t.recommended_protocol&&p.duration===t.recommended_duration)??$e.find(p=>p.duration===t.recommended_duration)??$e[0],[r,i]=L(o),[s,l]=L(!1),[c,f]=L(null),d=!!t.account?.is_pro,g=!!t.account?.authenticated;async function _(){l(!0),f(null);try{let p=await e.callTool("flowe_reset",{duration_seconds:r.duration,protocol:r.protocol,trigger:"harness_suggested"});n({...p,view:"micro_reset",account:t.account})}catch(p){f(p.message)}finally{l(!1)}}async function u(p){l(!0),f(null);try{let v=await e.callTool("flowe_quick_reset",{session_type:p});v.view==="auth"&&v.auth?n(v):v.message&&n({...v,view:"complete",account:t.account})}catch(v){f(v.message)}finally{l(!1)}}async function h(p){l(!0);try{await e.callTool("flowe_reset_control",{action:"snooze",snooze_minutes:p}),await e.updateContext(`User snoozed Flowe reset suggestions for ${p} minutes.`),n({view:"snoozed",snooze_minutes:p,account:t.account})}catch(v){f(v.message)}finally{l(!1)}}async function C(){l(!0),f(null);try{let p=await e.callTool("flowe_auth",{});n(p)}catch(p){f(p.message)}finally{l(!1)}}return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"awake",size:32,pro:d,label:"Flowe"}),a("div",{children:[a("div",{class:"fl-mono",children:t.eyebrow||(t.session_minutes?`LONG SESSION \xB7 ${t.session_minutes} MIN`:"MOMENT TO RESET")}),a("h2",{class:"fl-title",children:t.headline||"Take a quick breath before the next step"})]})]}),d?a("span",{class:"fl-badge",children:"Flowe Pro"}):null]}),t.reason?a("p",{class:"fl-body",children:t.reason}):null,a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"INSTANT MICRO-RESET \xB7 NO ACCOUNT"}),a("div",{class:"fl-row",children:$e.map(p=>a("button",{type:"button",class:"fl-chip","data-selected":r.protocol===p.protocol&&r.duration===p.duration,onClick:()=>i(p),children:p.label},`${p.protocol}-${p.duration}`))})]}),a("div",{class:"fl-row",style:{justifyContent:"space-between"},children:[a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",disabled:s,onClick:_,children:s?"Starting\u2026":`Start ${r.label}`}),a("button",{type:"button",class:"fl-btn-link",disabled:s,onClick:()=>h(25),children:"Snooze 25m"})]}),g?null:a("button",{type:"button",class:"fl-btn-link",disabled:s,onClick:C,children:"Sign in for live resets \u2192"})]}),g?a(U,{children:[a("div",{class:"fl-divider"}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-header",children:[a("span",{class:"fl-mono",children:"LIVE QUICK RESET \xB7 GUIDED VOICE"}),t.account?.quick_reset_quota&&t.account.quick_reset_quota.cap>0?a("span",{class:"fl-mono",children:[Math.max(0,t.account.quick_reset_quota.cap-t.account.quick_reset_quota.used)," ","free left this week"]}):null]}),a("div",{class:"fl-row",children:Fr.map(p=>a("button",{type:"button",class:"fl-chip",disabled:s,onClick:()=>u(p.id),children:p.label},p.id))})]})]}):null,c?a("p",{class:"fl-error",children:c}):null]})}function $r({payload:t,bridge:e,onDone:n}){let o=t.duration_seconds??60,r=o*1e3,i=Ae(t.started_at_unix?t.started_at_unix*1e3:Date.now()),[s,l]=L(()=>Math.max(0,Date.now()-i.current)),[c,f]=L(t.audio_mode==="chime"),[d,g]=L(!1),_=Ae(-1),u=Ae(!1),h=t.cues??[];re(()=>{let y=0,E=0,T=()=>{let D=Date.now(),F=Math.min(r,Math.max(0,D-i.current));if(l(F),c&&h.length>0){let R=h.findIndex(N=>F>=N.start_ms&&F<N.end_ms);if(R>=0&&R!==_.current){_.current=R;let N=h[R].phase;St(N==="inhale"?"inhale":N==="exhale"?"exhale":"hold")}}if(F>=r&&!u.current){u.current=!0,c&&St("done"),C();return}document.hidden?E=window.setTimeout(T,500):y=window.requestAnimationFrame(T)},$=()=>{document.hidden||T()};return document.addEventListener("visibilitychange",$),T(),()=>{document.removeEventListener("visibilitychange",$),cancelAnimationFrame(y),clearTimeout(E)}},[r,c]);async function C(){let y={};try{y=await e.callTool("flowe_reset_control",{action:"complete",session_id:t.session_id})}catch{}await e.updateContext(`User completed their ${o}s ${t.protocol_display_name??"reset"}.`),n({...t,...y,view:"complete"})}async function p(){g(!0),u.current=!0;try{await e.callTool("flowe_reset_control",{action:"stop",session_id:t.session_id})}catch{}n({view:"suggest",eyebrow:"RESET PAUSED",headline:"Whenever you want another moment",account:t.account})}let v=Math.max(0,(r-s)/1e3),b=r>0?s/r:1,m=Or(s,h),k=m?qr(m.label):"Settle in and listen",w=t.rounds&&t.rounds>0?Math.min(t.rounds,Math.floor(s/r*t.rounds)+1):null;return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:32,live:!0,pro:!!t.account?.is_pro,label:"Flowe resting"}),a("div",{children:[a("div",{class:"fl-mono",children:["MICRO-RESET \xB7 ",o,"S \xB7 ",(t.voice??"ellie").toUpperCase()]}),a("h2",{class:"fl-title",children:t.protocol_display_name||"Guided Reset"})]})]}),w?a("span",{class:"fl-badge",children:["Round ",w," / ",t.rounds]}):null]}),a("div",{class:"fl-runner-stage",children:[a(rt,{size:128,stroke:3.5,fraction:b,breathScale:zr(m),label:`${Math.ceil(v)} seconds remaining`,children:[a("span",{class:"fl-ring-time",children:Tt(v)}),a("span",{class:"fl-mono",style:{letterSpacing:"0.14em"},children:m?.phase?m.phase.replace("_"," "):"left"})]}),a("div",{class:"fl-stack",style:{gap:"8px",flex:1},children:[a("p",{class:"fl-cue-label","aria-live":"polite",children:k}),a("p",{class:"fl-body",children:"Stay right here while your agent works. Eyes soft, shoulders loose."}),a("div",{class:"fl-row",style:{marginTop:"4px"},children:[a("button",{type:"button",class:"fl-btn-secondary",disabled:d,onClick:p,children:d?"Stopping\u2026":"Stop"}),a("button",{type:"button",class:"fl-chip","data-selected":c,onClick:()=>f(y=>!y),children:c?"Chime on":"Soft chime"})]})]})]})]})}function Vr({payload:t,bridge:e,onUpdate:n}){let[o,r]=L(t.focus??null),[i,s]=L("pomodoro"),[l,c]=L("rain_window_soft"),[f,d]=L(!1),[g,_]=L(null);re(()=>{r(t.focus??null)},[t.focus]),re(()=>{if(!o||o.paused||o.status==="CYCLE_DONE")return;let m=window.setInterval(()=>{document.hidden||r(w=>w&&!w.paused?{...w,remainingSec:Math.max(0,w.remainingSec-1)}:w)},1e3),k=window.setInterval(async()=>{if(!document.hidden)try{let w=await e.callTool("flowe_focus_control",{action:"status"});r(w.focus??null)}catch{}},1e4);return()=>{clearInterval(m),clearInterval(k)}},[o?.status,o?.paused]);async function u(){d(!0),_(null);try{let m=await e.callTool("flowe_focus",{action:"start",preset:i,ambient:l});r(m.focus??null),n({...t,focus:m.focus??null})}catch(m){_(m.message)}finally{d(!1)}}async function h(m){d(!0),_(null);try{let k=await e.callTool("flowe_focus_control",{action:m});r(k.focus??null)}catch(k){_(k.message)}finally{d(!1)}}let C=!!t.account?.is_pro;if(!o)return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:32,pro:C,label:"Flowe focus"}),a("div",{children:[a("div",{class:"fl-mono",children:"FOCUS ROOM \xB7 DETACHED CYCLE"}),a("h2",{class:"fl-title",children:"Set a work and break rhythm"})]})]})}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"CADENCE"}),a("div",{class:"fl-row",children:Dr.map(m=>a("button",{type:"button",class:"fl-chip","data-selected":i===m.id,onClick:()=>s(m.id),children:[m.label," \xB7 ",m.sub]},m.id))})]}),a("div",{class:"fl-stack",style:{gap:"8px"},children:[a("div",{class:"fl-mono",children:"AMBIENCE"}),a("div",{class:"fl-row",children:Ur.map(m=>a("button",{type:"button",class:"fl-chip","data-selected":l===m.id,onClick:()=>c(m.id),children:m.label},m.id))})]}),a("div",{class:"fl-row",children:a("button",{type:"button",class:"fl-btn-primary",disabled:f,onClick:u,children:f?"Starting\u2026":`Start ${i} focus`})}),g?a("p",{class:"fl-error",children:g}):null]});let p=o.status==="FOCUS_BLOCK"?o.preset==="ultradian"?5400:o.preset==="dev"?3e3:1500:600,v=Math.max(0,Math.min(1,1-o.remainingSec/Math.max(1,p))),b=o.status==="BREAK"||o.status==="LONG_BREAK";return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:o.paused?"grey":b?"awake":"resting",size:32,live:!o.paused,pro:C}),a("div",{children:[a("div",{class:"fl-mono",children:[o.preset.toUpperCase()," \xB7 BLOCK ",o.blockIndex," OF ",o.blocks]}),a("h2",{class:"fl-title",children:o.paused?"Focus paused":b?"Break window":"Deep focus block"})]})]}),o.ambient?a("span",{class:"fl-badge",children:o.ambient.replace(/_/g," ")}):null]}),a("div",{class:"fl-runner-stage",children:[a(rt,{size:116,stroke:3.5,fraction:v,label:`${Tt(o.remainingSec)} left`,children:[a("span",{class:"fl-ring-time",children:Tt(o.remainingSec)}),a("span",{class:"fl-mono",children:o.paused?"paused":b?"break":"focus"})]}),a("div",{class:"fl-stack",style:{gap:"10px",flex:1},children:[a("div",{class:"fl-pips","aria-label":`Block ${o.blockIndex} of ${o.blocks}`,children:Array.from({length:o.blocks}).map((m,k)=>a("span",{class:"fl-pip","data-state":k+1<o.blockIndex?"done":k+1===o.blockIndex?"active":"todo"},k))}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",disabled:f,onClick:()=>h(o.paused?"resume":"pause"),children:o.paused?"Resume":"Pause"}),a("button",{type:"button",class:"fl-btn-secondary",disabled:f,onClick:()=>h("skip"),children:"Skip phase"}),a("button",{type:"button",class:"fl-btn-link",disabled:f,onClick:()=>h("quit"),children:"End cycle"})]})]})]}),g?a("p",{class:"fl-error",children:g}):null]})}function jr({payload:t,bridge:e,onSignedIn:n}){let o=t.auth,[r,i]=L("pending"),[s,l]=L(!1),[c,f]=L(t.account??null);return re(()=>{if(!o||r!=="pending")return;let d=Math.max(2e3,(o.interval||3)*1e3),g=!1,_=window.setInterval(async()=>{if(!g)try{let u=await e.callTool("flowe_auth_poll",{device_code:o.device_code});if(u.status==="authorized"){g=!0,clearInterval(_),i("authorized");let h=u.account??{authenticated:!0,is_pro:!1,plan_type:"free"};f(h),await e.updateContext(`User signed in to Flowe${h.first_name?` as ${h.first_name}`:""}. ${h.is_pro?"Quick Resets and Deep Resets are open.":"Five free Quick Resets a week are open. Deep Resets need Flowe Pro."}`),n(h)}else u.status==="expired"&&(g=!0,clearInterval(_),i("expired"))}catch{}},d);return()=>{g=!0,clearInterval(_)}},[o?.device_code,r]),r==="authorized"?a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"glad",size:36,pro:!!c?.is_pro,label:"Signed in"}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE CONNECTED"}),a("h2",{class:"fl-title",children:["Welcome",c?.first_name?`, ${c.first_name}`:"","."]})]})]}),c?.is_pro?a("span",{class:"fl-badge",children:"Flowe Pro"}):a("span",{class:"fl-badge fl-badge-ok",children:"Signed in"})]}),a("p",{class:"fl-body",children:c?.is_pro?"Your Flowe account is linked. Ask for a Quick Reset (5\u201315 min) or a Deep Reset (30\u201350 min) at any time.":"Your Flowe account is linked. Ask for a Quick Reset (5\u201315 min). You get five a week on the free plan."})]}):a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"awake",size:34,label:"Sign in to Flowe"}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE ACCOUNT \xB7 DEVICE SIGN-IN"}),a("h2",{class:"fl-title",children:"Sign in for live Quick & Deep Resets"})]})]})}),a("p",{class:"fl-body",children:"Connect your Flowe account to run real AI-guided Quick Resets and interactive Deep Resets synced with your Journey."}),o?a("div",{class:"fl-runner-stage",style:{alignItems:"center"},children:[a(ro,{value:o.verification_uri_complete,size:96}),a("div",{class:"fl-stack",style:{gap:"10px",flex:1},children:[a("div",{class:"fl-row",children:[a("span",{class:"fl-code-box",children:o.user_code}),a("button",{type:"button",class:"fl-btn-link",onClick:()=>{navigator.clipboard?.writeText(o.user_code),l(!0),setTimeout(()=>l(!1),1800)},children:s?"Copied":"Copy code"})]}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-primary",onClick:()=>e.openLink(o.verification_uri_complete),children:"Continue in browser"}),a("span",{class:"fl-mono",children:r==="expired"?"CODE EXPIRED":"WAITING FOR APPROVAL\u2026"})]})]})]}):a("p",{class:"fl-body",children:"Preparing sign-in link\u2026"})]})}function Kr({payload:t,bridge:e,onRestart:n}){let[o,r]=L(!1);async function i(){r(!0);try{let s=await e.callTool("flowe_reset",{duration_seconds:t.duration_seconds??60,protocol:t.protocol?.replace(/_\d+$/,""),trigger:"user_requested"});n({...s,view:"micro_reset",account:t.account})}finally{r(!1)}}return a("div",{class:"fl-stack",children:[a("div",{class:"fl-header",children:[a("div",{class:"fl-brand-row",children:[a(H,{state:"glad",size:38,pro:!!t.account?.is_pro,label:"Reset complete"}),a("div",{children:[a("div",{class:"fl-mono",children:"RESET COMPLETE"}),a("h2",{class:"fl-title",children:"Back to it."})]})]}),a("div",{class:"fl-row",children:[typeof t.sessions_today=="number"?a("span",{class:"fl-badge fl-badge-ok",children:["Today \xB7 ",t.sessions_today]}):null,typeof t.streak_days=="number"&&t.streak_days>0?a("span",{class:"fl-badge",children:["Streak \xB7 ",t.streak_days,"d"]}):null]})]}),a("p",{class:"fl-body",children:t.protocol_display_name?`${t.duration_seconds??60}s ${t.protocol_display_name} complete.`:t.message||"Your reset is complete."}),a("div",{class:"fl-row",children:[a("button",{type:"button",class:"fl-btn-secondary",disabled:o,onClick:i,children:"Repeat"}),a("button",{type:"button",class:"fl-btn-link",onClick:()=>n({view:"focus",focus:null,account:t.account}),children:"Start focus cycle \u2192"})]})]})}function Wr({bridge:t}){let[e,n]=L(null);if(re(()=>(t.onPayload(r=>n(r)),()=>t.destroy()),[t]),!e)return a("div",{class:"fl-shell",children:a("div",{class:"fl-brand-row",children:[a(H,{state:"thinking",size:32,live:!0}),a("div",{children:[a("div",{class:"fl-mono",children:"FLOWE"}),a("p",{class:"fl-body",children:"Preparing your reset\u2026"})]})]})});let o=e.view??(e.cues?"micro_reset":e.auth?"auth":"suggest");return a("div",{class:"fl-shell",children:o==="micro_reset"?a($r,{payload:e,bridge:t,onDone:n}):o==="focus"?a(Vr,{payload:e,bridge:t,onUpdate:n}):o==="auth"?a(jr,{payload:e,bridge:t,onSignedIn:r=>n(i=>({...i,account:r}))}):o==="complete"?a(Kr,{payload:e,bridge:t,onRestart:n}):o==="snoozed"?a("div",{class:"fl-brand-row",children:[a(H,{state:"resting",size:30,pro:!!e.account?.is_pro}),a("div",{children:[a("div",{class:"fl-mono",children:["SNOOZED \xB7 ",e.snooze_minutes??25," MIN"]}),a("p",{class:"fl-body",children:"Got it \u2014 Flowe will stay quiet while you work."})]})]}):a(Hr,{payload:e,bridge:t,onTransition:n})})}var Jr=so("flowe-micro"),lo=document.getElementById("app");lo&&$t(a(Wr,{bridge:Jr}),lo);
9
9
  </script></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowe-ai/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Neural resets, live AI-guided Quick & Deep Resets, and MCP Apps for AI coding workspaces.",
5
5
  "license": "MIT",
6
6
  "author": "flowe.ai",
@@ -7,9 +7,9 @@ description: Protect the user's attention during long AI coding sessions with Fl
7
7
 
8
8
  Flowe supports three reset tiers plus focus cycles:
9
9
 
10
- 1. **Micro-Resets (`30–90s`, offline, zero login)** — instant breath, palming, or somatic resets during short agent waits (`flowe_reset` / `flowe reset`).
10
+ 1. **Micro-Resets (`30–90s`, no account)** — instant breath, palming, or somatic resets during short agent waits (`flowe_reset` / `flowe reset`).
11
11
  2. **Real Quick Resets (`5–15 min`, live Flowe AI voice, authenticated)** — listen-only NSDR sessions with live guide + ambient mix (`flowe_quick_reset` / `flowe quick`).
12
- 3. **Real Deep Resets (`15–25 min`, live interactive two-way Flowe voice, authenticated)** — deeper hypnotherapy sessions for burnout, anxiety, or persistent blocks (`flowe_deep_reset` / `flowe deep`).
12
+ 3. **Real Deep Resets (`30–50 min`, live two-way voice with Ada, Flowe Pro or a team plan)** — longer sessions for what keeps coming back: burnout, anxiety, persistent blocks (`flowe_deep_reset` / `flowe deep`).
13
13
  4. **Focus Cycles (`pomodoro` 25/5, `dev` 50/10, `ultradian` 90/15)** — detached work/break timers with ambient soundscapes (`flowe_focus` / `flowe focus`).
14
14
 
15
15
  ## Preferred Path: MCP Tools (Interactive Inline Components)
@@ -27,6 +27,7 @@ When Flowe MCP tools are available, **always prefer them over shelling out to Ba
27
27
  - Deeper recovery → `flowe_deep_reset` (`ht_stress`, `ht_anxiety`, `ht_burnout`, `ht_procrastination`, `ht_confidence`, `ht_people_pleasing`, `ht_relationships`, `ht_fears`, `ht_anger`).
28
28
  - Focus session → `flowe_focus` (`action: "show"` or `action: "start"` once the user opts in).
29
29
  - Sign in → `flowe_auth` (renders an inline browser link + QR + code; no terminal detour).
30
+ 4. **Plans and teams:** a free account gets 5 Quick Resets a week; Flowe Pro, alone or through a team, is unlimited. If a card says the team plan is off, tell the user to ask their admin. Do not send a team member to buy Flowe Pro. Offer a micro-reset in the meantime.
30
31
 
31
32
  ## Short resets: when to invoke
32
33
 
@@ -1 +0,0 @@
1
- import{readFileSync as x,writeFileSync as A,mkdirSync as E,existsSync as h}from"fs";import{homedir as T,platform as P}from"os";import{join as d}from"path";import{nanoid as D}from"nanoid";var v="https://www.flowe.ai",O=90,b=["sage","ada","ellie"];function V(t){return typeof t=="string"&&b.includes(t)?t:"ellie"}function S(){let t=T();return P()==="win32"?d(t,"AppData","Roaming","flowe"):d(t,".config","flowe")}function k(){return d(S(),"config.json")}function w(){return{version:2,voice:"ellie",anonymous_id:`anon_${D(12)}`,telemetry:"on",backend_url:process.env.FLOWE_BACKEND_URL||v,session_dates:[]}}function N(t){let e=typeof t.version=="number"?t.version:1,n=t.voice,r=V(n),o={version:2,voice:r,anonymous_id:t.anonymous_id??`anon_${D(12)}`,telemetry:t.telemetry??"on",backend_url:t.backend_url??v,session_dates:Array.isArray(t.session_dates)?t.session_dates:[]};return typeof t.first_reset_at=="string"&&(o.first_reset_at=t.first_reset_at),typeof t.user_first_name=="string"&&(o.user_first_name=t.user_first_name),(e<2||n!==r)&&s(o),o}function i(){let t=k();if(!h(t)){let e=w();return s(e),e}try{let e=x(t,"utf-8"),n=JSON.parse(e),r=N(n);return process.env.FLOWE_BACKEND_URL&&(r.backend_url=process.env.FLOWE_BACKEND_URL),r}catch{let e=w();return s(e),e}}function s(t){let e=S();h(e)||E(e,{recursive:!0}),A(k(),JSON.stringify(t,null,2),"utf-8")}function Q(t){let e=i();e.voice=t,s(e)}function X(){let t=i();t.first_reset_at||(t.first_reset_at=new Date().toISOString(),s(t))}function Z(t){let e=i();t&&t.trim().length>0?e.user_first_name=t.trim():delete e.user_first_name,s(e)}function u(t=new Date){let e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${e}-${n}-${r}`}function R(t,e){let n=new Date(e);n.setDate(n.getDate()-O);let r=u(n);return t.filter(o=>o>=r)}function tt(t=new Date){let e=i(),n=u(t),r=R([...e.session_dates,n],t);e.session_dates=r,s(e)}function et(t=new Date){let e=i(),n=u(t);return e.session_dates.filter(r=>r===n).length}function nt(t=new Date){let e=i(),n=new Set(e.session_dates),r=new Date(t);r.setHours(0,0,0,0);let o=new Date(r);n.has(u(o))||o.setDate(o.getDate()-1);let _=0;for(;n.has(u(o));)_+=1,o.setDate(o.getDate()-1);return _}function rt(){return i().session_dates.length}import{execFileSync as g}from"child_process";import{existsSync as m,mkdirSync as K,readFileSync as L,rmSync as U,writeFileSync as I}from"fs";import{homedir as $,platform as l}from"os";import{join as f}from"path";var c="flowe-cli",a="clerk-token";function p(){let t=$(),e=l()==="win32"?f(t,"AppData","Roaming","flowe"):f(t,".config","flowe");return f(e,".token")}function j(){if(l()!=="darwin")return null;try{let t=g("security",["find-generic-password","-s",c,"-a",a,"-w"],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim();return t.length>0?t:null}catch{return null}}function B(t){if(l()!=="darwin")return!1;try{return g("security",["add-generic-password","-U","-s",c,"-a",a,"-w",t],{stdio:"ignore"}),!0}catch{return!1}}function M(){if(l()!=="darwin")return!1;try{return g("security",["delete-generic-password","-s",c,"-a",a],{stdio:"ignore"}),!0}catch{return!1}}function W(){try{let t=p();if(!m(t))return null;let e=L(t,"utf-8").trim();return e.length>0?e:null}catch{return null}}function H(t){let e=p(),n=f(e,"..");m(n)||K(n,{recursive:!0}),I(e,t,{encoding:"utf-8",mode:384})}function J(){try{let t=p();m(t)&&U(t,{force:!0})}catch{}}async function y(){try{let e=(await import("keytar")).default;return e&&typeof e.getPassword=="function"?e:null}catch{return null}}async function ft(){let t=process.env.FLOWE_AUTH_TOKEN?.trim();if(t)return t;let e=await y();if(e)try{let n=await e.getPassword(c,a);return n||null}catch{return null}return j()??W()}async function lt(t){let e=await y();if(e)try{await e.setPassword(c,a,t);return}catch{}B(t)||H(t)}async function dt(){let t=await y();if(t)try{await t.deletePassword(c,a)}catch{}M(),J()}export{i as a,Q as b,X as c,Z as d,tt as e,et as f,nt as g,rt as h,ft as i,lt as j,dt as k};
@@ -1 +0,0 @@
1
- import{a as y,d as b,e as q,i as f,j as D}from"./chunk-EC5WRPZP.js";var B=[{id:"quick_reset",name:"Reset",description:"Quick mental refresh between tasks.",duration_minutes:10,technique:"Yoga Nidra",category:"calm"},{id:"sprint_prep",name:"Lock In",description:"Before deep work or a focus sprint.",duration_minutes:10,technique:"Dopamine priming",category:"focus"},{id:"context_switch",name:"Clear",description:"After meetings, before code.",duration_minutes:8,technique:"Body scan",category:"focus"},{id:"shutdown",name:"Wind Down",description:"End of day, sleep transition.",duration_minutes:15,technique:"Breathing",category:"sleep"},{id:"logic_lock",name:"Unstuck",description:"When a problem keeps circling.",duration_minutes:10,technique:"Open focus",category:"focus"},{id:"deploy_anxiety",name:"Calm Down",description:"Heart racing, high stakes.",duration_minutes:5,technique:"Cyclic sighing",category:"calm"},{id:"executive_reset",name:"Defog",description:"Brain fog, decision fatigue.",duration_minutes:12,technique:"Quiet focus",category:"calm"},{id:"presentation_prep",name:"Steady",description:"Before a presentation or meeting.",duration_minutes:8,technique:"Grounding",category:"focus"}],I=[{id:"ht_stress",name:"Stress",hook:"For the days everything feels too much.",duration_minutes:20},{id:"ht_anxiety",name:"Anxiety",hook:"For the racing 2 a.m. loop you cannot shake.",duration_minutes:20},{id:"ht_people_pleasing",name:"People pleasing",hook:"When saying no still feels impossible.",duration_minutes:20},{id:"ht_relationships",name:"Relationships",hook:"When the same fight keeps showing up.",duration_minutes:20},{id:"ht_confidence",name:"Confidence",hook:"When imposter syndrome will not quiet down.",duration_minutes:20},{id:"ht_fears",name:"Fears and phobias",hook:"For the freeze before the big moment.",duration_minutes:20},{id:"ht_anger",name:"Anger",hook:"When the reaction is bigger than the trigger.",duration_minutes:20},{id:"ht_procrastination",name:"Procrastination",hook:"For the task you cannot seem to start.",duration_minutes:20},{id:"ht_burnout",name:"Burnout",hook:"When nothing feels like it refills you.",duration_minutes:22}];function l(e,t){return Object.assign(new Error(t),{code:e})}function m(e){return(e?.backendUrl??y().backend_url).replace(/\/+$/,"")}async function L(e={}){let t=e.fetch??globalThis.fetch,r=m(e),o;try{o=await t(`${r}/api/v1/cli/auth/start`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{throw l("network_error",`could not reach ${r}`)}if(!o.ok)throw l("network_error",`failed to start sign-in (${o.status})`);let n=await o.json();return{device_code:n.device_code,user_code:n.user_code,verification_uri:n.verification_uri,verification_uri_complete:n.verification_uri_complete,interval:n.interval,expires_at:n.expires_at}}async function Q(e,t={}){let r=t.fetch??globalThis.fetch,o=t.setAuthToken??D,n=m(t),s;try{s=await r(`${n}/api/v1/cli/auth/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:e})})}catch{throw l("network_error",`could not reach ${n}`)}if(s.status===410)return{status:"expired"};if(!s.ok)throw l("network_error",`sign-in poll failed (${s.status})`);let i=await s.json();if(i.status==="authorized"&&i.token){await o(i.token);let a=await E({...t,getAuthToken:async()=>i.token}).catch(()=>({authenticated:!0,user_id:i.user_id,is_pro:!1,plan_type:"free"}));return a.first_name&&b(a.first_name),{status:"authorized",user_id:i.user_id,account:a}}return{status:"authorization_pending"}}async function E(e={}){let t=e.fetch??globalThis.fetch,r=e.getAuthToken??f,o=m(e),n=await r();if(!n)return{authenticated:!1,is_pro:!1,plan_type:"guest",quick_reset_quota:null};let s={Authorization:`Bearer ${n}`},[i,a,p]=await Promise.all([t(`${o}/api/v1/me`,{headers:s}).catch(()=>null),t(`${o}/api/v1/user/plan-status`,{headers:s}).catch(()=>null),t(`${o}/api/v1/quota/quick-reset`,{headers:s}).catch(()=>null)]);if(i?.status===401)return{authenticated:!1,is_pro:!1,plan_type:"guest",quick_reset_quota:null};let d=i?.ok?await i.json():null,u=a?.ok?await a.json():null,c=p?.ok?await p.json():null;d?.first_name&&b(d.first_name);let g=u?!u.is_quota_limited:c?.cap===-1;return{authenticated:!0,user_id:d?.user_id,first_name:d?.first_name??y().user_first_name??null,email:d?.email??null,is_pro:g,plan_type:u?.plan_type??(g?"pro":"free"),quick_reset_quota:c}}async function z(e,t={}){let r=t.fetch??globalThis.fetch,o=t.getAuthToken??f,n=m(t),s=y(),i=await o();if(!i)throw l("auth_required","Sign in with Flowe to run live Quick and Deep Resets.");let a=e.tier==="deep"?"hypnotherapy":"nsdr",p=e.voice??s.voice,d=e.ambient??"none",u;try{u=await r(`${n}/api/v1/sessions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({protocolId:a,sessionType:e.sessionType})})}catch{throw l("network_error","Network unreachable \u2014 try a local 30\u201390s micro-reset.")}if(!u.ok){let _=await u.json().catch(()=>({})),h=_?.error?.code,v=_?.error?.message??_?.message??`server error ${u.status}`;throw u.status===401?l("auth_required","Session expired \u2014 sign in to Flowe again."):u.status===403?l(h==="QUOTA_EXCEEDED"?"quota_exceeded":"subscription_required",v):l("network_error",v)}let c=await u.json(),g=`flowe://session/${c.session_id}`,T=`${n}/session/${c.session_id}`,S,k,w,A,C=[],R="waiting_for_join";if(e.startRoom!==!1)try{let _=await r(`${n}/api/v1/sessions/${encodeURIComponent(c.session_id)}/start`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({voiceId:p,ambient:d})});if(_.ok){let h=await _.json();S=h.room_name,k=h.livekit_url,w=h.livekit_token,A=h.current_phase,C=Array.isArray(h.phases)?h.phases:[],k&&w&&(R="live")}}catch{}let $=e.tier==="deep"?"Deep Reset":"Quick Reset";return{session_id:c.session_id,tier:e.tier,protocol_id:c.protocol_id??a,session_type:c.session_type??e.sessionType,session_type_name:c.session_type_name,estimated_duration:c.estimated_duration,voice:p,ambient:d,room_name:S,livekit_url:k,livekit_token:w,current_phase:A,phases:C,join_url:g,web_url:T,status:R,requires_microphone:e.tier==="deep",message_for_user:`${$}: ${c.session_type_name} (${c.estimated_duration} min) ready \xB7 ${T}`}}async function N(e,t={},r={}){let o=r.fetch??globalThis.fetch,n=r.getAuthToken??f,s=m(r),i=await n();if(!i)throw l("auth_required","Sign in with Flowe first.");let a={};if(typeof t.durationMinutes=="number"&&(a.durationMinutes=t.durationMinutes),typeof t.rating=="number"&&(a.userFeedback={rating:t.rating,comments:t.comments}),(await o(`${s}/api/v1/sessions/${encodeURIComponent(e)}/complete`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(a)})).ok){try{q()}catch{}return{completed:!0}}return{completed:!1}}async function U(e,t={}){let r=t.fetch??globalThis.fetch,o=t.getAuthToken??f,n=m(t),s=await o();if(!s)return{cancelled:!1};try{return{cancelled:(await r(`${n}/api/v1/sessions/${encodeURIComponent(e)}`,{method:"DELETE",headers:{Authorization:`Bearer ${s}`}})).ok}}catch{return{cancelled:!1}}}export{B as a,I as b,L as c,Q as d,E as e,z as f,N as g,U as h};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-3HG2U5YK.js";import"./chunk-EC5WRPZP.js";export{a as fetchMe,b as refreshUserFirstName};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h}from"./chunk-QVIYCUHZ.js";import"./chunk-EC5WRPZP.js";export{b as DEEP_RESET_CATALOG,a as QUICK_RESET_CATALOG,h as cancelLiveSession,g as completeLiveSession,f as createAndStartLiveSession,e as fetchAccountStatus,d as pollDeviceAuth,c as startDeviceAuth};