@nexlylab/widget 1.32.16 → 1.32.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/INSTALL.txt +1 -1
- package/dist/runtime/{1.32.16/chunks/ClickToLoadEmbed-CVZbpoTT-CKUzZ7gL.js → 1.32.18/chunks/ClickToLoadEmbed-BLIUFZOn-BwY-LAJ8.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/PanelInfoVideo-BKq2v0QM-BrU-Qlul.js → 1.32.18/chunks/PanelInfoVideo-BNVzih9J-BrU-Qlul.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/assistant-link-components-DkuhHIF9-CPkAMFv6.js → 1.32.18/chunks/assistant-link-components-DUrLEPUB-DKaQavIJ.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/assistant-link-policy-CS93s-vA-Cc-yj-a-.js → 1.32.18/chunks/assistant-link-policy-DHB-k1Aa-Cc-yj-a-.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/block-rating-DGpoz2o3-CoiP5C2K.js → 1.32.18/chunks/block-rating-D7hR2gTc-CoiP5C2K.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/external-url-BzUbjdMo-CJQjg_od.js → 1.32.18/chunks/external-url-qbs1SznX-CJQjg_od.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-svAzoy0Y-DbuSZfeK.js → 1.32.18/chunks/index--xfG4CIn-DbuSZfeK.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CUGV3nk2-DAdxCQyi.js → 1.32.18/chunks/index-7N5M1HdS-DAdxCQyi.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-SgPuWMUv-QeFj7CR9.js → 1.32.18/chunks/index-99heIIoH-QeFj7CR9.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Chn4ATvZ-CSI6_0RJ.js → 1.32.18/chunks/index-B3DeMFo7-BbdAbuAw.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-fotohjEP-BLBDoJCM.js → 1.32.18/chunks/index-BIGVEl9--CSQQTbsg.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-Dc8zecP4-oy07dUaV.js → 1.32.18/chunks/index-BKZyJMr2-oy07dUaV.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Dtiss_wT-CLkn_6EY.js → 1.32.18/chunks/index-BKrM_uoq-CABL-0v-.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-MAmLiP1_-Dsa9X9U7.js → 1.32.18/chunks/index-BX6ig9BJ-Dsa9X9U7.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Cdmdsj1E-DP0QKkgf.js → 1.32.18/chunks/index-BZO9Qaiw-DP0QKkgf.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DchTua3m-BpgnWlB8.js → 1.32.18/chunks/index-BauMKr5c-BpgnWlB8.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CsoMgZU8-C1BzRUwZ.js → 1.32.18/chunks/index-Bf_npmqm-C1BzRUwZ.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Or6sA2eF-CiRb-0NX.js → 1.32.18/chunks/index-BtkNePSj-CiRb-0NX.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BIMK2_g0-ZRnEJoQe.js → 1.32.18/chunks/index-C1Fa-E3e-ZRnEJoQe.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CbGT4d5Q-DUgMllqN.js → 1.32.18/chunks/index-C5RVj6y1-DUgMllqN.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BLT1bBjC-6c5Ar61I.js → 1.32.18/chunks/index-CCEWGjHV-BTsOZg4v.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-ChL-bSAN-BcW8HKb8.js → 1.32.18/chunks/index-CF37rhgu-BcW8HKb8.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-tAu73-sK-DQBGsPwB.js → 1.32.18/chunks/index-COTfVuju-DQBGsPwB.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BJClDxSC-D6wzHiS0.js → 1.32.18/chunks/index-COfQIa8G-D6wzHiS0.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BW-8QNI--BqZmEVev.js → 1.32.18/chunks/index-CSRoJRaW-CoI3p0S7.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-Dfcx_9km-C9wFr7fa.js → 1.32.18/chunks/index-CV2tGt-4-C9wFr7fa.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-C5MpFJwF-BLxOZxZv.js → 1.32.18/chunks/index-CYeJYTiB-BLxOZxZv.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DL04XhIK-TEMHje2B.js → 1.32.18/chunks/index-CZ-JrY2X-TEMHje2B.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DhYv8bbj-DGasnsaZ.js → 1.32.18/chunks/index-Cd1-jHFp-Za3SKEQp.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-CogJkGmU-C3bBvEcm.js → 1.32.18/chunks/index-Ce9TuEzb-C3bBvEcm.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DG-KS4AB-3B-eE3K7.js → 1.32.18/chunks/index-D1YmJ3gf-3B-eE3K7.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DO5eKOOB-Dp5AxBD4.js → 1.32.18/chunks/index-D96sEJQ6-Dp5AxBD4.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-D-uANagm-DBhSkJ7i.js → 1.32.18/chunks/index-DAICBUgn-DBhSkJ7i.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BncytMlP-VhJcCfAC.js → 1.32.18/chunks/index-DATkkw3P-VhJcCfAC.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CIe60p_E-pkywvGDF.js → 1.32.18/chunks/index-DaW9uf4--pkywvGDF.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BoVToqY3-H31PHMqm.js → 1.32.18/chunks/index-DiZcd1hz-H31PHMqm.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-PSL_6OT1-_M0CWPEY.js → 1.32.18/chunks/index-DuPFNKhZ-_M0CWPEY.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-DdI8qMqt-Dr1V6OGz.js → 1.32.18/chunks/index-Dw7QeZq3-Dr1V6OGz.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-pQ7fPgLl-JdphAk2-.js → 1.32.18/chunks/index-E59S8-Gw-CovGUxIZ.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-DHdp5nGO-bdo5pwX-.js → 1.32.18/chunks/index-OcrS6o5Y-bdo5pwX-.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-BCtNBIxP-CcsFQ7Dx.js → 1.32.18/chunks/index-PxSB6BA6-DFxY6dqO.js} +2 -2
- package/dist/runtime/{1.32.16/chunks/index-DNwWHPWp-W1lJrIDD.js → 1.32.18/chunks/index-cCAzBYyN-W1lJrIDD.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-6HKNPucI-Dm9kbc85.js → 1.32.18/chunks/index-kAGaGinD-Dm9kbc85.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CISMnUXx-Aqz1AnQ5.js → 1.32.18/chunks/index-l8Oxwea3-Aqz1AnQ5.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Cmt7uZiE-R_xuAEQV.js → 1.32.18/chunks/index-oxM4Cgtc-R_xuAEQV.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-Cxwd1OKy-C_0Ll4qr.js → 1.32.18/chunks/index-qN6oEHVu-C_0Ll4qr.js} +1 -1
- package/dist/runtime/{1.32.16/chunks/index-CIgDHLEK-I68tb-d3.js → 1.32.18/chunks/index-rblri-2U-I68tb-d3.js} +1 -1
- package/dist/runtime/1.32.18/chunks/index-xx1GG5d1-CW29F9vY.js +6 -0
- package/dist/runtime/1.32.18/nexly.js +61 -0
- package/dist/v1.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/1.32.16/chunks/index-Cf4eQF9g-mnUzfS1e.js +0 -6
- package/dist/runtime/1.32.16/nexly.js +0 -61
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/index.modern-CioVZ357-BA5NTOmY.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
- /package/dist/runtime/{1.32.16 → 1.32.18}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as d,j as e,Q as n}from"../nexly.js";const M={slug:"presentation-trainer",name:"Presentation Training",version:"1.0.0",category:"interactive",requiredService:"presentation-training",configSchema:{properties:{timeWarningPercent:{type:"number",default:20},showHints:{type:"boolean",default:!0}}},defaultConfig:{timeWarningPercent:20,showHints:!0},dataContract:{serviceSlug:"presentation-training",inputSchema:{type:"object",properties:{scenarios:{type:"array",description:"Live scenarios in the learner’s language, in author order"},remainingToday:{type:"number",description:"Sessions the learner may still start today"},dailyLimit:{type:"number",description:"Configured sessions per user per day"},productBudgetSpent:{type:"boolean",description:"True when the product’s monthly audio budget is exhausted"}}}},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main"]},T={state:"idle",errorKey:null,turns:[],elapsedSec:0,maxSessionSec:0,hint:null,report:null,gradeErrorKey:null};function f(p){return p.trim().split(/\s+/).filter(Boolean).slice(0,2).map(o=>o[0]?.toUpperCase()??"").join("")||"—"}function $(p){const o=Math.floor(p/60),x=p%60;return`${o}:${String(x).padStart(2,"0")}`}function E({data:p,config:o,actions:x,i18n:N}){const t=N?.t??(s=>s),r=x?.externalContext?.trainer,m=p??{},g=d.useMemo(()=>m.scenarios??[],[m.scenarios]),h=m.remainingToday??0,y=m.dailyLimit??0,[u,_]=d.useState(null),[k,l]=d.useState(!1),[a,S]=d.useState(r?.get()??T);d.useEffect(()=>r?.subscribe(S),[r]),d.useEffect(()=>()=>r?.stop(),[r]);const i=g.find(s=>s.id===u)??null,b=a.state==="connecting"||a.state==="speaking"||a.state==="listening",C=Math.max(30,Math.min(60,Math.round(a.maxSessionSec*(o.timeWarningPercent??20)/100))),w=Math.max(0,a.maxSessionSec-a.elapsedSec),v=b&&a.maxSessionSec>0&&w<=C,j=d.useCallback(()=>{u&&r?.start(u)},[u,r]);if(m.productBudgetSpent)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-budget-spent",children:e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.product_budget_spent")})})});if(g.length===0)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-empty",children:e.jsx("p",{className:"es-pt__empty",children:t("training.no_scenarios")})})});if(i&&(a.state==="grading"||a.report||a.gradeErrorKey)){if(a.state==="grading")return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-grading",children:e.jsx("p",{className:"es-pt__muted",children:t("training.grading")})})});if(!a.report)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-grade-failed",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t(`training.grade_${a.gradeErrorKey??"grader_failed"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})});const s=a.report;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-report",children:[e.jsxs("div",{className:"es-pt__score",children:[e.jsxs("span",{className:`es-pt__score-value${s.passed?"":" es-pt__score-value--fail"}`,"data-testid":"pt-score",children:[s.totalScore,"%"]}),e.jsx("span",{className:"es-pt__muted",children:s.passed?t("training.passed",{threshold:s.passThreshold}):t("training.not_passed",{threshold:s.passThreshold})})]}),s.feedback&&e.jsxs("div",{className:"es-pt__feedback","data-testid":"pt-feedback",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.to_improve")}),s.feedback.headline,s.feedback.quote&&e.jsx("q",{className:"es-pt__quote",children:s.feedback.quote})]}),e.jsx("div",{className:"es-pt__criteria",children:s.criteria.map(c=>e.jsxs("div",{className:"es-pt__criterion",children:[e.jsxs("div",{className:"es-pt__criterion-row",children:[e.jsx("span",{className:"es-pt__criterion-label",children:c.label}),e.jsxs("span",{className:"es-pt__criterion-score",children:[c.score,"/4"]})]}),e.jsx("p",{className:"es-pt__muted",children:c.rationale}),c.quote&&e.jsx("q",{className:"es-pt__quote",children:c.quote})]},c.key))}),s.delivery&&e.jsxs("div",{className:"es-pt__delivery","data-testid":"pt-delivery",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.how_you_spoke")}),e.jsxs("div",{className:"es-pt__delivery-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:t("training.longest_monologue")}),e.jsxs("b",{children:[s.delivery.longestMonologueSec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.talk_share")}),e.jsxs("b",{children:[s.delivery.talkSharePercent,"%"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.response_delay")}),e.jsxs("b",{children:[s.delivery.medianResponseDelaySec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.exchanges")}),e.jsx("b",{children:s.delivery.exchanges})]}),e.jsxs("div",{children:[e.jsx("span",{children:t(`training.rate_${s.delivery.rateUnit}`)}),e.jsx("b",{children:s.delivery.rate})]})]})]}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-retry",children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})})}if(i&&(b||a.state==="ending"||a.state==="error"||a.state==="closed"))return a.state==="error"?e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-error",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--bad",children:t(`training.error_${a.errorKey??"generic"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})}):e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-conversation",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("div",{className:`es-pt__avatar${a.state==="speaking"?" es-pt__avatar--speaking":""}`,"aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsxs("div",{className:"es-pt__strip-state",children:[a.state==="connecting"&&t("training.state_connecting"),a.state==="speaking"&&t("training.state_speaking"),a.state==="listening"&&t("training.state_listening"),a.state==="ending"&&t("training.state_ending"),a.state==="closed"&&t("training.state_closed")]})]})]}),e.jsx("div",{className:"es-pt__transcript","data-testid":"pt-transcript","aria-live":"polite",children:a.turns.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.transcript_empty")}):a.turns.map((s,c)=>e.jsxs("div",{className:`es-pt__turn es-pt__turn--${s.role}${s.final?"":" es-pt__turn--live"}`,children:[e.jsx("span",{className:"es-pt__turn-who",children:s.role==="persona"?i.personaName:t("training.you")}),s.text]},c))}),o.showHints!==!1&&a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-hint",children:a.hint}),v&&!a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-time-warning",children:t("training.time_almost_up")}),e.jsxs("div",{className:"es-pt__controls",children:[e.jsx("span",{className:`es-pt__timer${v?" es-pt__timer--warn":""}`,"data-testid":"pt-timer",children:$(a.elapsedSec)}),a.state==="closed"?e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")}):e.jsx("button",{type:"button",className:"es-pt__end",onClick:()=>r?.stop(),children:t("training.end_conversation")})]})]})});if(i&&k)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-history",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>l(!1),"aria-label":t("training.back"),children:"←"}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:t("training.your_attempts")}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]})]}),i.history.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.no_attempts_yet")}):e.jsx("ul",{className:"es-pt__attempts",children:i.history.map(s=>e.jsxs("li",{className:"es-pt__attempt",children:[e.jsx("span",{className:"es-pt__attempt-date",children:new Intl.DateTimeFormat(N?.currentLanguage??"en",{day:"numeric",month:"short"}).format(new Date(s.at))}),e.jsx("span",{className:"es-pt__attempt-score",children:s.score===null?t("training.not_scored"):`${s.score}%`}),s.status!=="completed"&&e.jsx("span",{className:"es-pt__pill",children:t(`training.status_${s.status}`)})]},s.sessionId))})]})});if(i){const s=h<=0;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-brief",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>{l(!1),_(null)},"aria-label":t("training.back_to_list"),children:"←"}),e.jsx("div",{className:"es-pt__avatar","aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]}),e.jsxs("div",{className:"es-pt__strip-right",children:[e.jsx("span",{className:`es-pt__pill es-pt__pill--${i.difficulty}`,children:t(`training.difficulty_${i.difficulty}`)}),e.jsx("span",{className:"es-pt__strip-time",children:t("training.minutes",{count:Math.round(i.maxDurationSec/60)})})]})]}),e.jsx("div",{className:"es-pt__situation",children:i.situation}),e.jsx("p",{className:"es-pt__muted",children:t("training.sessions_left",{count:h,total:y})}),s?e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")}):e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-start",children:t("training.start_conversation")}),i.attempts>0&&e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>l(!0),"data-testid":"pt-history-open",children:t("training.see_attempts",{count:i.attempts})})]})})}return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-list",children:[e.jsxs("div",{className:"es-pt__quota",children:[e.jsx("span",{children:t("training.sessions_today")}),e.jsx("b",{children:t("training.sessions_left_short",{count:h,total:y})})]}),g.map(s=>e.jsxs("button",{type:"button",className:"es-pt__scenario",onClick:()=>_(s.id),disabled:h<=0,children:[e.jsxs("span",{className:"es-pt__scenario-row",children:[e.jsx("span",{className:"es-pt__scenario-title",children:s.title}),e.jsx("span",{className:`es-pt__pill es-pt__pill--${s.difficulty}`,children:t(`training.difficulty_${s.difficulty}`)})]}),e.jsxs("span",{className:"es-pt__scenario-meta",children:[t("training.minutes",{count:Math.round(s.maxDurationSec/60)}),s.attempts>0&&e.jsxs(e.Fragment,{children:[" · ",t("training.best_score",{score:s.bestScore??0})," · ",t("training.last_score",{score:s.lastScore??0})," · ",t("training.attempts",{count:s.attempts})]}),s.attempts===0&&e.jsxs(e.Fragment,{children:[" · ",t("training.not_attempted")]})]})]},s.id)),h<=0&&e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")})]})})}export{E as Component,M as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-DaW9uf4--pkywvGDF.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-
|
|
2
|
+
//# sourceMappingURL=index-DiZcd1hz-H31PHMqm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as h,j as e,Q as m,o as j}from"../nexly.js";const C={slug:"recruitment-pipeline",name:"Recruitment Pipeline",version:"1.0.0",category:"interactive",requiredService:"recruitment-pipeline",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"recruitment-pipeline",inputSchema:{type:"object",properties:{stageCounts:{type:"object",properties:{contacted:{type:"number"},interested:{type:"number"},pending:{type:"number"},active:{type:"number"}}},topFollowUpToday:{type:"object",properties:{id:{type:"string"},name:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"}}},topFollowUpMessage:{type:"string"},prospects:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},contactInfo:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"},aiFollowupMessage:{type:"string"}}}},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",stageCounts:{contacted:3,interested:5,pending:2,active:4},topFollowUpToday:{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event, interested in health products",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},topFollowUpMessage:"Hi Piotr! I was thinking about you — I'd love to share how our latest health product has been helping people in similar situations. Can we hop on a 10-minute call this week?",prospects:[{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},{id:"preview-2",name:"Anna Kowalska",stage:"pending",notes:"Waiting for reply after product demo",lastContactDate:new Date(Date.now()-2*864e5).toISOString().slice(0,10)},{id:"preview-3",name:"Maria Wiśniewska",stage:"contacted",lastContactDate:new Date(Date.now()-8*864e5).toISOString().slice(0,10)},{id:"preview-4",name:"Tomasz Wójcik",stage:"active",lastContactDate:new Date().toISOString().slice(0,10)}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — funnel summary + top follow-up + AI script",value:"basic"},{label:"Pro — full prospect list with Kanban + AI panel",value:"pro"}],group:"Display"}],events:{emits:[{name:"rp:prospectAdded",description:"User added a new prospect"},{name:"rp:stageChanged",description:"User moved a prospect to a new stage"},{name:"rp:followUpCopied",description:"User copied the AI follow-up message"}],listens:[{name:"rp:refresh",description:"Force refresh recruitment pipeline data"}]}},o={contacted:"recruitment.stage.contacted",interested:"recruitment.stage.interested",pending:"recruitment.stage.pending",active:"recruitment.stage.active"},p={contacted:"es-rp__stage--contacted",interested:"es-rp__stage--interested",pending:"es-rp__stage--pending",active:"es-rp__stage--active"};function D({data:n,config:y,actions:f,metadata:w,i18n:b}){const s=b?.t??(t=>t),v=y.mode??n.mode??"basic",i=n.stageCounts??{contacted:0,interested:0,pending:0,active:0},a=n.topFollowUpToday,c=n.topFollowUpMessage,l=n.prospects??[],[_,u]=h.useState("idle"),[r,g]=h.useState(null);if(i.contacted+i.interested+i.pending+i.active===0&&!a&&!n.error)return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("div",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} es-rp__stage--empty`,children:[e.jsx("span",{className:"es-rp__funnel-count",children:"0"}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0",textAlign:"center"},children:w?.dataQuality==="none"?s("recruitment.signin_prompt"):s("recruitment.empty_pipeline")})]})});if(n.error)return e.jsx(m,{blockType:"recruitment-pipeline",error:j(n.error)});async function x(){const t=c??"";if(t)try{await navigator.clipboard.writeText(t),u("copied"),f.emit("rp:followUpCopied",{prospectId:a?.id}),setTimeout(()=>u("idle"),2e3)}catch{}}const d=r?l.filter(t=>t.stage===r):l;return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("button",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} ${r===t?"es-rp__funnel-stage--active":""}`,onClick:()=>g(r===t?null:t),"aria-pressed":r===t,"aria-label":s("recruitment.stage_count_aria",{stage:s(o[t]),count:i[t]}),children:[e.jsx("span",{className:"es-rp__funnel-count",children:i[t]}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),a&&e.jsxs("div",{className:"es-rp__followup-card",children:[e.jsxs("div",{className:"es-rp__followup-eyebrow",children:["📅 ",s("recruitment.follow_up_today")]}),e.jsx("div",{className:"es-rp__followup-name",children:a.name}),e.jsxs("div",{className:"es-rp__followup-meta",children:[e.jsx("span",{className:`es-rp__badge ${p[a.stage]??""}`,children:s(o[a.stage])}),a.lastContactDate&&e.jsx("span",{className:"es-rp__followup-date",children:s("recruitment.last_contact",{date:a.lastContactDate})})]}),a.notes&&e.jsx("div",{className:"es-rp__followup-notes",children:a.notes}),c&&e.jsxs("div",{className:"es-rp__followup-message",children:[e.jsxs("div",{className:"es-rp__followup-message-header",children:[e.jsxs("span",{className:"es-rp__ai-label",children:["✨ ",s("recruitment.ai_followup_script")]}),e.jsx("button",{className:`es-rp__copy-btn${_==="copied"?" es-rp__copy-btn--copied":""}`,onClick:x,"aria-label":s("recruitment.copy_followup_aria"),title:s("common.copy_to_clipboard"),children:_==="copied"?"✓":"⎘"})]}),e.jsx("p",{className:"es-rp__followup-message-text",children:c})]})]}),v==="pro"&&e.jsxs("div",{className:"es-rp__prospect-list",children:[e.jsxs("div",{className:"es-rp__prospect-list-header",children:[e.jsx("span",{className:"es-rp__section-title",children:r?s("recruitment.stage_filtered",{stage:s(o[r]),count:d.length}):s("recruitment.all_prospects",{count:l.length})}),r&&e.jsx("button",{className:"es-rp__clear-filter",onClick:()=>g(null),children:s("recruitment.clear_filter")})]}),d.length===0?e.jsx("p",{className:"es-rp__empty",children:s("recruitment.empty_stage")}):e.jsx("ul",{className:"es-rp__prospects","aria-label":s("recruitment.prospects_list_aria"),children:d.map(t=>e.jsxs("li",{className:"es-rp__prospect-item",children:[e.jsxs("div",{className:"es-rp__prospect-header",children:[e.jsx("span",{className:"es-rp__prospect-name",children:t.name}),e.jsx("span",{className:`es-rp__badge ${p[t.stage]??""}`,children:s(o[t.stage])})]}),t.contactInfo&&e.jsx("span",{className:"es-rp__prospect-contact",children:t.contactInfo}),t.notes&&e.jsx("p",{className:"es-rp__prospect-notes",children:t.notes}),t.lastContactDate&&e.jsx("span",{className:"es-rp__prospect-date",children:s("recruitment.last_contact",{date:t.lastContactDate})})]},t.id))})]})]})})}export{D as Component,C as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-DuPFNKhZ-_M0CWPEY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as b,r as s,j as e,Q as k}from"../nexly.js";const v={slug:"knowledge-search",name:"Knowledge Search",version:"1.0.0",category:"interactive",requiredService:"knowledge-search",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},maxResults:{type:"number",default:5},minScore:{type:"number",default:.7},placeholder:{type:"string",default:""}}},defaultConfig:{readAloudEnabled:!1,maxResults:5,minScore:.7,placeholder:""},dataContract:{serviceSlug:"knowledge-search",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query entered by user"},results:{type:"array",items:{type:"object",properties:{title:{type:"string"},excerpt:{type:"string"},score:{type:"number"},url:{type:"string"}}}},totalFound:{type:"number"}},required:["results"]},previewDataOverride:{query:"return policy",results:[{title:"Return & Refund Policy",excerpt:"You may return any item within 30 days of purchase for a full refund.",score:.94,url:"/faq/returns"},{title:"Exchange Policy",excerpt:"Exchanges are accepted within 60 days with original receipt.",score:.81,url:"/faq/exchange"},{title:"Damaged Item Returns",excerpt:"For damaged items, please contact support within 7 days.",score:.75,url:"/faq/damaged"}],totalFound:3}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"maxResults",type:"range",label:"Max results",default:5,min:1,max:20,step:1,group:"Search"},{id:"minScore",type:"range",label:"Minimum relevance score",default:.7,min:.1,max:1,step:.05,group:"Search"},{id:"placeholder",type:"localized-text",label:"Search placeholder",default:"",placeholder:'Leave empty to use translated default (e.g. "Search knowledge base...")',group:"Content"},{id:"model",type:"text",label:"AI model",default:"gpt-4o-mini",placeholder:"e.g. gpt-4o-mini, gpt-4o",group:"AI"}],events:{emits:[{name:"search:querySubmitted",description:"User submitted a search query"},{name:"search:resultSelected",description:"User clicked on a search result"}],listens:[{name:"search:clear",description:"Clear search results and query"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function j({config:m,actions:o,i18n:d}){const t=d?.t??(a=>a),g=d?.currentLanguage??"en",y=b(m.placeholder,g,{t,fallbackKey:"knowledge_search.placeholder",enDefault:"Search knowledge base..."}),[l,u]=s.useState(""),[n,f]=s.useState(null),[p,c]=s.useState(null),[r,h]=s.useState(!1),i=s.useCallback(async()=>{const a=l.trim();if(!(!a||r)){f(a),c(null),u(""),h(!0);try{const _=await o.call("search",{query:a});c(_?.answer??null)}catch{c(t("knowledge_search.error"))}finally{h(!1)}}},[l,r,o,t]),x=s.useCallback(a=>{a.key==="Enter"&&(a.preventDefault(),i())},[i]);return e.jsxs(k,{blockType:"knowledge-search",children:[e.jsx("div",{className:"es-block__header",children:e.jsxs("div",{className:"es-ksearch__input-row",children:[e.jsx("input",{className:"es-ksearch__input",type:"text",value:l,onChange:a=>u(a.target.value),onKeyDown:x,placeholder:y}),e.jsx("button",{className:"es-ksearch__btn",onClick:i,disabled:!l.trim()||r,type:"button",children:t("knowledge_search.search_btn")})]})}),e.jsxs("div",{className:"es-block__body",children:[r&&e.jsxs("div",{className:"es-ksearch__loading",children:[e.jsx("div",{className:"es-ksearch__loading-question",children:n}),e.jsxs("div",{className:"es-ksearch__loading-indicator",children:[e.jsx("span",{className:"es-ksearch__dot"}),e.jsx("span",{className:"es-ksearch__dot"}),e.jsx("span",{className:"es-ksearch__dot"})]}),e.jsx("div",{className:"es-ksearch__loading-text",children:t("knowledge_search.generating")})]}),!r&&n&&p&&e.jsxs("div",{className:"es-ksearch__answer-section",children:[e.jsx("div",{className:"es-ksearch__question",children:n}),e.jsx("div",{className:"es-ksearch__answer",children:p})]})]})]})}export{j as Component,v as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-Dw7QeZq3-Dr1V6OGz.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,j as e,Q as U,o as ue}from"../nexly.js";import{C as ye}from"./block-rating-DGpoz2o3-CoiP5C2K.js";import{j as ge}from"./PanelInfoVideo-BKq2v0QM-BrU-Qlul.js";import{m as J}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const Fe={slug:"daily-action-plan",name:"Daily Action Plan",version:"4.0.0",category:"data",requiredService:"daily-action-plan",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},showGreeting:{type:"boolean",default:!0},showFocus:{type:"boolean",default:!0},showPlays:{type:"boolean",default:!0},showStructural:{type:"boolean",default:!0},showRisk:{type:"boolean",default:!0},showBlocker:{type:"boolean",default:!0},showMyBenefits:{type:"boolean",default:!0}}},defaultConfig:{readAloudEnabled:!1,showGreeting:!0,showFocus:!0,showPlays:!0,showStructural:!0,showRisk:!0,showBlocker:!0,showMyBenefits:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"daily-action-plan",inputSchema:{type:"object",properties:{personalGreeting:{type:"object",properties:{userName:{type:"string"},rankBadge:{type:"string"},summary:{type:"string"},tone:{type:"string",enum:["calm","urgent","celebratory"]}}},todaysFocus:{type:"object",properties:{domain:{type:"string",enum:["relationship","recruitment","sales","structural","risk","market"]},summary:{type:"string"},details:{type:"object",properties:{whyThisToday:{type:"string"},expectedOutcome:{type:"string"},deadlineUtc:{type:"string"}}}}},relationshipPlay:{type:"object",description:"Named downliner outreach play (empty when no real downliner available)",properties:{targetName:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{targetContext:{type:"string"},messageHook:{type:"string"},channelHint:{type:"string",enum:["kakao","line","whatsapp","telegram","email","dashboard","none"]},draftMessage:{type:"string"},complianceNote:{type:"string"}}}}},recruitmentPlay:{type:"object",description:"Recruitment action (actionType='none' when not applicable)",properties:{actionType:{type:"string",enum:["warm_intro","event_invite","follow_up","qualification_call","content_share","none"]},summary:{type:"string"},details:{type:"object",properties:{candidateOrSegment:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},complianceNote:{type:"string"}}}}},salesPlay:{type:"object",description:"iMine product or cycle action",properties:{linkedToBinarySide:{type:"string",enum:["left","right","both","none"]},summary:{type:"string"},details:{type:"object",properties:{productOrCycleAction:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},marketSignal:{type:"string"},complianceNote:{type:"string"}}}}},structuralCheck:{type:"object",description:"Binary tree, rank, cycle cap, and time alert metrics",properties:{normalRank:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},currentVolume:{type:"number"},requiredVolume:{type:"number"},volumeProgressPercent:{type:"number"},creditsEarned:{type:"number"},requiredCredits:{type:"number"},creditsProgressPercent:{type:"number"},binaryQualifyingPlacements:{type:"number"},binaryProgressPercent:{type:"number"},qualifyingBranchLeaders:{type:"number"},branchProgressPercent:{type:"number"},bottleneckProgressPercent:{type:"number"},blockingConditions:{type:"array",items:{type:"string"}}}},paidRank:{type:"object",properties:{currentPaidRank:{type:"string"},nextPaidRank:{type:"string"},active:{type:"boolean"},riskOfDrop:{type:"boolean"},reason:{type:"string"},retentionProgress:{type:"number"},advanceProgress:{type:"number"},rollingWindowSales:{type:"number"},thresholdForCurrentRank:{type:"number"},thresholdForNextRank:{type:"number"},windowDays:{type:"number"},gracePeriodEndsDate:{type:"string"}}},binary:{type:"object",properties:{leftVolume:{type:"number"},rightVolume:{type:"number"},balanced:{type:"boolean"},reason:{type:"string"}}},cycleCap:{type:"object",properties:{}},timeAlert:{type:"object",properties:{}}}},riskFlag:{type:"object",description:"Most critical risk today (severity='none' = no risk)",properties:{severity:{type:"string",enum:["none","low","medium","high","critical"]},riskType:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{description:{type:"string"},preventiveAction:{type:"string"},timeSensitivity:{type:"string"}}}}},myBenefits:{type:"object",description:"Deterministic near-term benefits timeline (1-3 nearest events; empty summary+events hides the tile)",properties:{summary:{type:"string"},events:{type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["mining_start","first_reward","rank_grace","rank_retention","cycles_today","promo"]},dateUtc:{type:"string"},label:{type:"string"},narration:{type:"string"}}}}}}}},previewDataOverride:{personalGreeting:{userName:"Aleksandra",rankBadge:"Senior Manager",summary:"Aleksandra, right leg needs 5 BP to close a cycle before 15:00 UTC.",tone:"urgent"},todaysFocus:{domain:"relationship",summary:"Message Minsu about right-leg cycle close before 15:00 UTC.",details:{whyThisToday:"Minsu is your top right-leg Developer with 12,500 USDT team sales — highest leverage today.",expectedOutcome:"Right-leg +500 USDT or 1 new referral from Minsu by end of day.",deadlineUtc:"15:00 UTC"}},relationshipPlay:{targetName:"Minsu",summary:"Message Minsu on Kakao to align on a right-leg pack placement before 15:00 UTC.",details:{targetContext:"Right-leg Developer, recent activity, team_sales 12,500.",messageHook:"Ask about right-leg cycle close this week.",channelHint:"kakao",draftMessage:"Hi Minsu, we're 5 BP away from closing a right-leg cycle today. Can we align on a pack placement before 15:00 UTC?",complianceNote:"No income guarantee — frame as qualifying for cycle, not earning."}},recruitmentPlay:{actionType:"warm_intro",summary:"Send a warm intro to a BTC-interested contact today — greed index at 71.",details:{candidateOrSegment:"One warm contact who showed interest in BTC mining last week.",rationale:"Greed 71 creates a good opening to discuss Hash Power packages.",concreteStep:"Send iMine partner intro link today by 21:00 local time.",complianceNote:"Frame as 'here's how it works', no ROI claims."}},salesPlay:{linkedToBinarySide:"right",summary:"Place 500 USDT on right leg before 15:00 UTC to close 1 cycle.",details:{productOrCycleAction:"Hash Power Package — right-leg placement (500 USDT)",rationale:"Right 4,200 vs Left 4,500 — right-leg 500 USDT closes 1 cycle.",concreteStep:"Open iMine Distributor Hub → Hash Power Package → right leg → 1 pack.",marketSignal:"BTC up 7% this week — bullish sentiment supports placement urgency.",complianceNote:"No specific earnings amount. Frame as 'activates Senior Manager cycle'."}},structuralCheck:{normalRank:{currentRank:"Senior Manager",nextRank:"Vice President",currentVolume:58e3,requiredVolume:5e4,volumeProgressPercent:100,creditsEarned:500,requiredCredits:1e3,creditsProgressPercent:50,binaryQualifyingPlacements:2,binaryProgressPercent:67,qualifyingBranchLeaders:1,branchProgressPercent:33,bottleneckProgressPercent:33,blockingConditions:[]},paidRank:{currentPaidRank:"Senior Manager",nextPaidRank:"Vice President",active:!0,riskOfDrop:!1,reason:"On track this week.",retentionProgress:.85,advanceProgress:.42,rollingWindowSales:17e3,thresholdForCurrentRank:2e4,thresholdForNextRank:4e4,windowDays:90,gracePeriodEndsDate:null},binary:{leftVolume:4500,rightVolume:4200,balanced:!1,reason:"Right +500 USDT closes 1 cycle."},cycleCap:{dailyCycleLimit:8,cyclesCompletedToday:0,remainingCyclesToday:8,capWasteRisk:!1},timeAlert:{autoPlacementTimeUtc:"15:00",hoursUntilAutoPlacement:4.5,placementUrgency:"high"}},riskFlag:{severity:"low",riskType:"cap_waste",summary:"Right-leg gap may cause 1 missed cycle if not topped up before 15:00 UTC.",details:{description:"If right-leg is not topped up before 15:00 UTC auto-placement, 1 cycle may be missed.",preventiveAction:"Suggest Minsu or place 1 pack on right leg by 14:30 UTC.",timeSensitivity:"4.5 hours"}},myBenefits:{summary:"Your next 3 milestones — mining starts tomorrow, first reward 2 days after.",events:[{kind:"mining_start",dateUtc:"2026-08-14",label:"Mining starts",narration:"Your Hash Power package begins mining tomorrow."},{kind:"first_reward",dateUtc:"2026-08-16",label:"First reward",narration:"Your first mining reward lands 2 days after mining starts."},{kind:"cycles_today",dateUtc:"",label:"0 of 8 cycles used",narration:"You have 8 cycles available today — none used yet."}]}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"showGreeting",type:"toggle",label:"Show personal greeting",default:!0,group:"Sections"},{id:"showFocus",type:"toggle",label:"Show today's focus",default:!0,group:"Sections"},{id:"showPlays",type:"toggle",label:"Show action plays (relationship / recruitment / sales)",default:!0,group:"Sections"},{id:"showStructural",type:"toggle",label:"Show structural check (rank / binary / cycle)",default:!0,group:"Sections"},{id:"showRisk",type:"toggle",label:"Show risk flag",default:!0,group:"Sections"},{id:"showBlocker",type:"toggle",label:"Show rank blocker tile (structure / payout)",default:!0,group:"Sections"},{id:"showMyBenefits",type:"toggle",label:"Show My Benefits (mining/reward/rank timeline)",default:!0,group:"Sections"}],events:{emits:[{name:"dap:legSelected",description:"User selected a recommended binary leg"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"dap:refresh",description:"Force refresh daily action plan"}]},supportedPlacements:["main"]},he=[/MLM\s+PROFILE\s+DATA\s+missing/i,/USER\s+CONTEXT\s+missing/i,/^Cannot\s+verify/i,/Profile\s+data\s+missing/i,/Profile\s+incomplete/i];function X(a){return he.some(s=>s.test(a.trim()))}function l(a){return!a||a.trim()===""}function _e(a){return Math.round(a).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Z(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function ee(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",timeZone:"UTC"}).format(t)}function P(a){return a.filter(s=>typeof s=="string"&&s.trim()!=="").join(`
|
|
1
|
+
import{r as E,j as e,Q as U,o as ue}from"../nexly.js";import{C as ye}from"./block-rating-D7hR2gTc-CoiP5C2K.js";import{j as ge}from"./PanelInfoVideo-BNVzih9J-BrU-Qlul.js";import{m as J}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const Fe={slug:"daily-action-plan",name:"Daily Action Plan",version:"4.0.0",category:"data",requiredService:"daily-action-plan",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},showGreeting:{type:"boolean",default:!0},showFocus:{type:"boolean",default:!0},showPlays:{type:"boolean",default:!0},showStructural:{type:"boolean",default:!0},showRisk:{type:"boolean",default:!0},showBlocker:{type:"boolean",default:!0},showMyBenefits:{type:"boolean",default:!0}}},defaultConfig:{readAloudEnabled:!1,showGreeting:!0,showFocus:!0,showPlays:!0,showStructural:!0,showRisk:!0,showBlocker:!0,showMyBenefits:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"daily-action-plan",inputSchema:{type:"object",properties:{personalGreeting:{type:"object",properties:{userName:{type:"string"},rankBadge:{type:"string"},summary:{type:"string"},tone:{type:"string",enum:["calm","urgent","celebratory"]}}},todaysFocus:{type:"object",properties:{domain:{type:"string",enum:["relationship","recruitment","sales","structural","risk","market"]},summary:{type:"string"},details:{type:"object",properties:{whyThisToday:{type:"string"},expectedOutcome:{type:"string"},deadlineUtc:{type:"string"}}}}},relationshipPlay:{type:"object",description:"Named downliner outreach play (empty when no real downliner available)",properties:{targetName:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{targetContext:{type:"string"},messageHook:{type:"string"},channelHint:{type:"string",enum:["kakao","line","whatsapp","telegram","email","dashboard","none"]},draftMessage:{type:"string"},complianceNote:{type:"string"}}}}},recruitmentPlay:{type:"object",description:"Recruitment action (actionType='none' when not applicable)",properties:{actionType:{type:"string",enum:["warm_intro","event_invite","follow_up","qualification_call","content_share","none"]},summary:{type:"string"},details:{type:"object",properties:{candidateOrSegment:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},complianceNote:{type:"string"}}}}},salesPlay:{type:"object",description:"iMine product or cycle action",properties:{linkedToBinarySide:{type:"string",enum:["left","right","both","none"]},summary:{type:"string"},details:{type:"object",properties:{productOrCycleAction:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},marketSignal:{type:"string"},complianceNote:{type:"string"}}}}},structuralCheck:{type:"object",description:"Binary tree, rank, cycle cap, and time alert metrics",properties:{normalRank:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},currentVolume:{type:"number"},requiredVolume:{type:"number"},volumeProgressPercent:{type:"number"},creditsEarned:{type:"number"},requiredCredits:{type:"number"},creditsProgressPercent:{type:"number"},binaryQualifyingPlacements:{type:"number"},binaryProgressPercent:{type:"number"},qualifyingBranchLeaders:{type:"number"},branchProgressPercent:{type:"number"},bottleneckProgressPercent:{type:"number"},blockingConditions:{type:"array",items:{type:"string"}}}},paidRank:{type:"object",properties:{currentPaidRank:{type:"string"},nextPaidRank:{type:"string"},active:{type:"boolean"},riskOfDrop:{type:"boolean"},reason:{type:"string"},retentionProgress:{type:"number"},advanceProgress:{type:"number"},rollingWindowSales:{type:"number"},thresholdForCurrentRank:{type:"number"},thresholdForNextRank:{type:"number"},windowDays:{type:"number"},gracePeriodEndsDate:{type:"string"}}},binary:{type:"object",properties:{leftVolume:{type:"number"},rightVolume:{type:"number"},balanced:{type:"boolean"},reason:{type:"string"}}},cycleCap:{type:"object",properties:{}},timeAlert:{type:"object",properties:{}}}},riskFlag:{type:"object",description:"Most critical risk today (severity='none' = no risk)",properties:{severity:{type:"string",enum:["none","low","medium","high","critical"]},riskType:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{description:{type:"string"},preventiveAction:{type:"string"},timeSensitivity:{type:"string"}}}}},myBenefits:{type:"object",description:"Deterministic near-term benefits timeline (1-3 nearest events; empty summary+events hides the tile)",properties:{summary:{type:"string"},events:{type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["mining_start","first_reward","rank_grace","rank_retention","cycles_today","promo"]},dateUtc:{type:"string"},label:{type:"string"},narration:{type:"string"}}}}}}}},previewDataOverride:{personalGreeting:{userName:"Aleksandra",rankBadge:"Senior Manager",summary:"Aleksandra, right leg needs 5 BP to close a cycle before 15:00 UTC.",tone:"urgent"},todaysFocus:{domain:"relationship",summary:"Message Minsu about right-leg cycle close before 15:00 UTC.",details:{whyThisToday:"Minsu is your top right-leg Developer with 12,500 USDT team sales — highest leverage today.",expectedOutcome:"Right-leg +500 USDT or 1 new referral from Minsu by end of day.",deadlineUtc:"15:00 UTC"}},relationshipPlay:{targetName:"Minsu",summary:"Message Minsu on Kakao to align on a right-leg pack placement before 15:00 UTC.",details:{targetContext:"Right-leg Developer, recent activity, team_sales 12,500.",messageHook:"Ask about right-leg cycle close this week.",channelHint:"kakao",draftMessage:"Hi Minsu, we're 5 BP away from closing a right-leg cycle today. Can we align on a pack placement before 15:00 UTC?",complianceNote:"No income guarantee — frame as qualifying for cycle, not earning."}},recruitmentPlay:{actionType:"warm_intro",summary:"Send a warm intro to a BTC-interested contact today — greed index at 71.",details:{candidateOrSegment:"One warm contact who showed interest in BTC mining last week.",rationale:"Greed 71 creates a good opening to discuss Hash Power packages.",concreteStep:"Send iMine partner intro link today by 21:00 local time.",complianceNote:"Frame as 'here's how it works', no ROI claims."}},salesPlay:{linkedToBinarySide:"right",summary:"Place 500 USDT on right leg before 15:00 UTC to close 1 cycle.",details:{productOrCycleAction:"Hash Power Package — right-leg placement (500 USDT)",rationale:"Right 4,200 vs Left 4,500 — right-leg 500 USDT closes 1 cycle.",concreteStep:"Open iMine Distributor Hub → Hash Power Package → right leg → 1 pack.",marketSignal:"BTC up 7% this week — bullish sentiment supports placement urgency.",complianceNote:"No specific earnings amount. Frame as 'activates Senior Manager cycle'."}},structuralCheck:{normalRank:{currentRank:"Senior Manager",nextRank:"Vice President",currentVolume:58e3,requiredVolume:5e4,volumeProgressPercent:100,creditsEarned:500,requiredCredits:1e3,creditsProgressPercent:50,binaryQualifyingPlacements:2,binaryProgressPercent:67,qualifyingBranchLeaders:1,branchProgressPercent:33,bottleneckProgressPercent:33,blockingConditions:[]},paidRank:{currentPaidRank:"Senior Manager",nextPaidRank:"Vice President",active:!0,riskOfDrop:!1,reason:"On track this week.",retentionProgress:.85,advanceProgress:.42,rollingWindowSales:17e3,thresholdForCurrentRank:2e4,thresholdForNextRank:4e4,windowDays:90,gracePeriodEndsDate:null},binary:{leftVolume:4500,rightVolume:4200,balanced:!1,reason:"Right +500 USDT closes 1 cycle."},cycleCap:{dailyCycleLimit:8,cyclesCompletedToday:0,remainingCyclesToday:8,capWasteRisk:!1},timeAlert:{autoPlacementTimeUtc:"15:00",hoursUntilAutoPlacement:4.5,placementUrgency:"high"}},riskFlag:{severity:"low",riskType:"cap_waste",summary:"Right-leg gap may cause 1 missed cycle if not topped up before 15:00 UTC.",details:{description:"If right-leg is not topped up before 15:00 UTC auto-placement, 1 cycle may be missed.",preventiveAction:"Suggest Minsu or place 1 pack on right leg by 14:30 UTC.",timeSensitivity:"4.5 hours"}},myBenefits:{summary:"Your next 3 milestones — mining starts tomorrow, first reward 2 days after.",events:[{kind:"mining_start",dateUtc:"2026-08-14",label:"Mining starts",narration:"Your Hash Power package begins mining tomorrow."},{kind:"first_reward",dateUtc:"2026-08-16",label:"First reward",narration:"Your first mining reward lands 2 days after mining starts."},{kind:"cycles_today",dateUtc:"",label:"0 of 8 cycles used",narration:"You have 8 cycles available today — none used yet."}]}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"showGreeting",type:"toggle",label:"Show personal greeting",default:!0,group:"Sections"},{id:"showFocus",type:"toggle",label:"Show today's focus",default:!0,group:"Sections"},{id:"showPlays",type:"toggle",label:"Show action plays (relationship / recruitment / sales)",default:!0,group:"Sections"},{id:"showStructural",type:"toggle",label:"Show structural check (rank / binary / cycle)",default:!0,group:"Sections"},{id:"showRisk",type:"toggle",label:"Show risk flag",default:!0,group:"Sections"},{id:"showBlocker",type:"toggle",label:"Show rank blocker tile (structure / payout)",default:!0,group:"Sections"},{id:"showMyBenefits",type:"toggle",label:"Show My Benefits (mining/reward/rank timeline)",default:!0,group:"Sections"}],events:{emits:[{name:"dap:legSelected",description:"User selected a recommended binary leg"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"dap:refresh",description:"Force refresh daily action plan"}]},supportedPlacements:["main"]},he=[/MLM\s+PROFILE\s+DATA\s+missing/i,/USER\s+CONTEXT\s+missing/i,/^Cannot\s+verify/i,/Profile\s+data\s+missing/i,/Profile\s+incomplete/i];function X(a){return he.some(s=>s.test(a.trim()))}function l(a){return!a||a.trim()===""}function _e(a){return Math.round(a).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Z(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function ee(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",timeZone:"UTC"}).format(t)}function P(a){return a.filter(s=>typeof s=="string"&&s.trim()!=="").join(`
|
|
2
2
|
`)}function be(a,s,t){const r=a.details;return P([`${s("dap.section.focus")} · ${a.domain}`,!l(a.summary)&&a.summary,r&&!l(r.whyThisToday)&&`${s("dap.focus.why")}: ${r.whyThisToday}`,r&&!l(r.expectedOutcome)&&`${s("dap.gaio.field.expected")}: ${r.expectedOutcome}`,r&&r.deadlineUtc&&!l(r.deadlineUtc)&&`${s("dap.gaio.field.deadline")}: ${Z(r.deadlineUtc,t)}`])}function ke(a,s){const t=a.details;return P([`${s("dap.gaio.field.severity")}: ${a.severity}`,!l(a.summary)&&a.summary,t&&!l(t.description)&&t.description,t&&!l(t.preventiveAction)&&`${s("dap.gaio.field.preventive")}: ${t.preventiveAction}`,t&&!l(t.timeSensitivity)&&`${s("dap.gaio.field.time_sensitivity")}: ${t.timeSensitivity}`])}function fe(a,s){const t=a.details;return P([`${s("dap.section.relationship")} · ${a.targetName}`,!l(a.summary)&&a.summary,t&&!l(t.targetContext)&&`${s("dap.gaio.field.context")}: ${t.targetContext}`,t&&!l(t.messageHook)&&`${s("dap.gaio.field.hook")}: ${t.messageHook}`,t&&t.channelHint&&t.channelHint!=="none"&&`${s("dap.gaio.field.channel")}: ${t.channelHint}`,t&&!l(t.draftMessage)&&`${s("dap.gaio.field.draft")}: ${t.draftMessage}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function xe(a,s){const t=a.details;return P([`${s("dap.section.recruitment")} · ${a.actionType.replace(/_/g," ")}`,!l(a.summary)&&a.summary,t&&!l(t.candidateOrSegment)&&`${s("dap.gaio.field.candidate")}: ${t.candidateOrSegment}`,t&&!l(t.rationale)&&`${s("dap.play.why")}: ${t.rationale}`,t&&!l(t.concreteStep)&&`${s("dap.play.do")}: ${t.concreteStep}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function je(a,s){const t=a.details;return P([`${s("dap.section.sales")} · ${a.linkedToBinarySide}`,!l(a.summary)&&a.summary,t&&!l(t.productOrCycleAction)&&`${s("dap.gaio.field.product")}: ${t.productOrCycleAction}`,t&&!l(t.rationale)&&`${s("dap.play.why")}: ${t.rationale}`,t&&!l(t.concreteStep)&&`${s("dap.play.do")}: ${t.concreteStep}`,t&&!l(t.marketSignal)&&`${s("dap.gaio.field.market")}: ${t.marketSignal}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function Ne(a,s,t){return P([s("dap.section.my_benefits"),!l(a.summary)&&a.summary,...a.events.map(r=>{const n=r.dateUtc?` (${ee(r.dateUtc,t)})`:"";return`${s(`dap.benefits.kind.${r.kind}`)} — ${r.label}${n}: ${r.narration}`})])}function ae(a,s){const t=!!a.riskOfDrop,r=a.retentionProgress,n=typeof r=="number"&&r<1,m=Math.max(0,(a.thresholdForCurrentRank??0)-(a.rollingWindowSales??0)),h=a.windowDays??0,k=m>0&&h>0;let b;return a.active===!1?b=s("dap.blocker.paid_rank.unlock"):n||t?b=k?s("dap.blocker.paid_rank.at_risk",{gap:_e(m),days:h}):s("dap.blocker.paid_rank.unlock"):b=s("dap.blocker.paid_rank.safe",{rank:J(a.currentPaidRank,s)}),{atRisk:t,message:b}}function te(a,s){if(a.active===!1||a.riskOfDrop||typeof a.retentionProgress=="number"&&a.retentionProgress<1)return;const t=a.nextPaidRank,r=a.thresholdForNextRank??0;if(!t||r<=0)return;const n=typeof a.advanceProgress=="number"?a.advanceProgress:0,m=Math.round(Math.max(0,Math.min(1,n))*100);return s("dap.blocker.paid_rank.advance",{percent:m,rank:J(t,s)})}function ve(a,s,t){const r=s?ae(s,t):void 0,n=s?te(s,t):void 0;return P([a.length>0&&`${t("dap.blocker.normal_rank.title")} (${t("dap.blocker.normal_rank.badge")})`,...a,r&&`${t("dap.blocker.paid_rank.title")}: ${r.message}`,n,r?.atRisk&&s?.gracePeriodEndsDate?t("dap.blocker.paid_rank.grace",{date:s.gracePeriodEndsDate}):void 0])}function we(a){if(!a)return!0;if(!l(a.summary))return!1;const s=a.details;return s?l(s.whyThisToday)&&l(s.expectedOutcome)&&l(s.deadlineUtc):!0}function Te(a){if(!a)return!0;const s=a.normalRank;return s?(s.blockingConditions??[]).filter(t=>!X(t)).length===0&&s.currentVolume===0&&s.requiredVolume===0:!0}function Y(a){return a==="critical"||a==="high"?"var(--es-color-error, #AD2C26)":a==="medium"?"var(--es-color-warning, #9C5300)":"var(--es-color-on-surface-muted, #4B5563)"}const Se={relationship:"🤝",recruitment:"📣",sales:"🛒",structural:"📊",risk:"⚠️",market:"📈"},Pe={mining_start:"⛏️",first_reward:"🎁",rank_grace:"⏳",rank_retention:"🛡️",cycles_today:"🔄",promo:"✨"};function $e({open:a}){return e.jsx("svg",{className:`es-dap__chevron${a?" es-dap__chevron--open":""}`,width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})}function O({teaser:a,isOpen:s,children:t}){return s?e.jsx("div",{className:"es-dap__teaser-reveal",children:t}):e.jsx("p",{className:"es-dap__teaser-text",children:a})}function M({isOpen:a,onToggle:s,expandLabel:t,collapseLabel:r,t:n}){return e.jsxs("button",{className:"es-dap__more-toggle",type:"button",onClick:s,"aria-expanded":a,"aria-label":a?r:t,children:[n(a?"dap.teaser.less":"dap.teaser.more"),e.jsx($e,{open:a})]})}function S({moreToggle:a,gaioLink:s}){return!a&&!s?null:e.jsxs("div",{className:"es-dap__actions",children:[a,s]})}function Ce(a){const s=a.trim(),t=/^\[(normal|paid)\]\s*/i.exec(s);return t&&t[1]?{scope:t[1].toLowerCase(),text:s.slice(t[0].length)}:{scope:"normal",text:s}}const Re=[{labelKey:"dap.blocker.credits",pct:a=>a.creditsProgressPercent},{labelKey:"dap.blocker.binary_structure",pct:a=>a.binaryProgressPercent},{labelKey:"dap.blocker.branch_leaders",pct:a=>a.branchProgressPercent},{labelKey:"dap.blocker.team_sales",pct:a=>a.volumeProgressPercent}];function Le({normalRank:a,paidRank:s,normalConditions:t,gaioLink:r,t:n}){const m=a?Re.filter(g=>{const f=g.pct(a);return typeof f=="number"&&f<100}):[],h=m.length>0&&m.length===t.length,k=h&&m.some(g=>g.labelKey==="dap.blocker.branch_leaders"),b=t.length>0,i=s?ae(s,n):void 0,x=s?te(s,n):void 0;return e.jsxs("div",{className:"es-dap__card es-dap__blocker-tile",children:[b&&e.jsxs("div",{className:"es-dap__blocker-section",children:[e.jsxs("div",{className:"es-dap__blocker-head",children:[e.jsx("span",{className:"es-dap__blocker-title",children:n("dap.blocker.normal_rank.title")}),e.jsx("span",{className:"es-dap__pill es-dap__pill--warn",children:n("dap.blocker.normal_rank.badge")})]}),e.jsx("ul",{className:"es-dap__blocker-list",children:t.map((g,f)=>{const j=h?m[f]:void 0;return e.jsxs("li",{className:"es-dap__blocker-item es-dap__blocker-item--structure",children:[j&&e.jsx("span",{className:"es-dap__blocker-itemlabel",children:n(j.labelKey)}),e.jsx("span",{className:"es-dap__blocker-msg",children:g})]},f)})}),k&&e.jsx("p",{className:"es-dap__blocker-note",children:n("dap.blocker.excluded_structure")})]}),s&&i&&e.jsxs("div",{className:`es-dap__blocker-section${b?" es-dap__blocker-section--divided":""}`,children:[e.jsxs("div",{className:"es-dap__blocker-head",children:[e.jsx("span",{className:"es-dap__blocker-title",children:n("dap.blocker.paid_rank.title")}),e.jsx("span",{className:`es-dap__pill ${i.atRisk?"es-dap__pill--danger":"es-dap__pill--ok"}`,children:n("dap.blocker.paid_rank.badge")})]}),e.jsx("p",{className:`es-dap__blocker-item es-dap__blocker-item--${i.atRisk?"risk":"safe"}`,children:e.jsx("span",{className:"es-dap__blocker-msg",children:i.message})}),x&&e.jsx("p",{className:"es-dap__blocker-note es-dap__blocker-note--advance",children:x}),i.atRisk&&s.gracePeriodEndsDate&&e.jsx("p",{className:"es-dap__blocker-note es-dap__blocker-note--grace",children:n("dap.blocker.paid_rank.grace",{date:s.gracePeriodEndsDate})})]}),e.jsx(S,{gaioLink:r})]})}function Oe({benefits:a,lang:s,gaioLink:t,t:r}){return e.jsxs("div",{className:"es-dap__card es-dap__benefits-tile",children:[e.jsx("div",{className:"es-dap__blocker-head",children:e.jsx("span",{className:"es-dap__blocker-title",children:r("dap.section.my_benefits")})}),!l(a.summary)&&e.jsx("p",{className:"es-dap__benefits-summary",children:a.summary}),a.events.length>0&&e.jsx("ul",{className:"es-dap__benefits-list",children:a.events.map((n,m)=>e.jsxs("li",{className:`es-dap__benefits-item es-dap__benefits-item--${n.kind}`,children:[e.jsx("span",{className:"es-dap__benefits-icon","aria-hidden":"true",children:Pe[n.kind]??"•"}),e.jsxs("div",{className:"es-dap__benefits-body",children:[e.jsxs("div",{className:"es-dap__benefits-row",children:[e.jsx("span",{className:"es-dap__benefits-label",children:n.label}),n.dateUtc&&e.jsx("span",{className:"es-dap__benefits-date","data-es-no-read":!0,children:ee(n.dateUtc,s)})]}),!l(n.narration)&&e.jsx("p",{className:"es-dap__benefits-narration",children:n.narration})]})]},m))}),e.jsx(S,{gaioLink:t})]})}function Me({text:a,copyLabel:s,copiedLabel:t}){const[r,n]=E.useState(!1);function m(){const h=()=>{n(!0),window.setTimeout(()=>n(!1),2e3)},k=navigator?.clipboard;k?.writeText&&k.writeText(a).then(h,()=>{})}return e.jsx("button",{className:"es-dap__copy-btn",type:"button",onClick:m,children:r?`${t} ✓`:`📋 ${s}`})}function z({label:a,message:s,btnLabel:t,onNavigate:r}){return e.jsxs("div",{className:"es-dap__card es-dap__tile-cta",children:[e.jsx("div",{className:"es-dap__tile-cta-header",children:e.jsx("span",{className:"es-dap__section-label",children:a})}),e.jsx("p",{className:"es-dap__tile-cta-message",children:s}),e.jsx("button",{className:"es-dap__tile-cta-btn",type:"button",onClick:r,children:t})]})}function T({section:a,summary:s,content:t,onTalk:r,t:n}){return e.jsxs("button",{type:"button",className:"es-dap__gaio-link","aria-label":n("dap.gaio.aria",{section:a}),onClick:()=>r(a,s,t),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",n("dap.talk_to_gaio")]})}function He({data:a,config:s,metadata:t,i18n:r,actions:n,baseUrl:m,externalContext:h,auth:k,previewMode:b}){const i=r?.t??(y=>y),x=r?.currentLanguage??"en",g=h?.hasChatView===!0,f=s.showFocus??!0,j=s.showPlays??!0,q=s.showStructural??!0,se=s.showRisk??!0,ie=s.showBlocker??!0,re=s.showMyBenefits??!0,ne=a.personalGreeting,u=a.todaysFocus,d=a.relationshipPlay,p=a.recruitmentPlay,o=a.salesPlay,C=a.structuralCheck,c=a.riskFlag,N=a.myBenefits,[_,le]=E.useState({});function R(y){le($=>({...$,[y]:!$[y]}))}function B(){n.navigate("gaio-coach")}const v=E.useCallback((y,$,me)=>{n.emit("chat:draft",{message:`[${y}]
|
|
3
3
|
${me}`,autoSend:!1,quickChips:[{labelKey:"dap.gaio.chip.how",label:i("dap.gaio.chip.how"),message:i("dap.gaio.chip.how_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.why",label:i("dap.gaio.chip.why"),message:i("dap.gaio.chip.why_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.draft",label:i("dap.gaio.chip.draft"),message:i("dap.gaio.chip.draft_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.other",label:i("dap.gaio.chip.other"),message:"",autoSend:!1}]})},[n,i]),w=y=>e.jsx(ye,{compact:!0,blockSlug:"daily-action-plan",sectionKey:y,baseUrl:m,apiKey:h?.apiKey,jwt:k?.jwt,previewMode:b,t:i});if(!u&&!ne&&!a.error)return e.jsx(U,{blockType:"daily-action-plan",children:e.jsx("div",{className:"es-block__body es-dap__body",children:e.jsxs("div",{className:"es-dap__empty",children:[e.jsx("div",{className:"es-dap__empty-title",children:i("dap.title")}),e.jsx("p",{className:"es-dap__empty-message",children:t?.dataQuality==="none"?i("dap.empty.sign_in"):i("dap.empty.preparing")}),[1,2,3].map(y=>e.jsxs("div",{className:"es-dap__card es-dap__card--placeholder",children:[e.jsx("div",{className:"es-dap__placeholder-line es-dap__placeholder-line--label"}),e.jsx("div",{className:"es-dap__placeholder-line"})]},y))]})})});if(a.error)return e.jsx(U,{blockType:"daily-action-plan",error:ue(a.error)});const V=we(u),G=Te(C),oe=C?.normalRank?.blockingConditions?.filter(y=>!X(y))??[],ce=f&&!V,D=j&&!!d&&!!d.targetName&&!l(d.summary),A=j&&!!p&&p.actionType!=="none"&&!l(p.summary),L=!!o&&o.linkedToBinarySide==="none"&&!l(o.details?.concreteStep),F=j&&!!o&&(!l(o.summary)||L),de=q&&!G,W=se&&!!c&&c.severity!=="none",I=re&&!!N&&(!l(N.summary)||N.events.length>0);if(!(ce||D||A||F||de||W||I))return e.jsx(U,{blockType:"daily-action-plan",children:e.jsx("div",{className:"es-block__body es-dap__body",children:e.jsxs("div",{className:"es-dap__block-cta",children:[e.jsx("p",{className:"es-dap__block-cta-message",children:i("dap.empty.block_cta")}),e.jsx("button",{className:"es-dap__block-cta-btn",type:"button",onClick:B,children:i("dap.empty.block_cta_btn")})]})})});const pe=C?.normalRank,H=C?.paidRank,K=oe.map(Ce).filter(y=>y.scope==="normal").map(y=>y.text),Q=ie&&!!C&&(K.length>0||!!H);return e.jsxs(U,{blockType:"daily-action-plan",children:[e.jsx("div",{className:"es-dap__icon-row",children:e.jsx(ge,{panelKey:"daily-action-plan",baseUrl:m,apiKey:h?.apiKey,t:i})}),e.jsxs("div",{className:"es-block__body es-dap__body es-dap__deck",children:[f&&(V?e.jsx(z,{label:i("dap.section.focus"),message:i("dap.empty.tile_cta"),btnLabel:i("dap.empty.tile_cta_btn"),onNavigate:B}):u&&e.jsxs("div",{className:"es-dap__hero",children:[e.jsxs("div",{className:"es-dap__hero-lead",children:[e.jsx("span",{"aria-hidden":"true",children:Se[u.domain]??"🎯"})," ",i("dap.section.focus")," · ",u.domain,u.details?.deadlineUtc&&e.jsxs("span",{className:"es-dap__hero-deadline","data-es-no-read":!0,children:[" · ⏱ ",Z(u.details.deadlineUtc,x)]})]}),e.jsx("p",{className:"es-dap__hero-headline",children:u.summary}),u.details?.whyThisToday&&e.jsxs(O,{teaser:u.details.whyThisToday,isOpen:_.focus??!1,children:[e.jsx("p",{className:"es-dap__detail-text",children:u.details.whyThisToday}),u.details?.expectedOutcome&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--outcome",children:u.details.expectedOutcome})]}),e.jsx(S,{moreToggle:u.details?.whyThisToday&&e.jsx(M,{isOpen:_.focus??!1,onToggle:()=>R("focus"),expandLabel:i("dap.aria.expand_focus"),collapseLabel:i("dap.aria.collapse_focus"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.focus"),summary:u.summary,content:be(u,i,x),onTalk:v,t:i})}),w("focus")]})),W&&c&&e.jsxs("div",{className:"es-dap__risk",style:{borderLeftColor:Y(c.severity)},children:[e.jsxs("div",{className:"es-dap__risk-head",children:[e.jsx("span",{className:"es-dap__risk-title",children:i("dap.section.risk")}),e.jsx("span",{className:"es-dap__pill es-dap__pill--warn",style:{color:Y(c.severity)},children:i(`dap.risk.severity.${c.severity}`)})]}),e.jsx("p",{className:"es-dap__risk-blurb",children:i("dap.risk.blurb")}),c.summary&&e.jsx("p",{className:"es-dap__risk-summary",children:c.summary}),c.details?.description&&e.jsxs(O,{teaser:c.details.description,isOpen:_.risk??!1,children:[e.jsx("p",{className:"es-dap__detail-text",children:c.details.description}),c.details?.preventiveAction&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--step",children:c.details.preventiveAction}),c.details?.timeSensitivity&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--deadline",children:c.details.timeSensitivity})]}),e.jsx(S,{moreToggle:c.details?.description&&e.jsx(M,{isOpen:_.risk??!1,onToggle:()=>R("risk"),expandLabel:i("dap.aria.expand_risk"),collapseLabel:i("dap.aria.collapse_risk"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.risk"),summary:c.summary||c.details?.description||i("dap.section.risk"),content:ke(c,i),onTalk:v,t:i})}),w("risk")]}),Q&&e.jsxs(e.Fragment,{children:[e.jsx(Le,{normalRank:pe,paidRank:H,normalConditions:K,gaioLink:g&&e.jsx(T,{section:i("dap.gaio.section.blocker"),summary:i("dap.gaio.section.blocker"),content:ve(K,H,i),onTalk:v,t:i}),t:i}),w("blocker")]}),q&&G&&!Q&&e.jsx(z,{label:i("dap.section.structural"),message:i("dap.empty.tile_cta"),btnLabel:i("dap.empty.tile_cta_btn"),onNavigate:B}),I&&N&&e.jsxs(e.Fragment,{children:[e.jsx(Oe,{benefits:N,lang:x,gaioLink:g&&e.jsx(T,{section:i("dap.section.my_benefits"),summary:N.summary||i("dap.section.my_benefits"),content:Ne(N,i,x),onTalk:v,t:i}),t:i}),w("my_benefits")]}),j&&(D||A||F)&&e.jsxs("div",{className:"es-dap__play-rail",children:[D&&d&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"🤝"}),e.jsxs("span",{className:"es-dap__play-label",children:[i("dap.section.relationship")," · ",d.targetName]}),e.jsx("span",{className:"es-dap__play-spacer"}),d.details?.channelHint&&d.details.channelHint!=="none"&&e.jsxs("span",{className:"es-dap__pill",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",d.details.channelHint]})]}),e.jsx("div",{className:"es-dap__play-summary",children:d.summary}),d.details?.draftMessage&&e.jsxs(O,{teaser:d.details.draftMessage,isOpen:_.relationship??!1,children:[e.jsx("blockquote",{className:"es-dap__draft-message",children:d.details.draftMessage}),e.jsx(Me,{text:d.details.draftMessage,copyLabel:i("dap.play.copy_send"),copiedLabel:i("dap.play.copied")})]}),d.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:d.details.complianceNote})]}),e.jsx(S,{moreToggle:d.details?.draftMessage&&e.jsx(M,{isOpen:_.relationship??!1,onToggle:()=>R("relationship"),expandLabel:i("dap.aria.expand_relationship"),collapseLabel:i("dap.aria.collapse_relationship"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.relationship"),summary:d.summary,content:fe(d,i),onTalk:v,t:i})}),w("relationship")]}),A&&p&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"📣"}),e.jsx("span",{className:"es-dap__play-label",children:i("dap.section.recruitment")}),e.jsx("span",{className:"es-dap__play-spacer"}),e.jsx("span",{className:"es-dap__pill es-dap__pill--info",children:p.actionType.replace(/_/g," ")})]}),e.jsx("div",{className:"es-dap__play-summary",children:p.summary}),p.details?.rationale&&e.jsxs(O,{teaser:p.details.rationale,isOpen:_.recruitment??!1,children:[p.details?.candidateOrSegment&&e.jsx("p",{className:"es-dap__detail-text",children:p.details.candidateOrSegment}),e.jsx("p",{className:"es-dap__detail-text",children:p.details.rationale})]}),p.details?.concreteStep&&e.jsxs("div",{className:"es-dap__do",children:[e.jsxs("b",{children:[i("dap.play.do"),":"]})," ",p.details.concreteStep]}),p.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:p.details.complianceNote})]}),e.jsx(S,{moreToggle:p.details?.rationale&&e.jsx(M,{isOpen:_.recruitment??!1,onToggle:()=>R("recruitment"),expandLabel:i("dap.aria.expand_recruitment"),collapseLabel:i("dap.aria.collapse_recruitment"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.recruitment"),summary:p.summary,content:xe(p,i),onTalk:v,t:i})}),w("recruitment")]}),F&&o&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"🛒"}),e.jsx("span",{className:"es-dap__play-label",children:L?`${i("dap.section.sales")} · ${i("dap.sales.educational")}`:`${i("dap.section.sales")} · ${o.linkedToBinarySide}`}),e.jsx("span",{className:"es-dap__play-spacer"}),!L&&e.jsx("span",{className:"es-dap__pill es-dap__pill--ok",children:`${o.linkedToBinarySide} ${i("dap.gauge.leg")}`}),L&&e.jsx("span",{className:"es-dap__pill es-dap__pill--info",children:i("dap.sales.no_cycle")})]}),o.summary&&e.jsx("div",{className:"es-dap__play-summary",children:o.summary}),o.details?.rationale&&e.jsxs(O,{teaser:o.details.rationale,isOpen:_.sales??!1,children:[o.details?.productOrCycleAction&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--product",children:o.details.productOrCycleAction}),e.jsx("p",{className:"es-dap__detail-text",children:o.details.rationale})]}),o.details?.concreteStep&&e.jsxs("div",{className:"es-dap__do",children:[e.jsxs("b",{children:[i("dap.play.do"),":"]})," ",o.details.concreteStep]}),o.details?.marketSignal&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--market",children:o.details.marketSignal}),o.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:o.details.complianceNote})]}),e.jsx(S,{moreToggle:o.details?.rationale&&e.jsx(M,{isOpen:_.sales??!1,onToggle:()=>R("sales"),expandLabel:i("dap.aria.expand_sales"),collapseLabel:i("dap.aria.collapse_sales"),t:i}),gaioLink:!L&&g&&e.jsx(T,{section:i("dap.section.sales"),summary:o.summary,content:je(o,i),onTalk:v,t:i})}),w("sales")]})]})]})]})}export{He as Component,Fe as manifest};
|
|
4
|
-
//# sourceMappingURL=index-
|
|
4
|
+
//# sourceMappingURL=index-E59S8-Gw-CovGUxIZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{j as e,Q as m}from"../nexly.js";const h={slug:"crypto-ticker",name:"Crypto Ticker",version:"2.0.0",category:"data",requiredService:"crypto-intel",configSchema:{properties:{showFearGreed:{type:"boolean",default:!0},showNews:{type:"boolean",default:!0},newsLimit:{type:"number",default:5},showBtcPrice:{type:"boolean",default:!0}}},defaultConfig:{showFearGreed:!0,showNews:!0,newsLimit:5,showBtcPrice:!0},dataContract:{serviceSlug:"crypto-intel",inputSchema:{type:"object",properties:{fearGreedIndex:{type:"number"},fearGreedLabel:{type:"string"},btcPrice:{type:"number"},btcChange24h:{type:"number"},news:{type:"array",items:{type:"object",properties:{title:{type:"string"},source:{type:"string"}}}},summary:{type:"string"}},required:["summary"]},previewDataOverride:{fearGreedIndex:65,fearGreedLabel:"Greed",btcPrice:67420.5,btcChange24h:2.34,news:[{title:"Bitcoin hits new monthly high amid institutional buying",source:"CoinDesk"},{title:"Ethereum staking reaches record 32M ETH",source:"The Block"},{title:"SEC approves spot Solana ETF applications",source:"Bloomberg"}],summary:`Market Sentiment: 65 (Greed)
|
|
2
2
|
|
|
3
3
|
BTC: $67,420 | 24h: +2.34%`}},fields:[{id:"showFearGreed",type:"toggle",label:"Show Fear & Greed",default:!0,group:"Display"},{id:"showNews",type:"toggle",label:"Show news feed",default:!0,group:"Display"},{id:"newsLimit",type:"range",label:"Max news items",default:5,min:1,max:15,step:1,group:"Display"},{id:"showBtcPrice",type:"toggle",label:"Show BTC price",default:!0,group:"Display"}],events:{emits:[{name:"ticker:coinSelected",description:"User clicked on a coin entry"}],listens:[{name:"market:refresh",description:"Force refresh market data"}]},sizing:{minWidth:200,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function g({data:r,config:s,i18n:o}){const a=o?.t??(t=>t),l=s.showFearGreed??!0,p=s.showNews??!0,d=s.newsLimit??5,i=r.fearGreedIndex,n=r.fearGreedLabel,c=(r.news??[]).slice(0,d);return e.jsx(m,{blockType:"crypto-ticker",children:e.jsxs("div",{className:"es-block__body",children:[l&&i!=null&&e.jsxs("div",{className:"es-crypto__gauge",children:[e.jsx("div",{className:"es-crypto__gauge-label",children:a("crypto_ticker.fear_greed_label")}),e.jsx("div",{className:"es-crypto__gauge-value",children:i}),n&&e.jsx("div",{className:"es-crypto__gauge-sentiment",children:n})]}),p&&c.length>0&&e.jsxs("div",{className:"es-crypto__news",children:[e.jsx("div",{className:"es-crypto__news-title",children:a("crypto_ticker.news_title")}),e.jsx("ul",{className:"es-crypto__news-list",children:c.map((t,u)=>e.jsxs("li",{className:"es-crypto__news-item",children:[e.jsx("span",{children:t.title}),t.source&&e.jsx("span",{className:"es-crypto__news-source",children:t.source})]},u))})]}),!i&&c.length===0&&e.jsx("div",{className:"es-block__empty",children:a("crypto_ticker.empty")})]})})}export{g as Component,h as manifest};
|
|
4
|
-
//# sourceMappingURL=index-
|
|
4
|
+
//# sourceMappingURL=index-OcrS6o5Y-bdo5pwX-.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-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as g,j as a,Q as B}from"../nexly.js";import{C as K}from"./block-rating-D7hR2gTc-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-PxSB6BA6-DFxY6dqO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as q,j as e,Q as m,o as w}from"../nexly.js";import{m as l}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const M={slug:"rank-advancement-roadmap",name:"Rank Advancement Roadmap",version:"1.0.0",category:"data",requiredService:"rank-advancement-roadmap",configSchema:{properties:{mode:{type:"string",default:"basic"},showAiTip:{type:"boolean",default:!0}}},defaultConfig:{mode:"basic",showAiTip:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"rank-advancement-roadmap",inputSchema:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},progressPercent:{type:"number"},rankTree:{type:"array",items:{type:"object",properties:{rank:{type:"string"},requirements:{type:"array",items:{type:"string"}},achieved:{type:"boolean"}}}},aiTip:{type:"string"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{currentRank:"Silver",nextRank:"Gold",progressPercent:62,mode:"pro",aiTip:"You're 38% away from Gold. Focus on recruiting 2 active distributors to your right leg — that's your fastest path to the next milestone.",rankTree:[{rank:"G-Miner",requirements:["Personal purchase: 50 pts"],achieved:!0},{rank:"Miner",requirements:["Personal purchase: 100 pts","Team volume: 500 pts"],achieved:!0},{rank:"Developer",requirements:["Personal purchase: 200 pts","Team volume: 1,500 pts"],achieved:!0},{rank:"Team Leader",requirements:["Personal purchase: 300 pts","Team volume: 5,000 pts","2 Developers in team"],achieved:!0},{rank:"Manager",requirements:["Personal purchase: 400 pts","Team volume: 15,000 pts","2 Team Leaders"],achieved:!1},{rank:"Senior Manager",requirements:["Personal purchase: 500 pts","Team volume: 40,000 pts","3 Managers"],achieved:!1},{rank:"Vice President",requirements:["Personal purchase: 600 pts","Team volume: 100,000 pts","4 Senior Managers"],achieved:!1},{rank:"President",requirements:["Personal purchase: 700 pts","Team volume: 250,000 pts","5 Vice Presidents"],achieved:!1}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — current rank + progress",value:"basic"},{label:"Pro — full rank tree",value:"pro"}],group:"Display"},{id:"showAiTip",type:"toggle",label:"Show AI coaching tip (pro mode)",default:!0,group:"Display"}],events:{emits:[{name:"rar:rankExpanded",description:"User expanded a rank in the accordion"}],listens:[{name:"rar:refresh",description:"Force refresh rank data"}]}};function k(s,o,d){return Math.min(Math.max(s,o),d)}function D({data:s,config:o,actions:d,metadata:v,i18n:x}){const r=x?.t??(a=>a),_=o.mode??s.mode??"basic",g=o.showAiTip??!0,p=s.currentRank,t=s.nextRank,b=k(s.progressPercent??0,0,100),u=s.rankTree??[],h=s.aiTip,[j,y]=q.useState(new Set);if(!p&&!s.error)return e.jsx(m,{blockType:"rank-advancement-roadmap",children:e.jsx("div",{className:"es-block__body es-rar__body",children:e.jsxs("div",{className:"es-rar__current-card",children:[e.jsx("div",{className:"es-rar__section-label",children:r("rank_roadmap.current_rank")}),e.jsx("div",{className:"es-rar__rank-row",children:e.jsx("span",{className:"es-rar__rank-name",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"—"})}),e.jsxs("div",{className:"es-rar__progress-label",children:[e.jsx("span",{children:v?.dataQuality==="none"?r("rank_roadmap.signin_prompt"):r("rank_roadmap.loading")}),e.jsx("span",{children:"0%"})]}),e.jsx("div",{className:"es-rar__progress-bar",children:e.jsx("div",{className:"es-rar__progress-fill",style:{width:"0%"}})})]})})});if(s.error)return e.jsx(m,{blockType:"rank-advancement-roadmap",error:w(s.error)});function f(a){y(c=>{const n=new Set(c);return n.has(a)?n.delete(a):(n.add(a),d.emit("rar:rankExpanded",{rank:a})),n})}const i=k(b,0,100);return e.jsx(m,{blockType:"rank-advancement-roadmap",children:e.jsxs("div",{className:"es-block__body es-rar__body",children:[e.jsxs("div",{className:"es-rar__current-card",children:[e.jsx("div",{className:"es-rar__section-label",children:r("rank_roadmap.current_rank")}),e.jsxs("div",{className:"es-rar__rank-row",children:[e.jsx("span",{className:"es-rar__rank-name",children:l(p??"",r)}),e.jsxs("span",{className:"es-rar__rank-badge",children:[i,"%"]})]}),e.jsxs("div",{className:"es-rar__progress-label",children:[e.jsx("span",{children:r("rank_roadmap.progress_to",{rank:t?l(t,r):r("rank_roadmap.next_rank_fallback")})}),e.jsxs("span",{children:[i,"%"]})]}),e.jsx("div",{className:"es-rar__progress-bar",children:e.jsx("div",{className:"es-rar__progress-fill",style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r("rank_roadmap.progress_aria",{percent:i,rank:t?l(t,r):r("rank_roadmap.next_rank_fallback")})})}),t&&e.jsx("div",{className:"es-rar__next-rank-hint",children:r("rank_roadmap.next_label",{rank:l(t,r)})})]}),g&&_==="pro"&&e.jsxs("div",{className:`es-rar__ai-tip${h?"":" es-rar__ai-tip--loading"}`,children:[e.jsx("div",{className:"es-rar__ai-tip-label",children:r("rank_roadmap.ai_tip_label")}),e.jsx("div",{className:"es-rar__ai-tip-text",children:h??r("rank_roadmap.analyzing")})]}),_==="pro"&&u.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"es-rar__tree-label",children:r("rank_roadmap.tree_label")}),e.jsx("ul",{className:"es-rar__tree",role:"list",children:u.map(a=>{const c=a.rank===p,n=j.has(a.rank),N=["es-rar__tree-item",a.achieved?"es-rar__tree-item--achieved":"",c?"es-rar__tree-item--current":""].filter(Boolean).join(" ");return e.jsxs("li",{className:N,children:[e.jsxs("button",{className:"es-rar__tree-header",onClick:()=>f(a.rank),"aria-expanded":n,"aria-controls":`rar-reqs-${a.rank}`,children:[e.jsx("span",{className:"es-rar__tree-status-icon","aria-hidden":"true",children:a.achieved?"✓":c?"▶":"○"}),e.jsx("span",{className:"es-rar__tree-rank-name",children:l(a.rank,r)}),e.jsx("span",{className:`es-rar__tree-chevron${n?" es-rar__tree-chevron--open":""}`,"aria-hidden":"true",children:"▾"})]}),n&&e.jsx("ul",{id:`rar-reqs-${a.rank}`,className:"es-rar__tree-requirements",role:"list",children:a.requirements.map((T,P)=>e.jsx("li",{className:"es-rar__tree-req",children:T},P))})]},a.rank)})})]})]})})}export{D as Component,M as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-cCAzBYyN-W1lJrIDD.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-
|
|
2
|
+
//# sourceMappingURL=index-kAGaGinD-Dm9kbc85.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as w,r as t,j as e,Q as k}from"../nexly.js";const S={slug:"qa",name:"AI Q&A",version:"1.0.0",category:"interactive",requiredService:"ai-orchestrator",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},placeholder:{type:"string",default:""},maxQuestionsPerSession:{type:"number",default:5},responseLanguage:{type:"string",default:"en"}}},defaultConfig:{readAloudEnabled:!1,placeholder:"",maxQuestionsPerSession:5,responseLanguage:"en"},dataContract:{serviceSlug:"ai-orchestrator",inputSchema:{type:"object",properties:{answer:{type:"string",description:"AI answer to the user question"},question:{type:"string",description:"The question that was asked"}},required:["answer"]},previewDataOverride:{answer:"This product is made from 100% organic cotton and is machine washable. It comes in sizes XS-XXL.",question:"What materials is this made from?"}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"placeholder",type:"localized-text",label:"Input placeholder",default:"",placeholder:'Leave empty to use translated default (e.g. "Ask a question about this product...")',group:"Content"},{id:"maxQuestionsPerSession",type:"range",label:"Max questions per session",default:5,min:1,max:20,step:1,group:"Behavior"},{id:"responseLanguage",type:"select",label:"Response language",default:"en",options:[{label:"English",value:"en"},{label:"Korean",value:"ko"},{label:"Spanish",value:"es"},{label:"French",value:"fr"},{label:"German",value:"de"}],group:"Behavior"}],events:{emits:[{name:"qa:questionAsked",description:"User submitted a question"},{name:"qa:answerReceived",description:"AI answer received"}],listens:[{name:"qa:clear",description:"Clear Q&A history"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"]};function A({config:u,actions:h,i18n:m}){const s=m?.t??(a=>a),f=m?.currentLanguage??"en",x=w(u.placeholder,f,{t:s,fallbackKey:"qa.input_placeholder",enDefault:"Ask a question about this product..."}),i=u.maxQuestionsPerSession??5,[d,_]=t.useState(""),[o,v]=t.useState([]),[n,g]=t.useState(!1),[q,c]=t.useState(null),b=t.useRef(null),r=o.length>=i,p=t.useCallback(async()=>{const a=d.trim();if(!(!a||n||r)){g(!0),c(null);try{const l=await h.call("ask",{question:a,language:u.responseLanguage??"en"});l?.error?c(l.error):l?.answer?(v(j=>[...j,{question:a,answer:l.answer}]),_(""),setTimeout(()=>{b.current?.scrollIntoView({behavior:"smooth"})},50)):c(s("qa.error_no_answer"))}catch{c(s("qa.error_generic"))}finally{g(!1)}}},[d,n,r,h,u.responseLanguage]),y=t.useCallback(a=>{a.key==="Enter"&&(a.preventDefault(),p())},[p]);return e.jsxs(k,{blockType:"qa",children:[e.jsxs("div",{className:"es-block__body",children:[o.length===0&&!n&&e.jsx("div",{className:"es-block__empty es-qa__empty",children:s("qa.empty_state")}),o.length>0&&e.jsxs("div",{className:"es-qa__history",children:[o.map((a,l)=>e.jsxs("div",{className:"es-qa__entry",children:[e.jsxs("div",{className:"es-qa__question",children:[e.jsx("span",{className:"es-qa__question-label","aria-hidden":"true",children:"Q"}),e.jsx("span",{className:"es-qa__question-text",children:a.question})]}),e.jsxs("div",{className:"es-qa__answer",children:[e.jsx("span",{className:"es-qa__answer-label","aria-hidden":"true",children:"A"}),e.jsx("span",{className:"es-qa__answer-text",children:a.answer})]})]},l)),e.jsx("div",{ref:b})]}),q&&e.jsx("div",{className:"es-qa__error",role:"alert",children:q}),r&&e.jsx("div",{className:"es-qa__limit-notice",children:s("qa.limit_reached",{count:i})})]}),e.jsxs("div",{className:"es-block__footer",children:[e.jsxs("div",{className:"es-qa__input-row",children:[e.jsx("input",{className:"es-qa__input",type:"text",value:d,onChange:a=>_(a.target.value),onKeyDown:y,placeholder:r?s("qa.limit_reached",{count:i}):x,disabled:n||r,"aria-label":s("qa.input_aria_label")}),e.jsx("button",{className:"es-qa__btn",onClick:p,disabled:!d.trim()||n||r,type:"button","aria-label":s("qa.submit_aria_label"),children:s(n?"qa.loading":"qa.ask_button")})]}),i>0&&e.jsx("div",{className:"es-qa__counter",children:s("qa.counter",{used:o.length,max:i})})]})]})}export{A as Component,S as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-l8Oxwea3-Aqz1AnQ5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as t,j as e,Q as N}from"../nexly.js";const S={slug:"chat-session-nav",name:"Chat Session Navigator",version:"1.0.0",category:"interactive",configSchema:{},defaultConfig:{},sizing:{minWidth:200,preferredHeight:"fill",scrollable:!0},supportedPlacements:["sidebar","main"],events:{emits:[{name:"chat:select-session",description:"User selected a past chat session"}]}};function E(a,i){const d=Date.now()-new Date(a).getTime(),o=Math.floor(d/6e4);if(o<1)return i("time.just_now");if(o<60)return i("time.minutes_ago",{count:o});const c=Math.floor(o/60);return c<24?i("time.hours_ago",{count:c}):i("time.days_ago",{count:Math.floor(c/24)})}function H({actions:a,baseUrl:i,productId:d,i18n:o,auth:c,sessionId:v}){const n=o?.t??(s=>s),f=c?.jwt,[p,l]=t.useState(!1),[x,w]=t.useState([]),[h,b]=t.useState(!1),[j,g]=t.useState(null),[u,_]=t.useState(v??null);t.useEffect(()=>{_(v??null)},[v]);const m=t.useCallback(async()=>{b(!0),g(null);try{const s=await fetch(`${i}/api/chat/sessions?productId=${encodeURIComponent(d||"")}`,{headers:{...f?{Authorization:`Bearer ${f}`}:{}},credentials:"include"});if(!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();if(!r.success)throw new Error("Invalid response");w(r.data?.sessions??[])}catch{g(n("chat_session_nav.load_error"))}finally{b(!1)}},[i,f,d,n]);t.useEffect(()=>a.on("chat:session",s=>{const{sessionId:r}=s;r&&_(r),p&&m()}),[a,m,p]),t.useEffect(()=>a.on("chat:showHistory",()=>{l(!0),m()}),[a,m]),t.useEffect(()=>a.on("chat:clearHistory",()=>{l(!1)}),[a]);const y=t.useCallback(s=>{s!==u&&(_(s),a.emit("chat:select-session",{sessionId:s}),l(!1))},[a,u]),k=t.useCallback(()=>{a.emit("chat:clearHistory",void 0),_(null),l(!1)},[a]),C=t.useCallback(()=>{l(!1)},[]);return p?e.jsxs(N,{blockType:"chat-session-nav",children:[e.jsxs("div",{className:"es-csn__header",children:[e.jsx("span",{className:"es-csn__header-title",children:n("chat_session_nav.title")}),e.jsxs("div",{className:"es-csn__header-actions",children:[e.jsx("button",{type:"button",className:"es-csn__action-btn","aria-label":n("chat_session_nav.new_session"),title:n("chat_session_nav.new_session"),onClick:k,children:e.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})]})}),e.jsx("button",{type:"button",className:"es-csn__close-btn","aria-label":n("chat_session_nav.close"),onClick:C,children:"✕"})]})]}),e.jsx("div",{className:"es-block__body",children:e.jsxs("div",{className:"es-csn__list",role:"list","aria-label":n("chat_session_nav.list_aria"),children:[h&&e.jsx("div",{className:"es-csn__loading",role:"status",children:n("chat_session_nav.loading")}),j&&!h&&e.jsx("div",{className:"es-csn__error",role:"alert",children:j}),!h&&!j&&x.length===0&&e.jsx("div",{className:"es-csn__empty",children:n("chat_session_nav.empty")}),!h&&x.map(s=>e.jsxs("button",{role:"listitem",type:"button",className:`es-csn__item${s.id===u?" es-csn__item--active":""}`,onClick:()=>y(s.id),"aria-current":s.id===u?"true":void 0,children:[e.jsx("div",{className:"es-csn__item-preview",children:s.lastUserMessage??n("chat_session_nav.no_preview")}),e.jsxs("div",{className:"es-csn__item-meta",children:[e.jsx("span",{children:E(s.updatedAt,n)}),s.messageCount>0&&e.jsx("span",{children:n("chat_session_nav.message_count",{count:s.messageCount})})]})]},s.id))]})})]}):null}export{H as Component,S as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-oxM4Cgtc-R_xuAEQV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as l,j as e,Q as w}from"../nexly.js";import{S as z,I,L as T,j as W,_ as q,k as D,m as O}from"./index.modern-CioVZ357-BA5NTOmY.js";import"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";const Z={slug:"venue-map",name:"Venue Map",version:"1.0.0",category:"interactive",requiredService:"venue-discovery",configSchema:{properties:{zoom:{type:"number",default:13},showRadius:{type:"boolean",default:!0}}},defaultConfig:{zoom:13,showRadius:!0},dataContract:{serviceSlug:"venue-discovery",inputSchema:{type:"object",properties:{venues:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},category:{type:"string"},lat:{type:"number"},lng:{type:"number"},rating:{type:"number"},distanceKm:{type:"number"}}}},centerLat:{type:"number"},centerLng:{type:"number"},radiusKm:{type:"number"}},required:["venues"]},previewDataOverride:{venues:[{id:"v-1",name:"Blue Bottle Coffee",category:"cafe",lat:37.5172,lng:127.0473,rating:4.5,distanceKm:.3},{id:"v-2",name:"Coexartium Gallery",category:"gallery",lat:37.5118,lng:127.059,rating:4.2,distanceKm:.8},{id:"v-3",name:"Oakwood Premier COEX",category:"hotel",lat:37.5133,lng:127.0585,rating:4.7,distanceKm:1.1}],centerLat:37.515,centerLng:127.053,radiusKm:2}},fields:[{id:"zoom",type:"range",label:"Default zoom level",default:13,min:8,max:18,step:1,group:"Map"},{id:"showRadius",type:"toggle",label:"Show search radius circle",default:!0,group:"Display"}],events:{emits:[{name:"venueMap:markerClicked",description:"User clicked on a venue marker"},{name:"venueMap:viewChanged",description:"Map viewport moved or zoomed"}],listens:[{name:"venue:locationChanged",description:"Re-center map on new user location"},{name:"venues:refresh",description:"Reload venue pins on the map"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]},P={lat:37.5665,lng:126.978};let A=0;function F(){return e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3.5"}),e.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"5"}),e.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"22"}),e.jsx("line",{x1:"2",y1:"12",x2:"5",y2:"12"}),e.jsx("line",{x1:"19",y1:"12",x2:"22",y2:"12"})]})}function G(){return e.jsx("svg",{className:"es-venuemap__spinner",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5","aria-hidden":"true",children:e.jsx("path",{d:"M12 3 a9 9 0 1 0 9 9",strokeLinecap:"round"})})}function H({open:i}){return e.jsx("svg",{className:`es-venuemap__chevron${i?" es-venuemap__chevron--open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}function $({data:i,i18n:x,actions:d}){const r=x?.t??(a=>a),L=x?.currentLanguage??i.language??"en",[m,M]=l.useState(null),[o,S]=l.useState(!0),[p,y]=l.useState(!1),v=l.useState(()=>`es-venue-map-body-${A++}`)[0],j=l.useRef(null),K=z(j,"--es-color-on-primary","#ffffff"),R=l.useCallback(()=>{d?.emit&&(y(!0),d.emit("geo:request",void 0))},[d]);l.useEffect(()=>{if(!d?.on)return;const a=d.on("geo:status",t=>{const c=t?.state;(c==="granted"||c==="denied"||c==="unavailable")&&y(!1)});return()=>a()},[d]);const h=i.venues??[],u=h.length,b=i.googleMapsApiKey,g=i.googleMapsMapId??void 0,B=!!g,s=l.useMemo(()=>h.map(a=>{const t=a.coordinates?.lat??a.lat,c=a.coordinates?.lng??a.lng;return typeof t=="number"&&typeof c=="number"?{...a,lat:t,lng:c}:null}).filter(a=>a!==null),[h]),E=l.useMemo(()=>{const a=i.center;return a&&typeof a.lat=="number"&&typeof a.lng=="number"?{lat:a.lat,lng:a.lng}:s.length>0?{lat:s[0].lat,lng:s[0].lng}:P},[i.center,s]),n=m!=null?s[m]??null:null,_=l.useCallback(a=>M(a),[]),f=r(o?"venue_map.hide_map":"venue_map.show_map"),k=r("venue_map.use_my_location"),N=e.jsxs("div",{className:"es-venuemap__bar",children:[e.jsx("button",{type:"button",className:"es-venuemap__locate",onClick:R,disabled:p,"aria-label":k,"aria-busy":p,title:k,children:p?e.jsx(G,{}):e.jsx(F,{})}),e.jsxs("button",{type:"button",className:"es-venuemap__toggle",onClick:()=>S(a=>!a),"aria-expanded":o,"aria-controls":v,"aria-label":f,children:[e.jsx("span",{className:"es-venuemap__toggle-label",children:f}),e.jsx(H,{open:o})]})]}),C=o?void 0:"es-venuemap--collapsed";return b?e.jsxs(w,{blockType:"venue-map",className:C,children:[e.jsx("div",{id:v,className:"es-block__body es-block__body--map",hidden:!o,ref:j,children:o&&e.jsxs(e.Fragment,{children:[e.jsx(I,{apiKey:b,language:L,children:e.jsx(T,{className:"es-venuemap__canvas",defaultCenter:E,defaultZoom:s.length>0?13:11,mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,...g?{mapId:g}:{},children:s.map((a,t)=>B?e.jsx(W,{position:{lat:a.lat,lng:a.lng},title:a.name,onClick:()=>_(t),children:e.jsx(q,{background:t===m?"var(--es-color-interactive, #2563EB)":"var(--es-color-primary, #2563EB)",borderColor:D,glyphColor:K,scale:t===m?1.25:1})},t):e.jsx(O,{position:{lat:a.lat,lng:a.lng},title:a.name,onClick:()=>_(t)},t))})}),s.length>0&&u>s.length&&e.jsxs("div",{className:"es-venuemap__no-coords-badge",role:"note",children:[e.jsx("span",{"aria-hidden":"true",children:"📍"})," ",r("venue_map.partial_no_coords_badge",{count:u-s.length})]}),u>0&&s.length===0&&e.jsxs("div",{className:"es-venuemap__no-coords-overlay",role:"note",children:[e.jsx("div",{"aria-hidden":"true",children:"📍"}),e.jsx("div",{children:r("venue_map.no_coords_notice")})]}),n&&e.jsxs("div",{className:"es-venuemap__detail",role:"dialog","aria-label":n.name,children:[e.jsx("button",{type:"button",className:"es-venuemap__detail-close",onClick:()=>_(null),"aria-label":r("venue_map.close_details"),children:"×"}),e.jsx("h3",{className:"es-venuemap__detail-title",children:n.name}),e.jsxs("div",{className:"es-venuemap__detail-meta",children:[n.rating!=null&&e.jsxs("span",{className:"es-venuemap__detail-meta-item",children:["★"," ",n.rating.toFixed(1)]}),(n.type||n.types?.[0])&&e.jsx("span",{className:"es-venuemap__detail-meta-item",children:n.type??n.types?.[0]})]}),n.address&&e.jsx("div",{className:"es-venuemap__detail-address",children:n.address}),n.url&&e.jsxs("a",{href:n.url,className:"es-venuemap__detail-cta",target:"_blank",rel:"noopener noreferrer",children:[r("venue_list.view_details")," →"]})]})]})}),N]}):e.jsxs(w,{blockType:"venue-map",className:C,children:[e.jsx("div",{id:v,className:"es-block__body",hidden:!o,children:e.jsxs("div",{className:"es-map-placeholder",children:[e.jsx("div",{className:"es-map-placeholder__icon","aria-hidden":"true",children:"🗺"}),e.jsx("div",{className:"es-map-placeholder__message",children:r("venue_map.no_api_key")}),u>0&&e.jsx("div",{className:"es-map-placeholder__count",children:r("venue_map.venues_available",{count:u})}),e.jsx("div",{className:"es-map-placeholder__hint",children:r("venue_map.use_list_hint")})]})}),N]})}export{$ as Component,Z as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-qN6oEHVu-C_0Ll4qr.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{j as e,Q as l}from"../nexly.js";const m={slug:"demo-services",name:"DEMO — Services",version:"0.1.0",category:"content",configSchema:{properties:{items:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"}},required:["title"]},default:[]}}},defaultConfig:{items:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function d(r){return Array.isArray(r)?r.flatMap(t=>{if(typeof t!="object"||t===null)return[];const s=t,c=typeof s.title=="string"?s.title.trim():"";if(!c)return[];const o=typeof s.description=="string"&&s.description.trim().length>0?s.description.trim():void 0;return[{title:c,description:o}]}):[]}function p({data:r,config:t,i18n:s}){const c=s?.t??(i=>i),o=d(r?.items??t?.items);return o.length===0?e.jsx(l,{blockType:"demo-services",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-block__empty",children:c("demoServices.empty")})})}):e.jsx(l,{blockType:"demo-services",children:e.jsx("div",{className:"es-block__body es-demosvc",children:e.jsx("ul",{className:"es-demosvc__list",children:o.map((i,n)=>e.jsxs("li",{className:"es-demosvc__item",children:[e.jsx("span",{className:"es-demosvc__ordinal","aria-hidden":"true",children:n+1}),e.jsxs("div",{className:"es-demosvc__text",children:[e.jsx("h3",{className:"es-demosvc__title",children:i.title}),i.description&&e.jsx("p",{className:"es-demosvc__desc",children:i.description})]})]},n))})})})}export{p as Component,m as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-rblri-2U-I68tb-d3.js.map
|