1import{c as e,i as t,p as n,s as r}from"./lib-Ds2fPr2D.js";import{C as i,n as a,t as o}from"./config-BDzlV2Cc.js";import{t as s}from"./use-reduced-motion-CiRYnfy8.js";import{c,r as l,t as u}from"./AppWindow-BHTApcrr.js";import{t as d}from"./Stage.module-BqhHVP2m.js";var f=n(e(),1),p={root:`_root_se9oc_2`,title:`_title_se9oc_8`,scroll:`_scroll_se9oc_15`,svg:`_svg_se9oc_20`,compact:`_compact_se9oc_26`,colLabel:`_colLabel_se9oc_31`,edge:`_edge_se9oc_37`,arrowHead:`_arrowHead_se9oc_44`,edgeLabel:`_edgeLabel_se9oc_49`,nodeBox:`_nodeBox_se9oc_58`,nodeText:`_nodeText_se9oc_64`,node:`_node_se9oc_58`},m=r(),h=[`system`,`record`,`entity`,`rule`,`metric`],g={system:t({ko:`ìì² ìì¤í
`,en:`Source system`}),record:t({ko:`ê¸°ë¡ Â· 문ì`,en:`Records`}),entity:t({ko:`ê°ì²´`,en:`Entities`}),rule:t({ko:`íì¬ ê¸°ì¤`,en:`Company rules`}),metric:t({ko:`íì · ì§í`,en:`Result`})},_=32,v=22,y=54,b=6,x=20,S=8,C=11;function w(e){let t=0;for(let n of e)t+=/[\u1100-\u11ff\u3130-\u318f\uac00-\ud7af\u3000-\u9fff\uff00-\uffef]/.test(n)?C:C*.58;return t}function T({graph:e,title:t,compact:n,hideEdgeLabels:r}){let i=h.filter(t=>e.nodes.some(e=>e[2]===t)),a=new Map,o=new Map,s=i.map(()=>0),c=i.map(()=>0);for(let[t,n,r]of e.nodes){let e=i.indexOf(r);a.set(t,e),o.set(t,s[e]++),c[e]=Math.max(c[e],w(n)+18)}let l=[],u=b;for(let e=0;e<i.length;e++)l.push(u),u+=c[e]+y;let d=u-y+b,f=Math.max(...s),C=x+f*_+S,T=e=>{let t=a.get(e)??0,n=o.get(e)??0,r=x+(f-s[t])*_/2+n*_+(_-v)/2;return{x:l[t],y:r,w:c[t],h:v}},E=new Map(e.nodes.map(e=>[e[0],e]));return(0,m.jsxs)(`figure`,{className:`${p.root} ${n?p.compact:``}`,children:[t&&(0,m.jsx)(`figcaption`,{className:p.title,children:t}),(0,m.jsx)(`div`,{className:p.scroll,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 ${d} ${C}`,width:d,height:C,className:p.svg,style:n?{width:`100%`,maxWidth:d,minWidth:Math.round(d*.78),height:`auto`}:void 0,role:`img`,"aria-label":`${t??``} ${e.edges.map(([e,t,n])=>`${E.get(e)?.[1]} â ${E.get(t)?.[1]}${n?` (${n})`:``}`).join(`, `)}`,children:[(0,m.jsx)(`defs`,{children:(0,m.jsx)(`marker`,{id:`op-arrow`,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`6`,markerHeight:`6`,orient:`auto`,children:(0,m.jsx)(`path`,{d:`M0,0 L8,4 L0,8 z`,className:p.arrowHead})})}),i.map((e,t)=>(0,m.jsx)(`text`,{x:l[t]+c[t]/2,y:11,textAnchor:`middle`,className:p.colLabel,children:g[e]},e)),e.edges.map(([e,t,n],i)=>{let a=T(e),o=T(t),s=a.x+a.w,c=a.y+a.h/2,l=o.x,u=o.y+o.h/2,d=(s+l)/2;return(0,m.jsxs)(`g`,{children:[(0,m.jsx)(`path`,{d:`M${s},${c} C${d},${c} ${d},${u} ${l-2},${u}`,className:p.edge,markerEnd:`url(#op-arrow)`}),n&&!r&&(0,m.jsx)(`text`,{x:d,y:(c+u)/2-4,textAnchor:`middle`,className:p.edgeLabel,children:n})]},i)}),e.nodes.map(([e,t,n])=>{let r=T(e);return(0,m.jsxs)(`g`,{className:p.node,"data-kind":n,children:[(0,m.jsx)(`rect`,{x:r.x,y:r.y,width:r.w,height:r.h,rx:n===`metric`?11:5,className:p.nodeBox}),(0,m.jsx)(`text`,{x:r.x+r.w/2,y:r.y+r.h/2+4,textAnchor:`middle`,className:p.nodeText,children:t})]},e)})]})})]})}var E={root:`_root_1b6m1_2`,chrome:`_chrome_1b6m1_15`,dots:`_dots_1b6m1_25`,product:`_product_1b6m1_38`,scope:`_scope_1b6m1_44`,sample:`_sample_1b6m1_53`,chips:`_chips_1b6m1_63`,chip:`_chip_1b6m1_63`,chipNo:`_chipNo_1b6m1_98`,stage:`_stage_1b6m1_117`,scenario:`_scenario_1b6m1_128`,aBody:`_aBody_1b6m1_141`,action:`_action_1b6m1_142`,guard:`_guard_1b6m1_143`,fill:`_fill_1b6m1_144`,turn:`_turn_1b6m1_148`,q:`_q_1b6m1_154`,a:`_a_1b6m1_141`,avatar:`_avatar_1b6m1_161`,avatarAi:`_avatarAi_1b6m1_177`,qText:`_qText_1b6m1_183`,caret:`_caret_1b6m1_194`,blink:`_blink_1b6m1_1`,rise:`_rise_1b6m1_1`,lead:`_lead_1b6m1_234`,detail:`_detail_1b6m1_242`,causes:`_causes_1b6m1_251`,cause:`_cause_1b6m1_251`,causeLabel:`_causeLabel_1b6m1_268`,track:`_track_1b6m1_274`,grow:`_grow_1b6m1_1`,causeValue:`_causeValue_1b6m1_296`,guardMark:`_guardMark_1b6m1_316`,actionHead:`_actionHead_1b6m1_346`,actionLabel:`_actionLabel_1b6m1_353`,actionOwner:`_actionOwner_1b6m1_358`,actionText:`_actionText_1b6m1_362`,buttons:`_buttons_1b6m1_369`,approve:`_approve_1b6m1_376`,hold:`_hold_1b6m1_377`,human:`_human_1b6m1_400`,decided:`_decided_1b6m1_406`,foot:`_foot_1b6m1_413`,footNote:`_footNote_1b6m1_424`,playBtn:`_playBtn_1b6m1_428`,tableWrap:`_tableWrap_1b6m1_473`,sqlWrap:`_sqlWrap_1b6m1_481`,sqlLabel:`_sqlLabel_1b6m1_486`,sql:`_sql_1b6m1_481`,table:`_table_1b6m1_473`,trend:`_trend_1b6m1_561`,trendLabel:`_trendLabel_1b6m1_567`,trendLimit:`_trendLimit_1b6m1_576`,trendSvg:`_trendSvg_1b6m1_580`,trendPath:`_trendPath_1b6m1_587`,trendDot:`_trendDot_1b6m1_595`,trendDotLast:`_trendDotLast_1b6m1_601`,trendLimitLine:`_trendLimitLine_1b6m1_605`,trendVal:`_trendVal_1b6m1_612`,trendValLast:`_trendValLast_1b6m1_618`,trendAxis:`_trendAxis_1b6m1_623`,sources:`_sources_1b6m1_629`,sourcesLabel:`_sourcesLabel_1b6m1_635`,sourceList:`_sourceList_1b6m1_642`,source:`_source_1b6m1_629`,sourceBadge:`_sourceBadge_1b6m1_657`,sourceBody:`_sourceBody_1b6m1_680`,sourceTitle:`_sourceTitle_1b6m1_685`,sourceMeta:`_sourceMeta_1b6m1_695`,sourceExcerpt:`_sourceExcerpt_1b6m1_699`,views:`_views_1b6m1_755`,viewBtn:`_viewBtn_1b6m1_764`,onto:`_onto_1b6m1_800`,ontoLead:`_ontoLead_1b6m1_815`,legend:`_legend_1b6m1_828`,detailLabel:`_detailLabel_1b6m1_875`,pendingRing:`_pendingRing_1b6m1_1`},D=30,O=2600,k=22,A=5200,j=14e3,M=7e3,N={erp:`ERP`,mes:`MES`,wms:`WMS`,doc:`DOC`,sheet:`XLS`,log:`LOG`,db:`DB`,dwg:`DWG`,plan:`PLAN`};function P({table:e}){let n=new Set(e.num??[]);return(0,m.jsxs)(`div`,{className:E.tableWrap,children:[(0,m.jsxs)(`table`,{className:E.table,children:[(0,m.jsx)(`thead`,{children:(0,m.jsx)(`tr`,{children:e.cols.map((e,t)=>(0,m.jsx)(`th`,{scope:`col`,"data-num":n.has(t)||void 0,children:e},t))})}),(0,m.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,m.jsx)(`tr`,{children:e.map((e,t)=>(0,m.jsx)(`td`,{"data-num":n.has(t)||void 0,children:e},t))},t))})]}),e.sql&&(0,m.jsxs)(`details`,{className:E.sqlWrap,children:[(0,m.jsx)(`summary`,{className:E.sqlLabel,children:t({ko:`ìì±ë SQL 보기`,en:`Show generated SQL`})}),(0,m.jsx)(`pre`,{className:E.sql,children:e.sql})]})]})}function F(e){let t=new Map,n=new Map;return e.forEach((e,r)=>{let i=new Map;for(let[n,a,o]of e.nodes){let e=t.get(n),s=n;e&&e[1]!==a&&(s=`${n}#${r}`,i.set(n,s)),t.has(s)||t.set(s,[s,a,o])}for(let[t,r,a]of e.edges){let e=i.get(t)??t,o=i.get(r)??r,s=`${e}>${o}`;n.has(s)||n.set(s,[e,o,a])}}),{nodes:[...t.values()],edges:[...n.values()]}}function I({trend:e}){let t=e.limit==null?e.points:[...e.points,e.limit],n=Math.min(...t),r=Math.max(...t)-n||1,i=t=>8+t*304/Math.max(1,e.points.length-1),a=e=>14+56*(1-(e-n)/r),o=e.points.map((e,t)=>`${t===0?`M`:`L`}${i(t).toFixed(1)},${a(e).toFixed(1)}`).join(` `),s=e.points.length-1,c=e.points.indexOf(Math.max(...e.points)),l=t=>`${Number.isInteger(t)?t:t.toFixed(1)}${e.unit??``}`;return(0,m.jsxs)(`figure`,{className:E.trend,children:[(0,m.jsxs)(`figcaption`,{className:E.trendLabel,children:[(0,m.jsx)(`span`,{children:e.label}),e.limit!=null&&(0,m.jsx)(`span`,{className:E.trendLimit,children:e.limitLabel??l(e.limit)})]}
1),(0,m.jsxs)(`svg`,{viewBox:`0 0 320 88`,className:E.trendSvg,role:`img`,"aria-label":`${e.label}: ${e.points.map(l).join(`, `)}`,children:[e.limit!=null&&(0,m.jsx)(`line`,{x1:8,x2:312,y1:a(e.limit),y2:a(e.limit),className:E.trendLimitLine}),(0,m.jsx)(`path`,{d:o,className:E.trendPath}),e.points.map((e,t)=>(0,m.jsx)(`circle`,{cx:i(t),cy:a(e),r:t===s?3.5:2.2,className:t===s?E.trendDotLast:E.trendDot},t)),(0,m.jsx)(`text`,{x:i(0),y:a(e.points[0])-6,className:E.trendVal,textAnchor:`start`,children:l(e.points[0])}),c>=2&&c<=s-2&&(0,m.jsx)(`text`,{x:i(c),y:a(e.points[c])-6,className:E.trendVal,textAnchor:`middle`,children:l(e.points[c])}),(0,m.jsx)(`text`,{x:i(s),y:a(e.points[s])-6,className:`${E.trendVal} ${E.trendValLast}`,textAnchor:`end`,children:l(e.points[s])}),(0,m.jsx)(`text`,{x:8,y:84,className:E.trendAxis,textAnchor:`start`,children:e.span[0]}),(0,m.jsx)(`text`,{x:312,y:84,className:E.trendAxis,textAnchor:`end`,children:e.span[1]})]})]})}function L({items:e}){return(0,m.jsxs)(`div`,{className:E.sources,children:[(0,m.jsx)(`p`,{className:E.sourcesLabel,children:t({ko:`ì°¸ê³ í 문ì · 기ë¡`,en:`Documents and records used`})}),(0,m.jsx)(`ul`,{className:E.sourceList,children:e.map((e,t)=>(0,m.jsxs)(`li`,{className:E.source,"data-kind":e.kind,children:[(0,m.jsx)(`span`,{className:E.sourceBadge,"aria-hidden":`true`,children:N[e.kind]}),(0,m.jsxs)(`div`,{className:E.sourceBody,children:[(0,m.jsxs)(`p`,{className:E.sourceTitle,children:[(0,m.jsx)(`span`,{children:e.title}),(0,m.jsx)(`span`,{className:E.sourceMeta,children:e.meta})]}),e.excerpt&&(0,m.jsx)(`blockquote`,{className:E.sourceExcerpt,children:e.excerpt})]})]},t))})]})}function R({industry:e,className:n,standalone:r,embedded:c,view:l,onDecision:u,hideChips:d,hideFoot:p,onState:h,handleRef:g}){let _=a[e],v=!!s(),[y,b]=(0,f.useState)({si:0,ti:0,chars:0,stage:`type`}),[x,S]=(0,f.useState)({}),C=x[y.si]??null,[w,N]=(0,f.useState)(!1),[R,z]=(0,f.useState)(!0),[B,V]=(0,f.useState)(!1),[H,U]=(0,f.useState)(`chat`),W=l??H,G=o[e],K=(0,f.useRef)(null),q=(0,f.useRef)(null),J=_.scenarios[y.si],Y=B&&y.stage!==`type`,X=!v&&!w&&R&&!Y&&W===`chat`;(0,f.useEffect)(()=>{let e=K.current;if(!e||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(([e])=>z(!!e?.isIntersecting),{threshold:.2});return t.observe(e),()=>t.disconnect()},[]),(0,f.useEffect)(()=>{if(!X)return;let e=J.turns,t=e[y.ti],n=0,r=null;y.stage===`type`?y.chars<t.q.length?(n=D,r={...y,chars:y.chars+1}):(n=380,r={...y,stage:`answer`}):y.stage===`answer`?(n=Math.min(O+t.a.length*k,4800),r=y.ti+1<e.length?{si:y.si,ti:y.ti+1,chars:0,stage:`type`}:{...y,stage:`end`}):(n=C?M:J.action?j:A,r={si:(y.si+1)%_.scenarios.length,ti:0,chars:0,stage:`type`});let i=window.setTimeout(()=>{r&&r.si===0&&y.si!==0&&S({}),r&&b(r)},n);return()=>window.clearTimeout(i)},[y,X,J,C,_.scenarios.length]),(0,f.useEffect)(()=>{let e=q.current;e&&e.scrollTo({top:e.scrollHeight,behavior:v?`auto`:`smooth`})},[y.ti,y.stage,C,v]);let Z=e=>{b({si:e,ti:0,chars:0,stage:v?`end`:`type`})};(0,f.useEffect)(()=>{if(!h)return;let e=J.turns,t=e[y.ti],n=y.stage===`type`?t.q.length?y.chars/t.q.length*.3:0:y.stage===`answer`?.75:1,r=Math.min(1,(y.ti+n)/e.length),i=y.ti===e.length-1&&y.stage===`end`,a=x[y.si]??null,o=a?`decided`:i&&J.action?`action`:y.stage===`type`?`typing`:y.stage===`answer`?`answering`:`reading`;h({si:y.si,total:_.scenarios.length,progress:r,paused:w,reading:Y,reduceMotion:v,phase:o,hasAction:!!J.action,decision:a,owner:J.action?.owner})},[y,w,Y,v,x]);let Q=(e,t)=>{S(n=>({...n,[e]:t})),u?.({scenario:_.scenarios[e].title,decision:t,at:new Date})};return(0,f.useImperativeHandle)(g,()=>({go:Z,togglePause:()=>N(e=>!e),decide:e=>Q(y.si,e)}),[v,y.si]),(0,m.jsxs)(`div`,{ref:K,className:`${E.root} ${n??``}`,"data-standalone":r||void 0,"data-embedded":c||void 0,role:`group`,"aria-label":t({ko:`${_.product} ì°ì
ë³ ìì ëí`,en:`${_.product} example conversation`}),children:[!c&&(0,m.jsxs)(`div`,{className:E.chrome,children:[(0,m.jsxs)(`span`,{className:E.dots,"aria-hidden":`true`,children:[(0,m.jsx)(`i`,{}),(0,m.jsx)(`i`,{}),(0,m.jsx)(`i`,{})]}),(0,m.jsx)(`strong`,{className:E.product,children:_.product}),(0,m.jsx)(`span`,{className:E.scope,children:_.scope}),l===void 0&&(0,m.jsxs)(`div`,{className:E.views,role:`group`,"aria-label":t({ko:`보기`,en:`View`}),children:[(0,m.jsx)(`button`,{type:`button`,className:E.viewBtn,"data-on":W===`chat`||void 0,"aria-pressed":W===`chat`,onClick:()=>U(`chat`),children:t({ko:`ëí`,en:`Chat`})}),(0,m.jsx)(`button`,{type:`button`,className:E.viewBtn,"data-on":W===`onto`||void 0,"aria-pressed":W===`onto`,onClick:()=>U(`onto`),children:t({ko:`ì¨í¨ë¡ì§`,en:`Ontology`})})]}),(0,m.jsx)(`span`,{className:E.sample,children:t({ko:`ìì íë©´ · ìì
1 ë°ì´í°`,en:`Example screen · sample data`})})]}),W===`onto`&&(0,m.jsxs)(`div`,{className:E.onto,children:[(0,m.jsx)(`p`,{className:E.ontoLead,children:t({ko:`ì¸ ê°ì§ ìì ì§ë¬¸ì ì¬ì©í 기ë¡, ê°ì²´, íì¬ ê¸°ì¤ê³¼ íì 결과를 ë³´ì¬ì¤ëë¤. 기ì¤(ì ì )ì íì¬ê° ì íë©°, AIë ì°ê²°ë ê´ê³ë¥¼ ë°ë¼ ìì¸ì ë¶ìí©ëë¤. ìì² ë°ì´í°ë ìì íì§ ììµëë¤.`,en:`What the three questions read in this industry: which records from which source systems, joined through which entities, compared against which company rules, to reach a result. Rules (dashed) are set by the company; the AI follows these relations to find causes. Nothing is written back.`})}),(0,m.jsx)(T,{graph:F(G),hideEdgeLabels:!0}),(0,m.jsxs)(`ul`,{className:E.legend,"aria-label":t({ko:`기í¸`,en:`Legend`}),children:[(0,m.jsx)(`li`,{"data-kind":`system`,children:t({ko:`ìì² ìì¤í
· ì½ê¸° ì ì©`,en:`Source system â read-only`})}),(0,m.jsx)(`li`,{"data-kind":`record`,children:t({ko:`ê¸°ë¡ Â· 문ì`,en:`Records and documents`})}),(0,m.jsx)(`li`,{"data-kind":`entity`,children:t({ko:`ê°ì²´ · ì¨í¨ë¡ì§ì ì°ê²° ë¨ì`,en:`Entity â what the ontology joins`})}),(0,m.jsx)(`li`,{"data-kind":`rule`,children:t({ko:`íì¬ ê¸°ì¤ Â· ì¬ëì´ ì ì`,en:`Company rule â set by people`})}),(0,m.jsx)(`li`,{"data-kind":`metric`,children:t({ko:`íì · ì§í`,en:`Result`})})]})]}),(0,m.jsx)(`div`,{className:E.chips,role:`group`,"aria-label":t({ko:`ìì ì§ë¬¸ ê³ ë¥´ê¸°`,en:`Pick an example`}),hidden:W!==`chat`||d,children:_.scenarios.map((e,t)=>(0,m.jsxs)(`button`,{type:`button`,className:E.chip,"data-on":t===y.si||void 0,"aria-pressed":t===y.si,onClick:()=>Z(t),children:[(0,m.jsx)(`span`,{className:E.chipNo,children:t+1}),e.title]},e.title))}),(0,m.jsx)(`div`,{ref:q,className:E.stage,"data-coach":`stage`,hidden:W!==`chat`,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),children:_.scenarios.slice(0,y.si+1).map((e,n)=>{let r=n===y.si,a=!r||v?e.turns.length:y.ti+1,o=!r||v||y.stage===`end`,s=x[n]??null;return(0,m.jsxs)(`div`,{className:E.scenario,"data-done":!r||void 0,children:[e.turns.slice(0,a).map((e,i)=>{let a=r&&i===y.ti&&!v,o=!a||y.chars>=e.q.length,s=a?e.q.slice(0,y.chars):e.q,c=!a||y.stage!==`type`;return(0,m.jsxs)(`div`,{className:E.turn,children:[(0,m.jsxs)(`div`,{className:E.q,children:[(0,m.jsx)(`span`,{className:E.avatar,"aria-hidden":`true`,children:_.asker}),(0,m.jsxs)(`p`,{className:E.qText,children:[s,!o&&(0,m.jsx)(`span`,{className:E.caret,"aria-hidden":`true`})]})]}),c&&(0,m.jsxs)(`div`,{className:E.a,children:[(0,m.jsx)(`span`,{className:`${E.avatar} ${E.avatarAi}`,"aria-hidden":`true`,children:`AI`}),(0,m.jsxs)(`div`,{className:E.aBody,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":t({ko:`AI ëµ`,en:`AI answer`}),children:[(0,m.jsx)(`p`,{className:E.lead,children:e.a}),e.trend&&(0,m.jsx)(I,{trend:e.trend}),e.causes&&e.causes.length>0&&(0,m.jsx)(`ul`,{className:E.causes,children:e.causes.map(e=>(0,m.jsxs)(`li`,{className:E.cause,children:[(0,m.jsx)(`span`,{className:E.causeLabel,children:e.label}),(0,m.jsx)(`span`,{className:E.track,"aria-hidden":`true`,children:(0,m.jsx)(`span`,{className:E.fill,style:{width:`${Math.max(4,Math.min(100,e.share))}%`}})}),(0,m.jsx)(`span`,{className:E.causeValue,children:e.value})]},e.label))}),e.table&&(0,m.jsx)(P,{table:e.table}),e.detail&&(0,m.jsxs)(`p`,{className:E.detail,children:[(0,m.jsx)(`span`,{className:E.detailLabel,children:t({ko:`ë¶ì`,en:`Analysis`})}),e.detail]}),i===0&&G[n]&&(0,m.jsx)(T,{compact:!0,graph:G[n],title:t({ko:`ì¨í¨ë¡ì§ íë¨ ê·¼ê±° · 참조í 기ë¡Â·ê°ì²´Â·ê¸°ì¤`,en:`Ontology basis â records, entities and rules followed`})}),e.sources.length>0&&(0,m.jsx)(L,{items:e.sources})]})]})]},i)}),o&&e.guard&&(0,m.jsxs)(`p`,{className:E.guard,children:[(0,m.jsx)(`span`,{className:E.guardMark,"aria-hidden":`true`}),e.guard]}),o&&e.action&&(0,m.jsxs)(`div`,{className:E.action,"data-pending":!s&&r||void 0,children:[(0,m.jsxs)(`div`,{className:E.actionHead,children:[(0,m.jsx)(`span`,{className:E.actionLabel,children:t({ko:`ì¡°ì¹ì`,en:`Proposed action`})}),(0,m.jsx)(`span`,{className:E.actionOwner,children:s?``:r?e.action.owner:t({ko:`ê²°ì ë기 · ë르기 ì ê¹ì§ ì¤íëì§ ììµëë¤`,en:`Awaiting decision · nothing runs until pressed`})})]}),(0,m.jsx)(`p`,{className:E.actionText,children:e.action.text}),(0,m.jsx)(i,{decision:s??null,onDecide:e=>Q(n,e),owner:e.action.owner.replace(/\s*(ì¹ì¸ ë기|íì¸ í ë°ì¡)$/,``).replace(/^Awaiting\s+/,``).replace(/^Send after\s+/,``)})]})]},n)})}),(0,m.jsxs)(`div`,{className:E.foot,hidden:p,children:[(0,m.jsx)(`span`,{className:E.footNote,children:t({ko:`ê°ì ë°ì´í° · ì½ê¸° ì ì© ì°ê²° · ì¹ì¸ì ì¬ëì´ í©ëë¤`,en:`Sample data · read-only connections · a person approves`})}),!v&&(0,m.jsx)(`button`,{type:`button`,className:E.playBtn,onClick:()=>N(e=>!e),"aria-pressed":w,children:t(w?{ko:`ì¬ì`,en:`Play`}:Y?{ko:`ì½ë ëì ë©ì¶¤`,en:`Paused while reading`}:{ko:`ë©ì¶¤`,en:`Pause`})})]})]})}var z={layer:`_layer_loq5i_2`,backdrop:`_backdrop_loq5i_9`,coachFade:`_coachFade_loq5i_1`,mark:`_mark_loq5i_31`,ring:`_ring_loq5i_36`,coachRing:`_coachRing_loq5i_1`,badge:`_badge_loq5i_61`,label:`_label_loq5i_79`,card:`_card_loq5i_101`,coachIn:`_coachIn_loq5i_1`,cardTitle:`_cardTitle_loq5i_128`,cardList:`_cardList_loq5i_135`,cardNote:`_cardNote_loq5i_159`,start:`_start_loq5i_166`},B=`dfinite-demo-coach-map`,V=`dfinite-demo-coach-late`;function H(e){try{return window.sessionStorage.getItem(e)===`1`}catch{return!1}}function U(e){try{window.sessionStorage.setItem(e,`1`)}catch{}}function W(e,t){let n=e.getBoundingClientRect(),r=[];for(let i of t){let t=e.querySelector(`[data-coach="${i.key}"]`);if(!t)continue;let a=t.getBoundingClientRect();a.width===0||a.height===0||r.push({key:i.key,label:i.label,x:a.left-n.left,y:a.top-n.top,w:a.width,h:a.height})}return r}function G({rootRef:e,targets:n,phase:r}){let[i,a]=(0,f.useState)(()=>typeof window<`u`&&!H(B)),[o]=(0,f.useState)(()=>typeof window<`u`&&H(V)),[s,c]=(0,f.useState)([]),[l,u]=(0,f.useState)(0),d=n.filter(e=>!e.late),p=n.filter(e=>e.late),h=!i&&!o&&!H(V)&&r===`action`&&p.length>0,g=i?d:h?p:[];(0,f.useLayoutEffect)(()=>{let t=e.current;if(!t||g.length===0)return;let n=null,r=()=>{c(W(t,g)),u(t.getBoundingClientRect().height)};r();let i=new ResizeObserver(()=>{n&&cancelAnimationFrame(n),n=requestAnimationFrame(r)});i.observe(t),t.addEventListener(`scroll`,r,!0),window.addEventListener(`resize`,r);let a=window.setTimeout(r,300);return()=>{i.disconnect(),t.removeEventListener(`scroll`,r,!0),window.removeEventListener(`resize`,r),window.clearTimeout(a),n&&cancelAnimationFrame(n)}},[i,h,r]);let _=()=>{a(!1),U(B)};if((0,f.useLayoutEffect)(()=>{!i&&r===`decided`&&U(V)},[r,i]),g.length===0||s.length===0)return null;let v=i;return(0,m.jsxs)(`div`,{className:z.layer,"data-mode":v?`map`:`late`,children:[v&&(0,m.jsx)(`button`,{type:`button`,className:z.backdrop,onClick:_,"aria-label":t({ko:`ìë´ ë«ê¸°`,en:`Close the guide`})}),s.map((e,t)=>{let n=e.y+e.h+72<l;return(0,m.jsxs)(`div`,{className:z.mark,style:{left:e.x,top:e.y,width:e.w,height:e.h},children:[(0,m.jsx)(`span`,{className:z.ring,"aria-hidden":!0}
1),(0,m.jsx)(`span`,{className:z.badge,"aria-hidden":!0,children:v?t+1:`!`}),(0,m.jsx)(`span`,{className:z.label,"data-below":n||void 0,children:e.label})]},e.key)}),v?(0,m.jsxs)(`div`,{className:z.card,role:`dialog`,"aria-label":t({ko:`ë°ëª¨ ì¬ì©ë²`,en:`How to use the demo`}),children:[(0,m.jsx)(`p`,{className:z.cardTitle,children:t({ko:`주ì ì¡°ì ìì¹`,en:`These are the places you can press`})}),(0,m.jsx)(`ol`,{className:z.cardList,children:s.map((e,t)=>(0,m.jsxs)(`li`,{children:[(0,m.jsx)(`b`,{children:t+1}),` `,e.label]},e.key))}),(0,m.jsx)(`p`,{className:z.cardNote,children:t({ko:`ì¡°ì¹ìì´ ëì¤ë©´ ì¹ì¸ · ë³´ë¥ ë²í¼ì ìë´í©ëë¤. ê°ì ë°ì´í°ë¥¼ ì¬ì©íë©° ì¤ì ì¡°ì¹ë ì¤íëì§ ììµëë¤.`,en:`When an action is proposed, approve and hold appear; we will point them out then. Fictional data, nothing runs.`})}),(0,m.jsx)(`button`,{type:`button`,className:z.start,onClick:_,children:t({ko:`ììí기`,en:`Start`})})]}):null]})}var K={root:`_root_mi618_1`,ledger:`_ledger_mi618_5`,empty:`_empty_mi618_9`,captionWrap:`_captionWrap_mi618_21`,hint:`_hint_mi618_28`,next:`_next_mi618_35`,nextDot:`_nextDot_mi618_53`,nextPulse:`_nextPulse_mi618_1`,nextText:`_nextText_mi618_89`,nextAction:`_nextAction_mi618_97`,nextBtn:`_nextBtn_mi618_103`},q=e=>e.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function J({industry:e,minHeight:n=560,className:r}){let i=a[e],[o,s]=(0,f.useState)(`chat`),[p,h]=(0,f.useState)([]),[g,_]=(0,f.useState)({si:0,total:i.scenarios.length,progress:0,paused:!1,reading:!1,reduceMotion:!1,phase:`typing`,hasAction:!1,decision:null}),v=(0,f.useRef)(null),y=(0,f.useRef)(null),b=i.scenarios[g.si],x=[{id:`chat`,label:t({ko:`ëí`,en:`Conversation`}),count:i.scenarios.length},{id:`onto`,label:t({ko:`ì¨í¨ë¡ì§`,en:`Ontology`})},{id:`ledger`,label:t({ko:`근거 ìì¥`,en:`Evidence ledger`}),count:p.length||void 0}],S=p.map((e,n)=>({id:`${n}`,tone:e.decision===`approved`?`ok`:`warn`,cells:{at:q(e.at),scenario:e.scenario,decision:e.decision===`approved`?t({ko:`ì¹ì¸`,en:`Approved`}):t({ko:`ë³´ë¥`,en:`Held`}),who:t({ko:`ì¬ì©ì (íì¬ íë©´)`,en:`A person (this screen)`}),basis:t({ko:`ëµì í · ì°¸ê³ ë¬¸ì · íë¨ ê²½ë¡`,en:`Answer table · sources · path`})}})),C=[{key:`guide`,label:t({ko:`ì§ë¬¸ 3ê° Â· ë²í¸ë¥¼ ë르면 í´ë¹ ì§ë¬¸ì¼ë¡ ì´ë`,en:`Three questions. Press a number to jump`})},{key:`pause`,label:t({ko:`ë©ì¶¤ · ì¬ì`,en:`Pause and play`})},{key:`rail`,label:t({ko:`ëí · ì¨í¨ë¡ì§ · 근거 ìì¥ íë©´ ì í`,en:`Switch: conversation, ontology, ledger`})},{key:`stage`,label:t({ko:`ëí · ë§ì°ì¤ë¥¼ ì¬ë¦¬ë©´ ì¬ìì ì ì ë©ì¶¥ëë¤`,en:`Conversation. Hover to pause while reading`})},{key:`decide`,late:!0,label:t({ko:`ì¡°ì¹ìì íì¸íê³ ì¹ì¸ ëë ë³´ë¥ë¥¼ ì ííì¸ì`,en:`A person decides here. Press approve or hold`})}];return(0,m.jsxs)(`div`,{className:`${K.root} ${r??``}`,ref:y,children:[(0,m.jsx)(G,{rootRef:y,targets:C,phase:o===`chat`?g.phase:`other`}),(0,m.jsxs)(`div`,{className:d.guide,hidden:o!==`chat`,children:[(0,m.jsx)(`nav`,{className:d.guideRail,"data-coach":`guide`,style:{"--steps":i.scenarios.length},"aria-label":t({ko:`ìì ì§ë¬¸`,en:`Example questions`}),children:i.scenarios.map((e,t)=>{let n=t===g.si,r=t<g.si;return(0,m.jsxs)(`button`,{type:`button`,className:d.guideStep,"aria-current":n?`step`:void 0,"data-done":r||void 0,onClick:()=>v.current?.go(t),children:[(0,m.jsx)(`span`,{className:d.guideIndex,"aria-hidden":!0,children:t+1}),(0,m.jsx)(`span`,{className:d.guideLabel,children:e.title}),(0,m.jsx)(`span`,{className:d.guideTrack,"aria-hidden":!0,children:n?(0,m.jsx)(`span`,{className:d.guideFill,style:{transform:`scaleX(${g.progress})`,transition:`transform 240ms linear`}}):null})]},e.title)})}),(0,m.jsxs)(`div`,{className:d.guideMeta,children:[(0,m.jsxs)(`div`,{className:K.captionWrap,children:[(0,m.jsx)(`p`,{className:d.guideCaption,"aria-live":`polite`,children:b?.turns[0]?.q??``}),(0,m.jsx)(`p`,{className:K.hint,children:t({ko:`ë²í¸ë¥¼ ë르면 í´ë¹ ì§ë¬¸ì¼ë¡ ì´ëí©ëë¤. ì¼ìª½ ë©ë´ìì ì¨í¨ë¡ì§ì 근거 ìì¥ì íì¸í ì ììµëë¤.`,en:`Press a number above to jump to that question · the left rail opens the ontology and the ledger`})})]}),!g.reduceMotion&&(0,m.jsx)(`button`,{type:`button`,className:d.pauseButton,"data-coach":`pause`,onClick:()=>v.current?.togglePause(),"aria-pressed":g.paused,children:g.paused?t({ko:`ì¬ì`,en:`Play`}):g.reading?t({ko:`ì½ë ëì ë©ì¶¤`,en:`Paused while reading`}):t({ko:`ë©ì¶¤`,en:`Pause`})})]})]}
1),(0,m.jsxs)(u,{app:i.product,meta:i.scope,rail:x,railActive:o,onRailSelect:e=>s(e),minHeight:n,children:[o===`ledger`?(0,m.jsxs)(`div`,{className:K.ledger,children:[(0,m.jsx)(c,{eyebrow:t({ko:`근거 ìì¥`,en:`Evidence ledger`}),title:t({ko:`ì´ íë©´ìì ë´ë¦° ê²°ì `,en:`Decisions made on this screen`}),sub:t({ko:`ëíìì ì íí ì¹ì¸ · ë³´ë¥ ë´ìì´ ì¬ê¸°ì 기ë¡ë©ëë¤. ì¤ì ì íììë ëµë³ 근거, ê²°ì ì, ìê°, íì 결과를 ê°ì ìì¥ì 기ë¡í´ ê°ì¬ ì íì¸í©ëë¤.`,en:`Every approve or hold you press in the conversation is kept here. In the product, the evidence, the decider, the time and what followed accumulate in the same ledger and can be traced in an audit.`})}),S.length>0?(0,m.jsx)(l,{cols:[{key:`at`,label:t({ko:`ìê°`,en:`Time`}),num:!0,width:`96px`},{key:`scenario`,label:t({ko:`ì§ë¬¸`,en:`Question`})},{key:`decision`,label:t({ko:`ê²°ì `,en:`Decision`}),width:`72px`},{key:`who`,label:t({ko:`ê²°ì ì`,en:`Decided by`})},{key:`basis`,label:t({ko:`근거`,en:`Basis`})}],rows:S,dense:!0}):(0,m.jsx)(`p`,{className:K.empty,children:t({ko:`기ë¡ë ê²°ì ì´ ììµëë¤. ëí íë©´ìì ì¡°ì¹ìì ì¹ì¸íê±°ë ë³´ë¥íë©´ ë´ìì´ íìë©ëë¤. ì í ì ìë ì´ë¤ ì¡°ì¹ë ì¤íëì§ ììµëë¤.`,en:`No decisions yet. Press approve or hold on the action in the conversation to create the first line. Nothing runs before you press.`})})]}):(0,m.jsx)(R,{industry:e,standalone:!0,embedded:!0,view:o,onDecision:e=>h(t=>[...t,e]),hideChips:!0,hideFoot:!0,onState:_,handleRef:v},e),o===`chat`&&(0,m.jsx)(Y,{st:g,onDecide:e=>v.current?.decide(e),onLedger:()=>s(`ledger`),onOnto:()=>s(`onto`)})]})]})}function Y({st:e,onDecide:n,onLedger:r,onOnto:a}){let o=(e.owner??``).replace(/\s*(ì¹ì¸ ë기|íì¸ í ë°ì¡)$/,``).replace(/^Awaiting\s+/,``).replace(/^Send after\s+/,``),s,c=null;return e.phase===`action`?(s=t({ko:`ì¡°ì¹ìì íì¸í´ 주ì¸ì. ì¤í ì¬ë¶ë ì¬ëì´ ê²°ì í©ëë¤. ì¹ì¸ ëë ë³´ë¥ë¥¼ ì ííì¸ì.`,en:`An action is proposed. A person decides â press approve or hold.`}),c=(0,m.jsx)(`span`,{"data-coach":`decide`,children:(0,m.jsx)(i,{decision:null,onDecide:n,owner:o})})):e.phase===`decided`?(s=e.decision===`approved`?t({ko:`ì¹ì¸ëìµëë¤. ${o||`ë´ë¹ ë¶ì`}ì ì ë¬ëê³ ê·¼ê±° ìì¥ì ë¨ììµëë¤.`,en:`Approved. Sent to ${o||`the owner`} and written to the ledger.`}):t({ko:`ë³´ë¥íìµëë¤. ì¬ì ê° ê·¼ê±° ìì¥ì ë¨ììµëë¤. ì¤íëë ê²ì ììµëë¤.`,en:`Held. The reason is in the ledger. Nothing runs.`}),c=(0,m.jsx)(`button`,{type:`button`,className:K.nextBtn,onClick:r,children:t({ko:`근거 ìì¥ìì íì¸ â`,en:`See it in the ledger â`})})):e.phase===`typing`||e.phase===`answering`?(s=e.paused?t({ko:`ì¼ì ì ì§ ìíì
ëë¤. ìì ì¬ì ë²í¼ì ë르면 ì´ì´ì§ëë¤.`,en:`Paused. Press Play above to continue.`}):t({ko:`ì§ë¬¸ê³¼ ëµì´ ìëì¼ë¡ ì´ì´ì§ëë¤. ì½ë ëì ë§ì°ì¤ë¥¼ ì¬ë¦¬ë©´ ë©ì¶¥ëë¤.`,en:`Questions and answers run on their own. Hover to pause while you read.`}),c=(0,m.jsx)(`button`,{type:`button`,className:K.nextBtn,onClick:a,children:t({ko:`ëµë³ì ì¬ì©í ì¨í¨ë¡ì§ 보기 â`,en:`See the ontology behind this answer â`})})):(s=e.hasAction?t({ko:`ëµë³ì íì¸í ë¤ ìë ì¡°ì¹ìì ì¹ì¸íê±°ë ë³´ë¥íì¸ì.`,en:`When you have read the answer, decide on the action below.`}):t({ko:`ì´ ì§ë¬¸ìë ì¡°í ê²°ê³¼ë§ ì ê³µí©ëë¤. ë¤ì ì§ë¬¸ì¼ë¡ ì´ëí©ëë¤.`,en:`This question ends with a lookup. Moving to the next one.`}),c=(0,m.jsx)(`button`,{type:`button`,className:K.nextBtn,onClick:a,children:t({ko:`ì¨í¨ë¡ì§ 보기 â`,en:`See the ontology â`})})),(0,m.jsxs)(`div`,{className:K.next,"data-phase":e.phase,role:`status`,"aria-live":`polite`,children:[(0,m.jsx)(`span`,{className:K.nextDot,"aria-hidden":!0}),(0,m.jsx)(`p`,{className:K.nextText,children:s}),(0,m.jsx)(`div`,{className:K.nextAction,children:c})]})}export{J as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.