@nexlylab/widget 1.33.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/INSTALL.txt +1 -1
- package/dist/runtime/{1.33.0/chunks/ClickToLoadEmbed-DdH19Upf-CnpjmfE1.js → 1.34.0/chunks/ClickToLoadEmbed-BNWVfZ1y-DuTZcv6f.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/PanelInfoVideo-XFcVoL2c-qpxDXdLm.js → 1.34.0/chunks/PanelInfoVideo-Di7qwhV_-qpxDXdLm.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/assistant-link-components-gMuMhmaU-rHpeX4O6.js → 1.34.0/chunks/assistant-link-components-DtT0biCl-jR32KHTm.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/assistant-link-policy-DlGAtyk7-By6jpR50.js → 1.34.0/chunks/assistant-link-policy-B77YPf4E-By6jpR50.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/block-rating-CAVRRYuG-CQMNokIy.js → 1.34.0/chunks/block-rating-uD_0LK-1-CQMNokIy.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/external-url-JbUnX7Da-rLiy7c9v.js → 1.34.0/chunks/external-url-Bx_GTDOx-rLiy7c9v.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CPGSyaZ4-BoVmvEOm.js → 1.34.0/chunks/index--7VB9nyF-BoVmvEOm.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-Cfy6Ocqe-CzwqZYRk.js → 1.34.0/chunks/index-66kR66X--CzwqZYRk.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BzVJMW3i-Bhh8_8Oh.js → 1.34.0/chunks/index-67cmm3Si-Bhh8_8Oh.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DTa1aDGz-Deg8QEW2.js → 1.34.0/chunks/index-7wlPUbYV-Deg8QEW2.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CDlumsdH-BgpZz7kC.js → 1.34.0/chunks/index-B80p2HRD-BHvEiO2X.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-HIu_g6Cr-CEIHlemy.js → 1.34.0/chunks/index-BHphkqVW-CEIHlemy.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-7yhyghzH-BlFXtfQb.js → 1.34.0/chunks/index-BIeasoH0-BlFXtfQb.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BP1Q45X4-f3F4IxQ5.js → 1.34.0/chunks/index-BPwttNii-f3F4IxQ5.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CmM1q2bg-D6H0juMn.js → 1.34.0/chunks/index-BTgHOj2W-D6H0juMn.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DOJHU9qy-Bil-vDLm.js → 1.34.0/chunks/index-BfGmnBJ0-BOltxOU-.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-CH-C6uk_-B-pT4hKt.js → 1.34.0/chunks/index-BjNWgAJk-B-pT4hKt.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-xQDKGkvA-pCzSL4DD.js → 1.34.0/chunks/index-BlY9hgA--pCzSL4DD.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-uYSCRIpT-qsVnaLmo.js → 1.34.0/chunks/index-BmajLlTC-qsVnaLmo.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-s0zHGN1t-DWm0RYZF.js → 1.34.0/chunks/index-BtBJMXR--DWm0RYZF.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BCxeWwto-B9PuY2Gx.js → 1.34.0/chunks/index-Bz-3E3Sa-B9PuY2Gx.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-D9fi5TQ9-k8zxZkfU.js → 1.34.0/chunks/index-CM2ok1Hp-k8zxZkfU.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BblCrrAW-bh6F7tw3.js → 1.34.0/chunks/index-CMdx7oFx-bh6F7tw3.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-SV2KdT0_-BZw4n83V.js → 1.34.0/chunks/index-COobDdoM-BZw4n83V.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BPfUysTZ-CV5ZiVsD.js → 1.34.0/chunks/index-CQCPJl3S-CV5ZiVsD.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BO0vI80C-qK4w7DnX.js → 1.34.0/chunks/index-CSsAPgvv-qK4w7DnX.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DZNxd978-BmIQ-NmU.js → 1.34.0/chunks/index-CXm6d9l1-BmIQ-NmU.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BjHXOMPQ-Bt7j8evJ.js → 1.34.0/chunks/index-CZcU6ylZ-Bt7j8evJ.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BwnCq3yC-LScXPMbE.js → 1.34.0/chunks/index-Ce73FsEJ-Ce0fEutJ.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-S2W2KqpV-PMvqlUvO.js → 1.34.0/chunks/index-Cf3qMIwZ-PMvqlUvO.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CnknkPUN-Yl3jEGAx.js → 1.34.0/chunks/index-CqSCG8MM-Yl3jEGAx.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CZCcZigQ-qH_mrcVT.js → 1.34.0/chunks/index-CzfX3ctc-qH_mrcVT.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DsyaMk1k-DpMzyqHN.js → 1.34.0/chunks/index-DBhWCUM5-DpMzyqHN.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CYP-tLa5-DLVDVk-F.js → 1.34.0/chunks/index-DT9H1y9L-DladDuuj.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-CNbQ508J-BPOHZMXu.js → 1.34.0/chunks/index-DbY1AG4s-C-OyGFef.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-qzvjftnO-CDVtcfdt.js → 1.34.0/chunks/index-Ddxqdy4M-CDVtcfdt.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CVtuVQCx-Dtq7n928.js → 1.34.0/chunks/index-DmV2pHdJ-Dtq7n928.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CZSW9eXg-BwcGrX1b.js → 1.34.0/chunks/index-DnWzIgAa-DlTfKZaL.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index-Bd_8PmPr-CgO1smBF.js → 1.34.0/chunks/index-Dnqtxtmw-CgO1smBF.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-BWY1nqf0-DX50C5MZ.js → 1.34.0/chunks/index-Dw35VwDs-DX50C5MZ.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index--H6hRpBJ-F9_TzvkO.js → 1.34.0/chunks/index-Dydy8_XR-F9_TzvkO.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-NPLN6oCC-VW9D8cgC.js → 1.34.0/chunks/index-FHHrEvNZ-VW9D8cgC.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-v9CNsbwM-CavFmRiD.js → 1.34.0/chunks/index-RyI_7m1j-CavFmRiD.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DG6McKPZ-CqZ9_vG_.js → 1.34.0/chunks/index-TJEJpVI7-CqZ9_vG_.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-Ci7P37Ya-W5nof5Mx.js → 1.34.0/chunks/index-Va_2P_Gg-Kzu4aFqn.js} +2 -2
- package/dist/runtime/{1.33.0/chunks/index--pcCOJWb-BzpgdoE8.js → 1.34.0/chunks/index-_wovirve-BzpgdoE8.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-CNP-4dFm-BlRhWcs1.js → 1.34.0/chunks/index-kmVVSAKR-BlRhWcs1.js} +1 -1
- package/dist/runtime/{1.33.0/chunks/index-DUV1wU5j-ErDxRmJu.js → 1.34.0/chunks/index-xV27oZEe-ErDxRmJu.js} +1 -1
- package/dist/runtime/1.34.0/nexly.js +61 -0
- package/dist/v1.js +4 -4
- package/package.json +1 -1
- package/dist/runtime/1.33.0/nexly.js +0 -61
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/allowed-elements-C0OfX2zF-DIBV8lKu.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index.modern-CioVZ357-nfRNslCS.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
- /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,j as e,e as U,l as ue}from"../nexly.js";import{C as ye}from"./block-rating-CAVRRYuG-CQMNokIy.js";import{j as ge}from"./PanelInfoVideo-XFcVoL2c-qpxDXdLm.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,e as U,l as ue}from"../nexly.js";import{C as ye}from"./block-rating-uD_0LK-1-CQMNokIy.js";import{j as ge}from"./PanelInfoVideo-Di7qwhV_-qpxDXdLm.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 Q(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),Y=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:Q(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:Q(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")]}),Y&&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&&!Y&&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-DbY1AG4s-C-OyGFef.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as d,K as a,Z as s}from"../nexly.js";const S={slug:"guest-auth",name:"Guest Authentication",version:"1.0.0",category:"content",requiredService:"",configSchema:{properties:{}},defaultConfig:{},sizing:{minWidth:0,preferredHeight:0,scrollable:!1},dataContract:{serviceSlug:"",inputSchema:{type:"object",properties:{fingerprint:{type:"string"}},required:["fingerprint"]},previewDataOverride:{fingerprint:"00000000-0000-4000-a000-000000000000"}},fields:[],events:{emits:[{name:"auth:guest",description:"Guest session created — carries { user: { id }, accessToken }"}],listens:[]},supportedPlacements:["main"]};function m(e){return`es-widget-guest-fp:${e}`}function y(){if(typeof crypto>"u")return null;if(typeof crypto.randomUUID=="function"){const[t]=s(()=>crypto.randomUUID());if(t)return t}if(typeof crypto.getRandomValues!="function")return null;const[e]=s(()=>crypto.getRandomValues(new Uint8Array(16)));if(!e)return null;e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=Array.from(e,t=>t.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function h(e,r){if(e)return e;if(typeof window>"u")return;const t=m(r),[i]=s(()=>window.localStorage.getItem(t));if(i)return i;const n=y();if(n)return s(()=>window.localStorage.setItem(t,n)),n}function $({baseUrl:e,actions:r,externalContext:t,productId:i}){const n=d.useRef(!1);return d.useEffect(()=>{if(n.current)return;const c=t?.apiKey;if(!c)return;const u=h(t?.fp,i);u&&(n.current=!0,(async()=>{const[o,f]=await a(fetch(`${e}/api/widget/auth/guest`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":c},body:JSON.stringify({fingerprint:u})}));if(f||!o){console.error("[guest-auth] Error:",f);return}if(!o.ok){const[g]=await a(o.text());console.error("[guest-auth] Auth failed:",o.status,g??"");return}const[p]=await a(o.json()),l=p?.data?.user?.id;l&&r.emit("auth:guest",{user:{id:l},accessToken:p?.data?.accessToken})})())},[e,r,t,i]),null}export{$ as Component,S as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-Ddxqdy4M-CDVtcfdt.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{L as b,r as s,j as e,e 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 r=d?.t??(a=>a),g=d?.currentLanguage??"en",y=b(m.placeholder,g,{t:r,fallbackKey:"knowledge_search.placeholder",enDefault:"Search knowledge base..."}),[l,u]=s.useState(""),[n,f]=s.useState(null),[p,c]=s.useState(null),[t,h]=s.useState(!1),i=s.useCallback(async()=>{const a=l.trim();if(!(!a||t)){f(a),c(null),u(""),h(!0);try{const _=await o.call("search",{query:a});c(_?.answer??null)}catch{c(r("knowledge_search.error"))}finally{h(!1)}}},[l,t,o,r]),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()||t,type:"button",children:r("knowledge_search.search_btn")})]})}),e.jsxs("div",{className:"es-block__body",children:[t&&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:r("knowledge_search.generating")})]}),!t&&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-DmV2pHdJ-Dtq7n928.js.map
|