PageSourceSearch

https://dfinite.ai/assets/DemoWindow-Dvq7GFjq.js

js dfinite.ai collected 2026-10-05 11:57:50 UTC 27,717 bytes, 1 lines download raw bytes

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.