@nexlylab/widget 1.32.15 → 1.32.16

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.
Files changed (67) hide show
  1. package/dist/INSTALL.txt +1 -1
  2. package/dist/runtime/{1.32.15/chunks/ClickToLoadEmbed-CDdotCS8-W2yBrg7b.js → 1.32.16/chunks/ClickToLoadEmbed-CVZbpoTT-CKUzZ7gL.js} +2 -2
  3. package/dist/runtime/{1.32.15/chunks/PanelInfoVideo-BKn3ucAb-BrU-Qlul.js → 1.32.16/chunks/PanelInfoVideo-BKq2v0QM-BrU-Qlul.js} +1 -1
  4. package/dist/runtime/{1.32.15/chunks/assistant-link-components-MZWf5ty7-C44wlQAi.js → 1.32.16/chunks/assistant-link-components-DkuhHIF9-CPkAMFv6.js} +2 -2
  5. package/dist/runtime/{1.32.15/chunks/assistant-link-policy-DWaWTnGr-Cc-yj-a-.js → 1.32.16/chunks/assistant-link-policy-CS93s-vA-Cc-yj-a-.js} +1 -1
  6. package/dist/runtime/{1.32.15/chunks/block-rating-DH7mp-_R-CoiP5C2K.js → 1.32.16/chunks/block-rating-DGpoz2o3-CoiP5C2K.js} +1 -1
  7. package/dist/runtime/{1.32.15/chunks/external-url-LRu_ntew-CJQjg_od.js → 1.32.16/chunks/external-url-BzUbjdMo-CJQjg_od.js} +1 -1
  8. package/dist/runtime/{1.32.15/chunks/index-C1WD1dlq-Dm9kbc85.js → 1.32.16/chunks/index-6HKNPucI-Dm9kbc85.js} +1 -1
  9. package/dist/runtime/{1.32.15/chunks/index-Bu9Gh6Nc-BfWdQCT7.js → 1.32.16/chunks/index-BCtNBIxP-CcsFQ7Dx.js} +2 -2
  10. package/dist/runtime/{1.32.15/chunks/index-BD-jPdzs-ZRnEJoQe.js → 1.32.16/chunks/index-BIMK2_g0-ZRnEJoQe.js} +1 -1
  11. package/dist/runtime/{1.32.15/chunks/index-BSoCdILD-D6wzHiS0.js → 1.32.16/chunks/index-BJClDxSC-D6wzHiS0.js} +1 -1
  12. package/dist/runtime/{1.32.15/chunks/index-CNJUK2bK-C0OfCXUx.js → 1.32.16/chunks/index-BLT1bBjC-6c5Ar61I.js} +2 -2
  13. package/dist/runtime/{1.32.15/chunks/index-C6_8JGpJ-BqZmEVev.js → 1.32.16/chunks/index-BW-8QNI--BqZmEVev.js} +1 -1
  14. package/dist/runtime/{1.32.15/chunks/index-C75hX_dj-VhJcCfAC.js → 1.32.16/chunks/index-BncytMlP-VhJcCfAC.js} +1 -1
  15. package/dist/runtime/{1.32.15/chunks/index-k-jZV_MQ-H31PHMqm.js → 1.32.16/chunks/index-BoVToqY3-H31PHMqm.js} +1 -1
  16. package/dist/runtime/{1.32.15/chunks/index-B8aKMeg5-BLxOZxZv.js → 1.32.16/chunks/index-C5MpFJwF-BLxOZxZv.js} +1 -1
  17. package/dist/runtime/{1.32.15/chunks/index-Dh0aThiP-Aqz1AnQ5.js → 1.32.16/chunks/index-CISMnUXx-Aqz1AnQ5.js} +1 -1
  18. package/dist/runtime/{1.32.15/chunks/index-Dkv5YXXW-pkywvGDF.js → 1.32.16/chunks/index-CIe60p_E-pkywvGDF.js} +1 -1
  19. package/dist/runtime/{1.32.15/chunks/index-1o6W5wiJ-I68tb-d3.js → 1.32.16/chunks/index-CIgDHLEK-I68tb-d3.js} +1 -1
  20. package/dist/runtime/{1.32.15/chunks/index-DP_6HfDM-DAdxCQyi.js → 1.32.16/chunks/index-CUGV3nk2-DAdxCQyi.js} +1 -1
  21. package/dist/runtime/{1.32.15/chunks/index-DO0-ht8E-DUgMllqN.js → 1.32.16/chunks/index-CbGT4d5Q-DUgMllqN.js} +1 -1
  22. package/dist/runtime/{1.32.15/chunks/index-DTVlG27U-DP0QKkgf.js → 1.32.16/chunks/index-Cdmdsj1E-DP0QKkgf.js} +1 -1
  23. package/dist/runtime/{1.32.15/chunks/index-D-ZhVFzi-A3rpkVmQ.js → 1.32.16/chunks/index-Cf4eQF9g-mnUzfS1e.js} +2 -2
  24. package/dist/runtime/{1.32.15/chunks/index-CMFQhtEe-BcW8HKb8.js → 1.32.16/chunks/index-ChL-bSAN-BcW8HKb8.js} +1 -1
  25. package/dist/runtime/{1.32.15/chunks/index-qpVhJY7A-Cgivx3vY.js → 1.32.16/chunks/index-Chn4ATvZ-CSI6_0RJ.js} +2 -2
  26. package/dist/runtime/{1.32.15/chunks/index-Dt6OpItC-R_xuAEQV.js → 1.32.16/chunks/index-Cmt7uZiE-R_xuAEQV.js} +1 -1
  27. package/dist/runtime/{1.32.15/chunks/index-Czz6Gyh_-C3bBvEcm.js → 1.32.16/chunks/index-CogJkGmU-C3bBvEcm.js} +1 -1
  28. package/dist/runtime/1.32.16/chunks/index-CsoMgZU8-C1BzRUwZ.js +2 -0
  29. package/dist/runtime/{1.32.15/chunks/index-D72orqXX-C_0Ll4qr.js → 1.32.16/chunks/index-Cxwd1OKy-C_0Ll4qr.js} +1 -1
  30. package/dist/runtime/{1.32.15/chunks/index-BylVnv7X-DBhSkJ7i.js → 1.32.16/chunks/index-D-uANagm-DBhSkJ7i.js} +1 -1
  31. package/dist/runtime/{1.32.15/chunks/index-DDEE3QfX-3B-eE3K7.js → 1.32.16/chunks/index-DG-KS4AB-3B-eE3K7.js} +1 -1
  32. package/dist/runtime/{1.32.15/chunks/index-V1EfdiK7-bdo5pwX-.js → 1.32.16/chunks/index-DHdp5nGO-bdo5pwX-.js} +1 -1
  33. package/dist/runtime/{1.32.15/chunks/index-hHQjRGar-TEMHje2B.js → 1.32.16/chunks/index-DL04XhIK-TEMHje2B.js} +1 -1
  34. package/dist/runtime/{1.32.15/chunks/index-IW3aNe-y-W1lJrIDD.js → 1.32.16/chunks/index-DNwWHPWp-W1lJrIDD.js} +1 -1
  35. package/dist/runtime/{1.32.15/chunks/index-D9grn5WJ-Dp5AxBD4.js → 1.32.16/chunks/index-DO5eKOOB-Dp5AxBD4.js} +1 -1
  36. package/dist/runtime/{1.32.15/chunks/index-B9ozeox8-oy07dUaV.js → 1.32.16/chunks/index-Dc8zecP4-oy07dUaV.js} +1 -1
  37. package/dist/runtime/{1.32.15/chunks/index-csHaX5dv-BpgnWlB8.js → 1.32.16/chunks/index-DchTua3m-BpgnWlB8.js} +1 -1
  38. package/dist/runtime/{1.32.15/chunks/index-CmYYEi7N-Dr1V6OGz.js → 1.32.16/chunks/index-DdI8qMqt-Dr1V6OGz.js} +1 -1
  39. package/dist/runtime/{1.32.15/chunks/index-DphwDFW6-C9wFr7fa.js → 1.32.16/chunks/index-Dfcx_9km-C9wFr7fa.js} +1 -1
  40. package/dist/runtime/{1.32.15/chunks/index-Gi-3UOyp-DuzPeEIz.js → 1.32.16/chunks/index-DhYv8bbj-DGasnsaZ.js} +2 -2
  41. package/dist/runtime/{1.32.15/chunks/index-CqV8rHvG-DS9JaGVN.js → 1.32.16/chunks/index-Dtiss_wT-CLkn_6EY.js} +2 -2
  42. package/dist/runtime/{1.32.15/chunks/index-uM4Y0lxc-Dsa9X9U7.js → 1.32.16/chunks/index-MAmLiP1_-Dsa9X9U7.js} +1 -1
  43. package/dist/runtime/{1.32.15/chunks/index-Chy2Zmo5-CiRb-0NX.js → 1.32.16/chunks/index-Or6sA2eF-CiRb-0NX.js} +1 -1
  44. package/dist/runtime/{1.32.15/chunks/index-DPNGQF5b-_M0CWPEY.js → 1.32.16/chunks/index-PSL_6OT1-_M0CWPEY.js} +1 -1
  45. package/dist/runtime/{1.32.15/chunks/index-B1ef1IlE-QeFj7CR9.js → 1.32.16/chunks/index-SgPuWMUv-QeFj7CR9.js} +1 -1
  46. package/dist/runtime/{1.32.15/chunks/index-CwbUW6dx-BLBDoJCM.js → 1.32.16/chunks/index-fotohjEP-BLBDoJCM.js} +1 -1
  47. package/dist/runtime/{1.32.15/chunks/index-BnKOhYKk-CkemNrch.js → 1.32.16/chunks/index-pQ7fPgLl-JdphAk2-.js} +2 -2
  48. package/dist/runtime/{1.32.15/chunks/index-BvlAsO4n-DbuSZfeK.js → 1.32.16/chunks/index-svAzoy0Y-DbuSZfeK.js} +1 -1
  49. package/dist/runtime/{1.32.15/chunks/index-DZKtK9hT-DQBGsPwB.js → 1.32.16/chunks/index-tAu73-sK-DQBGsPwB.js} +1 -1
  50. package/dist/runtime/1.32.16/nexly.js +61 -0
  51. package/dist/v1.js +1 -1
  52. package/package.json +1 -1
  53. package/dist/runtime/1.32.15/chunks/index-BljIlfbh-D9I6jaso.js +0 -2
  54. package/dist/runtime/1.32.15/nexly.js +0 -61
  55. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
  56. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
  57. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
  58. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js +0 -0
  59. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
  60. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
  61. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
  62. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
  63. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
  64. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
  65. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index.modern-CioVZ357-BA5NTOmY.js +0 -0
  66. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
  67. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
package/dist/INSTALL.txt CHANGED
@@ -1,3 +1,3 @@
1
1
  Wklej przed </body>:
2
2
 
3
- <script src="https://cdn.jsdelivr.net/npm/@nexlylab/widget@1.32.15/dist/v1.js" data-api-key="pk_live_TWOJ_KLUCZ" defer></script>
3
+ <script src="https://cdn.jsdelivr.net/npm/@nexlylab/widget@1.32.16/dist/v1.js" data-api-key="pk_live_TWOJ_KLUCZ" defer></script>
@@ -1,2 +1,2 @@
1
- import{t as v,r as y,j as i}from"../nexly.js";import{L as $,N as j,l as N}from"./allowed-elements-BXnLJV1S-C-_lr2zm.js";import{a as m}from"./assistant-link-policy-DWaWTnGr-Cc-yj-a-.js";const k=["youtube.com","youtube-nocookie.com"],B=["youtu.be"],E=["vimeo.com"],f=/^[A-Za-z0-9_-]{6,32}$/,P=/^\d{6,12}$/;function S(n){return f.test(n)}const _=4;function w(n){const[t,e]=v(()=>new URL(n));return e||!t?null:t}function b(n,t){if(t){const r=n.pathname.split("/").filter(Boolean);if(r.length!==1)return null;const o=r[0];return f.test(o)?o:null}const e=n.pathname.split("/").filter(Boolean);if(e[0]==="watch"){const r=n.searchParams.get("v");return r&&f.test(r)?r:null}if(e[0]==="embed"||e[0]==="shorts"||e[0]==="v"){if(e.length!==2)return null;const r=e[1];return f.test(r)?r:null}return null}function z(n){const t=n.pathname.split("/").filter(Boolean),e=t[0]==="video"?t[1]:t[0];if(!e)return null;const r=t[0]==="video"?2:1;return t.length!==r?null:P.test(e)?e:null}function C(n){const t=w(n);if(!t||t.protocol!=="https:")return null;const e=t.hostname;if(m(e,B)){const r=b(t,!0);return r?{provider:"youtube",id:r}:null}if(m(e,k)){const r=b(t,!1);return r?{provider:"youtube",id:r}:null}if(m(e,E)){const r=z(t);return r?{provider:"vimeo",id:r}:null}return null}const F=/\.(png|jpe?g|gif|webp|avif|svg)$/i,L=/[;?#]|[\u0000-\u001F\u007F]/,R=5;function U(n){let t=n;for(let e=0;e<R;e++){if(!t.includes("%"))return t;const[r,o]=v(()=>decodeURIComponent(t));if(o||r===void 0)return null;if(r===t)return t;t=r}return null}function H(n,t){if(t.length===0)return null;const e=w(n);if(!e||e.protocol!=="https:"||!m(e.hostname,t)||e.search)return null;const r=U(e.pathname);return r===null||L.test(r)||!F.test(r)?null:(e.username="",e.password="",e.href)}function*x(n){if(n.children)for(const t of n.children)yield t,yield*x(t)}function T(n,t={}){const e=t.allowEmbeds===!0,r=t.allowedImageHosts??[],o={embeds:[],images:[]};if(!n||!e&&r.length===0)return o;const[p,h]=v(()=>$().use(j).use(N).parse(n));if(h||!p)return o;const c=[],s=[],d=new Set,a=new Set;for(const u of x(p)){if(e&&u.type==="link"&&c.length<_){const l=u.url?C(u.url):null;if(l){const g=`${l.provider}:${l.id}`;d.has(g)||(d.add(g),c.push(l))}continue}if(u.type==="image"&&s.length<_){const l=u.url?H(u.url,r):null;l&&!a.has(l)&&(a.add(l),s.push({src:l,alt:(u.alt??"").trim()}))}}return{embeds:c,images:s}}const I={youtube:"support_chat.media_provider_youtube",vimeo:"support_chat.media_provider_vimeo"};function M(n){return n.provider==="youtube"?S(n.id)?`https://www.youtube-nocookie.com/embed/${n.id}`:null:`https://player.vimeo.com/video/${n.id}`}function X({embed:n,t,classPrefix:e,posterUrl:r=null}){const[o,p]=y.useState(!1),[h,c]=y.useState(!1),s=t(I[n.provider]),d=M(n);if(!d)return null;if(o)return i.jsx("div",{className:`${e}__media-frame`,children:i.jsx("iframe",{src:d,title:t("support_chat.media_player_title",{provider:s}),sandbox:"allow-scripts allow-same-origin allow-presentation",referrerPolicy:"strict-origin-when-cross-origin",allow:"accelerometer; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0,loading:"lazy"})});const a=h?null:r;return i.jsxs("button",{type:"button",className:`${e}__media-tile${a?` ${e}__media-tile--poster`:""}`,onClick:()=>p(!0),"aria-label":t("support_chat.media_play_video",{provider:s}),children:[a&&i.jsx("img",{className:`${e}__media-poster`,src:a,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",onError:()=>c(!0)}),i.jsx("span",{className:`${e}__media-play`,"aria-hidden":"true",children:i.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:i.jsx("path",{d:"M8 5v14l11-7z"})})}),i.jsx("span",{className:`${e}__media-tile-label`,children:s})]})}export{S as F,X,T as j};
2
- //# sourceMappingURL=ClickToLoadEmbed-CDdotCS8-W2yBrg7b.js.map
1
+ import{t as v,r as y,j as i}from"../nexly.js";import{L as $,N as j,l as N}from"./allowed-elements-BXnLJV1S-C-_lr2zm.js";import{a as m}from"./assistant-link-policy-CS93s-vA-Cc-yj-a-.js";const k=["youtube.com","youtube-nocookie.com"],B=["youtu.be"],E=["vimeo.com"],f=/^[A-Za-z0-9_-]{6,32}$/,P=/^\d{6,12}$/;function S(n){return f.test(n)}const _=4;function w(n){const[t,e]=v(()=>new URL(n));return e||!t?null:t}function b(n,t){if(t){const r=n.pathname.split("/").filter(Boolean);if(r.length!==1)return null;const o=r[0];return f.test(o)?o:null}const e=n.pathname.split("/").filter(Boolean);if(e[0]==="watch"){const r=n.searchParams.get("v");return r&&f.test(r)?r:null}if(e[0]==="embed"||e[0]==="shorts"||e[0]==="v"){if(e.length!==2)return null;const r=e[1];return f.test(r)?r:null}return null}function z(n){const t=n.pathname.split("/").filter(Boolean),e=t[0]==="video"?t[1]:t[0];if(!e)return null;const r=t[0]==="video"?2:1;return t.length!==r?null:P.test(e)?e:null}function C(n){const t=w(n);if(!t||t.protocol!=="https:")return null;const e=t.hostname;if(m(e,B)){const r=b(t,!0);return r?{provider:"youtube",id:r}:null}if(m(e,k)){const r=b(t,!1);return r?{provider:"youtube",id:r}:null}if(m(e,E)){const r=z(t);return r?{provider:"vimeo",id:r}:null}return null}const F=/\.(png|jpe?g|gif|webp|avif|svg)$/i,L=/[;?#]|[\u0000-\u001F\u007F]/,R=5;function U(n){let t=n;for(let e=0;e<R;e++){if(!t.includes("%"))return t;const[r,o]=v(()=>decodeURIComponent(t));if(o||r===void 0)return null;if(r===t)return t;t=r}return null}function H(n,t){if(t.length===0)return null;const e=w(n);if(!e||e.protocol!=="https:"||!m(e.hostname,t)||e.search)return null;const r=U(e.pathname);return r===null||L.test(r)||!F.test(r)?null:(e.username="",e.password="",e.href)}function*x(n){if(n.children)for(const t of n.children)yield t,yield*x(t)}function T(n,t={}){const e=t.allowEmbeds===!0,r=t.allowedImageHosts??[],o={embeds:[],images:[]};if(!n||!e&&r.length===0)return o;const[p,h]=v(()=>$().use(j).use(N).parse(n));if(h||!p)return o;const c=[],s=[],d=new Set,a=new Set;for(const u of x(p)){if(e&&u.type==="link"&&c.length<_){const l=u.url?C(u.url):null;if(l){const g=`${l.provider}:${l.id}`;d.has(g)||(d.add(g),c.push(l))}continue}if(u.type==="image"&&s.length<_){const l=u.url?H(u.url,r):null;l&&!a.has(l)&&(a.add(l),s.push({src:l,alt:(u.alt??"").trim()}))}}return{embeds:c,images:s}}const I={youtube:"support_chat.media_provider_youtube",vimeo:"support_chat.media_provider_vimeo"};function M(n){return n.provider==="youtube"?S(n.id)?`https://www.youtube-nocookie.com/embed/${n.id}`:null:`https://player.vimeo.com/video/${n.id}`}function X({embed:n,t,classPrefix:e,posterUrl:r=null}){const[o,p]=y.useState(!1),[h,c]=y.useState(!1),s=t(I[n.provider]),d=M(n);if(!d)return null;if(o)return i.jsx("div",{className:`${e}__media-frame`,children:i.jsx("iframe",{src:d,title:t("support_chat.media_player_title",{provider:s}),sandbox:"allow-scripts allow-same-origin allow-presentation",referrerPolicy:"strict-origin-when-cross-origin",allow:"accelerometer; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0,loading:"lazy"})});const a=h?null:r;return i.jsxs("button",{type:"button",className:`${e}__media-tile${a?` ${e}__media-tile--poster`:""}`,onClick:()=>p(!0),"aria-label":t("support_chat.media_play_video",{provider:s}),children:[a&&i.jsx("img",{className:`${e}__media-poster`,src:a,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",onError:()=>c(!0)}),i.jsx("span",{className:`${e}__media-play`,"aria-hidden":"true",children:i.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:i.jsx("path",{d:"M8 5v14l11-7z"})})}),i.jsx("span",{className:`${e}__media-tile-label`,children:s})]})}export{S as F,X,T as j};
2
+ //# sourceMappingURL=ClickToLoadEmbed-CVZbpoTT-CKUzZ7gL.js.map
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js","nexly.js"])))=>i.map(i=>d[i]);
2
2
  import{r as o,j as n,_ as v,b as d}from"../nexly.js";function _(e,r,a){const[i,t]=o.useState(null);return o.useEffect(()=>{if(!a)return;let l=!1;async function s(){const[u,c]=await d(()=>fetch(`${r}/api/widget/panel-video?panel=${e}`,{headers:{"X-API-Key":a}}));if(l||c||!u.ok)return;const[p,f]=await d(()=>u.json());l||f||t(p)}return s(),()=>{l=!0}},[e,r,a]),i}const b=o.lazy(()=>v(()=>import("./PanelVideoOverlay-BY__oBYV-B8OPC1xh.js"),__vite__mapDeps([0,1])).then(e=>({default:e.PanelVideoOverlay})));function x({panelKey:e,baseUrl:r,apiKey:a,t:i}){const t=_(e,r,a),[l,s]=o.useState(!1);if(!t?.enabled||!t.videoUrl)return null;const u=t.videoUrl,c=t.contentType??"video/mp4";return n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"es-panel-video-btn","aria-label":i("panel_video.info_button"),title:i("panel_video.info_button"),onClick:()=>s(!0),"data-testid":"panel-video-info-button",children:n.jsx("span",{"aria-hidden":"true",children:"i"})}),l&&n.jsx(o.Suspense,{fallback:null,children:n.jsx(b,{videoUrl:u,contentType:c,onClose:()=>s(!1),t:i})})]})}export{x as j};
3
- //# sourceMappingURL=PanelInfoVideo-BKn3ucAb-BrU-Qlul.js.map
3
+ //# sourceMappingURL=PanelInfoVideo-BKq2v0QM-BrU-Qlul.js.map
@@ -1,2 +1,2 @@
1
- import{j as r}from"../nexly.js";import{u as s}from"./assistant-link-policy-DWaWTnGr-Cc-yj-a-.js";function c(o={}){const n=o.allowedHosts??[];return{a:({href:e,title:l,children:t})=>{const i=r.jsx(r.Fragment,{children:t});return s(e,n)?r.jsx("a",{href:e,title:l,target:"_blank",rel:"noopener noreferrer nofollow",children:t}):i}}}export{c as f};
2
- //# sourceMappingURL=assistant-link-components-MZWf5ty7-C44wlQAi.js.map
1
+ import{j as r}from"../nexly.js";import{u as s}from"./assistant-link-policy-CS93s-vA-Cc-yj-a-.js";function c(o={}){const n=o.allowedHosts??[];return{a:({href:e,title:l,children:t})=>{const i=r.jsx(r.Fragment,{children:t});return s(e,n)?r.jsx("a",{href:e,title:l,target:"_blank",rel:"noopener noreferrer nofollow",children:t}):i}}}export{c as f};
2
+ //# sourceMappingURL=assistant-link-components-DkuhHIF9-CPkAMFv6.js.map
@@ -1,2 +1,2 @@
1
1
  import{t as l}from"../nexly.js";function i(r){const e=r.trim().toLowerCase().replace(/^\.+|\.+$/g,"");return e==="*"?"":e}function a(r,e){const t=r.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;for(const s of e){const n=i(s);if(n&&(t===n||t.endsWith(`.${n}`)))return!0}return!1}function u(r,e){if(!r||e.length===0)return!1;const[t,s]=l(()=>new URL(r));if(s||!t)return!1;if(t.protocol==="http:"||t.protocol==="https:")return a(t.hostname,e);if(t.protocol==="mailto:"){const n=t.pathname.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.every(o=>{const f=o.lastIndexOf("@");return f===-1?!1:a(o.slice(f+1),e)})}return!1}export{a,u};
2
- //# sourceMappingURL=assistant-link-policy-DWaWTnGr-Cc-yj-a-.js.map
2
+ //# sourceMappingURL=assistant-link-policy-CS93s-vA-Cc-yj-a-.js.map
@@ -1,2 +1,2 @@
1
1
  import{r,j as a,b as X}from"../nexly.js";const de=240,R=30,ue=n=>n<=3?"low":"high",pe=n=>`block_feedback.chip.${n}`;Object.fromEntries([{key:"numbers_wrong",labelEn:"The numbers look wrong"},{key:"too_generic",labelEn:"Too generic"},{key:"hard_to_understand",labelEn:"Hard to understand"},{key:"not_relevant",labelEn:"Not relevant to me"},{key:"accurate",labelEn:"Accurate numbers"},{key:"clear",labelEn:"Clear and easy to follow"},{key:"actionable",labelEn:"I know what to do next"},{key:"saves_time",labelEn:"Saves me time"},{key:"not_my_situation",labelEn:"Doesn't fit my situation"},{key:"where_to_start",labelEn:"Don't know where to start"},{key:"concrete_steps",labelEn:"Concrete steps"},{key:"matches_my_data",labelEn:"Matches my data"},{key:"motivating",labelEn:"Motivates me to act"},{key:"data_stale",labelEn:"Data looks outdated"},{key:"dashboard_mismatch",labelEn:"Differs from my dashboard"},{key:"threshold_unclear",labelEn:"The threshold isn't clear"},{key:"no_next_step",labelEn:"No hint what to do next"},{key:"warned_in_time",labelEn:"Warned me in time"},{key:"clear_threshold",labelEn:"Clear threshold and deadline"},{key:"branch_detail",labelEn:"Not enough branch detail"},{key:"how_to_use",labelEn:"Not sure how to use this"},{key:"comparison_weak",labelEn:"Comparison not helpful"},{key:"see_growth",labelEn:"I can see where my team grows"},{key:"recognize_team",labelEn:"Helps me recognize my team"},{key:"week_over_week",labelEn:"Useful week-over-week view"},{key:"payout_mismatch",labelEn:"Doesn't match my payout"},{key:"assumptions_unclear",labelEn:"Assumptions aren't clear"},{key:"no_what_if",labelEn:"No what-if scenarios"},{key:"currency_unclear",labelEn:"Currency or rate unclear"},{key:"matches_payout",labelEn:"Matches my payout"},{key:"helps_planning",labelEn:"Helps me plan the cycle"},{key:"too_late",labelEn:"Came too late"},{key:"no_context",labelEn:"Not enough context"},{key:"other_topics",labelEn:"I'd prefer other topics"},{key:"spot_on",labelEn:"Spot-on topic"},{key:"learned",labelEn:"I learned something"},{key:"on_time",labelEn:"Right on time"},{key:"want_to_join",labelEn:"Makes me want to join in"},{key:"needs_example",labelEn:"No example"},{key:"too_long",labelEn:"Too long"},{key:"bad_formatting",labelEn:"Badly formatted"},{key:"good_example",labelEn:"Good example"}].map(n=>[n.key,n]));const he={low:["numbers_wrong","too_generic","hard_to_understand","not_relevant"],high:["accurate","clear","actionable","saves_time"]},q={low:["payout_mismatch","assumptions_unclear","no_what_if","currency_unclear"],high:["matches_payout","helps_planning","clear","accurate"]},be={"daily-action-plan":{low:["not_my_situation","numbers_wrong","too_generic","where_to_start"],high:["concrete_steps","matches_my_data","saves_time","motivating"]},"rank-advancement-roadmap":{low:["data_stale","dashboard_mismatch","threshold_unclear","no_next_step"],high:["warned_in_time","clear_threshold","actionable","accurate"]},"network-growth":{low:["branch_detail","data_stale","how_to_use","comparison_weak"],high:["see_growth","recognize_team","week_over_week","motivating"]},"mlm-calculator":q,"commission-forecast":q,"social-insights":{low:["not_relevant","too_late","no_context","other_topics"],high:["spot_on","learned","on_time","want_to_join"]},learning:{low:["hard_to_understand","needs_example","too_long","bad_formatting"],high:["clear","good_example","learned","actionable"]}};function me(n,o){return(be[n]??he)[ue(o)]}function Q(n){const o=n.trim().match(/\S+/g);return o?o.length:0}const ye=[1,2,3,4,5],M=96,_e=20;function fe(n){let o=n.slice(0,de);if(Q(o)>R){let c=0,d=0,p=!1;for(;d<o.length;){const _=/\s/.test(o.charAt(d));if(!_&&!p&&(c++,p=!0,c>R))break;_&&(p=!1),d++}o=o.slice(0,d).trimEnd()}return o}function ge({promptLogId:n,blockSlug:o,sectionKey:c,subjectType:d,subjectId:p,ariaKey:_,onRated:Z,onFeedbackCycleDone:z,settleInPlace:v=!1,baseUrl:H,apiKey:F,jwt:K,t:l,promptKey:ee,compact:s=!1,className:te,previewMode:L=!1}){const[m,E]=r.useState(null),[ae,j]=r.useState(!1),[$,S]=r.useState(null),[f,k]=r.useState("none"),i=f==="settled",[g,A]=r.useState([]),[C,O]=r.useState(""),[oe,B]=r.useState(!1),N=r.useRef(null),T=r.useRef(z);T.current=z;const w=r.useRef(!1),P=r.useRef(!1);r.useEffect(()=>()=>{P.current&&!w.current&&(w.current=!0,T.current?.())},[]),r.useEffect(()=>{if(!(f!=="done"||v))return N.current=setTimeout(()=>{E(null),S(null),A([]),O(""),k("none"),w.current||(w.current=!0,T.current?.())},2500),()=>{N.current&&clearTimeout(N.current)}},[f,v]);const h=n?"ai":o?"block":null;if(!h||!K)return null;const ne=ee??(s?"block_rating.prompt_section":"block_rating.prompt"),u=m!==null||ae,W=m??0,re=!u&&$!==null?$:W,U=s?15:18,J=d&&p?{subjectType:d,subjectId:p}:{},Y={"Content-Type":"application/json",...F?{"X-API-Key":F}:{},Authorization:`Bearer ${K}`},le=async e=>{if(u)return;if(L){E(e),k(h==="block"?"chips":"done");return}j(!0);const t=h==="ai"?"/api/widget/ai-feedback":"/api/widget/block-feedback",b=h==="ai"?{promptLogId:n,rating:e}:{blockSlug:o,rating:e,...c?{sectionKey:c}:{},...J},[y,ce]=await X(fetch(`${H}${t}`,{method:"POST",headers:Y,body:JSON.stringify(b)}));if(ce){j(!1);return}(y.ok||y.status===409)&&(E(e),k(h==="block"&&y.ok?"chips":"done"),P.current=!0,Z?.()),j(!1)},I=()=>k(v?"settled":"done"),se=e=>A(t=>t.includes(e)?t.filter(b=>b!==e):[...t,e]),ie=e=>{O(fe(e.target.value));const t=e.target;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,M)}px`,t.style.overflowY=t.scrollHeight>M?"auto":"hidden"},D=Q(C),x=!oe&&!i&&(g.length>0||D>0),G=async()=>{if(!x)return;if(L){I();return}B(!0);const e=C.trim(),t={blockSlug:o,...c?{sectionKey:c}:{},...J,...g.length?{categories:g}:{},...e?{feedback:e}:{}},[b,y]=await X(fetch(`${H}/api/widget/block-feedback`,{method:"PUT",headers:Y,body:JSON.stringify(t)}));if(y){B(!1);return}(b.ok||b.status===404)&&I(),B(!1)},V=(f==="chips"||i)&&h==="block"&&m!==null&&o?me(o,m):[];return a.jsxs("div",{className:["es-block__rating",s?"es-block__rating--compact":"",te].filter(Boolean).join(" "),"data-es-no-read":!0,style:{display:"flex",alignItems:"center",gap:s?6:8,flexWrap:"wrap",...s?{marginTop:10,paddingTop:8,borderTop:"1px solid var(--es-color-border, rgba(0, 0, 0, 0.1))"}:{marginBottom:12}},children:[a.jsx("span",{className:"es-block__rating-label",style:{fontSize:s?12:13,color:"var(--es-color-on-surface-muted, #4B5563)"},children:l(m?"support_chat.feedback_thanks":ne)}),a.jsx("div",{className:"es-block__rating-stars",role:"radiogroup","aria-label":l(_??"support_chat.rate_aria"),style:{display:"inline-flex",alignItems:"center",gap:4},onMouseLeave:()=>!u&&S(null),children:ye.map(e=>{const t=e<=re;return a.jsx("button",{type:"button",role:"radio","aria-checked":e===W,"aria-label":l("support_chat.rate_star",{count:e}),disabled:u,onMouseEnter:()=>!u&&S(e),onClick:()=>le(e),style:{background:"none",border:"none",padding:0,cursor:u?"default":"pointer",lineHeight:0,color:"var(--es-color-warning, #9C5300)",opacity:u&&!t?.4:1,transition:"opacity 150ms ease-out"},children:a.jsx("svg",{width:U,height:U,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{display:"block"},children:a.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})},e)})}),V.length>0&&a.jsxs("div",{className:"es-block__rating-followup",style:{flexBasis:"100%",display:"flex",flexDirection:"column",gap:6,marginTop:2},children:[a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:V.map(e=>{const t=g.includes(e);return a.jsx("button",{type:"button","aria-pressed":t,disabled:i,onClick:()=>se(e),style:{font:"inherit",fontSize:s?11.5:12,fontWeight:t?600:400,padding:"3px 10px",borderRadius:999,cursor:i?"default":"pointer",border:t?"1px solid var(--es-color-primary, #2563EB)":"1px solid var(--es-color-control-border, #6B7280)",background:t?"var(--es-color-primary-muted, rgba(37, 99, 235, 0.08))":"var(--es-color-surface-elevated, #f5f5f5)",color:t?"var(--es-color-primary-on-muted, #1D4ED8)":"var(--es-color-on-surface-muted, #4B5563)",transition:"border-color 120ms ease, color 120ms ease"},children:l(pe(e))},e)})}),a.jsxs("div",{style:{display:"flex",gap:6,alignItems:"flex-end"},children:[a.jsx("textarea",{rows:1,value:C,disabled:i,onChange:ie,onKeyDown:e=>{e.key==="Enter"&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),G())},placeholder:l("block_feedback.own_words"),"aria-label":l("block_feedback.input_aria"),style:{flex:1,resize:"none",font:"inherit",fontSize:s?12:13,lineHeight:1.45,padding:"6px 10px",borderRadius:10,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",minHeight:32,maxHeight:M,overflowY:"hidden"}}),a.jsx("button",{type:"button","aria-label":l("block_feedback.send_aria"),disabled:!x,onClick:()=>{G()},style:{border:"none",borderRadius:10,width:32,height:32,flex:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:x?"pointer":"default",background:"var(--es-color-primary, #2563EB)",color:"var(--es-color-on-primary, #FFFFFF)",opacity:x?1:.35,transition:"opacity 150ms ease-out"},children:a.jsxs("svg",{width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{display:"block"},children:[a.jsx("path",{d:"M22 2 11 13"}),a.jsx("path",{d:"M22 2 15 22l-4-9-9-4 20-7z"})]})})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[a.jsx("span",{"aria-live":"polite","data-es-no-read":!0,style:{fontSize:11,fontVariantNumeric:"tabular-nums",color:"var(--es-color-on-surface-muted, #4B5563)",visibility:D>=_e?"visible":"hidden"},children:l("block_feedback.counter",{count:D,max:R})}),a.jsx("button",{type:"button",disabled:i,onClick:I,style:{background:"none",border:"none",padding:0,font:"inherit",fontSize:11,cursor:i?"default":"pointer",color:"var(--es-color-on-surface-muted, #4B5563)",visibility:i?"hidden":"visible"},children:l("block_feedback.skip")})]})]})]})}export{ge as C};
2
- //# sourceMappingURL=block-rating-DH7mp-_R-CoiP5C2K.js.map
2
+ //# sourceMappingURL=block-rating-DGpoz2o3-CoiP5C2K.js.map
@@ -1,2 +1,2 @@
1
1
  import{t as r}from"../nexly.js";import{a as u}from"./allowed-elements-BXnLJV1S-C-_lr2zm.js";const p=["https://external-url-probe.invalid/probe","http://external-url-probe.invalid/probe"];function i(t){return t.length>0&&!/^\.+$/.test(t)}function o(t){if(typeof t!="string"||t.length===0||u(t)===null)return null;const[n]=r(()=>new URL(t));return n===null||n.protocol!=="http:"&&n.protocol!=="https:"||!p.every(l=>{const[e]=r(()=>new URL(t,l));return e!==null&&e.href===n.href})||!i(n.hostname)?null:n}function f(t){return o(t)?.href??null}function h(t){return o(t)?.host??""}export{h as c,f as p};
2
- //# sourceMappingURL=external-url-LRu_ntew-CJQjg_od.js.map
2
+ //# sourceMappingURL=external-url-BzUbjdMo-CJQjg_od.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as u,j as e,Q as c,o as j}from"../nexly.js";const f={slug:"recognition-milestone-hub",name:"Recognition & Milestone Hub",version:"1.0.0",category:"interactive",requiredService:"recognition-milestone-hub",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"recognition-milestone-hub",inputSchema:{type:"object",properties:{latestAchievement:{type:"object",properties:{badge:{type:"string"},label:{type:"string"},date:{type:"string"}}},nextMilestone:{type:"object",properties:{label:{type:"string"},progressPercent:{type:"number"}}},achievementHistory:{type:"array",items:{type:"object",properties:{badge:{type:"string"},label:{type:"string"},date:{type:"string"}}}},milestoneTimeline:{type:"array",items:{type:"object",properties:{label:{type:"string"},achieved:{type:"boolean"},date:{type:"string"}}}},celebrationMessage:{type:"string"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",latestAchievement:{badge:"🥇",label:"First Sale Achieved",date:"2026-04-04"},nextMilestone:{label:"Silver Rank",progressPercent:68},celebrationMessage:"Amazing work hitting your first sale! You're already 68% of the way to Silver Rank. Focus on 2 more referrals this week to cross the threshold.",achievementHistory:[{badge:"🥇",label:"First Sale Achieved",date:"2026-04-04"},{badge:"🚀",label:"Team of 3 Built",date:"2026-03-28"},{badge:"⭐",label:"Profile Completed",date:"2026-03-20"}],milestoneTimeline:[{label:"Bronze Rank",achieved:!0,date:"2026-03-20"},{label:"Silver Rank",achieved:!1},{label:"Gold Rank",achieved:!1},{label:"Platinum Rank",achieved:!1}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — badge + next milestone card",value:"basic"},{label:"Pro — full history, timeline & AI celebration",value:"pro"}],group:"Display"}],events:{emits:[{name:"rmh:achievementCopied",description:"User copied an achievement to clipboard"}],listens:[{name:"rmh:refresh",description:"Force refresh recognition data"}]}};function k({data:i,config:g,actions:y,metadata:x,i18n:v}){const a=v?.t??(s=>s),o=g.mode??i.mode??"basic",r=i.latestAchievement,l=i.nextMilestone,m=i.achievementHistory??[],h=i.milestoneTimeline??[],d=i.celebrationMessage,[p,_]=u.useState("idle");if(!r&&!i.error)return e.jsx(c,{blockType:"recognition-milestone-hub",children:e.jsx("div",{className:"es-block__body es-rmh__body",children:e.jsxs("div",{className:"es-rmh__hero",style:{opacity:.5},children:[e.jsx("div",{className:"es-rmh__badge-circle","aria-hidden":"true",children:"🏆"}),e.jsxs("div",{className:"es-rmh__hero-info",children:[e.jsx("span",{className:"es-rmh__hero-eyebrow",children:a("recognition.title")}),e.jsx("span",{className:"es-rmh__hero-label",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:x?.dataQuality==="none"?a("recognition.signin_prompt"):a("recognition.empty")})]})]})})});if(i.error)return e.jsx(c,{blockType:"recognition-milestone-hub",error:j(i.error)});const n=Math.min(100,Math.max(0,l?.progressPercent??0));async function b(s){const t=`${s.badge} ${s.label} — ${s.date}`;try{await navigator.clipboard.writeText(t),_("copied"),y.emit("rmh:achievementCopied",{label:s.label}),setTimeout(()=>_("idle"),2e3)}catch{}}return e.jsx(c,{blockType:"recognition-milestone-hub",children:e.jsxs("div",{className:"es-block__body es-rmh__body",children:[r&&e.jsxs("div",{className:"es-rmh__hero",children:[e.jsx("div",{className:"es-rmh__badge-circle","aria-hidden":"true",children:r.badge}),e.jsxs("div",{className:"es-rmh__hero-info",children:[e.jsx("span",{className:"es-rmh__hero-eyebrow",children:a("recognition.latest_achievement")}),e.jsx("span",{className:"es-rmh__hero-label",children:r.label}),e.jsx("span",{className:"es-rmh__hero-date",children:r.date})]}),e.jsx("button",{className:`es-rmh__copy-btn${p==="copied"?" es-rmh__copy-btn--copied":""}`,onClick:()=>b(r),"aria-label":a("recognition.copy_achievement_aria"),title:a("common.copy_to_clipboard"),children:p==="copied"?"✓":"⎘"})]}),l&&e.jsxs("div",{className:"es-rmh__next-milestone",children:[e.jsxs("div",{className:"es-rmh__next-header",children:[e.jsx("span",{className:"es-rmh__next-eyebrow",children:a("recognition.next_milestone")}),e.jsxs("span",{className:"es-rmh__next-percent",children:[n,"%"]})]}),e.jsx("span",{className:"es-rmh__next-label",children:l.label}),e.jsx("div",{className:"es-rmh__progress-bar",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a("recognition.milestone_progress_aria",{percent:n,label:l.label}),children:e.jsx("div",{className:"es-rmh__progress-fill",style:{width:`${n}%`}})})]}),o==="pro"&&d&&e.jsxs("div",{className:"es-rmh__celebration",children:[e.jsx("span",{className:"es-rmh__celebration-label",children:a("recognition.ai_coach_label")}),e.jsx("p",{className:"es-rmh__celebration-text",children:d})]}),o==="pro"&&m.length>0&&e.jsxs("div",{className:"es-rmh__section",children:[e.jsx("h3",{className:"es-rmh__section-title",children:a("recognition.achievement_history")}),e.jsx("ul",{className:"es-rmh__history-list",role:"list",children:m.map((s,t)=>e.jsxs("li",{className:"es-rmh__history-item",children:[e.jsx("span",{className:"es-rmh__history-badge","aria-hidden":"true",children:s.badge}),e.jsx("span",{className:"es-rmh__history-label",children:s.label}),e.jsx("span",{className:"es-rmh__history-date",children:s.date}),e.jsx("button",{className:"es-rmh__history-copy",onClick:()=>b(s),"aria-label":a("recognition.copy_item_aria",{label:s.label}),title:a("common.copy_to_clipboard"),children:"⎘"})]},t))})]}),o==="pro"&&h.length>0&&e.jsxs("div",{className:"es-rmh__section",children:[e.jsx("h3",{className:"es-rmh__section-title",children:a("recognition.milestone_timeline")}),e.jsx("ol",{className:"es-rmh__timeline","aria-label":a("recognition.milestone_progression_aria"),children:h.map((s,t)=>e.jsxs("li",{className:`es-rmh__timeline-item${s.achieved?" es-rmh__timeline-item--achieved":""}`,children:[e.jsx("span",{className:"es-rmh__timeline-dot","aria-hidden":"true",children:s.achieved?"✓":"○"}),e.jsx("span",{className:"es-rmh__timeline-label",children:s.label}),s.date&&e.jsx("span",{className:"es-rmh__timeline-date",children:s.date})]},t))})]})]})})}export{k as Component,f as manifest};
2
- //# sourceMappingURL=index-C1WD1dlq-Dm9kbc85.js.map
2
+ //# sourceMappingURL=index-6HKNPucI-Dm9kbc85.js.map
@@ -1,2 +1,2 @@
1
- import{r as g,j as a,Q as B}from"../nexly.js";import{C as K}from"./block-rating-DH7mp-_R-CoiP5C2K.js";import{m as L}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const v=["G-Miner","Miner","Developer","Team Leader","Manager","Senior Manager","Vice President","President","Chairman"],F={"G-Miner":0,Miner:2,Developer:4,"Team Leader":6,Manager:7,"Senior Manager":8,"Vice President":9,President:10,Chairman:15},W={"G-Miner":0,Miner:2,Developer:4,"Team Leader":6,Manager:8,"Senior Manager":9,"Vice President":10,President:11,Chairman:12},A={"G-Miner":50,Miner:50,Developer:50,"Team Leader":50,Manager:50,"Senior Manager":50,"Vice President":50,President:50,Chairman:75},X=.1,I=50,O=150,Q=5,R=1,$=10,U=5e4,z=100,H=7,q=30,S={paidRank:"Miner",scp1Cycles:1,scp1PerCycle:100,scp2Cycles:1,scp2PerCycle:5,scp3DirectSales:500};function E(e){return typeof e=="string"&&v.includes(e)}function G(e,d){const c=F[d];return!Number.isFinite(e)||e<0?0:Math.min(e,c)}function J(e,d){const c=A[d];return!Number.isFinite(e)||e<0?0:Math.min(e,c)}function Y(e){const d=e.paidRank==="G-Miner",c=d?0:Math.max(0,e.scp1Cycles)*Math.max(0,e.scp1PerCycle),s=d?0:Math.max(0,e.scp2Cycles)*Math.max(0,e.scp2PerCycle),m=Math.round(Math.max(0,e.scp3DirectSales)*X),o=c+s+m,x=o*H,l=o*q;return{scp1Daily:c,scp2Daily:s,scp3Daily:m,totalDaily:o,totalWeekly:x,totalMonthly:l}}function Z(e,d){const c=d.currentPayoutRank,s=e.defaultPaidRank,m=E(c)?c:E(s)?s:v[0],o=e.defaultScp2PerCycle,x=typeof o=="number"&&Number.isFinite(o)?Math.min($,Math.max(R,o)):S.scp2PerCycle;return{...S,paidRank:m,scp1Cycles:G(S.scp1Cycles,m),scp2PerCycle:x}}function p(e,d,c){return`${c}${new Intl.NumberFormat(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}`}function N({id:e,label:d,value:c,min:s,max:m,step:o,unit:x,currencySymbol:l,locale:n,disabled:b,onChange:i}){const C=x==="$"?p(c,n,l):c.toLocaleString(n),u=x==="$"?p(s,n,l):String(s),t=x==="$"?p(m,n,l):String(m);return a.jsxs("div",{className:`mlmcalc-slider-row${b?" mlmcalc-slider-row--disabled":""}`,children:[a.jsxs("div",{className:"mlmcalc-slider-header",children:[a.jsx("label",{className:"mlmcalc-slider-label",htmlFor:e,children:d}),a.jsx("span",{className:"mlmcalc-slider-value",children:C})]}),a.jsx("input",{id:e,type:"range",className:"mlmcalc-slider",min:s,max:m,step:o,value:c,disabled:b,onChange:h=>i(Number(h.target.value)),onPointerDown:h=>{if(b)return;const k=h.currentTarget.getBoundingClientRect(),f=h.clientX-k.left,M=m-s;if(M<=0)return;const _=(c-s)/M*k.width;if(Math.abs(f-_)<=12)return;const j=Math.max(0,Math.min(1,f/k.width)),D=s+j*M,P=Math.max(s,Math.min(m,Math.round((D-s)/o)*o+s));let r=P;if(P===c){const y=f>_?1:-1;r=Math.max(s,Math.min(m,c+y*o))}r!==c&&(h.preventDefault(),i(r))},style:{"--mlmcalc-fill":`${m>s?(c-s)/(m-s)*100:0}%`}}),a.jsxs("div",{className:"mlmcalc-slider-bounds",children:[a.jsx("span",{children:u}),a.jsx("span",{children:t})]})]})}function ca({data:e,config:d,i18n:c,baseUrl:s,externalContext:m,auth:o,previewMode:x}){const l=c?.t??(r=>r),n=c?.currentLanguage??"en",b=g.useMemo(()=>Z(d,e),[d,e]),[i,C]=g.useState(b),u=g.useMemo(()=>Y(i),[i]),t=l("mlm_calculator.currency_symbol"),h=i.paidRank==="G-Miner",k=F[i.paidRank],f=A[i.paidRank],M=W[i.paidRank],_=g.useCallback(r=>{C(y=>({...y,paidRank:r,scp1Cycles:G(y.scp1Cycles,r),scp2Cycles:J(y.scp2Cycles,r)}))},[]),j=g.useCallback(r=>y=>{C(w=>({...w,[r]:y}))},[]),D=g.useCallback(()=>{C(b)},[b]),P=v.indexOf(i.paidRank);return a.jsx(B,{blockType:"mlm-calculator",children:a.jsxs("div",{className:"es-block__body",children:[a.jsx(K,{blockSlug:"mlm-calculator",baseUrl:s,apiKey:m?.apiKey,jwt:o?.jwt,previewMode:x,t:l,promptKey:"block_rating.prompt_calculator"}),a.jsxs("div",{className:"mlmcalc-block","aria-label":l("mlm_calculator.aria_label"),children:[a.jsx("div",{className:"mlmcalc-title",children:l("mlm_calculator.title")}),a.jsxs("div",{className:"mlmcalc-rank-bar",children:[a.jsx("span",{className:"mlmcalc-rank-label",children:l("mlm_calculator.paid_rank")}),a.jsx("div",{className:"mlmcalc-rank-track",role:"radiogroup","aria-label":l("mlm_calculator.paid_rank"),children:v.map((r,y)=>{const w=r===i.paidRank,T=y<=P,V=["mlmcalc-rank-node",y%2===0?"mlmcalc-rank-node--above":"mlmcalc-rank-node--below",w?"mlmcalc-rank-node--active":"",T?"mlmcalc-rank-node--past":""].filter(Boolean).join(" ");return a.jsxs("button",{type:"button",role:"radio","aria-checked":w,"aria-label":L(r,l),className:V,onClick:()=>_(r),children:[a.jsx("span",{className:"mlmcalc-rank-dot","aria-hidden":"true"}),a.jsx("span",{className:"mlmcalc-rank-name",children:L(r,l)})]},r)})})]}),a.jsxs("div",{className:"mlmcalc-earnings-grid",children:[a.jsxs("div",{className:"mlmcalc-earnings-card",children:[a.jsx("span",{className:"mlmcalc-earnings-label",children:l("mlm_calculator.weekly")}),a.jsx("span",{className:"mlmcalc-earnings-amount",children:p(u.totalWeekly,n,t)})]}),a.jsxs("div",{className:"mlmcalc-earnings-card",children:[a.jsx("span",{className:"mlmcalc-earnings-label",children:l("mlm_calculator.monthly")}),a.jsx("span",{className:"mlmcalc-earnings-amount mlmcalc-earnings-amount--monthly",children:p(u.totalMonthly,n,t)})]})]}),h&&a.jsx("div",{className:"mlmcalc-warning",role:"alert",children:l("mlm_calculator.warning.g_miner")}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp1.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp1Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp1-cycles",label:l("mlm_calculator.scp1.cycles"),value:i.scp1Cycles,min:0,max:k,step:1,unit:"",currencySymbol:t,locale:n,disabled:h,onChange:j("scp1Cycles")}),a.jsx(N,{id:"mlmcalc-scp1-per-cycle",label:l("mlm_calculator.scp1.per_cycle"),value:i.scp1PerCycle,min:I,max:O,step:Q,unit:"$",currencySymbol:t,locale:n,disabled:h,onChange:j("scp1PerCycle")})]}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp2.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp2Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp2-cycles",label:l("mlm_calculator.scp2.cycles",{levels:M}),value:i.scp2Cycles,min:0,max:f,step:1,unit:"",currencySymbol:t,locale:n,disabled:h,onChange:j("scp2Cycles")}),a.jsx(N,{id:"mlmcalc-scp2-per-cycle",label:l("mlm_calculator.scp2.per_cycle"),value:i.scp2PerCycle,min:R,max:$,step:1,unit:"$",currencySymbol:t,locale:n,disabled:h,onChange:j("scp2PerCycle")})]}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp3.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp3Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp3-sales",label:l("mlm_calculator.scp3.daily_sales"),value:i.scp3DirectSales,min:0,max:U,step:z,unit:"$",currencySymbol:t,locale:n,onChange:j("scp3DirectSales")})]}),a.jsxs("div",{className:"mlmcalc-breakdown",children:[a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp1")}),a.jsx("span",{children:p(u.scp1Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp2")}),a.jsx("span",{children:p(u.scp2Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp3")}),a.jsx("span",{children:p(u.scp3Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row mlmcalc-breakdown-row--total",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.total")}),a.jsx("span",{children:p(u.totalDaily,n,t)})]})]}),a.jsx("div",{className:"mlmcalc-actions",children:a.jsx("button",{type:"button",className:"mlmcalc-reset",onClick:D,children:l("mlm_calculator.reset")})}),a.jsx("p",{className:"mlmcalc-disclaimer",children:l("mlm_calculator.disclaimer")})]})]})})}const sa={slug:"mlm-calculator",name:"MLM Commission Calculator",version:"2.0.0",category:"interactive",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},defaultPaidRank:{type:"string",default:"Miner"},defaultScp2PerCycle:{type:"number",default:5}}},defaultConfig:{readAloudEnabled:!1,defaultPaidRank:"Miner",defaultScp2PerCycle:5},sizing:{minWidth:300,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"defaultPaidRank",type:"select",label:"Default paid rank",default:"Miner",options:v.map(e=>({label:e,value:e})),group:"Defaults"},{id:"defaultScp2PerCycle",type:"number",label:"Default SCP2 per-cycle amount",default:5,min:R,max:$,group:"Defaults"}],events:{}};export{ca as Component,ca as MlmCalculatorBlock,v as RANK_ORDER,F as SCP1_MAX_CYCLES,W as SCP2_MAX_LEVELS,Y as computeImineEarnings,sa as manifest};
2
- //# sourceMappingURL=index-Bu9Gh6Nc-BfWdQCT7.js.map
1
+ import{r as g,j as a,Q as B}from"../nexly.js";import{C as K}from"./block-rating-DGpoz2o3-CoiP5C2K.js";import{m as L}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const v=["G-Miner","Miner","Developer","Team Leader","Manager","Senior Manager","Vice President","President","Chairman"],F={"G-Miner":0,Miner:2,Developer:4,"Team Leader":6,Manager:7,"Senior Manager":8,"Vice President":9,President:10,Chairman:15},W={"G-Miner":0,Miner:2,Developer:4,"Team Leader":6,Manager:8,"Senior Manager":9,"Vice President":10,President:11,Chairman:12},A={"G-Miner":50,Miner:50,Developer:50,"Team Leader":50,Manager:50,"Senior Manager":50,"Vice President":50,President:50,Chairman:75},X=.1,I=50,O=150,Q=5,R=1,$=10,U=5e4,z=100,H=7,q=30,S={paidRank:"Miner",scp1Cycles:1,scp1PerCycle:100,scp2Cycles:1,scp2PerCycle:5,scp3DirectSales:500};function E(e){return typeof e=="string"&&v.includes(e)}function G(e,d){const c=F[d];return!Number.isFinite(e)||e<0?0:Math.min(e,c)}function J(e,d){const c=A[d];return!Number.isFinite(e)||e<0?0:Math.min(e,c)}function Y(e){const d=e.paidRank==="G-Miner",c=d?0:Math.max(0,e.scp1Cycles)*Math.max(0,e.scp1PerCycle),s=d?0:Math.max(0,e.scp2Cycles)*Math.max(0,e.scp2PerCycle),m=Math.round(Math.max(0,e.scp3DirectSales)*X),o=c+s+m,x=o*H,l=o*q;return{scp1Daily:c,scp2Daily:s,scp3Daily:m,totalDaily:o,totalWeekly:x,totalMonthly:l}}function Z(e,d){const c=d.currentPayoutRank,s=e.defaultPaidRank,m=E(c)?c:E(s)?s:v[0],o=e.defaultScp2PerCycle,x=typeof o=="number"&&Number.isFinite(o)?Math.min($,Math.max(R,o)):S.scp2PerCycle;return{...S,paidRank:m,scp1Cycles:G(S.scp1Cycles,m),scp2PerCycle:x}}function p(e,d,c){return`${c}${new Intl.NumberFormat(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}`}function N({id:e,label:d,value:c,min:s,max:m,step:o,unit:x,currencySymbol:l,locale:n,disabled:b,onChange:i}){const C=x==="$"?p(c,n,l):c.toLocaleString(n),u=x==="$"?p(s,n,l):String(s),t=x==="$"?p(m,n,l):String(m);return a.jsxs("div",{className:`mlmcalc-slider-row${b?" mlmcalc-slider-row--disabled":""}`,children:[a.jsxs("div",{className:"mlmcalc-slider-header",children:[a.jsx("label",{className:"mlmcalc-slider-label",htmlFor:e,children:d}),a.jsx("span",{className:"mlmcalc-slider-value",children:C})]}),a.jsx("input",{id:e,type:"range",className:"mlmcalc-slider",min:s,max:m,step:o,value:c,disabled:b,onChange:h=>i(Number(h.target.value)),onPointerDown:h=>{if(b)return;const k=h.currentTarget.getBoundingClientRect(),f=h.clientX-k.left,M=m-s;if(M<=0)return;const _=(c-s)/M*k.width;if(Math.abs(f-_)<=12)return;const j=Math.max(0,Math.min(1,f/k.width)),D=s+j*M,P=Math.max(s,Math.min(m,Math.round((D-s)/o)*o+s));let r=P;if(P===c){const y=f>_?1:-1;r=Math.max(s,Math.min(m,c+y*o))}r!==c&&(h.preventDefault(),i(r))},style:{"--mlmcalc-fill":`${m>s?(c-s)/(m-s)*100:0}%`}}),a.jsxs("div",{className:"mlmcalc-slider-bounds",children:[a.jsx("span",{children:u}),a.jsx("span",{children:t})]})]})}function ca({data:e,config:d,i18n:c,baseUrl:s,externalContext:m,auth:o,previewMode:x}){const l=c?.t??(r=>r),n=c?.currentLanguage??"en",b=g.useMemo(()=>Z(d,e),[d,e]),[i,C]=g.useState(b),u=g.useMemo(()=>Y(i),[i]),t=l("mlm_calculator.currency_symbol"),h=i.paidRank==="G-Miner",k=F[i.paidRank],f=A[i.paidRank],M=W[i.paidRank],_=g.useCallback(r=>{C(y=>({...y,paidRank:r,scp1Cycles:G(y.scp1Cycles,r),scp2Cycles:J(y.scp2Cycles,r)}))},[]),j=g.useCallback(r=>y=>{C(w=>({...w,[r]:y}))},[]),D=g.useCallback(()=>{C(b)},[b]),P=v.indexOf(i.paidRank);return a.jsx(B,{blockType:"mlm-calculator",children:a.jsxs("div",{className:"es-block__body",children:[a.jsx(K,{blockSlug:"mlm-calculator",baseUrl:s,apiKey:m?.apiKey,jwt:o?.jwt,previewMode:x,t:l,promptKey:"block_rating.prompt_calculator"}),a.jsxs("div",{className:"mlmcalc-block","aria-label":l("mlm_calculator.aria_label"),children:[a.jsx("div",{className:"mlmcalc-title",children:l("mlm_calculator.title")}),a.jsxs("div",{className:"mlmcalc-rank-bar",children:[a.jsx("span",{className:"mlmcalc-rank-label",children:l("mlm_calculator.paid_rank")}),a.jsx("div",{className:"mlmcalc-rank-track",role:"radiogroup","aria-label":l("mlm_calculator.paid_rank"),children:v.map((r,y)=>{const w=r===i.paidRank,T=y<=P,V=["mlmcalc-rank-node",y%2===0?"mlmcalc-rank-node--above":"mlmcalc-rank-node--below",w?"mlmcalc-rank-node--active":"",T?"mlmcalc-rank-node--past":""].filter(Boolean).join(" ");return a.jsxs("button",{type:"button",role:"radio","aria-checked":w,"aria-label":L(r,l),className:V,onClick:()=>_(r),children:[a.jsx("span",{className:"mlmcalc-rank-dot","aria-hidden":"true"}),a.jsx("span",{className:"mlmcalc-rank-name",children:L(r,l)})]},r)})})]}),a.jsxs("div",{className:"mlmcalc-earnings-grid",children:[a.jsxs("div",{className:"mlmcalc-earnings-card",children:[a.jsx("span",{className:"mlmcalc-earnings-label",children:l("mlm_calculator.weekly")}),a.jsx("span",{className:"mlmcalc-earnings-amount",children:p(u.totalWeekly,n,t)})]}),a.jsxs("div",{className:"mlmcalc-earnings-card",children:[a.jsx("span",{className:"mlmcalc-earnings-label",children:l("mlm_calculator.monthly")}),a.jsx("span",{className:"mlmcalc-earnings-amount mlmcalc-earnings-amount--monthly",children:p(u.totalMonthly,n,t)})]})]}),h&&a.jsx("div",{className:"mlmcalc-warning",role:"alert",children:l("mlm_calculator.warning.g_miner")}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp1.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp1Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp1-cycles",label:l("mlm_calculator.scp1.cycles"),value:i.scp1Cycles,min:0,max:k,step:1,unit:"",currencySymbol:t,locale:n,disabled:h,onChange:j("scp1Cycles")}),a.jsx(N,{id:"mlmcalc-scp1-per-cycle",label:l("mlm_calculator.scp1.per_cycle"),value:i.scp1PerCycle,min:I,max:O,step:Q,unit:"$",currencySymbol:t,locale:n,disabled:h,onChange:j("scp1PerCycle")})]}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp2.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp2Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp2-cycles",label:l("mlm_calculator.scp2.cycles",{levels:M}),value:i.scp2Cycles,min:0,max:f,step:1,unit:"",currencySymbol:t,locale:n,disabled:h,onChange:j("scp2Cycles")}),a.jsx(N,{id:"mlmcalc-scp2-per-cycle",label:l("mlm_calculator.scp2.per_cycle"),value:i.scp2PerCycle,min:R,max:$,step:1,unit:"$",currencySymbol:t,locale:n,disabled:h,onChange:j("scp2PerCycle")})]}),a.jsxs("div",{className:"mlmcalc-scp-group",children:[a.jsxs("div",{className:"mlmcalc-scp-header",children:[a.jsx("span",{className:"mlmcalc-scp-title",children:l("mlm_calculator.scp3.title")}),a.jsx("span",{className:"mlmcalc-scp-subtotal",children:l("mlm_calculator.subtotal_per_day",{amount:p(u.scp3Daily,n,t)})})]}),a.jsx(N,{id:"mlmcalc-scp3-sales",label:l("mlm_calculator.scp3.daily_sales"),value:i.scp3DirectSales,min:0,max:U,step:z,unit:"$",currencySymbol:t,locale:n,onChange:j("scp3DirectSales")})]}),a.jsxs("div",{className:"mlmcalc-breakdown",children:[a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp1")}),a.jsx("span",{children:p(u.scp1Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp2")}),a.jsx("span",{children:p(u.scp2Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.scp3")}),a.jsx("span",{children:p(u.scp3Daily,n,t)})]}),a.jsxs("div",{className:"mlmcalc-breakdown-row mlmcalc-breakdown-row--total",children:[a.jsx("span",{children:l("mlm_calculator.breakdown.total")}),a.jsx("span",{children:p(u.totalDaily,n,t)})]})]}),a.jsx("div",{className:"mlmcalc-actions",children:a.jsx("button",{type:"button",className:"mlmcalc-reset",onClick:D,children:l("mlm_calculator.reset")})}),a.jsx("p",{className:"mlmcalc-disclaimer",children:l("mlm_calculator.disclaimer")})]})]})})}const sa={slug:"mlm-calculator",name:"MLM Commission Calculator",version:"2.0.0",category:"interactive",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},defaultPaidRank:{type:"string",default:"Miner"},defaultScp2PerCycle:{type:"number",default:5}}},defaultConfig:{readAloudEnabled:!1,defaultPaidRank:"Miner",defaultScp2PerCycle:5},sizing:{minWidth:300,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"defaultPaidRank",type:"select",label:"Default paid rank",default:"Miner",options:v.map(e=>({label:e,value:e})),group:"Defaults"},{id:"defaultScp2PerCycle",type:"number",label:"Default SCP2 per-cycle amount",default:5,min:R,max:$,group:"Defaults"}],events:{}};export{ca as Component,ca as MlmCalculatorBlock,v as RANK_ORDER,F as SCP1_MAX_CYCLES,W as SCP2_MAX_LEVELS,Y as computeImineEarnings,sa as manifest};
2
+ //# sourceMappingURL=index-BCtNBIxP-CcsFQ7Dx.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as i,j as e,Q as x,o as K}from"../nexly.js";import{m as O}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const Q={slug:"gaio-coach",name:"GAIO Coach",version:"1.0.0",category:"interactive",requiredService:"gaio-coach",configSchema:{properties:{proMode:{type:"boolean",default:!1},showProgressBar:{type:"boolean",default:!0},showMotivationalMessage:{type:"boolean",default:!0},maxActionsShown:{type:"number",default:3}}},defaultConfig:{proMode:!1,showProgressBar:!0,showMotivationalMessage:!0,maxActionsShown:3},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"gaio-coach",inputSchema:{type:"object",properties:{plan:{type:"object",properties:{date:{type:"string"},topActions:{type:"array",items:{type:"object",properties:{id:{type:"string"},title:{type:"string"}}}},motivationalMessage:{type:"string"},progressSummary:{type:"string"}}},progress:{type:"object",properties:{currentStreak:{type:"number"},completedActions:{type:"number"},weeklyScore:{type:"number"},rank:{type:"string"},nextMilestone:{type:"string"}}}}},previewDataOverride:{plan:{date:"2026-04-05",topActions:[{id:"a1",type:"recruit",title:"Connect with 3 prospects",description:"Reach out to your warm market list. Send personalized messages to 3 contacts who expressed interest.",estimatedMinutes:30,priority:"high",isCompleted:!1},{id:"a2",type:"attend_event",title:"Attend local networking event",description:"Seoul Tech Meetup at 7pm. Bring business cards and focus on making genuine connections.",estimatedMinutes:120,priority:"high",isCompleted:!1},{id:"a3",type:"contact_downliner",title:"Coach team member Kim",description:"Kim is close to qualifying for the next rank. A 15-minute coaching call can help them cross the threshold.",estimatedMinutes:15,priority:"medium",isCompleted:!1}],motivationalMessage:"Your consistent effort is building momentum — one action at a time!",progressSummary:"You are 2 actions away from your weekly goal."},progress:{currentStreak:5,completedActions:14,weeklyScore:78,rank:"Silver",nextMilestone:"Gold (3 more referrals)"}}},fields:[{id:"proMode",type:"toggle",label:"Pro mode (full chat history)",default:!1,group:"Display"},{id:"showProgressBar",type:"toggle",label:"Show progress bar",default:!0,group:"Display"},{id:"showMotivationalMessage",type:"toggle",label:"Show motivational message",default:!0,group:"Display"},{id:"maxActionsShown",type:"range",label:"Max actions shown",default:3,min:1,max:5,step:1,group:"Display"}],events:{emits:[{name:"gaio:actionCompleted",description:"User marked an action as completed"},{name:"gaio:messageSent",description:"User sent a coaching message (pro mode)"}],listens:[{name:"gaio:refresh",description:"Force refresh coaching plan"}]},supportedPlacements:["main","sidebar"]};function A({item:s,onToggle:r}){return e.jsxs("div",{className:`es-gaio__action es-gaio__action--${s.priority}${s.isCompleted?" es-gaio__action--completed":""}`,onClick:()=>r(s.id),role:"button",tabIndex:0,onKeyDown:n=>n.key==="Enter"&&r(s.id),children:[e.jsx("div",{className:"es-gaio__action-check",children:s.isCompleted?"✓":""}),e.jsxs("div",{className:"es-gaio__action-body",children:[e.jsx("div",{className:"es-gaio__action-title",children:s.title}),e.jsx("div",{className:"es-gaio__action-desc",children:s.description}),e.jsx("div",{className:"es-gaio__action-meta",children:e.jsxs("span",{className:"es-gaio__action-time",children:["~",s.estimatedMinutes,"m"]})})]})]})}function U({data:s,config:r,actions:n,baseUrl:f,productId:v,metadata:D,i18n:$}){const t=$?.t??(a=>a),p=r.proMode??!1,T=r.showProgressBar??!0,I=r.showMotivationalMessage??!0,j=r.maxActionsShown??3,d=s.plan,c=s.progress,[l,b]=i.useState([]),[h,u]=i.useState([]),[m,w]=i.useState(""),[g,k]=i.useState(!1),N=i.useRef(null);i.useEffect(()=>{d?.topActions&&b(d.topActions.slice(0,j))},[d,j]),i.useEffect(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[h]);const S=i.useCallback(async a=>{b(_=>_.map(o=>o.id===a?{...o,isCompleted:!o.isCompleted}:o)),await n.call("complete",{actionId:a}).catch(()=>{}),n.emit("gaio:actionCompleted",{actionId:a})},[n]),M=i.useCallback(async()=>{const a=m.trim();if(!a||g)return;const _={id:`u-${Date.now()}`,role:"user",text:a};u(o=>[...o,_]),w(""),k(!0);try{const o=(await(await fetch(`${f}/api/widget/gaio/coach`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({productId:v,context:{dailyGoal:a}})})).json())?.data?.plan,y=o?.motivationalMessage??o?.progressSummary??t("gaio_coach.default_guidance"),P={id:`a-${Date.now()}`,role:"assistant",text:y};u(B=>[...B,P]),n.emit("gaio:messageSent",{text:a})}catch{const o={id:`e-${Date.now()}`,role:"assistant",text:t("gaio_coach.error_unreachable")};u(y=>[...y,o])}finally{k(!1)}},[m,g,f,v,n]);if(!d&&!s.error)return e.jsx(x,{blockType:"gaio-coach",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx("div",{className:"es-gaio__header",children:e.jsx("span",{className:"es-gaio__title",children:t("gaio_coach.title")})}),e.jsx("div",{className:"es-gaio__motivation",style:{color:"var(--es-color-on-surface-muted, #4B5563)",fontStyle:"italic"},children:D?.dataQuality==="none"?t("gaio_coach.sign_in_prompt"):t("gaio_coach.preparing")}),[1,2,3].map(a=>e.jsxs("div",{className:"es-gaio__action",style:{opacity:.35},children:[e.jsx("div",{className:"es-gaio__action-check"}),e.jsx("div",{className:"es-gaio__action-body",children:e.jsx("div",{className:"es-gaio__action-title",style:{background:"var(--es-color-surface-elevated, #f5f5f5)",borderRadius:4,height:14,width:`${60+a*15}%`}})})]},a))]})});if(s.error)return e.jsx(x,{blockType:"gaio-coach",error:K(s.error)});const C=l.filter(a=>a.isCompleted).length,E=l.length>0?C/l.length*100:0;return e.jsx(x,{blockType:"gaio-coach",children:e.jsxs("div",{className:"es-block__body",children:[e.jsxs("div",{className:"es-gaio__header",children:[e.jsx("span",{className:"es-gaio__title",children:t("gaio_coach.title")}),c?.currentStreak!=null&&c.currentStreak>0&&e.jsxs("span",{className:"es-gaio__streak",children:["🔥 ",e.jsx("span",{className:"es-gaio__streak-value",children:c.currentStreak})," ",t("gaio_coach.day_streak")]})]}),T&&l.length>0&&e.jsxs("div",{className:"es-gaio__progress",children:[e.jsxs("div",{className:"es-gaio__progress-label",children:[e.jsx("span",{children:t("gaio_coach.todays_actions")}),e.jsxs("span",{children:[C,"/",l.length]})]}),e.jsx("div",{className:"es-gaio__progress-bar",children:e.jsx("div",{className:"es-gaio__progress-fill",style:{width:`${E}%`}})})]}),p&&c?.rank&&e.jsxs("div",{className:"es-gaio__summary-card",children:[e.jsxs("div",{className:"es-gaio__summary-rank",children:[t("gaio_coach.current_rank"),": ",O(c.rank,t)]}),c.nextMilestone&&e.jsxs("div",{className:"es-gaio__summary-milestone",children:[t("gaio_coach.next"),": ",c.nextMilestone]})]}),I&&d?.motivationalMessage&&e.jsx("div",{className:"es-gaio__motivation",children:d.motivationalMessage}),!p&&e.jsx("div",{className:"es-gaio__actions",children:l.map(a=>e.jsx(A,{item:a,onToggle:S},a.id))}),p&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-gaio__actions",children:l.map(a=>e.jsx(A,{item:a,onToggle:S},a.id))}),h.length>0&&e.jsxs("div",{className:"es-gaio__chat",children:[h.map(a=>e.jsx("div",{className:`es-gaio__chat-msg es-gaio__chat-msg--${a.role}`,children:a.text},a.id)),e.jsx("div",{ref:N})]}),e.jsxs("div",{className:"es-gaio__chat-input-row",children:[e.jsx("textarea",{className:"es-gaio__chat-input",rows:1,placeholder:t("gaio_coach.chat_placeholder"),value:m,onChange:a=>w(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),M())}}),e.jsx("button",{className:"es-gaio__chat-send",onClick:M,disabled:g||!m.trim(),children:g?"...":t("gaio_coach.chat_send")})]})]})]})})}export{U as Component,Q as manifest};
2
- //# sourceMappingURL=index-BD-jPdzs-ZRnEJoQe.js.map
2
+ //# sourceMappingURL=index-BIMK2_g0-ZRnEJoQe.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as i,a as j,j as e,Q as B}from"../nexly.js";const z={slug:"auth-login",name:"User Login",version:"1.0.0",category:"interactive",requiredService:"",configSchema:{properties:{loginMethod:{type:"string",default:"password"},showGuestOption:{type:"boolean",default:!0},submitLabel:{type:"string",default:""}}},defaultConfig:{loginMethod:"password",showGuestOption:!0,submitLabel:""},dataContract:{serviceSlug:"chat-bot",inputSchema:{type:"object",properties:{authenticated:{type:"boolean"}}},previewDataOverride:{authenticated:!1}},fields:[{id:"loginMethod",type:"select",label:"Login method",default:"password",options:[{label:"Password",value:"password"},{label:"Magic Link",value:"magic-link"},{label:"Guest",value:"guest"}],group:"Behavior"},{id:"showGuestOption",type:"toggle",label:"Show guest login option",default:!0,group:"Behavior"},{id:"submitLabel",type:"localized-text",label:"Submit button label",default:"",placeholder:'Leave empty to use translated default (e.g. "Login")',group:"Content"}],events:{emits:[{name:"auth:login",description:"User successfully logged in — carries { user, accessToken }"},{name:"auth:loginFailed",description:"Login attempt failed"},{name:"auth:guestContinued",description:"User chose to continue as guest"}],listens:[{name:"auth:reset",description:"Reset the login form"}]},supportedPlacements:["main"],sizing:{minWidth:280,preferredHeight:"auto",scrollable:!1}};function L({config:u,actions:s,i18n:d}){const r=d?.t??(o=>o),h=d?.currentLanguage??"en",[p,m]=i.useState(""),[g,y]=i.useState(""),[b,v]=i.useState(""),[l,n]=i.useState(!1),[c,t]=i.useState(null),f=u.loginMethod??"password",x=u.showGuestOption??!0,w=j(u.submitLabel,h,{t:r,fallbackKey:"auth.login.submit",enDefault:"Login"});async function S(o){o.preventDefault(),n(!0),t(null);try{let a;f==="api_key"?a=await s.call("login",{apiKey:p}):a=await s.call("login",{email:g,password:b}),a?.error?t({error:a.error}):(s.emit("auth:login",{user:a.user,accessToken:a.accessToken}),t({success:!0,user:a?.user}))}catch{t({error:r("auth.login.error_failed")})}finally{n(!1)}}async function k(){n(!0),t(null);try{const o=await s.call("login",{guest:!0});o?.error?t({error:o.error}):(s.emit("auth:login",{user:o.user}),t({success:!0}))}catch{t({error:r("auth.login.error_guest_failed")})}finally{n(!1)}}return c?.success?null:e.jsx(B,{blockType:"auth-login",children:e.jsxs("div",{className:"es-block__body",style:{padding:16},children:[e.jsxs("form",{onSubmit:S,children:[f==="api_key"?e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.login.api_key_label")}),e.jsx("input",{type:"text",value:p,onChange:o=>m(o.target.value),placeholder:"eu_live_...",required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",fontFamily:"monospace",boxSizing:"border-box"}})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.email_label")}),e.jsx("input",{type:"email",value:g,onChange:o=>y(o.target.value),placeholder:r("auth.email_placeholder"),required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]}),e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.password_label")}),e.jsx("input",{type:"password",value:b,onChange:o=>v(o.target.value),placeholder:r("auth.password_placeholder"),required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]})]}),c?.error&&e.jsx("div",{style:{fontSize:12,color:"var(--es-color-error, #AD2C26)",marginBottom:8},children:c.error}),e.jsx("button",{type:"submit",disabled:l,style:{width:"100%",padding:"10px 16px",borderRadius:6,border:"none",background:l?"var(--es-color-on-surface-muted, #4B5563)":"var(--es-color-primary, #2563EB)",color:"var(--es-color-on-primary, #ffffff)",fontSize:14,fontWeight:600,cursor:l?"wait":"pointer"},children:l?r("auth.login.submitting"):w})]}),x&&e.jsx("button",{type:"button",onClick:k,disabled:l,style:{width:"100%",marginTop:8,padding:"8px 16px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"transparent",color:"var(--es-color-on-surface-muted, #4B5563)",fontSize:13,cursor:l?"wait":"pointer"},children:r("auth.gate.guest_cta")})]})})}export{L as Component,z as manifest};
2
- //# sourceMappingURL=index-BSoCdILD-D6wzHiS0.js.map
2
+ //# sourceMappingURL=index-BJClDxSC-D6wzHiS0.js.map
@@ -1,4 +1,4 @@
1
- import{r as F,j as a,Q as Z,e as oe}from"../nexly.js";import{C as He}from"./block-rating-DH7mp-_R-CoiP5C2K.js";import{m as b}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";import{j as ve}from"./PanelInfoVideo-BKn3ucAb-BrU-Qlul.js";const Ve=se([["!","ǃⵑ"],[":","ː˸։׃܃܄ःઃ᛬᠃᠉⁚∶ꓽ꞉𑷙"],["<","˂ᐸᚲ‹❮𝈶"],["<<","≪"],["<<<","⋘"],["a","ɑαаᗅ⍶⍺ꓮꭺ𐊠𖽀"],["aa","ꜳ"],["ae","æӕ"],["ao","ꜵ"],["ar","🜇"],["au","ꜷ"],["c","¢ȼςϛсҫငၚᴄ₡ⲋⲥꓚꮯ𐊢𐌂𐐽𐔜𑣩𑣲🅮🝌"],["cc","🅭"],["d","ðđƌɖɗԁᑯᗞᗪ₫ꓒꓓꭰꮷ"],["e","ɇεеҽҿ℮⋿ⴹꓰꬲꭼ𐊆𑣆𑣎"],["g","ƍǥɠɡԍցᏻᶃꓖꮐ"],["h","ħɦнћңһӈӊհᏺᕼⱨⲏꓧꚕꮋꮒ𐋏𐓵"],["i","ıɨɩɪιіւᵻᵼ⍳⍸ⲓꙇꭵ𑣃"],["k","ƙκкқҟᛕ₭ⱪⲕꓗꝁꮶ𐔘"],["l","1|łƚǀɫɭӏ׀וןا١ٳ۱ߊᒪᛁ∣⏽│┃ⳑⵏꓡꓲꮮ𐊊𐌉𐌠𐑃𐔦𑣒𑷚𑷡𖻅𖼖𖼨𝈪𞣇"],["ll","ǁװ‖∥𐆙"],["lls","𐆘"],["lo","ю⏨"],["ls","ʪ"],["lt","₶"],["n","ŋƞɲɳηνղոռበᑎᵰ∩⋂ⲛꓠꓵ𐆎𐔓𝉅"],["o","0øɵθοσϭоѳөօסه٥ھہە۵ۿ߀०০੦૦ଠ୦௦ం౦ಂ೦ംഠ൦ං๐໐ဝ၀ჿዐ០ᴏᴑ⊖⊝⍬ⲑⲟⴱⵁⵔ〇ꓳꝋꬽꬾꭴꮎꮻ𐊒𐊫𐐬𐓪𐔖𑓐𑣈𑣕𑣗𑣠𑷠𝈚🜔"],["oe","œ"],["oo","∞ꚙꝏ"],["p","þƥƿρϸрᑭᵽ⍴ⲣⳏꓑꮲ𐊕𐓬"],["q","ʠԛգզⵕ"],["qe","🜀"],["r","ɍɼɽʀгғᖇᴦᵲⲅꓣꭇꭈꭱꮁꮢ𐓜𖼵𝈖"],["rn","mɱμϻмӎᗰᛖᵯ₥ⲙꓟꮇ𐊰𐌑𑜀𑣣"],["s","ƽʂѕտടᵴꓢꜱꮥꮪ𐊖𐑈𑣁𖼺"],["sss","🝜"],["t","ŧƭʈτтҭᵵ₮⊤⍡⟙ⱦⲧꓔꭲ𐊗𐊱𐌕𑣜𖼊🝨"],["ts","ʦ"],["u","ʉʋυџսሀᑌᴜᵾ∪⋃ꓴꞟꭎꭒꮜ𐓶𑣘𖽂"],["ue","ᵫ"],["uo","ꭣ"],["w","ɯшѡѽԝաᗯᴡ₩ⲽꓪꝡꮃꮗꮤ𑓅𑜊𑜎𑜏𑣦𑣯𝈢"]]),Ue=se([["h","Η"],["l","ƖƗΙІⲒ𑢣"]]),We=se([["c","Ϲ"]]),Be=new Set([..."˗۔⁃∸➖⨩⨪ⲲⲳⲺⲻ﬩~"]);function se(r){const t=new Map;for(const[e,o]of r)for(const i of o)t.set(i,e);return t}const pe=7e3,we=80;function xe(r){return r.length<=we?r:`${r.slice(0,we-1).trimEnd()}…`}function ie(r){if(typeof r!="string")return"";const t=r.replace(/\p{Cc}/gu," ").replace(/[\p{Cf}\p{Default_Ignorable_Code_Point}]/gu,"").replace(/\s+/g," ").trim();return t?xe(t):""}function Fe(r){return typeof r!="string"?"":ie(ce(r))}function v(r){return r.length<=pe?r:`${r.slice(0,pe-1).trimEnd()}…`}function S(r,t){return r==null?t("network_growth.gaio.a_member"):ie(ce(r))||t("network_growth.gaio.a_member")}function m(r){return xe(ce(r))}const fe={citizensWithRank:"network_growth.gaio.gap.citizens",binaryTreeRank:"network_growth.gaio.gap.binary",totalTreeVolume:"network_growth.gaio.gap.volume",personalPoints:"network_growth.gaio.gap.points",personalPurchase:"network_growth.gaio.gap.purchase"};function x(r,t){const e=r.next_target_rank?t("network_growth.gaio.leader",{rank:m(r.current_rank),next:m(r.next_target_rank)}):t("network_growth.gaio.leader_top",{rank:m(r.current_rank)}),o=r.binding_constraint;if(!o)return e;const i=t("network_growth.gaio.leader_gap",{gap:t(fe[o.type]),current:o.current,required:o.required});return`${e} ${i}`}function ye(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=[];return r.is_tree_branch_qualifier&&o.push(t("network_growth.gaio.flag_branch")),r.is_binary_qualifier&&o.push(t("network_growth.gaio.flag_binary")),r.paid_rank_decay_risk&&o.push(t("network_growth.gaio.flag_decay")),o.length===0?e:`${e} ${t("network_growth.gaio.cand_why",{reasons:o.join("; ")})}`}const V={defend_citizen:"network_growth.t2.reason.defend_citizen",promotes_to_citizen:"network_growth.t2.reason.promotes_to_citizen",existing_citizen:"network_growth.t2.reason.existing_citizen",complete_leg:"network_growth.t2.reason.complete_leg",reengage:"network_growth.t2.reason.reengage",grow_volume:"network_growth.t2.reason.grow_volume"};function Qe(r,t,e,o){switch(r){case"defend_citizen":return o(V.defend_citizen,{rank:m(t.citizen_rank_type??e),payout_rank:m(t.payout_rank??"")});case"promotes_to_citizen":return o(V.promotes_to_citizen,{rank:m(t.citizen_rank_type??""),count:t.citizens_gap??0});case"existing_citizen":return o(V.existing_citizen,{rank:m(t.rank??e)});case"complete_leg":return o(V.complete_leg,{leg:o(`network_growth.leg.${t.leg??"balanced"}`)});case"reengage":return o(V.reengage);default:return o(V.grow_volume)}}function je(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=Qe(r.reason_code,r.reason_params,r.current_rank,t);return`${e} ${t("network_growth.gaio.cand_why",{reasons:o})}`}function Ye(r,t){const e=r.recommendations;if(e.length===0)return v(x(r.leader,t));const o=e.map((i,l)=>`${l+1}. ${i.title}. ${i.detail}`);return v(`${x(r.leader,t)}
1
+ import{r as F,j as a,Q as Z,e as oe}from"../nexly.js";import{C as He}from"./block-rating-DGpoz2o3-CoiP5C2K.js";import{m as b}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";import{j as ve}from"./PanelInfoVideo-BKq2v0QM-BrU-Qlul.js";const Ve=se([["!","ǃⵑ"],[":","ː˸։׃܃܄ःઃ᛬᠃᠉⁚∶ꓽ꞉𑷙"],["<","˂ᐸᚲ‹❮𝈶"],["<<","≪"],["<<<","⋘"],["a","ɑαаᗅ⍶⍺ꓮꭺ𐊠𖽀"],["aa","ꜳ"],["ae","æӕ"],["ao","ꜵ"],["ar","🜇"],["au","ꜷ"],["c","¢ȼςϛсҫငၚᴄ₡ⲋⲥꓚꮯ𐊢𐌂𐐽𐔜𑣩𑣲🅮🝌"],["cc","🅭"],["d","ðđƌɖɗԁᑯᗞᗪ₫ꓒꓓꭰꮷ"],["e","ɇεеҽҿ℮⋿ⴹꓰꬲꭼ𐊆𑣆𑣎"],["g","ƍǥɠɡԍցᏻᶃꓖꮐ"],["h","ħɦнћңһӈӊհᏺᕼⱨⲏꓧꚕꮋꮒ𐋏𐓵"],["i","ıɨɩɪιіւᵻᵼ⍳⍸ⲓꙇꭵ𑣃"],["k","ƙκкқҟᛕ₭ⱪⲕꓗꝁꮶ𐔘"],["l","1|łƚǀɫɭӏ׀וןا١ٳ۱ߊᒪᛁ∣⏽│┃ⳑⵏꓡꓲꮮ𐊊𐌉𐌠𐑃𐔦𑣒𑷚𑷡𖻅𖼖𖼨𝈪𞣇"],["ll","ǁװ‖∥𐆙"],["lls","𐆘"],["lo","ю⏨"],["ls","ʪ"],["lt","₶"],["n","ŋƞɲɳηνղոռበᑎᵰ∩⋂ⲛꓠꓵ𐆎𐔓𝉅"],["o","0øɵθοσϭоѳөօסه٥ھہە۵ۿ߀०০੦૦ଠ୦௦ం౦ಂ೦ംഠ൦ං๐໐ဝ၀ჿዐ០ᴏᴑ⊖⊝⍬ⲑⲟⴱⵁⵔ〇ꓳꝋꬽꬾꭴꮎꮻ𐊒𐊫𐐬𐓪𐔖𑓐𑣈𑣕𑣗𑣠𑷠𝈚🜔"],["oe","œ"],["oo","∞ꚙꝏ"],["p","þƥƿρϸрᑭᵽ⍴ⲣⳏꓑꮲ𐊕𐓬"],["q","ʠԛգզⵕ"],["qe","🜀"],["r","ɍɼɽʀгғᖇᴦᵲⲅꓣꭇꭈꭱꮁꮢ𐓜𖼵𝈖"],["rn","mɱμϻмӎᗰᛖᵯ₥ⲙꓟꮇ𐊰𐌑𑜀𑣣"],["s","ƽʂѕտടᵴꓢꜱꮥꮪ𐊖𐑈𑣁𖼺"],["sss","🝜"],["t","ŧƭʈτтҭᵵ₮⊤⍡⟙ⱦⲧꓔꭲ𐊗𐊱𐌕𑣜𖼊🝨"],["ts","ʦ"],["u","ʉʋυџսሀᑌᴜᵾ∪⋃ꓴꞟꭎꭒꮜ𐓶𑣘𖽂"],["ue","ᵫ"],["uo","ꭣ"],["w","ɯшѡѽԝաᗯᴡ₩ⲽꓪꝡꮃꮗꮤ𑓅𑜊𑜎𑜏𑣦𑣯𝈢"]]),Ue=se([["h","Η"],["l","ƖƗΙІⲒ𑢣"]]),We=se([["c","Ϲ"]]),Be=new Set([..."˗۔⁃∸➖⨩⨪ⲲⲳⲺⲻ﬩~"]);function se(r){const t=new Map;for(const[e,o]of r)for(const i of o)t.set(i,e);return t}const pe=7e3,we=80;function xe(r){return r.length<=we?r:`${r.slice(0,we-1).trimEnd()}…`}function ie(r){if(typeof r!="string")return"";const t=r.replace(/\p{Cc}/gu," ").replace(/[\p{Cf}\p{Default_Ignorable_Code_Point}]/gu,"").replace(/\s+/g," ").trim();return t?xe(t):""}function Fe(r){return typeof r!="string"?"":ie(ce(r))}function v(r){return r.length<=pe?r:`${r.slice(0,pe-1).trimEnd()}…`}function S(r,t){return r==null?t("network_growth.gaio.a_member"):ie(ce(r))||t("network_growth.gaio.a_member")}function m(r){return xe(ce(r))}const fe={citizensWithRank:"network_growth.gaio.gap.citizens",binaryTreeRank:"network_growth.gaio.gap.binary",totalTreeVolume:"network_growth.gaio.gap.volume",personalPoints:"network_growth.gaio.gap.points",personalPurchase:"network_growth.gaio.gap.purchase"};function x(r,t){const e=r.next_target_rank?t("network_growth.gaio.leader",{rank:m(r.current_rank),next:m(r.next_target_rank)}):t("network_growth.gaio.leader_top",{rank:m(r.current_rank)}),o=r.binding_constraint;if(!o)return e;const i=t("network_growth.gaio.leader_gap",{gap:t(fe[o.type]),current:o.current,required:o.required});return`${e} ${i}`}function ye(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=[];return r.is_tree_branch_qualifier&&o.push(t("network_growth.gaio.flag_branch")),r.is_binary_qualifier&&o.push(t("network_growth.gaio.flag_binary")),r.paid_rank_decay_risk&&o.push(t("network_growth.gaio.flag_decay")),o.length===0?e:`${e} ${t("network_growth.gaio.cand_why",{reasons:o.join("; ")})}`}const V={defend_citizen:"network_growth.t2.reason.defend_citizen",promotes_to_citizen:"network_growth.t2.reason.promotes_to_citizen",existing_citizen:"network_growth.t2.reason.existing_citizen",complete_leg:"network_growth.t2.reason.complete_leg",reengage:"network_growth.t2.reason.reengage",grow_volume:"network_growth.t2.reason.grow_volume"};function Qe(r,t,e,o){switch(r){case"defend_citizen":return o(V.defend_citizen,{rank:m(t.citizen_rank_type??e),payout_rank:m(t.payout_rank??"")});case"promotes_to_citizen":return o(V.promotes_to_citizen,{rank:m(t.citizen_rank_type??""),count:t.citizens_gap??0});case"existing_citizen":return o(V.existing_citizen,{rank:m(t.rank??e)});case"complete_leg":return o(V.complete_leg,{leg:o(`network_growth.leg.${t.leg??"balanced"}`)});case"reengage":return o(V.reengage);default:return o(V.grow_volume)}}function je(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=Qe(r.reason_code,r.reason_params,r.current_rank,t);return`${e} ${t("network_growth.gaio.cand_why",{reasons:o})}`}function Ye(r,t){const e=r.recommendations;if(e.length===0)return v(x(r.leader,t));const o=e.map((i,l)=>`${l+1}. ${i.title}. ${i.detail}`);return v(`${x(r.leader,t)}
2
2
 
3
3
  ${t("network_growth.gaio.support_list")}
4
4
  ${o.join(`
@@ -47,4 +47,4 @@ ${i.join(`
47
47
  ${k}`,autoSend:!1,quickChips:G??[{label:n("network_growth.chip.approach"),message:n("network_growth.chip.approach_msg"),autoSend:!0},{label:n("network_growth.chip.message"),message:n("network_growth.chip.message_msg"),autoSend:!0},{label:n("network_growth.chip.why"),message:n("network_growth.chip.why_msg"),autoSend:!0},{label:n("network_growth.chip.other"),message:"",autoSend:!1}]})},[t,n]),C=F.useCallback(s=>{const k=$e(s,n);if(k===null||!g)return;const G=dt[s.key],H=G?.(g,n);t.emit("chat:draft",{message:H?`${k}
48
48
 
49
49
  ${H}`:k,autoSend:!0})},[t,n,g]),L=F.useCallback((s,k)=>{f(s,k,[{label:n("network_growth.chip.plan_first"),message:n("network_growth.chip.plan_first_msg"),autoSend:!0},{label:n("network_growth.chip.plan_fastest"),message:n("network_growth.chip.plan_fastest_msg"),autoSend:!0},{label:n("network_growth.chip.other"),message:"",autoSend:!1}])},[f,n]);if(!g||g.contract_version!=="2.0"&&g.contract_version!=="3.0"){if(r.error)return a.jsx(Z,{blockType:"network-growth",children:a.jsx("div",{className:"ng2",children:a.jsx("p",{className:"ng2__error",children:n("network_growth.error")})})});const s=e?.dataQuality,k=s!=="none"&&!!r&&Object.keys(r).some(Ge=>!Ge.startsWith("_"));let G="🌱",H=n("network_growth.empty.loading");return s==="none"?H=n("network_growth.empty.sign_in"):k&&(G="🔄",H=n("network_growth.empty.stale")),a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:"ng2 ng2--empty",children:[a.jsx("div",{className:"ng2__empty-icon","aria-hidden":"true",children:G}),a.jsx("p",{className:"ng2__empty-text",children:H})]})})}const{leader:h,tiles:I,recommendations:j,context_size:Y,digest_v3:z}=g,{cascade_potential:p,at_risk:w,binary_placement:c,structure_summary:u,earning_levers:q}=I;if(z)return a.jsx(Ot,{out:g,digestV3:z,t:n,hasChatView:y,handleTalkToGaio:f,handleAskGaio:C,handlePlanWithGaio:L,sectionRating:N,actions:t,baseUrl:l,apiKey:i?.apiKey});const T=n("network_growth.a11y.expand"),P=n("network_growth.a11y.collapse"),ee=n("network_growth.talk_to_gaio"),O=(s,k)=>({text:n(`network_growth.${s}.help`),ariaLabel:n("network_growth.help_aria",{title:n(k)})}),U=(s,k)=>s?.title?.trim()||k,W=(s,k)=>s?.teaser?.trim()||k,te=s=>le(s,n),Ee=s=>s.cascade_reason_code?Se(s.cascade_reason_code,s.cascade_reason_params??{},s.current_rank,n):s.cascade_reason,D=(s,k)=>y?{label:ee,onClick:()=>f(s,k)}:void 0,_e=j[0],Te=_e?_e.teaser:n("network_growth.t3.empty_teaser"),ge=h.path_to_next_rank??[],A=b(h.mode==="defend"?h.defend_target_rank??h.current_rank:h.next_target_rank??h.current_rank,n),re=h.mode==="defend"?n("network_growth.tpath.move_title_defend",{rank:A}):n("network_growth.tpath.move_title_advance",{rank:A}),B=h.binding_constraint??ge.find(s=>!s.met)??null,de=B?h.mode==="defend"?n("network_growth.tpath.move_advice_defend",{rank:A,dimension:n(St[B.type])}):n(`network_growth.tpath.move_advice.${B.type}`,{rank:A,gap:E(Math.max(0,B.required-B.current))}):n("network_growth.tpath.move_all_met",{rank:A}),Pe=h.mode==="defend"?n("network_growth.tpath.move_intro_defend",{rank:A}):n("network_growth.tpath.move_intro_advance",{rank:A}),Re=h.mode==="defend"?n("network_growth.tpath.move_cta_defend",{rank:A}):n("network_growth.tpath.move_cta_advance",{rank:A}),Me=p.cascade_candidates.length>0?n("network_growth.t2.teaser",{count:p.cascade_candidates.length}):n("network_growth.t2.teaser_empty"),Ie=w.re_activatable_count>0?n("network_growth.t4.teaser_reactivatable",{count:w.members.length,reactivatable:w.re_activatable_count}):n("network_growth.t4.teaser",{count:w.members.length}),Oe=n("network_growth.t7.teaser",{count:c.imbalanced_members.length,usd:E(c.estimated_total_weekly_usd_lost)}),De=n("network_growth.t8.teaser",{active:u.active_purchasing_count_30d,paid:u.active_paid_rank_count}),Ke=n("network_growth.t6.teaser",{count:q.scp2_active_members.length,levels:q.scp2_levels_unlocked}),he=c.top5_by_cycle_loss.length>0?c.top5_by_cycle_loss:c.imbalanced_members,K=u.team_binary_force,R=u.structure_expansion_gap;return a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:`ng2 ng2--${Y}`,children:[a.jsx("div",{className:"ng2__icon-row",children:a.jsx(ve,{panelKey:"network-growth",baseUrl:l,apiKey:i?.apiKey,t:n})}),h.grace_period_ranks.length>0&&a.jsxs("div",{className:"ng2__grace",role:"alert",children:[a.jsx("span",{"aria-hidden":"true",children:"⚠️"}),a.jsx("span",{children:n("network_growth.grace_banner",{rank:h.grace_period_ranks[0]?b(h.grace_period_ranks[0],n):""})})]}),ge.length>0&&a.jsxs(M,{id:"path",title:re,teaser:de,defaultOpen:!0,expandLabel:T,collapseLabel:P,help:{text:n("network_growth.tpath.move_help"),ariaLabel:n("network_growth.help_aria",{title:re})},gaio:y?{label:Re,onClick:()=>f(re,at(g,n))}:void 0,rating:N("path"),children:[a.jsx("p",{className:"ng-path-intro",children:Pe}),a.jsx("p",{className:"ng-path-advice",children:de})]}),a.jsx(M,{id:"support",title:n("network_growth.t3.title"),teaser:Te,defaultOpen:!0,expandLabel:T,collapseLabel:P,help:O("t3","network_growth.t3.title"),gaio:j.length>0?void 0:D(n("network_growth.t3.title"),Ye(g,n)),rating:N("support"),children:j.length===0?a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t3.empty")}):a.jsx("ul",{className:"ng-rec-list",children:j.map(s=>a.jsxs("li",{className:"ng-rec",children:[a.jsxs("div",{className:"ng-rec__head",children:[a.jsx("span",{className:`ng-badge ng-badge--${s.tier.toLowerCase()}`,children:n(Tt[s.tier])}),a.jsx("span",{className:"ng-rec__title",children:s.title})]}),a.jsx("p",{className:"ng-rec__detail",children:s.detail}),y&&a.jsx(Q,{label:ee,onClick:()=>f(s.title,Ne(g,s,n))})]},s.id))})}),p.visible&&a.jsxs(M,{id:"cascade",title:U(p.narrative,n("network_growth.t2.title")),teaser:W(p.narrative,Me),narrativeDetail:p.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t2","network_growth.t2.title"),gaio:p.cascade_candidates.length>0?void 0:D(n("network_growth.t2.title"),Xe(g,n)),rating:N("cascade"),children:[a.jsx(be,{binary:p.binary_qualification_gap,branch:p.tree_branch_coverage,t:n}),p.rank_elevation_candidates_count>0&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t2.elevation",{count:p.rank_elevation_candidates_count,high:p.high_cascade_count})}),p.cascade_candidates.length===0?a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t2.empty")}):a.jsx("ul",{className:"ng-cand-list",children:p.cascade_candidates.map(s=>a.jsxs("li",{className:`ng-cand${s.is_defend_priority?" ng-cand--defend":""}`,children:[a.jsx("div",{className:"ng-cand__top",children:a.jsx("span",{className:"ng-cand__name",children:$(s.display_name,s.user_id)})}),a.jsxs("div",{className:"ng-cand__rank",children:[b(s.current_rank,n),s.next_rank?` → ${b(s.next_rank,n)}`:""]}),(s.is_binary_qualifier||s.is_tree_branch_qualifier||s.paid_rank_decay_risk)&&a.jsxs("div",{className:"ng-cand__chips",children:[s.is_binary_qualifier&&a.jsx("span",{className:"ng-chip ng-chip--qualifier",children:n("network_growth.t2.chip.binary_qualifier")}),s.is_tree_branch_qualifier&&a.jsx("span",{className:"ng-chip ng-chip--qualifier",children:n("network_growth.t2.chip.branch_qualifier")}),s.paid_rank_decay_risk&&a.jsx("span",{className:"ng-chip ng-chip--decay",children:n("network_growth.t2.chip.decay_risk")})]}),a.jsx("p",{className:"ng-cand__reason",children:Ee(s)}),y&&a.jsx(Q,{label:ee,onClick:()=>f(n("network_growth.t2.gaio_headline",{name:$(s.display_name,s.user_id)}),Je(g,s,n))})]},s.user_id))}),p.aggregated_stats&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t2.aggregate",{active:p.aggregated_stats.active_count,total:p.total_members})})]}),w.visible&&w.members.length>0&&a.jsxs(M,{id:"atrisk",title:U(w.narrative,n("network_growth.t4.title")),teaser:W(w.narrative,Ie),narrativeDetail:w.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t4","network_growth.t4.title"),gaio:D(n("network_growth.t4.title"),Ze(g,n)),rating:N("atrisk"),children:[(w.paid_rank_expiry_warnings>0||w.weekly_points_lost_to_dormancy>0)&&a.jsxs("div",{className:"ng-atrisk-summary",children:[w.paid_rank_expiry_warnings>0&&a.jsx("span",{className:"ng-chip ng-chip--urgent",children:n("network_growth.t4.expiry_warning",{count:w.paid_rank_expiry_warnings})}),w.weekly_points_lost_to_dormancy>0&&a.jsx("span",{className:"ng-atrisk-summary__lost",children:n("network_growth.t4.points_lost",{points:w.weekly_points_lost_to_dormancy})})]}),a.jsx("ul",{className:"ng-risk-list",children:w.members.map(s=>a.jsxs("li",{className:`ng-risk ng-risk--${Et[s.severity]}`,children:[a.jsx("span",{className:"ng-risk__dot","aria-hidden":"true"}),a.jsxs("div",{className:"ng-risk__info",children:[a.jsx("span",{className:"ng-risk__name",children:$(s.display_name,s.user_id)}),a.jsx("span",{className:"ng-risk__signal",children:n(`network_growth.signal.${s.signal.toLowerCase()}`)}),s.is_reactivatable&&s.paid_rank_grace_expires_in_days!==null&&a.jsx("span",{className:"ng-risk__grace",children:n("network_growth.t4.grace_expires",{days:s.paid_rank_grace_expires_in_days})})]}),a.jsxs("span",{className:"ng-risk__tags",children:[s.is_reactivatable&&a.jsx("span",{className:"ng-chip ng-chip--reactivate",children:n("network_growth.t4.reactivatable_badge")}),s.is_counted_citizen&&a.jsx("span",{className:"ng-risk__flag",children:n("network_growth.t4.counts")})]})]},s.user_id))})]}),c.visible&&he.length>0&&a.jsxs(M,{id:"placement",title:U(c.narrative,n("network_growth.t7.title")),teaser:W(c.narrative,Oe),narrativeDetail:c.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t7","network_growth.t7.title"),gaio:D(n("network_growth.t7.title"),et(g,n)),rating:N("placement"),children:[a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t7.totals",{watch:c.imbalanced_count_watch,critical:c.imbalanced_count_critical})}),c.auto_placement_risk.flagged&&a.jsx("div",{className:"ng-placement-warn",role:"note",children:n("network_growth.t7.autoplace_warning",{side:te(c.auto_placement_risk.dominant_leg??"none")})}),a.jsx("ul",{className:"ng-cand-list",children:he.map(s=>a.jsxs("li",{className:`ng-place ng-place--${s.severity}`,children:[a.jsxs("div",{className:"ng-cand__top",children:[a.jsx("span",{className:"ng-cand__name",children:$(s.display_name,s.user_id)}),a.jsx("span",{className:`ng-chip ng-chip--sev-${s.severity}`,children:n(`network_growth.t7.severity.${s.severity}`)})]}),a.jsx("div",{className:"ng-cand__rank",children:n("network_growth.t7.member_ratio",{ratio:ke(s.generation_ratio),side:te(s.dominant_side)})}),s.cycles_lost_lifetime_estimate>0&&a.jsx("p",{className:"ng-cand__reason",children:n("network_growth.t7.member_loss",{cycles:s.cycles_lost_lifetime_estimate,usd:E(s.usd_lost_lifetime_upper_bound)})})]},s.user_id))}),a.jsx("p",{className:"ng-disclaimer",children:n("network_growth.t7.estimate_disclaimer")})]}),a.jsxs(M,{id:"structure",title:U(u.narrative,n("network_growth.t8.title")),teaser:W(u.narrative,De),narrativeDetail:u.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t8","network_growth.t8.title"),gaio:D(n("network_growth.t8.title"),tt(g,n)),rating:N("structure"),children:[a.jsxs("div",{className:"ng-stats",children:[a.jsx(J,{value:E(u.active_purchasing_count_30d),label:n("network_growth.t8.active_buyers")}),a.jsx(J,{value:E(u.builders_count),label:n("network_growth.t8.builders")}),a.jsx(J,{value:E(u.active_paid_rank_count),label:n("network_growth.t8.active_paid")}),a.jsx(J,{value:E(u.reactivatable_paid_rank_count),label:n("network_growth.t8.reactivatable_paid")})]}),a.jsxs("div",{className:`ng-binforce ng-binforce--${K.balance_status}`,children:[a.jsx("span",{className:"ng-binforce__dot","aria-hidden":"true"}),a.jsx("span",{children:K.dominant_side==="balanced"?n("network_growth.t8.binary_force_balanced",{status:n(`network_growth.t8.balance.${K.balance_status}`)}):n("network_growth.t8.binary_force",{ratio:ke(K.ratio),side:te(K.dominant_side),status:n(`network_growth.t8.balance.${K.balance_status}`)})})]}),R&&a.jsxs("div",{className:"ng-expansion",children:[a.jsx("div",{className:"ng-expansion__title",children:n("network_growth.t8.expansion_title",{rank:b(R.next_normal_rank_target,n)})}),a.jsx(be,{binary:R.binary_gap,branch:R.tree_branch_gap,t:n}),a.jsx("p",{className:"ng-aggregate",children:R.scp2_uncovered_levels>0?n("network_growth.t8.scp2_uncovered",{levels:R.scp2_uncovered_levels,cycles:R.scp2_cycles_per_month_locked}):n("network_growth.t8.scp2_covered")})]})]}),q.visible&&a.jsxs(M,{id:"levers",title:U(q.narrative,n("network_growth.t6.title")),teaser:W(q.narrative,Ke),narrativeDetail:q.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t6","network_growth.t6.title"),gaio:D(n("network_growth.t6.title"),rt(g,n)),rating:N("levers"),children:[q.scp2_active_members.length>0?a.jsx("ul",{className:"ng-lever-list",children:q.scp2_active_members.map(s=>a.jsxs("li",{className:"ng-lever",children:[a.jsx("span",{className:"ng-lever__name",children:$(s.display_name,s.user_id)}),a.jsxs("span",{className:"ng-lever__meta",children:[n("network_growth.t6.level",{level:s.position})," · ",Ae(s.team_sales)]})]},s.user_id))}):a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t6.empty")}),q.scp3_direct_referrals.length>0&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t6.referrals",{count:q.scp3_direct_referrals.length})})]})]})})}function Ot({out:r,digestV3:t,t:e,hasChatView:o,handleTalkToGaio:i,handleAskGaio:l,handlePlanWithGaio:d,sectionRating:_,actions:n,baseUrl:y,apiKey:N}){const{leader:g,context_mode:f,recommendations:C}=r,L=f.is_onboarding,h=L?"onboarding":g.mode,I=L?e("network_growth.v4.hero.onboarding_headline"):h==="defend"?e("network_growth.v4.hero.defend_headline",{rank:b(g.defend_target_rank??g.current_rank,e)}):e("network_growth.v4.hero.advance_headline",{rank:b(g.next_target_rank??g.current_rank,e)}),j=e(L?"network_growth.v4.hero.cta_onboarding":h==="defend"?"network_growth.v4.hero.cta_defend":"network_growth.v4.hero.cta_advance"),Y=L?It(f.member_count,f.has_binary_data,f.leader_has_paid_rank,e):null,z=c=>t.suggested_questions.filter(u=>u.section===c).slice(0,2),p=t.top_candidates.filter(c=>!C.some(u=>u.target_member?.user_id===c.user_id)),w=r.tiles.at_risk.members.find(c=>c.is_reactivatable&&c.has_active_substructure);return a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:`ng4 ng4--${h}`,children:[a.jsx("div",{className:"ng4__icon-row",children:a.jsx(ve,{panelKey:"network-growth",baseUrl:y,apiKey:N,t:e})}),a.jsxs("section",{className:`ng4-hero ng4-hero--${h}`,children:[a.jsx("p",{className:"ng4-hero__headline",children:I}),r.hero_reason&&a.jsx("p",{className:"ng4-hero__reason",children:r.hero_reason}),Y&&a.jsx("ol",{className:"ng4-hero__milestones",children:Y.map((c,u)=>a.jsxs("li",{className:`ng4-hero__milestone${c.done?" ng4-hero__milestone--done":""}`,children:[a.jsx("span",{className:"ng4-hero__milestone-dot","aria-hidden":"true"}),c.label]},u))}),o&&a.jsxs("button",{type:"button",className:"ng4-hero__cta",onClick:()=>d(j,ot(r,e)),children:[a.jsx(oe,{size:16,className:"ng4-hero__cta-owl"}),j]}),_("hero")]}),t.insights.length>0&&a.jsxs("section",{className:"ng4-section ng4-insights",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.insights.title")}),a.jsx("ul",{className:"ng4-insight-list",children:t.insights.map((c,u)=>a.jsx("li",{className:`ng4-insight ng4-insight--${c.severity}`,children:Mt(c,e)},u))}),o&&a.jsx(X,{questions:z("branches").concat(z("structure"),z("overview")).slice(0,2),onAsk:l,t:e}),_("insights")]}),t.hidden_leaders.length>0&&a.jsxs("section",{className:"ng4-section ng4-hidden",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.hidden.title")}),a.jsx("ul",{className:"ng4-hidden-list",children:t.hidden_leaders.map(c=>a.jsxs("li",{className:"ng4-hidden-row",children:[a.jsxs("div",{className:"ng4-hidden-row__info",children:[a.jsx("span",{className:"ng4-hidden-row__name",children:$(c.display_name,c.user_id)}),a.jsx("span",{className:"ng4-hidden-row__meta",children:b(c.rank,e)}),a.jsxs("span",{className:"ng4-hidden-row__caption",children:[c.team_sales>0&&a.jsxs(a.Fragment,{children:[e("network_growth.v4.hidden.team_sales",{sales:Ae(c.team_sales)})," · "]}),e("network_growth.t6.level",{level:c.height})]})]}),o&&a.jsx("button",{type:"button",className:"ng4-hidden-row__cta",onClick:()=>i(e("network_growth.v4.hidden.topic",{name:$(c.display_name,c.user_id)}),it(r,c,e)),children:e("network_growth.v4.hidden.cta")})]},c.user_id))}),o&&a.jsx(X,{questions:z("hidden_leaders"),onAsk:l,t:e}),_("hidden_leaders")]}),a.jsxs("section",{className:"ng4-section ng4-coach",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.coach.title")}),C.length===0&&p.length===0?a.jsx("p",{className:"ng-empty-note",children:e("network_growth.t3.empty")}):a.jsxs("ul",{className:"ng4-coach-list",children:[C.map(c=>a.jsxs("li",{className:"ng4-coach-item",children:[a.jsx("p",{className:"ng4-coach-item__reason",children:c.detail}),o&&a.jsx(Q,{label:e("network_growth.v4.coach.cta"),onClick:()=>i(c.title,Ne(r,c,e))})]},c.id)),p.map(c=>a.jsxs("li",{className:"ng4-coach-item",children:[a.jsx("span",{className:"ng4-coach-item__name",children:$(c.display_name,c.user_id)}),a.jsx("p",{className:"ng4-coach-item__reason",children:r.candidate_notes?.[c.user_id]??Se(c.reason_code,c.reason_params??{},c.current_rank,e)}),o&&a.jsx(Q,{label:e("network_growth.v4.coach.cta"),onClick:()=>i(e("network_growth.t2.gaio_headline",{name:$(c.display_name,c.user_id)}),nt(r,c,e))})]},c.user_id))]}),o&&a.jsx(X,{questions:z("cascade"),onAsk:l,t:e}),_("coach")]}),t.segments.reactivation_pool_count>0&&a.jsxs("section",{className:"ng4-section ng4-reactivation",children:[a.jsx("p",{className:"ng4-reactivation__sentence",children:w?e("network_growth.v4.reactivation.sentence_named",{name:$(w.display_name,w.user_id)}):e("network_growth.v4.reactivation.sentence")}),o&&a.jsx(X,{questions:z("reactivation"),onAsk:l,t:e}),_("reactivation")]})]})})}const Ut={slug:"network-growth",name:"Network Growth Tracker",version:"2.0.0",category:"interactive",requiredService:"network-growth",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"}],sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"network-growth",inputSchema:{type:"object",properties:{contract_version:{type:"string"},context_size:{type:"string"},leader:{type:"object"},tiles:{type:"object"},recommendations:{type:"array"},context_mode:{type:"object"},digest_v3:{type:"object"}},required:["contract_version","leader","tiles","recommendations"]}},events:{emits:[{name:"chat:draft",description:'User clicked "Talk to GAIO" on a recommendation — drafts the gaioContext into the chat bot'}]}};export{Vt as Component,Vt as NetworkGrowthBlock,Ut as manifest};
50
- //# sourceMappingURL=index-CNJUK2bK-C0OfCXUx.js.map
50
+ //# sourceMappingURL=index-BLT1bBjC-6c5Ar61I.js.map
@@ -1,2 +1,2 @@
1
1
  import{j as t,H as Pt,r as q,d as Vt}from"../nexly.js";import{x as _t,w as Rt}from"./accent-legibility-BJF2VO5n-CDPQ7suO.js";const It={slug:"gaio-dark",name:"GAIO Template Theme",version:"1.2.0",slots:["header","main","sidebar","footer"],cssVariables:{"--ai-bg":"#0F0F0F","--ai-bg-elevated":"#141414","--ai-bg-card":"#161616","--ai-bg-input":"#141414","--ai-bg-sidebar":"#121212","--ai-bg-footer":"#000000","--ai-fg":"#F5F5F5","--ai-fg-secondary":"#D1D5DB","--ai-muted":"#6B7280","--ai-muted-dim":"#4B5563","--ai-border":"#2a2a2a","--ai-border-subtle":"#1e1e1e","--ai-accent":"#C9A84C","--ai-accent-fg":"#0F0F0F","--ai-accent-hover":"#B8953F","--ai-accent-subtle":"rgba(201, 168, 76, 0.1)","--ai-accent-on-subtle":"#C9A84C","--ai-accent-on-subtle-strong":"#C9A84C","--ai-accent-border":"#6F5E2E","--ai-user-bubble":"#C9A84C","--ai-user-bubble-fg":"#0F0F0F","--ai-assistant-bubble":"#1a1a1a","--ai-assistant-bubble-fg":"#F5F5F5","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.7)","--ai-scrollbar":"#C9A84C","--ai-success":"#34D399","--ai-warning":"#FBBF24","--ai-error":"#F87171","--ai-info":"#6091BA","--ai-panel-width":"440px","--ai-panel-height":"720px","--ai-button-size":"80px","--ai-transition":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--ai-z-index":"999999","--es-color-surface":"#0F0F0F","--es-color-surface-elevated":"#1A1A1A","--es-color-surface-hover":"#2A2A2A","--es-color-on-surface":"#F5F5F5","--es-color-on-surface-muted":"#9CA3AF","--es-color-primary":"#C9A84C","--es-color-on-primary":"#0F0F0F","--es-color-primary-muted":"rgba(201, 168, 76, 0.1)","--es-color-primary-on-muted":"#C9A84C","--es-color-border":"#2a2a2a","--es-color-control-border":"#6B7280","--es-color-error":"#D27070","--es-color-success":"#5A9E6F","--es-color-on-success":"#0F0F0F","--es-color-interactive":"#E8D48B"},structure:{header:{id:"header",label:"Header",accepts:!0},sidebar:{id:"sidebar",label:"Sidebar Navigation",accepts:!1},main:{id:"main",label:"Main Content",accepts:!0},footer:{id:"footer",label:"Footer",accepts:!0}},defaultViews:[],requiredServices:["chat-bot","crypto-intel","event-scraper","venue-discovery"],description:"Premium dark theme with gold accents. Designed for crypto, fintech, and luxury e-commerce.",author:"E-Commerce Studio",planTierRequired:"free",packageName:"@ecommerce-studio/theme-gaio-dark",panels:[{id:"dashboard",name:"Dashboard",icon:"dashboard",order:0},{id:"coaching",name:"Coaching",icon:"coaching",order:1},{id:"discover",name:"Discover",icon:"discover",order:2},{id:"chat",name:"GAIO",icon:"chat",order:3},{id:"market",name:"Market",icon:"market",order:4},{id:"profile",name:"Profile",icon:"profile",order:5}],sidebarPosition:"right",options:[{id:"accentColor",type:"color",label:"Accent color",default:"#C9A84C",group:"Colors",cssVariable:"--ai-accent"},{id:"bgColor",type:"color",label:"Background",default:"#0F0F0F",group:"Colors",cssVariable:"--ai-bg"},{id:"textColor",type:"color",label:"Text color",default:"#F5F5F5",group:"Colors",cssVariable:"--ai-fg"},{id:"borderColor",type:"color",label:"Border color",default:"#2a2a2a",group:"Colors",cssVariable:"--ai-border"},{id:"panelWidth",type:"range",label:"Panel width",default:440,min:320,max:600,step:10,group:"Layout",cssVariable:"--ai-panel-width"},{id:"panelHeight",type:"range",label:"Panel height",default:720,min:480,max:900,step:10,group:"Layout",cssVariable:"--ai-panel-height"},{id:"initialOpen",type:"toggle",label:"Start open",default:!1,group:"Behavior"},{id:"position",type:"select",label:"Position",default:"bottom-right",group:"Layout",options:[{label:"Bottom Right",value:"bottom-right"},{label:"Bottom Left",value:"bottom-left"}]},{id:"sidebarPosition",type:"select",label:"Sidebar position",default:"right",group:"Layout",options:[{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Bottom",value:"bottom"},{label:"Hidden",value:"hidden"}]}],supports:{customCss:!0,customJs:!1,darkMode:!0,rtl:!1,views:!0}},Ot="http://www.w3.org/2000/svg",gt=27,vt=38,bt=53,Lt=38,J=1800,Tt=6400,Qt=1800,Mt=J+Tt,Gt=Mt+Qt,Y=Gt+60;function wt(r){return r<.5?4*r*r*r:1-(-2*r+2)**3/2}function $t(r){return Math.max(0,Math.min(1,r))}function c(r,i,s){const d=document.createElementNS(Ot,r);if(i)for(const e in i){const f=i[e];f!==void 0&&d.setAttribute(e,f)}return s&&s.forEach(e=>d.appendChild(e)),d}function st(r,i){const s=c("text",r);return s.textContent=i,s}function Ht(r){const i=r.querySelector('[data-owl="props"]');if(!i||i.childNodes.length)return;const s=e=>c("path",{d:"M0 2.2 C -1 0 -4 0.4 -4 3 C -4 5.4 0 7.4 0 7.4 C 0 7.4 4 5.4 4 3 C 4 0.4 1 0 0 2.2 Z",fill:e}),d=e=>c("path",{d:"M0 -4 L1.2 -1.2 L4 -1 L1.8 1 L2.4 3.8 L0 2.2 L-2.4 3.8 L-1.8 1 L-4 -1 L-1.2 -1.2 Z",fill:e});i.appendChild(c("g",{"data-owl":"glasses",opacity:"0"},[c("circle",{cx:"27",cy:"38",r:"11",fill:"#BAE6FD",opacity:"0.22"}),c("circle",{cx:"53",cy:"38",r:"11",fill:"#BAE6FD",opacity:"0.22"}),c("circle",{cx:"27",cy:"38",r:"12.5",fill:"none",stroke:"#1F2937","stroke-width":"2"}),c("circle",{cx:"53",cy:"38",r:"12.5",fill:"none",stroke:"#1F2937","stroke-width":"2"}),c("path",{d:"M39.5 37 Q40 34.5 40.5 37",stroke:"#1F2937","stroke-width":"2",fill:"none"}),c("path",{d:"M14.5 37 L6 33",stroke:"#1F2937","stroke-width":"2",fill:"none","stroke-linecap":"round"}),c("path",{d:"M65.5 37 L74 33",stroke:"#1F2937","stroke-width":"2",fill:"none","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"book",opacity:"0"},[c("path",{d:"M40 60 L22 57 Q20 57 20 59 L20 71 Q20 73 22 73 L40 74 Z",fill:"#FEF3C7",stroke:"#B45309","stroke-width":"1"}),c("path",{d:"M40 60 L58 57 Q60 57 60 59 L60 71 Q60 73 58 73 L40 74 Z",fill:"#FFF7ED",stroke:"#B45309","stroke-width":"1"}),c("line",{x1:"40",y1:"60",x2:"40",y2:"74",stroke:"#B45309","stroke-width":"1"}),c("line",{x1:"24",y1:"62",x2:"36",y2:"63.5",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"24",y1:"65",x2:"36",y2:"66.5",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"24",y1:"68",x2:"34",y2:"69.3",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"44",y1:"63.5",x2:"56",y2:"62",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"44",y1:"66.5",x2:"56",y2:"65",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"46",y1:"69.3",x2:"56",y2:"68",stroke:"#9CA3AF","stroke-width":"0.8"})])),i.appendChild(c("g",{"data-owl":"robot",opacity:"0"},[c("line",{x1:"86",y1:"40",x2:"86",y2:"34",stroke:"#64748B","stroke-width":"1.5"}),c("circle",{cx:"86",cy:"32.5",r:"1.8",fill:"#38BDF8"}),c("rect",{x:"78",y:"39",width:"16",height:"14",rx:"3",fill:"#CBD5E1",stroke:"#64748B","stroke-width":"1"}),c("circle",{"data-owl":"robot-eye-l",cx:"83",cy:"46",r:"2",fill:"#0EA5E9"}),c("circle",{"data-owl":"robot-eye-r",cx:"89",cy:"46",r:"2",fill:"#0EA5E9"}),c("rect",{x:"82",y:"50",width:"8",height:"1.6",rx:"0.8",fill:"#64748B"}),c("rect",{x:"80",y:"53.5",width:"12",height:"8",rx:"2",fill:"#94A3B8",stroke:"#64748B","stroke-width":"0.8"})])),i.appendChild(c("g",{"data-owl":"chat-bubble",opacity:"0",transform:"translate(50, 22) scale(0)"},[c("path",{d:"M2 -4 L1 2 L9 -4 Z",fill:"#FFFFFF"}),c("rect",{x:"0",y:"-20",width:"27",height:"16",rx:"5",fill:"#FFFFFF",stroke:"#E5E7EB","stroke-width":"0.6"}),c("line",{x1:"5",y1:"-14.5",x2:"21",y2:"-14.5",stroke:"#CBD5E1","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"5",y1:"-10",x2:"16",y2:"-10",stroke:"#CBD5E1","stroke-width":"2","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"phone",opacity:"0"},[c("rect",{x:"30",y:"50",width:"20",height:"30",rx:"4",fill:"#111827",stroke:"#374151","stroke-width":"1"}),c("rect",{x:"37",y:"51.6",width:"6",height:"1.4",rx:"0.7",fill:"#374151"}),c("clipPath",{id:"owl-phone-screen-clip"},[c("rect",{x:"32",y:"54",width:"16",height:"22",rx:"1.5"})]),c("g",{"clip-path":"url(#owl-phone-screen-clip)"},[c("rect",{x:"32",y:"54",width:"16",height:"22",fill:"#0EA5E9",opacity:"0.85"}),c("g",{"data-owl":"phone-feed"},[c("line",{x1:"34",y1:"58",x2:"46",y2:"58",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.9"}),c("line",{x1:"34",y1:"62",x2:"43",y2:"62",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.75"}),c("line",{x1:"34",y1:"66",x2:"46",y2:"66",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.6"}),c("line",{x1:"34",y1:"70",x2:"42",y2:"70",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.5"}),c("line",{x1:"34",y1:"74",x2:"45",y2:"74",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.4"})])])])),i.appendChild(c("g",{"data-owl":"headband",opacity:"0"},[c("path",{d:"M14 27 Q40 19 66 27 L66 31 Q40 23 14 31 Z",fill:"#EF4444"}),c("path",{d:"M15 29 L5 26",stroke:"#EF4444","stroke-width":"2.6","stroke-linecap":"round"}),c("path",{d:"M15 31 L6 32",stroke:"#EF4444","stroke-width":"2.6","stroke-linecap":"round"}),c("line",{x1:"32",y1:"23.6",x2:"32",y2:"26.6",stroke:"#FCA5A5","stroke-width":"1"}),c("line",{x1:"40",y1:"22.8",x2:"40",y2:"25.8",stroke:"#FCA5A5","stroke-width":"1"}),c("line",{x1:"48",y1:"23.6",x2:"48",y2:"26.6",stroke:"#FCA5A5","stroke-width":"1"})])),i.appendChild(c("g",{"data-owl":"motion",opacity:"0"},[c("line",{x1:"2",y1:"40",x2:"12",y2:"40",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"0",y1:"48",x2:"11",y2:"48",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"3",y1:"56",x2:"12",y2:"56",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"})])),i.appendChild(c("circle",{"data-owl":"sweat",cx:"63",cy:"34",r:"2.4",fill:"#38BDF8",opacity:"0"})),i.appendChild(c("g",{"data-owl":"social",opacity:"0"},[c("g",{"data-owl":"social-1",transform:"translate(20, 30)"},[s("#FB7185")]),c("g",{"data-owl":"social-2",transform:"translate(60, 26)"},[d("#FCD34D")]),c("g",{"data-owl":"social-3",transform:"translate(40, 18)"},[s("#F472B6")]),c("g",{"data-owl":"social-4",transform:"translate(70, 40)"},[c("circle",{cx:"0",cy:"0",r:"4.5",fill:"#34D399"}),c("path",{d:"M-2 0 L-0.6 1.6 L2.2 -1.6",stroke:"#FFFFFF","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})])])),i.appendChild(c("g",{"data-owl":"sleep-eyes",opacity:"0"},[c("circle",{cx:"27",cy:"38",r:"15",fill:"url(#owl-body-grad)"}),c("circle",{cx:"53",cy:"38",r:"15",fill:"url(#owl-body-grad)"}),c("path",{d:"M19 37 Q27 43 35 37",stroke:"#5C4413","stroke-width":"1.8",fill:"none","stroke-linecap":"round"}),c("path",{d:"M45 37 Q53 43 61 37",stroke:"#5C4413","stroke-width":"1.8",fill:"none","stroke-linecap":"round"}),c("path",{d:"M19 37 Q18 35.5 17 35.5",stroke:"#5C4413","stroke-width":"1",fill:"none","stroke-linecap":"round"}),c("path",{d:"M61 37 Q62 35.5 63 35.5",stroke:"#5C4413","stroke-width":"1",fill:"none","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"zzz",opacity:"0"},[st({"data-owl":"zzz-1",x:"57",y:"27","font-size":"6","font-weight":"700",fill:"#93C5FD","font-family":"sans-serif"},"z"),st({"data-owl":"zzz-2",x:"62",y:"20","font-size":"8","font-weight":"700",fill:"#7DD3FC","font-family":"sans-serif"},"Z"),st({"data-owl":"zzz-3",x:"69",y:"12","font-size":"10","font-weight":"700",fill:"#BAE6FD","font-family":"sans-serif"},"Z")])),i.appendChild(c("g",{"data-owl":"notes",opacity:"0"},[st({"data-owl":"note-1",x:"12",y:"30","font-size":"10",fill:"#5EEAD4","font-family":"sans-serif"},"♪"),st({"data-owl":"note-2",x:"64",y:"26","font-size":"9",fill:"#F472B6","font-family":"sans-serif"},"♫"),st({"data-owl":"note-3",x:"40",y:"12","font-size":"8",fill:"#FCD34D","font-family":"sans-serif"},"♪")])),i.appendChild(c("circle",{"data-owl":"cold-glow",cx:"40",cy:"42",r:"44",fill:"none",stroke:"#38BDF8","stroke-width":"3",opacity:"0"})),i.appendChild(c("g",{"data-owl":"frost",opacity:"0"},[c("g",{"data-owl":"flake-1",transform:"translate(14, 24)"},[d("#E0F2FE")]),c("g",{"data-owl":"flake-2",transform:"translate(66, 22)"},[d("#BAE6FD")]),c("g",{"data-owl":"flake-3",transform:"translate(40, 14)"},[d("#E0F2FE")])]))}function Yt(r){const i=s=>r.querySelector(s);return{svg:r,pupilL:i('[data-owl="pupil-l"]'),pupilR:i('[data-owl="pupil-r"]'),eyelidL:i('[data-owl="eyelid-top-l"]'),eyelidR:i('[data-owl="eyelid-top-r"]'),highlightL:i('[data-owl="highlight-l"]'),highlightR:i('[data-owl="highlight-r"]'),blushL:i('[data-owl="blush-l"]'),blushR:i('[data-owl="blush-r"]'),mouth:i('[data-owl="mouth"]'),glasses:i('[data-owl="glasses"]'),book:i('[data-owl="book"]'),robot:i('[data-owl="robot"]'),robotEyeL:i('[data-owl="robot-eye-l"]'),robotEyeR:i('[data-owl="robot-eye-r"]'),chatBubble:i('[data-owl="chat-bubble"]'),phone:i('[data-owl="phone"]'),phoneFeed:i('[data-owl="phone-feed"]'),headband:i('[data-owl="headband"]'),motion:i('[data-owl="motion"]'),sweat:i('[data-owl="sweat"]'),social:i('[data-owl="social"]'),socialItems:[1,2,3,4].map(s=>i(`[data-owl="social-${s}"]`)),sleepEyes:i('[data-owl="sleep-eyes"]'),zzz:i('[data-owl="zzz"]'),zzzItems:[1,2,3].map(s=>i(`[data-owl="zzz-${s}"]`)),notes:i('[data-owl="notes"]'),noteItems:[1,2,3].map(s=>i(`[data-owl="note-${s}"]`)),coldGlow:i('[data-owl="cold-glow"]'),frost:i('[data-owl="frost"]'),frostItems:[1,2,3].map(s=>i(`[data-owl="flake-${s}"]`))}}function Ut(r,i){const s=(d,e,f)=>d?.setAttribute(e,f);s(r.pupilL,"r","6.5"),s(r.pupilL,"cx",String(gt)),s(r.pupilL,"cy",String(vt)),s(r.pupilR,"r","6.5"),s(r.pupilR,"cx",String(bt)),s(r.pupilR,"cy",String(Lt)),s(r.highlightL,"r","4"),s(r.highlightR,"r","4"),s(r.eyelidL,"transform","translate(0, 0)"),s(r.eyelidR,"transform","translate(0, 0)"),s(r.blushL,"opacity","0.2"),s(r.blushR,"opacity","0.2"),s(r.mouth,"d","M35 55Q40 58 45 55"),s(r.mouth,"opacity","0.25"),s(r.mouth,"stroke-width","1.2"),r.svg.style.transform="",r.chatBubble&&r.chatBubble.setAttribute("transform","translate(50, 22) scale(0)"),r.phoneFeed&&r.phoneFeed.setAttribute("transform",""),["glasses","book","robot","chatBubble","phone","headband","motion","sweat","social","sleepEyes","zzz","notes","coldGlow","frost"].forEach(d=>{const e=r[d];e&&e.setAttribute("opacity","0")}),["glasses","book","phone","robot"].forEach(d=>{const e=r[d];e&&e.setAttribute("transform","")}),i&&(i.style.transform="")}function jt(r){if(!r.eyelidL||!r.eyelidR)return;const i=150,s=performance.now();function d(e){const f=Math.min((e-s)/i,1),S=(f<.5?wt(f*2):wt((1-f)*2))*12;r.eyelidL.setAttribute("transform",`translate(0, ${S})`),r.eyelidR.setAttribute("transform",`translate(0, ${S})`),f<1?requestAnimationFrame(d):(r.eyelidL.setAttribute("transform","translate(0, 0)"),r.eyelidR.setAttribute("transform","translate(0, 0)"))}requestAnimationFrame(d)}const zt=["sleeping","reading","ai-chat","jogging","social","phone","dancing","eye-rolling","freezing","zoom-in","thinking","whisper","warning"];function Jt(r,i,s,d){const e=Yt(r);let f=0,S=!1;const N=performance.now(),Z=()=>{S||(S=!0,f&&cancelAnimationFrame(f),Ut(e,i),d?.())},O=()=>Z(),l=(n,o,u)=>n?.setAttribute(o,u),_=n=>n<J?wt($t(n/J)):n<Mt?1:1-wt($t((n-Mt)/Qt));function B(n){function o(u){if(S)return;const j=u-N;if(n(j)){O();return}f=requestAnimationFrame(o)}f=requestAnimationFrame(o)}switch(s){case"sleeping":{B(n=>{const o=_(n);return l(e.sleepEyes,"opacity",String(o)),e.svg.style.transform=`translateY(${Math.sin(n/750)*1.6*o}px) rotate(${-6*o}deg)`,l(e.zzz,"opacity",String(o)),e.zzzItems.forEach((u,j)=>{if(!u)return;const D=(n+j*700)%2100/2100;u.setAttribute("opacity",String(Math.sin(D*Math.PI)*o)),u.setAttribute("transform",`translate(${D*5}, ${-D*8})`)}),n>Y});break}case"reading":{let n=!1,o=!1,u=!1;B(j=>{const D=_(j);e.glasses&&(e.glasses.setAttribute("opacity",String(D)),e.glasses.setAttribute("transform",`translate(0, ${-9*(1-D)})`)),e.book&&(e.book.setAttribute("opacity",String(D)),e.book.setAttribute("transform",`translate(0, ${10*(1-D)})`));const Q=4*D;return l(e.pupilL,"cy",String(38+Q)),l(e.pupilR,"cy",String(38+Q)),e.svg.style.transform=`rotate(${Math.sin(j/700)*2*D}deg)`,!n&&j>J+700&&(n=!0,jt(e)),!o&&j>J+2600&&(o=!0,jt(e)),!u&&j>J+4500&&(u=!0,jt(e)),j>Y});break}case"ai-chat":{B(n=>{const o=_(n);e.robot&&(e.robot.setAttribute("opacity",String(o)),e.robot.setAttribute("transform",`translate(${(1-o)*14}, 0)`));const u=Math.floor(n/640)%2;if(e.chatBubble){const j=u===0?o:0;e.chatBubble.setAttribute("opacity",String(j)),e.chatBubble.setAttribute("transform",`translate(50, 22) scale(${j})`)}if(e.robotEyeL&&e.robotEyeR){const j=2+(u===1?Math.abs(Math.sin(n/80)):0)*o;e.robotEyeL.setAttribute("r",String(j)),e.robotEyeR.setAttribute("r",String(j))}return e.svg.style.transform=`rotate(${Math.sin(n/300)*3*o}deg)`,n>Y});break}case"jogging":{B(n=>{const o=_(n);if(l(e.headband,"opacity",String(o)),e.svg.style.transform=`translateY(${-Math.abs(Math.sin(n/90))*6*o}px) rotate(${Math.sin(n/90)*3*o}deg)`,l(e.motion,"opacity",String((.4+.6*Math.abs(Math.sin(n/70)))*o)),e.sweat){const u=n/700%1;e.sweat.setAttribute("opacity",String((1-u)*o)),e.sweat.setAttribute("cy",String(34+u*12))}return l(e.blushL,"opacity",String(.15+.25*o)),l(e.blushR,"opacity",String(.15+.25*o)),n>Y});break}case"social":{const n=[[20,30],[60,26],[40,18],[70,40]];B(o=>{const u=_(o);return l(e.social,"opacity",String(u)),e.socialItems.forEach((j,D)=>{if(!j)return;const Q=(o+D*320)%1300/1300,[C,w]=n[D]??[0,0],R=Math.sin(Q*Math.PI);j.setAttribute("transform",`translate(${C}, ${w-Q*18}) scale(${.7+R*.5})`),j.setAttribute("opacity",String(R*u))}),e.svg.style.transform=`translateY(${Math.sin(o/220)*-2*u}px)`,l(e.blushL,"opacity",String(.2+.25*u)),l(e.blushR,"opacity",String(.2+.25*u)),o>Y});break}case"phone":{B(n=>{const o=_(n);e.phone&&(e.phone.setAttribute("opacity",String(o)),e.phone.setAttribute("transform",`translate(0, ${12*(1-o)})`));const u=5*o;return l(e.pupilL,"cy",String(38+u)),l(e.pupilR,"cy",String(38+u)),e.phoneFeed&&e.phoneFeed.setAttribute("transform",`translate(0, ${-(n/1400*22%22)})`),l(e.blushL,"opacity","0.15"),l(e.blushR,"opacity","0.15"),n>Y});break}case"dancing":{B(n=>{const o=_(n),u=n/300;return e.svg.style.transform=`translateY(${-Math.abs(Math.sin(u*2))*4*o}px) rotate(${Math.sin(u)*11*o}deg)`,l(e.blushL,"opacity",String(.2+.3*o)),l(e.blushR,"opacity",String(.2+.3*o)),l(e.mouth,"d","M34 55Q40 60 46 55"),l(e.mouth,"opacity",String(.4*o)),l(e.mouth,"stroke-width","1.5"),l(e.notes,"opacity",String(o)),e.noteItems.forEach((j,D)=>{if(!j)return;const Q=(n+D*400)%1200/1200;j.setAttribute("opacity",String(Math.sin(Q*Math.PI)*o)),j.setAttribute("transform",`translate(${Math.sin(Q*Math.PI*2)*3}, ${-Q*14})`)}),n>Y});break}case"eye-rolling":{B(n=>{const o=_(n),u=-Math.PI/2+n/1100*Math.PI*2,j=3.4*o;return l(e.pupilL,"cx",String(gt+Math.cos(u)*j)),l(e.pupilL,"cy",String(vt+Math.sin(u)*j)),l(e.pupilR,"cx",String(bt+Math.cos(u)*j)),l(e.pupilR,"cy",String(Lt+Math.sin(u)*j)),e.svg.style.transform=`rotate(${Math.sin(n/1100)*4*o}deg)`,l(e.mouth,"d","M35 56 L45 56"),l(e.mouth,"opacity",String(.35*o)),l(e.mouth,"stroke-width","1.3"),n>Y});break}case"freezing":{const n=[[14,24],[66,22],[40,14]];B(o=>{const u=_(o),j=5*u;l(e.eyelidL,"transform",`translate(0, ${j})`),l(e.eyelidR,"transform",`translate(0, ${j})`);const D=6.5-2.6*u;return l(e.pupilL,"r",String(D)),l(e.pupilR,"r",String(D)),l(e.coldGlow,"opacity",String((.15+.25*Math.abs(Math.sin(o/500)))*u)),l(e.frost,"opacity",String(u)),e.frostItems.forEach((Q,C)=>{if(!Q)return;const[w,R]=n[C]??[0,0],I=(o/1600+C*.33)%1;Q.setAttribute("transform",`translate(${w+Math.sin(o/400+C)*2}, ${R+I*10}) rotate(${o/20+C*60})`),Q.setAttribute("opacity",String(Math.sin(I*Math.PI)*.9*u))}),l(e.mouth,"d","M35 56 L45 56"),l(e.mouth,"opacity",String(.08+.28*u)),l(e.mouth,"stroke-width","1.3"),e.svg.style.transform=`rotate(${Math.sin(o/900)*1.5*u}deg)`,o>Y});break}case"zoom-in":{B(n=>{const o=_(n);i&&(i.style.transform=`scale(${1+.75*o})`);const u=6.5+3.2*o;l(e.pupilL,"r",String(u)),l(e.pupilR,"r",String(u));const j=4+1.6*o;l(e.highlightL,"r",String(j)),l(e.highlightR,"r",String(j));const D=Math.sin(n/260)*2.2*o,Q=Math.cos(n/330)*1.6*o;return l(e.pupilL,"cx",String(gt+D)),l(e.pupilL,"cy",String(vt+Q)),l(e.pupilR,"cx",String(bt+D)),l(e.pupilR,"cy",String(Lt+Q)),l(e.blushL,"opacity",String(.2+.15*o)),l(e.blushR,"opacity",String(.2+.15*o)),n>Y});break}case"thinking":{B(n=>{const o=_(n);e.svg.style.transform=`rotate(${-12*o}deg)`;const u=Math.sin(n/1300)*1.8*o;return l(e.pupilL,"cx",String(gt+u)),l(e.pupilR,"cx",String(bt+u)),l(e.pupilL,"cy",String(38-3.5*o)),l(e.pupilR,"cy",String(38-3.5*o)),l(e.pupilL,"r",String(6.5-1*o)),l(e.pupilR,"r",String(6.5-1*o)),n>Y});break}case"whisper":{B(n=>{const o=_(n);e.svg.style.transform=`scale(${1+.05*o})`,l(e.pupilL,"r",String(6.5+2*o)),l(e.pupilR,"r",String(6.5+2*o));const u=n>J+500&&n<J+950||n>J+2400&&n<J+2850;return l(e.eyelidR,"transform",`translate(0, ${u?9:0})`),l(e.blushL,"opacity",String(.2+.3*o)),l(e.blushR,"opacity",String(.2+.3*o)),n>Y});break}case"warning":{B(n=>{const o=_(n);e.svg.style.transform=`rotate(${Math.sin(n/80)*5*o}deg)`;const u=5*o;return l(e.eyelidL,"transform",`translate(0, ${u})`),l(e.eyelidR,"transform",`translate(0, ${u})`),l(e.blushL,"opacity","0.1"),l(e.blushR,"opacity","0.1"),n>Y});break}default:O()}return Z}const Xt="http://www.w3.org/2000/svg",kt=(()=>{const r=[-58,-50,-42,-34,-26,-18,-10,-2,6,14],i=[34,40,46,50,52,52,50,46,40,33];return r.map((s,d)=>({angle:s,len:i[d]??33,rx:-5+d*(10/(r.length-1)),ry:-13+Math.abs(d-4.5)*.5}))})(),Kt=[{angle:-46,len:20,rx:-9,ry:-2},{angle:-33,len:22,rx:-6,ry:-3},{angle:-20,len:23,rx:-3,ry:-4},{angle:-8,len:22,rx:0,ry:-4},{angle:4,len:20,rx:3,ry:-3},{angle:16,len:17,rx:6,ry:-2}],te=[{angle:-28,len:15,rx:-7,ry:3},{angle:-12,len:17,rx:-4,ry:4},{angle:3,len:17,rx:-1,ry:4.5},{angle:18,len:15,rx:2,ry:4},{angle:33,len:12,rx:5,ry:3}];function ee(r,i){return`M0 0 C ${-i} ${-r*.28} ${-i*.9} ${-r*.72} 0 ${-r} C ${i*.9} ${-r*.72} ${i} ${-r*.28} 0 0 Z`}function re(r){const i=r.querySelector('[data-owl="wing-l"]');if(!i||i.childNodes.length)return;const s=(e,f)=>{const S=document.createElementNS(Xt,e);for(const N in f)S.setAttribute(N,f[N]);return S},d=(e,f,S,N)=>{const Z=s("path",{d:ee(e,f),fill:S,stroke:"#8B6914","stroke-width":"0.7","stroke-linejoin":"round"});return N?[Z,s("path",{d:`M0 -3 L0 ${-(e-4)}`,stroke:"#7A6220","stroke-width":"0.5",fill:"none",opacity:"0.4"})]:[Z]};kt.forEach((e,f)=>{const S=s("g",{"data-owl":`wing-feather-${f+1}`,transform:`translate(${e.rx}, ${e.ry}) rotate(0)`});d(e.len,4.2,"url(#owl-feather-grad)",!0).forEach(N=>S.appendChild(N)),i.appendChild(S)}),Kt.forEach(e=>{const f=s("g",{transform:`translate(${e.rx}, ${e.ry}) rotate(${e.angle})`});d(e.len,4.6,"url(#owl-feather-grad)",!0).forEach(S=>f.appendChild(S)),i.appendChild(f)}),te.forEach(e=>{const f=s("g",{transform:`translate(${e.rx}, ${e.ry}) rotate(${e.angle})`});d(e.len,4.4,"url(#owl-feather-grad-dark)",!1).forEach(S=>f.appendChild(S)),i.appendChild(f)})}function m(r,i,s,d,e,f){const S=-s*(r.x-i),N=-d*r.v,Z=(S+N)/e;return{x:r.x+r.v*f,v:r.v+Z*f}}function ot(r,i,s=.3){return Math.abs(r.v)<s&&Math.abs(r.x-i)<s}function U(r){return r<.5?4*r*r*r:1-(-2*r+2)**3/2}function ie(r){return 1+2.70158*(r-1)**3+1.70158*(r-1)**2}const St=27,Bt=38,Et=53,Dt=38,oe=3.5;function ae(r){const i=D=>r.querySelector(D),s=i('[data-owl="pupil-l"]'),d=i('[data-owl="pupil-r"]'),e=i('[data-owl="eyelid-top-l"]'),f=i('[data-owl="eyelid-top-r"]'),S=i('[data-owl="highlight-l"]'),N=i('[data-owl="highlight-r"]'),Z=i('[data-owl="glow"]'),O=i('[data-owl="eureka-symbol"]'),l=i('[data-owl="exclamation"]'),_=i('[data-owl="blush-l"]'),B=i('[data-owl="blush-r"]'),n=i('[data-owl="mouth"]');if(!s||!d||!e||!f||!S||!N||!Z||!O||!l||!_||!B||!n)return null;const o=[];for(let D=1;D<=7;D++){const Q=i(`[data-owl="ray-${D}"]`);Q&&o.push(Q)}const u=i('[data-owl="wing-l"]'),j=u?Array.from(u.children).slice(0,kt.length):[];return{svg:r,pupilL:s,pupilR:d,eyelidL:e,eyelidR:f,highlightL:S,highlightR:N,glow:Z,eureka:O,exclamation:l,blushL:_,blushR:B,mouth:n,rays:o,wingL:u,wingStaticL:i('[data-owl="wing-static-l"]'),chatBubble:i('[data-owl="chat-bubble"]'),notifDot:i('[data-owl="notif-dot"]'),wingFeathers:j}}function Wt(r,i,s,d,e){const f=r.getBoundingClientRect(),S=f.left+d/80*f.width,N=f.top+e/80*f.height,Z=i-S,O=s-N,l=Math.sqrt(Z*Z+O*O);if(l===0)return{x:0,y:0};const _=Math.min(l,300)/300*oe;return{x:Z/l*_,y:O/l*_}}function se(r,i,s,d=!1){r.pupilL.setAttribute("r","6.5"),r.pupilL.setAttribute("cx",String(St)),r.pupilL.setAttribute("cy",String(Bt)),r.pupilR.setAttribute("r","6.5"),r.pupilR.setAttribute("cx",String(Et)),r.pupilR.setAttribute("cy",String(Dt)),r.highlightL.setAttribute("r","4"),r.highlightL.setAttribute("cx","22"),r.highlightL.setAttribute("cy","33"),r.highlightR.setAttribute("r","4"),r.highlightR.setAttribute("cx","48"),r.highlightR.setAttribute("cy","33"),r.eyelidL.setAttribute("transform","translate(0, 0)"),r.eyelidR.setAttribute("transform","translate(0, 0)"),s.set(r.svg,{lx:0,ly:0,rx:0,ry:0}),r.svg.style.transform="",r.glow.setAttribute("opacity","0"),r.eureka.setAttribute("opacity","0"),r.eureka.setAttribute("transform","translate(58, -6)"),r.exclamation.setAttribute("opacity","0"),r.exclamation.setAttribute("transform","translate(-6, 6)"),r.blushL.setAttribute("opacity","0.2"),r.blushR.setAttribute("opacity","0.2"),r.mouth.setAttribute("d","M35 55Q40 58 45 55"),r.mouth.setAttribute("opacity","0.25"),r.mouth.setAttribute("stroke-width","1.2"),r.rays.forEach(e=>e.setAttribute("opacity","0")),r.wingL?.setAttribute("opacity","0"),r.wingL?.setAttribute("transform","translate(21, 59) scale(0)"),r.wingStaticL?.setAttribute("opacity","1"),r.chatBubble?.setAttribute("opacity","0"),r.chatBubble?.setAttribute("transform","translate(50, 22) scale(0)"),r.notifDot?.setAttribute("opacity",d?"1":"0"),r.notifDot?.setAttribute("r","5"),i&&(i.style.transform="")}function ne(r,i){const s=q.useRef(new Set),d=q.useRef(0),e=q.useRef(!1),f=q.useRef(null),S=q.useRef(!1),N=q.useRef(!1),Z=q.useRef(null),O=q.useRef(new WeakMap),l=q.useRef(0),_=q.useCallback(C=>{const w=s.current;if(C)w.add(C),re(C),S.current&&!N.current&&C.querySelector('[data-owl="notif-dot"]')?.setAttribute("opacity","1");else for(const R of w)R.isConnected||w.delete(R)},[]),B=q.useCallback(()=>{const C=[];for(const w of s.current){const R=ae(w);R&&C.push(R)}return C},[]),n=q.useCallback(()=>{const C=performance.now();function w(R){const I=Math.min((R-C)/150,1),y=(I<.5?U(I*2):U((1-I)*2))*12;for(const a of B())a.eyelidL.setAttribute("transform",`translate(0, ${y})`),a.eyelidR.setAttribute("transform",`translate(0, ${y})`);if(I<1)requestAnimationFrame(w);else for(const a of B())a.eyelidL.setAttribute("transform","translate(0, 0)"),a.eyelidR.setAttribute("transform","translate(0, 0)")}requestAnimationFrame(w)},[B]),o=q.useCallback(()=>{const C=B();for(const w of C)w.glow.setAttribute("opacity","0.3"),w.blushL.setAttribute("opacity","0.4"),w.blushR.setAttribute("opacity","0.4");setTimeout(()=>{for(const w of B())w.glow.setAttribute("opacity","0"),w.blushL.setAttribute("opacity","0.2"),w.blushR.setAttribute("opacity","0.2")},500)},[B]),u=q.useCallback(C=>{if(f.current&&(f.current(),f.current=null),e.current||B().length===0)return;if(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){o();return}e.current=!0;const w=performance.now(),R=y=>{for(const a of B()){const h=a.svg.closest(".gaio-theme__button");y(a,h)}},I=()=>{for(const y of B()){const a=y.svg.closest(".gaio-theme__button");se(y,a,O.current,S.current)}N.current=!1,e.current=!1};if(C==="eureka"){let y=function(z){const F=.016666666666666666,X=z-w;if(b===0&&X>300&&(b=1),b===1&&X>1100&&(b=2),b===2&&X>2400&&(b=3),b===0&&(a=m(a,.7,180,16,1,F),h=m(h,-10,160,10,1.2,F),k=m(k,1.1,250,6,.6,F),g=m(g,0,180,8,.8,F)),b===1&&(a=m(a,1.2,200,10,.8,F),h=m(h,5,220,10,1,F),p=m(p,.55,200,7,1,F),L=m(L,1.18,250,5,.6,F),A=m(A,.55,160,10,1,F),v=m(v,-6,180,7,.7,F),x=m(x,1.15,220,5,.5,F),M=m(M,1,200,8,1,F),k=m(k,.9,100,12,1,F),g=m(g,-2,80,10,1,F)),b===2){const W=(X-1100)/1300;h={x:Math.sin(W*Math.PI*5)*4*(1-W),v:0},a=m(a,1.1,100,12,1,F),A=m(A,.6,80,10,1,F),p=m(p,.25,50,10,1,F),L=m(L,1.06,100,10,1,F),v={x:-6+Math.sin(W*Math.PI*3)*2.5,v:0},x=m(x,1,80,10,1,F),M=m(M,.6,60,10,1,F),k=m(k,0,100,8,1,F)}b===3&&(a=m(a,1,90,14,1,F),h=m(h,0,70,12,1,F),p=m(p,0,50,10,1,F),L=m(L,1,70,12,1,F),x=m(x,0,100,10,1,F),v=m(v,12,50,10,1,F),k=m(k,0,80,10,1,F),A=m(A,.2,50,10,1,F),M=m(M,0,60,10,1,F));const T=6.5*a.x,K=String(Math.max(2.5,T)),E=String(4*Math.max(.4,a.x*.65)),G=`rotate(${h.x}deg)`,nt=String(Math.max(0,p.x)),lt=`scale(${L.x})`,P=Math.max(0,x.x),H=String(Math.min(1,P)),ht=`translate(58, ${v.x}) scale(${P})`,ut=Math.max(0,k.x),tt=String(Math.min(1,ut)),At=`translate(-6, ${g.x}) scale(${ut})`,pt=String(A.x),ft=(b===1||b===2)&&P>.3;if(ft&&($+=.1),R((W,at)=>{if(W.pupilL.setAttribute("r",K),W.pupilR.setAttribute("r",K),W.highlightL.setAttribute("r",E),W.highlightR.setAttribute("r",E),W.svg.style.transform=G,W.glow.setAttribute("opacity",nt),at&&(at.style.transform=lt),W.eureka.setAttribute("opacity",H),W.eureka.setAttribute("transform",ht),W.exclamation.setAttribute("opacity",tt),W.exclamation.setAttribute("transform",At),ft?W.rays.forEach((et,Ft)=>{const xt=.2+.8*Math.abs(Math.sin($+Ft*.9));et.setAttribute("opacity",String(xt*Math.min(1,P)))}):W.rays.forEach(et=>et.setAttribute("opacity","0")),W.blushL.setAttribute("opacity",pt),W.blushR.setAttribute("opacity",pt),b===1||b===2){const et=Math.min(1,(X-300)/600);W.mouth.setAttribute("d",`M34 55Q40 ${58+et*3} 46 55`),W.mouth.setAttribute("opacity","0.4"),W.mouth.setAttribute("stroke-width","1.5")}else b===3&&(W.mouth.setAttribute("d","M35 55Q40 58 45 55"),W.mouth.setAttribute("opacity","0.25"),W.mouth.setAttribute("stroke-width","1.2"))}),b===3&&ot(a,1)&&ot(h,0)&&ot(p,0)&&ot(L,1)&&ot(x,0)&&ot(k,0)&&ot(A,.2,.05)){I();return}d.current=requestAnimationFrame(y)},a={x:1,v:0},h={x:0,v:0},p={x:0,v:0},L={x:1,v:0},v={x:18,v:0},x={x:0,v:0},g={x:12,v:0},k={x:0,v:0},A={x:.2,v:0},M={x:0,v:0},b=0,$=0;d.current=requestAnimationFrame(y);return}if(C==="notification"){let y=function(K){const E=K-w;let G;E<g?G=U(T(E/g)):E<$?G=1:G=1-U(T((E-$)/M));const nt=v*G,lt=a[0]+(h[0]-a[0])*G,P=a[1]+(h[1]-a[1])*G,H=`scale(${1+.18*G})`,ht=String(.2+.2*G),ut=String(Math.max(0,1-G*1.6));let tt;if(E<g)tt=p*U(T(E/g));else if(E<b){const V=(E-g)/k;tt=p+Math.sin(V*Math.PI*4)*9}else if(E<$){const V=U(T((E-b)/A));tt=p+(L-p)*V}else{const V=U(T((E-$)/M));tt=L*(1-V)}const At=`translate(${lt}, ${P}) rotate(${tt}) scale(${Math.max(0,nt)})`,pt=String(Math.max(0,G)),ft=kt.map((V,rt)=>{let it,ct=0;if(E<g)it=U(T((E-rt*16)/(g*.72)));else if(E<b){it=1;const dt=(E-g)/k;ct=Math.sin(dt*Math.PI*4-rt*.55)*7*(1-dt*.3)}else if(E<$){it=1;const dt=(E-b)/A;ct=Math.sin((1-dt)*Math.PI*2-rt*.4)*3*(1-dt)}else it=1-U(T((E-$-(X-1-rt)*14)/(M*.72)));const yt=V.angle*(x+(1-x)*it)+ct;return`translate(${V.rx}, ${V.ry}) rotate(${yt})`});let W=0,at=0;if(E>=b&&E<$)W=ie(T((E-b)/300)),at=T((E-b)/170);else if(E>=$){const V=U(T((E-$)/(M*.6)));W=1-V,at=1-V}const et=String(Math.max(0,at)),Ft=`translate(50, 22) scale(${Math.max(0,W)})`,xt=E>=z&&S.current?T((E-z)/F):0,qt=String(xt),Zt=String(5+Math.sin(xt*Math.PI)*1.6);if(R((V,rt)=>{rt&&(rt.style.transform=H),V.blushL.setAttribute("opacity",ht),V.blushR.setAttribute("opacity",ht),V.wingStaticL?.setAttribute("opacity",ut),V.wingL?.setAttribute("opacity",pt),V.wingL?.setAttribute("transform",At),V.wingFeathers.forEach((it,ct)=>{const yt=ft[ct];yt&&it.setAttribute("transform",yt)}),V.chatBubble?.setAttribute("opacity",et),V.chatBubble?.setAttribute("transform",Ft),E>=z&&(V.notifDot?.setAttribute("opacity",qt),V.notifDot?.setAttribute("r",Zt))}),E>z+F+60){I();return}d.current=requestAnimationFrame(y)};N.current=!0;const a=[21,59],h=[13,55],p=-48,L=-72,v=1.6,x=.2,g=520,k=660,A=480,M=620,b=g+k,$=b+A,z=$+M,F=260,X=kt.length,T=K=>Math.max(0,Math.min(1,K));d.current=requestAnimationFrame(y);return}if(C==="attention"){let y=function(p){const L=.016666666666666666,v=p-w;a=m(a,4.5,240,14,1,L),h=m(h,v<500?.4:0,180,10,1,L);const x=4+Math.sin(v/150)*1.5,g=String(Math.max(2.5,a.x)),k=String(x),A=String(Math.max(0,h.x));if(R(M=>{M.pupilL.setAttribute("r",g),M.pupilR.setAttribute("r",g),M.highlightL.setAttribute("r",k),M.highlightR.setAttribute("r",k),M.glow.setAttribute("opacity",A)}),v>1500){I();return}d.current=requestAnimationFrame(y)},a={x:6.5,v:0},h={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="important"){let y=function(L){const v=.016666666666666666,x=L-w,g=x<1100;a=m(a,g?0:12,220,9,.7,v),h=m(h,x<350?1.2:g?1:0,240,8,.6,v),p=m(p,x<500?.25:0,160,10,1,v);const k=Math.max(0,h.x),A=String(Math.min(1,k)),M=`translate(-6, ${a.x}) scale(${k})`,b=String(Math.max(0,p.x));if(R($=>{$.exclamation.setAttribute("opacity",A),$.exclamation.setAttribute("transform",M),$.glow.setAttribute("opacity",b)}),x>1500){I();return}d.current=requestAnimationFrame(y)},a={x:12,v:0},h={x:0,v:0},p={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="success"){let y=function(L){const v=.016666666666666666,x=L-w;a=m(a,x<400?-8:0,220,11,1,v),h=m(h,x<1500?.55:.2,120,12,1,v),p=m(p,x<1500?.3:0,120,12,1,v);const g=4+Math.sin(x/180)*1,k=`translateY(${a.x}px)`,A=String(g),M=String(h.x),b=String(Math.max(0,p.x)),$=x<1700;if(R(z=>{z.svg.style.transform=k,z.highlightL.setAttribute("r",A),z.highlightR.setAttribute("r",A),z.blushL.setAttribute("opacity",M),z.blushR.setAttribute("opacity",M),z.glow.setAttribute("opacity",b),$&&(z.mouth.setAttribute("d","M34 55Q40 60 46 55"),z.mouth.setAttribute("opacity","0.4"),z.mouth.setAttribute("stroke-width","1.5"))}),x>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:.2,v:0},p={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="thinking"){let y=function(L){const v=.016666666666666666,x=L-w,g=x<1500;a=m(a,g?-12:0,200,13,1,v),h=m(h,g?34.5:38,200,13,1,v),p=m(p,g?5.5:6.5,200,13,1,v);const k=`rotate(${a.x}deg)`,A=String(h.x),M=String(Math.max(2.5,p.x));if(R(b=>{b.svg.style.transform=k,b.pupilL.setAttribute("cy",A),b.pupilR.setAttribute("cy",A),b.pupilL.setAttribute("r",M),b.pupilR.setAttribute("r",M)}),x>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:38,v:0},p={x:6.5,v:0};d.current=requestAnimationFrame(y);return}if(C==="warning"){let y=function(p){const L=.016666666666666666,v=p-w;let x=0;v<350?x=-5:v<700?x=5:v<1050?x=-3:x=0,a=m(a,x,260,12,1,L),h=m(h,v<1600?8:0,200,13,1,L);const g=`rotate(${a.x}deg)`,k=`translate(0, ${h.x})`;if(R(A=>{A.svg.style.transform=g,A.eyelidL.setAttribute("transform",k),A.eyelidR.setAttribute("transform",k),A.blushL.setAttribute("opacity","0.1"),A.blushR.setAttribute("opacity","0.1")}),v>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="greeting"){let y=function(v){const x=.016666666666666666,g=v-w;let k=10;g>400&&g<800?k=-5:g>=800&&(k=0),a=m(a,k,220,12,1,x),h=m(h,g<1100?.25:.2,120,12,1,x),!p&&g>200&&(p=!0,n()),!L&&g>500&&(L=!0,n());const A=`rotate(${a.x}deg)`,M=String(h.x);if(R(b=>{b.svg.style.transform=A,b.blushL.setAttribute("opacity",M),b.blushR.setAttribute("opacity",M)}),g>1500){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:.15,v:0},p=!1,L=!1;d.current=requestAnimationFrame(y);return}if(C==="celebrate"){let y=function(a){const h=a-w,p=Math.min(h/2e3,1),L=p*360,v=Math.sin(p*Math.PI)*.6,x=.15+Math.sin(p*Math.PI)*.45,g=1+Math.sin(p*Math.PI)*.1,k=`rotate(${L}deg)`,A=String(Math.max(0,v)),M=String(x),b=`scale(${g})`;if(R(($,z)=>{$.svg.style.transform=k,$.glow.setAttribute("opacity",A),$.blushL.setAttribute("opacity",M),$.blushR.setAttribute("opacity",M),z&&(z.style.transform=b)}),h>2e3){I();return}d.current=requestAnimationFrame(y)};d.current=requestAnimationFrame(y);return}if(C==="whisper"){let y=function(v){const x=.016666666666666666,g=v-w,k=g<1500;a=m(a,k?1.05:1,200,14,1,x),h=m(h,k?8.5:6.5,200,14,1,x);const A=g>500&&g<1100;L=m(L,A?9:0,220,13,1,x),p=m(p,g<700?.5:g<1500?.3:.2,120,12,1,x);const M=`scale(${a.x})`,b=String(Math.max(2.5,h.x)),$=`translate(0, ${L.x})`,z=String(p.x);if(R(F=>{F.svg.style.transform=M,F.pupilL.setAttribute("r",b),F.pupilR.setAttribute("r",b),F.eyelidR.setAttribute("transform",$),F.blushL.setAttribute("opacity",z),F.blushR.setAttribute("opacity",z)}),g>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:1,v:0},h={x:6.5,v:0},p={x:.15,v:0},L={x:0,v:0};d.current=requestAnimationFrame(y);return}e.current=!1},[B,n,o]),j=q.useCallback(C=>{if(S.current=C,!(C&&N.current))for(const w of B())w.notifDot?.setAttribute("opacity",C?"1":"0"),w.notifDot?.setAttribute("r","5")},[B]);q.useEffect(()=>{const C=O.current;function w(y){Z.current={x:y.clientX,y:y.clientY}}function R(){if(!e.current&&!f.current){const y=Z.current;for(const a of B()){const h=C.get(a.svg)??{lx:0,ly:0,rx:0,ry:0};let p=0,L=0,v=0,x=0;if(y){const g=Wt(a.svg,y.x,y.y,St,Bt),k=Wt(a.svg,y.x,y.y,Et,Dt);p=g.x,L=g.y,v=k.x,x=k.y}h.lx+=(p-h.lx)*.12,h.ly+=(L-h.ly)*.12,h.rx+=(v-h.rx)*.12,h.ry+=(x-h.ry)*.12,C.set(a.svg,h),a.pupilL.setAttribute("cx",String(St+h.lx)),a.pupilL.setAttribute("cy",String(Bt+h.ly)),a.pupilR.setAttribute("cx",String(Et+h.rx)),a.pupilR.setAttribute("cy",String(Dt+h.ry)),a.highlightL.setAttribute("cx",String(22+h.lx*.4)),a.highlightL.setAttribute("cy",String(33+h.ly*.4)),a.highlightR.setAttribute("cx",String(48+h.rx*.4)),a.highlightR.setAttribute("cy",String(33+h.ry*.4))}}l.current=requestAnimationFrame(R)}document.addEventListener("mousemove",w),l.current=requestAnimationFrame(R);const I=setInterval(()=>{e.current||n()},2500+Math.random()*2500);return()=>{document.removeEventListener("mousemove",w),cancelAnimationFrame(l.current),clearInterval(I),d.current&&cancelAnimationFrame(d.current),e.current=!1}},[r,B,n]);const D=i?.enabled??!1,Q=Math.max(3e3,i?.intervalMs??1e4);return q.useEffect(()=>{if(!D||s.current.size===0||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;for(const w of s.current)Ht(w);const C=setInterval(()=>{if(e.current||f.current)return;const w=[...s.current].filter(a=>a.isConnected);if(w.length===0)return;const R=zt[Math.floor(Math.random()*zt.length)]??"sleeping",I=()=>{f.current=null;for(const a of w)O.current.set(a,{lx:0,ly:0,rx:0,ry:0})},y=w.map((a,h)=>{const p=a.closest(".gaio-theme__button");return Jt(a,p,R,h===0?I:void 0)});f.current=()=>{for(const a of y)a();I()}},Q);return()=>{clearInterval(C),f.current&&(f.current(),f.current=null)}},[r,D,Q]),{registerSvg:_,react:u,setNotifBadge:j}}const le=["notification","attention","eureka","important","success","thinking","warning","greeting","celebrate","whisper"];function ce({owl:r}){return typeof window<"u"&&new URLSearchParams(window.location.search).get("owlDebug")!=="1"?null:t.jsxs("div",{"data-testid":"owl-debug-panel",style:{position:"fixed",bottom:90,right:16,zIndex:9999,background:"rgba(0,0,0,0.8)",borderRadius:8,padding:8,display:"flex",flexDirection:"column",gap:4},children:[le.map(i=>t.jsx("button",{type:"button",onClick:()=>{r.react(i),i==="notification"&&r.setNotifBadge(!0)},style:{color:"white",background:"#333",border:"1px solid #555",borderRadius:4,padding:"4px 8px",cursor:"pointer",fontSize:12},children:i},i)),t.jsx("button",{type:"button",onClick:()=>r.setNotifBadge(!1),style:{color:"white",background:"#5a1f1f",border:"1px solid #555",borderRadius:4,padding:"4px 8px",cursor:"pointer",fontSize:12},children:"clear dot"})]})}function Nt({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})}function de({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M4 14h6v6"}),t.jsx("path",{d:"M20 10h-6V4"}),t.jsx("path",{d:"M14 10l7-7"}),t.jsx("path",{d:"M3 21l7-7"})]})}function he({size:r=18,className:i}){return t.jsx("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Ct({size:r=64,className:i,svgRef:s}){return t.jsxs("svg",{ref:s,className:i,width:r,height:r,viewBox:"0 0 80 80",fill:"none","aria-hidden":"true",style:{overflow:"visible",transformOrigin:"40px 42px"},children:[t.jsx("circle",{"data-owl":"glow",cx:"40",cy:"42",r:"44",fill:"none",stroke:"#FCD34D",strokeWidth:"3",opacity:"0"}),t.jsxs("g",{"data-owl":"eureka-symbol",opacity:"0",transform:"translate(58, -6)",children:[t.jsx("ellipse",{cx:"10",cy:"8",rx:"8",ry:"9",fill:"#FDE68A"}),t.jsx("ellipse",{cx:"10",cy:"7",rx:"5.5",ry:"6",fill:"#FEF9C3",opacity:"0.7"}),t.jsx("path",{d:"M7.5 9C8 6 9 5 10 7C11 5 12 6 12.5 9",stroke:"#F59E0B",strokeWidth:"1",fill:"none",strokeLinecap:"round"}),t.jsx("rect",{x:"6",y:"16.5",width:"8",height:"2",rx:"1",fill:"#F59E0B"}),t.jsx("rect",{x:"6.5",y:"18.5",width:"7",height:"1.5",rx:"0.75",fill:"#D97706"}),t.jsx("rect",{x:"7",y:"20",width:"6",height:"1.2",rx:"0.6",fill:"#B45309"}),t.jsx("circle",{cx:"10",cy:"22",r:"1",fill:"#92400E"}),t.jsx("line",{"data-owl":"ray-1",x1:"10",y1:"-4",x2:"10",y2:"-1.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-2",x1:"20",y1:"3",x2:"17.5",y2:"4.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-3",x1:"20",y1:"13",x2:"17.5",y2:"11.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-4",x1:"0",y1:"3",x2:"2.5",y2:"4.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-5",x1:"0",y1:"13",x2:"2.5",y2:"11.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-6",x1:"18",y1:"-1",x2:"16",y2:"1",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-7",x1:"2",y1:"-1",x2:"4",y2:"1",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"})]}),t.jsxs("g",{"data-owl":"exclamation",opacity:"0",transform:"translate(-6, 6)",children:[t.jsx("rect",{x:"3",y:"0",width:"5",height:"14",rx:"2.5",fill:"#F59E0B"}),t.jsx("circle",{cx:"5.5",cy:"18",r:"2.5",fill:"#F59E0B"})]}),t.jsx("path",{d:"M16 18Q20 4 28 20Z",fill:"#C9A84C",opacity:.7}),t.jsx("path",{d:"M64 18Q60 4 52 20Z",fill:"#C9A84C",opacity:.7}),t.jsx("path",{d:"M18 17Q21 8 25 19Z",fill:"#D4B85C",opacity:.4}),t.jsx("path",{d:"M62 17Q59 8 55 19Z",fill:"#D4B85C",opacity:.4}),t.jsx("path",{d:"M19 12Q20 6 22 14Z",fill:"#8B6914",opacity:.6}),t.jsx("path",{d:"M61 12Q60 6 58 14Z",fill:"#8B6914",opacity:.6}),t.jsx("path",{d:"M20 8Q20.5 5 21.5 10Z",fill:"#5C4413",opacity:.5}),t.jsx("path",{d:"M60 8Q59.5 5 58.5 10Z",fill:"#5C4413",opacity:.5}),t.jsx("circle",{cx:20.5,cy:6,r:.8,fill:"#2DD4BF",opacity:.2}),t.jsx("circle",{cx:59.5,cy:6,r:.8,fill:"#2DD4BF",opacity:.2}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",fill:"url(#owl-body-grad)"}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",stroke:"#A8893A",strokeWidth:"1.5",fill:"none",opacity:.35}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",fill:"url(#owl-body-shade)",opacity:.2}),t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"owl-body-grad",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"#D4B85C"}),t.jsx("stop",{offset:"50%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#A8893A"})]}),t.jsxs("radialGradient",{id:"owl-belly-grad",cx:"50%",cy:"45%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FEF9C3",stopOpacity:.35}),t.jsx("stop",{offset:"60%",stopColor:"#F5E6B8",stopOpacity:.2}),t.jsx("stop",{offset:"100%",stopColor:"#C9A84C",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"owl-body-shade",cx:"50%",cy:"40%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"transparent"}),t.jsx("stop",{offset:"70%",stopColor:"transparent"}),t.jsx("stop",{offset:"100%",stopColor:"#8B7500"})]}),t.jsxs("radialGradient",{id:"owl-iris-grad-l",cx:"45%",cy:"42%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"50%",stopColor:"#2DD4BF"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("radialGradient",{id:"owl-iris-grad-r",cx:"45%",cy:"42%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"50%",stopColor:"#2DD4BF"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("linearGradient",{id:"owl-feather-grad",x1:"0",y1:"1",x2:"0",y2:"0",children:[t.jsx("stop",{offset:"0%",stopColor:"#9A7D2E"}),t.jsx("stop",{offset:"55%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#ECD684"})]}),t.jsxs("linearGradient",{id:"owl-feather-grad-dark",x1:"0",y1:"1",x2:"0",y2:"0",children:[t.jsx("stop",{offset:"0%",stopColor:"#5C4A18"}),t.jsx("stop",{offset:"70%",stopColor:"#8B7028"}),t.jsx("stop",{offset:"100%",stopColor:"#B8993E"})]}),t.jsx("filter",{id:"owl-wing-shadow",x:"-35%",y:"-35%",width:"170%",height:"170%",children:t.jsx("feDropShadow",{dx:"0",dy:"1",stdDeviation:"0.9",floodColor:"#2E230A",floodOpacity:"0.5"})})]}),t.jsx("ellipse",{cx:"40",cy:"52",rx:"14",ry:"16",fill:"url(#owl-belly-grad)"}),t.jsx("path",{d:"M33 48Q40 52 47 48",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.18}),t.jsx("path",{d:"M31 52Q40 57 49 52",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.15}),t.jsx("path",{d:"M32 56Q40 61 48 56",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.12}),t.jsx("ellipse",{cx:"40",cy:"38",rx:"24",ry:"18",stroke:"#D4A800",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("ellipse",{cx:"40",cy:"38",rx:"20",ry:"15",stroke:"#D4A800",strokeWidth:"0.5",fill:"none",opacity:"0.1"}),t.jsx("path",{d:"M13 28Q20 21 30 27",stroke:"#5C4413",strokeWidth:"3.2",strokeLinecap:"round",fill:"none",opacity:.25}),t.jsx("path",{d:"M67 28Q60 21 50 27",stroke:"#5C4413",strokeWidth:"3.2",strokeLinecap:"round",fill:"none",opacity:.25}),t.jsx("path",{d:"M13 27Q20 20 30 26",stroke:"#A8893A",strokeWidth:"2.8",strokeLinecap:"round",fill:"none",opacity:.65}),t.jsx("path",{d:"M67 27Q60 20 50 26",stroke:"#A8893A",strokeWidth:"2.8",strokeLinecap:"round",fill:"none",opacity:.65}),t.jsx("path",{d:"M15 26Q21 21 28 25",stroke:"#D4B85C",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:.4}),t.jsx("path",{d:"M65 26Q59 21 52 25",stroke:"#D4B85C",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:.4}),t.jsx("circle",{cx:"27",cy:"38",r:"15",fill:"#0D9488",opacity:.08}),t.jsx("circle",{cx:"27",cy:"38",r:"14",fill:"white",opacity:.97}),t.jsx("circle",{cx:"27",cy:"38",r:"14",stroke:"#8B7500",strokeWidth:"1.2",fill:"none",opacity:.25}),t.jsx("circle",{cx:"27",cy:"38",r:"12",fill:"url(#owl-iris-grad-l)",opacity:.9}),t.jsx("circle",{cx:"27",cy:"38",r:"10",stroke:"#0F766E",strokeWidth:"0.4",fill:"none",opacity:.2}),t.jsx("circle",{cx:"27",cy:"38",r:"8.5",stroke:"#134E4A",strokeWidth:"0.3",fill:"none",opacity:.12}),t.jsx("circle",{"data-owl":"pupil-l",cx:"27",cy:"38",r:"6.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"27",cy:"38",r:"6.5",stroke:"#0D9488",strokeWidth:"0.5",fill:"none",opacity:.3}),t.jsx("circle",{"data-owl":"highlight-l",cx:"22",cy:"33",r:"4",fill:"white",opacity:"0.95"}),t.jsx("circle",{cx:"31",cy:"42",r:"2",fill:"white",opacity:"0.5"}),t.jsx("circle",{cx:"23",cy:"35",r:"1",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M16 44Q27 48 38 44",stroke:"#C5B200",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("circle",{cx:"53",cy:"38",r:"15",fill:"#0D9488",opacity:.08}),t.jsx("circle",{cx:"53",cy:"38",r:"14",fill:"white",opacity:.97}),t.jsx("circle",{cx:"53",cy:"38",r:"14",stroke:"#8B7500",strokeWidth:"1.2",fill:"none",opacity:.25}),t.jsx("circle",{cx:"53",cy:"38",r:"12",fill:"url(#owl-iris-grad-r)",opacity:.9}),t.jsx("circle",{cx:"53",cy:"38",r:"10",stroke:"#0F766E",strokeWidth:"0.4",fill:"none",opacity:.2}),t.jsx("circle",{cx:"53",cy:"38",r:"8.5",stroke:"#134E4A",strokeWidth:"0.3",fill:"none",opacity:.12}),t.jsx("circle",{"data-owl":"pupil-r",cx:"53",cy:"38",r:"6.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"53",cy:"38",r:"6.5",stroke:"#0D9488",strokeWidth:"0.5",fill:"none",opacity:.3}),t.jsx("circle",{"data-owl":"highlight-r",cx:"48",cy:"33",r:"4",fill:"white",opacity:"0.95"}),t.jsx("circle",{cx:"57",cy:"42",r:"2",fill:"white",opacity:"0.5"}),t.jsx("circle",{cx:"49",cy:"35",r:"1",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M42 44Q53 48 64 44",stroke:"#C5B200",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("clipPath",{id:"owl-eye-clip-l",children:t.jsx("circle",{cx:"27",cy:"38",r:"14"})}),t.jsx("rect",{"data-owl":"eyelid-top-l",x:"13",y:"14",width:"28",height:"16",fill:"#C9A84C",opacity:"0.2",clipPath:"url(#owl-eye-clip-l)"}),t.jsx("clipPath",{id:"owl-eye-clip-r",children:t.jsx("circle",{cx:"53",cy:"38",r:"14"})}),t.jsx("rect",{"data-owl":"eyelid-top-r",x:"39",y:"14",width:"28",height:"16",fill:"#C9A84C",opacity:"0.2",clipPath:"url(#owl-eye-clip-r)"}),t.jsx("ellipse",{"data-owl":"blush-l",cx:"14",cy:"47",rx:"5",ry:"2.5",fill:"#FB7185",opacity:"0.15"}),t.jsx("ellipse",{"data-owl":"blush-r",cx:"66",cy:"47",rx:"5",ry:"2.5",fill:"#FB7185",opacity:"0.15"}),t.jsx("path",{d:"M36 49Q40 57 44 49Q40 52 36 49Z",fill:"#E8A000"}),t.jsx("path",{d:"M36 49Q40 57 44 49",stroke:"#B45309",strokeWidth:"0.8",fill:"none",opacity:"0.4"}),t.jsx("circle",{cx:"38",cy:"51",r:"0.6",fill:"#B45309",opacity:"0.3"}),t.jsx("circle",{cx:"42",cy:"51",r:"0.6",fill:"#B45309",opacity:"0.3"}),t.jsx("path",{"data-owl":"mouth",d:"M35 55Q40 58 45 55",stroke:"#C5B200",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:"0.3"}),t.jsxs("g",{"data-owl":"wing-static-l",children:[t.jsx("path",{d:"M12 45Q5 53 11 65",stroke:"#8B6914",strokeWidth:"2.5",fill:"none",opacity:.3,strokeLinecap:"round"}),t.jsx("path",{d:"M13 46Q7 54 12 64",stroke:"#D4A800",strokeWidth:"2",fill:"none",opacity:.35,strokeLinecap:"round"}),t.jsx("path",{d:"M14 48Q9 55 13 62",stroke:"#5C4413",strokeWidth:"1",fill:"none",opacity:.2,strokeLinecap:"round"}),t.jsx("path",{d:"M14 50Q10 56 13 60",stroke:"#2DD4BF",strokeWidth:"0.8",fill:"none",opacity:.08,strokeLinecap:"round"})]}),t.jsx("path",{d:"M68 45Q75 53 69 65",stroke:"#8B6914",strokeWidth:"2.5",fill:"none",opacity:.3,strokeLinecap:"round"}),t.jsx("path",{d:"M67 46Q73 54 68 64",stroke:"#D4A800",strokeWidth:"2",fill:"none",opacity:.35,strokeLinecap:"round"}),t.jsx("path",{d:"M66 48Q71 55 67 62",stroke:"#5C4413",strokeWidth:"1",fill:"none",opacity:.2,strokeLinecap:"round"}),t.jsx("path",{d:"M66 50Q70 56 67 60",stroke:"#2DD4BF",strokeWidth:"0.8",fill:"none",opacity:.08,strokeLinecap:"round"}),t.jsx("path",{d:"M35 72Q38 76 40 72",stroke:"#D4A800",strokeWidth:"1",fill:"none",opacity:"0.2",strokeLinecap:"round"}),t.jsx("path",{d:"M40 72Q42 76 45 72",stroke:"#D4A800",strokeWidth:"1",fill:"none",opacity:"0.2",strokeLinecap:"round"}),t.jsx("path",{d:"M28 69Q30 74 33 70Q31 74 34 70Q33 74 36 69",stroke:"#E8A000",strokeWidth:"1.3",fill:"none",opacity:"0.5",strokeLinecap:"round"}),t.jsx("path",{d:"M44 69Q47 74 49 70Q48 74 50 70Q50 74 52 69",stroke:"#E8A000",strokeWidth:"1.3",fill:"none",opacity:"0.5",strokeLinecap:"round"}),t.jsx("path",{d:"M18 36Q15 40 18 44",stroke:"#8B6914",strokeWidth:"0.8",fill:"none",opacity:.25}),t.jsx("path",{d:"M62 36Q65 40 62 44",stroke:"#8B6914",strokeWidth:"0.8",fill:"none",opacity:.25}),t.jsx("path",{d:"M18 37Q16 40 18 43",stroke:"#2DD4BF",strokeWidth:"0.5",fill:"none",opacity:.08}),t.jsx("path",{d:"M62 37Q64 40 62 43",stroke:"#2DD4BF",strokeWidth:"0.5",fill:"none",opacity:.08}),t.jsx("g",{"data-owl":"props"}),t.jsx("g",{"data-owl":"wing-l",opacity:"0",transform:"translate(21, 59) scale(0)",filter:"url(#owl-wing-shadow)"}),t.jsxs("g",{"data-owl":"chat-bubble",opacity:"0",transform:"translate(50, 22) scale(0)",filter:"url(#owl-wing-shadow)",children:[t.jsx("path",{d:"M2 -4 L1 2 L9 -4 Z",fill:"#FFFFFF"}),t.jsx("rect",{x:"0",y:"-20",width:"27",height:"16",rx:"5",fill:"#FFFFFF",stroke:"#E5E7EB",strokeWidth:"0.6"}),t.jsx("line",{x1:"5",y1:"-14.5",x2:"21",y2:"-14.5",stroke:"#CBD5E1",strokeWidth:"2",strokeLinecap:"round"}),t.jsx("line",{x1:"5",y1:"-10",x2:"16",y2:"-10",stroke:"#CBD5E1",strokeWidth:"2",strokeLinecap:"round"})]}),t.jsx("circle",{"data-owl":"notif-dot",cx:"62",cy:"14",r:"5",fill:"#EF4444",stroke:"#FFFFFF",strokeWidth:"1.5",opacity:"0"})]})}function ue({size:r=24,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function pe({size:r=24,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),t.jsx("rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),t.jsx("rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),t.jsx("rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}function fe({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),t.jsx("polyline",{points:"12 5 19 12 12 19"})]})}function xe({icon:r,size:i=24}){const s=Vt(r);return s?t.jsx(s,{size:i}):t.jsx(pe,{size:i})}const mt={"--es-color-surface":"#FFFFFF","--es-color-surface-elevated":"#F3F4F6","--es-color-surface-hover":"#E5E7EB","--es-color-on-surface":"#111827","--es-color-on-surface-muted":"#4B5563","--es-color-primary":"#8A6A1E","--es-color-on-primary":"#FFFFFF","--es-color-primary-muted":"rgba(120, 92, 26, 0.08)","--es-color-primary-on-muted":"#785C1A","--es-color-border":"#E5E7EB","--es-color-control-border":"#6B7280","--es-color-error":"#AD2C26","--es-color-success":"#00672B","--es-color-on-success":"#FFFFFF","--es-color-interactive":"#92400E","--es-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.1)","--es-shadow-md":"0 4px 12px rgba(0, 0, 0, 0.15)","--ai-bg":"#FFFFFF","--ai-bg-elevated":"#F9FAFB","--ai-bg-card":"#F3F4F6","--ai-bg-input":"#F9FAFB","--ai-bg-sidebar":"#F3F4F6","--ai-bg-footer":"#F9FAFB","--ai-fg":"#111827","--ai-fg-secondary":"#374151","--ai-muted":"#6B7280","--ai-muted-dim":"#9CA3AF","--ai-border":"#E5E7EB","--ai-border-subtle":"#F3F4F6","--ai-card":"#F3F4F6","--ai-accent":"#8A6A1E","--ai-accent-fg":"#FFFFFF","--ai-accent-hover":"#6F5518","--ai-accent-subtle":"rgba(130, 100, 28, 0.08)","--ai-accent-on-subtle":"#82641C","--ai-accent-on-subtle-strong":"#795D1A","--ai-accent-border":"#AA925B","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.12)","--ai-placeholder":"#9CA3AF","--ai-icon-muted":"#9CA3AF","--ai-scrollbar":"#D1D5DB","--ai-error":"#AD2C26","--ai-success":"#00672B","--ai-warning":"#9C5300","--ai-user-bubble":"#8A6A1E","--ai-user-bubble-fg":"#FFFFFF","--ai-assistant-bubble":"#F3F4F6","--ai-assistant-bubble-fg":"#111827","--ai-code-bg":"rgba(0, 0, 0, 0.05)"},ye=Object.fromEntries((It.options??[]).filter(r=>r.type==="color"&&typeof r.cssVariable=="string").map(r=>[r.cssVariable,String(r.default).trim().toLowerCase()]));function ge(r){if(!r)return mt;const i=Object.entries(r).filter(([d,e])=>{const f=ye[d];return f!==void 0&&String(e).trim().toLowerCase()!==f});if(i.length===0)return mt;const s={...mt};for(const[d]of i)delete s[d];return s}function be(r,i){const s=(O,l)=>{const _=r[O];return typeof _=="string"&&Rt(_)?_:l},d=i==="light"?{accent:"#8A6A1E",primary:"#8A6A1E",bg:"#FFFFFF",card:"#F3F4F6",elevated:"#F3F4F6"}:{accent:"#C9A84C",primary:"#C9A84C",bg:"#0F0F0F",card:"#161616",elevated:"#1A1A1A"},e={ai:["--ai-bg","--ai-bg-elevated","--ai-bg-card","--ai-bg-input","--ai-bg-sidebar","--ai-bg-footer"],es:["--es-color-surface","--es-color-surface-elevated","--es-color-surface-hover"]},f=i==="light"?{...mt}:{...It.cssVariables},S=(O,l)=>{const _=new Set([l]);for(const B of e[O]){const n=r[B]??f[B];typeof n=="string"&&Rt(n)&&_.add(n)}return[..._]},N=_t({accent:s("--ai-accent",d.accent),surface:S("ai",s("--ai-bg-card",d.card)),backdrop:s("--ai-bg",d.bg),tintAlpha:i==="light"?.08:.1,mode:i}),Z=_t({accent:s("--es-color-primary",d.primary),surface:S("es",s("--es-color-surface-elevated",d.elevated)),backdrop:s("--es-color-surface",d.bg),tintAlpha:i==="light"?.08:.1,mode:i});return{"--ai-accent-subtle":N.tint,"--ai-accent-on-subtle":N.onTint,"--ai-accent-on-subtle-strong":N.onStrongTint,"--ai-accent-border":N.boundary,"--es-color-primary-muted":Z.tint,"--es-color-primary-on-muted":Z.onTint}}function ke({brandName:r="GAIO",logoUrl:i,userName:s,headerQuote:d,headerQuoteAuthor:e,onFullscreenToggle:f,fullscreen:S,position:N="bottom-right",sidebarPosition:Z="right",initialOpen:O=!1,views:l=[],activeView:_="",onViewChange:B=()=>{},children:n=null,cssVariables:o,unreadCount:u=0,onSettingsClick:j,footerLabel:D,footerTitle:Q,footerUpdated:C,footerDotCount:w=4,footerActiveDot:R=0,onFooterAction:I,version:y,t:a,colorScheme:h,builderMode:p=!1,owlIdleLife:L=!1,owlIdleLifeIntervalMs:v,onOpenChange:x,panelReadAloudControl:g}){const k=Pt(h),[A,M]=q.useState(O||p),[b,$]=q.useState(!1),z=ne(!0,{enabled:L&&!p&&!A,intervalMs:v}),F=q.useRef(u);q.useEffect(()=>{const P=F.current;F.current=u,u>P&&!A&&!p&&z.react("notification"),z.setNotifBadge(u>0)},[u,A,p]);const X=q.useCallback(()=>{M(P=>{const H=!P;return x?.(H),H})},[x]),T=q.useCallback(()=>{M(!1),$(!1),x?.(!1)},[x]),K=q.useCallback(()=>{$(P=>!P)},[]),E=N==="bottom-left",G=q.useMemo(()=>{const P={...o??{},...k==="light"?ge(o):{}};return{...P,...be(P,k==="light"?"light":"dark"),...p?{width:"100%",height:"100%"}:{}}},[o,k,p]),nt=p?{position:"relative",bottom:"auto",right:"auto",left:"auto",width:"100%",height:"100%",maxHeight:"100%",borderRadius:0,opacity:1,transform:"none",pointerEvents:"auto",visibility:"visible"}:void 0,lt=["gaio-theme",k==="light"&&"gaio-theme--light",k==="dark"&&"gaio-theme--dark"].filter(Boolean).join(" ");return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:lt,style:G,children:[!p&&t.jsx("button",{type:"button",className:["gaio-theme__button",E&&"gaio-theme__button--left",A&&"gaio-theme__button--hidden"].filter(Boolean).join(" "),onClick:X,"aria-label":a?.("floating.open_widget")??"Open chat widget",tabIndex:A?-1:0,"aria-hidden":A,children:t.jsx(Ct,{size:54,svgRef:z.registerSvg})}),t.jsxs("div",{className:["gaio-theme__panel",E&&!p&&"gaio-theme__panel--left",(A||p)&&"gaio-theme__panel--open",b&&!p&&"gaio-theme__panel--expanded"].filter(Boolean).join(" "),style:nt,role:"dialog","aria-label":a?.("chat.widget_aria")??"Chat widget","aria-hidden":p?!1:!A,children:[t.jsxs("header",{className:"gaio-theme__header",children:[t.jsxs("div",{className:"gaio-theme__header-brand",children:[t.jsx("div",{className:"gaio-theme__header-owl",children:i?t.jsx("img",{className:"gaio-theme__header-logo",src:i,alt:""}):t.jsx(Ct,{size:40,svgRef:z.registerSvg})}),t.jsxs("div",{className:"gaio-theme__header-info",children:[t.jsx("h1",{className:"gaio-theme__brand-name",children:r}),t.jsx("p",{className:"gaio-theme__brand-tagline",children:a?.("header.brand_tagline")??"Your Guide AI Owl"}),s&&t.jsx("p",{className:"gaio-theme__brand-user",children:s})]})]}),d&&t.jsxs("div",{className:"gaio-theme__header-quote",children:[t.jsx("p",{className:"gaio-theme__header-quote-text",children:d}),e&&t.jsx("span",{className:"gaio-theme__header-quote-author",children:e})]}),t.jsxs("div",{className:"gaio-theme__header-actions",children:[g,f&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn",onClick:f,"aria-label":a?.(S?"header.exit_fullscreen":"header.enter_fullscreen")??(S?"Exit fullscreen":"Enter fullscreen"),children:t.jsx(Nt,{size:18})}),!p&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn gaio-theme__header-btn--expand",onClick:K,"aria-pressed":b,"aria-label":b?a?.("header.collapse")??"Collapse":a?.("header.expand")??"Expand",children:b?t.jsx(de,{size:18}):t.jsx(Nt,{size:18})}),!p&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn",onClick:T,"aria-label":a?.("header.close_widget")??"Close widget",children:t.jsx(he,{size:20})})]})]}),t.jsxs("div",{className:["gaio-theme__body",Z==="left"&&"gaio-theme__body--sidebar-left",Z==="bottom"&&"gaio-theme__body--sidebar-bottom",Z==="hidden"&&"gaio-theme__body--sidebar-hidden"].filter(Boolean).join(" "),children:[t.jsx("main",{className:"gaio-theme__content",style:{containerName:"es-slot",containerType:"inline-size"},children:n}),t.jsxs("aside",{className:"gaio-theme__sidebar",role:"tablist","aria-label":a?.("nav.widget_aria")??"Widget navigation",children:[t.jsx("div",{className:"gaio-theme__sidebar-tabs",children:l.map(P=>{const H=_===P.slug;return t.jsxs("button",{type:"button",role:"tab","aria-selected":H,tabIndex:H?0:-1,className:["gaio-theme__sidebar-tab",H&&"gaio-theme__sidebar-tab--active"].filter(Boolean).join(" "),onClick:()=>B(P.slug),children:[P.slug==="chat"||P.icon==="owl"?t.jsx(Ct,{size:26,svgRef:z.registerSvg}):t.jsx(xe,{icon:P.icon,size:24}),t.jsx("span",{className:"gaio-theme__sidebar-tab-label",children:P.label})]},P.slug)})}),t.jsx("div",{className:"gaio-theme__sidebar-settings",children:t.jsx("button",{type:"button",className:"gaio-theme__sidebar-settings-btn","aria-label":a?.("menu.settings")??"Settings",onClick:j,children:t.jsx(ue,{size:20})})})]})]}),t.jsx("footer",{className:"gaio-theme__footer",children:t.jsxs("div",{className:"gaio-theme__footer-inner",children:[t.jsxs("div",{className:"gaio-theme__footer-text",children:[D?t.jsxs("div",{className:"gaio-theme__footer-fade",children:[t.jsxs("p",{className:"gaio-theme__footer-label",children:[D,w>0&&t.jsx("span",{className:"gaio-theme__footer-dots",children:Array.from({length:w}).map((P,H)=>t.jsx("span",{className:`gaio-theme__footer-dot${H===R?" gaio-theme__footer-dot--active":""}`},H))})]}),Q&&t.jsx("p",{className:"gaio-theme__footer-title",children:Q})]}):"",C&&t.jsx("p",{className:"gaio-theme__footer-updated",children:C}),y&&t.jsxs("p",{className:"gaio-theme__footer-version",children:["v",y]})]}),I&&t.jsx("button",{type:"button",className:"gaio-theme__footer-action-btn",onClick:I,"aria-label":a?.("nav.go_to_section")??"Go to section",children:t.jsx(fe,{size:18})})]})})]})]}),t.jsx(ce,{owl:z})]})}function Ae({size:r=80,className:i}){return t.jsxs("svg",{width:r,height:r,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,"aria-hidden":"true",children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"owl-body",x1:"20",y1:"10",x2:"60",y2:"70",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:"0%",stopColor:"#D4B85C"}),t.jsx("stop",{offset:"50%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#A8893A"})]}),t.jsxs("linearGradient",{id:"owl-eye-l",cx:"0.5",cy:"0.3",r:"0.5",gradientUnits:"objectBoundingBox",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("linearGradient",{id:"owl-eye-r",cx:"0.5",cy:"0.3",r:"0.5",gradientUnits:"objectBoundingBox",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]})]}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"22",ry:"26",fill:"url(#owl-body)"}),t.jsx("path",{d:"M22 22 L18 8 L28 18 Z",fill:"#C9A84C"}),t.jsx("path",{d:"M18 8 L20 14",stroke:"#3a3a3a",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M58 22 L62 8 L52 18 Z",fill:"#C9A84C"}),t.jsx("path",{d:"M62 8 L60 14",stroke:"#3a3a3a",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("circle",{cx:"30",cy:"36",r:"10",fill:"#1a1a1a"}),t.jsx("circle",{cx:"50",cy:"36",r:"10",fill:"#1a1a1a"}),t.jsx("circle",{cx:"30",cy:"36",r:"8",fill:"url(#owl-eye-l)"}),t.jsx("circle",{cx:"50",cy:"36",r:"8",fill:"url(#owl-eye-r)"}),t.jsx("circle",{cx:"30",cy:"36",r:"4.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"50",cy:"36",r:"4.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"27",cy:"33",r:"2",fill:"white",opacity:"0.7"}),t.jsx("circle",{cx:"47",cy:"33",r:"2",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M37 44 L40 50 L43 44",fill:"#E8A000"}),t.jsx("circle",{cx:"22",cy:"42",r:"4",fill:"#E8A0A0",opacity:"0.15"}),t.jsx("circle",{cx:"58",cy:"42",r:"4",fill:"#E8A0A0",opacity:"0.15"}),t.jsx("ellipse",{cx:"40",cy:"56",rx:"10",ry:"8",fill:"#B8953F",opacity:"0.3"})]})}export{Ae as OwlIcon,ke as ThemeShell,It as manifest};
2
- //# sourceMappingURL=index-C6_8JGpJ-BqZmEVev.js.map
2
+ //# sourceMappingURL=index-BW-8QNI--BqZmEVev.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as c,j as e,Q as d}from"../nexly.js";const y={slug:"demo-faq",name:"DEMO — Questions",version:"0.1.0",category:"content",configSchema:{properties:{items:{type:"array",items:{type:"object",properties:{question:{type:"string"},answer:{type:"string"}},required:["question","answer"]},default:[]}}},defaultConfig:{items:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function f(o){return Array.isArray(o)?o.flatMap(a=>{if(typeof a!="object"||a===null)return[];const t=a,r=typeof t.question=="string"?t.question.trim():"",n=typeof t.answer=="string"?t.answer.trim():"";return!r||!n?[]:[{question:r,answer:n}]}):[]}function _({data:o,config:a,i18n:t}){const r=t?.t??(s=>s),n=f(o?.items??a?.items),[l,p]=c.useState(0),u=c.useCallback(s=>{p(i=>i===s?null:s)},[]);return n.length===0?e.jsx(d,{blockType:"demo-faq",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-block__empty",children:r("demoFaq.empty")})})}):e.jsx(d,{blockType:"demo-faq",children:e.jsx("div",{className:"es-block__body es-demofaq",children:n.map((s,i)=>{const m=l===i;return e.jsxs("div",{className:m?"es-demofaq__item es-demofaq__item--open":"es-demofaq__item",children:[e.jsxs("button",{type:"button",className:"es-demofaq__question",onClick:()=>u(i),"aria-expanded":m,children:[e.jsx("span",{children:s.question}),e.jsx("span",{className:"es-demofaq__chevron","aria-hidden":"true",children:m?"−":"+"})]}),m&&e.jsx("p",{className:"es-demofaq__answer",children:s.answer})]},i)})})})}export{_ as Component,y as manifest};
2
- //# sourceMappingURL=index-C75hX_dj-VhJcCfAC.js.map
2
+ //# sourceMappingURL=index-BncytMlP-VhJcCfAC.js.map
@@ -1,2 +1,2 @@
1
1
  import{j as e,Q as p}from"../nexly.js";const y={slug:"widget-settings",name:"Widget Settings",version:"1.0.0",category:"content",configSchema:{},defaultConfig:{},dataContract:{serviceSlug:null,inputSchema:{type:"object",properties:{}}},fields:[],sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"],events:{emits:[{name:"preferences:set",description:"Sets theme ({ theme }) or language ({ language }) preference via WidgetShell."},{name:"auth:logout",description:"Signs the user out."}]}},g=[{value:"en",flag:"🇬🇧",labelKey:"languages.en"},{value:"ko",flag:"🇰🇷",labelKey:"languages.ko"},{value:"ja",flag:"🇯🇵",labelKey:"languages.ja"},{value:"es",flag:"🇪🇸",labelKey:"languages.es"},{value:"zh",flag:"🇨🇳",labelKey:"languages.zh"},{value:"id",flag:"🇮🇩",labelKey:"languages.id"},{value:"vi",flag:"🇻🇳",labelKey:"languages.vi"},{value:"pl",flag:"🇵🇱",labelKey:"languages.pl"}],b=[{value:"light",labelKey:"settings.theme_light"},{value:"dark",labelKey:"settings.theme_dark"},{value:"system",labelKey:"settings.theme_auto"}];function j(l){return l.split(" ").map(t=>t[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function w(l){if(!Array.isArray(l))return g;const t=new Set(l.filter(i=>typeof i=="string")),r=g.filter(i=>t.has(i.value));return r.length>0?r:g}function N({i18n:l,auth:t,preferences:r,actions:i,readOnly:o,config:m}){const a=l?.t??(s=>s),d=l?.isLoadingTranslations??!1,f=l?.translationError??!1,h=l?.retryTranslations;if(!t?.isAuthenticated||!t.user)return e.jsx(p,{blockType:"widget-settings",children:e.jsx("div",{className:"es-widget__profile",children:e.jsx("div",{className:"es-widget__profile-empty",children:e.jsx("p",{children:a("profile.not_logged_in")})})})});const{user:n}=t,_=l?.currentLanguage??r?.language??"en",c=w(m?.enabledLocales),v=c.length>1,u=r?.theme??"system";return e.jsx(p,{blockType:"widget-settings",children:e.jsxs("div",{className:"es-widget__profile",children:[e.jsxs("div",{className:"es-widget__profile-card",children:[e.jsx("div",{className:"es-widget__profile-avatar",children:e.jsx("div",{className:"es-widget__profile-avatar-inner",children:n.name?e.jsx("span",{className:"es-widget__profile-avatar-initials",children:j(n.name)}):null})}),e.jsxs("div",{className:"es-widget__profile-info",children:[n.name&&e.jsx("h3",{className:"es-widget__profile-name",children:n.name}),n.email&&e.jsx("p",{className:"es-widget__profile-email",children:n.email})]})]}),e.jsxs("div",{className:"es-widget__profile-settings",children:[v&&e.jsxs("div",{className:"es-widget__profile-setting-row",children:[e.jsx("label",{htmlFor:"es-lang-select",className:"es-widget__profile-setting-label",children:a("profile.language_label")}),e.jsxs("div",{className:"es-widget__profile-lang-control",children:[e.jsx("select",{id:"es-lang-select",className:"es-widget__profile-lang-select",value:_,disabled:d||o===!0,onChange:s=>i.emit("preferences:set",{language:s.target.value}),children:c.map(s=>e.jsxs("option",{value:s.value,children:[s.flag," ",a(s.labelKey)]},s.value))}),d&&e.jsx("span",{className:"es-widget__profile-lang-spinner",role:"status","aria-label":a("settings.language_loading")})]})]}),f&&e.jsxs("div",{className:"es-widget__profile-lang-error",role:"alert",children:[e.jsx("span",{children:a("settings.language_error")}),e.jsx("button",{type:"button",className:"es-widget__profile-lang-retry",onClick:()=>h?.(),children:a("settings.language_retry")})]}),e.jsxs("div",{className:"es-widget__profile-setting-row",children:[e.jsx("span",{className:"es-widget__profile-setting-label",children:a("settings.theme_label")}),e.jsx("div",{className:"es-widget__profile-theme-switcher",role:"group","aria-label":a("settings.theme_label"),children:b.map(s=>e.jsx("button",{type:"button",className:`es-widget__profile-theme-btn${u===s.value?" es-widget__profile-theme-btn--active":""}`,"aria-pressed":u===s.value,disabled:o===!0,onClick:()=>i.emit("preferences:set",{theme:s.value==="system"?null:s.value}),children:e.jsx("span",{children:a(s.labelKey)})},s.value))})]})]})]})})}export{N as Component,y as manifest};
2
- //# sourceMappingURL=index-k-jZV_MQ-H31PHMqm.js.map
2
+ //# sourceMappingURL=index-BoVToqY3-H31PHMqm.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as l,j as e,Q as d}from"../nexly.js";const b={slug:"demo-ticket-form",name:"DEMO — Report an issue",version:"0.1.0",category:"interactive",configSchema:{properties:{categories:{type:"array",items:{type:"string"},default:[]}}},defaultConfig:{categories:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function f(a){if(typeof a!="string")return null;const t=a.trim();if(!t||/\s/.test(t))return null;const s=t.indexOf("@");return s>0&&s<t.length-1?t:null}function g(a){return Array.isArray(a)?a.flatMap(t=>typeof t=="string"&&t.trim().length>0?[t.trim()]:[]):[]}function j({config:a,i18n:t}){const s=t?.t??(i=>i),o=g(a?.categories),n=f(a?.supportEmail),[m,u]=l.useState(o[0]??""),[c,r]=l.useState(""),[k,p]=l.useState(!1),h=c.trim().length>0,_=l.useCallback(()=>{c.trim().length!==0&&(p(!0),r(""))},[c]);return k?e.jsx(d,{blockType:"demo-ticket-form",children:e.jsx("div",{className:"es-block__body es-demoticket es-demoticket--done",children:e.jsxs("div",{className:"es-demoticket__done",children:[e.jsx("span",{className:"es-demoticket__done-mark","aria-hidden":"true",children:"✓"}),e.jsx("p",{className:"es-demoticket__done-text",children:n?s("demoTicket.sentTo",{email:n}):s("demoTicket.sent")})]})})}):e.jsx(d,{blockType:"demo-ticket-form",children:e.jsxs("div",{className:"es-block__body es-demoticket",children:[e.jsxs("div",{className:"es-demoticket__fields",children:[o.length>0&&e.jsxs("label",{className:"es-demoticket__field",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.category")}),e.jsx("select",{className:"es-demoticket__select",value:m,onChange:i=>u(i.target.value),children:o.map(i=>e.jsx("option",{value:i,children:i},i))})]}),e.jsxs("label",{className:"es-demoticket__field es-demoticket__field--grow",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.message")}),e.jsx("textarea",{className:"es-demoticket__textarea",value:c,onChange:i=>r(i.target.value),placeholder:s("demoTicket.placeholder")})]})]}),e.jsx("button",{type:"button",className:"es-demoticket__submit",onClick:_,disabled:!h,children:s("demoTicket.submit")})]})})}export{j as Component,b as manifest};
2
- //# sourceMappingURL=index-B8aKMeg5-BLxOZxZv.js.map
2
+ //# sourceMappingURL=index-C5MpFJwF-BLxOZxZv.js.map