@ihabdevteam/core 0.414.0 → 0.415.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.
@@ -1,4 +1,4 @@
1
- "use strict";var n=require("react/jsx-runtime"),o=require("react"),Zt=require("i18next"),we=require("react-i18next"),hn=require("react-dom"),Mn=typeof document<"u"?document.currentScript:null;function Sd(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var Is=Sd(o);function Ne(...e){return e.filter(Boolean).join(" ")}const Os=new Set,Wn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function Dt(e,...t){!Wn||Os.has(e)||(Os.add(e),console.warn(...t))}/**
1
+ "use strict";var n=require("react/jsx-runtime"),o=require("react"),Zt=require("i18next"),ke=require("react-i18next"),hn=require("react-dom"),Mn=typeof document<"u"?document.currentScript:null;function Sd(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var Is=Sd(o);function De(...e){return e.filter(Boolean).join(" ")}const Os=new Set,Wn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function Dt(e,...t){!Wn||Os.has(e)||(Os.add(e),console.warn(...t))}/**
2
2
  * @license lucide-react v1.38.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -28,7 +28,7 @@
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Md=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ld=o.createContext({}),$d=()=>o.useContext(Ld),Rd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...c},u)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:b=""}=$d()??{},v=r??d?Number(a??h)*24/Number(t??p):a??h;return o.createElement("svg",{ref:u,...qr,width:t??p??qr.width,height:t??p??qr.height,stroke:e??m,strokeWidth:v,className:zs("lucide",b,s),...!l&&!Md(c)&&{"aria-hidden":"true"},...c},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
31
+ */const Md=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ld=o.createContext({}),$d=()=>o.useContext(Ld),Rd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:b=""}=$d()??{},y=r??d?Number(a??h)*24/Number(t??p):a??h;return o.createElement("svg",{ref:c,...qr,width:t??p??qr.width,height:t??p??qr.height,stroke:e??m,strokeWidth:y,className:zs("lucide",b,s),...!l&&!Md(u)&&{"aria-hidden":"true"},...u},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
32
32
  * @license lucide-react v1.38.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
@@ -793,9 +793,9 @@
793
793
  *
794
794
  * This source code is licensed under the ISC license.
795
795
  * See the LICENSE file in the root directory of this source tree.
796
- */const Q0=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],e1=oe("thumbs-up",Q0),Gr={"alert-triangle":Hs,"align-start-vertical":Id,anchor:C0,armchair:b0,"arrow-down":zd,"arrow-left":Hd,"arrow-right":qd,"arrow-right-left":Gd,"audio-lines":Yd,ban:Xd,bell:Qd,"book-marked":tp,"book-open":ap,"bow-arrow":op,braces:lp,bug:up,calendar:tl,"calendar-check":dp,"calendar-days":hp,camera:Cp,car:v0,"chart-column":bp,"chart-line":yp,"chart-pie":_p,check:Vs,"chevron-down":nl,"chevron-left":qs,"chevron-right":Us,"chevron-up":al,circle:U0,"clipboard-list":Ap,coffee:x0,combine:Ep,copy:Sp,"chevrons-left-right-ellipsis":Tp,"credit-card":Lp,database:Gs,diff:Pp,download:Ks,ear:Op,edit:Wp,"edit-2":Vp,"edit-3":Up,ellipsis:Ys,eraser:Yp,"external-link":Xp,eye:Qp,"file-text":th,"flip-horizontal":ah,"folder-open":oh,"folder-plus":lh,gamepad:uh,"gamepad-2":B0,clock:A0,lock:Jh,"search-x":nC,"share-2":iC,tag:TC,target:E0,percent:S0,gavel:dh,"git-merge":Zs,globe:mh,"grip-vertical":fh,headphones:gh,heart:vh,home:xh,inbox:T0,info:Bh,"key-round":Ah,landmark:Eh,layers:Sh,"layout-dashboard":Th,leaf:Lh,lightbulb:Rh,link:Fh,"link-2":Oh,"link-2-off":Wh,list:Vh,"list-checks":Uh,"list-ordered":Kh,loader:Zh,"log-out":em,mail:nm,"map-pin":rm,menu:Z0,"message-circle":sm,"message-circle-question-mark":im,"message-square":cm,"message-square-more":L0,"message-square-text":pm,minus:R0,"minus-circle":mm,moon:J0,"more-horizontal":Ys,package:fm,"party-popper":gm,pause:vm,pencil:xm,phone:Bm,play:Am,"play-circle":Em,plus:Sm,printer:Tm,"refresh-cw":Lm,repeat:Rm,replace:Fm,rocket:Om,"rotate-ccw":Wm,"rotate-cw":Vm,salad:Um,"scan-search":Km,search:Jm,"circle-alert":Xs,"alert-circle":Xs,"check-circle":Js,scissors:eC,send:rC,settings:sC,"shield-check":cC,"shopping-cart":pC,shuffle:mC,"skip-back":fC,"skip-forward":gC,sparkles:F0,square:vC,star:xC,store:BC,"sun-medium":AC,table:EC,"table-2":SC,terminal:LC,"text-cursor-input":RC,"text-initial":FC,"thumbs-up":e1,ticket:OC,trash:VC,triangle:K0,"trash-2":WC,"trending-up":UC,"triangle-alert":Hs,trophy:KC,type:O0,unlink:ZC,upload:JC,user:Ur,"user-plus":t0,"user-round":a0,"user-round-check":o0,users:l0,"users-round":u0,volume:W0,"volume-2":Qs,wrench:p0,x:el};Object.freeze(Object.keys(Gr));function t1(e){return Gr[e]??null}const rl=new Set;function n1(e){return Wn&&!(e in Gr)&&!rl.has(e)&&(rl.add(e),console.warn(`[ihabdevteam-core] lucide \uC544\uC774\uCF58 '${e}' \uC774 \uC815\uC801 \uBAA9\uB85D\uC5D0 \uC5C6\uC5B4 \uB80C\uB354\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. utils/lucideIconSet.ts \uC758 STATIC_LUCIDE_ICONS \uC5D0 \uCD94\uAC00\uD558\uC138\uC694.`)),Promise.resolve(null)}const a1=e=>e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Za-z])([0-9])/g,"$1-$2").replace(/[_ ]+/g,"-").toLowerCase();function r1(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(t))return null;const a=(e.split("/").pop()||"").replace(/\.svg$/,"");return a?a1(a):null}const ol=new Map;function o1(e){const t=typeof e=="string"?r1(e):null,a=t?t1(t)??ol.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return n1(t).then(i=>{ol.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function s1(e){if(Array.isArray(e))return e}function l1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,c=[],u=!0,p=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(u=(r=l.call(a)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(h){p=!0,s=h}finally{try{if(!u&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(p)throw s}}return c}}function i1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
797
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u1(e,t){return s1(e)||l1(e,t)||c1(e,t)||i1()}function c1(e,t){if(e){if(typeof e=="string")return sl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?sl(e,t):void 0}}const ll=Object.entries,il=Object.setPrototypeOf,d1=Object.isFrozen,p1=Object.getPrototypeOf,h1=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,Kt=Object.seal,da=Object.create,ul=typeof Reflect<"u"&&Reflect,Kr=ul.apply,Yr=ul.construct;Ut||(Ut=function(t){return t}),Kt||(Kt=function(t){return t}),Kr||(Kr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Yr||(Yr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Xn=qt(Array.prototype.forEach),m1=qt(Array.prototype.lastIndexOf),cl=qt(Array.prototype.pop),Da=qt(Array.prototype.push),C1=qt(Array.prototype.splice),pa=Array.isArray,Sa=qt(String.prototype.toLowerCase),Zr=qt(String.prototype.toString),dl=qt(String.prototype.match),ja=qt(String.prototype.replace),pl=qt(String.prototype.indexOf),f1=qt(String.prototype.trim),b1=qt(Number.prototype.toString),g1=qt(Boolean.prototype.toString),hl=typeof BigInt>"u"?null:qt(BigInt.prototype.toString),ml=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),rn=qt(Object.prototype.hasOwnProperty),Ta=qt(Object.prototype.toString),Qt=qt(RegExp.prototype.test),Jn=y1(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return Kr(e,t,r)}}function y1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Yr(e,a)}}function yt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sa;if(il&&il(e,null),!pa(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(d1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function v1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=da(null);for(const r of ll(e)){var a=u1(r,2);const s=a[0],l=a[1];rn(e,s)&&(pa(l)?t[s]=v1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function _1(e){switch(typeof e){case"string":return e;case"number":return b1(e);case"boolean":return g1(e);case"bigint":return hl?hl(e):"0";case"symbol":return ml?ml(e):"Symbol()";case"undefined":return Ta(e);case"function":case"object":{if(e===null)return Ta(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Ta(r)}return Ta(e)}default:return Ta(e)}}function wn(e,t){for(;e!==null;){const r=h1(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=p1(e)}function a(){return null}return a}function x1(e){try{return Qt(e,""),!0}catch{return!1}}const Cl=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Xr=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Jr=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),w1=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qr=Ut(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B1=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fl=Ut(["#text"]),bl=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eo=Ut(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gl=Ut(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lr=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k1=Kt(/{{[\w\W]*|^[\w\W]*}}/g),A1=Kt(/<%[\w\W]*|^[\w\W]*%>/g),N1=Kt(/\${[\w\W]*/g),E1=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),D1=Kt(/^aria-[\-\w]+$/),yl=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S1=Kt(/^(?:\w+script|data):/i),j1=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T1=Kt(/^html$/i),M1=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i),vl=Kt(/<[/\w!]/g),_l=Kt(/<[/\w]/g),L1=Kt(/<\/no(script|embed|frames)/i),$1=Kt(/\/>/i),Cn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],R1=Ut(yt({},xl)),P1=(function(){const e={};return Xn(xl,t=>{e[t]=Kt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ut(e)})(),F1=function(){return typeof window>"u"?null:window},I1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},wl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Hn=function(t,a,r,s){return rn(t,a)&&pa(t[a])?yt(s.base?mn(s.base):{},t[a],s.transform):r},to=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function Bl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F1();const t=be=>Bl(be);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Cn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,c=e.Element,u=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=c.prototype,b=wn(m,"cloneNode"),v=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),_=wn(m,"parentNode"),g=wn(m,"shadowRoot"),w=wn(m,"attributes"),y=i&&i.prototype?wn(i.prototype,"nodeType"):null,A=i&&i.prototype?wn(i.prototype,"nodeName"):null,x=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,E=function(j){return y?y(j):j.nodeType},k=function(j){return A?A(j):j.nodeName};if(typeof l=="function"){const be=a.createElement("template");be.content&&be.content.ownerDocument&&(a=be.content.ownerDocument)}let D,N="",B,$=!1,M=0;const Y=function(){if(M>0)throw Jn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(j){Y(),M++;try{return D.createHTML(j)}finally{M--}},R=function(j){Y(),M++;try{return D.createScriptURL(j)}finally{M--}},S=function(){return $||(B=I1(d,s),$=!0),B},X=a,ee=X.implementation,W=X.createNodeIterator,G=X.createDocumentFragment,L=X.getElementsByTagName,q=r.importNode;let K=wl();t.isSupported=typeof ll=="function"&&typeof _=="function"&&ee&&ee.createHTMLDocument!==void 0;const z=k1,F=A1,I=N1,P=E1,Z=D1,ue=S1,U=j1,pe=M1;let ae=yl,V=null;const se=yt({},[...Cl,...Xr,...Jr,...Qr,...fl]);let O=null;const H=yt({},[...bl,...eo,...gl,...lr]);let re=Object.seal(da(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,te=null;const ie=Object.seal(da(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,Le=!0,Re=!1,he=!0,ge=!1,Ee=!0,ve=!1,Fe=!1,ze=null,Ct=null,ut=!1,nt=!1,ct=!1,Ae=!1,Ue=!0,ke=!1;const Ye="user-content-";let et=!0,ft=!1,vt={},it=null;const jt=yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let at=null;const rt=yt({},["audio","video","img","source","image","track"]);let At=null;const Nt=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let st=xt,bt=!1,dt=null;const kt=yt({},[Ot,Wt,xt],Zr),ht=Ut(["mi","mo","mn","ms","mtext"]);let wt=yt({},ht);const ce=Ut(["annotation-xml"]);let Me=yt({},ce);const De=yt({},["title","style","font","a","script"]);let Je=null;const pt=["application/xhtml+xml","text/html"],Rt="text/html";let Te=null,tt=null;const Ft=a.createElement("form"),_t=function(j){return j instanceof RegExp||j instanceof Function},ne=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(tt&&tt===j)return;(!j||typeof j!="object")&&(j={}),j=mn(j),Je=pt.indexOf(j.PARSER_MEDIA_TYPE)===-1?Rt:j.PARSER_MEDIA_TYPE,Te=Je==="application/xhtml+xml"?Zr:Sa,V=Hn(j,"ALLOWED_TAGS",se,{transform:Te}),O=Hn(j,"ALLOWED_ATTR",H,{transform:Te}),dt=Hn(j,"ALLOWED_NAMESPACES",kt,{transform:Zr}),At=Hn(j,"ADD_URI_SAFE_ATTR",Nt,{transform:Te,base:Nt}),at=Hn(j,"ADD_DATA_URI_TAGS",rt,{transform:Te,base:rt}),it=Hn(j,"FORBID_CONTENTS",jt,{transform:Te}),_e=Hn(j,"FORBID_TAGS",mn({}),{transform:Te}),te=Hn(j,"FORBID_ATTR",mn({}),{transform:Te}),vt=rn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?mn(j.USE_PROFILES):j.USE_PROFILES:!1,Be=j.ALLOW_ARIA_ATTR!==!1,Le=j.ALLOW_DATA_ATTR!==!1,Re=j.ALLOW_UNKNOWN_PROTOCOLS||!1,he=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ge=j.SAFE_FOR_TEMPLATES||!1,Ee=j.SAFE_FOR_XML!==!1,ve=j.WHOLE_DOCUMENT||!1,nt=j.RETURN_DOM||!1,ct=j.RETURN_DOM_FRAGMENT||!1,Ae=j.RETURN_TRUSTED_TYPE||!1,ut=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,ke=j.SANITIZE_NAMED_PROPS||!1,et=j.KEEP_CONTENT!==!1,ft=j.IN_PLACE||!1,ae=x1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:yl,st=typeof j.NAMESPACE=="string"?j.NAMESPACE:xt,wt=to(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},ht)),Me=to(j,"HTML_INTEGRATION_POINTS",()=>yt({},ce));const Q=to(j,"CUSTOM_ELEMENT_HANDLING",()=>da(null));if(re=da(null),rn(Q,"tagNameCheck")&&_t(Q.tagNameCheck)&&(re.tagNameCheck=Q.tagNameCheck),rn(Q,"attributeNameCheck")&&_t(Q.attributeNameCheck)&&(re.attributeNameCheck=Q.attributeNameCheck),rn(Q,"allowCustomizedBuiltInElements")&&typeof Q.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=Q.allowCustomizedBuiltInElements),Kt(re),ge&&(Le=!1),ct&&(nt=!0),vt&&(V=yt({},fl),O=da(null),vt.html===!0&&(yt(V,Cl),yt(O,bl)),vt.svg===!0&&(yt(V,Xr),yt(O,eo),yt(O,lr)),vt.svgFilters===!0&&(yt(V,Jr),yt(O,eo),yt(O,lr)),vt.mathMl===!0&&(yt(V,Qr),yt(O,gl),yt(O,lr))),ie.tagCheck=null,ie.attributeCheck=null,rn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?ie.tagCheck=j.ADD_TAGS:pa(j.ADD_TAGS)&&(V===se&&(V=mn(V)),yt(V,j.ADD_TAGS,Te))),rn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?ie.attributeCheck=j.ADD_ATTR:pa(j.ADD_ATTR)&&(O===H&&(O=mn(O)),yt(O,j.ADD_ATTR,Te))),rn(j,"ADD_FORBID_CONTENTS")&&pa(j.ADD_FORBID_CONTENTS)&&(it===jt&&(it=mn(it)),yt(it,j.ADD_FORBID_CONTENTS,Te)),et&&(V["#text"]=!0),ve&&yt(V,["html","head","body"]),V.table&&(yt(V,["tbody"]),delete _e.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=D;D=j.TRUSTED_TYPES_POLICY;try{N=T("")}catch($e){throw D=Ce,$e}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,N=""):(D===void 0&&(D=S()),D&&typeof N=="string"&&(N=T("")));Ut&&Ut(j),tt=j},ye=yt({},[...Xr,...Jr,...w1]),Ie=yt({},[...Qr,...B1]),Ve=function(j,Q,Ce){return Q.namespaceURI===xt?j==="svg":Q.namespaceURI===Ot?j==="svg"&&(Ce==="annotation-xml"||wt[Ce]):!!ye[j]},Bt=function(j,Q,Ce){return Q.namespaceURI===xt?j==="math":Q.namespaceURI===Wt?j==="math"&&Me[Ce]:!!Ie[j]},Qe=function(j,Q,Ce){return Q.namespaceURI===Wt&&!Me[Ce]||Q.namespaceURI===Ot&&!wt[Ce]?!1:!Ie[j]&&(De[j]||!ye[j])},zt=function(j){let Q=_(j);(!Q||!Q.tagName)&&(Q={namespaceURI:st,tagName:"template"});const Ce=Sa(j.tagName),$e=Sa(Q.tagName);return dt[j.namespaceURI]?j.namespaceURI===Wt?Ve(Ce,Q,$e):j.namespaceURI===Ot?Bt(Ce,Q,$e):j.namespaceURI===xt?Qe(Ce,Q,$e):!!(Je==="application/xhtml+xml"&&dt[j.namespaceURI]):!1},Ht=function(j){Da(t.removed,{element:j});try{_(j).removeChild(j)}catch{if(v(j),!_(j))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},cn=function(j,Q,Ce){try{j.removeAttributeNode(Q)}catch{try{j.removeAttribute(Ce)}catch{}}},Yt=function(j){en(j);const Q=f(j);if(Q){const $e=[];Xn(Q,We=>{Da($e,We)}),Xn($e,We=>{try{v(We)}catch{}})}const Ce=w(j);if(Ce)for(let $e=Ce.length-1;$e>=0;--$e){const We=Ce[$e],Ke=We&&We.name;typeof Ke=="string"&&cn(j,We,Ke)}},Tt=function(j,Q,Ce){if(!Ce)try{Ce=Q.getAttributeNode(j)}catch{Ce=null}Da(t.removed,{attribute:Ce||null,from:Q});try{Ce?Q.removeAttributeNode(Ce):Q.removeAttribute(j)}catch{try{Q.removeAttribute(j)}catch{}}if(j==="is")if(nt||ct)try{Ht(Q)}catch{}else try{Q.setAttribute(j,"")}catch{}},Jt=function(j){const Q=w(j);if(Q)for(let Ce=Q.length-1;Ce>=0;--Ce){const $e=Q[Ce],We=$e&&$e.name;typeof We!="string"||O[Te(We)]||cn(j,$e,We)}},en=function(j){const Q=[j];for(;Q.length>0;){const Ce=Q.pop();E(Ce)===Cn.element&&Jt(Ce);const We=f(Ce);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)Q.push(We[Ke])}},An=function(j,Q){return Ee?j==="patchsrc"?!0:j==="for"&&Q!=="label"&&Q!=="output":!1},Nn=function(j){if(!Ee)return;const Q=[j];for(;Q.length>0;){const Ce=Q.pop(),$e=E(Ce);if($e===Cn.processingInstruction||$e===Cn.comment&&Qt(_l,Ce.data)){try{v(Ce)}catch{}continue}if($e===Cn.element){const Ke=Ce,xe=Te(k(Ce));try{Ke.hasAttribute&&Ke.hasAttribute("patchsrc")&&Ke.removeAttribute("patchsrc"),Ke.hasAttribute&&Ke.hasAttribute("for")&&An("for",xe)&&Ke.removeAttribute("for")}catch{}}const We=f(Ce);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)Q.push(We[Ke])}},gn=function(j){let Q=null,Ce=null;if(ut)j="<remove></remove>"+j;else{const Ke=dl(j,/^[\r\n\t ]+/);Ce=Ke&&Ke[0]}Je==="application/xhtml+xml"&&st===xt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const $e=D?T(j):j;if(st===xt)try{Q=new h().parseFromString($e,Je)}catch{}if(!Q||!Q.documentElement){Q=ee.createDocument(st,"template",null);try{Q.documentElement.innerHTML=bt?N:$e}catch{}}const We=Q.body||Q.documentElement;return j&&Ce&&We.insertBefore(a.createTextNode(Ce),We.childNodes[0]||null),st===xt?L.call(Q,ve?"html":"body")[0]:ve?Q.documentElement:We},Pt=function(j){const Q=x?x(j):j.ownerDocument;return W.call(Q||j,j,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},St=function(j){return j=ja(j,z," "),j=ja(j,F," "),j=ja(j,I," "),j},Mt=function(j){var Q;j.normalize();const Ce=x?x(j):j.ownerDocument,$e=W.call(Ce||j,j,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let We=$e.nextNode();for(;We;)We.data=St(We.data),We=$e.nextNode();const Ke=(Q=j.querySelectorAll)===null||Q===void 0?void 0:Q.call(j,"template");Ke&&Xn(Ke,xe=>{dn(xe.content)&&Mt(xe.content)})},Gt=function(j){const Q=A?A(j):null;return typeof Q!="string"||Te(Q)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==w(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==y(j)||j.childNodes!==f(j)},dn=function(j){if(!y||typeof j!="object"||j===null)return!1;try{return y(j)===Cn.documentFragment}catch{return!1}},yn=function(j){if(!y||typeof j!="object"||j===null)return!1;try{return typeof y(j)=="number"}catch{return!1}};function Vt(be,j,Q){be.length!==0&&Xn(be,Ce=>{Ce.call(t,j,Q,tt)})}const En=function(j,Q){return!!(Ee&&j.hasChildNodes()&&!yn(j.firstElementChild)&&Qt(vl,j.textContent)&&Qt(vl,j.innerHTML)||Ee&&j.namespaceURI===xt&&R1[Q]&&(yn(j.firstElementChild)||typeof j.textContent=="string"&&Qt(P1[Q],j.textContent))||j.nodeType===Cn.processingInstruction||Ee&&j.nodeType===Cn.comment&&Qt(_l,j.data))},me=function(j,Q){if(j instanceof RegExp)return Qt(j,Q);if(j instanceof Function){for(var Ce=arguments.length,$e=new Array(Ce>2?Ce-2:0),We=2;We<Ce;We++)$e[We-2]=arguments[We];return!!j(Q,...$e)}return!1},je=function(j,Q,Ce){if(!_e[Q]&&Se(Q)&&me(re.tagNameCheck,Q))return!1;if(et&&!it[Q]){const $e=_(j),We=f(j);if(We&&$e){const Ke=We.length;for(let xe=Ke-1;xe>=0;--xe){const Pe=j===Ce?b(We[xe],!0):We[xe];$e.insertBefore(Pe,C(j))}}}return Ht(j),!0},Oe=function(j,Q,Ce,$e){return j.length===0?Q:Q===Ce||Q===$e?mn(Q):Q},Ze=function(j,Q){return j===Q||_(j)!==null?!1:(ft&&en(j),!0)},He=function(j,Q){if(Vt(K.beforeSanitizeElements,j,null),Ze(j,Q))return!0;if(Gt(j))return Ht(j),!0;const Ce=Te(k(j));if(V=Oe(K.uponSanitizeElement,V,se,ze),Vt(K.uponSanitizeElement,j,{tagName:Ce,allowedTags:V}),Ze(j,Q))return!0;if(En(j,Ce))return Ht(j),!0;if(_e[Ce]||!(ie.tagCheck instanceof Function&&ie.tagCheck(Ce))&&!V[Ce]){const We=je(j,Ce,Q);return We===!1&&Vt(K.afterSanitizeElements,j,null),We}if(E(j)===Cn.element&&!zt(j)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Qt(L1,j.innerHTML))return Ht(j),!0;if(ge&&j.nodeType===Cn.text){const We=St(j.textContent);j.textContent!==We&&(Da(t.removed,{element:j.cloneNode()}),j.textContent=We)}return Vt(K.afterSanitizeElements,j,null),!1},J=function(j,Q,Ce){if(te[Q]||An(Q,j)||Ue&&(Q==="id"||Q==="name")&&(Ce in a||Ce in Ft))return!1;const $e=O[Q]||ie.attributeCheck instanceof Function&&ie.attributeCheck(Q,j);return Le&&Qt(P,Q)||Be&&Qt(Z,Q)?!0:$e?At[Q]||Qt(ae,ja(Ce,U,""))||(Q==="src"||Q==="xlink:href"||Q==="href")&&j!=="script"&&pl(Ce,"data:")===0&&at[j]||Re&&!Qt(ue,ja(Ce,U,""))?!0:!Ce:Se(j)&&me(re.tagNameCheck,j)&&me(re.attributeNameCheck,Q,j)||Q==="is"&&re.allowCustomizedBuiltInElements&&me(re.tagNameCheck,Ce)},de=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Se=function(j){return!de[Sa(j)]&&Qt(pe,j)},qe=function(j,Q,Ce,$e){if(D&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ce)switch(d.getAttributeType(j,Q)){case"TrustedHTML":return T($e);case"TrustedScriptURL":return R($e)}return $e},Ge=function(j,Q,Ce,$e){try{Ce?j.setAttributeNS(Ce,Q,$e):j.setAttribute(Q,$e),Gt(j)?Ht(j):cl(t.removed)}catch{Tt(Q,j)}},Xe=function(j){Vt(K.beforeSanitizeAttributes,j,null);const Q=j.attributes;if(!Q||Gt(j))return;O=Oe(K.uponSanitizeAttribute,O,H,Ct);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0};let $e=Q.length;const We=Te(j.nodeName);for(;$e--;){const Ke=Q[$e],xe=Ke.name,Pe=Ke.namespaceURI,lt=Ke.value,Et=Te(xe),pn=lt;let tn=xe==="value"?pn:f1(pn);if(Ce.attrName=Et,Ce.attrValue=tn,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Vt(K.uponSanitizeAttribute,j,Ce),tn=Ce.attrValue,ke&&(Et==="id"||Et==="name")&&pl(tn,Ye)!==0&&(Tt(xe,j,Ke),tn=Ye+tn),Ee&&Qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,tn)){Tt(xe,j,Ke);continue}if(Et==="attributename"&&dl(tn,"href")){Tt(xe,j,Ke);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Tt(xe,j,Ke);continue}if(!he&&Qt($1,tn)){Tt(xe,j,Ke);continue}if(ge&&(tn=St(tn)),!J(We,Et,tn)){Tt(xe,j,Ke);continue}tn=qe(We,Et,Pe,tn),tn!==pn&&Ge(j,xe,Pe,tn)}}Vt(K.afterSanitizeAttributes,j,null)},gt=function(j){let Q=null;const Ce=Pt(j);for(Vt(K.beforeSanitizeShadowDOM,j,null);Q=Ce.nextNode();)if(Vt(K.uponSanitizeShadowNode,Q,null),He(Q,j),Xe(Q),dn(Q.content)&&gt(Q.content),E(Q)===Cn.element){const $e=g(Q);dn($e)&&(mt($e),gt($e))}Vt(K.afterSanitizeShadowDOM,j,null)},mt=function(j){const Q=[{node:j,shadow:null}];for(;Q.length>0;){const Ce=Q.pop();if(Ce.shadow){gt(Ce.shadow);continue}const $e=Ce.node,Ke=E($e)===Cn.element,xe=f($e);if(xe)for(let Pe=xe.length-1;Pe>=0;--Pe)Q.push({node:xe[Pe],shadow:null});if(Ke){const Pe=A?A($e):null;if(typeof Pe=="string"&&Te(Pe)==="template"){const lt=$e.content;dn(lt)&&Q.push({node:lt,shadow:null})}}if(Ke){const Pe=g($e);dn(Pe)&&Q.push({node:null,shadow:Pe},{node:Pe,shadow:null})}}};return t.sanitize=function(be){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,Ce=null,$e=null,We=null;if(bt=!be,bt&&(be="<!-->"),typeof be!="string"&&!yn(be)&&(be=_1(be),typeof be!="string"))throw Jn("dirty is not a string, aborting");if(!t.isSupported)return be;Fe?(V=ze,O=Ct):ne(j),(K.uponSanitizeElement.length>0||K.uponSanitizeAttribute.length>0)&&(V=mn(V)),K.uponSanitizeAttribute.length>0&&(O=mn(O)),t.removed=[];const Ke=ft&&typeof be!="string"&&yn(be);if(Ke){Nn(be);const lt=k(be);if(typeof lt=="string"){const Et=Te(lt);if(!V[Et]||_e[Et])throw Yt(be),Jn("root node is forbidden and cannot be sanitized in-place")}if(Gt(be))throw Yt(be),Jn("root node is clobbered and cannot be sanitized in-place");try{mt(be)}catch(Et){throw Yt(be),Et}}else if(yn(be))Q=gn("<!---->"),Ce=Q.ownerDocument.importNode(be,!0),Ce.nodeType===Cn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Q=Ce:Q.appendChild(Ce),mt(Ce);else{if(!nt&&!ge&&!ve&&be.indexOf("<")===-1)return D&&Ae?T(be):be;if(Q=gn(be),!Q)return nt?null:Ae?N:""}Q&&ut&&Ht(Q.firstChild);const xe=Ke?be:Q;try{const lt=Pt(xe);for(;$e=lt.nextNode();)He($e,xe),Xe($e),dn($e.content)&&gt($e.content)}catch(lt){throw Ke&&(Yt(be),Xn(t.removed,Et=>{Et.element&&en(Et.element)})),lt}if(Ke)return Xn(t.removed,lt=>{lt.element&&en(lt.element)}),ge&&Mt(be),be;if(nt){if(ge&&Mt(Q),ct)for(We=G.call(Q.ownerDocument);Q.firstChild;)We.appendChild(Q.firstChild);else We=Q;return(O.shadowroot||O.shadowrootmode)&&(We=q.call(r,We,!0)),We}let Pe=ve?Q.outerHTML:Q.innerHTML;return ve&&V["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Qt(T1,Q.ownerDocument.doctype.name)&&(Pe="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
798
- `+Pe),ge&&(Pe=St(Pe)),D&&Ae?T(Pe):Pe},t.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ne(be),Fe=!0,ze=V,Ct=O},t.clearConfig=function(){tt=null,Fe=!1,ze=null,Ct=null,D=B,N=""},t.isValidAttribute=function(be,j,Q){tt||ne({});const Ce=Te(be),$e=Te(j);return J(Ce,$e,Q)},t.addHook=function(be,j){typeof j=="function"&&rn(K,be)&&Da(K[be],j)},t.removeHook=function(be,j){if(rn(K,be)){if(j!==void 0){const Q=m1(K[be],j);return Q===-1?void 0:C1(K[be],Q,1)[0]}return cl(K[be])}},t.removeHooks=function(be){rn(K,be)&&(K[be]=[])},t.removeAllHooks=function(){K=wl()},t}var ha=Bl();let no=null;const O1=1500;function ao(){no?.clear(),no=null}function z1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;ao();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{ao();try{r.cancel();const p=new SpeechSynthesisUtterance(e),h=r.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=a,p.onend=t?l:null,p.onerror=t?l:null,r.speak(p)}catch{l()}};let c;try{c=r.getVoices()}catch{l();return}if(c.length>0){i();return}const u=setTimeout(i,O1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(u),l();return}no={clear:()=>{clearTimeout(u),r.removeEventListener("voiceschanged",i)}}}function ro(){ao(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const W1=/^(?:[a-z]+:)?\/\//i,H1="__ihab_core_asset_base_url__";function V1(){return globalThis[H1]??""}function oo(e){const t=String(e||"").trim();if(!t)return"";if(W1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=V1();return r?`${r}${a}`:a}const kl="__ihab_core_storage_resolvers__";function Ma(){return globalThis[kl]??null}function q1(e){globalThis[kl]=e}let Al=class extends Error{constructor(t){super(`
796
+ */const Q0=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],e1=oe("thumbs-up",Q0),Gr={"alert-triangle":Hs,"align-start-vertical":Id,anchor:C0,armchair:b0,"arrow-down":zd,"arrow-left":Hd,"arrow-right":qd,"arrow-right-left":Gd,"audio-lines":Yd,ban:Xd,bell:Qd,"book-marked":tp,"book-open":ap,"bow-arrow":op,braces:lp,bug:up,calendar:tl,"calendar-check":dp,"calendar-days":hp,camera:Cp,car:v0,"chart-column":bp,"chart-line":yp,"chart-pie":_p,check:Vs,"chevron-down":nl,"chevron-left":qs,"chevron-right":Us,"chevron-up":al,circle:U0,"clipboard-list":Ap,coffee:x0,combine:Ep,copy:Sp,"chevrons-left-right-ellipsis":Tp,"credit-card":Lp,database:Gs,diff:Pp,download:Ks,ear:Op,edit:Wp,"edit-2":Vp,"edit-3":Up,ellipsis:Ys,eraser:Yp,"external-link":Xp,eye:Qp,"file-text":th,"flip-horizontal":ah,"folder-open":oh,"folder-plus":lh,gamepad:uh,"gamepad-2":B0,clock:A0,lock:Jh,"search-x":nC,"share-2":iC,tag:TC,target:E0,percent:S0,gavel:dh,"git-merge":Zs,globe:mh,"grip-vertical":fh,headphones:gh,heart:vh,home:xh,inbox:T0,info:Bh,"key-round":Ah,landmark:Eh,layers:Sh,"layout-dashboard":Th,leaf:Lh,lightbulb:Rh,link:Fh,"link-2":Oh,"link-2-off":Wh,list:Vh,"list-checks":Uh,"list-ordered":Kh,loader:Zh,"log-out":em,mail:nm,"map-pin":rm,menu:Z0,"message-circle":sm,"message-circle-question-mark":im,"message-square":cm,"message-square-more":L0,"message-square-text":pm,minus:R0,"minus-circle":mm,moon:J0,"more-horizontal":Ys,package:fm,"party-popper":gm,pause:vm,pencil:xm,phone:Bm,play:Am,"play-circle":Em,plus:Sm,printer:Tm,"refresh-cw":Lm,repeat:Rm,replace:Fm,rocket:Om,"rotate-ccw":Wm,"rotate-cw":Vm,salad:Um,"scan-search":Km,search:Jm,"circle-alert":Xs,"alert-circle":Xs,"check-circle":Js,scissors:eC,send:rC,settings:sC,"shield-check":cC,"shopping-cart":pC,shuffle:mC,"skip-back":fC,"skip-forward":gC,sparkles:F0,square:vC,star:xC,store:BC,"sun-medium":AC,table:EC,"table-2":SC,terminal:LC,"text-cursor-input":RC,"text-initial":FC,"thumbs-up":e1,ticket:OC,trash:VC,triangle:K0,"trash-2":WC,"trending-up":UC,"triangle-alert":Hs,trophy:KC,type:O0,unlink:ZC,upload:JC,user:Ur,"user-plus":t0,"user-round":a0,"user-round-check":o0,users:l0,"users-round":u0,volume:W0,"volume-2":Qs,wrench:p0,x:el};Object.freeze(Object.keys(Gr));function t1(e){return Gr[e]??null}const rl=new Set;function n1(e){return Wn&&!(e in Gr)&&!rl.has(e)&&(rl.add(e),console.warn(`[ihabdevteam-core] lucide \uC544\uC774\uCF58 '${e}' \uC774 \uC815\uC801 \uBAA9\uB85D\uC5D0 \uC5C6\uC5B4 \uB80C\uB354\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. utils/lucideIconSet.ts \uC758 STATIC_LUCIDE_ICONS \uC5D0 \uCD94\uAC00\uD558\uC138\uC694.`)),Promise.resolve(null)}const a1=e=>e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Za-z])([0-9])/g,"$1-$2").replace(/[_ ]+/g,"-").toLowerCase();function r1(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(t))return null;const a=(e.split("/").pop()||"").replace(/\.svg$/,"");return a?a1(a):null}const ol=new Map;function o1(e){const t=typeof e=="string"?r1(e):null,a=t?t1(t)??ol.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return n1(t).then(i=>{ol.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function s1(e){if(Array.isArray(e))return e}function l1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,u=[],c=!0,p=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){p=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(p)throw s}}return u}}function i1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
797
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u1(e,t){return s1(e)||l1(e,t)||c1(e,t)||i1()}function c1(e,t){if(e){if(typeof e=="string")return sl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?sl(e,t):void 0}}const ll=Object.entries,il=Object.setPrototypeOf,d1=Object.isFrozen,p1=Object.getPrototypeOf,h1=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,Kt=Object.seal,pa=Object.create,ul=typeof Reflect<"u"&&Reflect,Kr=ul.apply,Yr=ul.construct;Ut||(Ut=function(t){return t}),Kt||(Kt=function(t){return t}),Kr||(Kr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Yr||(Yr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Xn=qt(Array.prototype.forEach),m1=qt(Array.prototype.lastIndexOf),cl=qt(Array.prototype.pop),Sa=qt(Array.prototype.push),C1=qt(Array.prototype.splice),ha=Array.isArray,ja=qt(String.prototype.toLowerCase),Zr=qt(String.prototype.toString),dl=qt(String.prototype.match),Ta=qt(String.prototype.replace),pl=qt(String.prototype.indexOf),f1=qt(String.prototype.trim),b1=qt(Number.prototype.toString),g1=qt(Boolean.prototype.toString),hl=typeof BigInt>"u"?null:qt(BigInt.prototype.toString),ml=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),rn=qt(Object.prototype.hasOwnProperty),Ma=qt(Object.prototype.toString),Qt=qt(RegExp.prototype.test),Jn=y1(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return Kr(e,t,r)}}function y1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Yr(e,a)}}function yt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ja;if(il&&il(e,null),!ha(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(d1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function v1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=pa(null);for(const r of ll(e)){var a=u1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ha(l)?t[s]=v1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function _1(e){switch(typeof e){case"string":return e;case"number":return b1(e);case"boolean":return g1(e);case"bigint":return hl?hl(e):"0";case"symbol":return ml?ml(e):"Symbol()";case"undefined":return Ma(e);case"function":case"object":{if(e===null)return Ma(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Ma(r)}return Ma(e)}default:return Ma(e)}}function wn(e,t){for(;e!==null;){const r=h1(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=p1(e)}function a(){return null}return a}function x1(e){try{return Qt(e,""),!0}catch{return!1}}const Cl=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Xr=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Jr=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),w1=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qr=Ut(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B1=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fl=Ut(["#text"]),bl=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eo=Ut(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gl=Ut(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lr=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k1=Kt(/{{[\w\W]*|^[\w\W]*}}/g),A1=Kt(/<%[\w\W]*|^[\w\W]*%>/g),N1=Kt(/\${[\w\W]*/g),E1=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),D1=Kt(/^aria-[\-\w]+$/),yl=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S1=Kt(/^(?:\w+script|data):/i),j1=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T1=Kt(/^html$/i),M1=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i),vl=Kt(/<[/\w!]/g),_l=Kt(/<[/\w]/g),L1=Kt(/<\/no(script|embed|frames)/i),$1=Kt(/\/>/i),Cn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],R1=Ut(yt({},xl)),P1=(function(){const e={};return Xn(xl,t=>{e[t]=Kt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ut(e)})(),F1=function(){return typeof window>"u"?null:window},I1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},wl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Hn=function(t,a,r,s){return rn(t,a)&&ha(t[a])?yt(s.base?mn(s.base):{},t[a],s.transform):r},to=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function Bl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F1();const t=ge=>Bl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Cn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,b=wn(m,"cloneNode"),y=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),x=wn(m,"parentNode"),g=wn(m,"shadowRoot"),w=wn(m,"attributes"),_=i&&i.prototype?wn(i.prototype,"nodeType"):null,E=i&&i.prototype?wn(i.prototype,"nodeName"):null,v=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,N=function(j){return _?_(j):j.nodeType},k=function(j){return E?E(j):j.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let D,A="",B,F=!1,L=0;const q=function(){if(L>0)throw Jn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(j){q(),L++;try{return D.createHTML(j)}finally{L--}},O=function(j){q(),L++;try{return D.createScriptURL(j)}finally{L--}},T=function(){return F||(B=I1(d,s),F=!0),B},G=a,K=G.implementation,ee=G.createNodeIterator,re=G.createDocumentFragment,R=G.getElementsByTagName,J=r.importNode;let ne=wl();t.isSupported=typeof ll=="function"&&typeof x=="function"&&K&&K.createHTMLDocument!==void 0;const S=k1,$=A1,I=N1,P=E1,V=D1,ie=S1,U=j1,ce=M1;let Z=yl,H=null;const te=yt({},[...Cl,...Xr,...Jr,...Qr,...fl]);let W=null;const z=yt({},[...bl,...eo,...gl,...lr]);let ae=Object.seal(pa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,me=null;const le=Object.seal(pa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,Pe=!0,Fe=!1,Ae=!0,se=!1,ye=!0,Ce=!1,xe=!1,$e=null,nt=null,ct=!1,at=!1,rt=!1,Ee=!1,Ue=!0,Ne=!1;const Ye="user-content-";let et=!0,ft=!1,vt={},dt=null;const jt=yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ot=null;const st=yt({},["audio","video","img","source","image","track"]);let At=null;const Nt=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let it=xt,bt=!1,pt=null;const kt=yt({},[Ot,Wt,xt],Zr),mt=Ut(["mi","mo","mn","ms","mtext"]);let wt=yt({},mt);const de=Ut(["annotation-xml"]);let Le=yt({},de);const Se=yt({},["title","style","font","a","script"]);let Je=null;const ht=["application/xhtml+xml","text/html"],Rt="text/html";let Me=null,tt=null;const Ft=a.createElement("form"),_t=function(j){return j instanceof RegExp||j instanceof Function},Q=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(tt&&tt===j)return;(!j||typeof j!="object")&&(j={}),j=mn(j),Je=ht.indexOf(j.PARSER_MEDIA_TYPE)===-1?Rt:j.PARSER_MEDIA_TYPE,Me=Je==="application/xhtml+xml"?Zr:ja,H=Hn(j,"ALLOWED_TAGS",te,{transform:Me}),W=Hn(j,"ALLOWED_ATTR",z,{transform:Me}),pt=Hn(j,"ALLOWED_NAMESPACES",kt,{transform:Zr}),At=Hn(j,"ADD_URI_SAFE_ATTR",Nt,{transform:Me,base:Nt}),ot=Hn(j,"ADD_DATA_URI_TAGS",st,{transform:Me,base:st}),dt=Hn(j,"FORBID_CONTENTS",jt,{transform:Me}),ve=Hn(j,"FORBID_TAGS",mn({}),{transform:Me}),me=Hn(j,"FORBID_ATTR",mn({}),{transform:Me}),vt=rn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?mn(j.USE_PROFILES):j.USE_PROFILES:!1,Be=j.ALLOW_ARIA_ATTR!==!1,Pe=j.ALLOW_DATA_ATTR!==!1,Fe=j.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=j.SAFE_FOR_TEMPLATES||!1,ye=j.SAFE_FOR_XML!==!1,Ce=j.WHOLE_DOCUMENT||!1,at=j.RETURN_DOM||!1,rt=j.RETURN_DOM_FRAGMENT||!1,Ee=j.RETURN_TRUSTED_TYPE||!1,ct=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,Ne=j.SANITIZE_NAMED_PROPS||!1,et=j.KEEP_CONTENT!==!1,ft=j.IN_PLACE||!1,Z=x1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:yl,it=typeof j.NAMESPACE=="string"?j.NAMESPACE:xt,wt=to(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},mt)),Le=to(j,"HTML_INTEGRATION_POINTS",()=>yt({},de));const X=to(j,"CUSTOM_ELEMENT_HANDLING",()=>pa(null));if(ae=pa(null),rn(X,"tagNameCheck")&&_t(X.tagNameCheck)&&(ae.tagNameCheck=X.tagNameCheck),rn(X,"attributeNameCheck")&&_t(X.attributeNameCheck)&&(ae.attributeNameCheck=X.attributeNameCheck),rn(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(ae.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),Kt(ae),se&&(Pe=!1),rt&&(at=!0),vt&&(H=yt({},fl),W=pa(null),vt.html===!0&&(yt(H,Cl),yt(W,bl)),vt.svg===!0&&(yt(H,Xr),yt(W,eo),yt(W,lr)),vt.svgFilters===!0&&(yt(H,Jr),yt(W,eo),yt(W,lr)),vt.mathMl===!0&&(yt(H,Qr),yt(W,gl),yt(W,lr))),le.tagCheck=null,le.attributeCheck=null,rn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?le.tagCheck=j.ADD_TAGS:ha(j.ADD_TAGS)&&(H===te&&(H=mn(H)),yt(H,j.ADD_TAGS,Me))),rn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?le.attributeCheck=j.ADD_ATTR:ha(j.ADD_ATTR)&&(W===z&&(W=mn(W)),yt(W,j.ADD_ATTR,Me))),rn(j,"ADD_FORBID_CONTENTS")&&ha(j.ADD_FORBID_CONTENTS)&&(dt===jt&&(dt=mn(dt)),yt(dt,j.ADD_FORBID_CONTENTS,Me)),et&&(H["#text"]=!0),Ce&&yt(H,["html","head","body"]),H.table&&(yt(H,["tbody"]),delete ve.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=D;D=j.TRUSTED_TYPES_POLICY;try{A=M("")}catch(Re){throw D=fe,Re}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,A=""):(D===void 0&&(D=T()),D&&typeof A=="string"&&(A=M("")));Ut&&Ut(j),tt=j},_e=yt({},[...Xr,...Jr,...w1]),Oe=yt({},[...Qr,...B1]),Ve=function(j,X,fe){return X.namespaceURI===xt?j==="svg":X.namespaceURI===Ot?j==="svg"&&(fe==="annotation-xml"||wt[fe]):!!_e[j]},Bt=function(j,X,fe){return X.namespaceURI===xt?j==="math":X.namespaceURI===Wt?j==="math"&&Le[fe]:!!Oe[j]},Qe=function(j,X,fe){return X.namespaceURI===Wt&&!Le[fe]||X.namespaceURI===Ot&&!wt[fe]?!1:!Oe[j]&&(Se[j]||!_e[j])},zt=function(j){let X=x(j);(!X||!X.tagName)&&(X={namespaceURI:it,tagName:"template"});const fe=ja(j.tagName),Re=ja(X.tagName);return pt[j.namespaceURI]?j.namespaceURI===Wt?Ve(fe,X,Re):j.namespaceURI===Ot?Bt(fe,X,Re):j.namespaceURI===xt?Qe(fe,X,Re):!!(Je==="application/xhtml+xml"&&pt[j.namespaceURI]):!1},Ht=function(j){Sa(t.removed,{element:j});try{x(j).removeChild(j)}catch{if(y(j),!x(j))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},cn=function(j,X,fe){try{j.removeAttributeNode(X)}catch{try{j.removeAttribute(fe)}catch{}}},Yt=function(j){en(j);const X=f(j);if(X){const Re=[];Xn(X,We=>{Sa(Re,We)}),Xn(Re,We=>{try{y(We)}catch{}})}const fe=w(j);if(fe)for(let Re=fe.length-1;Re>=0;--Re){const We=fe[Re],Ke=We&&We.name;typeof Ke=="string"&&cn(j,We,Ke)}},Tt=function(j,X,fe){if(!fe)try{fe=X.getAttributeNode(j)}catch{fe=null}Sa(t.removed,{attribute:fe||null,from:X});try{fe?X.removeAttributeNode(fe):X.removeAttribute(j)}catch{try{X.removeAttribute(j)}catch{}}if(j==="is")if(at||rt)try{Ht(X)}catch{}else try{X.setAttribute(j,"")}catch{}},Jt=function(j){const X=w(j);if(X)for(let fe=X.length-1;fe>=0;--fe){const Re=X[fe],We=Re&&Re.name;typeof We!="string"||W[Me(We)]||cn(j,Re,We)}},en=function(j){const X=[j];for(;X.length>0;){const fe=X.pop();N(fe)===Cn.element&&Jt(fe);const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},An=function(j,X){return ye?j==="patchsrc"?!0:j==="for"&&X!=="label"&&X!=="output":!1},Nn=function(j){if(!ye)return;const X=[j];for(;X.length>0;){const fe=X.pop(),Re=N(fe);if(Re===Cn.processingInstruction||Re===Cn.comment&&Qt(_l,fe.data)){try{y(fe)}catch{}continue}if(Re===Cn.element){const Ke=fe,we=Me(k(fe));try{Ke.hasAttribute&&Ke.hasAttribute("patchsrc")&&Ke.removeAttribute("patchsrc"),Ke.hasAttribute&&Ke.hasAttribute("for")&&An("for",we)&&Ke.removeAttribute("for")}catch{}}const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},gn=function(j){let X=null,fe=null;if(ct)j="<remove></remove>"+j;else{const Ke=dl(j,/^[\r\n\t ]+/);fe=Ke&&Ke[0]}Je==="application/xhtml+xml"&&it===xt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const Re=D?M(j):j;if(it===xt)try{X=new h().parseFromString(Re,Je)}catch{}if(!X||!X.documentElement){X=K.createDocument(it,"template",null);try{X.documentElement.innerHTML=bt?A:Re}catch{}}const We=X.body||X.documentElement;return j&&fe&&We.insertBefore(a.createTextNode(fe),We.childNodes[0]||null),it===xt?R.call(X,Ce?"html":"body")[0]:Ce?X.documentElement:We},Pt=function(j){const X=v?v(j):j.ownerDocument;return ee.call(X||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},St=function(j){return j=Ta(j,S," "),j=Ta(j,$," "),j=Ta(j,I," "),j},Mt=function(j){var X;j.normalize();const fe=v?v(j):j.ownerDocument,Re=ee.call(fe||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=St(We.data),We=Re.nextNode();const Ke=(X=j.querySelectorAll)===null||X===void 0?void 0:X.call(j,"template");Ke&&Xn(Ke,we=>{dn(we.content)&&Mt(we.content)})},Gt=function(j){const X=E?E(j):null;return typeof X!="string"||Me(X)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==w(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==_(j)||j.childNodes!==f(j)},dn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===Cn.documentFragment}catch{return!1}},yn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Vt(ge,j,X){ge.length!==0&&Xn(ge,fe=>{fe.call(t,j,X,tt)})}const En=function(j,X){return!!(ye&&j.hasChildNodes()&&!yn(j.firstElementChild)&&Qt(vl,j.textContent)&&Qt(vl,j.innerHTML)||ye&&j.namespaceURI===xt&&R1[X]&&(yn(j.firstElementChild)||typeof j.textContent=="string"&&Qt(P1[X],j.textContent))||j.nodeType===Cn.processingInstruction||ye&&j.nodeType===Cn.comment&&Qt(_l,j.data))},he=function(j,X){if(j instanceof RegExp)return Qt(j,X);if(j instanceof Function){for(var fe=arguments.length,Re=new Array(fe>2?fe-2:0),We=2;We<fe;We++)Re[We-2]=arguments[We];return!!j(X,...Re)}return!1},Te=function(j,X,fe){if(!ve[X]&&je(X)&&he(ae.tagNameCheck,X))return!1;if(et&&!dt[X]){const Re=x(j),We=f(j);if(We&&Re){const Ke=We.length;for(let we=Ke-1;we>=0;--we){const Ie=j===fe?b(We[we],!0):We[we];Re.insertBefore(Ie,C(j))}}}return Ht(j),!0},ze=function(j,X,fe,Re){return j.length===0?X:X===fe||X===Re?mn(X):X},Ze=function(j,X){return j===X||x(j)!==null?!1:(ft&&en(j),!0)},He=function(j,X){if(Vt(ne.beforeSanitizeElements,j,null),Ze(j,X))return!0;if(Gt(j))return Ht(j),!0;const fe=Me(k(j));if(H=ze(ne.uponSanitizeElement,H,te,$e),Vt(ne.uponSanitizeElement,j,{tagName:fe,allowedTags:H}),Ze(j,X))return!0;if(En(j,fe))return Ht(j),!0;if(ve[fe]||!(le.tagCheck instanceof Function&&le.tagCheck(fe))&&!H[fe]){const We=Te(j,fe,X);return We===!1&&Vt(ne.afterSanitizeElements,j,null),We}if(N(j)===Cn.element&&!zt(j)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&Qt(L1,j.innerHTML))return Ht(j),!0;if(se&&j.nodeType===Cn.text){const We=St(j.textContent);j.textContent!==We&&(Sa(t.removed,{element:j.cloneNode()}),j.textContent=We)}return Vt(ne.afterSanitizeElements,j,null),!1},Y=function(j,X,fe){if(me[X]||An(X,j)||Ue&&(X==="id"||X==="name")&&(fe in a||fe in Ft))return!1;const Re=W[X]||le.attributeCheck instanceof Function&&le.attributeCheck(X,j);return Pe&&Qt(P,X)||Be&&Qt(V,X)?!0:Re?At[X]||Qt(Z,Ta(fe,U,""))||(X==="src"||X==="xlink:href"||X==="href")&&j!=="script"&&pl(fe,"data:")===0&&ot[j]||Fe&&!Qt(ie,Ta(fe,U,""))?!0:!fe:je(j)&&he(ae.tagNameCheck,j)&&he(ae.attributeNameCheck,X,j)||X==="is"&&ae.allowCustomizedBuiltInElements&&he(ae.tagNameCheck,fe)},pe=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),je=function(j){return!pe[ja(j)]&&Qt(ce,j)},qe=function(j,X,fe,Re){if(D&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!fe)switch(d.getAttributeType(j,X)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return O(Re)}return Re},Ge=function(j,X,fe,Re){try{fe?j.setAttributeNS(fe,X,Re):j.setAttribute(X,Re),Gt(j)?Ht(j):cl(t.removed)}catch{Tt(X,j)}},Xe=function(j){Vt(ne.beforeSanitizeAttributes,j,null);const X=j.attributes;if(!X||Gt(j))return;W=ze(ne.uponSanitizeAttribute,W,z,nt);const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let Re=X.length;const We=Me(j.nodeName);for(;Re--;){const Ke=X[Re],we=Ke.name,Ie=Ke.namespaceURI,ut=Ke.value,Et=Me(we),pn=ut;let tn=we==="value"?pn:f1(pn);if(fe.attrName=Et,fe.attrValue=tn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,Vt(ne.uponSanitizeAttribute,j,fe),tn=fe.attrValue,Ne&&(Et==="id"||Et==="name")&&pl(tn,Ye)!==0&&(Tt(we,j,Ke),tn=Ye+tn),ye&&Qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,tn)){Tt(we,j,Ke);continue}if(Et==="attributename"&&dl(tn,"href")){Tt(we,j,Ke);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){Tt(we,j,Ke);continue}if(!Ae&&Qt($1,tn)){Tt(we,j,Ke);continue}if(se&&(tn=St(tn)),!Y(We,Et,tn)){Tt(we,j,Ke);continue}tn=qe(We,Et,Ie,tn),tn!==pn&&Ge(j,we,Ie,tn)}}Vt(ne.afterSanitizeAttributes,j,null)},gt=function(j){let X=null;const fe=Pt(j);for(Vt(ne.beforeSanitizeShadowDOM,j,null);X=fe.nextNode();)if(Vt(ne.uponSanitizeShadowNode,X,null),He(X,j),Xe(X),dn(X.content)&&gt(X.content),N(X)===Cn.element){const Re=g(X);dn(Re)&&(Ct(Re),gt(Re))}Vt(ne.afterSanitizeShadowDOM,j,null)},Ct=function(j){const X=[{node:j,shadow:null}];for(;X.length>0;){const fe=X.pop();if(fe.shadow){gt(fe.shadow);continue}const Re=fe.node,Ke=N(Re)===Cn.element,we=f(Re);if(we)for(let Ie=we.length-1;Ie>=0;--Ie)X.push({node:we[Ie],shadow:null});if(Ke){const Ie=E?E(Re):null;if(typeof Ie=="string"&&Me(Ie)==="template"){const ut=Re.content;dn(ut)&&X.push({node:ut,shadow:null})}}if(Ke){const Ie=g(Re);dn(Ie)&&X.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return t.sanitize=function(ge){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,fe=null,Re=null,We=null;if(bt=!ge,bt&&(ge="<!-->"),typeof ge!="string"&&!yn(ge)&&(ge=_1(ge),typeof ge!="string"))throw Jn("dirty is not a string, aborting");if(!t.isSupported)return ge;xe?(H=$e,W=nt):Q(j),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(H=mn(H)),ne.uponSanitizeAttribute.length>0&&(W=mn(W)),t.removed=[];const Ke=ft&&typeof ge!="string"&&yn(ge);if(Ke){Nn(ge);const ut=k(ge);if(typeof ut=="string"){const Et=Me(ut);if(!H[Et]||ve[Et])throw Yt(ge),Jn("root node is forbidden and cannot be sanitized in-place")}if(Gt(ge))throw Yt(ge),Jn("root node is clobbered and cannot be sanitized in-place");try{Ct(ge)}catch(Et){throw Yt(ge),Et}}else if(yn(ge))X=gn("<!---->"),fe=X.ownerDocument.importNode(ge,!0),fe.nodeType===Cn.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?X=fe:X.appendChild(fe),Ct(fe);else{if(!at&&!se&&!Ce&&ge.indexOf("<")===-1)return D&&Ee?M(ge):ge;if(X=gn(ge),!X)return at?null:Ee?A:""}X&&ct&&Ht(X.firstChild);const we=Ke?ge:X;try{const ut=Pt(we);for(;Re=ut.nextNode();)He(Re,we),Xe(Re),dn(Re.content)&&gt(Re.content)}catch(ut){throw Ke&&(Yt(ge),Xn(t.removed,Et=>{Et.element&&en(Et.element)})),ut}if(Ke)return Xn(t.removed,ut=>{ut.element&&en(ut.element)}),se&&Mt(ge),ge;if(at){if(se&&Mt(X),rt)for(We=re.call(X.ownerDocument);X.firstChild;)We.appendChild(X.firstChild);else We=X;return(W.shadowroot||W.shadowrootmode)&&(We=J.call(r,We,!0)),We}let Ie=Ce?X.outerHTML:X.innerHTML;return Ce&&H["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Qt(T1,X.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
798
+ `+Ie),se&&(Ie=St(Ie)),D&&Ee?M(Ie):Ie},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Q(ge),xe=!0,$e=H,nt=W},t.clearConfig=function(){tt=null,xe=!1,$e=null,nt=null,D=B,A=""},t.isValidAttribute=function(ge,j,X){tt||Q({});const fe=Me(ge),Re=Me(j);return Y(fe,Re,X)},t.addHook=function(ge,j){typeof j=="function"&&rn(ne,ge)&&Sa(ne[ge],j)},t.removeHook=function(ge,j){if(rn(ne,ge)){if(j!==void 0){const X=m1(ne[ge],j);return X===-1?void 0:C1(ne[ge],X,1)[0]}return cl(ne[ge])}},t.removeHooks=function(ge){rn(ne,ge)&&(ne[ge]=[])},t.removeAllHooks=function(){ne=wl()},t}var ma=Bl();let no=null;const O1=1500;function ao(){no?.clear(),no=null}function z1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;ao();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{ao();try{r.cancel();const p=new SpeechSynthesisUtterance(e),h=r.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=a,p.onend=t?l:null,p.onerror=t?l:null,r.speak(p)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,O1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}no={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function ro(){ao(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const W1=/^(?:[a-z]+:)?\/\//i,H1="__ihab_core_asset_base_url__";function V1(){return globalThis[H1]??""}function oo(e){const t=String(e||"").trim();if(!t)return"";if(W1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=V1();return r?`${r}${a}`:a}const kl="__ihab_core_storage_resolvers__";function La(){return globalThis[kl]??null}function q1(e){globalThis[kl]=e}let Al=class extends Error{constructor(t){super(`
799
799
  [ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
800
800
 
801
801
  \uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
@@ -814,24 +814,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
814
814
  \uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
815
815
  npm install @supabase/supabase-js
816
816
  pnpm add @supabase/supabase-js
817
- `),this.name="StorageNotConfiguredError"}};function U1(e){q1(e)}function Nl(e,t){if(!e)return null;const a=Ma();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function El(e){if(!e)return null;const t=Ma();if(!t)throw new Al("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Dl(e){const t=Ma();if(!t)throw new Al("downloadSound");return t.download(e)}function G1(){return Ma()?.noiseBaseUrl??"/sounds/noise"}function K1(){const e=Number(Ma()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Y1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function Z1(e){return e===400||e===404||e===410}const Sl="__ihab_core_tts_config__";function La(){return globalThis[Sl]?.urlResolver??null}function ir(){return globalThis[Sl]?.fallbackUrlResolver??null}const X1="__ihab_core_pronunciation_resolver__";function J1(){return globalThis[X1]??null}let Vn=null;const $a=new WeakMap,so=new WeakMap,lo=new WeakMap;let jl=!1;const Tl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Q1(){if(jl||typeof document>"u")return;jl=!0;const e=()=>{try{Vn&&Vn.state!=="running"&&Vn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function Ml(){if(Vn)return Vn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Vn=new e,Q1(),Vn):null}catch{return null}}function io(){try{Vn?.resume()}catch{}}function uo(e,t){const a=$a.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Tl(so.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return $a.set(t,i),i}catch{return null}}function ur(e){if(!e)return Promise.resolve(null);const t=$a.get(e);if(t)return Promise.resolve(t.analyser);const a=Ml();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(uo(a,e)?.analyser??null);const r=lo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?uo(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{lo.delete(e)});return lo.set(e,s),s}function ef(e){if(!e)return null;const t=$a.get(e);if(t)return t.analyser;const a=Ml();return a?a.state==="running"?uo(a,e)?.analyser??null:(ur(e),null):null}function qn(e,t){const a=Tl(t);so.set(e,a);const r=$a.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function cr(e){return so.get(e)??e.volume}function tf(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const nf="__ihab_core_image_config__";function ma(){return globalThis[nf]??null}const Ll="word_image_existence_map_v1",af="ihab:image-existence-updated";let Ra=null;function rf(){Ra!==null&&(clearTimeout(Ra),Ra=null),typeof window<"u"&&window.dispatchEvent(new Event(af))}function of(){Ra===null&&(Ra=setTimeout(rf,200))}let Qn=null,co=0;const Pa=new Map;function sf(){if(Qn)return Qn;try{const e=typeof localStorage<"u"?localStorage.getItem(Ll):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Qn=a}catch{Qn={}}return Qn}let po=null;function lf(){po===null&&(po=setTimeout(()=>{po=null;try{typeof localStorage<"u"&&Qn&&localStorage.setItem(Ll,JSON.stringify(Qn))}catch{}},200))}function uf(e,t){return`${e}_${t??1}`}async function cf(e,t,a=!1){const r=sf(),s=uf(e,t);if(!a&&s in r)return r[s];if(!a&&Pa.has(s))return Pa.get(s);const l=ma();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let c;try{c=fetch(i,{method:"HEAD",signal:Y1(8e3)})}catch{return!1}const u=c.then(p=>p.ok?!0:Z1(p.status)?!1:null,()=>null).then(p=>Pa.get(s)!==u?p??!1:(Pa.delete(s),p===null?!1:(r[s]=p,co++,lf(),p)));return Pa.set(s,u),u}async function $l(e,t){const a=co,r=await cf(e,t);return co!==a&&of(),r}const Rl=90;function Pl(e){let t=0;for(const a of e){const r=a.codePointAt(0)??0;a===`
818
- `||a==="\r"?t+=2:t+=r<128?1:2}return t}function df(e){return Pl(e)>90?"LMS":"SMS"}function Fl(e,t=85){const a=Pl(e),r=df(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const pf=["onset","vowel","coda","glide"],Il="none",hf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},mf="\uC5C6\uC74C";function Cf(e){return pf.includes(e)}function ff(e){const t={};for(const[a,r]of Object.entries(e)){const s=Cf(a)?a:hf[a];s&&(t[s]=r===mf?Il:r)}return t}const bf={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},Ol=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],zl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],gf=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Fa(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function yf(e){const t=Fa(e[0]||"");return t?Ol[t.cho]:""}function vf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Ol.includes(i),r=i=>zl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Fa(i)?"syl":"other"),l=t.map(i=>Fa(i));if(s.includes("other")){const i=e.toLowerCase();return c=>c.normalize("NFC").toLowerCase().includes(i)}return i=>{const c=[...i.normalize("NFC")];for(let u=0;u+t.length<=c.length;u++){let p=!0;for(let h=0;h<t.length;h++){const d=c[u+h],m=s[h];if(m==="cho"){if(yf(d)!==t[h]){p=!1;break}}else if(m==="jung"){const b=Fa(d);if(!b||zl[b.jung]!==t[h]){p=!1;break}}else{const b=l[h];if(b&&b.jong===0){const v=Fa(d);if(!v||v.cho!==b.cho||v.jung!==b.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const _f={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(_f).map(([e,t])=>[t.join(""),gf[Number(e)]]));const xf="word_pair_index_v2",wf="word_pair_index_sig_v2";let dr=null;function Bf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function kf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(xf),t=localStorage.getItem(wf);if(!e||!t)return null;const a=JSON.parse(e);return Bf(a)?{index:a,sig:t}:null}catch{return null}}function Af(){if(dr)return dr;const e=kf();return e?(dr=e.index,e.sig,dr):null}function Nf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function Ef(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const ho=/[ㄱ-ㅎ]/,Df=/[ㅏ-ㅣ]/;function Wl(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||ho.test(a)||Df.test(a))return a}return null}function Sf(e){const t=Wl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ho.test(t)?"\uC774":"\uAC00"}function jf(e){return`${e}${Sf(e)}`}function Tf(e){const t=Wl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ho.test(t)?"\uC744":"\uB97C"}function Mf(e){return`${e}${Tf(e)}`}function Lf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Ia(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const $f=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Zt?.t=="function"?Zt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Hl(e,t){if(t===void 0&&(t=$f()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Rf="__ihab_core_word_pool__";function Vl(){return globalThis[Rf]??null}const ql=globalThis;function Ul(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Pf(e){Ul("time",()=>ql.__ihabTrainingTimeLogger?.(e))}function Ff(e){Ul("completion",()=>ql.__ihabTrainingCompletionLogger?.(e))}const If="Asia/Seoul",Of=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Oa(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Of.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function zf(e){return Oa(e)!==null}const Wf=e=>Oa(e);function Gl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Wf(e);return r?r.toLocaleDateString(a,{timeZone:If,year:"numeric",month:"short",day:"numeric"}):""}function Kl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Hf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Kl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function Yl(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Hf(a,r,t)}function za(){return mo(new Date)}function pr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Oa(e)?.toISOString().slice(0,10)===e?e:za()}function Ca(){return qf(za())}const Vf=540*60*1e3;function Zl(e,t,a){return new Date(Date.UTC(e,t,a)-Vf)}function qf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function mo(e){if(e==null||e==="")return"";const t=Oa(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Xl(e,t){if(!e)return"";const a=Oa(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),c=Math.floor(i/24),u=Math.floor(c/7),p=Math.floor(c/30),h=Math.floor(c/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):c<7?t("store.time.daysAgo",{n:c}):u<5?t("store.time.weeksAgo",{n:u}):c<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Jl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=mo(e instanceof Date?e:String(e));if(!i)return l;const[c,u,p]=i.split("-"),h=r?u:String(Number(u)),d=r?p:String(Number(p));return`${c}${a}${h}${a}${d}${s?".":""}`}function hr(e){if(typeof e=="string"){const t=e.trim();return t&&zf(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function on(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Uf(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function Gf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:on(r.contextCode)??on(r.itemId)??on(r.itemCode)??on(r.id),question:on(r.question)??on(r.q)??on(r.sentence)??on(r.text)??on(r.prompt)??on(r.word)??on(r.targetSyllable),answer:on(r.answer),selected:on(r.selectedText)??on(r.selected),correct:Uf(r),shownAt:hr(r.shownAt)??hr(r.shown_at),answeredAt:hr(r.answeredAt)??hr(r.answered_at)}}):[]}const Co=globalThis;async function Kf(){try{return await Co.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function fo(e){const t=a=>{};try{const a=Co.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function mr(e){try{Co.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Yf(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function fa(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ql(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function bo(e){return(e??0).toLocaleString("ko-KR")}const Zf=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],Xf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function ei(){return Zf}function Jf(){return Xf}const Qf=[],eb=[],tb=[],nb=[];function ab(){return{LISTEN_IN_NOISE:Qf,SHORT_STORY:eb,LONG_STORY:tb,ORDERING_SENTENCE:nb}}const rb=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],ti={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function ob(e){return rb.map(t=>{const a=ti[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var sb={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},lb={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},ib={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},ub={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},cb={selected:"\uC120\uD0DD\uB428"},db={placeholder:"\uC120\uD0DD"},pb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},hb={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},mb={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},Cb={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},fb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},bb={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},gb={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB4F1\uAE09",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},yb={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},vb={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},_b={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},xb={showN:"{{n}}\uAC1C\uC529"},wb={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},Bb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},kb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ab={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Nb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},Eb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Db={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},Sb={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},jb={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},Tb={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},Mb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
817
+ `),this.name="StorageNotConfiguredError"}};function U1(e){q1(e)}function Nl(e,t){if(!e)return null;const a=La();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function El(e){if(!e)return null;const t=La();if(!t)throw new Al("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Dl(e){const t=La();if(!t)throw new Al("downloadSound");return t.download(e)}function G1(){return La()?.noiseBaseUrl??"/sounds/noise"}function K1(){const e=Number(La()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Y1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function Z1(e){return e===400||e===404||e===410}const Sl="__ihab_core_tts_config__";function $a(){return globalThis[Sl]?.urlResolver??null}function ir(){return globalThis[Sl]?.fallbackUrlResolver??null}const X1="__ihab_core_pronunciation_resolver__";function J1(){return globalThis[X1]??null}let Vn=null;const Ra=new WeakMap,so=new WeakMap,lo=new WeakMap;let jl=!1;const Tl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Q1(){if(jl||typeof document>"u")return;jl=!0;const e=()=>{try{Vn&&Vn.state!=="running"&&Vn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function Ml(){if(Vn)return Vn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Vn=new e,Q1(),Vn):null}catch{return null}}function io(){try{Vn?.resume()}catch{}}function uo(e,t){const a=Ra.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Tl(so.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Ra.set(t,i),i}catch{return null}}function ur(e){if(!e)return Promise.resolve(null);const t=Ra.get(e);if(t)return Promise.resolve(t.analyser);const a=Ml();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(uo(a,e)?.analyser??null);const r=lo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?uo(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{lo.delete(e)});return lo.set(e,s),s}function ef(e){if(!e)return null;const t=Ra.get(e);if(t)return t.analyser;const a=Ml();return a?a.state==="running"?uo(a,e)?.analyser??null:(ur(e),null):null}function qn(e,t){const a=Tl(t);so.set(e,a);const r=Ra.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function cr(e){return so.get(e)??e.volume}function tf(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const nf="__ihab_core_image_config__";function Ca(){return globalThis[nf]??null}const Ll="word_image_existence_map_v1",af="ihab:image-existence-updated";let Pa=null;function rf(){Pa!==null&&(clearTimeout(Pa),Pa=null),typeof window<"u"&&window.dispatchEvent(new Event(af))}function of(){Pa===null&&(Pa=setTimeout(rf,200))}let Qn=null,co=0;const Fa=new Map;function sf(){if(Qn)return Qn;try{const e=typeof localStorage<"u"?localStorage.getItem(Ll):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Qn=a}catch{Qn={}}return Qn}let po=null;function lf(){po===null&&(po=setTimeout(()=>{po=null;try{typeof localStorage<"u"&&Qn&&localStorage.setItem(Ll,JSON.stringify(Qn))}catch{}},200))}function uf(e,t){return`${e}_${t??1}`}async function cf(e,t,a=!1){const r=sf(),s=uf(e,t);if(!a&&s in r)return r[s];if(!a&&Fa.has(s))return Fa.get(s);const l=Ca();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:Y1(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:Z1(p.status)?!1:null,()=>null).then(p=>Fa.get(s)!==c?p??!1:(Fa.delete(s),p===null?!1:(r[s]=p,co++,lf(),p)));return Fa.set(s,c),c}async function $l(e,t){const a=co,r=await cf(e,t);return co!==a&&of(),r}const Rl=90;function Pl(e){let t=0;for(const a of e){const r=a.codePointAt(0)??0;a===`
818
+ `||a==="\r"?t+=2:t+=r<128?1:2}return t}function df(e){return Pl(e)>90?"LMS":"SMS"}function Fl(e,t=85){const a=Pl(e),r=df(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const pf=["onset","vowel","coda","glide"],Il="none",hf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},mf="\uC5C6\uC74C";function Cf(e){return pf.includes(e)}function ff(e){const t={};for(const[a,r]of Object.entries(e)){const s=Cf(a)?a:hf[a];s&&(t[s]=r===mf?Il:r)}return t}const bf={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},Ol=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],zl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],gf=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Ia(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function yf(e){const t=Ia(e[0]||"");return t?Ol[t.cho]:""}function vf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Ol.includes(i),r=i=>zl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ia(i)?"syl":"other"),l=t.map(i=>Ia(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if(yf(d)!==t[h]){p=!1;break}}else if(m==="jung"){const b=Ia(d);if(!b||zl[b.jung]!==t[h]){p=!1;break}}else{const b=l[h];if(b&&b.jong===0){const y=Ia(d);if(!y||y.cho!==b.cho||y.jung!==b.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const _f={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(_f).map(([e,t])=>[t.join(""),gf[Number(e)]]));const xf="word_pair_index_v2",wf="word_pair_index_sig_v2";let dr=null;function Bf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function kf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(xf),t=localStorage.getItem(wf);if(!e||!t)return null;const a=JSON.parse(e);return Bf(a)?{index:a,sig:t}:null}catch{return null}}function Af(){if(dr)return dr;const e=kf();return e?(dr=e.index,e.sig,dr):null}function Nf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function Ef(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const ho=/[ㄱ-ㅎ]/,Df=/[ㅏ-ㅣ]/;function Wl(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||ho.test(a)||Df.test(a))return a}return null}function Sf(e){const t=Wl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ho.test(t)?"\uC774":"\uAC00"}function jf(e){return`${e}${Sf(e)}`}function Tf(e){const t=Wl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ho.test(t)?"\uC744":"\uB97C"}function Mf(e){return`${e}${Tf(e)}`}function Lf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Oa(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const $f=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Zt?.t=="function"?Zt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Hl(e,t){if(t===void 0&&(t=$f()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Rf="__ihab_core_word_pool__";function Vl(){return globalThis[Rf]??null}const ql=globalThis;function Ul(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Pf(e){Ul("time",()=>ql.__ihabTrainingTimeLogger?.(e))}function Ff(e){Ul("completion",()=>ql.__ihabTrainingCompletionLogger?.(e))}const If="Asia/Seoul",Of=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function za(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Of.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function zf(e){return za(e)!==null}const Wf=e=>za(e);function Gl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Wf(e);return r?r.toLocaleDateString(a,{timeZone:If,year:"numeric",month:"short",day:"numeric"}):""}function Kl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Hf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Kl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function Yl(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Hf(a,r,t)}function Wa(){return mo(new Date)}function pr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&za(e)?.toISOString().slice(0,10)===e?e:Wa()}function fa(){return qf(Wa())}const Vf=540*60*1e3;function Zl(e,t,a){return new Date(Date.UTC(e,t,a)-Vf)}function qf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function mo(e){if(e==null||e==="")return"";const t=za(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Xl(e,t){if(!e)return"";const a=za(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),p=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Jl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=mo(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=r?c:String(Number(c)),d=r?p:String(Number(p));return`${u}${a}${h}${a}${d}${s?".":""}`}function hr(e){if(typeof e=="string"){const t=e.trim();return t&&zf(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function on(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Uf(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function Gf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:on(r.contextCode)??on(r.itemId)??on(r.itemCode)??on(r.id),question:on(r.question)??on(r.q)??on(r.sentence)??on(r.text)??on(r.prompt)??on(r.word)??on(r.targetSyllable),answer:on(r.answer),selected:on(r.selectedText)??on(r.selected),correct:Uf(r),shownAt:hr(r.shownAt)??hr(r.shown_at),answeredAt:hr(r.answeredAt)??hr(r.answered_at)}}):[]}const Co=globalThis;async function Kf(){try{return await Co.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function fo(e){const t=a=>{};try{const a=Co.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function mr(e){try{Co.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Yf(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function ba(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ql(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function bo(e){return(e??0).toLocaleString("ko-KR")}const Zf=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],Xf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function ei(){return Zf}function Jf(){return Xf}const Qf=[],eb=[],tb=[],nb=[];function ab(){return{LISTEN_IN_NOISE:Qf,SHORT_STORY:eb,LONG_STORY:tb,ORDERING_SENTENCE:nb}}const rb=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],ti={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function ob(e){return rb.map(t=>{const a=ti[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var sb={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},lb={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},ib={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},ub={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},cb={selected:"\uC120\uD0DD\uB428"},db={placeholder:"\uC120\uD0DD"},pb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},hb={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},mb={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},Cb={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},fb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},bb={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},gb={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB4F1\uAE09",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},yb={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},vb={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},_b={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},xb={showN:"{{n}}\uAC1C\uC529"},wb={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},Bb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},kb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ab={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Nb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},Eb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Db={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},Sb={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},jb={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},Tb={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},Mb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
819
819
  \uC2E0\uB8B0\uB97C \uC313\uACE0
820
820
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},Lb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},$b={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},Rb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Pb={ariaLabel:"\uC120\uD0DD \uD0ED"},Fb={ariaLabel:"\uD0ED"},Ib={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Ob={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},zb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Wb={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},Hb={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},Vb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},qb={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},Ub={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},Gb={viewWords:"\uB0B1\uB9D0"},Kb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Yb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Zb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Xb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Jb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Qb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},eg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},tg={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},ng={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},ag={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},rg={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},og={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},sg={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},lg={common:sb,calendar:lb,passCard:ib,rating:ub,colorPicker:cb,dropdown:db,accordion:pb,header:hb,nav:mb,settings:Cb,usage:fb,account:bb,training:gb,customers:yb,payment:vb,coupons:_b,visits:xb,trainingType:wb,myWordTable:Bb,keyWords:kb,wordTable:Ab,wordSearch:Nb,wordPrint:Eb,topic:Db,device:Sb,manager:jb,wordPairs:Tb,footer:Mb,date:Lb,wordData:$b,textField:Rb,segmentedControl:Pb,tabs:Fb,fileUpload:Ib,avatar:Ob,myHomework:zb,trainingStatus:Wb,store:Hb,progress:Vb,trainingMiss:qb,table:Ub,wordScore:Gb,topBanner:Kb,datePicker:Yb,report:Zb,tooltip:Xb,phonemeProfile:Jb,bulkBar:Qb,debug:eg,badge:tg,loader:ng,soundCompass:ag,breadcrumb:rg,board:og,promoBannerBg:sg},ig={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},ug={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{full}}",weekLabel:"Week {{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},cg={planSuffix:"Plan",labeledPlan:"{{label}} Plan",couponCode:"Pass Code",specialLabel:"Open Special",unitDay:"d",unitYear:"yr",remainingDay:"{{n}}d left",remainingHour:"{{n}}h left",remainingMinute:"{{n}}m left",remainingSecond:"{{n}}s left",expired:"Expired",menu:{use:"Activate",refund:"Refund",delete:"Delete"}},dg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},pg={selected:"selected"},hg={placeholder:"Select"},mg={collapse:"Collapse",expand:"Expand"},Cg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},fg={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},bg={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},gg={couponButton:"Enter Coupon"},yg={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},vg={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},_g={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},xg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},wg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Bg={showN:"Show {{n}}"},kg={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},Ag={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Ng={title:"Key Words",empty:"No key words available."},Eg={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}",pickForm:"Other forms",pickFormAria:"Change the form in cell {{n}}",pickFormBaseAria:"Change the form of the base word"},Dg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},Sg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},jg={title:"By Topic",subtitle:"Select a topic to start listening training",noiseTitle:"Sentence Listening in Noise",shortStoryTitle:"Short Story Listening",FOOD:"Food",HLTH:"Health",WETH:"Weather",PRSN:"People",KRCT:"Korean Culture",STRY:"Stories",LOCA:"Locations",SOAR:"Society & Arts",NTSC:"Nature & Science",SPRT:"Sports",sub:{TRKRFD:"Traditional Korean Food",MDKRFD:"Modern Korean Food",WRLDFD:"World Cuisine",MTRFRT:"Ingredients & Fruits",GEFDKL:"Food Facts",HTETHB:"Healthy Eating",DISILL:"Diseases",EXCISE:"Exercise",GEHTKL:"Health Facts",GESSKL:"Seasons",SNWRAN:"Snow & Rain",WTHFCT:"Weather Forecast",GEWTKL:"Weather Facts",JODYPS:"Joseon Dynasty",MDKRPS:"Modern Korea",THKDPS:"Three Kingdoms",WRLART:"World Artists",WRLPSN:"World Figures",KRLANG:"Korean Language",TRPLCT:"Traditional Games",HERITG:"Heritage",EVTFES:"Events & Festivals",GECTKL:"General Knowledge",FRYTAL:"Fairy Tales",AMZING:"Amazing Stories",DAYSTR:"Everyday Stories",KRLDMK:"Korean Landmarks",SELNMK:"Seoul Landmarks",WRDTRB:"World Travel",NAVIGT:"Navigation",KRSOCI:"Korea",ECONEW:"Economy & News",GENART:"Arts",GELFKL:"Life Tips",ANIMAL:"Animals",PLANTS:"Plants",ETHPLT:"Earth",TOLELC:"Tools & Electronics",GESCKL:"Science Facts",INVDSP:"Individual Sports",MARART:"Martial Arts",TEAMSP:"Team Sports",FOOTBL:"Soccer",GESPKL:"Sports Facts"}},Tg={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},Mg={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},Lg={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlyHighUsage:"High-use words only",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},$g={lead:`IHAB builds trust
821
821
  through sound
822
- and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},Rg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Pg={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},Fg={clearAriaLabel:"Clear input"},Ig={ariaLabel:"Select tab"},Og={ariaLabel:"Tabs"},zg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Wg={ariaLabel:"User avatar"},Hg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Vg={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},qg={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},Ug={steps:"Step {{current}} of {{total}}"},Gg={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},Kg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Yg={viewWords:"Words"},Zg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Xg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Jg={previewRegion:"Report preview \u2014 scrollable sideways"},Qg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},ey={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ty={clearSelection:"Clear selection"},ny={showResult:"Show {{type}} result"},ay={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},ry={loading:"Loading"},oy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},sy={ariaLabel:"Breadcrumb"},ly={empty:"No items yet."},iy={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},uy={common:ig,calendar:ug,passCard:cg,rating:dg,colorPicker:pg,dropdown:hg,accordion:mg,header:Cg,nav:fg,settings:bg,usage:gg,account:yg,training:vg,customers:_g,payment:xg,coupons:wg,visits:Bg,trainingType:kg,myWordTable:Ag,keyWords:Ng,wordTable:Eg,wordSearch:Dg,wordPrint:Sg,topic:jg,device:Tg,manager:Mg,wordPairs:Lg,footer:$g,date:Rg,wordData:Pg,textField:Fg,segmentedControl:Ig,tabs:Og,fileUpload:zg,avatar:Wg,myHomework:Hg,trainingStatus:Vg,store:qg,progress:Ug,trainingMiss:Gg,table:Kg,wordScore:Yg,topBanner:Zg,datePicker:Xg,report:Jg,tooltip:Qg,phonemeProfile:ey,bulkBar:ty,debug:ny,badge:ay,loader:ry,soundCompass:oy,breadcrumb:sy,board:ly,promoBannerBg:iy};const cy="0.414.0",dy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],go="ko",py="ihab_display_language";function ni(){if(typeof window>"u")return go;try{const e=localStorage.getItem(py);if(e&&dy.some(t=>t.code===e))return e}catch{}return go}function ai(e){try{document.documentElement.lang=e}catch{}}Zt.on("languageChanged",ai),ai(ni()),Zt.use(we.initReactI18next).init({resources:{ko:{translation:lg},en:{translation:uy}},lng:ni(),fallbackLng:go,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const hy=new Map;try{Zt.store?.on?.("added",()=>hy.clear())}catch{}let Cr=null,ri=null,oi=null;function my(){const e=Vl();if(e&&e.entries.length>0){const t=Af();if(Cr&&ri===e&&oi===t)return Cr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Cr=r,ri=e,oi=t,Cr}return[]}new Proxy([],{get(e,t){const a=my(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Cy(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function fy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Cy(r.attrValue)&&(r.keepAttr=!1)};ha.addHook("uponSanitizeAttribute",t);try{return ha.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{ha.removeHook("uponSanitizeAttribute",t)}}function by(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[c,u]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),u(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=oo(e):/^(Logo|Symbol)/i.test(d)?m=oo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),u(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let d=!1;async function m(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const v=b.headers.get("content-type")||"";if(d)return;if(v.includes("svg")){i("mask");return}if(v.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const f=await C.text();if(d)return;if(/^\s*<svg[\s>]/i.test(f)){const _=fy(f);if(!_){i("none");return}u(_),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[r]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{d||(m=URL.createObjectURL(b),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:c,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function ot(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:c,size:u}=e||{},p=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,v=o1(b),{iconToUse:C,mode:f,svgText:_,blobUrl:g}=by(b),w=(k,D={})=>n.jsx("span",{className:p,style:c,...D,children:k}),y=typeof u=="number"?{width:u,height:u,objectFit:"contain"}:null,A=(k,D={})=>n.jsx("img",{src:k,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:y?{...D.style,...y}:D.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(v)try{return w(o.createElement(v,{className:m,size:typeof u=="number"?u:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const k={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof u=="number"?{"--icon-size":`${u}px`}:null};return w(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return f==="img"?w(A(C,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return A(oo(t),{style:c,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const x=typeof u=="number"?u:20,E=`<svg width="${x}" height="${x}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:E}}),{"aria-hidden":"true"})}function si(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const c=()=>{r.current=!1,s.current&&a(!1)};i.then(c,c)}},[e]);return{pending:t,press:l}}function gy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=si(r?.onClick);return n.jsxs("div",{className:Ne("empty-state",s),children:[e&&n.jsx(ot,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(ot,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function yy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=we.useTranslation(),{pending:c,press:u}=si(r);return n.jsxs("div",{className:Ne("empty-state","error-state",l),role:"alert",children:[n.jsx(ot,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:u,disabled:c,"aria-busy":c||void 0,children:[n.jsx(ot,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function vy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:c=""}){const u=o.useId(),p=`${u}-title`,h=`${u}-desc`,d=`${u}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())},className:Ne("action-card",`action-card--${s}`,l&&"action-card--disabled",c),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(ot,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(ot,{icon:"arrow-right",size:18})})]})]})})}function _y({as:e="div",className:t="",children:a,storage:r,...s}){r&&U1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=Ne("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function xy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function yo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(Dn)).filter(xy);if(!l.length){s.preventDefault();return}const i=l[0],c=l[l.length-1],u=document.activeElement,p=u===a;s.shiftKey&&(u===i||p)?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Dn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',vo=new WeakMap;function _o(e,t){e&&vo.set(e,t)}function xo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!vo.has(r);)r=r.parentElement;if(!r)return t;t=vo.get(r)??null}return t}function li(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function fr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(li(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Dn)).filter(u=>!(e&&e.contains(u))&&li(u));let l=null,i=null;for(const u of s)r.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_PRECEDING?l=u:i||(i=u);const c=l??i;return c?.focus(),c}function wy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:c}=we.useTranslation(),[u,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&fr(C),p(!0)},[]);if(u)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),b=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:m,role:"note",children:[a.map((C,f)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):C.children??null})]},f)),b]});const v=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((C,f)=>n.jsx("li",{className:"notice-box__line",children:C},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[v,b]})}const By={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function ba(e){const{t}=we.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const u=s==null||!Number.isFinite(Number(s)),p=u?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${u?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:u?void 0:{width:`${p}%`}})})}const c=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:c,height:c},role:"status","aria-label":i,children:[n.jsx("span",{style:By,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const ga=[];let br=!1;function ii(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ga[ga.length-1];t&&(e.stopPropagation(),t())}function ea(e){return ga.push(e),!br&&typeof document<"u"&&(document.addEventListener("keydown",ii),br=!0),()=>{const t=ga.lastIndexOf(e);t>=0&&ga.splice(t,1),ga.length===0&&br&&typeof document<"u"&&(document.removeEventListener("keydown",ii),br=!1)}}const ui=o.createContext(null);function ky(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ci=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Ay(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return Is.useSyncExternalStore(t,()=>ci(e),()=>!1)}function Ny(e){const[t,a]=o.useState(ci(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const Ey=typeof Is.useSyncExternalStore=="function"?Ay:Ny;function vn(e){const t=o.useContext(ui),a=Ey(e);return t&&typeof t.mobile=="boolean"&&ky(e)?t.mobile:a}const Dy="(prefers-reduced-motion: reduce)";function wo(){return vn(Dy)}const di={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function Sy(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function jy(e){return Sy(di,e)}function le(e){if(!e||Object.keys(di).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=jy(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:c="",role:u="dialog",ariaLabel:p="",children:h,backdrop:d=!1,isMobilePopup:m=!1,useBorder:b=!0,header:v,focusOnOpen:C}=e||{},f=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,y]=o.useState(!1),[A,x]=o.useState("bottom"),[E,k]=o.useState(!1),[D,N]=o.useState(!1),B=!t&&!a,$=o.useRef(null),M=o.useCallback((L=!1,q=!1)=>{if(D&&m)return;const K=a?a.getBoundingClientRect():t,z=q&&$.current?$.current:K;if(!z||!f.current)return;const F=f.current,{offsetWidth:I,offsetHeight:P}=F,Z=window.innerWidth,ue=window.innerHeight,U=Z-z.right,pe=z.left,ae=z.top,V=ue-z.bottom;let se=0,O=0,H="top";if(ae>=P+r)H="top",O=z.top-r-P,se=z.left+z.width/2-I/2;else if(V>=P+r)H="bottom",O=z.bottom+r,se=z.left+z.width/2-I/2;else if(U>=I+r)H="right",se=z.right+r,O=z.top+z.height/2-P/2;else if(pe>=I+r)H="left",se=z.left-r-I,O=z.top+z.height/2-P/2;else{const ie=Math.max(ae,V,U,pe);ie===ae?(H="top",O=z.top-r-P,se=z.left+z.width/2-I/2):ie===V?(H="bottom",O=z.bottom+r,se=z.left+z.width/2-I/2):ie===U?(H="right",se=z.right+r,O=z.top+z.height/2-P/2):(H="left",se=z.left-r-I,O=z.top+z.height/2-P/2)}const re=Number.isFinite(Number(s))?Number(s):8;se=Math.min(Math.max(se,re),Z-I-re),O=Math.min(Math.max(O,re),ue-P-re);const _e=Math.round(se),te=Math.round(O);L&&f.current?(f.current.style.left=`${_e}px`,f.current.style.top=`${te}px`,f.current.dataset.placement=H):(x(H||A),g({position:"fixed",left:_e,top:te}),k(!0))},[D,m,a,t,r,s,A]);o.useEffect(()=>()=>{$.current=null},[a,t]),o.useLayoutEffect(()=>{if(B)return;if(D&&m){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),k(!0);return}$.current===null&&($.current=a?a.getBoundingClientRect():t??null),M(!1,!0);const L=requestAnimationFrame(()=>M(!1,!0));return()=>cancelAnimationFrame(L)},[t,a,r,h,s,B,D,m,M]),o.useEffect(()=>{if(B||D&&m||!f.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{t&&M()});return L.observe(f.current),()=>L.disconnect()},[t,h,s,B,D,m,M]),o.useEffect(()=>{if(B||D&&m)return;let L=null;const q=()=>{if(a&&($.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){M(!0);return}L===null&&(L=requestAnimationFrame(()=>{L=null,M(!0)}))},K=z=>{if(!a&&l){const F=z.target;if(F&&f.current&&f.current.contains(F))return;try{if(F&&F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}X.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",K,{passive:!0,capture:!0}),()=>{L!==null&&cancelAnimationFrame(L),window.removeEventListener("resize",q),document.removeEventListener("scroll",K,{capture:!0})}},[t,a,l,r,h,s,B,D,m,M]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const L=window.matchMedia("(max-width: 768px)"),q=()=>N(!!L.matches);q();try{L.addEventListener?L.addEventListener("change",q):L.addListener(q)}catch{try{L.addListener(q)}catch{}}return()=>{try{L.removeEventListener?L.removeEventListener("change",q):L.removeListener(q)}catch{}}},[]);const Y=o.useRef(!1),T=o.useRef(null),R=wo(),S=o.useCallback((L=!1)=>{if(l&&!(w||Y.current)){if(Y.current=!0,L){y(!0);try{l&&l()}catch{Y.current=!1,y(!1)}return}y(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{Y.current=!1,y(!1)}},R?0:200)}},[w,l,y,R]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(B)return;const L=z=>{const F=f.current;if(!F)return;const I=z.target;if(I&&!F.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&S(!0)}},q=z=>{const F=f.current;if(!F)return;const I=z.target;if(I&&!F.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&S(!0)}},K=z=>{if(z.key==="Tab"){const F=f.current;if(!F)return;const I=F.querySelectorAll(Dn);if(!I||I.length===0)return;const P=I[0],Z=I[I.length-1],ue=document.activeElement;z.shiftKey?ue===P&&(z.preventDefault(),Z.focus()):ue===Z&&(z.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",L,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",K),()=>{document.removeEventListener("pointerdown",L,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",K)}},[l,i,S,B]);const X=o.useRef(S);o.useEffect(()=>{X.current=S});const ee=!!l;o.useEffect(()=>{if(!(B||!ee))return ea(()=>X.current())},[B,ee]),o.useEffect(()=>{const L=()=>{S(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",L),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",L)}},[S]);const W=o.useRef(null);o.useEffect(()=>{if(B||C===!1||!E)return;const L=f.current;if(!L)return;const q=L.querySelector(Dn);if(q)return W.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const K=W.current;W.current=null,K&&document.contains(K)&&K.focus({preventScroll:!0})}},[B,C,E]),o.useEffect(()=>{u==="dialog"&&!p&&Dt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[u,p]);const G=n.jsxs("div",{ref:f,className:le(`tooltip__content ${B?"tooltip__content--inline":""} ${b?"tooltip__content--bordered":""} ${w?"is-closing":""} ${c} ${D&&m?"is-mobile":""}`),role:u,"aria-label":p||void 0,style:B?{}:{..._,visibility:E?"visible":"hidden"},tabIndex:-1,"data-placement":A,"data-left":B?"":_.left,"data-top":B?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[v!=null&&n.jsx("div",{className:le("tooltip__header h5"),children:v}),h]});if(B||typeof document>"u")return G;if(d||D&&m){const L=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&S(!0)}}),G]});return hn.createPortal(L,document.body)}return hn.createPortal(G,document.body)}function Ln(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:le("info-tooltip__content body-3"),children:a})}):null}function Un(e){const{t}=we.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:c,offset:u=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:u,onClose:c,closeOnOutsideClick:p,useBorder:!1,className:le("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:le("description-tooltip__box"),children:[r&&n.jsx("span",{className:le("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:le(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,b)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${b===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[b+1,"."]}),m.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},b))})]})})}function Wa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let Bo=0,pi=!1;function hi(){pi||typeof document>"u"||(pi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Bo=Date.now())},!0),document.addEventListener("touchstart",()=>{Bo=Date.now()},{capture:!0,passive:!0}))}hi();function Gn(e){return!!e&&e.pointerType==="touch"}function ta(e=1e3){return hi(),Date.now()-Bo<e}function gr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Wa(e),i=Wa(t),c=o.useRef(null),u=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=d=>{const m=d,b=d.target,v=a.current,C=!!(b&&v&&v.contains(b));if(m.pointerType!=="touch"){C&&(c.current=null);return}if(C){c.current=l.current;return}c.current=null,l.current&&!(b&&b.closest?.(".tooltip__content"))&&i.current(!1,v)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const p=o.useCallback(h=>{const d=c.current;return d===null?!1:(c.current=null,u.current=Date.now(),i.current(!d,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,d=h?.parentElement;if(!h||!d)return;let m=null;const b=f=>{const _=f.changedTouches?.[0];if(!_)return!1;const g=h.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},v=f=>{m=b(f)?l.current:null},C=f=>{const _=m;m=null,!(_===null||Date.now()-u.current<700||!b(f))&&(c.current=null,u.current=Date.now(),i.current(!_,h))};return d.addEventListener("touchstart",v,{passive:!0}),d.addEventListener("touchend",C),()=>{d.removeEventListener("touchstart",v),d.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:p}}function Ty(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:c,icon:u,rightIcon:p,label:h,count:d,subLabel:m,children:b,ariaLabel:v,variant:C="default",align:f="center",nowrap:_=!1,selected:g,toggleable:w=!1,ariaExpanded:y,ariaControls:A,disabled:x=!1,loading:E=!1,useLabel:k=!0,useBorder:D=!0,useBG:N=!0,useDisabledCovered:B=!1,useDisabledInvisible:$=!1,useDisabledFilled:M=!1,width:Y,minWidth:T,onClick:R,onDisabledClick:S,showTooltipInfo:X=!1,tooltipInfoText:ee=null,tooltipDescription:W=null,tooltipOnly:G=!1,iconSize:L="medium",iconColor:q,shape:K="rounded",color:z,className:F,...I}=e,P=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),Z=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ue=Number(a),U=!isNaN(ue)&&ue<40?"button-2":"button-1",pe=h??b,ae=x||!!I.disabled,V=ae?B?"disabled-covered":$?"disabled-invisibled":M?"disabled-filled":"disabled":C,se=V?`button--variant-${V}`:"",O=f?`button--align-${f}`:"",H=_?"button--nowrap":"",re=K?`button--shape-${K}`:"",_e=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,te={...Y?{width:typeof Y=="number"?`${Y}px`:Y}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...D?{}:{"--button-border":ae?"0":"1px solid transparent"},..._e?{"--button-icon-color":_e}:{},...z?{"--color-main":z}:{}},ie=k===!1?"":pe,Be=Array.isArray(ie)?ie.length>0:!!ie,Le=!!p,Re=r??(Be||u||Le?"bar":"dot"),he=`${Z}--${Re}`,ge=o.useRef(null);o.useEffect(()=>{!Wn||s!==void 0||ge.current?.closest("form")&&Dt(`button-in-form:${typeof pe=="string"?pe:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof pe=="string"&&pe?` \uB2E8\uCD94: ${pe}`:""))},[s,pe]);const Ee=o.useRef(t);Ee.current=t;const ve=o.useCallback(Te=>{ge.current=Te;const tt=Ee.current;typeof tt=="function"?tt(Te):tt&&(tt.current=Te)},[]),Fe=o.useRef(ae),[ze,Ct]=o.useState(!!g),[ut,nt]=o.useState(!1),[ct,Ae]=o.useState(null),Ue=o.useCallback(()=>nt(!1),[]),[ke,Ye]=o.useState(!1),et=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Ct(g)},[g]),o.useEffect(()=>{if(Fe.current&&!ae&&ge.current){const Te=ge.current;let tt=!1;try{tt=Te.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Te.blur(),Te.style.pointerEvents="none";const Ft=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge.current&&(ge.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ft)}Fe.current=ae},[ae]);const ft=typeof g=="boolean"?!!g:ze,vt=typeof y=="boolean"?void 0:w||typeof g=="boolean"?ft?"true":"false":I["aria-pressed"],it=Ne("button",Z,he,se,O,H,re,ft?"is-selected":null,N?null:"button--no-bg",G?"button--tooltip-only":null,F),jt=`button__icon button__icon--${L}`,at=Array.isArray(m)?m:m!==void 0?[m]:[],rt=()=>{if(Array.isArray(ie))return ie.map((tt,Ft)=>{const _t=at[Ft];return n.jsxs("span",{className:`button__label-text${_t!==void 0?" button__label-text--has-sub":""}`,children:[tt,_t!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:_t})]},Ft)});const Te=m!==void 0;return n.jsxs("span",{className:`button__label-text${Te?" button__label-text--has-sub":""}`,children:[ie,d!=null&&n.jsx("span",{className:"button__count",children:d}),Te&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},At=Te=>{typeof g!="boolean"&&!w&&Ct(!1),Te.currentTarget.blur()},Nt=Te=>{ae||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Te),At(Te))},Ot=Te=>{if(G&&st&&bt.touchPress(Te.currentTarget),ae){st&&bt.touchPress(Te.currentTarget),Te.preventDefault(),S?.(Te);return}typeof g!="boolean"&&w&&Ct(tt=>!tt),R?.(Te)},Wt=o.useCallback(()=>{(X||W)&&(nt(!0),Ae(ge.current?.getBoundingClientRect()??null))},[X,W]),xt=o.useCallback(()=>{(X||W)&&(nt(!1),Ae(null))},[X,W]),st=!!(X||W),bt=gr(ut,Te=>{Te?Wt():xt()},ge,{enabled:st&&(ae||G),fallbackOnParent:st&&ae}),dt={...I};delete dt.disabled,delete dt.className,delete dt.faded,delete dt.useFaded,delete dt.loading,delete dt.onMouseLeave,delete dt.onPointerEnter,delete dt.onPointerLeave,delete dt.onPointerUp,delete dt.onFocus,delete dt.onBlur,ae&&(Object.keys(dt).forEach(Te=>{/^on[A-Z]/.test(Te)&&typeof dt[Te]=="function"&&delete dt[Te]}),dt["aria-disabled"]="true"),E&&(dt["aria-busy"]="true");const kt=(typeof X=="string"?X:null)??(typeof ee=="string"?ee:null)??(typeof v=="string"?v:null)??(typeof pe=="string"?pe:null)??void 0,ht=typeof v=="string"?v:typeof pe=="string"?pe:kt,wt=W?[W.title,...W.items??[]].filter(Boolean).join(". "):X&&kt&&kt!==ht?kt:"",ce=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,wt?et:null].filter(Boolean).join(" ")||void 0,Me=()=>n.jsx("span",{className:`${jt} button__spinner`,"aria-hidden":"true",children:n.jsx(ba,{variant:"spinner",size:"100%"})}),De=(Te,tt)=>n.jsx(ot,{icon:Te,label:tt??ht,className:jt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Je=Te=>E?Me():De(u,Te),pt=()=>Re==="dot"?n.jsxs(n.Fragment,{children:[Je(),Be&&n.jsx("span",{className:`button__label ${U}`,children:rt()})]}):f==="center"&&(u||E)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Je()}),Be&&n.jsx("span",{className:`button__label ${U}`,children:rt()})]}),Le&&n.jsx("span",{className:"button__right",children:De(p)})]}):n.jsxs(n.Fragment,{children:[(u||E)&&n.jsx("span",{className:"button__left",children:Je(v??pe)}),Be&&n.jsx("span",{className:`button__label ${U}`,children:rt()}),Le&&n.jsx("span",{className:"button__right",children:De(p)})]}),Rt=!!l&&!ae;return n.jsxs(n.Fragment,{children:[n.jsxs(Rt?"a":"button",{...dt,ref:ve,...Rt?{href:l,target:i,rel:c??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:ae&&!S&&!ke},className:it,"aria-pressed":vt,"aria-expanded":typeof y=="boolean"?y:I["aria-expanded"],"aria-controls":A??I["aria-controls"],"aria-label":ht,"aria-disabled":ae&&(Rt||S||ke)?!0:void 0,"aria-describedby":ce,style:te,onClick:Ot,onMouseLeave:Nt,onPointerEnter:Te=>{Gn(Te)||Wt(),!ae&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Te)},onPointerLeave:Te=>{Gn(Te)||xt(),!ae&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Te)},onPointerUp:Te=>{ae&&st&&bt.touchPress(Te.currentTarget),!ae&&typeof I.onPointerUp=="function"&&I.onPointerUp(Te)},onFocus:Te=>{Ye(!0),ta()||Wt(),!ae&&typeof I.onFocus=="function"&&I.onFocus(Te)},onBlur:Te=>{Ye(!1),ae||At(Te),xt(),!ae&&typeof I.onBlur=="function"&&I.onBlur(Te)},children:[pt(),wt?n.jsx("span",{id:et,hidden:!0,"aria-label":wt}):null]}),ut&&W?n.jsx(Un,{anchorRect:ct,title:W.title,items:W.items,onClose:Ue}):ut&&kt?n.jsx(Ln,{anchorRect:ct,text:kt,onClose:Ue}):null]})}const fe=o.forwardRef(Ty);fe.displayName="Button";function It(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Ha={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},ko=new WeakMap;function Ao(e){if(e)return ko.get(e)}function nn(e,t){e&&(e.style.setProperty(Ha.title,t.title),e.style.setProperty(Ha.description,t.description),ko.set(e,t))}function an(e){e&&(e.style.removeProperty(Ha.title),e.style.removeProperty(Ha.description),ko.delete(e))}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Ci(){const e=It(mi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const fi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=It(fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const gi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=It(gi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const vi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function _i(){const e=It(vi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const xi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=It(xi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function ki(){const e=It(Bi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const Ai={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Ni(){const e=It(Ai,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Di(){const e=It(Ei,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Si={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ji(){const e=It(Si,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ti={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Mi(){const e=It(Ti,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Li={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function $i(){const e=It(Li,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Pi(){const e=It(Ri,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Fi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ii(){const e=It(Fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Oi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function zi(){const e=It(Oi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const sn=(e,t,a)=>({key:e,get label(){return Zt.t(`promoBannerBg.${e}`,t)},textTone:a}),My=[sn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("soft","\uC18C\uD504\uD2B8","dark"),sn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),sn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),sn("warm","\uC6DC(\uAC15\uC870)","dark"),sn("dark","\uB2E4\uD06C","light"),sn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),sn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),sn("outline","\uC544\uC6C3\uB77C\uC778","dark"),sn("success","\uC131\uACF5/\uC644\uB8CC","light"),sn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),sn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Wi={main:Ci,soft:bi,sub:yi,deep:_i,softSub:wi,warm:ki,dark:Ni,radial:Di,diagonal:ji,dots:Mi,outline:$i,success:Pi,naver:Ii,instagram:zi};function Hi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),c=w=>{try{const y=localStorage.getItem(w),A=y?Number(y):1;return Number.isFinite(A)?i(A):i(1)}catch{return i(1)}},[u,p]=o.useState(()=>c(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(c(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(u))}catch{}},[e,u]);const m=w=>{p(typeof w=="function"?y=>i(w(y)):i(w))},b=()=>m(w=>+(w+s).toFixed(6)),v=()=>m(w=>+(w-s).toFixed(6)),C=u<r-Number.EPSILON,f=u>a+Number.EPSILON,_=Math.round(t*u),g=Math.round(_*l);return{scale:u,setScale:m,increase:b,decrease:v,canIncrease:C,canDecrease:f,fontSize:_,lineHeight:g}}function Vi(e,t){const a=Wa(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const No=" \xB7 ",qi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(No)?e.split(No).pop()??e:e})(),Ly=o.createContext(!1),na=[];let Ui=null;function $y(e){const t=o.useContext(Ly);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;na.length===0&&(Ui=document.title);const a={text:qi?`${e}${No}${qi}`:e};return na.push(a),document.title=a.text,()=>{const r=na.lastIndexOf(a);r>=0&&na.splice(r,1),document.title=na.length?na[na.length-1].text:Ui??document.title}},[e,t])}const Eo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],Ry=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Ry().compare(e,t)}const yr=new Map;function Py(e){const t=yr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,c=l[0];c[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,c=c.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(c)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),yr.size>5e3&&yr.clear(),yr.set(e,a),a}function Fy(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function Iy(e,t){const a=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=Fy(h);return d!==null?[d]:Py(h)},i=l(e,r),c=l(t,s),u=Math.min(i.length,c.length);for(let p=0;p<u;p++){const h=i[p],d=c[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=fn(h,d);if(m!==0)return m}return i.length!==c.length?i.length-c.length:fn(r,s)}const Gi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function vr(e,t,a){const r=Gi(e),s=Gi(t);if(r||s)return r===s?0:r?1:-1;const l=Iy(e,t);return a?l:-l}function Oy(e,t,a){const{t:r}=we.useTranslation(),[s,l]=o.useState(()=>{const v=a?.initialPageSize;return v&&Eo.some(C=>C.value===v)?v:"25"}),[i,c]=o.useState(1),[u,p]=o.useState(t);Object.is(u,t)||(p(t),i!==1&&c(1));const h=o.useMemo(()=>Eo.map(v=>({...v,label:r("visits.showN",{n:v.value})})),[r]),d=o.useCallback(v=>{Eo.some(C=>C.value===v)&&(l(v),c(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==b&&c(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(s),b*Number(s)),[e,b,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:b,total:m,onChange:c},setPage:c}}function zy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(u=>{const p=r.current,h=p?.key===u?{key:u,asc:!p.asc}:{key:u,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((u,p)=>({label:u,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),c=o.useCallback((u,p)=>{if(!t)return u;const{key:h,asc:d}=t;return[...u].sort((m,b)=>vr(p(m,h),p(b,h),d))},[t]);return{sort:t,field:i,sortRows:c}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(bf).map(([e,{nucleus:t}])=>[e,t]));const Wy={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},Hy={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},Vy={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function qy(e,t){if("place"in t)return Wy[t.place](e);const a=Hy[t.vowel](e);return t.glide?`${a} \xB7 ${Vy[t.glide](e)}`:a}const Uy=(e,{defaultValue:t})=>t,Ki=(e,t)=>({jamos:e,phonetic:t,tooltip:qy(Uy,t)}),$n=(e,t)=>t.map(a=>Ki([a],{place:e})),Xt=(e,t,a)=>Ki([...e],a?{vowel:t,glide:a}:{vowel:t}),Do={cho:[$n("labial",["\u3142","\u3143","\u314D","\u3141"]),$n("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),$n("alveolar",["\u3145","\u3146"]),$n("palatal",["\u3148","\u3149","\u314A"]),$n("velar",["\u3131","\u3132","\u314B"]),$n("glottal",["\u314E"])],jung:[[Xt("\u3163","frontHigh"),Xt("\u315F","frontHigh","w"),Xt("\u3162","frontHigh","velar")],[Xt("\u3161","backHighUnrounded")],[Xt("\u315C","backHighRounded"),Xt("\u3160","backHighRounded","j")],[Xt("\u3154\u3150","frontMid"),Xt("\u3156\u3152","frontMid","j"),Xt("\u3159\u315A\u315E","frontMid","w")],[Xt("\u3153","backMidUnrounded"),Xt("\u3155","backMidUnrounded","j"),Xt("\u315D","backMidUnrounded","w")],[Xt("\u3157","backMidRounded"),Xt("\u315B","backMidRounded","j")],[Xt("\u314F","low"),Xt("\u3151","low","j"),Xt("\u3158","low","w")]],jong:[$n("labial",["\u3142","\u3141"]),$n("alveolar",["\u3137","\u3134","\u3139"]),$n("velar",["\u3131","\u3147"])]},Gy=e=>e===Ky?[]:Array.from(e),Ky="__NO_CODA__",So=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Yi={cho:So(Do.cho),jung:So(Do.jung),jong:So(Do.jong)};Yi.jung.flat().forEach(({v:e})=>{for(const t of Gy(e));}),new Set(Yi.cho.flat().map(e=>e.v));function Yy(e,t=!0){const a=Wa(e);o.useEffect(()=>{if(t)return ea(()=>{a.current?.()})},[t,a])}function _r(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(c=>c?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Zy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((u,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(u),s(p)},e)},[e]),c=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:c}}function Zi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),c=o.useCallback((d,m)=>{s(m),a(d),i(b=>b+1)},[]),u=o.useCallback(d=>c(d,"warning"),[c]),p=o.useCallback(d=>c(d,"normal"),[c]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:c,showWarning:u,showNormal:p,clearToast:h}}function Va(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function qa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,c]=o.useState({position:"fixed"}),u=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{u.current&&c(e(u.current.getBoundingClientRect(),u.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let b=p.current?.offsetHeight??0;b>0&&h();let v=0,C=null;typeof ResizeObserver<"u"&&p.current&&(C=new ResizeObserver(()=>{const E=p.current?.offsetHeight??0;if(E!==b){if(b=E,++v>4){C?.disconnect(),C=null;return}h()}}),C.observe(p.current));const f=E=>{const k=E.target;r&&k.closest?.(r)||u.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){h();return}_===null&&(_=requestAnimationFrame(()=>{_=null,h()}))},w=E=>{p.current?.contains(E.target)||(t==="reposition"?g():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const y=()=>{a==="reposition"?g():a==="close"&&l(!1)};let A=null;const x=()=>{y(),A&&clearTimeout(A),A=setTimeout(()=>{A=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",y),window.addEventListener("orientationchange",x)),()=>{_!==null&&cancelAnimationFrame(_),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",y),window.removeEventListener("orientationchange",x)),A&&clearTimeout(A)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return ea(()=>l(!1))},[s]);const d=o.useCallback(()=>l(b=>!b),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:u,menuRef:p}}function Xy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[c,u]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[b,v]=o.useState(null),[C,f]=o.useState([]),[_,g]=o.useState(null),[w,y]=o.useState(0),A=o.useRef(0),x=o.useCallback(L=>{A.current=typeof L=="function"?L(A.current):L,y(A.current)},[]),E=o.useRef(r),k=o.useRef(s);o.useEffect(()=>{E.current=r,k.current=s},[r,s]);const D=o.useRef([]),N=()=>{D.current.forEach(clearTimeout),D.current=[]},B=(L,q)=>{D.current.push(setTimeout(q,L))};o.useEffect(()=>()=>N(),[]);const $=c[p]?.id??null,M=o.useRef(null),Y=o.useCallback(()=>{N(),m("playing"),f([]),g(null),x(0);let L=0;e.forEach((q,K)=>{B(L,()=>{h(K),v(q.id),E.current?.(q)}),B(L+1e3,()=>{v(null),f(z=>[...z,q.id])}),L+=1300}),B(L,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,x]),T=o.useCallback((L,q)=>{if(q>=L.length){m("done"),k.current?.({score:A.current,total:L.length});return}M.current=null,h(q),g(null),m("playing"),v(L[q].id),E.current?.(L[q]),B(l,()=>{v(null),m("waiting")})},[l]),R=o.useCallback(()=>{N();const L=Ia(e);u(L),x(0),f([]),T(L,0)},[e,T,x]),S=o.useCallback(()=>{t==="playback"?(u(e),Y()):R()},[t,e,Y,R]),X=o.useCallback(()=>{N(),m("idle"),v(null),f([]),g(null),h(0),x(0),u([])},[x]),ee=JSON.stringify(e.map(L=>[L.id,L.label,L.angleDeg,L.deg,L.row,L.shortcut]));o.useEffect(()=>(a?S():X(),()=>N()),[t,ee,a]);const W=o.useCallback(L=>{d!=="waiting"||t==="playback"||M.current===p||(M.current=p,g(L),L===c[p]?.id&&x(q=>q+1),t==="exam"?(m("playing"),B(400,()=>T(c,p+1))):(m("feedback"),B(i,()=>T(c,p+1))))},[d,t,c,p,T,i,x]),G=t==="playback"?e.length:c.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:_,answerId:$,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:W},index:p,total:G,score:w,phase:d,done:d==="done",start:S,reset:X}}const jo=new Map,To=new Map,Jy=()=>()=>{},Qy=()=>!0,e2=()=>!1;function Xi(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function t2(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};ha.addHook("uponSanitizeAttribute",t);try{return ha.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{ha.removeHook("uponSanitizeAttribute",t)}}function n2(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=`${t}-${i}`;l=l.replace(new RegExp(`id="${c}"`,"g"),`id="${u}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${c}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${u}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${c}"`,"g"),`$1="#${u}"`)}return l}function a2(e){const t=To.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&jo.set(e,r),r)).catch(()=>null).finally(()=>{To.delete(e)});return To.set(e,a),a}function r2(e,t=!0){const a=o.useSyncExternalStore(Jy,Qy,e2)&&t&&e?Xi(e)??jo.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Xi(e)??jo.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return a2(e).then(c=>{i&&s({src:e,enabled:t,svg:c})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function o2({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:c,titleColor:u,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[b,v]=o.useState("main"),C=vn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const y=Ao(w),A=(x,E,k)=>{if(k!==void 0)w.style.setProperty(E,k),f.current[x]=!0;else if(f.current[x]){const D=y?.[x];D?w.style.setProperty(E,D):w.style.removeProperty(E),f.current[x]=!1}};A("title","--promo-banner-bg-title",u),A("description","--promo-banner-bg-description",p)},[u,p,d]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const y=Ao(w);v(y?.actionVariant??"main")},[d]);const _=Ne("promo-banner",`promo-banner--${i}`,h),g=Wi[d];return n.jsxs("div",{ref:m,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:c??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function s2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=we.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),c=o.Children.toArray(e),u=c.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[b,v]=o.useState(!1),[C,f]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),w=o.useRef(null),y=wo(),A=d||b||C,x=u>0?Math.min(p,u-1):0;o.useEffect(()=>{if(u<2||t<=0||A||y)return;const k=window.setInterval(()=>h(D=>(Math.min(D,u-1)+1)%u),t);return()=>window.clearInterval(k)},[u,t,A,y]);const E=k=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,f(!1)},k)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const k=D=>{D.pointerType==="touch"&&(w.current&&w.current.contains(D.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]),u===0?null:n.jsxs("section",{ref:w,className:Ne("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{_.current=k.pointerType},onPointerDown:k=>{_.current=k.pointerType,k.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!0))},onPointerUp:k=>{k.pointerType==="touch"&&E(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&E(5e3)},onMouseEnter:()=>{_.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let D=!0;try{D=k.target.matches(":focus-visible")}catch{D=!0}v(D)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||v(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:c.map((k,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==x,...D!==x?{inert:!0}:{},children:k},D))})}),u>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:c.map((k,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===x?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:u,index:D+1,defaultValue:`${u}\uAC1C \uC911 ${D+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":D===x,onClick:()=>h(D)},D))})]})}function l2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:c=""}){const{t:u}=we.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${c}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),r?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(ot,{icon:a?"chevron-up":"chevron-down",label:a?u("accordion.collapse","\uC811\uAE30"):u("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function i2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),c=(u,p)=>l.id!=null&&u.id!=null?u.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((u,p)=>n.jsx(l2,{title:u.title,body:u.body,avatar:u.avatar,open:c(u,p),onToggle:()=>i(c(u,p)?{index:-1}:{index:p,id:u.id}),bodyClassName:s},u.id??p))})}function u2(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function c2(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function d2(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Sn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":c,"aria-hidden":u,className:p=""}){const{t:h}=we.useTranslation(),d=t??"check",m=a!==void 0,b=e!==void 0||m?"number":d,v=e!==void 0?void 0:m?h("badge.nthSelected",{n:a,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[d],C=u?void 0:c??v;return n.jsxs("span",{className:Ne("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":u||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?a:null),e===void 0&&!m&&d==="check"&&n.jsx(u2,{}),e===void 0&&!m&&d==="remove"&&n.jsx(c2,{}),e===void 0&&!m&&d==="minus"&&n.jsx(d2,{})]})}function Ua({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=we.useTranslation(),l=r==="small"?40:48,[i,c]=o.useState([]),u=o.useMemo(()=>{const f=[{title:null,columns:e}];let _=e;for(const g of i){const w=_?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;_=[{title:null,items:w.children}],f.push({title:w.label||null,columns:_})}return f},[e,i]),p=u[u.length-1],h=u.length-1,d=o.useCallback(()=>c(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),b=o.useRef(null),v=u.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let f=0,_=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}_++<20&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[v]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,_,g)=>{if(f){if(Array.isArray(f.children)&&f.children.length){c(w=>[...w.slice(0,h),{ci:_,ii:g}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(u.length>1||p.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[u.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((f,_)=>{const g=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:le("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:le("menu-tooltip__items"),children:(f.items||[]).map((w,y)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&y>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Sn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>C(w,_,y),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},y))})]},_)})})]})}const Ji=".content-area";function Mo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ji);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Dt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ji}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const Lo=52,xr=10,Qi=e=>e&&e>0?e:0;function eu({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:c}=we.useTranslation(),u=r==="manager"?"malgwi":"manager",p=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?c("nav.modeLabelMalgwi","\uB9D0\uADC0"):c("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,b]=o.useState(0),v=e.length;o.useEffect(()=>{const L=d.current;if(!L)return;const q=()=>{const F=typeof getComputedStyle=="function"?getComputedStyle(L):null,I=L.clientWidth-(parseFloat(F?.paddingLeft??"")||0)-(parseFloat(F?.paddingRight??"")||0),P=L.querySelector(".bottom-nav__left"),Z=P?.nextElementSibling,ue=(P?.offsetWidth??0)+(P&&Z?.classList.contains("bottom-nav__divider")?Z.offsetWidth:0);b(Math.max(0,I-ue))};if(q(),typeof ResizeObserver>"u")return;const K=new ResizeObserver(q);K.observe(L);const z=L.querySelector(".bottom-nav__left");return z&&K.observe(z),()=>K.disconnect()},[s]);const C=Lo+1,f=L=>Math.max(0,Math.floor((L+xr)/(Lo+xr))),_=v*(Lo+xr)-xr<=m,g=m<=0||l.length===0&&_?v:Math.min(v,f(m-C)),w=m>0&&g<v,y=w?g:v,A=e.slice(0,y),x=e.slice(y),E=w||l.length>0,k=o.useCallback((L,q)=>({position:"fixed",bottom:window.innerHeight-L.top+8,right:window.innerWidth-L.right,zIndex:Va(q)}),[]),D=o.useId(),{open:N,toggle:B,close:$,style:M,triggerRef:Y,menuRef:T}=qa({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),R=o.useCallback((L,q)=>q>0?c("nav.badgeLabel",{label:L,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):L,[c]),S=o.useCallback((L,q)=>q>0?c("nav.badgeInsideLabel",{label:L,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):L,[c]),X=o.useCallback(()=>s?.(u),[s,u]),ee=o.useMemo(()=>x.find(L=>!!L.key&&L.key===t)??l.find(L=>L.selected||L.key&&L.key===t),[x,t,l]),W=o.useMemo(()=>[{items:[...x.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:!!L.key&&L.key===t,closeOnSelect:!0,disabled:L.state==="disabled",onClick:()=>{L.state!=="disabled"&&(L.key&&a&&(a(L.key),Mo(i,"BottomNav")),$())}})),...l.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===t),closeOnSelect:!0,onClick:()=>{L.onClick?.(),$()}}))]}],[x,l,t,a,$]),G=[...x,...l].reduce((L,q)=>L+Qi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":c("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:X})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:A.map((L,q)=>{const K=Qi(L.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:L.icon,ariaLabel:R(L.label,K),selected:!!L.key&&L.key===t,disabled:L.state==="disabled",className:"bottom-nav-item",onClick:()=>{L.key&&(a?.(L.key),Mo(i,"BottomNav"))}}),K>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(K,99),size:24})})]},L.key??`__slot-${q}`)})}),E&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:Y,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:ee?.icon??"ellipsis",ariaLabel:S(ee?.label??c("nav.more","\uB354\uBCF4\uAE30"),G),selected:!!ee,className:"bottom-nav-item",onClick:B,"aria-expanded":N,"aria-controls":N?D:void 0}),G>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(G,99),size:24})}),N&&hn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":c("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:M,ref:T,children:n.jsx(Ua,{columns:W,onClose:$})}),document.body)]})})]})]})}function tu(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function nu(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function p2(e){const{t}=we.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:c,onFeedback:u,onAccount:p}=e||{},h="default";return s||l||i||c||u||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:c,selected:a==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:nu(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Sn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:u,selected:a==="feedback"}),p&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:a==="account"})]}):null}function au(e){const{t}=we.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:c,style:u,state:p,labelStyle:h}=e||{},d=a?.key??r??"",m=a?.label??s??"",b=a?.icon??l??"",v=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(ot,{icon:b,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=p==="disabled",_=`side-nav__item ${i?"active":""} ${p||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(w=>{if(f)return;const y=w.detail>0;if(y)try{w.currentTarget.blur()}catch{}c?.(d,w.currentTarget,y)},[f,d,c]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof m=="string"?nu(t,m,v):void 0,"aria-current":i?"page":void 0,style:u,"aria-disabled":f,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),v>0&&n.jsx(Sn,{position:"inline",number:Math.min(v,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function ru(e){const{t}=we.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:v}=e||{},C=m==="manager",f=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),_=o.useRef(null),[g,w]=o.useState(null);o.useEffect(()=>{const k=_.current;if(!k)return;let D=null;const N=()=>{const{scrollHeight:M,clientHeight:Y,scrollTop:T}=k;if(M<=Y+1){w(W=>W===null?W:null);return}const R=Math.max(24,Y/M*Y),S=Y-R,X=M-Y,ee={top:Math.round(T/X*S),height:Math.round(R)};w(W=>W&&W.top===ee.top&&W.height===ee.height?W:ee)},B=()=>{if(typeof requestAnimationFrame>"u"){N();return}D===null&&(D=requestAnimationFrame(()=>{D=null,N()}))};N(),k.addEventListener("scroll",B,{passive:!0});const $=typeof ResizeObserver<"u"?new ResizeObserver(B):null;$?.observe(k);for(const M of Array.from(k.children))$?.observe(M);return()=>{D!==null&&cancelAnimationFrame(D),k.removeEventListener("scroll",B),$?.disconnect()}},[a]);const y=o.useRef(null),A=o.useCallback(k=>{const D=_.current;D&&(k.preventDefault(),y.current={y:k.clientY,top:D.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),x=o.useCallback(k=>{const D=_.current,N=y.current;!D||!N||(D.scrollTop=N.top+(k.clientY-N.y)*(D.scrollHeight/D.clientHeight))},[]),E=o.useCallback(k=>{y.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:A,onPointerMove:x,onPointerUp:E,onPointerCancel:E})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,D)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(au,{item:k,active:!!k.key&&k.key===r,state:k.disabled?"disabled":void 0,onClick:(N,B,$)=>{if(k.disabled)return;if(k.href){if(tu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),$)try{B?.blur()}catch{}return}if(s?.(k.key),Mo(v,"SideNav"),!$)return;try{B?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const M=document.querySelector(".header");if(M){const Y=typeof M.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&Y&&M.matches(":hover"))){M.classList.add("header--force-collapsed");const T=()=>{M.classList.remove("header--force-collapsed"),M.removeEventListener("mouseenter",T)};M.addEventListener("mouseenter",T)}}}})]},k.key??`side-nav__item-${D}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(au,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(p2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d})]})}var wr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',$o='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',h2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function ou({appMode:e}){const{t}=we.useTranslation(),a=e==="manager",r=a?$o:wr,s=h2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function su({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:v}){const{t:C}=we.useTranslation(),f=vn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(M=>!M.section&&(M.key||M.label)).map(M=>({key:M.key,label:typeof M.label=="string"?M.label:void 0,icon:M.icon,state:M.disabled?"disabled":void 0,badgeCount:M.badge})),[a]),g=o.useCallback(M=>{const Y=a?.find(T=>T.key===M);if(!Y?.disabled){if(Y?.href){tu(Y.href)&&window.open(Y.href,"_blank","noopener,noreferrer");return}t?.(M)}},[a,t]),w=o.useMemo(()=>{const M=[];return i&&M.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&M.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),c&&M.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:c}),p&&M.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:p}),d&&M.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),u&&M.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:u}),M},[C,i,c,p,h,d,u,l]),y=o.useCallback((M,Y)=>({position:"fixed",top:M.bottom+8,right:Math.max(8,window.innerWidth-M.right),zIndex:Va(Y)}),[]),A=o.useId(),{open:x,toggle:E,close:k,style:D,triggerRef:N,menuRef:B}=qa({computeStyle:y,onScroll:"ignore",onResize:"reposition"}),$=o.useMemo(()=>[{items:w.map(M=>({label:M.label,icon:M.icon,badgeCount:M.badgeCount,selected:M.selected??(!!M.key&&M.key===e),closeOnSelect:!0,onClick:()=>{M.onClick?.(),k()}}))}],[w,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ou,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:N,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:c&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:E,"aria-expanded":x,"aria-controls":x?A:void 0}),!!c&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&hn.createPortal(n.jsx("div",{id:A,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:D,ref:B,children:n.jsx(Ua,{columns:$,onClose:k})}),document.body)]})]}),n.jsx(ru,{scrollContainer:v,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b}),f&&n.jsx(eu,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:v,appMode:m,onAppModeChange:b})]})}const m2=su;function ln(e){const{type:t="dot",size:a,className:r="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&Dt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&Dt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:c,children:u,variant:p="default",fill:h="filled",minWidth:d,iconLeft:m,iconRight:b,color:v}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",_=(C?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(C?"body-2":"body-2b"),g={small:12,medium:14,large:16}[f]??14,w=Ne("badge",C?"badge--bar":"",`badge--${p}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",_,r),y=v?.startsWith("--")?`var(${v})`:v,A=d!==void 0||y?{...d!==void 0?{minWidth:typeof d=="number"?`${d}px`:d}:{},...y?{"--badge-color":y}:{}}:void 0;return n.jsxs("span",{className:w,style:A,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(ot,{icon:m,size:g,className:"badge__icon"}),c??u,b&&n.jsx(ot,{icon:b,size:g,className:"badge__icon"})]})}const C2=()=>Zt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function lu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return fa(`${t.toLocaleString("ko-KR")}\uC6D0`)}return fa(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function f2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function b2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||C2()}function g2(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function iu(e){return{type:e.type??f2(e),plan:b2(e),label:e.label,price:lu(e.price),originalPrice:lu(e.originalPrice),discountLabel:e.discountLabel}}var y2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',v2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',uu='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const aa={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Ro=new WeakMap;function _2(e){if(e)return Ro.get(e)}function Rn(e,t){e&&(e.style.setProperty(aa.text,t.text),e.style.setProperty(aa.sub,t.sub),t.copyrightColor&&e.style.setProperty(aa.copyright,t.copyrightColor),Ro.set(e,t))}function Pn(e){e&&(e.style.removeProperty(aa.text),e.style.removeProperty(aa.sub),e.style.removeProperty(aa.copyright),Ro.delete(e))}const cu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function du(e={}){const t=It(cu,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${uu}")`}})]})}const pu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",ya=240;var Ga='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const x2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},w2=100,B2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function hu(e={}){const t=It(x2,Rn,Pn),a="var(--color-main)",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:B2.map(({scale:l,opacity:i},c)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*w2/ya}) translate(${-ya/2} ${-ya/2})`,opacity:i,children:n.jsx("path",{d:pu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},c))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${Ga}")`}})]})}const k2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},A2=100,N2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function E2(e={}){const t=It(k2,Rn,Pn),a="#ffffff",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:N2.map(({scale:l,opacity:i},c)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*A2/ya}) translate(${-ya/2} ${-ya/2})`,opacity:i,children:n.jsx("path",{d:pu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},c))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${uu}")`}})]})}const D2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function S2(e={}){const t=It(D2,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${Ga}")`}})]})}const j2={Logo_SpeechEar_ko:{"":wr,_mono:y2},Logo_SpeechEarManager_ko:{"":$o,_mono:v2}};function T2(e,t){if(e)return j2[e]?.[t??""]??void 0}const M2={speechear:wr,manager:$o},L2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},mu=10;function $2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function Cu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function R2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Zt.t("passCard.specialLabel");return r?n.jsx(S2,{}):s?n.jsx(E2,{}):n.jsx(hu,{})}return n.jsx(du,{})}function fu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:c=!1,state:u="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:b,logoSrc:v,label:C,price:f,originalPrice:_,discountLabel:g,onUse:w,onRefund:y,onDelete:A}){const{t:x}=we.useTranslation(),E=t?iu(t):void 0,k=s??E?.type??"speechear",D=r??E?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),N=C??E?.label,B=f??(a?E?.price:void 0),$=_??(a?E?.originalPrice:void 0),M=g??E?.discountLabel,Y=o.useMemo(()=>{if(B)return null;const O=t?.durationDays??g2(t?.code);if(!O||O<=0)return i!=null?{percent:null,remainingLabel:Cu(i,x)}:null;const H=O*86400;let re;if(i!=null)re=i;else if((u==="active"||u==="expired")&&l){const ie=new Date(l).getTime();if(Number.isNaN(ie))return null;const Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Le=/^(\d{4})-(\d{2})-(\d{2})/.exec(za()),Re=Math.round(Be&&Le?(Date.UTC(+Be[1],+Be[2]-1,+Be[3])-Date.UTC(+Le[1],+Le[2]-1,+Le[3]))/864e5:(ie-Date.now())/864e5);re=Math.max(0,c?Re+1:Re)*86400}else u==="expired"?re=0:re=H;const _e=$2(re),te=Math.max(0,Math.min(100,Math.floor(Math.min(_e,H)/H*100)));return u==="pending"&&te>=100?null:{percent:te,remainingLabel:u==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):Cu(re,x)}},[B,u,l,i,c,t?.durationDays,t?.code,x]),T=o.useRef(null),[R,S]=o.useState({}),[X,ee]=o.useState(null),W=!!(w||y||A),G=o.useRef(!1),L=o.useRef(void 0),[q,K]=o.useState(v);o.useLayoutEffect(()=>{K(v)},[v]),o.useLayoutEffect(()=>{const O=T.current;O&&(d!==void 0&&O.style.setProperty("--pass-card-text",d),m!==void 0&&O.style.setProperty("--pass-card-sub",m),b!==void 0&&O.style.setProperty("--pass-card-copyright",b))},[d,m,b]),o.useLayoutEffect(()=>{const O=T.current;if(!O)return;const H=_2(O);if(!v){const re=L2[k],_e=u==="expired"?"_mono":H?.logoColor??"",te=T2(re,_e);K(te)}},[p,v,k,u]);const z=O=>{const H=T.current;if(!H)return null;const{left:re,top:_e,width:te,height:ie}=H.getBoundingClientRect(),Be=(O.clientX-re)/te-.5;return{rotateX:-((O.clientY-_e)/ie-.5)*mu,rotateY:Be*mu}},F=(O,H)=>{const re=H*-.7,_e=O*.7+10,te=20+(Math.abs(O)+Math.abs(H))*.4;return`${re}px ${_e}px ${te}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(O=>{if(ta())return;G.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{G.current=!1},200);const H=z(O);H&&S({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:F(H.rotateX,H.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),P=o.useCallback(O=>{if(ta())return;const H=z(O);if(!H)return;const re=G.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";S({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:F(H.rotateX,H.rotateY),transition:re})},[]),Z=o.useCallback(()=>{clearTimeout(L.current),G.current=!1,S({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ue=o.useCallback(()=>ee(null),[]),U=o.useMemo(()=>{const O=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),H=D.replace("\uC774\uC6A9\uAD8C","").replace(O==="\uC774\uC6A9\uAD8C"?"":O,"").trim(),re=H.match(/^(.*?)(일|년)$/);return re?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:re[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:re[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:H})},[D,x]),pe=o.useMemo(()=>{const O=fa(B);if(!O)return null;const H=O.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!H)return n.jsx("span",{className:"h1",children:O});const[,re,_e,te]=H;return n.jsxs(n.Fragment,{children:[re&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:re}),n.jsx("span",{className:"h1 pass-card__price-amount",children:_e}),te.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:te.trim()})]})},[B]),ae=o.useCallback(()=>{W&&ee(O=>{if(O)return null;const H=T.current?.getBoundingClientRect();if(!H)return null;const re=50;return{left:H.left,right:H.right,width:H.width,height:H.height,x:H.x,y:H.y+re,top:H.top+re,bottom:H.bottom+re}})},[W]),V=o.useCallback(O=>{W&&(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),ae())},[W,ae]),se=[{items:[...w?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),ee(null)},closeOnSelect:!0}]:[],...y?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{y(),ee(null)},closeOnSelect:!0}]:[],...A?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{A(),ee(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:T,className:`pass-card pass-card--${u}${W?" pass-card--clickable":""}`,style:R,onMouseEnter:I,onMouseMove:P,onMouseLeave:Z,onPointerUp:O=>{O.pointerType==="touch"&&Z()},onPointerCancel:O=>{O.pointerType==="touch"&&Z()},onClick:ae,onKeyDown:W?V:void 0,role:W?"button":void 0,tabIndex:W?0:void 0,"aria-label":e,"aria-haspopup":W?"menu":void 0,"aria-expanded":W?!!X:void 0,children:[p??R2(k,D,N),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:q??M2[k],className:"pass-card__logo",alt:k==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:U}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:N?x("passCard.labeledPlan",{label:N}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),B?n.jsxs("div",{className:"pass-card__price-area",children:[M&&n.jsx("span",{className:"pass-card__discount body-3",children:M}),n.jsxs("div",{className:"pass-card__price",children:[$&&n.jsx("span",{className:"pass-card__price-original body-3",children:fa($)}),pe]})]}):Y?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:Y.remainingLabel}),Y.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:Y.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),X&&n.jsx(Bn,{anchorRect:X,onClose:ue,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ua,{columns:se,onClose:ue,size:"small"})})]})}const P2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function F2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=It(P2,Rn,Pn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${Ga}")`}})]})}const I2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function O2(e={}){const t=It(I2,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${Ga}")`}})]})}function z2(e,t){if(e){if(t==="manager_pro")return n.jsx(O2,{});if(t==="manager_standard")return n.jsx(F2,{});if(t==="manager_lite")return n.jsx(hu,{})}}function W2(e){const t=fa(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function H2(e){const{t}=we.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:c}=e||{},u=y=>!!y&&!!c?.includes(y),p=y=>y.onceOnly??/오픈\s*특가/.test(y.label??""),h=(s.tiers||[]).some(y=>p(y)&&u(y.code)),d=y=>{const A=y.prices?y.prices[i]:y.price;return A?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===A):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),v=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=y=>y.prices?y.prices[i]:y.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const A=C(y);return A==="\uBB34\uB8CC"||A===b||A==="0\uC6D0"||typeof A=="string"&&/\d/.test(A)&&!/[1-9]/.test(A)}),_=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const A=C(y);return A==="\uBB38\uC758"||A===v}),g=s.group==="org",w=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(ln,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:m},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((y,A)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),y]},A))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((y,A)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),y]},A))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:_?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(y=>{const A=y.label||a,x=p(y),E=x||y.openPromo===!0,k=A.replace(/^오픈\s*특가\s*/,"")||a,D=y.prices?y.prices[i]:y.price,N=y.badge?E?`${r}
823
- ${y.badge}`:y.badge:void 0;if(x&&u(y.code))return null;if(!y.badge&&!h)return d(y)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${y.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:y.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:W2(D)})})]},y.id);const B=s.tier??(g?s.title:void 0),$=n.jsx(fu,{showPrice:!0,product:{type:w,code:y.code,name:k,label:B,price:D,originalPrice:y.originals?.[i]??void 0,discountLabel:N},bg:z2(g,s.id)}),M=()=>l?.({...y,productId:s.id,productTitle:s.title,preview:$});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:M,onKeyDown:l?Y=>{Y.target===Y.currentTarget&&(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),M())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:$},y.id)})})})})]})}function V2({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Po='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const bu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function q2(){const e=It(bu,Rn,Pn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Po}")`}})})}const gu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function U2(e={}){const t=It(gu,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${Ga}")`}})]})}function yu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:Ne("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const Ka=(e,t,a)=>e+(t-e)*a;function G2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:c=!1,pulseSelected:u=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:b=40,showIcon:v=!0,onCenterClick:C,centerLabel:f,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:w="top-right",shortcutScale:y,scaleShortcut:A=!1}){const{t:x}=we.useTranslation(),E=Math.max(0,Math.min(1,a)),k=t/2,D=110/300,N=.18,B=O=>t*(D+(O-1)*N),$=O=>{const H=B(O.row??1),re=O.angleDeg*Math.PI/180;return{x:k+H*Math.cos(re),y:k+H*Math.sin(re)}},M=Math.max(...e.map(O=>O.row??1),1),Y=t*.08,T=t*.1,R=t*.24,S=t-2*Y,X=t-T-R,ee=t-R/2,W=o.useMemo(()=>[...new Set(e.map(O=>O.deg))].sort((O,H)=>O-H),[e]),G=W.length,L=Math.max(68,G>1?S/(G-1):0),q=o.useMemo(()=>new Map(W.map((O,H)=>[O,H])),[W]),K=O=>{const H=q.get(O.deg)??0,re=k+(H-(G-1)/2)*L,_e=M>1?Math.min(68,X/(M-1)):0,te=_e*(M-1),ie=T+(X-te)/2,Be=M===1?T+X*.4:ie+(M-(O.row??1))*_e;return{x:re,y:Be}},z=O=>{const H=$(O),re=K(O);return{x:Ka(H.x,re.x,E),y:Ka(H.y,re.y,E)}},F={x:k,y:Ka(k,ee,E)},I=Math.round(b*1.2),P=Math.round(Math.max(16,Math.min(80,b*.7))),Z=[],ue=new Map;for(const O of e){const H=O.row??1;ue.has(H)||ue.set(H,[]),ue.get(H).push(O)}for(const[O,H]of ue.entries()){if(H.length<2)continue;const re=[...H].sort((ze,Ct)=>ze.deg-Ct.deg),_e=re.map(ze=>z(ze)),te=re.map(ze=>ze.deg),ie=te[te.length-1]-te[0],Be=ie/(te.length-1),Le=360-ie,Re=re.length>=3&&Be>0&&Le<=Be*1.5,he=Math.round(B(O)*1e3)/1e3,ge=(ze,Ct,ut,nt)=>{const ct=(Ct.angleDeg-ze.angleDeg+540)%360-180;if(ct===0)return`L ${nt.x} ${nt.y}`;if(E===0)return`A ${he} ${he} 0 0 ${ct>0?1:0} ${nt.x} ${nt.y}`;const Ae=(ze.angleDeg+ct/2)*Math.PI/180,Ue={x:k+he*Math.cos(Ae),y:k+he*Math.sin(Ae)},ke={x:(ut.x+nt.x)/2,y:(ut.y+nt.y)/2},Ye={x:Ka(Ue.x,ke.x,E),y:Ka(Ue.y,ke.y,E)},et={x:2*Ye.x-ke.x,y:2*Ye.y-ke.y};return`Q ${et.x} ${et.y} ${nt.x} ${nt.y}`},Ee=Re?[...re,re[0]]:re,ve=Re?[..._e,_e[0]]:_e;let Fe=`M ${ve[0].x} ${ve[0].y}`;for(let ze=1;ze<ve.length;ze++)Fe+=" "+ge(Ee[ze-1],Ee[ze],ve[ze-1],ve[ze]);Z.push({key:`arc-${O}`,d:Fe})}const U=o.useMemo(()=>new Set(s??[]),[s]),pe=O=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[O],ae=O=>{if(r===O.id)return"active";if(c){if(O.id===i)return"correct";if(O.id===l&&l!==i)return"wrong"}return U.has(O.id)?"played":"idle"},V=O=>r===O.id?"loop":c?O.id===i?"loop":null:u&&O.id===l?"once":null,se=(O,H)=>{switch(O){case"played":case"correct":return n.jsx(Vs,{size:H});case"wrong":return n.jsx(el,{size:H});default:return n.jsx(Qs,{size:H})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[E===0&&e.map(O=>{const{x:H,y:re}=z(O);return n.jsx("line",{x1:F.x,y1:F.y,x2:H,y2:re,stroke:"#dde3ec",strokeWidth:"1"},O.id)}),Z.map(O=>n.jsx("path",{d:O.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},O.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:F.x-I/2,top:F.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:F.x,top:F.y},"aria-label":f,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:C,children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:F.x,top:F.y},children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}),e.map((O,H)=>{const{x:re,y:_e}=z(O),te=ae(O),ie=V(O),Be={...y!==void 0||A?{"--shortcut-badge-scale":String(y??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:te!=="idle"?10:1},Le=b,Re=Math.round(Math.max(10,Math.min(56,Le*.38))),he=Math.round(Math.max(7,Math.min(18,Le*.2))),ge=Math.round(Math.max(10,Math.min(56,Le*.4))),Ee=v==="answered"&&(te==="played"||te==="correct"||te==="wrong"),ve=v===!0||Ee,Fe=!Ee;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:re-Le/2,top:_e-Le/2},children:[ie&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${te}`+(ie==="once"?" sound-compass__pulse--once":""),style:{width:Le,height:Le,...ie==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(O.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${te}`,style:{width:Le,height:Le},"aria-label":pe(te)?`${O.label}, ${pe(te)}`:O.label,"aria-pressed":l!=null?O.id===l:void 0,children:[ve&&se(te,Re),Fe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?he:ge},children:H+1})]}),O.shortcut&&n.jsx(yu,{keys:O.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},O.id)})]})})}function K2({orientation:e="horizontal",label:t,className:a=""}){const r=Ne("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function vu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const c=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:c,children:[n.jsx("input",{id:c,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:u=>t?.(u.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function Y2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:c}){const u=o.useId(),p=r??`radio-group-${u}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":c,children:e.map(h=>n.jsx(vu,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&a?.(h.value)}},h.value))})}const Z2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function X2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:c=""}){const{t:u}=we.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const g=d.current;g&&g.contains(document.activeElement)&&fr(g),h(!0),l?.()},[l]);if(p)return null;const b=Ne("alert",`alert--${e}`,c),v=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=v==="assertive"?"alert":v==="polite"?"status":void 0,f=!!t,_=!!(a||r);return n.jsxs("div",{ref:d,className:b,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(ot,{icon:Z2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const J2={ready:"search",guide:"info",error:"circle-alert"};function Q2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const c=e.indexOf(i,s);c<0||(c>s&&r.push(e.slice(s,c)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=c+i.length)}return s<e.length&&r.push(e.slice(s)),r}function ev({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??J2[e],c=Ne("search-summary",`search-summary--${e}`,l),u=t??a,p=typeof u=="string"&&r&&r.length>0?Q2(u,r):u;return n.jsxs("div",{className:c,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(ot,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function Ya({title:e,items:t}){const{t:a}=we.useTranslation(),{anchorRect:r,openAt:s,close:l}=_r(),i=o.useRef(null),c=gr(!!r,(u,p)=>{u&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:u=>{Gn(u)||s(u.currentTarget)},onPointerLeave:u=>{Gn(u)||l()},onClick:u=>{c.touchPress(u.currentTarget)},onFocus:u=>{ta()||s(u.currentTarget)},onBlur:l}),r&&n.jsx(Un,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}const Lt=40,ra=32;function tv({items:e=[],value:t,onChange:a,className:r="",size:s=Lt}){const l=o.useId(),{t:i}=we.useTranslation(),c=o.useRef(null),u=e.find(C=>!C.disabled)?.key,p=e.some(C=>C.key===t)?t:u??e[0]?.key,h=e.find(C=>C.key===p&&!C.disabled)?.key??u,d=()=>Array.from(c.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=d())=>{if(f.length===0)return;const _=(C%f.length+f.length)%f.length;f[_]?.focus(),f[_]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=d(),_=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(_+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(_-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},v=e.find(C=>C.key===p);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:c,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===p,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===p?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:b,children:C.label},C.key))}),v&&n.jsx("div",{id:`tabs__panel-${l}-${v.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${v.key}`,tabIndex:0,className:"tabs__panel",children:v.panel},v.key)]})}const nv={xs:12,sm:16,md:20,lg:28,xl:36};function av(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function rv({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=we.useTranslation(),[i,c]=o.useState(null),u=!!e&&i===e,p=t?av(t):"",h=!!e&&!u,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>c(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(ot,{icon:"user-round",size:nv[a],className:"avatar__icon"})]})}function ov(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function sv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:c=""}){const{t:u}=we.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,b]=o.useState([]),v=l??m,C=x=>{if(!x||x.length===0)return;const E=Array.from(x).filter(D=>ov(D,t));if(E.length===0)return;const k=a?E:E.slice(0,1);if(l===void 0){const D=a?[...v,...k]:k;b(D),e?.(D)}else e?.(k)},f=x=>{x.preventDefault(),!r&&d(!0)},_=x=>{x.preventDefault(),d(!1)},g=x=>{x.preventDefault(),d(!1),!r&&C(x.dataTransfer.files)},w=x=>{const E=x.target;try{C(E.files)}finally{E.value=""}},y=()=>{r||p.current?.click()},A=x=>{if(!r&&(i?.(x),l===void 0)){const E=v.filter((k,D)=>D!==x);b(E),i||e?.(E)}};return n.jsxs("div",{className:`file-upload ${c}`.trim(),children:[n.jsxs("div",{className:Ne("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:y,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),y())},onDragOver:f,onDragLeave:_,onDrop:g,children:[n.jsx(ot,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:u("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:x=>{x.stopPropagation(),y()},children:u("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:w,tabIndex:-1})]}),s&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((x,E)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":u("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>A(E),children:n.jsx(ot,{icon:"x",size:14})})]},`${x.name}-${E}`))})]})}function lv({items:e,className:t=""}){const{t:a}=we.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(ot,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const iv={small:14,medium:20,large:28};function uv({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:c}=we.useTranslation(),u=r||!t,[p,h]=o.useState(null),d=u?e:Number.isFinite(e)?Math.round(e):0,m=p??d,b=iv[s],v=x=>{x!==e&&t?.(x)},C=x=>{u||v(x)},f=x=>{u||ta()||h(x)},_=o.useRef(null),g=x=>{const E=Math.min(a,Math.max(1,x));v(E),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(E))?.focus()},w=x=>{if(!u){switch(x.key){case"ArrowRight":case"ArrowUp":g((d||0)+1);break;case"ArrowLeft":case"ArrowDown":g((d||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}x.preventDefault()}},y=d>=1&&d<=a?Math.round(d):1,A=()=>{u||h(null)};return n.jsx("div",{className:`rating rating--${s}${u?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:w,role:u?"img":"radiogroup","aria-label":u?c("rating.valueLabel",{value:e,max:a}):l??c("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:A,onPointerUp:x=>{x.pointerType==="touch"&&A()},onPointerCancel:x=>{x.pointerType==="touch"&&A()},children:Array.from({length:a},(x,E)=>{const k=E+1,D=Math.max(0,Math.min(1,m-E)),N=D>0&&D<1,B=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(ot,{icon:"star",size:b,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${N?" rating__star-fill--half":""}`,style:N?{width:`${D*100}%`}:void 0,children:n.jsx(ot,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return u?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:B},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":c("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===y?0:-1,onClick:()=>C(k),onMouseEnter:()=>f(k),children:B},k)})})}const cv=20,dv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function pv({value:e,onChange:t,palette:a=dv,size:r=Lt,className:s="",ariaLabel:l}){const{t:i}=we.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(c=>{const u=e?.toLowerCase()===c.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:c},onClick:()=>t(c),"aria-pressed":u,"aria-label":u?`${c} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:c,children:u&&n.jsx(ot,{icon:"check",size:cv,className:"color-picker__check"})},c)})})}function _u({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:c="medium"}){const{t:u}=we.useTranslation(),p=c==="small",h=Ne("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[b,v]=o.useState(!1),C=o.useMemo(()=>{const k=r&&typeof r=="object"?{...r}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,_=i&&!!f,[g,w]=o.useState(null);o.useLayoutEffect(()=>{b&&w(m.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{v(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const k=D=>{const N=m.current;if(!N)return;const B=D.target;B&&!N.contains(B)&&v(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[b]);const y=o.useCallback(()=>{i&&v(!0)},[i]),A=o.useCallback(()=>{i&&v(!1)},[i]),x=o.useCallback(()=>v(!1),[]),E=o.useCallback(k=>{if(k.key==="Escape"){v(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),v(D=>!D))},[]);return n.jsxs("span",{ref:m,className:Ne("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:y,onPointerLeave:A,onFocus:y,onBlur:A,onKeyDown:E,role:"button",tabIndex:0,"aria-label":typeof f=="string"?u("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(ot,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:d}),b&&f&&n.jsx(Ln,{anchorRect:g,text:typeof f=="string"?f:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Kn=null;function Za(e){if(Kn&&Kn!==e)try{Kn()}catch{}return Kn=e,()=>{Kn===e&&(Kn=null)}}function Br(e){if(Kn===e){Kn=null;try{e()}catch{}}}function Xa(e,t){let a=()=>{};const r=new Promise(c=>{a=c});if(typeof e!="string"||e.trim()===""){Dt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=c=>{if(!s){s=!0;try{t?.(c)}catch{}a(c)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function hv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(c=>c?.contextCode||c?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],c=Array.isArray(i)&&i.length>0?r(i):[];return c.length===0&&(a.contextCode||a.context_code)&&c.push(String(a.contextCode||a.context_code)),{previewCodes:c,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],c=Array.isArray(i)&&i.length>0?r(i):[];return c.length===0&&(a.contextCode||a.context_code)&&c.push(String(a.contextCode||a.context_code)),{previewCodes:c,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],c=Array.isArray(i)&&i.length>0?r(i):[];return c.length===0&&(a.contextCode||a.context_code)&&c.push(String(a.contextCode||a.context_code)),{previewCodes:c,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],c=Array.isArray(i)&&i.length>0?r(i):[];return c.length===0&&(a.contextCode||a.context_code)&&c.push(String(a.contextCode||a.context_code)),{previewCodes:c,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function mv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,c]=o.useState({key:"",urls:[]}),u=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,b]=o.useState(!1),v=o.useRef([]),{previewCodes:C,previewBucket:f}=hv(e,t),_=`${C.join(",")}|${f??""}`,g=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!C.length)return;let y=!1;return(async()=>{const A=[],x=[];for(const E of C)try{const k=Nl(E,f);if(!k){A.push("");continue}let D=null;try{D=await El(k)}catch{}if(!D)try{const N=await Dl(k);N&&(D=URL.createObjectURL(N),x.push(D))}catch{}A.push(D??"")}catch{A.push("")}y?x.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}):(v.current.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}),v.current=x,c({key:_,urls:A}))})(),()=>{y=!0}},[C.join(","),f]),o.useEffect(()=>()=>{v.current.forEach(y=>{try{URL.revokeObjectURL(y)}catch{}}),v.current=[]},[]);const w=o.useCallback(async y=>{if(y.stopPropagation(),y.preventDefault(),p.current){h.current&&Br(h.current),p.current=!1;try{u.current?.pause()}catch{}r(!1),l(-1);return}if(!g.filter(Boolean).length)return;let A=null;const x=()=>{p.current=!1,A?.stop()};h.current=x;const E=Za(x);p.current=!0,r(!0);for(let k=0;k<g.length&&p.current;k++){const D=g[k];if(D&&(l(k),A=Xa(D),u.current=A.el,!await A.done))break}E(),h.current===x&&(h.current=null,p.current=!1,r(!1),l(-1))},[g]);return o.useEffect(()=>()=>{h.current&&Br(h.current),p.current=!1;try{u.current?.pause()}catch{}u.current=null},[]),{playing:a,playingIndex:s,previewUrls:g,previewHover:m,setPreviewHover:b,previewBtnRef:d,handlePreview:w}}const Cv=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Fo(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:c,completedIds:u,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:b=!1,showTypeLabel:v=!1,onComplete:C,onSelect:f,onMore:_,countLabelOverride:g,size:w="square"}=e||{},{t:y}=we.useTranslation(),[A,x]=o.useState(!1),E=o.useRef(null),[k,D]=o.useState(!1);o.useEffect(()=>{E.current?.matches(":hover")&&D(!0)},[]);const{playing:N,playingIndex:B,previewUrls:$,previewHover:M,setPreviewHover:Y,previewBtnRef:T,handlePreview:R}=mv(r,a?.key),S=o.useCallback(()=>{f?f():x(!0)},[f]),X=o.useCallback(()=>x(!1),[]),ee=o.useCallback(()=>D(!0),[]),W=o.useCallback(()=>D(!1),[]),G=o.useCallback(()=>Y(!0),[Y]),L=o.useCallback(()=>Y(!1),[Y]),[q,K]=o.useState(null);o.useLayoutEffect(()=>{M&&K(T.current?.getBoundingClientRect()??null)},[M,T]);const[z,F]=o.useState(null);o.useLayoutEffect(()=>{k&&!A&&d&&F(E.current?.getBoundingClientRect()??null)},[k,A,d]);const I=o.useCallback(ke=>{ke.target===ke.currentTarget&&(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),S())},[S]),P=r||null,Z=o.useMemo(()=>{if(!d)return null;const ke=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ye=ke&&ke.length>0?ke:Cv(P);return Ye&&Ye.length>0?Ye:null},[d,h,P]),ue=o.useCallback(ke=>{ke.stopPropagation(),m?.()},[m]),U=o.useCallback(ke=>ke.stopPropagation(),[]),pe=o.useCallback(ke=>{typeof C=="function"&&C(ke)},[C]),ae=c||(u&&r?.id!=null?u.has(String(r.id)):!1),V=!ae&&(p!=null&&r?.id!=null?p.has(String(r.id)):!1);Vi("speechear.popup.close",X);const se=ei(),O=`${a?.label||""} ${t+1}`,H=P?.title||P?.name||O;let re=a?.icon,_e,te="",ie="";try{const ke=P?.category_0||P?.category_main_code||P?.category_main,Ye=P?.category_1||P?.category_sub_code||P?.category_sub,et=se.find(ft=>ft.key===ke);et?.icon&&(re=et.icon),!_e&&et?.color&&(_e={"--t-item-fg":et.color}),!_e&&P?.iconColor&&(_e={"--t-item-fg":P.iconColor}),te=et?y(`topic.${et.key}`,{defaultValue:et.label||""}):"";try{const ft=et?.subs?.find(vt=>vt.key===Ye);ie=ft?y(`topic.sub.${ft.key}`,{defaultValue:ft.label||""}):""}catch{}}catch{}const Be=ie?`${te} / ${ie}`:te||a?.label||H,Le=ke=>y("training.countQuestions",{n:ke,count:ke}),Re=ke=>y("training.countSentences",{n:ke,count:ke});let he="";try{if(P)if(a?.key==="LISTEN_IN_NOISE"){let ke=0;Array.isArray(P.items)&&P.items.length>0?ke=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0?ke=P.sentences.length:P.sentences&&(ke=1),he=Re(ke)}else if(a?.key==="SHORT_STORY"){let ke=1;Array.isArray(r?.items)?ke=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?ke=r.raw.items.length:Array.isArray(P?.questions)?ke=P.questions.length:Array.isArray(P?.sentences)&&(ke=P.sentences.length),he=Le(ke)}else if(a?.key==="LONG_STORY"){let ke=1;if(Array.isArray(P.items)&&P.items.length>0){const Ye=P.items.reduce((et,ft)=>{const vt=ft.questionItems;return Array.isArray(vt)?et+vt.length:Array.isArray(ft.questions)?et+ft.questions.length:et},0);ke=Ye>0?Ye:P.items.length}else Array.isArray(P.questions)&&P.questions.length>0?ke=P.questions.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(ke=P.sentences.length);he=Le(ke)}else if(a?.key==="ORDERING_SENTENCE"){let ke=1;Array.isArray(P.items)&&P.items.length>0?ke=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(ke=P.sentences.length),he=Re(ke)}else Array.isArray(P.items)&&(he=P.items.length>0?Le(P.items.length):"")}catch{}const ge=w==="row",Ee=w==="list"||ge,ve=w==="compact",Fe=w==="small",ze=Fe&&a?.key?Jf().find(ke=>ke.key===a.key):void 0,Ct=ze?ti[ze.key]:void 0,ut=ze?Ct?y(`trainingType.${Ct}.title`,{defaultValue:ze.label}):ze.label??"":"",nt=v&&a?.label&&a.label!==String(H)?String(a.label):Fe&&ut&&ut!==String(H)?ut:"",ct=!!nt,Ae=g!==void 0?g:he,Ue=[nt,typeof H=="string"?H:"",Ae].map(ke=>String(ke??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:E,className:`training-block-button${Ee?" training-block-button--list":""}${ge?" training-block-button--row":""}${ve?" training-block-button--compact":""}${Fe?" training-block-button--small":""}${ae?" training-block-button--completed":""}${V?" training-block-button--selected":""}${ct&&!Fe?" training-block-button--withType":""}${Fe&&!ct?" training-block-button--no-type-label":""}`,onClick:S,onPointerEnter:ee,onPointerLeave:W,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ue||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
- `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&a?.label&&a.label!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Fe&&ut&&ut!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ut}),n.jsx(_u,{icon:re,label:H,tooltip:Be,wrapperStyle:_e,iconSize:Fe||ve?"small":"medium"}),!b&&(ae||V)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":ae?y("training.completed","\uD6C8\uB828 \uC644\uB8CC"):y("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":y("common.remove","\uC81C\uAC70"),onClick:ue}),n.jsx("div",{className:`training-block-button__title ${ve?"body-3":Fe?"body-3b":"h3"}`,children:String(H)}),n.jsxs("div",{className:"training-block-button__description",children:[Ae?n.jsx("div",{className:`training-block-button__count ${Fe?"caption-2":"caption-1"}`,children:Ae}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(ot,{icon:"chevron-right",label:y("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:Fe?12:20})})]}),(Ee&&!ge||Fe)&&$.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:U,onPointerEnter:G,onPointerLeave:L,children:n.jsx(fe,{htmlType:"button",size:Fe?28:32,type:"dot",icon:N?"pause":"play",variant:Fe?"transparent-lightGray":"default",useBorder:!1,selected:N,ariaLabel:String(H).trim()?N?y("training.stopFor",{name:H,defaultValue:`${H} \uC815\uC9C0`}):y("training.previewFor",{name:H,defaultValue:`${H} \uBBF8\uB9AC \uB4E3\uAE30`}):N?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:R})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ke=>{ke.stopPropagation(),_(ke)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(H).trim()?y("common.moreFor",{name:H}):y("common.more","\uB354\uBCF4\uAE30")})})]}),M&&n.jsx(Ln,{anchorRect:q,text:N?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:L}),k&&!A&&d&&(Z?n.jsx(Un,{anchorRect:z,items:Z,activeIndex:B,onClose:W}):P?.subTitle?n.jsx(Ln,{anchorRect:z,text:P.subTitle,offset:8,onClose:W}):null),A&&i&&i({trainingData:P,typeKey:a?.key??"",onClose:X,onComplete:pe,popupTitle:String(H),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:re,popupIconTooltip:String(Be),popupWrapperStyle:_e})]})}const xu=200;function fv(e){return e.itemId?(ab()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function wu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=we.useTranslation(),i=o.useMemo(()=>t?t.map((u,p)=>({key:u.key??u.type?.key??String(p),label:u.label,type:u.type,data:u.items??[]})).filter(u=>u.data.length>0):ob(l).map(u=>{const p=(e?.items??[]).filter(h=>h.trainingType===u.key);return{key:u.key,label:u.label,type:u,pickedCount:p.length,data:p.map(fv).filter(h=>h!=null)}}).filter(u=>u.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const c=n.jsx("div",{className:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:u,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${u}`):null,n.jsxs("div",{className:le("training-tooltip__section"),children:[n.jsx("div",{className:le("training-tooltip__section-header"),children:n.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:le("training-tooltip__items"),children:d.map((b,v)=>n.jsx(Fo,{index:v,type:h,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??v)))})]},u)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:c}):c}const bv=200;function gv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:c,onMouseEnter:u,onMouseLeave:p}){const h=!!c||!!u||s&&!!r,d=Ne("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",c&&"count-tile--clickable",i),m=o.useRef(null),[b,v]=o.useState(null),C=o.useRef(null),f=o.useRef(null),_=!!(b&&r&&s),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{g(),v(null)},[g]),y=o.useCallback(()=>{!s||!r||(g(),C.current=setTimeout(()=>{C.current=null,v(m.current?.getBoundingClientRect()??null)},xu))},[s,r,g]),A=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,v(null)},bv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!_)return;const x=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),E=k=>{x(k.target)?g():A()};return document.addEventListener("pointerover",E,!0),()=>document.removeEventListener("pointerover",E,!0)},[_,g,A]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:c?x=>{w(),c(x)}:void 0,onKeyDown:c?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?w():y()},onMouseEnter:u,onMouseLeave:x=>{A(),p?.(x)},role:c?"button":"img",tabIndex:c?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(ot,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(wu,{plan:r,anchorRect:b,onClose:w})]})}let Ja=0,Bu="",Io="",Qa=0;function ku(){return Au(!1)}function yv(){return Au(!0)}function Au(e){const t=typeof document<"u";Ja===0&&t&&(Bu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Qa===0&&(Io=document.body.style.paddingRight),Qa++,document.body.style.paddingRight="0px"),Ja++;let a=!1;return()=>{a||(a=!0,Ja=Math.max(0,Ja-1),e&&t&&(Qa=Math.max(0,Qa-1),Qa===0&&(Io?document.body.style.paddingRight=Io:document.body.style.removeProperty("padding-right"))),Ja===0&&t&&(document.body.style.overflow=Bu))}}function vv(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function _v({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:c=!0,showClose:u=!0,className:p,contentClassName:h}){const{t:d}=we.useTranslation(),m=o.useId(),b=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,w=ku(),y=b.current;return _o(y,g),y?.focus(),()=>{w();const A=document.activeElement;(!A||A===document.body||y&&y.contains(A))&&xo(g)?.focus?.()}},[e]);const C=o.useRef(v),f=o.useRef(c);o.useEffect(()=>{C.current=v,f.current=c}),o.useEffect(()=>{if(e)return ea(()=>{f.current&&C.current()})},[e]);const _=o.useRef(!1);return yo(b,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:Ne("dialog",p),onPointerDown:i?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const w=_.current;_.current=!1,w&&g.target===g.currentTarget&&v()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:Ne("dialog__surface",`dialog__surface--${l}`,h),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,u?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:v,children:n.jsx(vv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function xv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:c,className:u=""}){const{t:p}=we.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:Ne("board",u),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[c?n.jsx("caption",{className:"board__caption",children:c}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:Ne("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:Ne("board__td",`board__cell--${b.align??"left"}`),children:b.render(d,m)},b.key))},a(d,m)))})]})]})}function wv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:Ne("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(c=>n.jsx("li",{children:c},c))}):null]})}function Bv({groups:e,className:t=""}){return n.jsx("div",{className:Ne("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function kv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:c=""}){const u=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:Ne("publication-card",c),style:i?{width:i,flexShrink:0}:void 0,children:[u?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:u}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function Av({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Wa(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function Nv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const c=s===1?"h1":"h2";return n.jsxs("div",{className:Ne("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(c,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function Ev({items:e,className:t=""}){return n.jsx("ul",{className:Ne("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}const er=new Map;function _n(e){const{t}=we.useTranslation(),{options:a=[],value:r=a.find(y=>!y.disabled)?.key??a[0]?.key,onChange:s=y=>{},className:l="",size:i=Lt,shape:c="pill",useBG:u=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=o.useRef(null),b=a.filter(y=>!y.disabled),v=o.useId(),C=a.map(y=>y.key).join("\xB7");o.useEffect(()=>{if(!(!Wn||d!=null&&d!=="")){if(er.set(v,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),er.size>1){const y=[...er.values()].sort();Dt(`segmented-control-unnamed:${y.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${er.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${y.join(" / ")}`)}return()=>{er.delete(v)}}},[d,C,v]);const f=y=>{if(!b.length)return;const A=Math.max(0,b.findIndex(E=>E.key===r)),x=y==="first"?b[0]:y==="last"?b[b.length-1]:b[(A+y+b.length)%b.length];x&&(s(x.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===x.key)?.focus())},_=y=>{switch(y.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}y.preventDefault()},g=y=>{const A=x=>typeof x=="string"||typeof x=="number";if(!(!A(y.label)||y.count==null||y.count===!1||!A(y.count)))return`${y.label}, ${y.count}`},w=b.some(y=>y.key===r)?r:b[0]?.key;return n.jsx("div",{ref:m,onKeyDown:_,className:Ne("segmented-control",`segmented-control--${c}`,`segmented-control--${i}`,p&&"segmented-control--full",!u&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(y=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":y.key===r,"data-segkey":y.key,tabIndex:y.key===w?0:-1,label:y.label,count:y.count,ariaLabel:g(y),disabled:y.disabled,className:y.key===r?"is-selected":"",onClick:()=>{y.disabled||s(y.key)},size:i,shape:c,useBorder:!1,useBG:!1},y.key))})}const Dv=260;function Fn(e){const{t}=we.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:c,footer:u,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:b="",footerLayout:v="center",onClose:C,closeDisabled:f=!1,beforeClose:_,closeOnBackdrop:g=!0,className:w="",ariaLabel:y,useTitle:A=!0,inline:x=!1,size:E,layer:k="modal",height:D,fillBody:N=!1,resetScrollKey:B}=e||{},[$,M]=o.useState(!1),Y=o.useRef(!1),T=o.useRef(null),R=o.useId(),S=o.useRef(null);o.useEffect(()=>{},[x,a,y,w]),o.useEffect(()=>{B!==void 0&&S.current&&(S.current.scrollTop=0)},[B]);const[X,ee]=o.useState(!1);o.useEffect(()=>{const V=S.current;if(!V)return;const se=()=>ee(V.scrollHeight>V.clientHeight+1);if(se(),typeof ResizeObserver>"u")return;const O=new ResizeObserver(se);O.observe(V);const H=V.firstElementChild;return H&&O.observe(H),()=>O.disconnect()},[i,B]),o.useEffect(()=>{if(!x)return ku()},[x]);const W=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const V=W.current,se=T.current;return _o(se,V),se&&!se.contains(document.activeElement)&&(se.querySelector(Dn)??se).focus(),()=>{const O=document.activeElement;(!O||O===document.body||se&&se.contains(O))&&xo(V)?.focus?.()}},[x]),yo(T,!x);const G=o.useRef(!0),L=wo(),q=o.useRef(null);o.useEffect(()=>(G.current=!0,()=>{G.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const K=o.useCallback(()=>{!G.current||!Y.current||(Y.current=!1,M(!1))},[]),z=o.useCallback((V,se=!1)=>{if(se&&!G.current||Y.current)return;Y.current=!0,M(!0);const O=setTimeout(()=>{q.current===O&&(q.current=null);let H;try{H=V?V():void 0}catch{K();return}H&&typeof H.then=="function"&&H.then(()=>{setTimeout(K,120)},K)},L?0:Dv);se&&(q.current=O)},[K,L]),F=o.useCallback(()=>{f||_&&_()===!1||z(C,!0)},[z,C,f,_]),I=o.useRef(F);o.useEffect(()=>{I.current=F});const P=!x&&!!C;o.useEffect(()=>{if(P)return ea(()=>I.current())},[P]);const Z=P&&g,ue=o.useRef(!1),U=V=>{ue.current=V.target===V.currentTarget},pe=V=>{const se=ue.current;ue.current=!1,se&&V.target===V.currentTarget&&F()},ae=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${w}`,onPointerDown:Z?U:void 0,onClick:Z?pe:void 0,onMouseDown:x?void 0:V=>{V.target===V.currentTarget&&V.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${E?` popup-panel--${E}`:""}${D!=null?" popup-panel--has-height":""}${N?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&A&&a?R:void 0,"aria-label":!x&&!(A&&a)?y??(typeof a=="string"?a:void 0):void 0,children:[!A&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:F,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:R,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:R,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(_n,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(V=>({key:V.key,label:V.label,disabled:V.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:F,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:S,tabIndex:X?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:z,closeWithAnimation:F}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:z,closeWithAnimation:F}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:z,closeWithAnimation:F}):h})]}):c?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${v!=="center"?` popup-footer--${v}`:""}`,children:c.map((V,se)=>n.jsx(fe,{htmlType:"button",size:48,variant:V.variant??"default",label:V.label,disabled:V.disabled,onClick:()=>V.onClick?.({animateThen:z,closeWithAnimation:F})},se))}):u?n.jsx("div",{className:`popup-footer${v!=="center"?` popup-footer--${v}`:""}${b?` ${b}`:""}`,children:typeof u=="function"?u({animateThen:z,closeWithAnimation:F}):u}):null]})});return x||typeof document>"u"?ae:hn.createPortal(ae,document.body)}function Nu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:c}){const u=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&u,n.jsx("input",{id:c,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:p=>t?.(p.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&u]})}function xn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Lt,error:c=!1,className:u="",ariaLabel:p,ariaDescribedBy:h}){const{t:d}=we.useTranslation(),m=r??d("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),v=o.useId(),C=o.useRef(null),f=o.useCallback((T,R)=>{const S=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...S?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Va(R)}},[]),{open:_,setOpen:g,toggle:w,style:y,triggerRef:A,menuRef:x}=qa({computeStyle:f}),[E,k]=o.useState(-1),D=o.useCallback(()=>k(-1),[]),N=e.find(T=>T.value===t);o.useEffect(()=>{if(_){const T=e.findIndex(R=>R.value===t);k(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const R=x.current;if(!R)return;const S=R.querySelectorAll(".dropdown__option")[T];S&&(R.scrollTop=Math.max(0,S.offsetTop-R.clientHeight/2+S.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&k(T=>{if(T>=0&&T<e.length)return T;const R=e.findIndex(S=>S.value===t);return R>=0?R:e.length?0:-1})},[_,e.length]);const B=o.useCallback(()=>{s||w()},[s,w]),$=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),g(!1))},[a,g,s,t]);o.useEffect(()=>{s&&g(!1)},[s,g]);const M=o.useCallback(T=>{if(!s){if(!_){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),g(!0));return}if(T.key==="Escape"){T.preventDefault(),g(!1);return}T.key==="ArrowDown"?(T.preventDefault(),k(R=>{let S=R+1;for(;S<e.length&&e[S].disabled;)S++;return S<e.length?S:R})):T.key==="ArrowUp"?(T.preventDefault(),k(R=>{let S=R-1;for(;S>=0&&e[S].disabled;)S--;return S>=0?S:R})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?$(e[E]):g(!1))}},[s,_,e,E,$,g]),Y=_?n.jsx("div",{ref:x,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:y,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,R)=>n.jsxs("button",{id:`${b}-option-${R}`,type:"button",role:"option","aria-selected":T.value===t,className:Ne("dropdown__option body-2",T.value===t?"dropdown__option--active":"",R===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:S=>S.preventDefault(),onClick:()=>$(T),onMouseEnter:()=>k(R),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:C,className:Ne("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",l?"dropdown--block":"",c?"dropdown--error":"",u),onKeyDown:M,children:[n.jsxs("button",{ref:A,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&E>=0?`${b}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&N?v:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":c||void 0,disabled:s,onClick:B,onBlur:T=>{_&&!x.current?.contains(T.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:v,className:`dropdown__trigger-label body-2${N?"":" dropdown__trigger-label--placeholder"}`,children:N?N.label:m}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&hn.createPortal(Y,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Sv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Eu(e){return e?Sv[e]??null:null}function Du(e){switch(Eu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Su(e,t){const a=Eu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const va=e=>e==null?"":String(e).trim();function Oo(e,t,a,r){const s=va(e),l=va(t),i=va(a);if(r&&s&&l&&i){const u=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(u);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===u){const h=Gl(u,r);if(h)return h}}const c=[s,l,i];for(;c.length>0&&c[c.length-1]==="";)c.pop();return c.join(".")}function jv(e,t,a){const r=va(e);return r?`${r}-${va(t).padStart(2,"0")}-${va(a).padStart(2,"0")}`:""}function ju(e){return typeof e=="string"?e:e.label}function Tu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const c=o.useId(),[u,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const B=e??"";return s===!1?a:B?typeof s=="function"?s(a,B):a.filter($=>ju($).toLowerCase().includes(B.toLowerCase())):r?a:[]},[a,e,r,s]),[v,C]=o.useState(!1),f=o.useRef([]),_=v&&b.length===0?f.current:b;o.useEffect(()=>{_.length&&(f.current=_)},[_]);const g=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),y=i?0:-1;o.useEffect(()=>{u||d(y)},[u,y]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const A=h<_.length?h:y<_.length?y:-1,x=o.useCallback(B=>{l?l(B):t?.(ju(B)),p(!1)},[t,l]),E=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(y)},[y]),D=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),N=o.useCallback(B=>{B.nativeEvent.isComposing||B.keyCode===229||(B.key==="ArrowDown"?(B.preventDefault(),p(!0),d($=>Math.min(_.length-1,($<_.length?$:y)+1))):B.key==="ArrowUp"?(B.preventDefault(),d($=>Math.max(y,($<_.length?$:_.length)-1))):B.key==="Enter"?A>=0&&x(_[A]):B.key==="Escape"&&u&&(B.preventDefault(),p(!1)))},[_,A,u,x,y]);return{listId:c,open:u,activeIdx:A,filtered:_,handleFocus:E,handleBlur:D,handleInput:k,handleKeyDown:N,handleSelect:x,handleCompositionStart:g,handleCompositionEnd:w}}const zo=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Yn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:c,ariaDescribedBy:u,required:p,placeholder:h,ghostText:d,ghostHint:m,type:b="text",disabled:v=!1,readOnly:C=!1,error:f,helperText:_,maxLength:g,size:w=Lt,variant:y="input",fullWidth:A=!1,newline:x=!1,multiline:E=!1,rows:k=3,leftIcon:D,rightIcon:N,clearable:B=!1,list:$,showCount:M=!0,className:Y="",onFocus:T,onBlur:R,onKeyDown:S,onEnter:X,inputMode:ee,autoComplete:W,autoFocus:G,suggestions:L,filterSuggestions:q,onSelectSuggestion:K,autoActiveFirst:z,openOnFocus:F=!1}=e,I=C||v?void 0:L,{t:P}=we.useTranslation(),Z=o.useId();!i&&!c&&Dt(`TextField:unnamed:${Z}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const ue=`tf-${Z}`,U=`tf-helper-${Z}`,pe=o.useRef(null),ae=Tu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:F,filterSuggestions:q,onSelectSuggestion:K,autoActiveFirst:z}),V=!!I&&ae.open&&ae.filtered.length>0,se=o.useRef(null),[O,H]=o.useState(null),re=o.useCallback(()=>{const Ae=se.current;if(!Ae||typeof window>"u")return;const Ue=Ae.getBoundingClientRect(),ke=230,Ye=window.innerHeight-Ue.bottom<ke+8&&Ue.top>ke+8;H({position:"fixed",left:Ue.left,width:Ue.width,...Ye?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:Va(Ae)})},[]);zo(()=>{if(!V)return;re();let Ae=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){re();return}Ae===null&&(Ae=requestAnimationFrame(()=>{Ae=null,re()}))},ke=Ye=>{const et=Ye.target;et&&et.nodeType===1&&et.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",ke,!0),window.addEventListener("resize",Ue),()=>{Ae!==null&&cancelAnimationFrame(Ae),window.removeEventListener("scroll",ke,!0),window.removeEventListener("resize",Ue)}},[V,re]);const _e=o.useCallback(Ae=>{pe.current=Ae,typeof s=="function"?s(Ae):s&&(s.current=Ae)},[s]),te=d?`${d}${m??P("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,ie=t!==void 0,Be=ie&&b==="password",[Le,Re]=o.useState((a??"").length),he=ie?(t??"").length:Le,ge=o.useRef(t);zo(()=>{ge.current=t}),o.useEffect(()=>{const Ae=pe.current;if(!Be||!Ae)return;const Ue=t??"";Ae.value!==Ue&&(Ae.value=Ue)},[Be,t]),o.useEffect(()=>{if(!x||!pe.current)return;const Ae=pe.current;Ae.style.height="",Ae.scrollHeight>Ae.clientHeight&&(Ae.style.height=`${Ae.scrollHeight}px`)},[t,Le,x]);const Ee=g!=null&&he>g,ve=w===32?16:20,Fe=Ne("text-field",`text-field--s${w}`,y==="display"?"text-field--display":"",A?"text-field--full-width":"",v?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",D?"text-field--has-left-icon":"",N||B?"text-field--has-right-icon":"",Y),ze={id:ue,...Be?{}:ie?{value:t}:{defaultValue:a},ref:_e,placeholder:te,name:r,disabled:v,readOnly:C,autoFocus:G,maxLength:g,list:$,inputMode:ee,autoComplete:W,"aria-label":!i&&c?c:void 0,"aria-required":p,"aria-invalid":!!f,"aria-describedby":[_||f?U:null,u].filter(Boolean).join(" ")||void 0,role:I?"combobox":void 0,"aria-autocomplete":I?"list":void 0,"aria-haspopup":I?"listbox":void 0,"aria-expanded":I?V:void 0,"aria-controls":V?ae.listId:void 0,"aria-activedescendant":V&&ae.activeIdx>=0?`${ae.listId}-option-${ae.activeIdx}`:void 0,onChange:Ae=>{const Ue=Ae.target;ie||Re(Ue.value.length),l?.(Ue.value),I&&ae.handleInput(),Be&&queueMicrotask(()=>{const ke=ge.current??"";Ue.value!==ke&&(Ue.value=ke)})},onCompositionStart:I?ae.handleCompositionStart:void 0,onCompositionEnd:I?ae.handleCompositionEnd:void 0,onFocus:(Ae=>{T?.(Ae),I&&ae.handleFocus()}),onBlur:(Ae=>{R?.(Ae),I&&ae.handleBlur()}),onKeyDown:(Ae=>{const Ue=(Ae.key==="Tab"&&!Ae.shiftKey||Ae.key===" ")&&!Ae.nativeEvent.isComposing;if(d&&Ue&&!C&&!v&&!(Ae.currentTarget.value??"").trim()){Ae.preventDefault();const ke=Ae.currentTarget;ie||(ke.value=d,Re(d.length)),l?.(d);return}I&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&ae.activeIdx>=0?Ae.preventDefault():X&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&(Ae.preventDefault(),X()),S?.(Ae),I&&ae.handleKeyDown(Ae)})},Ct=B&&!v&&!C&&he>0,ut=()=>x?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--auto body-2",rows:1}):E?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{...ze,type:b,className:"text-field__input body-2"}),nt=y==="display"&&!x&&!E&&!!te,ct=()=>n.jsxs(n.Fragment,{children:[ut(),nt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:te})]});return n.jsxs("div",{ref:se,className:Fe,children:[i&&n.jsxs("label",{htmlFor:ue,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[D&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(ot,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:ve})}),ct(),g!=null&&M&&n.jsxs("span",{className:`text-field__count caption-2${Ee?" text-field__count--over":""}`,children:[he,"/",g]}),Ct&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:P("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>{!ie&&pe.current&&(pe.current.value="",Re(0)),l?.("")},tabIndex:-1}),N&&!Ct&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(ot,{icon:N,label:"",className:"",svgClassName:"text-field__icon-svg",size:ve})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:ae.open&&(t??"").length>0&&ae.filtered.length===0?P("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),V&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:ae.listId,className:"text-field__suggestions",role:"listbox",style:O??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:ae.filtered.map((Ae,Ue)=>n.jsx("li",{id:`${ae.listId}-option-${Ue}`,role:"option","aria-selected":Ue===ae.activeIdx,className:`text-field__suggestion body-2${Ue===ae.activeIdx?" is-active":""}`,onMouseDown:ke=>ke.preventDefault(),onClick:()=>{ae.handleSelect(Ae),pe.current?.focus()},children:typeof Ae=="string"?Ae:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ae.label}),Ae.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ae.hint})]})},typeof Ae=="string"?`${Ae}-${Ue}`:Ae.id))}),document.body)),(_||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:U,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||_})})]})}const Mu=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:w,onClick:y,children:A,align:x="horizontal",icon:E,useFullWidth:k=!1}=e,D=N=>{y&&N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),y())};return n.jsxs("div",{className:Ne("panel-row",x==="vertical"?"panel-row--vertical":"",k?"panel-row--label-fixed panel-row--fill":"",y?"panel-row--clickable":""),onClick:y,onKeyDown:y?D:void 0,role:y?"button":void 0,tabIndex:y?0:void 0,children:[E!=null&&n.jsx("div",{className:"panel-row__icon",children:E}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:A})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(ba,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:c,align:u="horizontal",useFullWidth:p=!1,icon:h}=e,d=a==="button"?void 0:l;let m=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,v=c?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const g=e;m=n.jsx(Nu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;m=n.jsx(_n,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??Lt,ariaLabel:r})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${p?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((y,A)=>n.jsx("div",{className:p?"panel-row__dropdown-item--full":void 0,children:n.jsx(xn,{options:y.options,value:y.value,onChange:y.onChange,size:Lt,placeholder:y.placeholder,block:p,error:!!c,ariaDescribedBy:v,ariaLabel:y.ariaLabel??([r,y.placeholder].filter(Boolean).join(" ")||void 0)})},A))}):n.jsx(xn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Mu,size:Lt,block:p,error:!!c,ariaLabel:r,ariaDescribedBy:v});m=c?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:c})]}):w}else if(a==="button"){const g=e;g.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,y)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??Lt,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},y))}):m=n.jsx(fe,{htmlType:"button",size:g.btnSize??Lt,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;m=n.jsx("span",{className:`panel-row__text body-2${p?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;m=n.jsxs("div",{className:`panel-row__input-wrap${p?" panel-row__input-wrap--full":""}`,children:[n.jsx(Yn,{size:Lt,value:g.value,onChange:g.onChange??Mu,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:p,error:c,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?C:void 0}),g.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(m=e.children);c&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&p,_=g=>{d&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),d())};return n.jsxs("div",{className:Ne("panel-row",u==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",d?"panel-row--clickable":""),onClick:d,onKeyDown:d?_:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Lu(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Tv({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=we.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],c=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:c}),i&&t&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${c} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(ln,{size:"small",variant:Du(i.device),fill:"soft",label:Su(i.device,r)}),Lu(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Lu(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Oo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Oo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function tr({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:c,className:u,scrollable:p,scrollbarGutter:h="auto",compactRows:d=!1,useBorder:m=!0,useBg:b=!0,useRowBorder:v=!0,labelWidth:C,form:f=!1,loading:_,empty:g,children:w}){const y=Ne("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",b?"":"panel--no-bg",v?"":"panel--no-row-border",d?"panel--compact-rows":"",u),A={};i!==void 0&&(A.minHeight=i),c!==void 0&&(A.maxWidth=typeof c=="number"?`${c}px`:c),C!==void 0&&(A["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const x=t?`h${t}`:"div";return n.jsxs("div",{className:y,style:Object.keys(A).length?A:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:Ne("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(ot,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),_?n.jsx(un,{variant:"loading"}):g!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:g}):p?n.jsx("div",{className:Ne("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Mv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const c=o.useRef(null),[u,p]=o.useState();o.useEffect(()=>{const d=c.current;if(r===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([b])=>p(b.contentRect.width));return m.observe(d),()=>m.disconnect()},[r]);const h=r!==void 0&&u!==void 0&&u<=r;return n.jsx("div",{ref:c,className:Ne("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Wo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:c,ariaLabel:u}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!r);return d.current=!!r,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!r)}),n.jsxs("label",{className:Ne("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:c,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:a,"aria-label":!s&&u?u:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function $u(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[b,v]=pr(t).split("-");return{y:+b,m:+v-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),c=o.useRef(e);o.useEffect(()=>{if(e===c.current)return;c.current=e;const b=a();s(b.y),i(b.m)},[e]);const u=o.useRef({y:r,m:l});o.useEffect(()=>{u.current={y:r,m:l}},[r,l]);const p=o.useCallback(b=>{const v=u.current.y*12+u.current.m+b,C=Math.floor(v/12),f=v-C*12;u.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((b,v)=>{u.current={y:b,m:v},s(b),i(v)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function kr(e,t){return new Date(e,t+1,0).getDate()}function Lv(e,t){return new Date(e,t,1).getDay()}function nr(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function $v(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Rv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:nr(a,r-1,s)}const Pv=1900;function Fv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Pv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),c=[];for(let u=l;u<=i;u++)c.push({value:String(u),label:a(u)});return c}function Ru(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Pu({value:e,onChange:t,size:a=Lt,min:r,max:s,disabled:l,placeholder:i,className:c,today:u}){const{t:p,i18n:h}=we.useTranslation(),d=i??p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>p("calendar.dow",{returnObjects:!0}),[p]),b=pr(u),{viewY:v,viewM:C,prevMonth:f,nextMonth:_,setViewYM:g}=$u(e,u),w=o.useId(),y=o.useCallback((V,se)=>{const O=window.innerHeight,H=window.innerWidth,re=typeof document<"u"?document.getElementById(w):null,_e=Math.max(re?.offsetHeight||0,re?.scrollHeight||0)||300,te=Math.max(V.width,re?.offsetWidth||0,260),ie=O-V.bottom,Be=V.top,Le=ie<_e&&Be>ie,Re=8,he=(ge,Ee)=>Math.min(Math.max(Re,ge),Math.max(Re,Ee));return{position:"fixed",left:he(V.left,H-te-Re),width:V.width,minWidth:260,...Le?{top:"auto",bottom:he(O-V.top+6,O-_e-Re)}:{bottom:"auto",top:he(V.bottom+6,O-_e-Re)},zIndex:Va(se)}},[w]),{open:A,setOpen:x,toggle:E,style:k,triggerRef:D,menuRef:N}=qa({computeStyle:y,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!A)return;const V=N.current;return(V?.querySelector(".date-picker__day--selected:not(:disabled)")??V?.querySelector(".date-picker__day--today:not(:disabled)")??V?.querySelector(".date-picker__day:not(:disabled)")??V?.querySelector(Dn)??V)?.focus?.(),()=>{const se=document.activeElement;(!se||se===document.body)&&D.current?.focus?.()}},[A,N,D]);const[B,$]=o.useState(1),M=o.useRef(null),Y=o.useRef(null);o.useEffect(()=>{if(!A)return;const V=e&&e.slice(0,7)===`${v}-${String(C+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${v}-${String(C+1).padStart(2,"0")}`?+b.slice(8):1;$(V)},[A]),o.useEffect(()=>{if(Y.current==null)return;const V=Y.current;Y.current=null,M.current?.querySelector(`[data-day="${V}"]`)?.focus()}),o.useEffect(()=>{$(V=>Math.min(V,kr(v,C)))},[v,C]);const T=o.useCallback(V=>{let se=nr(V.getFullYear(),V.getMonth(),V.getDate());r&&se<r&&(se=r),s&&se>s&&(se=s);const[O,H,re]=se.split("-").map(Number);(O!==v||H-1!==C)&&g(O,H-1),$(re),Y.current=re},[r,s,v,C,g]),R=o.useCallback(V=>{const se=new Date(v,C,B),O=re=>{se.setDate(se.getDate()+re),T(se)},H=re=>{const _e=se.getFullYear()*12+se.getMonth()+re,te=Math.floor(_e/12),ie=_e-te*12;T(new Date(te,ie,Math.min(se.getDate(),kr(te,ie))))};switch(V.key){case"ArrowLeft":O(-1);break;case"ArrowRight":O(1);break;case"ArrowUp":O(-7);break;case"ArrowDown":O(7);break;case"Home":O(-se.getDay());break;case"End":O(6-se.getDay());break;case"PageUp":V.shiftKey?H(-12):H(-1);break;case"PageDown":V.shiftKey?H(12):H(1);break;default:return}V.preventDefault()},[v,C,B,T]),S=o.useCallback(V=>{l||(t(nr(v,C,V)),x(!1))},[v,C,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const X=V=>{const se=nr(v,C,V);return!!(r&&se<r||s&&se>s)},ee=(()=>{const V=kr(v,C);if(B>=1&&B<=V&&!X(B))return B;for(let se=1;se<=V;se++)if(!X(se))return se;return-1})(),W=[];for(let V=0;V<Lv(v,C);V++)W.push(null);for(let V=1;V<=kr(v,C);V++)W.push(V);const G=a===64?20:a===32?14:a===40?16:18,L=Kl(h.language),q=V=>new Intl.DateTimeFormat(L,{year:"numeric"}).format(new Date(V,0,1)),K=(V,se)=>new Intl.DateTimeFormat(L,{month:"long"}).format(new Date(V,se-1,1)),z=Fv(v,+b.slice(0,4),q,r,s),F=Ru(v,K,r,s),I=V=>{const se=Ru(V,K,r,s);if(se.length===0)return;const O=se.some(H=>+H.value===C+1);g(V,O?C:+se[0].value-1)},[P,Z]=o.useState(null);o.useEffect(()=>{Z(null)},[e]);const ue=o.useCallback(V=>{Z(V);const se=Rv(V);if(!se||r&&se<r||s&&se>s)return;t(se);const[O,H]=se.split("-");g(+O,+H-1)},[r,s,t,g]),U=o.useCallback(()=>{Z(null)},[]),pe=o.useCallback(V=>{V.key==="Enter"?(V.preventDefault(),U(),x(!1)):V.key==="Escape"?(U(),x(!1)):V.key==="ArrowDown"&&!A&&(V.preventDefault(),x(!0))},[U,x,A]),ae=A?hn.createPortal(n.jsxs("div",{ref:N,id:w,className:"date-picker__dropdown",style:k,"data-tooltip-ignore":!0,role:"dialog","aria-label":p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:f,"aria-label":p("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(qs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:z,value:String(v),onChange:V=>I(+V),size:40}),n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:F,value:String(C+1),onChange:V=>g(v,+V-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":p("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Us,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:M,onKeyDown:R,children:[m.map(V=>n.jsx("div",{className:"date-picker__dow caption-1",children:V},V)),W.map((V,se)=>{if(V===null)return n.jsx("div",{},`e${se}`);const O=nr(v,C,V),H=O===e,re=O===b,_e=X(V),te=se%7;return n.jsx("button",{type:"button",disabled:_e,"data-day":V,tabIndex:V===ee?0:-1,"aria-current":re?"date":void 0,onClick:()=>!_e&&S(V),className:Ne("date-picker__day caption-1",H&&"date-picker__day--selected",re&&!H&&"date-picker__day--today",_e&&"date-picker__day--disabled",te===0&&"date-picker__day--sun",te===6&&"date-picker__day--sat"),children:V},V)})]})]}),document.body):null;return n.jsxs("div",{className:Ne("date-picker",`date-picker--s${a}`,A&&"date-picker--open",c),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:D,type:"text",className:"date-picker__trigger body-2",value:P??$v(e),placeholder:d,onChange:V=>ue(V.target.value),onClick:()=>!l&&!A&&E(),onKeyDown:pe,onBlur:U,disabled:l,"aria-haspopup":"dialog","aria-expanded":A,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&E(),disabled:l,tabIndex:-1,"aria-label":d,"aria-haspopup":"dialog","aria-expanded":A,children:n.jsx(tl,{size:G,className:"date-picker__icon",strokeWidth:1.5})})]}),ae]})}const Fu=["personal","sensitive","marketing"];function Iv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=we.useTranslation(),[c]=o.useState(()=>pr(a)),[u,p]=o.useState([]),[h,d]=o.useState("paper"),[m,b]=o.useState("self"),[v,C]=o.useState(c),[f,_]=o.useState(""),g=Fu.filter(y=>!e.includes(y)),w={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Fn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(fe,{htmlType:"button",size:48,variant:"main",disabled:t||u.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:u,method:h,source:m,consentedAt:v||null,note:f.trim()||null})}),children:n.jsxs(tr,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[g.map(y=>n.jsx(Wo,{checked:u.includes(y),disabled:t,label:w[y],onChange:A=>p(x=>A?[...x,y]:x.filter(E=>E!==y))},y)),g.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(_n,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:y=>d(String(y))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(_n,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:y=>b(String(y))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Pu,{size:48,value:v,max:c,today:a,onChange:y=>C(y??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Yn,{size:48,fullWidth:!0,value:f,onChange:_,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function Ho({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=we.useTranslation(),c=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),u=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>a(Math.max(1,Math.min(p,e-1))),d=()=>a(Math.min(p,e+1));return n.jsxs("div",{className:Ne("pagination",l),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:c,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:u,disabled:e>=t,onClick:d})]})}function Vo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:c}){const{t:u}=we.useTranslation(),p=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??u("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:Ne("toolbar",c),children:[n.jsxs("div",{className:"toolbar__row",children:[p,a&&(Array.isArray(a)?a:[a]).map((d,m)=>n.jsx(_n,{size:Lt,...d},d.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Yn,{className:"toolbar__search",size:Lt,value:t.value,onChange:t.onChange,placeholder:t.placeholder??u("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??u("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((d,m)=>n.jsx(xn,{size:Lt,options:d.options,value:d.value,onChange:d.onChange,ariaLabel:d.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(xn,{size:Lt,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??u("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Ho,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Iu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Iu).join(""):""}function Ov(e){let t=e.replace(/\r\n/g,`
822
+ and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},Rg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Pg={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},Fg={clearAriaLabel:"Clear input"},Ig={ariaLabel:"Select tab"},Og={ariaLabel:"Tabs"},zg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Wg={ariaLabel:"User avatar"},Hg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Vg={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},qg={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},Ug={steps:"Step {{current}} of {{total}}"},Gg={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},Kg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Yg={viewWords:"Words"},Zg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Xg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Jg={previewRegion:"Report preview \u2014 scrollable sideways"},Qg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},ey={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ty={clearSelection:"Clear selection"},ny={showResult:"Show {{type}} result"},ay={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},ry={loading:"Loading"},oy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},sy={ariaLabel:"Breadcrumb"},ly={empty:"No items yet."},iy={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},uy={common:ig,calendar:ug,passCard:cg,rating:dg,colorPicker:pg,dropdown:hg,accordion:mg,header:Cg,nav:fg,settings:bg,usage:gg,account:yg,training:vg,customers:_g,payment:xg,coupons:wg,visits:Bg,trainingType:kg,myWordTable:Ag,keyWords:Ng,wordTable:Eg,wordSearch:Dg,wordPrint:Sg,topic:jg,device:Tg,manager:Mg,wordPairs:Lg,footer:$g,date:Rg,wordData:Pg,textField:Fg,segmentedControl:Ig,tabs:Og,fileUpload:zg,avatar:Wg,myHomework:Hg,trainingStatus:Vg,store:qg,progress:Ug,trainingMiss:Gg,table:Kg,wordScore:Yg,topBanner:Zg,datePicker:Xg,report:Jg,tooltip:Qg,phonemeProfile:ey,bulkBar:ty,debug:ny,badge:ay,loader:ry,soundCompass:oy,breadcrumb:sy,board:ly,promoBannerBg:iy};const cy="0.415.0",dy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],go="ko",py="ihab_display_language";function ni(){if(typeof window>"u")return go;try{const e=localStorage.getItem(py);if(e&&dy.some(t=>t.code===e))return e}catch{}return go}function ai(e){try{document.documentElement.lang=e}catch{}}Zt.on("languageChanged",ai),ai(ni()),Zt.use(ke.initReactI18next).init({resources:{ko:{translation:lg},en:{translation:uy}},lng:ni(),fallbackLng:go,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const hy=new Map;try{Zt.store?.on?.("added",()=>hy.clear())}catch{}let Cr=null,ri=null,oi=null;function my(){const e=Vl();if(e&&e.entries.length>0){const t=Af();if(Cr&&ri===e&&oi===t)return Cr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Cr=r,ri=e,oi=t,Cr}return[]}new Proxy([],{get(e,t){const a=my(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Cy(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function fy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Cy(r.attrValue)&&(r.keepAttr=!1)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function by(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=oo(e):/^(Logo|Symbol)/i.test(d)?m=oo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let d=!1;async function m(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const y=b.headers.get("content-type")||"";if(d)return;if(y.includes("svg")){i("mask");return}if(y.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const f=await C.text();if(d)return;if(/^\s*<svg[\s>]/i.test(f)){const x=fy(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[r]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{d||(m=URL.createObjectURL(b),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,y=o1(b),{iconToUse:C,mode:f,svgText:x,blobUrl:g}=by(b),w=(k,D={})=>n.jsx("span",{className:p,style:u,...D,children:k}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,E=(k,D={})=>n.jsx("img",{src:k,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:_?{...D.style,..._}:D.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(y)try{return w(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const k={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return f==="img"?w(E(C,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return E(oo(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const v=typeof c=="number"?c:20,N=`<svg width="${v}" height="${v}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:N}}),{"aria-hidden":"true"})}function si(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function gy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=si(r?.onClick);return n.jsxs("div",{className:De("empty-state",s),children:[e&&n.jsx(lt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(lt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function yy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=ke.useTranslation(),{pending:u,press:c}=si(r);return n.jsxs("div",{className:De("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(lt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function vy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())},className:De("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function _y({as:e="div",className:t="",children:a,storage:r,...s}){r&&U1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=De("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function xy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function yo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(Dn)).filter(xy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===a;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Dn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',vo=new WeakMap;function _o(e,t){e&&vo.set(e,t)}function xo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!vo.has(r);)r=r.parentElement;if(!r)return t;t=vo.get(r)??null}return t}function li(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function fr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(li(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Dn)).filter(c=>!(e&&e.contains(c))&&li(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function wy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=ke.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&fr(C),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),b=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:m,role:"note",children:[a.map((C,f)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((x,g)=>n.jsx("span",{className:"notice-box__line body-3",children:x},g))}):C.children??null})]},f)),b]});const y=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((C,f)=>n.jsx("li",{className:"notice-box__line",children:C},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[y,b]})}const By={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function ga(e){const{t}=ke.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),p=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:By,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const ya=[];let br=!1;function ii(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ya[ya.length-1];t&&(e.stopPropagation(),t())}function ea(e){return ya.push(e),!br&&typeof document<"u"&&(document.addEventListener("keydown",ii),br=!0),()=>{const t=ya.lastIndexOf(e);t>=0&&ya.splice(t,1),ya.length===0&&br&&typeof document<"u"&&(document.removeEventListener("keydown",ii),br=!1)}}const ui=o.createContext(null);function ky(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ci=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Ay(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return Is.useSyncExternalStore(t,()=>ci(e),()=>!1)}function Ny(e){const[t,a]=o.useState(ci(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const Ey=typeof Is.useSyncExternalStore=="function"?Ay:Ny;function vn(e){const t=o.useContext(ui),a=Ey(e);return t&&typeof t.mobile=="boolean"&&ky(e)?t.mobile:a}const Dy="(prefers-reduced-motion: reduce)";function wo(){return vn(Dy)}const di={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function Sy(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function jy(e){return Sy(di,e)}function ue(e){if(!e||Object.keys(di).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=jy(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:p="",children:h,backdrop:d=!1,isMobilePopup:m=!1,useBorder:b=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[x,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,_]=o.useState(!1),[E,v]=o.useState("bottom"),[N,k]=o.useState(!1),[D,A]=o.useState(!1),B=!t&&!a,F=o.useRef(null),L=o.useCallback((R=!1,J=!1)=>{if(D&&m)return;const ne=a?a.getBoundingClientRect():t,S=J&&F.current?F.current:ne;if(!S||!f.current)return;const $=f.current,{offsetWidth:I,offsetHeight:P}=$,V=window.innerWidth,ie=window.innerHeight,U=V-S.right,ce=S.left,Z=S.top,H=ie-S.bottom;let te=0,W=0,z="top";if(Z>=P+r)z="top",W=S.top-r-P,te=S.left+S.width/2-I/2;else if(H>=P+r)z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2;else if(U>=I+r)z="right",te=S.right+r,W=S.top+S.height/2-P/2;else if(ce>=I+r)z="left",te=S.left-r-I,W=S.top+S.height/2-P/2;else{const le=Math.max(Z,H,U,ce);le===Z?(z="top",W=S.top-r-P,te=S.left+S.width/2-I/2):le===H?(z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2):le===U?(z="right",te=S.right+r,W=S.top+S.height/2-P/2):(z="left",te=S.left-r-I,W=S.top+S.height/2-P/2)}const ae=Number.isFinite(Number(s))?Number(s):8;te=Math.min(Math.max(te,ae),V-I-ae),W=Math.min(Math.max(W,ae),ie-P-ae);const ve=Math.round(te),me=Math.round(W);R&&f.current?(f.current.style.left=`${ve}px`,f.current.style.top=`${me}px`,f.current.dataset.placement=z):(v(z||E),g({position:"fixed",left:ve,top:me}),k(!0))},[D,m,a,t,r,s,E]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(B)return;if(D&&m){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),k(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m)return;let R=null;const J=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},ne=S=>{if(!a&&l){const $=S.target;if($&&f.current&&f.current.contains($))return;try{if($&&$.closest&&$.closest("[data-tooltip-ignore]"))return}catch{}G.current(!0);return}J()};return window.addEventListener("resize",J),document.addEventListener("scroll",ne,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",J),document.removeEventListener("scroll",ne,{capture:!0})}},[t,a,l,r,h,s,B,D,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),J=()=>A(!!R.matches);J();try{R.addEventListener?R.addEventListener("change",J):R.addListener(J)}catch{try{R.addListener(J)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",J):R.removeListener(J)}catch{}}},[]);const q=o.useRef(!1),M=o.useRef(null),O=wo(),T=o.useCallback((R=!1)=>{if(l&&!(w||q.current)){if(q.current=!0,R){_(!0);try{l&&l()}catch{q.current=!1,_(!1)}return}_(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{q.current=!1,_(!1)}},O?0:200)}},[w,l,_,O]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(B)return;const R=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},J=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},ne=S=>{if(S.key==="Tab"){const $=f.current;if(!$)return;const I=$.querySelectorAll(Dn);if(!I||I.length===0)return;const P=I[0],V=I[I.length-1],ie=document.activeElement;S.shiftKey?ie===P&&(S.preventDefault(),V.focus()):ie===V&&(S.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",J,!0),document.addEventListener("keydown",ne),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",J,!0),document.removeEventListener("keydown",ne)}},[l,i,T,B]);const G=o.useRef(T);o.useEffect(()=>{G.current=T});const K=!!l;o.useEffect(()=>{if(!(B||!K))return ea(()=>G.current())},[B,K]),o.useEffect(()=>{const R=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",R),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",R)}},[T]);const ee=o.useRef(null);o.useEffect(()=>{if(B||C===!1||!N)return;const R=f.current;if(!R)return;const J=R.querySelector(Dn);if(J)return ee.current=document.activeElement,J.focus({preventScroll:!0}),()=>{const ne=ee.current;ee.current=null,ne&&document.contains(ne)&&ne.focus({preventScroll:!0})}},[B,C,N]),o.useEffect(()=>{c==="dialog"&&!p&&Dt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,p]);const re=n.jsxs("div",{ref:f,className:ue(`tooltip__content ${B?"tooltip__content--inline":""} ${b?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${D&&m?"is-mobile":""}`),role:c,"aria-label":p||void 0,style:B?{}:{...x,visibility:N?"visible":"hidden"},tabIndex:-1,"data-placement":E,"data-left":B?"":x.left,"data-top":B?"":x.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[y!=null&&n.jsx("div",{className:ue("tooltip__header h5"),children:y}),h]});if(B||typeof document>"u")return re;if(d||D&&m){const R=n.jsxs("div",{className:ue("tooltip__portal"),children:[n.jsx("div",{className:ue("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),re]});return hn.createPortal(R,document.body)}return hn.createPortal(re,document.body)}function Ln(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:ue(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:ue("info-tooltip__content body-3"),children:a})}):null}function Un(e){const{t}=ke.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ue("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ue("description-tooltip__box"),children:[r&&n.jsx("span",{className:ue("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:ue(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,b)=>n.jsxs("li",{className:ue(`description-tooltip__item body-3${b===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:ue("description-tooltip__index button-1"),children:[b+1,"."]}),m.color&&n.jsx("span",{className:ue("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},b))})]})})}function Ha(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let Bo=0,pi=!1;function hi(){pi||typeof document>"u"||(pi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Bo=Date.now())},!0),document.addEventListener("touchstart",()=>{Bo=Date.now()},{capture:!0,passive:!0}))}hi();function Gn(e){return!!e&&e.pointerType==="touch"}function ta(e=1e3){return hi(),Date.now()-Bo<e}function gr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ha(e),i=Ha(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=d=>{const m=d,b=d.target,y=a.current,C=!!(b&&y&&y.contains(b));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(b&&b.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,d=h?.parentElement;if(!h||!d)return;let m=null;const b=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const g=h.getBoundingClientRect();return x.clientX>=g.left&&x.clientX<=g.right&&x.clientY>=g.top&&x.clientY<=g.bottom},y=f=>{m=b(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!b(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return d.addEventListener("touchstart",y,{passive:!0}),d.addEventListener("touchend",C),()=>{d.removeEventListener("touchstart",y),d.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:p}}function Ty(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:b,ariaLabel:y,variant:C="default",align:f="center",nowrap:x=!1,selected:g,toggleable:w=!1,ariaExpanded:_,ariaControls:E,disabled:v=!1,loading:N=!1,useLabel:k=!0,useBorder:D=!0,useBG:A=!0,useDisabledCovered:B=!1,useDisabledInvisible:F=!1,useDisabledFilled:L=!1,width:q,minWidth:M,onClick:O,onDisabledClick:T,showTooltipInfo:G=!1,tooltipInfoText:K=null,tooltipDescription:ee=null,tooltipOnly:re=!1,iconSize:R="medium",iconColor:J,shape:ne="rounded",color:S,className:$,...I}=e,P=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),V=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ie=Number(a),U=!isNaN(ie)&&ie<40?"button-2":"button-1",ce=h??b,Z=v||!!I.disabled,H=Z?B?"disabled-covered":F?"disabled-invisibled":L?"disabled-filled":"disabled":C,te=H?`button--variant-${H}`:"",W=f?`button--align-${f}`:"",z=x?"button--nowrap":"",ae=ne?`button--shape-${ne}`:"",ve=typeof J=="string"&&J.startsWith("--")?`var(${J})`:J,me={...q?{width:typeof q=="number"?`${q}px`:q}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...D?{}:{"--button-border":Z?"0":"1px solid transparent"},...ve?{"--button-icon-color":ve}:{},...S?{"--color-main":S}:{}},le=k===!1?"":ce,Be=Array.isArray(le)?le.length>0:!!le,Pe=!!p,Fe=r??(Be||c||Pe?"bar":"dot"),Ae=`${V}--${Fe}`,se=o.useRef(null);o.useEffect(()=>{!Wn||s!==void 0||se.current?.closest("form")&&Dt(`button-in-form:${typeof ce=="string"?ce:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof ce=="string"&&ce?` \uB2E8\uCD94: ${ce}`:""))},[s,ce]);const ye=o.useRef(t);ye.current=t;const Ce=o.useCallback(Me=>{se.current=Me;const tt=ye.current;typeof tt=="function"?tt(Me):tt&&(tt.current=Me)},[]),xe=o.useRef(Z),[$e,nt]=o.useState(!!g),[ct,at]=o.useState(!1),[rt,Ee]=o.useState(null),Ue=o.useCallback(()=>at(!1),[]),[Ne,Ye]=o.useState(!1),et=o.useId();o.useEffect(()=>{typeof g=="boolean"&&nt(g)},[g]),o.useEffect(()=>{if(xe.current&&!Z&&se.current){const Me=se.current;let tt=!1;try{tt=Me.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Me.blur(),Me.style.pointerEvents="none";const Ft=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se.current&&(se.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ft)}xe.current=Z},[Z]);const ft=typeof g=="boolean"?!!g:$e,vt=typeof _=="boolean"?void 0:w||typeof g=="boolean"?ft?"true":"false":I["aria-pressed"],dt=De("button",V,Ae,te,W,z,ae,ft?"is-selected":null,A?null:"button--no-bg",re?"button--tooltip-only":null,$),jt=`button__icon button__icon--${R}`,ot=Array.isArray(m)?m:m!==void 0?[m]:[],st=()=>{if(Array.isArray(le))return le.map((tt,Ft)=>{const _t=ot[Ft];return n.jsxs("span",{className:`button__label-text${_t!==void 0?" button__label-text--has-sub":""}`,children:[tt,_t!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:_t})]},Ft)});const Me=m!==void 0;return n.jsxs("span",{className:`button__label-text${Me?" button__label-text--has-sub":""}`,children:[le,d!=null&&n.jsx("span",{className:"button__count",children:d}),Me&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},At=Me=>{typeof g!="boolean"&&!w&&nt(!1),Me.currentTarget.blur()},Nt=Me=>{Z||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Me),At(Me))},Ot=Me=>{if(re&&it&&bt.touchPress(Me.currentTarget),Z){it&&bt.touchPress(Me.currentTarget),Me.preventDefault(),T?.(Me);return}typeof g!="boolean"&&w&&nt(tt=>!tt),O?.(Me)},Wt=o.useCallback(()=>{(G||ee)&&(at(!0),Ee(se.current?.getBoundingClientRect()??null))},[G,ee]),xt=o.useCallback(()=>{(G||ee)&&(at(!1),Ee(null))},[G,ee]),it=!!(G||ee),bt=gr(ct,Me=>{Me?Wt():xt()},se,{enabled:it&&(Z||re),fallbackOnParent:it&&Z}),pt={...I};delete pt.disabled,delete pt.className,delete pt.faded,delete pt.useFaded,delete pt.loading,delete pt.onMouseLeave,delete pt.onPointerEnter,delete pt.onPointerLeave,delete pt.onPointerUp,delete pt.onFocus,delete pt.onBlur,Z&&(Object.keys(pt).forEach(Me=>{/^on[A-Z]/.test(Me)&&typeof pt[Me]=="function"&&delete pt[Me]}),pt["aria-disabled"]="true"),N&&(pt["aria-busy"]="true");const kt=(typeof G=="string"?G:null)??(typeof K=="string"?K:null)??(typeof y=="string"?y:null)??(typeof ce=="string"?ce:null)??void 0,mt=typeof y=="string"?y:typeof ce=="string"?ce:kt,wt=ee?[ee.title,...ee.items??[]].filter(Boolean).join(". "):G&&kt&&kt!==mt?kt:"",de=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,wt?et:null].filter(Boolean).join(" ")||void 0,Le=()=>n.jsx("span",{className:`${jt} button__spinner`,"aria-hidden":"true",children:n.jsx(ga,{variant:"spinner",size:"100%"})}),Se=(Me,tt)=>n.jsx(lt,{icon:Me,label:tt??mt,className:jt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Je=Me=>N?Le():Se(c,Me),ht=()=>Fe==="dot"?n.jsxs(n.Fragment,{children:[Je(),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()})]}):f==="center"&&(c||N)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Je()}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()})]}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}):n.jsxs(n.Fragment,{children:[(c||N)&&n.jsx("span",{className:"button__left",children:Je(y??ce)}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}),Rt=!!l&&!Z;return n.jsxs(n.Fragment,{children:[n.jsxs(Rt?"a":"button",{...pt,ref:Ce,...Rt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:Z&&!T&&!Ne},className:dt,"aria-pressed":vt,"aria-expanded":typeof _=="boolean"?_:I["aria-expanded"],"aria-controls":E??I["aria-controls"],"aria-label":mt,"aria-disabled":Z&&(Rt||T||Ne)?!0:void 0,"aria-describedby":de,style:me,onClick:Ot,onMouseLeave:Nt,onPointerEnter:Me=>{Gn(Me)||Wt(),!Z&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Me)},onPointerLeave:Me=>{Gn(Me)||xt(),!Z&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Me)},onPointerUp:Me=>{Z&&it&&bt.touchPress(Me.currentTarget),!Z&&typeof I.onPointerUp=="function"&&I.onPointerUp(Me)},onFocus:Me=>{Ye(!0),ta()||Wt(),!Z&&typeof I.onFocus=="function"&&I.onFocus(Me)},onBlur:Me=>{Ye(!1),Z||At(Me),xt(),!Z&&typeof I.onBlur=="function"&&I.onBlur(Me)},children:[ht(),wt?n.jsx("span",{id:et,hidden:!0,"aria-label":wt}):null]}),ct&&ee?n.jsx(Un,{anchorRect:rt,title:ee.title,items:ee.items,onClose:Ue}):ct&&kt?n.jsx(Ln,{anchorRect:rt,text:kt,onClose:Ue}):null]})}const be=o.forwardRef(Ty);be.displayName="Button";function It(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Va={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},ko=new WeakMap;function Ao(e){if(e)return ko.get(e)}function nn(e,t){e&&(e.style.setProperty(Va.title,t.title),e.style.setProperty(Va.description,t.description),ko.set(e,t))}function an(e){e&&(e.style.removeProperty(Va.title),e.style.removeProperty(Va.description),ko.delete(e))}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Ci(){const e=It(mi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const fi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=It(fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const gi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=It(gi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const vi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function _i(){const e=It(vi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const xi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=It(xi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function ki(){const e=It(Bi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const Ai={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Ni(){const e=It(Ai,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Di(){const e=It(Ei,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Si={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ji(){const e=It(Si,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ti={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Mi(){const e=It(Ti,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Li={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function $i(){const e=It(Li,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Pi(){const e=It(Ri,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Fi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ii(){const e=It(Fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Oi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function zi(){const e=It(Oi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const sn=(e,t,a)=>({key:e,get label(){return Zt.t(`promoBannerBg.${e}`,t)},textTone:a}),My=[sn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("soft","\uC18C\uD504\uD2B8","dark"),sn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),sn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),sn("warm","\uC6DC(\uAC15\uC870)","dark"),sn("dark","\uB2E4\uD06C","light"),sn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),sn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),sn("outline","\uC544\uC6C3\uB77C\uC778","dark"),sn("success","\uC131\uACF5/\uC644\uB8CC","light"),sn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),sn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Wi={main:Ci,soft:bi,sub:yi,deep:_i,softSub:wi,warm:ki,dark:Ni,radial:Di,diagonal:ji,dots:Mi,outline:$i,success:Pi,naver:Ii,instagram:zi};function Hi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),u=w=>{try{const _=localStorage.getItem(w),E=_?Number(_):1;return Number.isFinite(E)?i(E):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{p(typeof w=="function"?_=>i(w(_)):i(w))},b=()=>m(w=>+(w+s).toFixed(6)),y=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),g=Math.round(x*l);return{scale:c,setScale:m,increase:b,decrease:y,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:g}}function Vi(e,t){const a=Ha(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const No=" \xB7 ",qi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(No)?e.split(No).pop()??e:e})(),Ly=o.createContext(!1),na=[];let Ui=null;function $y(e){const t=o.useContext(Ly);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;na.length===0&&(Ui=document.title);const a={text:qi?`${e}${No}${qi}`:e};return na.push(a),document.title=a.text,()=>{const r=na.lastIndexOf(a);r>=0&&na.splice(r,1),document.title=na.length?na[na.length-1].text:Ui??document.title}},[e,t])}const Eo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],Ry=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Ry().compare(e,t)}const yr=new Map;function Py(e){const t=yr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),yr.size>5e3&&yr.clear(),yr.set(e,a),a}function Fy(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function Iy(e,t){const a=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=Fy(h);return d!==null?[d]:Py(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=fn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Gi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function vr(e,t,a){const r=Gi(e),s=Gi(t);if(r||s)return r===s?0:r?1:-1;const l=Iy(e,t);return a?l:-l}function Oy(e,t,a){const{t:r}=ke.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Eo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>Eo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),d=o.useCallback(y=>{Eo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(s),b*Number(s)),[e,b,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:b,total:m,onChange:u},setPage:u}}function zy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const p=r.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,b)=>vr(p(m,h),p(b,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(bf).map(([e,{nucleus:t}])=>[e,t]));const Wy={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},Hy={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},Vy={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function qy(e,t){if("place"in t)return Wy[t.place](e);const a=Hy[t.vowel](e);return t.glide?`${a} \xB7 ${Vy[t.glide](e)}`:a}const Uy=(e,{defaultValue:t})=>t,Ki=(e,t)=>({jamos:e,phonetic:t,tooltip:qy(Uy,t)}),$n=(e,t)=>t.map(a=>Ki([a],{place:e})),Xt=(e,t,a)=>Ki([...e],a?{vowel:t,glide:a}:{vowel:t}),Do={cho:[$n("labial",["\u3142","\u3143","\u314D","\u3141"]),$n("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),$n("alveolar",["\u3145","\u3146"]),$n("palatal",["\u3148","\u3149","\u314A"]),$n("velar",["\u3131","\u3132","\u314B"]),$n("glottal",["\u314E"])],jung:[[Xt("\u3163","frontHigh"),Xt("\u315F","frontHigh","w"),Xt("\u3162","frontHigh","velar")],[Xt("\u3161","backHighUnrounded")],[Xt("\u315C","backHighRounded"),Xt("\u3160","backHighRounded","j")],[Xt("\u3154\u3150","frontMid"),Xt("\u3156\u3152","frontMid","j"),Xt("\u3159\u315A\u315E","frontMid","w")],[Xt("\u3153","backMidUnrounded"),Xt("\u3155","backMidUnrounded","j"),Xt("\u315D","backMidUnrounded","w")],[Xt("\u3157","backMidRounded"),Xt("\u315B","backMidRounded","j")],[Xt("\u314F","low"),Xt("\u3151","low","j"),Xt("\u3158","low","w")]],jong:[$n("labial",["\u3142","\u3141"]),$n("alveolar",["\u3137","\u3134","\u3139"]),$n("velar",["\u3131","\u3147"])]},Gy=e=>e===Ky?[]:Array.from(e),Ky="__NO_CODA__",So=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Yi={cho:So(Do.cho),jung:So(Do.jung),jong:So(Do.jong)};Yi.jung.flat().forEach(({v:e})=>{for(const t of Gy(e));}),new Set(Yi.cho.flat().map(e=>e.v));function Yy(e,t=!0){const a=Ha(e);o.useEffect(()=>{if(t)return ea(()=>{a.current?.()})},[t,a])}function _r(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Zy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Zi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),a(d),i(b=>b+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function qa(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Ua({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let b=p.current?.offsetHeight??0;b>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&p.current&&(C=new ResizeObserver(()=>{const N=p.current?.offsetHeight??0;if(N!==b){if(b=N,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(p.current));const f=N=>{const k=N.target;r&&k.closest?.(r)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const g=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},w=N=>{p.current?.contains(N.target)||(t==="reposition"?g():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const _=()=>{a==="reposition"?g():a==="close"&&l(!1)};let E=null;const v=()=>{_(),E&&clearTimeout(E),E=setTimeout(()=>{E=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",_),window.addEventListener("orientationchange",v)),()=>{x!==null&&cancelAnimationFrame(x),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",v)),E&&clearTimeout(E)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return ea(()=>l(!1))},[s]);const d=o.useCallback(()=>l(b=>!b),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function Xy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[b,y]=o.useState(null),[C,f]=o.useState([]),[x,g]=o.useState(null),[w,_]=o.useState(0),E=o.useRef(0),v=o.useCallback(R=>{E.current=typeof R=="function"?R(E.current):R,_(E.current)},[]),N=o.useRef(r),k=o.useRef(s);o.useEffect(()=>{N.current=r,k.current=s},[r,s]);const D=o.useRef([]),A=()=>{D.current.forEach(clearTimeout),D.current=[]},B=(R,J)=>{D.current.push(setTimeout(J,R))};o.useEffect(()=>()=>A(),[]);const F=u[p]?.id??null,L=o.useRef(null),q=o.useCallback(()=>{A(),m("playing"),f([]),g(null),v(0);let R=0;e.forEach((J,ne)=>{B(R,()=>{h(ne),y(J.id),N.current?.(J)}),B(R+1e3,()=>{y(null),f(S=>[...S,J.id])}),R+=1300}),B(R,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,v]),M=o.useCallback((R,J)=>{if(J>=R.length){m("done"),k.current?.({score:E.current,total:R.length});return}L.current=null,h(J),g(null),m("playing"),y(R[J].id),N.current?.(R[J]),B(l,()=>{y(null),m("waiting")})},[l]),O=o.useCallback(()=>{A();const R=Oa(e);c(R),v(0),f([]),M(R,0)},[e,M,v]),T=o.useCallback(()=>{t==="playback"?(c(e),q()):O()},[t,e,q,O]),G=o.useCallback(()=>{A(),m("idle"),y(null),f([]),g(null),h(0),v(0),c([])},[v]),K=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():G(),()=>A()),[t,K,a]);const ee=o.useCallback(R=>{d!=="waiting"||t==="playback"||L.current===p||(L.current=p,g(R),R===u[p]?.id&&v(J=>J+1),t==="exam"?(m("playing"),B(400,()=>M(u,p+1))):(m("feedback"),B(i,()=>M(u,p+1))))},[d,t,u,p,M,i,v]),re=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:x,answerId:F,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ee},index:p,total:re,score:w,phase:d,done:d==="done",start:T,reset:G}}const jo=new Map,To=new Map,Jy=()=>()=>{},Qy=()=>!0,e2=()=>!1;function Xi(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function t2(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function n2(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function a2(e){const t=To.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&jo.set(e,r),r)).catch(()=>null).finally(()=>{To.delete(e)});return To.set(e,a),a}function r2(e,t=!0){const a=o.useSyncExternalStore(Jy,Qy,e2)&&t&&e?Xi(e)??jo.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Xi(e)??jo.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return a2(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function o2({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[b,y]=o.useState("main"),C=vn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=Ao(w),E=(v,N,k)=>{if(k!==void 0)w.style.setProperty(N,k),f.current[v]=!0;else if(f.current[v]){const D=_?.[v];D?w.style.setProperty(N,D):w.style.removeProperty(N),f.current[v]=!1}};E("title","--promo-banner-bg-title",c),E("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=Ao(w);y(_?.actionVariant??"main")},[d]);const x=De("promo-banner",`promo-banner--${i}`,h),g=Wi[d];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(be,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function s2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=ke.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[b,y]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),_=wo(),E=d||b||C,v=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||E||_)return;const k=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,E,_]);const N=k=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,f(!1)},k)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const k=D=>{D.pointerType==="touch"&&(w.current&&w.current.contains(D.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:De("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{x.current=k.pointerType},onPointerDown:k=>{x.current=k.pointerType,k.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!0))},onPointerUp:k=>{k.pointerType==="touch"&&N(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&N(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let D=!0;try{D=k.target.matches(":focus-visible")}catch{D=!0}y(D)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${v*100}%)`},children:u.map((k,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==v,...D!==v?{inert:!0}:{},children:k},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[v]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===v?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:D+1,defaultValue:`${c}\uAC1C \uC911 ${D+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":D===v,onClick:()=>h(D)},D))})]})}function l2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=ke.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),r?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(lt,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function i2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(l2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function u2(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function c2(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function d2(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Sn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:p=""}){const{t:h}=ke.useTranslation(),d=t??"check",m=a!==void 0,b=e!==void 0||m?"number":d,y=e!==void 0?void 0:m?h("badge.nthSelected",{n:a,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[d],C=c?void 0:u??y;return n.jsxs("span",{className:De("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?a:null),e===void 0&&!m&&d==="check"&&n.jsx(u2,{}),e===void 0&&!m&&d==="remove"&&n.jsx(c2,{}),e===void 0&&!m&&d==="minus"&&n.jsx(d2,{})]})}function Ga({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=ke.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const g of i){const w=x?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;x=[{title:null,items:w.children}],f.push({title:w.label||null,columns:x})}return f},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),b=o.useRef(null),y=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let f=0,x=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,g)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:x,ii:g}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:ue(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ue("menu-tooltip__header"),children:[c.length>1?n.jsx(be,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ue("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ue("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((f,x)=>{const g=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:ue("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:ue("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:ue("menu-tooltip__items"),children:(f.items||[]).map((w,_)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&_>0&&n.jsx("div",{className:ue("menu-tooltip__separator"),role:"separator"}),n.jsx(be,{htmlType:"button",className:ue("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Sn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>C(w,x,_),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},_))})]},x)})})]})}const Ji=".content-area";function Mo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ji);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Dt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ji}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const Lo=52,xr=10,Qi=e=>e&&e>0?e:0;function eu({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=ke.useTranslation(),c=r==="manager"?"malgwi":"manager",p=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,b]=o.useState(0),y=e.length;o.useEffect(()=>{const R=d.current;if(!R)return;const J=()=>{const $=typeof getComputedStyle=="function"?getComputedStyle(R):null,I=R.clientWidth-(parseFloat($?.paddingLeft??"")||0)-(parseFloat($?.paddingRight??"")||0),P=R.querySelector(".bottom-nav__left"),V=P?.nextElementSibling,ie=(P?.offsetWidth??0)+(P&&V?.classList.contains("bottom-nav__divider")?V.offsetWidth:0);b(Math.max(0,I-ie))};if(J(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(J);ne.observe(R);const S=R.querySelector(".bottom-nav__left");return S&&ne.observe(S),()=>ne.disconnect()},[s]);const C=Lo+1,f=R=>Math.max(0,Math.floor((R+xr)/(Lo+xr))),x=y*(Lo+xr)-xr<=m,g=m<=0||l.length===0&&x?y:Math.min(y,f(m-C)),w=m>0&&g<y,_=w?g:y,E=e.slice(0,_),v=e.slice(_),N=w||l.length>0,k=o.useCallback((R,J)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:qa(J)}),[]),D=o.useId(),{open:A,toggle:B,close:F,style:L,triggerRef:q,menuRef:M}=Ua({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),O=o.useCallback((R,J)=>J>0?u("nav.badgeLabel",{label:R,count:J,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,J)=>J>0?u("nav.badgeInsideLabel",{label:R,count:J,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),G=o.useCallback(()=>s?.(c),[s,c]),K=o.useMemo(()=>v.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[v,t,l]),ee=o.useMemo(()=>[{items:[...v.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:!!R.key&&R.key===t,closeOnSelect:!0,disabled:R.state==="disabled",onClick:()=>{R.state!=="disabled"&&(R.key&&a&&(a(R.key),Mo(i,"BottomNav")),F())}})),...l.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),F()}}))]}],[v,l,t,a,F]),re=[...v,...l].reduce((R,J)=>R+Qi(J.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:G})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:E.map((R,J)=>{const ne=Qi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:O(R.label,ne),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),Mo(i,"BottomNav"))}}),ne>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(ne,99),size:24})})]},R.key??`__slot-${J}`)})}),N&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:q,className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:K?.icon??"ellipsis",ariaLabel:T(K?.label??u("nav.more","\uB354\uBCF4\uAE30"),re),selected:!!K,className:"bottom-nav-item",onClick:B,"aria-expanded":A,"aria-controls":A?D:void 0}),re>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(re,99),size:24})}),A&&hn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ue("tooltip__content"),style:L,ref:M,children:n.jsx(Ga,{columns:ee,onClose:F})}),document.body)]})})]})]})}function tu(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function nu(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function p2(e){const{t}=ke.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),u&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:nu(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Sn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),c&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),p&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:a==="account"})]}):null}function au(e){const{t}=ke.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=a?.key??r??"",m=a?.label??s??"",b=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:b,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=p==="disabled",x=`side-nav__item ${i?"active":""} ${p||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(w=>{if(f)return;const _=w.detail>0;if(_)try{w.currentTarget.blur()}catch{}u?.(d,w.currentTarget,_)},[f,d,u]);return n.jsxs("button",{type:"button",className:x,onClick:g,"aria-label":typeof m=="string"?nu(t,m,y):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":f,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),y>0&&n.jsx(Sn,{position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function ru(e){const{t}=ke.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),x=o.useRef(null),[g,w]=o.useState(null);o.useEffect(()=>{const k=x.current;if(!k)return;let D=null;const A=()=>{const{scrollHeight:L,clientHeight:q,scrollTop:M}=k;if(L<=q+1){w(ee=>ee===null?ee:null);return}const O=Math.max(24,q/L*q),T=q-O,G=L-q,K={top:Math.round(M/G*T),height:Math.round(O)};w(ee=>ee&&ee.top===K.top&&ee.height===K.height?ee:K)},B=()=>{if(typeof requestAnimationFrame>"u"){A();return}D===null&&(D=requestAnimationFrame(()=>{D=null,A()}))};A(),k.addEventListener("scroll",B,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(B):null;F?.observe(k);for(const L of Array.from(k.children))F?.observe(L);return()=>{D!==null&&cancelAnimationFrame(D),k.removeEventListener("scroll",B),F?.disconnect()}},[a]);const _=o.useRef(null),E=o.useCallback(k=>{const D=x.current;D&&(k.preventDefault(),_.current={y:k.clientY,top:D.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),v=o.useCallback(k=>{const D=x.current,A=_.current;!D||!A||(D.scrollTop=A.top+(k.clientY-A.y)*(D.scrollHeight/D.clientHeight))},[]),N=o.useCallback(k=>{_.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{ref:x,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:E,onPointerMove:v,onPointerUp:N,onPointerCancel:N})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,D)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(au,{item:k,active:!!k.key&&k.key===r,state:k.disabled?"disabled":void 0,onClick:(A,B,F)=>{if(k.disabled)return;if(k.href){if(tu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),F)try{B?.blur()}catch{}return}if(s?.(k.key),Mo(y,"SideNav"),!F)return;try{B?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const L=document.querySelector(".header");if(L){const q=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&q&&L.matches(":hover"))){L.classList.add("header--force-collapsed");const M=()=>{L.classList.remove("header--force-collapsed"),L.removeEventListener("mouseenter",M)};L.addEventListener("mouseenter",M)}}}})]},k.key??`side-nav__item-${D}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(au,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(p2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var wr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',$o='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',h2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function ou({appMode:e}){const{t}=ke.useTranslation(),a=e==="manager",r=a?$o:wr,s=h2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function su({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}){const{t:C}=ke.useTranslation(),f=vn("(max-width: 767px)"),x=o.useMemo(()=>(a??[]).filter(L=>!L.section&&(L.key||L.label)).map(L=>({key:L.key,label:typeof L.label=="string"?L.label:void 0,icon:L.icon,state:L.disabled?"disabled":void 0,badgeCount:L.badge})),[a]),g=o.useCallback(L=>{const q=a?.find(M=>M.key===L);if(!q?.disabled){if(q?.href){tu(q.href)&&window.open(q.href,"_blank","noopener,noreferrer");return}t?.(L)}},[a,t]),w=o.useMemo(()=>{const L=[];return i&&L.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:p}),d&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,p,h,d,c,l]),_=o.useCallback((L,q)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:qa(q)}),[]),E=o.useId(),{open:v,toggle:N,close:k,style:D,triggerRef:A,menuRef:B}=Ua({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),F=o.useMemo(()=>[{items:w.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===e),closeOnSelect:!0,onClick:()=>{L.onClick?.(),k()}}))}],[w,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ou,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(be,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:N,"aria-expanded":v,"aria-controls":v?E:void 0}),!!u&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),v&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ue("tooltip__content"),style:D,ref:B,children:n.jsx(Ga,{columns:F,onClose:k})}),document.body)]})]}),n.jsx(ru,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b}),f&&n.jsx(eu,{items:x,activeKey:e??void 0,onChange:g,scrollContainer:y,appMode:m,onAppModeChange:b})]})}const m2=su;function ln(e){const{type:t="dot",size:a,className:r="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&Dt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&Dt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:p="default",fill:h="filled",minWidth:d,iconLeft:m,iconRight:b,color:y}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",x=(C?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(C?"body-2":"body-2b"),g={small:12,medium:14,large:16}[f]??14,w=De("badge",C?"badge--bar":"",`badge--${p}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",x,r),_=y?.startsWith("--")?`var(${y})`:y,E=d!==void 0||_?{...d!==void 0?{minWidth:typeof d=="number"?`${d}px`:d}:{},..._?{"--badge-color":_}:{}}:void 0;return n.jsxs("span",{className:w,style:E,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(lt,{icon:m,size:g,className:"badge__icon"}),u??c,b&&n.jsx(lt,{icon:b,size:g,className:"badge__icon"})]})}const C2=()=>Zt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function lu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return ba(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ba(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function f2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function b2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||C2()}function g2(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function iu(e){return{type:e.type??f2(e),plan:b2(e),label:e.label,price:lu(e.price),originalPrice:lu(e.originalPrice),discountLabel:e.discountLabel}}var y2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',v2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',uu='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const aa={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Ro=new WeakMap;function _2(e){if(e)return Ro.get(e)}function Rn(e,t){e&&(e.style.setProperty(aa.text,t.text),e.style.setProperty(aa.sub,t.sub),t.copyrightColor&&e.style.setProperty(aa.copyright,t.copyrightColor),Ro.set(e,t))}function Pn(e){e&&(e.style.removeProperty(aa.text),e.style.removeProperty(aa.sub),e.style.removeProperty(aa.copyright),Ro.delete(e))}const cu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function du(e={}){const t=It(cu,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${uu}")`}})]})}const pu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",va=240;var Ka='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const x2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},w2=100,B2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function hu(e={}){const t=It(x2,Rn,Pn),a="var(--color-main)",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:B2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*w2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${Ka}")`}})]})}const k2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},A2=100,N2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function E2(e={}){const t=It(k2,Rn,Pn),a="#ffffff",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:N2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*A2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${uu}")`}})]})}const D2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function S2(e={}){const t=It(D2,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${Ka}")`}})]})}const j2={Logo_SpeechEar_ko:{"":wr,_mono:y2},Logo_SpeechEarManager_ko:{"":$o,_mono:v2}};function T2(e,t){if(e)return j2[e]?.[t??""]??void 0}const M2={speechear:wr,manager:$o},L2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},mu=10;function $2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function Cu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function R2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Zt.t("passCard.specialLabel");return r?n.jsx(S2,{}):s?n.jsx(E2,{}):n.jsx(hu,{})}return n.jsx(du,{})}function fu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:b,logoSrc:y,label:C,price:f,originalPrice:x,discountLabel:g,onUse:w,onRefund:_,onDelete:E}){const{t:v}=ke.useTranslation(),N=t?iu(t):void 0,k=s??N?.type??"speechear",D=r??N?.plan??v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=C??N?.label,B=f??(a?N?.price:void 0),F=x??(a?N?.originalPrice:void 0),L=g??N?.discountLabel,q=o.useMemo(()=>{if(B)return null;const W=t?.durationDays??g2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:Cu(i,v)}:null;const z=W*86400;let ae;if(i!=null)ae=i;else if((c==="active"||c==="expired")&&l){const le=new Date(l).getTime();if(Number.isNaN(le))return null;const Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Pe=/^(\d{4})-(\d{2})-(\d{2})/.exec(Wa()),Fe=Math.round(Be&&Pe?(Date.UTC(+Be[1],+Be[2]-1,+Be[3])-Date.UTC(+Pe[1],+Pe[2]-1,+Pe[3]))/864e5:(le-Date.now())/864e5);ae=Math.max(0,u?Fe+1:Fe)*86400}else c==="expired"?ae=0:ae=z;const ve=$2(ae),me=Math.max(0,Math.min(100,Math.floor(Math.min(ve,z)/z*100)));return c==="pending"&&me>=100?null:{percent:me,remainingLabel:c==="expired"?v("passCard.expired","\uB9CC\uB8CC\uB428"):Cu(ae,v)}},[B,c,l,i,u,t?.durationDays,t?.code,v]),M=o.useRef(null),[O,T]=o.useState({}),[G,K]=o.useState(null),ee=!!(w||_||E),re=o.useRef(!1),R=o.useRef(void 0),[J,ne]=o.useState(y);o.useLayoutEffect(()=>{ne(y)},[y]),o.useLayoutEffect(()=>{const W=M.current;W&&(d!==void 0&&W.style.setProperty("--pass-card-text",d),m!==void 0&&W.style.setProperty("--pass-card-sub",m),b!==void 0&&W.style.setProperty("--pass-card-copyright",b))},[d,m,b]),o.useLayoutEffect(()=>{const W=M.current;if(!W)return;const z=_2(W);if(!y){const ae=L2[k],ve=c==="expired"?"_mono":z?.logoColor??"",me=T2(ae,ve);ne(me)}},[p,y,k,c]);const S=W=>{const z=M.current;if(!z)return null;const{left:ae,top:ve,width:me,height:le}=z.getBoundingClientRect(),Be=(W.clientX-ae)/me-.5;return{rotateX:-((W.clientY-ve)/le-.5)*mu,rotateY:Be*mu}},$=(W,z)=>{const ae=z*-.7,ve=W*.7+10,me=20+(Math.abs(W)+Math.abs(z))*.4;return`${ae}px ${ve}px ${me}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(W=>{if(ta())return;re.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{re.current=!1},200);const z=S(W);z&&T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),P=o.useCallback(W=>{if(ta())return;const z=S(W);if(!z)return;const ae=re.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.rotateY),transition:ae})},[]),V=o.useCallback(()=>{clearTimeout(R.current),re.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ie=o.useCallback(()=>K(null),[]),U=o.useMemo(()=>{const W=v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),z=D.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),ae=z.match(/^(.*?)(일|년)$/);return ae?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ae[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ae[2]==="\uB144"?v("passCard.unitYear","\uB144"):v("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:z})},[D,v]),ce=o.useMemo(()=>{const W=ba(B);if(!W)return null;const z=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!z)return n.jsx("span",{className:"h1",children:W});const[,ae,ve,me]=z;return n.jsxs(n.Fragment,{children:[ae&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ae}),n.jsx("span",{className:"h1 pass-card__price-amount",children:ve}),me.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:me.trim()})]})},[B]),Z=o.useCallback(()=>{ee&&K(W=>{if(W)return null;const z=M.current?.getBoundingClientRect();if(!z)return null;const ae=50;return{left:z.left,right:z.right,width:z.width,height:z.height,x:z.x,y:z.y+ae,top:z.top+ae,bottom:z.bottom+ae}})},[ee]),H=o.useCallback(W=>{ee&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),Z())},[ee,Z]),te=[{items:[...w?[{label:v("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),K(null)},closeOnSelect:!0}]:[],..._?[{label:v("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),K(null)},closeOnSelect:!0}]:[],...E?[{label:v("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{E(),K(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:M,className:`pass-card pass-card--${c}${ee?" pass-card--clickable":""}`,style:O,onMouseEnter:I,onMouseMove:P,onMouseLeave:V,onPointerUp:W=>{W.pointerType==="touch"&&V()},onPointerCancel:W=>{W.pointerType==="touch"&&V()},onClick:Z,onKeyDown:ee?H:void 0,role:ee?"button":void 0,tabIndex:ee?0:void 0,"aria-label":e,"aria-haspopup":ee?"menu":void 0,"aria-expanded":ee?!!G:void 0,children:[p??R2(k,D,A),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:J??M2[k],className:"pass-card__logo",alt:k==="manager"?v("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):v("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:U}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?v("passCard.labeledPlan",{label:A}):v("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),B?n.jsxs("div",{className:"pass-card__price-area",children:[L&&n.jsx("span",{className:"pass-card__discount body-3",children:L}),n.jsxs("div",{className:"pass-card__price",children:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ba(F)}),ce]})]}):q?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:q.remainingLabel}),q.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:q.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),G&&n.jsx(Bn,{anchorRect:G,onClose:ie,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:te,onClose:ie,size:"small"})})]})}const P2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function F2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=It(P2,Rn,Pn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${Ka}")`}})]})}const I2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function O2(e={}){const t=It(I2,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${Ka}")`}})]})}function z2(e,t){if(e){if(t==="manager_pro")return n.jsx(O2,{});if(t==="manager_standard")return n.jsx(F2,{});if(t==="manager_lite")return n.jsx(hu,{})}}function W2(e){const t=ba(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function H2(e){const{t}=ke.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=_=>!!_&&!!u?.includes(_),p=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>p(_)&&c(_.code)),d=_=>{const E=_.prices?_.prices[i]:_.price;return E?(s.tiers||[]).some(v=>!!v.badge&&v.originals?.[i]===E):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=_=>_.prices?_.prices[i]:_.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB34\uB8CC"||E===b||E==="0\uC6D0"||typeof E=="string"&&/\d/.test(E)&&!/[1-9]/.test(E)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB38\uC758"||E===y}),g=s.group==="org",w=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(ln,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:m},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(be,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(_=>{const E=_.label||a,v=p(_),N=v||_.openPromo===!0,k=E.replace(/^오픈\s*특가\s*/,"")||a,D=_.prices?_.prices[i]:_.price,A=_.badge?N?`${r}
823
+ ${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return d(_)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${_.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:_.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:W2(D)})})]},_.id);const B=s.tier??(g?s.title:void 0),F=n.jsx(fu,{showPrice:!0,product:{type:w,code:_.code,name:k,label:B,price:D,originalPrice:_.originals?.[i]??void 0,discountLabel:A},bg:z2(g,s.id)}),L=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?q=>{q.target===q.currentTarget&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:F},_.id)})})})})]})}function V2({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Po='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const bu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function q2(){const e=It(bu,Rn,Pn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Po}")`}})})}const gu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function U2(e={}){const t=It(gu,Rn,Pn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${Ka}")`}})]})}function yu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:De("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const Ya=(e,t,a)=>e+(t-e)*a;function G2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:b=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:g=!1,shortcutAnchor:w="top-right",shortcutScale:_,scaleShortcut:E=!1}){const{t:v}=ke.useTranslation(),N=Math.max(0,Math.min(1,a)),k=t/2,D=110/300,A=.18,B=W=>t*(D+(W-1)*A),F=W=>{const z=B(W.row??1),ae=W.angleDeg*Math.PI/180;return{x:k+z*Math.cos(ae),y:k+z*Math.sin(ae)}},L=Math.max(...e.map(W=>W.row??1),1),q=t*.08,M=t*.1,O=t*.24,T=t-2*q,G=t-M-O,K=t-O/2,ee=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,z)=>W-z),[e]),re=ee.length,R=Math.max(68,re>1?T/(re-1):0),J=o.useMemo(()=>new Map(ee.map((W,z)=>[W,z])),[ee]),ne=W=>{const z=J.get(W.deg)??0,ae=k+(z-(re-1)/2)*R,ve=L>1?Math.min(68,G/(L-1)):0,me=ve*(L-1),le=M+(G-me)/2,Be=L===1?M+G*.4:le+(L-(W.row??1))*ve;return{x:ae,y:Be}},S=W=>{const z=F(W),ae=ne(W);return{x:Ya(z.x,ae.x,N),y:Ya(z.y,ae.y,N)}},$={x:k,y:Ya(k,K,N)},I=Math.round(b*1.2),P=Math.round(Math.max(16,Math.min(80,b*.7))),V=[],ie=new Map;for(const W of e){const z=W.row??1;ie.has(z)||ie.set(z,[]),ie.get(z).push(W)}for(const[W,z]of ie.entries()){if(z.length<2)continue;const ae=[...z].sort(($e,nt)=>$e.deg-nt.deg),ve=ae.map($e=>S($e)),me=ae.map($e=>$e.deg),le=me[me.length-1]-me[0],Be=le/(me.length-1),Pe=360-le,Fe=ae.length>=3&&Be>0&&Pe<=Be*1.5,Ae=Math.round(B(W)*1e3)/1e3,se=($e,nt,ct,at)=>{const rt=(nt.angleDeg-$e.angleDeg+540)%360-180;if(rt===0)return`L ${at.x} ${at.y}`;if(N===0)return`A ${Ae} ${Ae} 0 0 ${rt>0?1:0} ${at.x} ${at.y}`;const Ee=($e.angleDeg+rt/2)*Math.PI/180,Ue={x:k+Ae*Math.cos(Ee),y:k+Ae*Math.sin(Ee)},Ne={x:(ct.x+at.x)/2,y:(ct.y+at.y)/2},Ye={x:Ya(Ue.x,Ne.x,N),y:Ya(Ue.y,Ne.y,N)},et={x:2*Ye.x-Ne.x,y:2*Ye.y-Ne.y};return`Q ${et.x} ${et.y} ${at.x} ${at.y}`},ye=Fe?[...ae,ae[0]]:ae,Ce=Fe?[...ve,ve[0]]:ve;let xe=`M ${Ce[0].x} ${Ce[0].y}`;for(let $e=1;$e<Ce.length;$e++)xe+=" "+se(ye[$e-1],ye[$e],Ce[$e-1],Ce[$e]);V.push({key:`arc-${W}`,d:xe})}const U=o.useMemo(()=>new Set(s??[]),[s]),ce=W=>({idle:"",active:v("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:v("soundCompass.state.played","\uB4E4\uC74C"),correct:v("soundCompass.state.correct","\uC815\uB2F5"),wrong:v("soundCompass.state.wrong","\uC624\uB2F5")})[W],Z=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return U.has(W.id)?"played":"idle"},H=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,te=(W,z)=>{switch(W){case"played":case"correct":return n.jsx(Vs,{size:z});case"wrong":return n.jsx(el,{size:z});default:return n.jsx(Qs,{size:z})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[N===0&&e.map(W=>{const{x:z,y:ae}=S(W);return n.jsx("line",{x1:$.x,y1:$.y,x2:z,y2:ae,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),V.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),g&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:$.x-I/2,top:$.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:$.x,top:$.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:$.x,top:$.y},children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}),e.map((W,z)=>{const{x:ae,y:ve}=S(W),me=Z(W),le=H(W),Be={..._!==void 0||E?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:me!=="idle"?10:1},Pe=b,Fe=Math.round(Math.max(10,Math.min(56,Pe*.38))),Ae=Math.round(Math.max(7,Math.min(18,Pe*.2))),se=Math.round(Math.max(10,Math.min(56,Pe*.4))),ye=y==="answered"&&(me==="played"||me==="correct"||me==="wrong"),Ce=y===!0||ye,xe=!ye;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:ae-Pe/2,top:ve-Pe/2},children:[le&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${me}`+(le==="once"?" sound-compass__pulse--once":""),style:{width:Pe,height:Pe,...le==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${me}`,style:{width:Pe,height:Pe},"aria-label":ce(me)?`${W.label}, ${ce(me)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Ce&&te(me,Fe),xe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?Ae:se},children:z+1})]}),W.shortcut&&n.jsx(yu,{keys:W.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function K2({orientation:e="horizontal",label:t,className:a=""}){const r=De("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function vu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function Y2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(vu,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&a?.(h.value)}},h.value))})}const Z2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function X2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=ke.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const g=d.current;g&&g.contains(document.activeElement)&&fr(g),h(!0),l?.()},[l]);if(p)return null;const b=De("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,f=!!t,x=!!(a||r);return n.jsxs("div",{ref:d,className:b,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Z2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&x&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&x&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const J2={ready:"search",guide:"info",error:"circle-alert"};function Q2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function ev({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??J2[e],u=De("search-summary",`search-summary--${e}`,l),c=t??a,p=typeof c=="string"&&r&&r.length>0?Q2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function Za({title:e,items:t}){const{t:a}=ke.useTranslation(),{anchorRect:r,openAt:s,close:l}=_r(),i=o.useRef(null),u=gr(!!r,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(be,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Gn(c)||s(c.currentTarget)},onPointerLeave:c=>{Gn(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ta()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Un,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}const Lt=40,ra=32;function tv({items:e=[],value:t,onChange:a,className:r="",size:s=Lt}){const l=o.useId(),{t:i}=ke.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,p=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===p&&!C.disabled)?.key??c,d=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=d())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=d(),x=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(x+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(x-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},y=e.find(C=>C.key===p);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===p,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===p?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:b,children:C.label},C.key))}),y&&n.jsx("div",{id:`tabs__panel-${l}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const nv={xs:12,sm:16,md:20,lg:28,xl:36};function av(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function rv({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=ke.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?av(t):"",h=!!e&&!c,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:nv[a],className:"avatar__icon"})]})}function ov(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function sv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=ke.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,b]=o.useState([]),y=l??m,C=v=>{if(!v||v.length===0)return;const N=Array.from(v).filter(D=>ov(D,t));if(N.length===0)return;const k=a?N:N.slice(0,1);if(l===void 0){const D=a?[...y,...k]:k;b(D),e?.(D)}else e?.(k)},f=v=>{v.preventDefault(),!r&&d(!0)},x=v=>{v.preventDefault(),d(!1)},g=v=>{v.preventDefault(),d(!1),!r&&C(v.dataTransfer.files)},w=v=>{const N=v.target;try{C(N.files)}finally{N.value=""}},_=()=>{r||p.current?.click()},E=v=>{if(!r&&(i?.(v),l===void 0)){const N=y.filter((k,D)=>D!==v);b(N),i||e?.(N)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:De("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:_,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),_())},onDragOver:f,onDragLeave:x,onDrop:g,children:[n.jsx(lt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:v=>{v.stopPropagation(),_()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:w,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((v,N)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:v.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:v.name}),disabled:r,onClick:()=>E(N),children:n.jsx(lt,{icon:"x",size:14})})]},`${v.name}-${N}`))})]})}function lv({items:e,className:t=""}){const{t:a}=ke.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(lt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const iv={small:14,medium:20,large:28};function uv({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=ke.useTranslation(),c=r||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,b=iv[s],y=v=>{v!==e&&t?.(v)},C=v=>{c||y(v)},f=v=>{c||ta()||h(v)},x=o.useRef(null),g=v=>{const N=Math.min(a,Math.max(1,v));y(N),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(N))?.focus()},w=v=>{if(!c){switch(v.key){case"ArrowRight":case"ArrowUp":g((d||0)+1);break;case"ArrowLeft":case"ArrowDown":g((d||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}v.preventDefault()}},_=d>=1&&d<=a?Math.round(d):1,E=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:E,onPointerUp:v=>{v.pointerType==="touch"&&E()},onPointerCancel:v=>{v.pointerType==="touch"&&E()},children:Array.from({length:a},(v,N)=>{const k=N+1,D=Math.max(0,Math.min(1,m-N)),A=D>0&&D<1,B=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${D*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:B},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===_?0:-1,onClick:()=>C(k),onMouseEnter:()=>f(k),children:B},k)})})}const cv=20,dv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function pv({value:e,onChange:t,palette:a=dv,size:r=Lt,className:s="",ariaLabel:l}){const{t:i}=ke.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(lt,{icon:"check",size:cv,className:"color-picker__check"})},u)})})}function _u({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=ke.useTranslation(),p=u==="small",h=De("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[b,y]=o.useState(!1),C=o.useMemo(()=>{const k=r&&typeof r=="object"?{...r}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[g,w]=o.useState(null);o.useLayoutEffect(()=>{b&&w(m.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{y(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const k=D=>{const A=m.current;if(!A)return;const B=D.target;B&&!A.contains(B)&&y(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[b]);const _=o.useCallback(()=>{i&&y(!0)},[i]),E=o.useCallback(()=>{i&&y(!1)},[i]),v=o.useCallback(()=>y(!1),[]),N=o.useCallback(k=>{if(k.key==="Escape"){y(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),y(D=>!D))},[]);return n.jsxs("span",{ref:m,className:De("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:E,onFocus:_,onBlur:E,onKeyDown:N,role:"button",tabIndex:0,"aria-label":typeof f=="string"?c("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:d}),b&&f&&n.jsx(Ln,{anchorRect:g,text:typeof f=="string"?f:void 0,offset:8,onClose:v,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Kn=null;function Xa(e){if(Kn&&Kn!==e)try{Kn()}catch{}return Kn=e,()=>{Kn===e&&(Kn=null)}}function Br(e){if(Kn===e){Kn=null;try{e()}catch{}}}function Ja(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Dt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function hv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function mv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,b]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=hv(e,t),x=`${C.join(",")}|${f??""}`,g=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const E=[],v=[];for(const N of C)try{const k=Nl(N,f);if(!k){E.push("");continue}let D=null;try{D=await El(k)}catch{}if(!D)try{const A=await Dl(k);A&&(D=URL.createObjectURL(A),v.push(D))}catch{}E.push(D??"")}catch{E.push("")}_?v.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}):(y.current.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}),y.current=v,u({key:x,urls:E}))})(),()=>{_=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const w=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),p.current){h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!g.filter(Boolean).length)return;let E=null;const v=()=>{p.current=!1,E?.stop()};h.current=v;const N=Xa(v);p.current=!0,r(!0);for(let k=0;k<g.length&&p.current;k++){const D=g[k];if(D&&(l(k),E=Ja(D),c.current=E.el,!await E.done))break}N(),h.current===v&&(h.current=null,p.current=!1,r(!1),l(-1))},[g]);return o.useEffect(()=>()=>{h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:g,previewHover:m,setPreviewHover:b,previewBtnRef:d,handlePreview:w}}const Cv=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Fo(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:b=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:g,size:w="square"}=e||{},{t:_}=ke.useTranslation(),[E,v]=o.useState(!1),N=o.useRef(null),[k,D]=o.useState(!1);o.useEffect(()=>{N.current?.matches(":hover")&&D(!0)},[]);const{playing:A,playingIndex:B,previewUrls:F,previewHover:L,setPreviewHover:q,previewBtnRef:M,handlePreview:O}=mv(r,a?.key),T=o.useCallback(()=>{f?f():v(!0)},[f]),G=o.useCallback(()=>v(!1),[]),K=o.useCallback(()=>D(!0),[]),ee=o.useCallback(()=>D(!1),[]),re=o.useCallback(()=>q(!0),[q]),R=o.useCallback(()=>q(!1),[q]),[J,ne]=o.useState(null);o.useLayoutEffect(()=>{L&&ne(M.current?.getBoundingClientRect()??null)},[L,M]);const[S,$]=o.useState(null);o.useLayoutEffect(()=>{k&&!E&&d&&$(N.current?.getBoundingClientRect()??null)},[k,E,d]);const I=o.useCallback(Ne=>{Ne.target===Ne.currentTarget&&(Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),T())},[T]),P=r||null,V=o.useMemo(()=>{if(!d)return null;const Ne=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ye=Ne&&Ne.length>0?Ne:Cv(P);return Ye&&Ye.length>0?Ye:null},[d,h,P]),ie=o.useCallback(Ne=>{Ne.stopPropagation(),m?.()},[m]),U=o.useCallback(Ne=>Ne.stopPropagation(),[]),ce=o.useCallback(Ne=>{typeof C=="function"&&C(Ne)},[C]),Z=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!Z&&(p!=null&&r?.id!=null?p.has(String(r.id)):!1);Vi("speechear.popup.close",G);const te=ei(),W=`${a?.label||""} ${t+1}`,z=P?.title||P?.name||W;let ae=a?.icon,ve,me="",le="";try{const Ne=P?.category_0||P?.category_main_code||P?.category_main,Ye=P?.category_1||P?.category_sub_code||P?.category_sub,et=te.find(ft=>ft.key===Ne);et?.icon&&(ae=et.icon),!ve&&et?.color&&(ve={"--t-item-fg":et.color}),!ve&&P?.iconColor&&(ve={"--t-item-fg":P.iconColor}),me=et?_(`topic.${et.key}`,{defaultValue:et.label||""}):"";try{const ft=et?.subs?.find(vt=>vt.key===Ye);le=ft?_(`topic.sub.${ft.key}`,{defaultValue:ft.label||""}):""}catch{}}catch{}const Be=le?`${me} / ${le}`:me||a?.label||z,Pe=Ne=>_("training.countQuestions",{n:Ne,count:Ne}),Fe=Ne=>_("training.countSentences",{n:Ne,count:Ne});let Ae="";try{if(P)if(a?.key==="LISTEN_IN_NOISE"){let Ne=0;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0?Ne=P.sentences.length:P.sentences&&(Ne=1),Ae=Fe(Ne)}else if(a?.key==="SHORT_STORY"){let Ne=1;Array.isArray(r?.items)?Ne=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Ne=r.raw.items.length:Array.isArray(P?.questions)?Ne=P.questions.length:Array.isArray(P?.sentences)&&(Ne=P.sentences.length),Ae=Pe(Ne)}else if(a?.key==="LONG_STORY"){let Ne=1;if(Array.isArray(P.items)&&P.items.length>0){const Ye=P.items.reduce((et,ft)=>{const vt=ft.questionItems;return Array.isArray(vt)?et+vt.length:Array.isArray(ft.questions)?et+ft.questions.length:et},0);Ne=Ye>0?Ye:P.items.length}else Array.isArray(P.questions)&&P.questions.length>0?Ne=P.questions.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length);Ae=Pe(Ne)}else if(a?.key==="ORDERING_SENTENCE"){let Ne=1;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length),Ae=Fe(Ne)}else Array.isArray(P.items)&&(Ae=P.items.length>0?Pe(P.items.length):"")}catch{}const se=w==="row",ye=w==="list"||se,Ce=w==="compact",xe=w==="small",$e=xe&&a?.key?Jf().find(Ne=>Ne.key===a.key):void 0,nt=$e?ti[$e.key]:void 0,ct=$e?nt?_(`trainingType.${nt}.title`,{defaultValue:$e.label}):$e.label??"":"",at=y&&a?.label&&a.label!==String(z)?String(a.label):xe&&ct&&ct!==String(z)?ct:"",rt=!!at,Ee=g!==void 0?g:Ae,Ue=[at,typeof z=="string"?z:"",Ee].map(Ne=>String(Ne??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:N,className:`training-block-button${ye?" training-block-button--list":""}${se?" training-block-button--row":""}${Ce?" training-block-button--compact":""}${xe?" training-block-button--small":""}${Z?" training-block-button--completed":""}${H?" training-block-button--selected":""}${rt&&!xe?" training-block-button--withType":""}${xe&&!rt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:K,onPointerLeave:ee,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ue||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
+ `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[y&&a?.label&&a.label!==String(z)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),xe&&ct&&ct!==String(z)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ct}),n.jsx(_u,{icon:ae,label:z,tooltip:Be,wrapperStyle:ve,iconSize:xe||Ce?"small":"medium"}),!b&&(Z||H)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":Z?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":_("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ce?"body-3":xe?"body-3b":"h3"}`,children:String(z)}),n.jsxs("div",{className:"training-block-button__description",children:[Ee?n.jsx("div",{className:`training-block-button__count ${xe?"caption-2":"caption-1"}`,children:Ee}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:_("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:xe?12:20})})]}),(ye&&!se||xe)&&F.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:U,onPointerEnter:re,onPointerLeave:R,children:n.jsx(be,{htmlType:"button",size:xe?28:32,type:"dot",icon:A?"pause":"play",variant:xe?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(z).trim()?A?_("training.stopFor",{name:z,defaultValue:`${z} \uC815\uC9C0`}):_("training.previewFor",{name:z,defaultValue:`${z} \uBBF8\uB9AC \uB4E3\uAE30`}):A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:O})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Ne=>{Ne.stopPropagation(),x(Ne)},children:n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(z).trim()?_("common.moreFor",{name:z}):_("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Ln,{anchorRect:J,text:A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),k&&!E&&d&&(V?n.jsx(Un,{anchorRect:S,items:V,activeIndex:B,onClose:ee}):P?.subTitle?n.jsx(Ln,{anchorRect:S,text:P.subTitle,offset:8,onClose:ee}):null),E&&i&&i({trainingData:P,typeKey:a?.key??"",onClose:G,onComplete:ce,popupTitle:String(z),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ae,popupIconTooltip:String(Be),popupWrapperStyle:ve})]})}const xu=200;function fv(e){return e.itemId?(ab()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function wu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=ke.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):ob(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(fv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:ue("training-tooltip__box"),children:n.jsx("div",{className:ue("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ue("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ue("training-tooltip__section"),children:[n.jsx("div",{className:ue("training-tooltip__section-header"),children:n.jsx("span",{className:ue("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ue("training-tooltip__items"),children:d.map((b,y)=>n.jsx(Fo,{index:y,type:h,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??y)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:ue("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const bv=200;function gv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!r,d=De("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[b,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(b&&r&&s),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{g(),y(null)},[g]),_=o.useCallback(()=>{!s||!r||(g(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},xu))},[s,r,g]),E=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},bv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!x)return;const v=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),N=k=>{v(k.target)?g():E()};return document.addEventListener("pointerover",N,!0),()=>document.removeEventListener("pointerover",N,!0)},[x,g,E]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?v=>{w(),u(v)}:void 0,onKeyDown:u?v=>{v.key!=="Enter"&&v.key!==" "||(v.preventDefault(),v.currentTarget.click())}:void 0,onPointerEnter:v=>{v.pointerType==="touch"||v.pointerType==="pen"?w():_()},onMouseEnter:c,onMouseLeave:v=>{E(),p?.(v)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(wu,{plan:r,anchorRect:b,onClose:w})]})}let Qa=0,Bu="",Io="",er=0;function ku(){return Au(!1)}function yv(){return Au(!0)}function Au(e){const t=typeof document<"u";Qa===0&&t&&(Bu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(er===0&&(Io=document.body.style.paddingRight),er++,document.body.style.paddingRight="0px"),Qa++;let a=!1;return()=>{a||(a=!0,Qa=Math.max(0,Qa-1),e&&t&&(er=Math.max(0,er-1),er===0&&(Io?document.body.style.paddingRight=Io:document.body.style.removeProperty("padding-right"))),Qa===0&&t&&(document.body.style.overflow=Bu))}}function vv(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function _v({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=ke.useTranslation(),m=o.useId(),b=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,w=ku(),_=b.current;return _o(_,g),_?.focus(),()=>{w();const E=document.activeElement;(!E||E===document.body||_&&_.contains(E))&&xo(g)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return ea(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return yo(b,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:De("dialog",p),onPointerDown:i?g=>{x.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const w=x.current;x.current=!1,w&&g.target===g.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:De("dialog__surface",`dialog__surface--${l}`,h),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(vv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function xv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=ke.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:De("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:De("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:De("board__td",`board__cell--${b.align??"left"}`),children:b.render(d,m)},b.key))},a(d,m)))})]})]})}function wv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:De("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function Bv({groups:e,className:t=""}){return n.jsx("div",{className:De("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function kv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:De("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function Av({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ha(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function Nv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:De("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function Ev({items:e,className:t=""}){return n.jsx("ul",{className:De("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}const tr=new Map;function _n(e){const{t}=ke.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=Lt,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=o.useRef(null),b=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!Wn||d!=null&&d!=="")){if(tr.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),tr.size>1){const _=[...tr.values()].sort();Dt(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${tr.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${_.join(" / ")}`)}return()=>{tr.delete(y)}}},[d,C,y]);const f=_=>{if(!b.length)return;const E=Math.max(0,b.findIndex(N=>N.key===r)),v=_==="first"?b[0]:_==="last"?b[b.length-1]:b[(E+_+b.length)%b.length];v&&(s(v.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(N=>N.dataset.segkey===v.key)?.focus())},x=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}_.preventDefault()},g=_=>{const E=v=>typeof v=="string"||typeof v=="number";if(!(!E(_.label)||_.count==null||_.count===!1||!E(_.count)))return`${_.label}, ${_.count}`},w=b.some(_=>_.key===r)?r:b[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:De("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,p&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(be,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===w?0:-1,label:_.label,count:_.count,ariaLabel:g(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}const Dv=260;function Fn(e){const{t}=ke.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:b="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:g=!0,className:w="",ariaLabel:_,useTitle:E=!0,inline:v=!1,size:N,layer:k="modal",height:D,fillBody:A=!1,resetScrollKey:B}=e||{},[F,L]=o.useState(!1),q=o.useRef(!1),M=o.useRef(null),O=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[v,a,_,w]),o.useEffect(()=>{B!==void 0&&T.current&&(T.current.scrollTop=0)},[B]);const[G,K]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const te=()=>K(H.scrollHeight>H.clientHeight+1);if(te(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(te);W.observe(H);const z=H.firstElementChild;return z&&W.observe(z),()=>W.disconnect()},[i,B]),o.useEffect(()=>{if(!v)return ku()},[v]);const ee=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(v)return;const H=ee.current,te=M.current;return _o(te,H),te&&!te.contains(document.activeElement)&&(te.querySelector(Dn)??te).focus(),()=>{const W=document.activeElement;(!W||W===document.body||te&&te.contains(W))&&xo(H)?.focus?.()}},[v]),yo(M,!v);const re=o.useRef(!0),R=wo(),J=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,J.current&&(clearTimeout(J.current),J.current=null)}),[]);const ne=o.useCallback(()=>{!re.current||!q.current||(q.current=!1,L(!1))},[]),S=o.useCallback((H,te=!1)=>{if(te&&!re.current||q.current)return;q.current=!0,L(!0);const W=setTimeout(()=>{J.current===W&&(J.current=null);let z;try{z=H?H():void 0}catch{ne();return}z&&typeof z.then=="function"&&z.then(()=>{setTimeout(ne,120)},ne)},R?0:Dv);te&&(J.current=W)},[ne,R]),$=o.useCallback(()=>{f||x&&x()===!1||S(C,!0)},[S,C,f,x]),I=o.useRef($);o.useEffect(()=>{I.current=$});const P=!v&&!!C;o.useEffect(()=>{if(P)return ea(()=>I.current())},[P]);const V=P&&g,ie=o.useRef(!1),U=H=>{ie.current=H.target===H.currentTarget},ce=H=>{const te=ie.current;ie.current=!1,te&&H.target===H.currentTarget&&$()},Z=n.jsx("div",{className:`popup ${v?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${w}`,onPointerDown:V?U:void 0,onClick:V?ce:void 0,onMouseDown:v?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${N?` popup-panel--${N}`:""}${D!=null?" popup-panel--has-height":""}${A?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:v?void 0:"dialog","aria-modal":v?void 0:!0,"aria-labelledby":!v&&E&&a?O:void 0,"aria-label":!v&&!(E&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!E&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:O,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:O,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(_n,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(H=>({key:H.key,label:H.label,disabled:H.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:G?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:S,closeWithAnimation:$}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:S,closeWithAnimation:$}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:S,closeWithAnimation:$}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((H,te)=>n.jsx(be,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:S,closeWithAnimation:$})},te))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:S,closeWithAnimation:$}):c}):null]})});return v||typeof document>"u"?Z:hn.createPortal(Z,document.body)}function Nu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:p=>t?.(p.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function xn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Lt,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const{t:d}=ke.useTranslation(),m=r??d("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((M,O)=>{const T=window.innerHeight-M.bottom<260&&M.top>260;return{position:"fixed",left:M.left,minWidth:M.width,...T?{bottom:window.innerHeight-M.top+6}:{top:M.bottom+6},zIndex:qa(O)}},[]),{open:x,setOpen:g,toggle:w,style:_,triggerRef:E,menuRef:v}=Ua({computeStyle:f}),[N,k]=o.useState(-1),D=o.useCallback(()=>k(-1),[]),A=e.find(M=>M.value===t);o.useEffect(()=>{if(x){const M=e.findIndex(O=>O.value===t);k(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const O=v.current;if(!O)return;const T=O.querySelectorAll(".dropdown__option")[M];T&&(O.scrollTop=Math.max(0,T.offsetTop-O.clientHeight/2+T.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&k(M=>{if(M>=0&&M<e.length)return M;const O=e.findIndex(T=>T.value===t);return O>=0?O:e.length?0:-1})},[x,e.length]);const B=o.useCallback(()=>{s||w()},[s,w]),F=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),g(!1))},[a,g,s,t]);o.useEffect(()=>{s&&g(!1)},[s,g]);const L=o.useCallback(M=>{if(!s){if(!x){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),g(!0));return}if(M.key==="Escape"){M.preventDefault(),g(!1);return}M.key==="ArrowDown"?(M.preventDefault(),k(O=>{let T=O+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:O})):M.key==="ArrowUp"?(M.preventDefault(),k(O=>{let T=O-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:O})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[N]?F(e[N]):g(!1))}},[s,x,e,N,F,g]),q=x?n.jsx("div",{ref:v,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:D,onMouseDown:M=>M.preventDefault(),children:e.map((M,O)=>n.jsxs("button",{id:`${b}-option-${O}`,type:"button",role:"option","aria-selected":M.value===t,className:De("dropdown__option body-2",M.value===t?"dropdown__option--active":"",O===N?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(M),onMouseEnter:()=>k(O),disabled:M.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:M.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),M.label]},M.value))}):null;return n.jsxs("div",{ref:C,className:De("dropdown",`dropdown--s${i}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:E,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?b:void 0,"aria-activedescendant":x&&N>=0?`${b}-option-${N}`:void 0,"aria-label":p,"aria-describedby":[p&&A?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:B,onBlur:M=>{x&&!v.current?.contains(M.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${A?"":" dropdown__trigger-label--placeholder"}`,children:A?A.label:m}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&hn.createPortal(q,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Sv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Eu(e){return e?Sv[e]??null:null}function Du(e){switch(Eu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Su(e,t){const a=Eu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const _a=e=>e==null?"":String(e).trim();function Oo(e,t,a,r){const s=_a(e),l=_a(t),i=_a(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Gl(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function jv(e,t,a){const r=_a(e);return r?`${r}-${_a(t).padStart(2,"0")}-${_a(a).padStart(2,"0")}`:""}function ju(e){return typeof e=="string"?e:e.label}function Tu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const B=e??"";return s===!1?a:B?typeof s=="function"?s(a,B):a.filter(F=>ju(F).toLowerCase().includes(B.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),x=y&&b.length===0?f.current:b;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const g=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||d(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const E=h<x.length?h:_<x.length?_:-1,v=o.useCallback(B=>{l?l(B):t?.(ju(B)),p(!1)},[t,l]),N=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(_)},[_]),D=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(B=>{B.nativeEvent.isComposing||B.keyCode===229||(B.key==="ArrowDown"?(B.preventDefault(),p(!0),d(F=>Math.min(x.length-1,(F<x.length?F:_)+1))):B.key==="ArrowUp"?(B.preventDefault(),d(F=>Math.max(_,(F<x.length?F:x.length)-1))):B.key==="Enter"?E>=0&&v(x[E]):B.key==="Escape"&&c&&(B.preventDefault(),p(!1)))},[x,E,c,v,_]);return{listId:u,open:c,activeIdx:E,filtered:x,handleFocus:N,handleBlur:D,handleInput:k,handleKeyDown:A,handleSelect:v,handleCompositionStart:g,handleCompositionEnd:w}}const zo=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Yn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:b="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:x,maxLength:g,size:w=Lt,variant:_="input",fullWidth:E=!1,newline:v=!1,multiline:N=!1,rows:k=3,leftIcon:D,rightIcon:A,clearable:B=!1,list:F,showCount:L=!0,className:q="",onFocus:M,onBlur:O,onKeyDown:T,onEnter:G,inputMode:K,autoComplete:ee,autoFocus:re,suggestions:R,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S,openOnFocus:$=!1}=e,I=C||y?void 0:R,{t:P}=ke.useTranslation(),V=o.useId();!i&&!u&&Dt(`TextField:unnamed:${V}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const ie=`tf-${V}`,U=`tf-helper-${V}`,ce=o.useRef(null),Z=Tu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:$,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S}),H=!!I&&Z.open&&Z.filtered.length>0,te=o.useRef(null),[W,z]=o.useState(null),ae=o.useCallback(()=>{const Ee=te.current;if(!Ee||typeof window>"u")return;const Ue=Ee.getBoundingClientRect(),Ne=230,Ye=window.innerHeight-Ue.bottom<Ne+8&&Ue.top>Ne+8;z({position:"fixed",left:Ue.left,width:Ue.width,...Ye?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:qa(Ee)})},[]);zo(()=>{if(!H)return;ae();let Ee=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){ae();return}Ee===null&&(Ee=requestAnimationFrame(()=>{Ee=null,ae()}))},Ne=Ye=>{const et=Ye.target;et&&et.nodeType===1&&et.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ue),()=>{Ee!==null&&cancelAnimationFrame(Ee),window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ue)}},[H,ae]);const ve=o.useCallback(Ee=>{ce.current=Ee,typeof s=="function"?s(Ee):s&&(s.current=Ee)},[s]),me=d?`${d}${m??P("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,le=t!==void 0,Be=le&&b==="password",[Pe,Fe]=o.useState((a??"").length),Ae=le?(t??"").length:Pe,se=o.useRef(t);zo(()=>{se.current=t}),o.useEffect(()=>{const Ee=ce.current;if(!Be||!Ee)return;const Ue=t??"";Ee.value!==Ue&&(Ee.value=Ue)},[Be,t]),o.useEffect(()=>{if(!v||!ce.current)return;const Ee=ce.current;Ee.style.height="",Ee.scrollHeight>Ee.clientHeight&&(Ee.style.height=`${Ee.scrollHeight}px`)},[t,Pe,v]);const ye=g!=null&&Ae>g,Ce=w===32?16:20,xe=De("text-field",`text-field--s${w}`,_==="display"?"text-field--display":"",E?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",D?"text-field--has-left-icon":"",A||B?"text-field--has-right-icon":"",q),$e={id:ie,...Be?{}:le?{value:t}:{defaultValue:a},ref:ve,placeholder:me,name:r,disabled:y,readOnly:C,autoFocus:re,maxLength:g,list:F,inputMode:K,autoComplete:ee,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!f,"aria-describedby":[x||f?U:null,c].filter(Boolean).join(" ")||void 0,role:I?"combobox":void 0,"aria-autocomplete":I?"list":void 0,"aria-haspopup":I?"listbox":void 0,"aria-expanded":I?H:void 0,"aria-controls":H?Z.listId:void 0,"aria-activedescendant":H&&Z.activeIdx>=0?`${Z.listId}-option-${Z.activeIdx}`:void 0,onChange:Ee=>{const Ue=Ee.target;le||Fe(Ue.value.length),l?.(Ue.value),I&&Z.handleInput(),Be&&queueMicrotask(()=>{const Ne=se.current??"";Ue.value!==Ne&&(Ue.value=Ne)})},onCompositionStart:I?Z.handleCompositionStart:void 0,onCompositionEnd:I?Z.handleCompositionEnd:void 0,onFocus:(Ee=>{M?.(Ee),I&&Z.handleFocus()}),onBlur:(Ee=>{O?.(Ee),I&&Z.handleBlur()}),onKeyDown:(Ee=>{const Ue=(Ee.key==="Tab"&&!Ee.shiftKey||Ee.key===" ")&&!Ee.nativeEvent.isComposing;if(d&&Ue&&!C&&!y&&!(Ee.currentTarget.value??"").trim()){Ee.preventDefault();const Ne=Ee.currentTarget;le||(Ne.value=d,Fe(d.length)),l?.(d);return}I&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&Z.activeIdx>=0?Ee.preventDefault():G&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&(Ee.preventDefault(),G()),T?.(Ee),I&&Z.handleKeyDown(Ee)})},nt=B&&!y&&!C&&Ae>0,ct=()=>v?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--auto body-2",rows:1}):N?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{...$e,type:b,className:"text-field__input body-2"}),at=_==="display"&&!v&&!N&&!!me,rt=()=>n.jsxs(n.Fragment,{children:[ct(),at&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:me})]});return n.jsxs("div",{ref:te,className:xe,children:[i&&n.jsxs("label",{htmlFor:ie,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[D&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(lt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})}),rt(),g!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${ye?" text-field__count--over":""}`,children:[Ae,"/",g]}),nt&&n.jsx(be,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:P("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ee=>{Ee.preventDefault()},onClick:()=>{!le&&ce.current&&(ce.current.value="",Fe(0)),l?.("")},tabIndex:-1}),A&&!nt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:Z.open&&(t??"").length>0&&Z.filtered.length===0?P("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:Z.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:Z.filtered.map((Ee,Ue)=>n.jsx("li",{id:`${Z.listId}-option-${Ue}`,role:"option","aria-selected":Ue===Z.activeIdx,className:`text-field__suggestion body-2${Ue===Z.activeIdx?" is-active":""}`,onMouseDown:Ne=>Ne.preventDefault(),onClick:()=>{Z.handleSelect(Ee),ce.current?.focus()},children:typeof Ee=="string"?Ee:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ee.label}),Ee.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ee.hint})]})},typeof Ee=="string"?`${Ee}-${Ue}`:Ee.id))}),document.body)),(x||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:U,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}const Mu=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:w,onClick:_,children:E,align:v="horizontal",icon:N,useFullWidth:k=!1}=e,D=A=>{_&&A.target===A.currentTarget&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),_())};return n.jsxs("div",{className:De("panel-row",v==="vertical"?"panel-row--vertical":"",k?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?D:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[N!=null&&n.jsx("div",{className:"panel-row__icon",children:N}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:E})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(ga,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:p=!1,icon:h}=e,d=a==="button"?void 0:l;let m=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const g=e;m=n.jsx(Nu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;m=n.jsx(_n,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??Lt,ariaLabel:r})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${p?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((_,E)=>n.jsx("div",{className:p?"panel-row__dropdown-item--full":void 0,children:n.jsx(xn,{options:_.options,value:_.value,onChange:_.onChange,size:Lt,placeholder:_.placeholder,block:p,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},E))}):n.jsx(xn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Mu,size:Lt,block:p,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):w}else if(a==="button"){const g=e;g.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,_)=>n.jsx(be,{htmlType:"button",size:w.btnSize??Lt,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},_))}):m=n.jsx(be,{htmlType:"button",size:g.btnSize??Lt,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;m=n.jsx("span",{className:`panel-row__text body-2${p?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;m=n.jsxs("div",{className:`panel-row__input-wrap${p?" panel-row__input-wrap--full":""}`,children:[n.jsx(Yn,{size:Lt,value:g.value,onChange:g.onChange??Mu,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:p,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?C:void 0}),g.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&p,x=g=>{d&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),d())};return n.jsxs("div",{className:De("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",d?"panel-row--clickable":""),onClick:d,onKeyDown:d?x:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Lu(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Tv({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=ke.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(ln,{size:"small",variant:Du(i.device),fill:"soft",label:Su(i.device,r)}),Lu(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Lu(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Oo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Oo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:p,scrollbarGutter:h="auto",compactRows:d=!1,useBorder:m=!0,useBg:b=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:x,empty:g,children:w}){const _=De("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",b?"":"panel--no-bg",y?"":"panel--no-row-border",d?"panel--compact-rows":"",c),E={};i!==void 0&&(E.minHeight=i),u!==void 0&&(E.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(E["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const v=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(E).length?E:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:De("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(lt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(v,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),x?n.jsx(un,{variant:"loading"}):g!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:g}):p?n.jsx("div",{className:De("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Mv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(r===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([b])=>p(b.contentRect.width));return m.observe(d),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:De("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Wo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!r);return d.current=!!r,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!r)}),n.jsxs("label",{className:De("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:a,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function $u(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[b,y]=pr(t).split("-");return{y:+b,m:+y-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();s(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const p=o.useCallback(b=>{const y=c.current.y*12+c.current.m+b,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((b,y)=>{c.current={y:b,m:y},s(b),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function kr(e,t){return new Date(e,t+1,0).getDate()}function Lv(e,t){return new Date(e,t,1).getDay()}function ar(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function $v(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Rv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:ar(a,r-1,s)}const Pv=1900;function Fv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Pv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Ru(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Pu({value:e,onChange:t,size:a=Lt,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:p,i18n:h}=ke.useTranslation(),d=i??p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>p("calendar.dow",{returnObjects:!0}),[p]),b=pr(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:x,setViewYM:g}=$u(e,c),w=o.useId(),_=o.useCallback((H,te)=>{const W=window.innerHeight,z=window.innerWidth,ae=typeof document<"u"?document.getElementById(w):null,ve=Math.max(ae?.offsetHeight||0,ae?.scrollHeight||0)||300,me=Math.max(H.width,ae?.offsetWidth||0,260),le=W-H.bottom,Be=H.top,Pe=le<ve&&Be>le,Fe=8,Ae=(se,ye)=>Math.min(Math.max(Fe,se),Math.max(Fe,ye));return{position:"fixed",left:Ae(H.left,z-me-Fe),width:H.width,minWidth:260,...Pe?{top:"auto",bottom:Ae(W-H.top+6,W-ve-Fe)}:{bottom:"auto",top:Ae(H.bottom+6,W-ve-Fe)},zIndex:qa(te)}},[w]),{open:E,setOpen:v,toggle:N,style:k,triggerRef:D,menuRef:A}=Ua({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const H=A.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(Dn)??H)?.focus?.(),()=>{const te=document.activeElement;(!te||te===document.body)&&D.current?.focus?.()}},[E,A,D]);const[B,F]=o.useState(1),L=o.useRef(null),q=o.useRef(null);o.useEffect(()=>{if(!E)return;const H=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+b.slice(8):1;F(H)},[E]),o.useEffect(()=>{if(q.current==null)return;const H=q.current;q.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{F(H=>Math.min(H,kr(y,C)))},[y,C]);const M=o.useCallback(H=>{let te=ar(H.getFullYear(),H.getMonth(),H.getDate());r&&te<r&&(te=r),s&&te>s&&(te=s);const[W,z,ae]=te.split("-").map(Number);(W!==y||z-1!==C)&&g(W,z-1),F(ae),q.current=ae},[r,s,y,C,g]),O=o.useCallback(H=>{const te=new Date(y,C,B),W=ae=>{te.setDate(te.getDate()+ae),M(te)},z=ae=>{const ve=te.getFullYear()*12+te.getMonth()+ae,me=Math.floor(ve/12),le=ve-me*12;M(new Date(me,le,Math.min(te.getDate(),kr(me,le))))};switch(H.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-te.getDay());break;case"End":W(6-te.getDay());break;case"PageUp":H.shiftKey?z(-12):z(-1);break;case"PageDown":H.shiftKey?z(12):z(1);break;default:return}H.preventDefault()},[y,C,B,M]),T=o.useCallback(H=>{l||(t(ar(y,C,H)),v(!1))},[y,C,t,v,l]);o.useEffect(()=>{l&&v(!1)},[l,v]);const G=H=>{const te=ar(y,C,H);return!!(r&&te<r||s&&te>s)},K=(()=>{const H=kr(y,C);if(B>=1&&B<=H&&!G(B))return B;for(let te=1;te<=H;te++)if(!G(te))return te;return-1})(),ee=[];for(let H=0;H<Lv(y,C);H++)ee.push(null);for(let H=1;H<=kr(y,C);H++)ee.push(H);const re=a===64?20:a===32?14:a===40?16:18,R=Kl(h.language),J=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),ne=(H,te)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,te-1,1)),S=Fv(y,+b.slice(0,4),J,r,s),$=Ru(y,ne,r,s),I=H=>{const te=Ru(H,ne,r,s);if(te.length===0)return;const W=te.some(z=>+z.value===C+1);g(H,W?C:+te[0].value-1)},[P,V]=o.useState(null);o.useEffect(()=>{V(null)},[e]);const ie=o.useCallback(H=>{V(H);const te=Rv(H);if(!te||r&&te<r||s&&te>s)return;t(te);const[W,z]=te.split("-");g(+W,+z-1)},[r,s,t,g]),U=o.useCallback(()=>{V(null)},[]),ce=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),U(),v(!1)):H.key==="Escape"?(U(),v(!1)):H.key==="ArrowDown"&&!E&&(H.preventDefault(),v(!0))},[U,v,E]),Z=E?hn.createPortal(n.jsxs("div",{ref:A,id:w,className:"date-picker__dropdown",style:k,"data-tooltip-ignore":!0,role:"dialog","aria-label":p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:f,"aria-label":p("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(qs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:S,value:String(y),onChange:H=>I(+H),size:40}),n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:$,value:String(C+1),onChange:H=>g(y,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":p("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Us,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:O,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),ee.map((H,te)=>{if(H===null)return n.jsx("div",{},`e${te}`);const W=ar(y,C,H),z=W===e,ae=W===b,ve=G(H),me=te%7;return n.jsx("button",{type:"button",disabled:ve,"data-day":H,tabIndex:H===K?0:-1,"aria-current":ae?"date":void 0,onClick:()=>!ve&&T(H),className:De("date-picker__day caption-1",z&&"date-picker__day--selected",ae&&!z&&"date-picker__day--today",ve&&"date-picker__day--disabled",me===0&&"date-picker__day--sun",me===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:De("date-picker",`date-picker--s${a}`,E&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:D,type:"text",className:"date-picker__trigger body-2",value:P??$v(e),placeholder:d,onChange:H=>ie(H.target.value),onClick:()=>!l&&!E&&N(),onKeyDown:ce,onBlur:U,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&N(),disabled:l,tabIndex:-1,"aria-label":d,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx(tl,{size:re,className:"date-picker__icon",strokeWidth:1.5})})]}),Z]})}const Fu=["personal","sensitive","marketing"];function Iv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=ke.useTranslation(),[u]=o.useState(()=>pr(a)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,b]=o.useState("self"),[y,C]=o.useState(u),[f,x]=o.useState(""),g=Fu.filter(_=>!e.includes(_)),w={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Fn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(be,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:y||null,note:f.trim()||null})}),children:n.jsxs(nr,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[g.map(_=>n.jsx(Wo,{checked:c.includes(_),disabled:t,label:w[_],onChange:E=>p(v=>E?[...v,_]:v.filter(N=>N!==_))},_)),g.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(_n,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:_=>d(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(_n,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:_=>b(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Pu,{size:48,value:y,max:u,today:a,onChange:_=>C(_??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Yn,{size:48,fullWidth:!0,value:f,onChange:x,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function Ho({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=ke.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>a(Math.max(1,Math.min(p,e-1))),d=()=>a(Math.min(p,e+1));return n.jsxs("div",{className:De("pagination",l),children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function Vo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=ke.useTranslation(),p=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:De("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[p,a&&(Array.isArray(a)?a:[a]).map((d,m)=>n.jsx(_n,{size:Lt,...d},d.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Yn,{className:"toolbar__search",size:Lt,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((d,m)=>n.jsx(xn,{size:Lt,options:d.options,value:d.value,onChange:d.onChange,ariaLabel:d.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(xn,{size:Lt,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Ho,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Iu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Iu).join(""):""}function Ov(e){let t=e.replace(/\r\n/g,`
825
825
  `).replace(/\r/g,`
826
826
  `);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
827
827
  `).map(l=>l.replace(/\t/g," ")),r=a.filter(l=>l.trim().length>0),s=r.length>0?Math.min(...r.map(l=>l.match(/^ */)?.[0].length??0)):0;return a.map(l=>l.slice(s)).join(`
828
- `)}const zv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Wv=/^(?:const|let|var|function|return|if|else|for|while|switch|case|break|import|from|export|class|new|try|catch|finally|throw|await|async|null|true|false|this|typeof|instanceof)\b/;function Hv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,c)=>r.push({type:i,content:c});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const v=a.indexOf(`
829
- `),C=v===-1?a:a.slice(0,v);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const v=a.indexOf(`
830
- `),C=v===-1?a:a.slice(0,v);l("comment",C),a=a.slice(C.length);continue}const c=a.match(/^\/\*[\s\S]*?\*\//);if(c){l("comment",c[0]),a=a.slice(c[0].length);continue}const u=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(u){l("string",u[0]),a=a.slice(u[0].length);continue}const p=a.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),a=a.slice(p[0].length);continue}const h=a.match(Wv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const d=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const v=d[0];l(s&&zv.has(v)?"command":"identifier",v),a=a.slice(v.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){l("punctuation",b[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Vv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=we.useTranslation(),[c,u]=o.useState(!1),p=Ov(Iu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Yf(p))return;u(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>u(!1),2e3)}catch{}},m=Hv(p,t),b=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:Ne("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:c?"check":"copy",onClick:d,ariaLabel:c?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((v,C)=>n.jsx("span",{className:`code-token ${v.type} ${b}`,children:v.content},C))})})]})}function qv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:c}=we.useTranslation(),u=s!==void 0?s:e>0,p=r??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),d=o.useRef(null),m=o.useRef(null),b=o.useRef(u);o.useLayoutEffect(()=>{const g=d.current,w=b.current;if(b.current=u,u&&!w){const y=typeof document<"u"?document.activeElement:null;m.current=y&&y!==document.body&&!g?.contains(y)?y:null}else!u&&w&&g&&g.contains(document.activeElement)&&fr(g,m.current)},[u]);const[v,C]=o.useState(!1),f=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=h.current;if(!g)return;const w=D=>{f.current=D,C(D)},y=()=>{const D=g.firstElementChild??g,N=Array.from(D.children);if(N.length<2){w(!1);return}const B=N[0].offsetTop,$=N.some(S=>S.offsetTop!==B);if(!f.current){_.current=g.clientWidth,$&&w(!0);return}if($)return;const M=N[0],Y=N[N.length-1],T=Y.offsetLeft+Y.offsetWidth-M.offsetLeft,R=_.current;(R==null||T<=R)&&w(!1)};if(y(),typeof ResizeObserver>"u")return;const A=new ResizeObserver(y);A.observe(g);const x=g.parentElement;let E=x?.clientWidth??0;const k=new ResizeObserver(()=>{const D=x?.clientWidth??0;D!==E&&(E=D,_.current=null,y())});return x&&k.observe(x),()=>{A.disconnect(),k.disconnect()}},[l,e]),n.jsxs("div",{ref:d,className:`bulk-bar ${u?"bulk-bar--visible":""}`,inert:!u||void 0,"aria-hidden":u?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${v?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:Lt,label:p,onClick:a}),t.map((g,w)=>n.jsx(fe,{htmlType:"button",size:Lt,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const Uv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function Gv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:Ne("item-actions",a),children:Uv.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const c=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:c.label,showTooltipInfo:c.label,onClick:()=>{l&&t(),c.onClick()}},r)})})}function Kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const c=s===void 0?Fl(i.sms):Fl(i.sms,s),u=c.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${u?" is-over":c.overTarget?" is-over-target":""}`,title:c.over?`${c.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:u?`${Rl}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:c.overTarget?`\uACA8\uB204\uB294 ${c.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${Rl}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[c.bytes,c.target!==null?` / \uBAA9\uD45C ${c.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",u?"\uC7A5\uBB38":"\uB2E8\uBB38",c.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":u?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":c.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Yv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,c=r2(e,i),u="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:Ne("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&c?n.jsx("span",{className:Ne("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:n2(t2(c),u)}}):n.jsx("img",{src:e,alt:t,className:Ne("brand-logo",a),style:r,draggable:!1})}function Ou({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const u=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;u>0?r.style.setProperty("--section-head-float-w",`${u}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const c=new ResizeObserver(()=>i());return c.observe(l),c.observe(r),()=>{c.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:Ne("section-head-float",t),children:e})}function qo({items:e,className:t}){return n.jsx("div",{className:le(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:le("chart-section__legend-item"),children:[n.jsx("span",{className:le("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}const _a=e=>`chart-section__total__num ${e?"h1":"h0"}`;function ar({label:e,children:t}){return e?n.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:le("chart-section__total__value"),children:t})]}):n.jsx("div",{className:le("chart-section__total"),children:t})}const zu=20,Uo=120,Zv={small:Uo,medium:Uo*2+zu,large:Uo*2+zu},Wu={small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"};function Ar({type:e="chart",title:t,titleClassName:a,titleLevel:r,icon:s,disc:l,headRight:i,headFloat:c,headSegment:u,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:b,totalNum:v,totalUnit:C,totalLabel:f,change:_,changeType:g,size:w,bodyAlign:y="bottom",subRow:A,subRowAlign:x="start",className:E,inGrid:k=!1,children:D}){const N=e==="stat",B=w??(N?"small":"large"),$=B==="small"||B==="medium",M=a??"h5",Y=r??(N?0:3),{t:T}=we.useTranslation(),R=o.useRef(null),{anchorRect:S,openAt:X,close:ee}=_r(),W=o.useCallback(()=>{b&&R.current&&X(R.current)},[b,X]),[G,L]=o.useState(!1);zo(()=>{const te=R.current;if(!te||!u)return;const ie=Le=>L(Le>0&&Le<h);if(ie(te.clientWidth),typeof ResizeObserver>"u")return;const Be=new ResizeObserver(Le=>ie(Le[0].contentRect.width));return Be.observe(te),()=>Be.disconnect()},[u,h]);const[q,K]=o.useState(null),z=o.useCallback(()=>K(null),[]),F=o.useCallback(te=>{const ie=te.currentTarget.getBoundingClientRect();K(Be=>Be?null:{left:ie.left,right:ie.right,top:ie.top,bottom:ie.bottom,width:ie.width,height:ie.height,x:ie.x,y:ie.y})},[]),I=!!u&&G;o.useEffect(()=>{I||K(null)},[I]);const P=u?[...u.options.map(te=>({label:te.label,icon:te.icon,selected:te.key===u.value,disabled:te.disabled,onClick:()=>u.onChange(te.key),closeOnSelect:!0})),...(p??[]).map((te,ie)=>ie===0?{...te,separatorBefore:!0}:te)]:[],Z=o.useCallback(te=>{if(!d)return;const ie=te.target;ie&&typeof ie.closest=="function"&&ie.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),ue=o.useCallback(te=>{d&&te.target===te.currentTarget&&(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),d())},[d]),U=typeof i=="function"?i({collapsed:I}):i,pe=v!=null||f?n.jsxs(ar,{label:f,children:[v!=null&&n.jsx("span",{className:le(_a($)),children:v}),C&&n.jsx("span",{className:le("chart-section__total__unit body-3"),children:C})]}):null,ae=U||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(I?n.jsx(fe,{htmlType:"button",size:ra,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??T("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??T("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!q,onClick:F}):n.jsx(_n,{size:ra,ariaLabel:u.ariaLabel,options:u.options.map(te=>({key:te.key,label:te.label,disabled:te.disabled})),value:u.value,onChange:u.onChange})),U]}):null,V=o.useId(),se=Y?`h${Y}`:"div",O=typeof B=="number"?B:Zv[B],H=g??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),re=_===void 0?void 0:_>0?`+${_}`:`${_}`,_e=b&&S?n.jsx(Ln,{anchorRect:{left:S.left,top:S.top+21,right:S.right,bottom:S.bottom,width:S.width,height:S.height},text:b}):null;return N?n.jsxs("div",{ref:R,className:le(["chart-section","chart-section--stat",typeof B=="string"&&Wu[B],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:O===void 0?void 0:{minHeight:O},onClick:d?Z:void 0,onKeyDown:d?ue:void 0,onPointerEnter:b?W:void 0,onPointerLeave:b?ee:void 0,onFocus:b?W:void 0,onBlur:b?ee:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,v,re].filter(te=>te!=null&&te!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?V:void 0,children:[_e,n.jsxs("div",{className:le("chart-section__head"),children:[n.jsx(se,{id:V,className:le(["chart-section__title",M].filter(Boolean).join(" ")),children:t}),s&&n.jsx("span",{className:le("chart-section__head-icon"),children:n.jsx(ot,{icon:s,className:le("chart-section__head-icon-inner")})})]}),n.jsxs("div",{className:le(["chart-section__content",y==="center"&&"chart-section__content--body-center"].filter(Boolean).join(" ")),children:[n.jsxs("div",{className:le("chart-section__value-row"),children:[n.jsx("div",{className:le("chart-section__value h1"),children:v}),re&&n.jsx("div",{className:le(`chart-section__change chart-section__change--${H??"neutral"} caption-1`),children:re})]}),D&&n.jsx("div",{className:le("chart-section__body"),children:D})]})]}):n.jsxs("section",{ref:R,className:le(["chart-section",k&&"chart-section--grid",typeof B=="string"&&Wu[B],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:O===void 0?void 0:{minHeight:O},onClick:d?Z:void 0,onKeyDown:d?ue:void 0,onPointerEnter:b?W:void 0,onPointerLeave:b?ee:void 0,onFocus:b?W:void 0,onBlur:b?ee:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?V:void 0,children:[b&&S&&n.jsx(Ln,{anchorRect:{left:S.left,top:S.top+21,right:S.right,bottom:S.bottom,width:S.width,height:S.height},text:b}),c&&n.jsx(Ou,{children:c}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[s&&n.jsx(ot,{icon:s,label:typeof t=="string"?t:void 0,className:le("chart-section__icon")}),n.jsx(se,{id:V,className:le(["chart-section__title",M].filter(Boolean).join(" ")),children:t})]}),ae,l&&n.jsx("div",{className:le("chart-section__disc body-3"),children:l})]}),(pe||A)&&n.jsxs("div",{className:le(["chart-section__sub-row",x!=="start"&&`chart-section__sub-row--${x}`].filter(Boolean).join(" ")),children:[pe,A]}),D,q&&n.jsx(Bn,{anchorRect:q,onClose:z,ariaLabel:u?.ariaLabel??T("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ua,{columns:[{items:P}],onClose:z,size:"small"})})]})}const rr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Go=e=>rr(e.getFullYear(),e.getMonth()+1);function xa(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const Ko=(e,t)=>`${e}#${t}`;function jn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Xv(){const e=Ca();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<jn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-jn(t,a))/7),l=rr(t,a+1);return{monthKey:l,value:Ko(l,s)}}function Jv(e){const t=Ca(),a=Go(t),r=(u,p)=>rr(u,p+1),s=new Map;s.set(a,[]);for(const u of e){if(isNaN(u.date.getTime()))continue;const p=r(u.date.getFullYear(),u.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(u)}for(const[u,p]of[...s.entries()]){const h=xa(u);if(!h)continue;const d=h.year,m=h.month1-1,b=jn(d,m);if(!(u===a&&t.getDate()<b)&&!p.some(f=>f.date.getDate()<b))continue;const v=new Date(d,m,0),C=r(v.getFullYear(),v.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[u,p]of s){const h=xa(u);if(!h)continue;const d=h.year,m=h.month1-1,b=new Date(d,m+1,0).getDate(),v=p.reduce((y,A)=>Math.max(y,A.parts?.length??0,A.partsB?.length??0),0),C=p.some(y=>y.partsB),f=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(v).fill(0)),w=Array.from({length:b+1},()=>new Array(v).fill(0));for(const y of p){const A=y.date.getDate();if(f[A]+=y.a,_[A]+=y.b,y.parts)for(let x=0;x<v;x++)g[A][x]+=y.parts[x]??0;if(y.partsB)for(let x=0;x<v;x++)w[A][x]+=y.partsB[x]??0}l.set(u,{year:d,month:m,daysInMonth:b,partsLen:v,hasPartsB:C,dayA:f,dayB:_,dayParts:g,dayPartsB:w})}const i=(u,p,h)=>new Date(u,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),c={};for(const[u,p]of l){const{year:h,month:d,daysInMonth:m,dayA:b,dayB:v,dayParts:C,dayPartsB:f}=p,_=h===t.getFullYear()&&d===t.getMonth(),g=t.getDate(),w=l.get(r(d===11?h+1:h,(d+1)%12)),y=p.partsLen,A=[];for(let E=1;E<=m;E++){const k=_&&E>g;A.push({label:String(E),...k&&b[E]===0&&v[E]===0?{future:!0}:{},a:k&&b[E]===0&&v[E]===0?-1:b[E],b:v[E],...y?{parts:C[E]}:{},...y&&p.hasPartsB?{partsB:f[E]}:{}})}const x=[];for(let E=jn(h,d);E<=m;E+=7){const k=Math.max(0,E+6-m),D=k&&w?Math.max(y,w.partsLen):y,N=p.hasPartsB||!!(k&&w?.hasPartsB);let B=0,$=0;const M=new Array(D).fill(0),Y=new Array(D).fill(0);for(let R=E;R<=Math.min(E+6,m);R++){B+=b[R],$+=v[R];for(let S=0;S<y;S++)M[S]+=C[R][S],Y[S]+=f[R][S]}if(k&&w)for(let R=1;R<=k&&!i(w.year,w.month,R);R++){B+=w.dayA[R],$+=w.dayB[R];for(let S=0;S<w.partsLen;S++)M[S]+=w.dayParts[R][S],Y[S]+=w.dayPartsB[R][S]}const T=k?`${(d+1)%12+1}/${k}`:`${E+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${E}\uC77C~${T}\uC77C]`,a:B,b:$,...D?{parts:M}:{},...D&&N?{partsB:Y}:{}})}c[u]={weekly:x,daily:A}}return c}function Hu(){const e=Ca(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:rr(s,i),year:s,month:i})}return r.reverse()}Hu();function Qv(){return Hu()}function Vu(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function qu(e){const{t,i18n:a}=we.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Qv().filter(N=>N.value in e),[e]),i=o.useMemo(()=>{const N=[];for(const B of l){const $=new Date(B.year,B.month,0).getDate(),M=jn(B.year,B.month-1),Y=Math.ceil(($-M+1)/7);for(let T=Y-1;T>=0;T--)N.push({value:Ko(B.value,T),monthKey:B.value,year:B.year,month:B.month,week:T})}return N},[l]),c=o.useCallback((N,B)=>t("calendar.yearMonthCompact",{year:N,month:B,full:Yl(t,a.language,N,B),defaultValue:"{{full}}"}),[t,a.language]),u=o.useCallback(N=>`${c(N.year,N.month)} ${Vu(t,N.week)}`,[t,c]),p=o.useMemo(()=>l.map(N=>({value:N.value,label:c(N.year,N.month)})),[c,l]),h=o.useMemo(()=>i.map(N=>({value:N.value,label:u(N)})),[i,u]),d=o.useMemo(()=>Xv(),[e]),m=o.useMemo(()=>l.find(N=>N.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),b=o.useMemo(()=>i.find(N=>N.value===d.value)?.value??i[0]?.value??"",[i,d]),[v,C]=o.useState(""),[f,_]=o.useState("");o.useEffect(()=>{l.find(N=>N.value===v)||C(m)},[l,v,m]),o.useEffect(()=>{i.find(N=>N.value===f)||_(b)},[i,f,b]);const g=r==="month"?p:h,w=r==="month"?v:f,y=r==="month"?C:_,A=o.useMemo(()=>{const N=t("calendar.dow",{returnObjects:!0});return Array.isArray(N)?N:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),x=g.findIndex(N=>N.value===w),E=o.useCallback(()=>{const N=g.findIndex(B=>B.value===w);N<g.length-1&&y(g[N+1].value)},[g,w,y]),k=o.useCallback(()=>{const N=g.findIndex(B=>B.value===w);N>0&&y(g[N-1].value)},[g,w,y]),D=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:w,setRange:y,activeOptions:g,activeIdx:x,handlePrev:E,handleNext:k,periodOptions:D,monthRange:v,weekRange:f,weekRanges:i,DOW:A}}const $t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function In(e,t=!0){return e.future===!0||t&&e.a===-1}function e4({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:c=140,maxOverride:u,tightMax:p,seriesColors:h,seriesLabels:d,rateLabels:m,grouped:b=!1,baseline:v,focusableBars:C=!1}){const f=!a,_=!!(h&&h.length>0),g=v,w=o.useMemo(()=>_?Math.max(0,...e.filter(W=>!In(W,g==null)).map(W=>b?Math.max(0,...(W.parts??[]).map($t)):(W.parts??[]).reduce((G,L)=>G+Math.max(0,$t(L)),0))):Math.max(0,...e.filter(W=>!In(W,g==null)).flatMap(W=>f?[$t(W.a)]:[$t(W.a),$t(W.b)])),[e,f,_,b]),y=o.useMemo(()=>{if(g==null)return 0;const W=e.filter(G=>!In(G,g==null)).flatMap(G=>_?(G.parts??[]).map($t):f?[$t(G.a)]:[$t(G.a),$t(G.b)]);return Math.max(0,...W.map(G=>Math.abs(G-g)))},[e,g,_,f]),A=o.useMemo(()=>{const W=g!=null?y:w;return u??(p?W>0?W:10:Math.ceil(W/10)*10||10)},[w,y,g,u,p]),x=c,E=_?b?Math.max(1,h.length):1:f?1:2,k={"--bar-width":`${o.useMemo(()=>{const W=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(W*E)+6)))},[e.length,E,l])}px`},D={"--bar-group-gap":`${Math.max(0,i)}px`},N=o.useMemo(()=>{const W=Math.round(A/2);return g!=null?[g+A,...W!==A?[g+W]:[],g,...W!==A?[g-W]:[],g-A]:W!==A?[A,W,0]:[A,0]},[A,g]),B=W=>g!=null?1-(W-(g-A))/(2*A):1-W/A,[$,M]=o.useState(null),Y=o.useCallback(()=>M(null),[]),T=o.useCallback((W,G)=>{const L=[W.label,W.sublabel].filter(Boolean).join(" ");let q;if(_&&b&&W.rawPartsB)q=(d??[]).map((K,z)=>{const F=W.rawPartsB[z]??0;return{text:F>0?`${K}: ${G[z]??0}% (${W.rawParts?.[z]??0}/${F})`:`${K}: -`,color:(h??[])[z]}});else if(_&&b)q=(d??[]).map((K,z)=>({text:`${K}: ${X(G[z]??0)}`,color:(h??[])[z]}));else if(_){const K=(d??[]).map((F,I)=>({text:`${F}: ${G[I]??0}`,color:(h??[])[I]})),z=K.filter((F,I)=>(G[I]??0)>0);q=z.length?z:K}else m&&!f?q=[{text:`${r} ${$t(W.a)}%`,color:t},{text:`${s} ${$t(W.b)}%`,color:a}]:m&&W.rawB!==void 0?q=[{text:`${m.total} ${W.rawB}`},{text:`${m.done} ${W.rawA??0}`,color:t}]:f?q=[{text:`${r}: ${$t(W.a)}`,color:t}]:q=[{text:`${r}: ${$t(W.a)}`,color:t},{text:`${s}: ${$t(W.b)}`,color:a}];return{title:L,items:q}},[_,b,d,h,m,f,r,s,t,a,g]),R=o.useCallback((W,G,L)=>{const q=W.getBoundingClientRect(),{title:K,items:z}=T(G,L);M({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:K,items:z})},[T]),S=o.useCallback((W,G)=>{const{title:L,items:q}=T(W,G);return[L,...q.map(K=>K.text)].filter(Boolean).join(", ")},[T]),X=W=>g!=null&&W>g?`+${W}`:`${W}`,ee=$!=null;return o.useEffect(()=>{if(!ee)return;const W=()=>M(null),G=L=>{const q=L.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||M(null)};return window.addEventListener("scroll",W,!0),document.addEventListener("pointerdown",G,!0),()=>{window.removeEventListener("scroll",W,!0),document.removeEventListener("pointerdown",G,!0)}},[ee]),n.jsxs("div",{className:le("bar-chart__wrap"),style:D,children:[n.jsx("div",{className:le("bar-chart__inner"),children:n.jsx("div",{className:le("bar-chart__scroll"),children:n.jsxs("div",{className:le("bar-chart__area"),children:[n.jsxs("div",{className:le("bar-chart__plot"),style:{height:x},children:[N.slice(0,-1).map((W,G)=>n.jsx("div",{className:le(`bar-chart__gridline${g!=null&&W===g?" bar-chart__gridline--baseline":""}`),style:{top:B(W)*x},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:W})},G)),e.map((W,G)=>{const L=In(W,g==null),q=x/2,K=P=>g!=null?Math.min(q,Math.abs($t(P)-g)/A*q):Math.min(x,Math.max(0,$t(P)/A*x)),z=L?0:K(W.a),F=L?0:K(W.b),I=(W.parts??[]).map($t);return n.jsx("div",{className:le(`bar-chart__col${b&&_?" bar-chart__col--group":""}`),style:{cursor:L?"default":"pointer"},tabIndex:C&&!L?0:void 0,role:C&&!L?"img":void 0,"aria-label":C&&!L?S(W,I):void 0,onMouseEnter:L?void 0:P=>R(P.currentTarget,W,I),onFocus:L||!C?void 0:P=>R(P.currentTarget,W,I),onBlur:C?Y:void 0,onMouseLeave:Y,children:!L&&(_&&b?(h??[]).map((P,Z)=>{const ue=I[Z]??0;if(g==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...k,height:K(ue),background:P}},Z);const U=$t(ue)<g;return n.jsxs("div",{className:le("bar-chart__slot"),style:k,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!U&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:K(ue),background:P}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:U&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:K(ue),background:P}})})]},Z)}):_?n.jsx("div",{className:le("bar-chart__stack"),style:k,children:(()=>{const P=I.reduce((ue,U,pe)=>U>0?pe:ue,-1);let Z=x;return I.map((ue,U)=>{if(ue<=0)return null;const pe=Math.min(Z,ue/A*x);return Z-=pe,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:pe,background:(h??[])[U],borderRadius:U===P?"6px 6px 0 0":void 0}},U)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:$t(W.a),c:t},...f?[]:[{v:$t(W.b),c:a}]].map(({v:P,c:Z},ue)=>n.jsxs("div",{className:le("bar-chart__slot"),style:k,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:P>=g&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:K(P),background:Z}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:P<g&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:K(P),background:Z}})})]},ue))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...k,height:z,background:t}}),!f&&n.jsx("div",{className:le("bar-chart__bar"),style:{...k,height:F,background:a}})]}))},G)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((W,G)=>{const L=In(W,g==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${L?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[W.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),W.label]}),W.sublabel&&n.jsx("span",{className:"caption-1",children:W.sublabel})]},G)})})]})})}),$&&n.jsx(Un,{anchorRect:$.rect,title:$.title,items:$.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Uu({control:e}){const{t}=we.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:c,periodOptions:u,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:le("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:ra,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:r===a.length-1,onClick:i}),n.jsx(xn,{value:s,onChange:l,options:a,size:ra,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:ra,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:c}),n.jsx(_n,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:u,value:p,onChange:b=>h(b),size:ra})]})}function Yo(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const c=new Date(t);c.setDate(t.getDate()+i);const u=(e[Go(c)]?.daily??[])[c.getDate()-1],p=u!=null&&In(u,r)||c>s;return{dt:c,entry:u,isFuture:p}})}function t4(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:c,DOW:u}=t,p=Ca(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=xa(l),_=f?f.year:null,g=f?f.month1:null,w=_&&g?jn(_,g-1):1;return C.weekly.map((y,A)=>{const x=A+1;let E=y.label,k=!1,D=!1;if(_&&g){const N=w+A*7,B=new Date(_,g-1,N+6),$=B.getMonth()+1,M=B.getDate(),Y=$===g?`${M}`:`${$}/${M}`;E=a("manager.chart.weekRange",{start:N,end:Y});const T=new Date(h,d-1,m).getTime();k=T>=new Date(_,g-1,N).getTime()&&T<=B.getTime(),D=_>h||_===h&&(g>d||g===d&&N>m)}return{...y,label:E,sublabel:Vu(a,x-1),isToday:k,future:y.future===!0||D||void 0,a:D?-1:y.a,b:D?0:y.b}})}const b=c.find(C=>C.value===i);if(!b)return[];const v=new Date(b.year,b.month-1,jn(b.year,b.month-1)+b.week*7);return Yo(e,v,p,r).map(({dt:C,entry:f,isFuture:_})=>{const g=C.getMonth()+1,w=C.getDate(),y=C.getFullYear();return{label:g===b.month&&y===b.year?`${w}`:`${g}/${w}`,sublabel:u[C.getDay()]??"",future:_||void 0,a:_?-1:f&&f.a>0?f.a:0,b:_?0:f&&f.b>0?f.b:0,isToday:y===h&&g===d&&w===m,...f?.parts?{parts:_?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:_?f.partsB.map(()=>0):f.partsB}:{}}})}const n4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function a4({canvasHeight:e,focusableBars:t,size:a="medium",barWidth:r,titleKey:s,titleLevel:l,data:i,colorA:c,colorB:u,labelAKey:p,labelBKey:h,showTotal:d=!1,totalUnitKey:m,totalLabelKey:b,control:v,hideControls:C=!1,rate:f=!1,rateAgg:_="dayMean",tightMax:g=!1,avgMode:w=!1,totalFormat:y,series:A,seriesMode:x="stack",loading:E=!1,onDetail:k,headExtra:D,headSegment:N,icon:B,disc:$,onClick:M,cardAriaLabel:Y,cardTooltip:T,detailSize:R=ra,barGap:S,baseline:X,className:ee,inGrid:W=!1}){const{t:G}=we.useTranslation(),L={...n4[a],...e===void 0?null:{height:e}},q=qu(i),K=v??q,z=o.useMemo(()=>t4(i,K,G,X==null),[i,K,G,X]),F=x==="group"&&!!A&&A.length>0;S!=null&&!F&&Dt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const I=o.useMemo(()=>{if(!f)return z;const O=K.period==="month"?xa(K.monthRange):null,H=Ca(),re=A?.length??0,_e=te=>{const ie=[],Be=[],Le=[];for(let Re=0;Re<re;Re++){let he=0,ge=0,Ee=0;for(const ve of te){const Fe=$t(ve.a[Re]),ze=$t(ve.b[Re]);ze<=0||(he+=Fe,ge+=ze,Ee+=Fe/ze*100)}ie.push(_==="weighted"?ge>0?Math.round(he/ge*100):0:te.length?Math.round(Ee/te.length):0),Be.push(he),Le.push(ge)}return{pct:ie,ra:Be,rb:Le}};return z.map((te,ie)=>{let Be=te.a===-1?-1:te.b>0?Math.round(te.a/te.b*100):0;if(O&&!In(te)){const Re=O.year,he=O.month1-1,ge=Yo(i,new Date(Re,he,jn(Re,he)+ie*7),H).filter(Ee=>!Ee.isFuture);if(_==="weighted"){let Ee=0,ve=0;for(const{entry:Fe}of ge)Fe&&Fe.b>0&&(Ee+=Fe.a,ve+=Fe.b);Be=ve>0?Math.round(Ee/ve*100):0}else Be=ge.length?Math.round(ge.reduce((Ee,{entry:ve})=>Ee+(ve&&ve.b>0?ve.a/ve.b*100:0),0)/ge.length):0}let Le=null;if(F&&!In(te)){let Re;if(O){const ge=O.year,Ee=O.month1-1;Re=Yo(i,new Date(ge,Ee,jn(ge,Ee)+ie*7),H).filter(ve=>!ve.isFuture).map(({entry:ve})=>({a:ve?.parts??[],b:ve?.partsB??[]}))}else Re=[{a:te.parts??[],b:te.partsB??[]}];const he=_e(Re);Le={parts:he.pct,rawParts:he.ra,rawPartsB:he.rb}}return{...te,a:Be,b:te.a===-1?0:h&&te.parts&&te.parts[1]>0?Math.round(te.parts[0]/te.parts[1]*100):0,rawA:te.a===-1?-1:te.a,rawB:te.b,...Le??{}}})},[z,f,_,h,K.period,K.monthRange,i,F,A?.length]),P=o.useMemo(()=>{if(f||w){const H=(K.period==="week"?z:i[K.monthRange]?.daily??[]).filter(_e=>_e.a!==-1);if(H.length===0)return 0;if(f&&_==="weighted"){let _e=0,te=0;for(const ie of H)ie.b>0&&(_e+=ie.a,te+=ie.b);return te>0?Math.round(_e/te*100):0}const re=f?H.reduce((_e,te)=>_e+(te.b>0?te.a/te.b*100:0),0):H.reduce((_e,te)=>_e+(te.a>0?te.a:0),0);return Math.round(re/H.length)}const O=K.period==="month"?i[K.monthRange]?.daily??[]:I;return X!=null?O.reduce((H,re)=>H+(In(re,!1)?0:$t(re.a)+(h?$t(re.b):0)),0):O.reduce((H,re)=>H+(re.a>0?re.a:0)+(h&&re.b>0?re.b:0),0)},[I,z,f,_,w,X,h,K.period,K.monthRange,i]),Z=A&&A.length>0?A.map(O=>({color:O.color,label:O.label})):[{color:c,label:G(p)},...h?[{color:u,label:G(h)}]:[]],ue=a==="small",U=a==="large",pe=ue?"medium":U?"xLarge":"large",ae=ee||void 0,V=s?G(s):"",se=V?G("trainingStatus.detailFor",{name:V,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):G("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ar,{className:ae,size:pe,inGrid:W,icon:B,disc:$,onClick:M,ariaLabel:Y,tooltip:T,headSegment:N,headMenuItems:k?[{label:se,icon:"list",onClick:k,closeOnSelect:!0}]:void 0,title:G(s),titleLevel:l,headRight:ue?D??void 0:({collapsed:O})=>n.jsxs(n.Fragment,{children:[!C&&n.jsx(Uu,{control:K}),D,k&&!O&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:R,type:"dot",icon:"list",ariaLabel:se,showTooltipInfo:se,onClick:k})})]}),subRow:n.jsxs(n.Fragment,{children:[d?f||w||b&&y?n.jsx(ar,{label:ue?void 0:`${G(K.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${G(b??p)}`,children:y?(y(P).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((O,H)=>/\d/.test(O)?n.jsx("span",{className:le(_a(!U)),children:O},H):n.jsx("span",{className:le("chart-section__total__unit body-3"),children:O},H)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le(_a(!U)),children:P}),m&&n.jsx("span",{className:le("chart-section__total__unit body-3"),children:G(m)})]})}):n.jsxs(ar,{children:[n.jsx("span",{className:le(_a(!U)),children:P}),n.jsx("span",{className:le("chart-section__total__unit body-3"),children:G(p)}),m&&n.jsx("span",{className:le("chart-section__total__unit body-3"),children:G(m)})]}):n.jsx("span",{}),n.jsx(qo,{items:Z,className:"caption-1"})]}),children:E?n.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:le("bar-chart__inner"),children:n.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:L.height},children:n.jsx(ba,{size:32})}),n.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[n.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),I.some(O=>!!O.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(e4,{focusableBars:t,data:I,colorA:c,colorB:h?u:void 0,labelA:G(p),labelB:h?G(h):void 0,barWidth:r??L.barWidth,barGap:S,baseline:X,height:L.height,maxOverride:f?100:void 0,tightMax:g,seriesColors:A?.map(O=>O.color),seriesLabels:A?.map(O=>O.label),rateLabels:f?{total:G("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:G("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:F})})}const Gu=120,r4={left:38,right:16,top:26,bottom:24};function o4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:c,overlay:u,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[b,v]=o.useState(null);o.useEffect(()=>{if(!b)return;const S=ee=>m(Math.round(ee)||null);if(S(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const X=new ResizeObserver(([ee])=>S(ee.contentRect.width));return X.observe(b),()=>{X.disconnect()}},[b]);const{payload:C,anchorRect:f,openAfterDelay:_,close:g}=Zy(Gu),w=o.useCallback((S,X)=>{S&&_(S,X.getBoundingClientRect())},[_]),y=d??i,A=l,{left:x,right:E,top:k,bottom:D}={...r4,...c},[N,B]=t,$=S=>B===N?x:x+(y-x-E)*(S-N)/(B-N),M=S=>k+(A-k-D)*(100-S)/100,Y={x:$,y:M,plot:{left:x,right:y-E,top:k,bottom:A-D,width:Math.max(0,y-x-E),height:Math.max(0,A-k-D)}},T=e.filter(S=>!S.hollow),R=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:Ne("line-chart",h),viewBox:`0 0 ${y} ${A}`,role:"img","aria-label":p??e.map(S=>S.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(S=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:y-E,y1:M(S),y2:M(S)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:M(S)+4,textAnchor:"end",children:[S,"%"]})]},S)),u?.(Y),a.map(S=>n.jsx("text",{className:"line-chart__tick",x:$(S.x),y:A-5,textAnchor:"middle",children:S.label},S.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:R,points:T.map(S=>`${$(S.x)},${M(S.pct)}`).join(" ")}),e.map(S=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:X=>w(S.description,X.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:$(S.x),cy:M(S.pct),r:12}),n.jsx("circle",{className:Ne("line-chart__dot-main",S.hollow&&"is-hollow"),cx:$(S.x),cy:M(S.pct),r:4,stroke:R,fill:S.hollow?void 0:R})]},S.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function s4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:c}){return n.jsxs("div",{className:Ne("game-intro",c),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:Ne("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((u,p)=>n.jsxs("div",{className:"game-intro__tips",children:[u.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:u.title}),u.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Ku=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},Yu=(e,t,a,r)=>({from:Zl(e,t,a),to:new Date(Zl(e,t,a+r).getTime()-1),fromYmd:Ku(e,t,a),toYmd:Ku(e,t,a+r-1)});function l4(e,t=0){if(e.period==="month"){const s=xa(e.monthRange),l=Ca(),i=s?s.year:l.getFullYear(),c=(s?s.month1:l.getMonth()+1)-1+t,u=new Date(Date.UTC(i,c+1,0)).getUTCDate();return Yu(i,c,1,u)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=za();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=jn(a.year,a.month-1);return Yu(a.year,a.month-1,r+(a.week+t)*7,7)}const Zo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Zu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Xu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:c=!1,hideLabel:u=!1}){const p=typeof s=="number"?s:Zo[s].diameter,h=l??(typeof s=="number"?12:Zo[s].strokeWidth),d=p/2,m=(p-h)/2,b=2*Math.PI*m;if(a&&a.length>0){const _=a.reduce((g,w)=>{const y=g.length>0?g[g.length-1].acc:0,A=Number.isFinite(w.ratio)?w.ratio:0,x=Math.max(0,Math.min(A,1-y));return g.push({color:w.color,rotate:-90+y*360,dash:b*x,acc:y+x}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),_.map((g,w)=>g.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:g.color,strokeWidth:h,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${d} ${d})`},w))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,C=b*v,f=b-C;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:v<.02||v>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!c&&n.jsxs("div",{className:`ring-chart__center${u?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Zu(v)}),!u&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function i4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:c,className:u,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...b}){const{t:v}=we.useTranslation();if(!e)return n.jsx(Xu,{...b});const C=(b.total??0)>0?Zu(Math.min((b.done??0)/b.total,1)):0,f=b.size==="small",_=typeof b.size=="number"?b.size:Zo[b.size??"medium"].diameter,g=b.size==="large",w=f?"medium":g?"xLarge":"large",y=u||void 0,A=r&&n.jsx("span",{className:le("chart-section__head-icon"),children:n.jsx(ot,{icon:r,className:le("chart-section__head-icon-inner")})});return n.jsx(Ar,{className:y,size:w,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:v(e),titleLevel:t,headRight:A||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(ar,{label:!f&&l?v(l):void 0,children:[n.jsx("span",{className:le(_a(f)),children:C}),n.jsx("span",{className:le("chart-section__total__unit body-3"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(qo,{items:i})]}),children:c?n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(ba,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Xu,{...b,hideCenter:b.hideCenter??f})})})}function u4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:c="small",bodyAlign:u="bottom",children:p}){return n.jsx(Ar,{type:"stat",title:e,totalNum:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:c,bodyAlign:u,children:p})}function Ju({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:c=!1,ariaLabel:u,length:p,className:h,label:d,formatValue:m,labelPos:b,labelAlign:v="right",showMinMax:C=!1,minLabel:f,maxLabel:_,showBgTick:g=!1,showFillTick:w=!1,tickStep:y,tickShape:A="dot"}){t&&!u&&Dt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const x=Math.min(r,Math.max(a,e)),E=r>a?(x-a)/(r-a):0,k=l==="vertical",D=!t,N=K=>t?.(Number(K.target.value)),B=typeof p=="number"?`${p}px`:p,$={"--slider-ratio":String(E),"--slider-thumb":`${i}px`,...B?k?{height:B}:{width:B}:{}},M=y??s,Y=(g||w)&&M>0&&r>a?Math.floor((r-a)/M+1e-6):0;if(Y>0&&Y<=100){const K=A!=="dash",z=ue=>K?`radial-gradient(circle, ${ue} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ue} calc(50% - 2px), ${ue} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ue} calc(50% - 2px), ${ue} calc(50% + 2px), transparent calc(50% + 2px))`,F=K?"2px":"4px",I=[],P=[],Z=[];for(let ue=0;ue<=Y;ue++){const U=ue*M/(r-a);if(U>1+1e-6)break;const pe=`${((k?1-U:U)*100).toFixed(4)}%`,ae=U<=E+1e-6;if(ae?!w:!g)continue;const V=ae?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(z(V)),P.push(k?`${F} var(--slider-thumb)`:`var(--slider-thumb) ${F}`),Z.push(k?`center ${pe}`:`${pe} center`)}I.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),P.push("100% 100%"),Z.push("0 0"),$.backgroundImage=I.join(", "),$.backgroundSize=P.join(", "),$.backgroundPosition=Z.join(", "),$.backgroundRepeat="no-repeat"}const T=m?m(x):d==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:d==="count"?`${x} / ${r}`:x===a&&f?f:x===r&&_?_:void 0,R=n.jsx("input",{type:"range",className:Ne("slider",`slider--${l}`,D&&"slider--static",!d&&!C&&h),min:a,max:r,step:s,value:x,disabled:c,readOnly:D,tabIndex:D?-1:void 0,"aria-label":u,"aria-valuetext":T,"aria-orientation":l,onChange:N,style:$});if(!d&&!C)return R;const S=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),X=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),ee=C?n.jsxs("div",{className:Ne("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?X:S,R,k?S:X]}):R;if(!d)return ee;const W=b??(k?"bottom":"right"),G=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,L=m?m(x):d==="percent"?G:d==="count"?`${x} / ${r}`:String(x),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:L});return n.jsxs("div",{className:Ne("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${W}`,`slider-wrap--align-${v}`,h),children:[ee,q]})}const c4=.86,d4=250,Xo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Jo=(e,t,a,r)=>{const s=Xo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Qo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:c=-60,refDb:u=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const b=o.useRef(null),v=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const x=R=>{const S=Jo(R,u,p,h);C.current&&(C.current.textContent=S);const X=b.current;X&&(X.setAttribute("aria-valuenow",String(Xo(R,u,p,h))),X.setAttribute("aria-valuetext",S))},E=e??ef(t)??(_&&_.el===t?_.node:null),k=v.current;if(!E||!k){k?.style.setProperty("--meter-level","0"),x(c);let R=!1;return!e&&t&&ur(t).then(S=>{!R&&S&&g({el:t,node:S})}),()=>{R=!0}}io();const D=new Float32Array(E.fftSize);let N=0,B=0,$=0,M=0,Y=null;const T=R=>{const S=tf(E,D);N=S>N?S:N*c4;const X=N>1e-5?20*Math.log10(N):-1/0,ee=Math.max(c,X),W=ee-u,G=Math.min(1,Math.max(0,(W-p)/(h-p)));if(k.style.setProperty("--meter-level",G.toFixed(3)),B+=ee,$+=1,R-M>=d4){const L=B/$;Y=Y==null?L:Y*.6+L*.4,x(Y),B=0,$=0,M=R}f.current=requestAnimationFrame(T)};return f.current=requestAnimationFrame(T),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,_,c,u,p,h]);const w=typeof r=="number"?`${r}px`:r,y=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),A=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:Ne("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${A}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":Xo(c,u,p,h),"aria-valuetext":Jo(c,u,p,h),children:[y,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Jo(c,u,p,h)})]})}const Qu=260;function ec({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,c]=o.useState(!1),u=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{u.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const b=a,v=o.useRef(null),C=o.useRef(0),f=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),w=o.useRef(null),y=o.useRef(null),A=o.useRef(null),x=o.useRef(()=>{});x.current=D=>{D<0||(C.current=Date.now(),f.current=D,v.current=setTimeout(()=>{v.current=null,l(!1),g.current=setTimeout(()=>{c(!1);try{m.current()}catch{}},Qu)},D))};const E=o.useCallback(()=>{_.current||!v.current||(_.current=!0,clearTimeout(v.current),v.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),k=o.useCallback(()=>{_.current&&(_.current=!1,x.current(f.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(v.current&&(clearTimeout(v.current),v.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(p.current)return b>0&&!v.current&&(_.current?f.current=b:x.current(b)),d.current=e,()=>{v.current&&(clearTimeout(v.current),v.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const D=()=>{const N=h.current;if(N)try{N.classList.remove("is-visible"),N.style.transition="none",t==="top"?N.style.transform="translateX(-50%) translateY(-16px)":N.style.transform="translateX(-50%) translateY(16px)",N.style.opacity="0",N.offsetWidth,N.style.transition="",N.classList.add("is-visible"),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{A.current=null;try{N.style.opacity="",N.style.transform="",N.style.transition=""}catch{}},60)}catch{}};u.current?(D(),l(!0)):(c(!0),w.current=requestAnimationFrame(()=>{y.current=requestAnimationFrame(()=>{D(),l(!0)})})),b>0&&(_.current=!1,x.current(b))}else l(!1),g.current=setTimeout(()=>c(!1),Qu);return d.current=e,()=>{v.current&&clearTimeout(v.current),g.current&&clearTimeout(g.current),w.current&&cancelAnimationFrame(w.current),y.current&&cancelAnimationFrame(y.current),A.current&&clearTimeout(A.current),v.current=null,g.current=null,w.current=null,y.current=null,A.current=null}},[e,b,t]),{mounted:i,showing:s,popupRef:h,pause:E,resume:k}}function wa({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:c,pause:u,resume:p}=ec({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const b=a==="notice"||a==="warning"?a:"normal",v=n.jsx("div",{ref:c,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&u()},onMouseLeave:p,onFocusCapture:u,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(v,document.body):v}const p4=24;function h4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:c,labelAlign:u="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),b=m/d*100,v=Number.isFinite(t)&&t>0?t:0,C=c??(a>=p4?"inside":"bottom"),f=C==="center"?"inside":C,_=f==="inside"&&(u==="left"?b>=15:u==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),s&&(g["--progress-bar-track"]=s),n.jsxs("div",{className:Ne("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${u}`,l&&_&&"progress-bar--label-on-fill",h),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${v}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(b)}%`:l==="raw"?String(m):`${m} / ${v}`})]})}const tc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},m4="rgba(255, 255, 255, 0.16)";function nc({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:c}){const{t:u}=we.useTranslation(),p=vn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=c??u("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=m4),r||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:tc,children:d}),Array.from({length:e}).map((v,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const b=i?n.jsx("span",{role:"status",style:tc,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((v,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function C4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function f4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const c=ac(i.span),u=Math.min(c,r.length-l);if(u===1)r[l]=Math.max(r[l],i.width);else{const p=Math.max(0,(i.width-a*(u-1))/u);for(let h=l;h<l+u;h++)r[h]=Math.max(r[h],p)}l+=u}}return r}function ac(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function b4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?ac(parseInt(a[1],10)):1}function g4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,c,u)=>i+(a(u)?c:0),0);return e.reduce((i,c,u)=>i+(a(u)?0:r(u)),0)>s-l}function y4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((d,m,b)=>d+(a(b)?m:0),0),i=e.reduce((d,m,b)=>d+(a(b)?0:m),0),c=s-l;if(!(s>0&&i>0&&c>0))return[...e];const u=c/i,p=e.map((d,m)=>a(m)?d:Math.max(r(m),Math.round(d*u))),h=Math.round(c-p.reduce((d,m,b)=>d+(a(b)?0:m),0));if(h!==0){let d=-1;p.forEach((m,b)=>{!a(b)&&(d<0||m>p[d])&&(d=b)}),d>=0&&(p[d]=Math.max(r(d),p[d]+h))}return p}const v4=16;function _4(e,t=v4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}const rc="declared";function x4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function es({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:c,onDragEnd:u,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const b=o.useCallback(v=>{s&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(ba,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?b:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:c,onDragEnd:u,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function w4({dir:e}){return n.jsx(e==="asc"?al:nl,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function B4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(w4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:Ne("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:c=>c.stopPropagation(),"aria-hidden":"true"})]})}function oc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ts({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:c,onRowMouseEnter:u,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:b,mobileGridTemplateColumns:v,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:_,refitOn:g,size:w="small",title:y,icon:A,count:x,collapsed:E=!1,onToggleCollapse:k,headerActions:D,empty:N,loading:B,dragOver:$=!1,onDragOver:M,onDragLeave:Y,onDrop:T,renderExpandedRow:R,expandedId:S}){const{t:X}=we.useTranslation(),ee=o.useId(),W=`table-title-${ee}`,G=`table-row-hint-${ee}`,[L,q]=o.useState(null),K=o.useCallback((ne,ye=0)=>{if(!(ne==null||typeof ne=="boolean")){if(typeof ne=="string"||typeof ne=="number")return String(ne);if(!(ye>6)){if(Array.isArray(ne)){const Ie=ne.map(Ve=>K(Ve,ye+1)).filter(Boolean);return Ie.length?Ie.join(""):void 0}if(o.isValidElement(ne))return K(ne.props.children,ye+1)}}},[]),z=o.useCallback((ne,ye)=>{const Ie=e[ye];if(!Ie)return;if(Ie.sortValue)return Ie.sortValue(ne);if(Ie.sortKey)return ne[Ie.sortKey];const Ve=l(ne)[ye]?.content;return typeof Ve=="string"||typeof Ve=="number"?Ve:K(Ve)},[e,l,K]),F=!t&&a&&!e.some(ne=>ne.sortDir!==void 0||ne.onClick),I=o.useCallback(ne=>{const ye=e[ne];if(!ye||ye.sortable===!1)return!1;if(ye.sortValue||ye.sortKey)return!0;const Ie=s[0];return Ie!==void 0&&z(Ie,ne)!==void 0},[e,s,z]);o.useEffect(()=>{if(!F||s.length===0)return;const ne=e.filter((ye,Ie)=>ye.sortable!==!1&&!I(Ie));ne.length!==0&&Dt(`Table/sort-mute/${ne.map(ye=>String(ye.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${ne.map(ye=>`'${String(ye.label??"?")}'`).join(" \xB7 ")}`,`
831
- \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[F,e,s,I]);const P=o.useMemo(()=>t?e.map(ne=>{if(!ne.sortKey||ne.sortDir!==void 0)return ne;const ye=t.field(String(ne.label??""),ne.sortKey);return{...ne,sortDir:ye.sortDir,onClick:ne.onClick??ye.onClick}}):F?e.map((ne,ye)=>I(ye)?{...ne,sortDir:L?.index===ye?L.asc?"asc":"desc":null,onClick:()=>q(Ie=>Ie?.index===ye?{index:ye,asc:!Ie.asc}:{index:ye,asc:!0})}:ne):e,[e,t,F,L,I]),Z=o.useMemo(()=>{if(!F||!L)return s;const{index:ne,asc:ye}=L;return[...s].sort((Ie,Ve)=>vr(z(Ie,ne),z(Ve,ne),ye))},[s,F,L,z]),ue=vn("(max-width: 767px)"),U=v&&ue?v:null,pe=C&&!ue,ae=o.useRef(pe);ae.current=pe;const V=48,se=40,O=o.useRef(()=>V),H=_?`table-cols:${_}`:null,re=o.useRef(null),_e=o.useRef(null),te=o.useRef(null),ie=o.useRef(null),[Be,Le]=o.useState(!1),[Re,he]=o.useState(0),ge=o.useCallback(()=>{const ne=te.current;if(!ne)return;const ye=ie.current,Ie=re.current;if(ye&&(ye.style.minWidth="",Ie)){const Ve=Ie.scrollWidth,Bt=ae.current?se:0;ye.style.minWidth=Ve>ne.clientWidth+1?`${Ve+Bt}px`:""}Le(ne.scrollWidth>ne.clientWidth+1),he(ne.clientWidth)},[]),Ee=o.useCallback((ne,ye)=>{const Ie=ne.current;Ie&&_e.current&&_e.current.unobserve(Ie),ne.current=ye,ye?(!_e.current&&typeof ResizeObserver<"u"&&(_e.current=new ResizeObserver(()=>ge())),_e.current?.observe(ye)):!te.current&&!ie.current&&(_e.current?.disconnect(),_e.current=null),ge()},[ge]),ve=o.useCallback(ne=>Ee(te,ne),[Ee]),Fe=o.useCallback(ne=>Ee(ie,ne),[Ee]);o.useEffect(()=>{ge()}),o.useEffect(()=>{if(typeof window>"u")return;const ne=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ge()):null;return window.addEventListener("resize",ge),()=>{ne!=null&&cancelAnimationFrame(ne),window.removeEventListener("resize",ge)}},[ge]);const ze=o.useRef(()=>!1),Ct=o.useRef([]),ut=o.useRef(null),nt=ne=>{if(!ne||typeof window>"u")return null;try{const ye=JSON.parse(window.localStorage.getItem(ne)??"null");return Array.isArray(ye)&&ye.length>0&&ye.every(Ie=>typeof Ie=="number"&&Number.isFinite(Ie)&&Ie>0)?ye:null}catch{return null}},[ct,Ae]=o.useState(()=>nt(H)),[Ue,ke]=o.useState(H),[Ye,et]=o.useState(()=>nt(H)!==null);if(Ue!==H){ke(H);const ne=nt(H);Ae(ne),et(ne!==null)}const ft=o.useRef(ct);o.useEffect(()=>{ft.current=ct},[ct]);const vt=o.useCallback(ne=>{const ye=ut.current;if(!ye)return;const Ie=ft.current;if(Ie){const Ve=[...Ie],Bt=()=>V;if(ye.next!=null&&ye.startWNext!=null){const Qe=ne.clientX-ye.startX,zt=Math.max(Bt()-ye.startW,Math.min(ye.startWNext-Bt(),Qe));Ve[ye.index]=ye.startW+zt,Ve[ye.next]=ye.startWNext-zt}else Ve[ye.index]=Math.max(Bt(),ye.startW+(ne.clientX-ye.startX));ft.current=Ve,Ae(Ve)}},[]),it=o.useCallback(()=>{if(ut.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",it),window.removeEventListener("pointercancel",it),document.body.style.cursor="",document.body.style.userSelect="",H&&ft.current)try{window.localStorage.setItem(H,JSON.stringify(ft.current))}catch{}},[vt,H]),jt=o.useCallback((ne,ye)=>{ye.preventDefault(),ye.stopPropagation();const Ie=re.current;if(!Ie)return;const Ve=Array.from(Ie.children).map(Qe=>Qe.getBoundingClientRect().width),Bt=f==="fit"?P.findIndex((Qe,zt)=>zt>ne&&Qe.resizable!==!1):-1;ut.current=Bt>=0?{index:ne,startX:ye.clientX,startW:Ve[ne],next:Bt,startWNext:Ve[Bt]}:{index:ne,startX:ye.clientX,startW:Ve[ne]},ft.current=Ve,Ae(Ve),et(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",it),window.addEventListener("pointercancel",it),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,it,f,P]),at=o.useCallback(()=>{const ne=re.current,ye=ne?.closest(".table-wrap");if(!ne||!ye)return null;const Ie=ye.style.getPropertyValue("--table-grid-cols");ye.style.setProperty("--table-grid-cols",P.map(()=>"max-content").join(" "));const Ve=Array.from(ye.querySelectorAll(".table-row")).filter(Pt=>!Pt.classList.contains("table-row--loading")&&!Pt.classList.contains("table-row--empty")),Bt=Pt=>Array.from(Pt.children).map(St=>{const Mt=window.getComputedStyle(St);return{width:St.getBoundingClientRect().width,span:b4(Mt.gridColumnStart,Mt.gridColumnEnd)}}),Qe=parseFloat(window.getComputedStyle(ne).columnGap)||0,zt=Ve.map(Bt),Ht=Bt(ne),cn=f4([Ht,...zt],P.length,Qe),Yt=_4(P.map((Pt,St)=>({declaredMin:O.current(St),headWidth:Ht[St]?.width??0,sortable:Pt.sortDir!==void 0||!!Pt.onClick,sorted:!!Pt.sortDir}))),Tt=Pt=>Yt[Pt]??O.current(Pt),Jt=P.map((Pt,St)=>{const Mt=cn[St],Gt=ze.current(St)?parseFloat(Ct.current[St]):NaN;return Number.isFinite(Gt)&&Math.ceil(Mt)>Gt&&Dt(`table-fixed-col-overflow:${St}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${St+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Mt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Mt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(O.current(St),Math.ceil(Mt))}),en=window.getComputedStyle(ne),An=(parseFloat(en.paddingLeft)||0)+(parseFloat(en.paddingRight)||0),Nn=ye.clientWidth-An;Ie?ye.style.setProperty("--table-grid-cols",Ie):ye.style.removeProperty("--table-grid-cols");const gn={isFixed:Pt=>ze.current(Pt),floorOf:Tt,containerWidth:Nn};return g4(Jt,gn)?rc:y4(Jt,gn)},[P,f]),rt=(ne,ye)=>ne!==null&&ne.length===ye.length&&ne.every((Ie,Ve)=>Ie===ye[Ve]),At=o.useRef(at);o.useEffect(()=>{At.current=at});const[Nt,Ot]=o.useState(0),Wt=Z.length>0,xt=`${H??""}|${Nt}|${P.length}|${Re}|${g??""}`,st=!Ye&&pe&&H!==null&&!B?`${xt}|${Wt?1:0}`:null,bt=o.useRef(null);o.useEffect(()=>{if(st===null||!Wt||bt.current===xt)return;const ne=At.current();if(ne!==null){if(bt.current=xt,ne===rc){Ae(null);return}Ae(ye=>rt(ye,ne)?ye:ne)}},[st]);const dt=o.useCallback(()=>{if(H)try{window.localStorage.removeItem(H)}catch{}et(!1);const ne=At.current(),ye=Array.isArray(ne)?ne:null;Ae(ye),ft.current=ye,Ot(Ie=>Ie+1)},[H]);o.useEffect(()=>()=>{ut.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",it),window.removeEventListener("pointercancel",it),document.body.style.cursor="",document.body.style.userSelect="")},[vt,it]);const kt=P.length>0&&P.every(ne=>ne.width!=null)?P.map(ne=>typeof ne.width=="number"?`${ne.width}px`:String(ne.width)).join(" "):null;P.some(ne=>ne.width!=null)&&!kt&&Dt(`table-field-width:${P.map(ne=>ne.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),kt&&b&&Dt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const ht=b??kt??void 0,wt=C4(ht),ce=wt.filter(ne=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ne));ce.length>0&&Dt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${ce.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const Me=P.findIndex(ne=>!!ne.sortDir);P.filter(ne=>!!ne.sortDir).length>1&&Dt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const De=ne=>ne===Me?P[ne].sortDir==="asc"?"ascending":"descending":P[ne].onClick?"none":void 0,Je=ne=>/^\d+(\.\d+)?px$/.test(wt[ne]??""),pt=ne=>{const ye=wt[ne]??"",Ie=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ye)??/^(\d+(?:\.\d+)?)px$/.exec(ye);return Ie?parseFloat(Ie[1]):V};ze.current=Je,O.current=pt,Ct.current=wt;const Rt=ne=>f==="fit"&&!Je(ne)?"fr":"px",Te=ct&&ct.length===P.length&&!ue,tt=U??(Te?P.map((ne,ye)=>ne.resizable===!1&&wt[ye]?wt[ye]:`${ct[ye]}${Rt(ye)}`).join(" "):ht),Ft=tt?{"--table-grid-cols":tt}:void 0,_t=y!==void 0;return n.jsxs("div",{ref:ve,className:`table-wrap table-wrap--${w}${pe?" table-wrap--resizable":""}${$?" table-wrap--dragover":""}${E?" table-wrap--collapsed":""}`,style:Ft,onDragOver:M,onDragLeave:Y,onDrop:T,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof y=="string"?y:X("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:G,className:"table-row-hint",children:X("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Fe,role:"table","aria-labelledby":_t&&typeof y=="string"?W:void 0,className:"table body-2",children:[_t&&n.jsxs("div",{className:Ne("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(fe,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:E?"chevron-right":"chevron-down",ariaLabel:E?X("common.expand","\uD3BC\uCE58\uAE30"):X("common.collapse","\uC811\uAE30"),ariaExpanded:!E,className:"table-header__chevron"}),A&&n.jsx(ot,{icon:A,label:typeof y=="string"?y:void 0,className:"table-header__icon"}),n.jsx("span",{id:W,className:"table-header__title h5b",children:y}),x!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:x}),D&&n.jsx("span",{className:"table-header__actions",onClick:ne=>ne.stopPropagation(),children:D})]}),!E&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ne,ye)=>n.jsx("div",{role:"columnheader","aria-colspan":ne.span,className:Ne("table-field body-3",ne.className),style:{gridColumn:`span ${ne.span}`},children:ne.label},ye))}),n.jsxs("div",{role:"presentation",className:Ne("table-fields-strip",pe&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:re,children:P.map((ne,ye)=>n.jsx(B4,{onClick:ne.onClick,className:Ne(ne.className,oc(ne.align)),sortDir:ne.sortDir,ariaSort:De(ye),onResizeStart:pe&&ye<P.length-1&&ne.resizable!==!1&&(f!=="fit"||P.some((Ie,Ve)=>Ve>ye&&Ie.resizable!==!1))?Ie=>jt(ye,Ie):void 0,children:ne.label},ye))}),pe&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:X("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:X("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:dt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(es,{variant:"loading",colSpan:P.length||void 0}):Z.length===0&&N?n.jsx(es,{variant:"empty",colSpan:P.length||void 0,children:N}):Z.map((ne,ye)=>{const Ie=m!=null&&ne.id===m,Ve=!!i&&(c?c(ne):!0),Bt=S!=null&&ne.id!=null&&(S instanceof Set?S.has(ne.id)||[...S].some(Qe=>String(Qe)===String(ne.id)):String(ne.id)===String(S));return n.jsx(es,{className:`${Ve?" table-row--clickable":""}${h?" table-row--draggable":""}${Ie?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ve?()=>i(ne):void 0,colSpan:P.length||void 0,rowHasButton:l(ne).some(Qe=>!!Qe.rowLabel),describedBy:G,onMouseEnter:u?Qe=>u(ne,Qe):void 0,onMouseLeave:p?Qe=>p(ne,Qe):void 0,onDragStart:h?Qe=>h(ne,Qe):void 0,onDragEnd:d?Qe=>d(ne,Qe):void 0,expandedContent:Bt&&R?R(ne):void 0,children:l(ne).map((Qe,zt)=>n.jsx(x4,{className:Ne(Qe.className,oc(P[zt]?.align)),style:Qe.style,span:Qe.span,rowLabel:Ve?Qe.rowLabel:void 0,onRowClick:Ve?()=>i(ne):void 0,children:Qe.content},zt))},ne.id!=null?`${typeof ne.id}:${ne.id}`:`__idx:${ye}`)})})]})]})]})}function sc(e,t){return t!=="wornAt"?String(e[t]??""):jv(e.wornYear,e.wornMonth,e.wornDay)}function k4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:c,i18n:u}=we.useTranslation(),p=f=>f==="left"?c("device.direction.left","\uC88C"):c("device.direction.right","\uC6B0"),{sort:h,field:d}=zy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:_}=h;return[...e].sort((g,w)=>{if(f==="worn"){const y=Number(w.worn)-Number(g.worn);return _?y:-y}return vr(sc(g,f),sc(w,f),_)})},[e,h]),{pageRows:b,pageSizeProps:v,paginationProps:C}=Oy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Vo,{count:{value:e.length,unit:c("customers.device.unit","\uAC1C")},pageSize:v,pagination:C,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:c("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(ts,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(c("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(c("device.direction.label","\uBC29\uD5A5"),"side"),d(c("device.deviceType","\uC885\uB958"),"device"),d(c("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(c("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(c("device.productName","\uC81C\uD488\uBA85"),"productName"),d(c("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((f,_)=>({id:f.id??`${f.side}-${_}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(Wo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?c("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):c("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:p(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Du(f.device),fill:"soft",label:Su(f.device,c)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Oo(f.wornYear,f.wornMonth,f.wornDay,u.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:c("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:c("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function lc(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function A4(e,t){return new Date(e,t+1,0).getDate()}function N4(e,t){return new Date(e,t,1).getDay()}function E4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=we.useTranslation(),c=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),u=pr(s),[p,h]=o.useState(()=>Number(u.slice(0,4))),[d,m]=o.useState(()=>Number(u.slice(5,7))-1),[b,v]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const x={};return e.forEach(E=>{x[E.date]||(x[E.date]=[]),x[E.date].push(E)}),x},[e]),_=o.useMemo(()=>{const x=A4(p,d),E=N4(p,d),k=[];for(let D=0;D<E;D++)k.push(null);for(let D=1;D<=x;D++)k.push(D);for(;k.length<35;)k.push(null);return k},[p,d]),g=o.useCallback(()=>{d===0?(h(x=>x-1),m(11)):m(x=>x-1)},[d]),w=o.useCallback(()=>{d===11?(h(x=>x+1),m(0)):m(x=>x+1)},[d]),y=x=>`${p}-${String(d+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,A=x=>y(x)===u;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(ot,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Yl(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(ot,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[c.map(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),_.map((x,E)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${E}`);const k=x,D=y(k),N=f[D]??[],B=Gl(D,i.language),$=b===D;return n.jsxs("div",{className:`calendar-cell${A(k)?" today":""}${$?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:D}):void 0,"aria-current":A(k)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?M=>{M.target===M.currentTarget&&(M.key!=="Enter"&&M.key!==" "||(M.preventDefault(),r(D)))}:void 0,onDragOver:a?M=>{M.preventDefault(),v(D)}:void 0,onDragLeave:a?M=>{M.currentTarget.contains(M.relatedTarget)||v(null)}:void 0,onDrop:a?M=>{M.preventDefault(),C.current!=null&&(a(C.current,D),C.current=null),v(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),N.length>0&&(()=>{const M=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:N.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:N.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:N.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),Y=M.length===1&&M[0].key==="visited"?l("calendar.visitCount",{count:N.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):M.map(T=>l("calendar.statusCount",{label:T.label,count:T.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${B} ${Y}`,children:[M.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),N.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:N.map((M,Y)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${M.status==="noVisit"?" calendar-visit-badge--no-visit":M.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{C.current=M.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,v(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t(M)}:void 0,...lc(t?()=>t(M):void 0),"aria-label":[B,M.time?Ql(M.time,l):null,M.customer,l(M.status==="noVisit"?"calendar.legend.noVisit":M.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[M.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Ql(M.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:M.customer}),M.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},M.id??Y))})]},k)})]})]})}const D4={page:"h3",pagePopup:"h4",popup:"h5"};function Ba({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:c=!1,className:u,style:p}){const h=D4[e],d=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:Ne("section",`section--${e}`,c&&"section--in-grid",u),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(ot,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let ns=null,ic=!1;function uc(){if(ic||typeof document>"u")return;ic=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(ns="keyboard")},!0);const e=()=>{ns="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}uc();function Nr(){return uc(),ns==="keyboard"}const Er=20;function S4(e){const{t}=we.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:c,onItemComplete:u,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:b="page"}=e||{},[,v]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[_,g]=o.useState(Math.min(f,Er)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{g(Math.min(f,Er))},[f]),Vi("speechear.data.updated",()=>v(E=>E+1));const y=o.useRef(null),A=o.useRef(null);function x(){const E=document.activeElement;A.current=Nr()&&E&&E.closest?.(".training-block__more")?_:null,g(k=>Math.min(f,k+Er))}return o.useEffect(()=>{const E=A.current;if(E==null)return;A.current=null;const k=document.activeElement;k&&k!==document.body||y.current?.querySelectorAll(".training-block-button")[E]?.focus()},[_]),n.jsxs(Ba,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:y,children:(C||[]).slice(0,_).map((E,k)=>{const D=E;return n.jsx(Fo,{index:k,type:a,trainingData:D,depth:w,renderPopup:l,completedIds:i,selectedIds:c,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&c!=null&&D?.id!=null&&c.has(String(D.id))?()=>d(D):void 0,onComplete:typeof u=="function"&&D?.id!=null?()=>u(String(D.id)):void 0,onMore:typeof m=="function"?N=>m(D,N):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${k}`)})}),f>Er&&_<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function j4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function T4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),c=t??j4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const b=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const _=m.firstElementChild?.offsetWidth??0;i(g=>g.width===f&&g.card===_?g:{width:f,card:_})};if(b(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(b);return v.observe(m),()=>v.disconnect()},[c,e]);const u=l.card>0?l.card:0,p=u>0?Nf(l.width,u,e):0,h=p>0?Ef(c,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${u}px`}:{}};return n.jsx("div",{ref:s,className:Ne("training-block-grid",h>0&&"training-block-grid--measured",a),style:d,"data-cols":h>0?h:void 0,children:r})}function as(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const u=t.current;s({url:e,failed:!1,loading:!!e&&!(u?.complete&&u.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),c=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:c}}var M4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const L4=M4,rs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:c=!1,hideAudio:u=!1,orderRank:p=null},h){const{t:d}=we.useTranslation(),m=e.word||e.title||"",b=t||!m,v=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[_,g]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(_.label!==m||_.subLabel!==C||_.colloquialLabel!==f||!Object.is(_.homonum,e.homonum))&&g({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),y=vn("(max-width: 767px)"),[A,x]=o.useState(!1),[E,k]=o.useState(!1),D=`${typeof v=="string"?v:v?.src??""}\0${m}`,[N,B]=o.useState({for:"",url:""}),$=N.for===D?N.url:"",M=Vl(),Y=e.textOnly??(!e.image&&!!_.label&&!!M&&M.entries.length>0&&!M.byWord.has(_.label)),T=Y?"":ma()?.(_.label,_.homonum)??e.image??"",{imgRef:R,loading:S,hasImage:X,onLoad:ee,onError:W}=as(T);o.useEffect(()=>{let Z=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){B({for:D,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const U=v.src;if(U){B({for:D,url:U});return}}}const ue=La();if(ue&&m)try{const U=await Promise.resolve(ue(m));!Z&&U&&B({for:D,url:U})}catch{}})(),()=>{Z=!0}},[v,m,D]);const G=o.useRef(!0),L=o.useRef(null);o.useEffect(()=>(G.current=!0,()=>{G.current=!1,L.current&&Br(L.current),L.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const q=o.useCallback(()=>new Promise(Z=>{if(typeof window<"u"&&window.speechSynthesis&&m){x(!0),window.speechSynthesis.cancel();const ue=new SpeechSynthesisUtterance(m);ue.lang="ko-KR",ue.onend=()=>{x(!1);try{a?.()}catch{}Z()},ue.onerror=()=>{x(!1),Z()},window.speechSynthesis.speak(ue)}else Z()}),[m,a]),K=o.useCallback(Z=>{const ue=Xa(Z,U=>{if(x(!1),U)try{a?.()}catch{}});return w.current=ue.el,ue.done},[a]),z=o.useCallback(async()=>{if(t||!G.current)return;const Z=()=>{L.current===Z&&(L.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},ue=Za(Z);L.current=Z;try{window.speechSynthesis?.cancel()}catch{}try{if($&&(x(!0),await K($)))return;const U=ir();if(U&&m)try{k(!0);const pe=await Promise.resolve(U(m));if(!G.current||L.current!==Z||(k(!1),pe&&(x(!0),await K(pe))))return}catch{}if(!G.current||L.current!==Z)return;await q()}finally{L.current===Z&&k(!1),ue(),L.current===Z&&(L.current=null)}},[t,$,m,K,q]);o.useImperativeHandle(h,()=>({play:()=>z()}),[z]);const F=Z=>Z.stopPropagation(),I=o.useCallback(Z=>{if(Z.stopPropagation(),!t){if(A){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}z()}},[t,A,z]),P=Ne("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:P,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?Z=>{Z.target===Z.currentTarget&&(Z.key==="Enter"||Z.key===" "||Z.key==="Spacebar")&&(Z.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:F,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:Y?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):X?n.jsxs(n.Fragment,{children:[S&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:R,className:"training-word-card__image",src:T,alt:_.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:S?0:1},onLoad:ee,onError:W})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!c&&n.jsxs("div",{className:"training-word-card__body",children:[!Y&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!u&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?F:void 0,children:n.jsx(fe,{htmlType:"button",size:y?40:48,type:y?"dot":"bar",icon:A?"pause":"play",label:y?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:A,loading:E,onClick:I,disabled:t,ariaLabel:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${L4}")`}})})]})})});function Dr(e){return String(e)}const Sr=["o","triangle","x"];function cc(e,t){return e===t?null:t}const dc={o:"circle",triangle:"triangle",x:"x"},pc={o:"main",triangle:"warn",x:"danger"};function $4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function os(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function hc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function R4(e,t){return!t&&e>0}const oa={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function P4(e="landscape"){Dt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=oa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function F4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const I4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function mc(e,t){const a=I4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function O4(e,t){const a=mc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=oa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,c=(m,b)=>Math.min(l/m/yc,i/b/vc),u=Math.max(0,a.cols*a.rows-r),p=c(a.cols,a.rows);let h=a,d=p;for(let m=1;m<=r;m++){const b=Math.ceil(r/m);if(m*b-r>u)continue;const v=c(m,b);v>d&&(h={cols:m,rows:b},d=v)}return d>p*1.05?h:a}const z4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Cc={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},fc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ss={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ls={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function bc(e){return Object.fromEntries(Object.entries(Cc).map(([t,a])=>[t,ss[t]?e(`wordTable.pos.${ss[t]}`,{defaultValue:a}):a]))}function gc(e){return Object.fromEntries(Object.entries(fc).map(([t,a])=>[t,ls[t]?e(`wordSearch.filter.type.${ls[t]}`,{defaultValue:a}):a]))}const W4={pos:ss,wordType:ls};function is(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function us(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,c=l<a-1;if(!i&&!c)return{};const u="#ddd",p=b=>`repeating-linear-gradient(to ${b}, ${u} 0, ${u} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),c&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const yc=280,H4=240,V4=280,vc=400,q4=120,U4=280;function _c(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),c=o.useCallback((u,p)=>{if(!(u>0))return;const h=u/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(u-e*m)/2))},[e,t]);return o.useEffect(()=>{const u=a.current;if(!u)return;const p=t?u.parentElement??u:u;if(c(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>c(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[c,t]),{scalerRef:a,scale:r,offset:l}}const G4=24,K4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Y4=400,xc=8;function Z4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function cs({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:c,showWord:u=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:b=40,wordInfo:v,outerScale:C=1}){const{t:f}=we.useTranslation(),_=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[y,A]=o.useState(1),[x,E]=o.useState(!1),[k,D]=o.useState(!1),[N,B]=o.useState({for:"",url:""}),[$,M]=o.useState(null),Y=t&&t.length>0?t:J1()?.(e,c)??"",T=ma()?.(l||e,c)??"",{imgRef:R,loading:S,failed:X,onLoad:ee,onError:W}=as(T),G=o.useCallback(()=>M(g.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>M(null),[]),q=gr(!!$,se=>{se?G():L()},g),K=o.useMemo(()=>{if(!v)return null;const se=[];return v.grade&&se.push(f("wordTable.info.grade",{n:v.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),v.syllables&&se.push(f("wordTable.info.syllables",{n:v.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),v.pos&&se.push(f("wordTable.info.pos",{v:is(v.pos,bc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),v.wordType&&se.push(f("wordTable.info.wordType",{v:is(v.wordType,gc(f)),defaultValue:"\uC720\uD615: {{v}}"})),se.length?se:null},[v,f]),z=Y||e,F=N.for===z?N.url:"";o.useEffect(()=>{const se=La(),O=Y||e;if(!se||!O)return;let H=!1;return Promise.resolve(se(O)).then(re=>{!H&&re&&B({for:O,url:re})}),()=>{H=!0}},[Y,e]);const I=o.useRef(null),P=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),P.current?.()},[]);const Z=o.useRef(null);o.useEffect(()=>()=>{Z.current&&(Z.current.cancelled=!0)},[]);const ue=o.useCallback(se=>{if(se.stopPropagation(),x||k){I.current?.();return}if(!F){const H=ir(),re=Y||e;if(!H||!re)return;const _e={cancelled:!1,stop:null};Z.current=_e;const te=()=>{_e.cancelled=!0,_e.stop?.(),D(!1),E(!1),P.current?.()};I.current=te,P.current=Za(te),D(!0),Promise.resolve().then(()=>H(re)).then(ie=>{if(_e.cancelled)return;if(!ie){te();return}B({for:re,url:ie});const Be=Xa(ie,()=>{E(!1),P.current?.()});w.current=Be.el,_e.stop=Be.stop,D(!1),E(!0)}).catch(()=>{te()});return}E(!0);const O=Xa(F,()=>{E(!1),P.current?.()});w.current=O.el,I.current=O.stop,P.current=Za(O.stop)},[x,k,F,Y,e]),U=p&&!!T&&!X,pe=U&&u?yc:U?V4:H4,ae=U&&u?vc:U?U4:q4;o.useEffect(()=>{const se=_.current;if(!se||typeof ResizeObserver>"u")return;const O=new ResizeObserver(([H])=>{const{width:re,height:_e}=H.contentRect;A(Math.min(re/pe,_e/ae))});return O.observe(se),()=>O.disconnect()},[pe,ae]);const V=b*C<G4;return n.jsxs("div",{ref:_,className:Ne("word-table-cell",V&&"word-table-cell--tap-too-small",U?"word-table-cell--with-image":""),"data-ref-w":pe,"data-ref-h":ae,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${y})`},children:[U&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[S&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:R,className:"word-table-cell__image",src:T,alt:e,draggable:!1,style:{opacity:S?0:1},onLoad:ee,onError:W})]}),m&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(ln,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),u&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&Y&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",Y,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":F,children:[n.jsx("span",{"data-play-state":"play",style:{display:x?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?f("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):f("common.play","\uC7AC\uC0DD"),ariaLabel:e?f("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):f("common.play","\uC7AC\uC0DD"),onClick:ue})}),n.jsx("span",{"data-play-state":"pause",style:{display:x?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:f("common.pause","\uBA48\uCDA4"),ariaLabel:e?f("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):f("common.pause","\uBA48\uCDA4"),onClick:ue})})]}),v&&n.jsxs("div",{ref:g,className:"word-table-cell__info-button",onPointerEnter:se=>{Gn(se)||G()},onPointerLeave:se=>{Gn(se)||L()},onFocus:()=>{ta()||G()},onBlur:L,children:[n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:se=>{se.stopPropagation(),q.touchPress()}}),$&&K&&n.jsx(Un,{anchorRect:$,items:K,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:f("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?f("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):f("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:se=>{se.stopPropagation(),i.onPick(se.currentTarget.getBoundingClientRect())}})})]})]})}function ka({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:c,cutLine:u="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:b,activeCell:v=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:_,onReorder:g,onCopyItem:w,onReplaceItem:y,onPickForm:A,indexOffset:x=0,totalCount:E,renderCellAction:k,showFillerAdd:D=!1,addableCount:N,contentRef:B,buttonSize:$=40,brand:M,code:Y,pageNumber:T,pageNumberPosition:R="right",fitHeight:S=!1,scoring:X=!1,marks:ee,onMarkClick:W,scoreIndexOffset:G=0}){const L=o.useCallback((ce,Me)=>{W?.(G+ce,Me)},[W,G]),q=(ce,Me)=>{const De=ce.filter(Boolean).join(" / ");return De?Me?z("wordPrint.removePairFor",{name:De,defaultValue:`${De} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):z("wordPrint.removeWordFor",{name:De,defaultValue:`${De} \uBE7C\uAE30`}):Me?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},K=(ce,Me)=>{const De=ee?.[Dr(G+ce)]??null;return n.jsx("div",{className:Ne("word-table-cell__score",De?"word-table-cell__score--marked":""),style:kt>1?{transform:`translateX(-50%) scale(${kt})`,transformOrigin:"bottom center"}:void 0,children:Sr.map(Je=>n.jsx("span",{className:Ne("word-table-cell__score-slot",De===Je?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:dc[Je],variant:De===Je?pc[Je]:"default",selected:De===Je,useBorder:!1,...dt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:z(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:z(`wordTable.scoring.${Je}`,{word:Me,defaultValue:`${Me} ${Je}`}),onClick:dt?pt=>{pt.stopPropagation(),L(ce,Je)}:void 0})},Je))})},{t:z}=we.useTranslation(),F=m!==void 0,I=e!=null||!!t||!!a,P=vn("(max-width: 767px)"),Z=o.useRef(null),[ue,U]=o.useState(null),pe=d?.length??0,ae=E??pe,[V,se]=o.useState(null),[O,H]=o.useState(""),re=o.useRef(null),_e=o.useRef(null),te=o.useRef(null),ie=o.useRef(null),Be=o.useCallback(ce=>{_e.current=ce,typeof B=="function"?B(ce):B&&(B.current=ce)},[B]),Le=o.useCallback((ce,Me)=>{re.current=x+Me,g?.(ce,Me),H(z("wordTable.reorder.moved",{n:x+Me+1,total:ae,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[g,z,ae,x]);o.useEffect(()=>{const ce=re.current;ce!=null&&(re.current=null,(_e.current?.closest(".word-table-block__pages")??_e.current)?.querySelector(`[data-wordtable-index="${ce}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{ie.current?.()},[]);const Re=o.useCallback((ce,Me)=>{if(!g||!ce.altKey||ce.ctrlKey||ce.metaKey)return;const De=ce.key==="ArrowRight";if(!De&&ce.key!=="ArrowLeft")return;ce.preventDefault();const Je=Me+(De?1:-1),pt=x+Je;pt<0||pt>=ae||Le(Me,Je)},[g,ae,x,Le]),he=o.useCallback((ce,Me)=>{if(!g||ce.pointerType==="mouse")return;const De=ce.target.closest?.("button");if(De&&!De.closest(".word-table__card-handle"))return;ie.current?.();const Je={x:ce.clientX,y:ce.clientY};let pt=!1;const Rt=Ve=>{pt&&Ve.cancelable&&Ve.preventDefault()};let Te=null,tt=null;const Ft=()=>{const Ve=tt;if(!Ve)return;const Bt=document.elementFromPoint?.(Ve.x,Ve.y)?.closest?.("[data-wordtable-cell]"),Qe=Bt?Number(Bt.dataset.wordtableCell):NaN,zt=Number.isInteger(Qe)?Qe:null;te.current=zt,U(Ht=>Ht===zt?Ht:zt)},_t=Ve=>{if(!pt){(Math.abs(Ve.clientX-Je.x)>xc||Math.abs(Ve.clientY-Je.y)>xc)&&Ie();return}if(tt={x:Ve.clientX,y:Ve.clientY},typeof requestAnimationFrame>"u"){Ft();return}Te===null&&(Te=requestAnimationFrame(()=>{Te=null,Ft()}))},ne=()=>{Te!==null&&(cancelAnimationFrame(Te),Te=null,Ft());const Ve=te.current,Bt=pt;Ie(),Bt&&Ve!=null&&Ve!==Me&&Le(Me,Ve)},ye=setTimeout(()=>{pt=!0,se(Me),te.current=Me,U(Me),window.addEventListener("touchmove",Rt,{passive:!1})},Y4);function Ie(){clearTimeout(ye),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",ne),window.removeEventListener("pointercancel",ne),window.removeEventListener("touchmove",Rt),pt=!1,Te!==null&&(cancelAnimationFrame(Te),Te=null),te.current=null,ie.current=null,se(null),U(null)}ie.current=Ie,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",ne),window.addEventListener("pointercancel",ne)},[g,Le]),{width:ge,height:Ee}=oa[s],ve=typeof S=="number"?S:S&&typeof S=="object"?P?S.narrow:S.wide:null,{scalerRef:Fe,scale:ze,offset:Ct}=_c(ge,S?Ee:void 0),ut=F?m?.length??0:d?.length??0,nt=Math.max(b??ut,1),ct=!F&&!!i,Ae=O4(s,nt),Ue=mc(s,nt),ke=ct?Ae.cols:Ue.cols,Ye=ct?Ae.rows:Ue.rows,et=ct&&s==="landscape"?Ae.cols*2:ke,ft=ct&&s==="portrait"?Ae.rows*2:Ye,vt=ce=>({word:ce.length===0||ce.includes("word"),image:ce.length===0||ce.includes("image"),pron:ce.length===0||ce.includes("standardPron"),colloq:ce.length===0||ce.includes("colloquialPron"),caption:ce.length===0||ce.includes("caption")}),it=vt(l),jt=o.useMemo(()=>{const ce=(d??[]).map(De=>De.id),Me=ce.every(De=>typeof De=="string"&&De.length>0)&&new Set(ce).size===ce.length;return!Me&&ce.length>0&&Dt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Me?ce:null},[d]),at=vt(c??l),rt=F?(m??[]).some(ce=>ce!==null&&ce.length>1):(d??[]).some(ce=>(ce.words??[]).length>1),At=!!M?.show,Nt=!!M?.show&&M?.top!==!1,Ot=!!M?.show&&M?.bottom!==!1,Wt=M?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=le(Ne("word-table__content",z4[u],p&&"word-table__content--outline",h&&rt&&"word-table__content--div-line",!At&&T&&R!=="none"&&"word-table__content--page-number",Nt&&"word-table__content--brand-top",Ot&&"word-table__content--brand-bottom")),st={transform:`scale(${1/ze})`,transformOrigin:"center center"},bt=$*Sr.length+4*(Sr.length-1),dt=!!W,kt=dt?Math.max(1,Math.min(1/ze,ge/et/bt)):1,ht=n.jsxs("div",{ref:Fe,className:"word-table__scaler",style:{height:Ee*ze},children:[n.jsx("div",{className:Ne("word-table",X&&!dt&&"word-table--score-readonly",!I&&r),style:{width:ge,height:Ee,transform:`scale(${ze})`,transformOrigin:"top left",marginLeft:Ct},children:n.jsxs("div",{ref:Be,className:xt,style:{gridTemplateColumns:`repeat(${et}, 1fr)`,gridTemplateRows:Z4(ft)},children:[F?n.jsx(n.Fragment,{children:(m??[]).map((ce,Me)=>n.jsx("div",{className:le(Ne("word-table__edit-cell",ce?"word-table__edit-cell--filled":"word-table__edit-cell--empty",v===Me?"word-table__edit-cell--active":"")),style:us(Me,et,ft,u),children:ce?n.jsxs(n.Fragment,{children:[ce.map((De,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(cs,{outerScale:ze,label:De.word,subLabel:De.pronunciation,colloquialLabel:De.colloquialPronunciation,homonum:De.homonum,showWord:it.word,showImage:it.image,showPronunciation:it.pron,showColloquial:it.colloq,showCaption:it.caption,buttonSize:$})]},Je)),X&&K(Me,ce.map(De=>De.word).join(" / ")),f&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ce.length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q(ce.map(De=>De.word),ce.length>1),onClick:()=>f(Me)})})]}):C&&n.jsx("div",{className:le("word-table__card-add"),style:st,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Me)})})},Me))}):n.jsxs(n.Fragment,{children:[ct&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Ae.cols}`,gridRow:`1 / span ${Ae.rows}`,...us(0,s==="landscape"?2:1,s==="landscape"?1:2,u)},children:(i.words??[]).map((ce,Me)=>n.jsxs(o.Fragment,{children:[Me>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(cs,{outerScale:ze,label:ce.label,subLabel:ce.subLabel,colloquialLabel:ce.colloquialLabel,captionLabel:ce.captionLabel,captionBadge:ce.captionBadge,imageLabel:ce.imageLabel,pickForm:A&&ce.canPickForm?{n:null,onPick:De=>A(i.id,-1,De)}:void 0,homonum:ce.homonum,showWord:at.word,showImage:at.image,showPronunciation:at.pron,showColloquial:at.colloq,showCaption:at.caption,buttonSize:$,wordInfo:ce.grade||ce.syllables!=null||ce.pos||ce.wordType?{grade:ce.grade,syllables:ce.syllables,pos:ce.pos,wordType:ce.wordType}:void 0})]},Me))}),(d??[]).map((ce,Me)=>n.jsxs("div",{"data-wordtable-cell":g?Me:void 0,"data-wordtable-index":g?x+Me:void 0,className:le(`word-table__card${g?" word-table__card--draggable":""}${ue===Me?" word-table__card--drag-over":""}${V===Me?" word-table__card--dragging":""}`),style:us(Me,ke,Ye,u),draggable:!!g,onPointerDown:g?De=>he(De,Me):void 0,onKeyDown:g?De=>Re(De,Me):void 0,onDragStart:g?()=>{Z.current=Me}:void 0,onDragOver:g?De=>{De.preventDefault(),U(Me)}:void 0,onDragLeave:g?()=>U(null):void 0,onDrop:g?De=>{De.preventDefault(),Z.current!==null&&Z.current!==Me&&g(Z.current,Me),Z.current=null,U(null)}:void 0,onDragEnd:g?()=>{Z.current=null,U(null)}:void 0,children:[(ce.words??[]).map((De,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(cs,{outerScale:ze,label:De.label,subLabel:De.subLabel,colloquialLabel:De.colloquialLabel,captionLabel:De.captionLabel,captionBadge:De.captionBadge,imageLabel:De.imageLabel,pickForm:A&&De.canPickForm?{n:x+Me+1,onPick:pt=>A(ce.id,x+Me,pt)}:void 0,homonum:De.homonum,showWord:it.word,showImage:it.image,showPronunciation:it.pron,showColloquial:it.colloq,showCaption:it.caption,buttonSize:$,wordInfo:De.grade||De.syllables!=null||De.pos||De.wordType?{grade:De.grade,syllables:De.syllables,pos:De.pos,wordType:De.wordType}:void 0})]},Je)),X&&K(Me,(ce.words??[]).map(De=>De.label).join(" / ")),(k||_||w||y||g)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[_&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ce.words??[]).length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q((ce.words??[]).map(De=>De.label),(ce.words??[]).length>1),onClick:()=>_(ce.id)})}),w&&n.jsx("div",{className:le("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:z("wordTable.copyItemAria",{n:x+Me+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(ce.id,x+Me)})}),y&&n.jsx("div",{className:le("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ce.words??[]).length>1?z("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):z("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ce.words??[]).length>1?z("wordTable.replacePairAria",{n:x+Me+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):z("wordTable.replaceItemAria",{n:x+Me+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>y(ce.id,x+Me)})}),k?.(Me,ce),g&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:z("wordTable.reorder.handle",{word:(ce.words??[]).map(De=>De.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},jt?jt[Me]:Me)),Array.from({length:Math.max(0,ke*Ye-(d?.length??0))}).map((ce,Me)=>{const De=ke*Ye,Je=N??De,pt=(d?.length??0)+Me<Je;return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:D&&C&&pt&&n.jsx("div",{className:le("word-table__card-add"),style:st,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((d?.length??0)+Me)})})},`filler-${Me}`)})]}),Nt&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:M?.topLogo?.src??wr,alt:M?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ce=[M?.title&&n.jsx("span",{className:"word-table__paper-title",children:M.title},"t"),M?.owner&&n.jsx("span",{className:"word-table__owner",children:M.owner},"o"),Y&&n.jsx("span",{className:"word-table__code",children:Y},"c")].filter(Boolean);return ce.length===0?null:n.jsx("span",{className:"word-table__ident",children:ce.map((Me,De)=>n.jsxs(o.Fragment,{children:[De>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Me]},De))})})()]})}),Ot&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[M?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:M.bottomLogo.src,alt:M.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Wt})]}),n.jsxs("span",{className:"word-table__band-end",children:[M?.link&&n.jsx("span",{className:"word-table__link",children:M.link}),T&&R!=="none"&&n.jsx("span",{className:"word-table__page-count",children:z("wordTable.filter.pageIndicator",{current:T.current,total:T.total})})]})]})}),!At&&T&&R!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${R}`,children:z("wordTable.filter.pageIndicator",{current:T.current,total:T.total})})]})}),g&&n.jsx("span",{role:"status",style:K4,children:O})]}),wt=ve==null?ht:n.jsx("div",{className:"word-table__frame",style:{height:ve},children:ht});return I?n.jsx(Ba,{type:"page",icon:t,title:e,disc:a,className:Ne(le("word-table__section"),r),children:wt}):wt}function X4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=J4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function J4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==kn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>Q4(e,s)).join(", ")}function Q4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function On({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:c,footer:u,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:b,className:v}){const C=(m??(b==="vertical"?"newline":"inline"))==="inline",{t:f}=we.useTranslation(),[_,g]=o.useState(l),w=i??_,y=()=>{const B=!w;g(B),c?.(B)},A=B=>{if(!s)return;const $=B.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||y()},x=o.useMemo(()=>r!==void 0||!w?"":X4(p,h,f("common.all","\uC804\uCCB4")),[r,w,p,h,f]),E=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),k=e||a||r||s,D=o.useId(),N=t?`h${t}`:"span";return n.jsxs("div",{className:Ne("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",v),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?D:void 0,children:[k&&n.jsxs("div",{className:"filter-panel__header",onClick:s?A:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(N,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?E:a,s&&n.jsx(fe,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:y})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Ne("filter-panel__sections",C?"filter-panel__sections--row":""),children:p.map(B=>{const $=h[B.label],M=$===void 0||(Array.isArray($)?$.length===0:!1),Y=(B.items??[]).filter(R=>R!=null);B.allOption&&Y.some(R=>(typeof R=="string"?R:R.value)===kn)&&Dt(`filter-panel-all-value:${B.label}`,`[FilterPanel] '${B.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${kn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const T=R=>{const S=typeof R=="string"?R:R.value,X=typeof R!="string"&&!!R.disabled,ee=typeof R!="string"?R.labels:void 0,W=typeof R!="string"?R.displayLabel:void 0,G=typeof R!="string"?R.tooltip:void 0,L=typeof R!="string"?R.descriptionTooltip:void 0,q=typeof R!="string"?R.shape:void 0,K=Array.isArray($)?$.includes(S):$===S;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:ee??W??S,type:B.itemType??(ee?"bar":S.length===1?"dot":void 0),selected:K,disabled:X,shape:q,showTooltipInfo:!!G,tooltipInfoText:G,tooltipDescription:L,onClick:()=>d?.(S,B.label)},S)};return n.jsxs(o.Fragment,{children:[B.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:B.groupLabel}),B.groupAction]}),n.jsxs("div",{className:Ne("filter-panel__section",B.layout==="row"?"filter-panel__section--row":"",B.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:B.displayLabel??B.label}),B.labelAction??(B.labelInfo?n.jsx(Ya,{...B.labelInfo}):null)]}),B.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:B.content}):B.type==="input"?n.jsx(Yn,{className:"filter-panel__textfield",placeholder:B.placeholder,ariaLabel:B.displayLabel??B.label,value:h[B.label]??"",onChange:R=>d?.(R,B.label),error:B.error}):!B.multiple&&B.display==="segmented"?n.jsx(_n,{ariaLabel:B.displayLabel??B.label,options:[...B.allOption?[{key:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...Y.map(R=>{const S=typeof R=="string"?R:R.value,X=typeof R!="string"?R.displayLabel:void 0,ee=typeof R!="string"?R.disabled:void 0;return{key:S,label:X??S,disabled:ee}})],value:M&&B.allOption?kn:h[B.label]??"",onChange:R=>d?.(R,B.label),size:32}):!B.multiple&&B.display==="dropdown"?n.jsx(xn,{className:"filter-panel__dropdown",ariaLabel:typeof B.label=="string"?B.label:void 0,size:Lt,options:[...B.allOption?[{value:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...Y.map(R=>{const S=typeof R=="string"?R:R.value,X=typeof R!="string"?R.displayLabel:void 0,ee=typeof R!="string"?R.disabled:void 0;return{value:S,label:X??S,disabled:ee}})],value:M&&B.allOption?kn:h[B.label],onChange:R=>d?.(R,B.label)}):n.jsxs("div",{className:B.groups?"filter-panel__item-groups":"filter-panel__items",children:[B.allOption&&!B.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:M,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),B.groups?B.groups.map((R,S)=>n.jsxs("div",{className:"filter-panel__item-group",children:[S===0&&B.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:M,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),R.filter(X=>X!=null).map(T)]},S)):Y.map(T)]})]})]},B.label)})}),u!=null&&u!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:u})]})]})}const e_=[1,2,3,4,5,6,7,8,9,10,11,12],t_=[8,6,4,2,1],bn="show",Tn="hide",wc=["image","word","caption","standardPron"];function Bc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function kc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Ac(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function Nc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Tc(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...t_.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Mc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function n_(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Lc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function $c(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?bn:Tn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:Tn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:Tn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:Tn}:{}}}function Rc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===kn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===bn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===bn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===bn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===bn),!0):!1}function a_(e){return"sections"in e}function ds(e){const{t}=we.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u};if(a_(e))return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:b,orientation:v,showOutline:C,cutLine:f,showDivLine:_,setters:g,showCutLine:w=!1,showDivLine2:y=!1,middleSections:A=[],extraSelected:x={},onExtraSelect:E,showPaperBands:k=!1,showTopInfo:D=!0,showBottomInfo:N=!0}=e,B=[kc(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Ac(t),...A,Nc(t),...w?[Sc(t)]:[],...y?[jc(t)]:[],...k?[Ec(t),Dc(t)]:[]],$={...$c(t,{contentTypes:b,orientation:v,showOutline:C,cutLine:f,showDivLine:_,showTopInfo:D,showBottomInfo:N}),...x},M=(Y,T)=>{Rc(t,Y,T,g)||E?.(Y,T)};return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:B,selected:$,onSelect:M,...p,sectionAlign:"horizontal"})}function ps(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r_(e){return ps(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function hs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let jr=null,Aa=null;function o_(e,t,a,r="",s=""){if(e.length===0||Aa&&Aa.iframe.isConnected&&Date.now()-Aa.at<1e4)return;const l=r?hs(r):"";jr?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),jr===i&&(jr=null)},jr=i,window.addEventListener("afterprint",i)}const c=document.createElement("iframe");c.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(c);const u=c.contentDocument;if(!u){c.remove();return}Aa={iframe:c,at:Date.now()},u.open(),u.write(ms(e,t,a,!0,l,s)),u.close(),c.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{c.remove(),Aa?.iframe===c&&(Aa=null)},0)})}function ms(e,t,a,r=!1,s="",l=""){s=s?hs(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
832
- `),c="light",u=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${ps(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),m.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
828
+ `)}const zv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Wv=/^(?:const|let|var|function|return|if|else|for|while|switch|case|break|import|from|export|class|new|try|catch|finally|throw|await|async|null|true|false|this|typeof|instanceof)\b/;function Hv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const y=a.indexOf(`
829
+ `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const y=a.indexOf(`
830
+ `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const p=a.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),a=a.slice(p[0].length);continue}const h=a.match(Wv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const d=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const y=d[0];l(s&&zv.has(y)?"command":"identifier",y),a=a.slice(y.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){l("punctuation",b[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Vv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=ke.useTranslation(),[u,c]=o.useState(!1),p=Ov(Iu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Yf(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Hv(p,t),b=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:De("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(be,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((y,C)=>n.jsx("span",{className:`code-token ${y.type} ${b}`,children:y.content},C))})})]})}function qv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=ke.useTranslation(),c=s!==void 0?s:e>0,p=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),d=o.useRef(null),m=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=d.current,w=b.current;if(b.current=c,c&&!w){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!g?.contains(_)?_:null}else!c&&w&&g&&g.contains(document.activeElement)&&fr(g,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const g=h.current;if(!g)return;const w=D=>{f.current=D,C(D)},_=()=>{const D=g.firstElementChild??g,A=Array.from(D.children);if(A.length<2){w(!1);return}const B=A[0].offsetTop,F=A.some(T=>T.offsetTop!==B);if(!f.current){x.current=g.clientWidth,F&&w(!0);return}if(F)return;const L=A[0],q=A[A.length-1],M=q.offsetLeft+q.offsetWidth-L.offsetLeft,O=x.current;(O==null||M<=O)&&w(!1)};if(_(),typeof ResizeObserver>"u")return;const E=new ResizeObserver(_);E.observe(g);const v=g.parentElement;let N=v?.clientWidth??0;const k=new ResizeObserver(()=>{const D=v?.clientWidth??0;D!==N&&(N=D,x.current=null,_())});return v&&k.observe(v),()=>{E.disconnect(),k.disconnect()}},[l,e]),n.jsxs("div",{ref:d,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(be,{htmlType:"button",size:Lt,label:p,onClick:a}),t.map((g,w)=>n.jsx(be,{htmlType:"button",size:Lt,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const Uv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function Gv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:De("item-actions",a),children:Uv.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?Fl(i.sms):Fl(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${Rl}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${Rl}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Yv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=r2(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:De("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:De("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:n2(t2(u),c)}}):n.jsx("img",{src:e,alt:t,className:De("brand-logo",a),style:r,draggable:!1})}function Ou({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:De("section-head-float",t),children:e})}function qo({items:e,className:t}){return n.jsx("div",{className:ue(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:ue("chart-section__legend-item"),children:[n.jsx("span",{className:ue("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}const oa=e=>`chart-section__total__num ${e?"h1":"h0"}`;function xa({label:e,children:t}){return e?n.jsxs("div",{className:ue("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ue("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ue("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ue("chart-section__total"),children:t})}const zu=20,Uo=120,Zv={small:Uo,medium:Uo*2+zu,large:Uo*2+zu},Wu={small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"};function Ar({type:e="chart",title:t,titleClassName:a,titleLevel:r,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:b,totalNum:y,totalUnit:C,totalMuted:f=!1,totalLabel:x,change:g,changeType:w,size:_,bodyAlign:E="bottom",subRow:v,legend:N,subRowAlign:k="start",className:D,inGrid:A=!1,fitBody:B=!1,children:F}){const L=e==="stat",q=_??(L?"small":"large"),M=q==="small"||q==="medium",O=a??"h5",T=r??(L?0:3),{t:G}=ke.useTranslation(),K=o.useRef(null),{anchorRect:ee,openAt:re,close:R}=_r(),J=o.useCallback(()=>{b&&K.current&&re(K.current)},[b,re]),[ne,S]=o.useState(!1);zo(()=>{const se=K.current;if(!se||!c)return;const ye=xe=>S(xe>0&&xe<h);if(ye(se.clientWidth),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(xe=>ye(xe[0].contentRect.width));return Ce.observe(se),()=>Ce.disconnect()},[c,h]);const[$,I]=o.useState(null),P=o.useCallback(()=>I(null),[]),V=o.useCallback(se=>{const ye=se.currentTarget.getBoundingClientRect();I(Ce=>Ce?null:{left:ye.left,right:ye.right,top:ye.top,bottom:ye.bottom,width:ye.width,height:ye.height,x:ye.x,y:ye.y})},[]),ie=!!c&&ne;o.useEffect(()=>{ie||I(null)},[ie]);const U=c?[...c.options.map(se=>({label:se.label,icon:se.icon,selected:se.key===c.value,disabled:se.disabled,onClick:()=>c.onChange(se.key),closeOnSelect:!0})),...(p??[]).map((se,ye)=>ye===0?{...se,separatorBefore:!0}:se)]:[],ce=o.useCallback(se=>{if(!d)return;const ye=se.target;ye&&typeof ye.closest=="function"&&ye.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),Z=o.useCallback(se=>{d&&se.target===se.currentTarget&&(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),d())},[d]),H=typeof i=="function"?i({collapsed:ie}):i,te=y!=null||x?n.jsxs(xa,{label:x,children:[y!=null&&n.jsx("span",{className:ue(oa(M)),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}):null,W=H||c?n.jsxs("div",{className:ue("chart-section__head-right"),children:[c&&(ie?n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:V}):n.jsx(_n,{size:ra,ariaLabel:c.ariaLabel,options:c.options.map(se=>({key:se.key,label:se.label,disabled:se.disabled})),value:c.value,onChange:c.onChange})),H]}):null,z=o.useRef(null),[ae,ve]=o.useState(null);o.useLayoutEffect(()=>{const se=z.current;if(!se){ve(null);return}const ye=()=>{const xe=se.getBoundingClientRect().height;ve($e=>$e!=null&&Math.abs($e-xe)<1?$e:xe)};if(ye(),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(ye);return Ce.observe(se),()=>Ce.disconnect()},[N]);const me=o.useId(),le=T?`h${T}`:"div",Be=typeof q=="number"?q:Zv[q],Pe=w??(g===void 0?void 0:g>0?"up":g<0?"down":"neutral"),Fe=g===void 0?void 0:g>0?`+${g}`:`${g}`,Ae=b&&ee?n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}):null;return L?n.jsxs("div",{ref:K,className:ue(["chart-section","chart-section--stat",A&&"chart-section--grid",E==="center"&&"chart-section--body-center",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:Be===void 0?void 0:{minHeight:Be},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,y,Fe].filter(se=>se!=null&&se!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[Ae,n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t}),s&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ue("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:ue("chart-section__sub-row"),children:[n.jsxs(xa,{children:[n.jsx("span",{className:ue([oa(!0),f&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}),Fe&&n.jsx("div",{className:ue(`chart-section__change chart-section__change--${Pe??"neutral"} caption-1`),children:Fe})]}),F&&n.jsx("div",{className:ue("chart-section__body"),children:F})]})]}):n.jsxs("section",{ref:K,className:ue(["chart-section",A&&"chart-section--grid",B&&"chart-section--fit",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:{...Be===void 0?null:B?{minHeight:Be,height:Be}:{minHeight:Be},...ae==null?null:{"--legend-h":`${ae}px`}},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[b&&ee&&n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}),u&&n.jsx(Ou,{children:u}),n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsxs("div",{className:ue("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ue("chart-section__icon")}),n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t})]}),W,l&&n.jsx("div",{className:ue("chart-section__disc body-3"),children:l})]}),(te||v)&&n.jsxs("div",{className:ue(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[te,v]}),N&&n.jsx("div",{ref:z,className:ue("chart-section__legend-slot"),children:N}),F,$&&n.jsx(Bn,{anchorRect:$,onClose:P,ariaLabel:c?.ariaLabel??G("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:[{items:U}],onClose:P,size:"small"})})]})}const rr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Go=e=>rr(e.getFullYear(),e.getMonth()+1);function wa(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const Ko=(e,t)=>`${e}#${t}`;function jn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Xv(){const e=fa();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<jn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-jn(t,a))/7),l=rr(t,a+1);return{monthKey:l,value:Ko(l,s)}}function Jv(e){const t=fa(),a=Go(t),r=(c,p)=>rr(c,p+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=r(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=jn(d,m);if(!(c===a&&t.getDate()<b)&&!p.some(f=>f.date.getDate()<b))continue;const y=new Date(d,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,p]of s){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=new Date(d,m+1,0).getDate(),y=p.reduce((_,E)=>Math.max(_,E.parts?.length??0,E.partsB?.length??0),0),C=p.some(_=>_.partsB),f=new Array(b+1).fill(0),x=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(y).fill(0)),w=Array.from({length:b+1},()=>new Array(y).fill(0));for(const _ of p){const E=_.date.getDate();if(f[E]+=_.a,x[E]+=_.b,_.parts)for(let v=0;v<y;v++)g[E][v]+=_.parts[v]??0;if(_.partsB)for(let v=0;v<y;v++)w[E][v]+=_.partsB[v]??0}l.set(c,{year:d,month:m,daysInMonth:b,partsLen:y,hasPartsB:C,dayA:f,dayB:x,dayParts:g,dayPartsB:w})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:b,dayB:y,dayParts:C,dayPartsB:f}=p,x=h===t.getFullYear()&&d===t.getMonth(),g=t.getDate(),w=l.get(r(d===11?h+1:h,(d+1)%12)),_=p.partsLen,E=[];for(let N=1;N<=m;N++){const k=x&&N>g;E.push({label:String(N),...k&&b[N]===0&&y[N]===0?{future:!0}:{},a:k&&b[N]===0&&y[N]===0?-1:b[N],b:y[N],..._?{parts:C[N]}:{},..._&&p.hasPartsB?{partsB:f[N]}:{}})}const v=[];for(let N=jn(h,d);N<=m;N+=7){const k=Math.max(0,N+6-m),D=k&&w?Math.max(_,w.partsLen):_,A=p.hasPartsB||!!(k&&w?.hasPartsB);let B=0,F=0;const L=new Array(D).fill(0),q=new Array(D).fill(0);for(let O=N;O<=Math.min(N+6,m);O++){B+=b[O],F+=y[O];for(let T=0;T<_;T++)L[T]+=C[O][T],q[T]+=f[O][T]}if(k&&w)for(let O=1;O<=k&&!i(w.year,w.month,O);O++){B+=w.dayA[O],F+=w.dayB[O];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[O][T],q[T]+=w.dayPartsB[O][T]}const M=k?`${(d+1)%12+1}/${k}`:`${N+6}`;v.push({label:`${v.length+1}\uC8FC`,sublabel:`[${N}\uC77C~${M}\uC77C]`,a:B,b:F,...D?{parts:L}:{},...D&&A?{partsB:q}:{}})}u[c]={weekly:v,daily:E}}return u}function Hu(){const e=fa(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:rr(s,i),year:s,month:i})}return r.reverse()}Hu();function Qv(){return Hu()}function Vu(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function qu(e){const{t,i18n:a}=ke.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Qv().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const B of l){const F=new Date(B.year,B.month,0).getDate(),L=jn(B.year,B.month-1),q=Math.ceil((F-L+1)/7);for(let M=q-1;M>=0;M--)A.push({value:Ko(B.value,M),monthKey:B.value,year:B.year,month:B.month,week:M})}return A},[l]),u=o.useCallback((A,B)=>t("calendar.yearMonthCompact",{year:A,month:B,full:Yl(t,a.language,A,B),defaultValue:"{{full}}"}),[t,a.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${Vu(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>Xv(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),b=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[y,C]=o.useState(""),[f,x]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===y)||C(m)},[l,y,m]),o.useEffect(()=>{i.find(A=>A.value===f)||x(b)},[i,f,b]);const g=r==="month"?p:h,w=r==="month"?y:f,_=r==="month"?C:x,E=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),v=g.findIndex(A=>A.value===w),N=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A<g.length-1&&_(g[A+1].value)},[g,w,_]),k=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A>0&&_(g[A-1].value)},[g,w,_]),D=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:w,setRange:_,activeOptions:g,activeIdx:v,handlePrev:N,handleNext:k,periodOptions:D,monthRange:y,weekRange:f,weekRanges:i,DOW:E}}const $t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function In(e,t=!0){return e.future===!0||t&&e.a===-1}function e4({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:b,grouped:y=!1,baseline:C,focusableBars:f=!1}){const x=!a,g=!!(d&&d.length>0),w=C,_=o.useMemo(()=>g?Math.max(0,...e.filter(S=>!In(S,w==null)).map(S=>y?Math.max(0,...(S.parts??[]).map($t)):(S.parts??[]).reduce(($,I)=>$+Math.max(0,$t(I)),0))):Math.max(0,...e.filter(S=>!In(S,w==null)).flatMap(S=>x?[$t(S.a)]:[$t(S.a),$t(S.b)])),[e,x,g,y]),E=o.useMemo(()=>{if(w==null)return 0;const S=e.filter($=>!In($,w==null)).flatMap($=>g?($.parts??[]).map($t):x?[$t($.a)]:[$t($.a),$t($.b)]);return Math.max(0,...S.map($=>Math.abs($-w)))},[e,w,g,x]),v=o.useMemo(()=>{const S=w!=null?E:_;return p??(h?S>0?S:10:Math.ceil(S/10)*10||10)},[_,E,w,p,h]),N=o.useRef(null),k=o.useRef(null),[D,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const S=N.current;if(!S)return;const $=()=>{const P=k.current,V=S.clientHeight-(P?P.getBoundingClientRect().height:0);V<=0||A(ie=>ie!=null&&Math.abs(ie-V)<1?ie:V)};if($(),typeof ResizeObserver>"u")return;const I=new ResizeObserver($);return I.observe(S),k.current&&I.observe(k.current),()=>I.disconnect()},[c]);const B=D??u,F=g?y?Math.max(1,d.length):1:x?1:2,L={"--bar-width":`${o.useMemo(()=>{const S=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(S*F)+6)))},[e.length,F,l])}px`},q={"--bar-group-gap":`${Math.max(0,i)}px`},M=o.useMemo(()=>{const S=Math.round(v/2);return w!=null?[w+v,...S!==v?[w+S]:[],w,...S!==v?[w-S]:[],w-v]:S!==v?[v,S,0]:[v,0]},[v,w]),O=S=>w!=null?1-(S-(w-v))/(2*v):1-S/v,[T,G]=o.useState(null),K=o.useCallback(()=>G(null),[]),ee=o.useCallback((S,$)=>{const I=[S.label,S.sublabel].filter(Boolean).join(" ");let P;if(g&&y&&S.rawPartsB)P=(m??[]).map((V,ie)=>{const U=S.rawPartsB[ie]??0;return{text:U>0?`${V}: ${$[ie]??0}% (${S.rawParts?.[ie]??0}/${U})`:`${V}: -`,color:(d??[])[ie]}});else if(g&&y)P=(m??[]).map((V,ie)=>({text:`${V}: ${J($[ie]??0)}`,color:(d??[])[ie]}));else if(g){const V=(m??[]).map((U,ce)=>({text:`${U}: ${$[ce]??0}`,color:(d??[])[ce]})),ie=V.filter((U,ce)=>($[ce]??0)>0);P=ie.length?ie:V}else b&&!x?P=[{text:`${r} ${$t(S.a)}%`,color:t},{text:`${s} ${$t(S.b)}%`,color:a}]:b&&S.rawB!==void 0?P=[{text:`${b.total} ${S.rawB}`},{text:`${b.done} ${S.rawA??0}`,color:t}]:x?P=[{text:`${r}: ${$t(S.a)}`,color:t}]:P=[{text:`${r}: ${$t(S.a)}`,color:t},{text:`${s}: ${$t(S.b)}`,color:a}];return{title:I,items:P}},[g,y,m,d,b,x,r,s,t,a,w]),re=o.useCallback((S,$,I)=>{const P=S.getBoundingClientRect(),{title:V,items:ie}=ee($,I);G({rect:{left:P.left,top:P.top,right:P.right,bottom:P.bottom,width:P.width,height:P.height},title:V,items:ie})},[ee]),R=o.useCallback((S,$)=>{const{title:I,items:P}=ee(S,$);return[I,...P.map(V=>V.text)].filter(Boolean).join(", ")},[ee]),J=S=>w!=null&&S>w?`+${S}`:`${S}`,ne=T!=null;return o.useEffect(()=>{if(!ne)return;const S=()=>G(null),$=I=>{const P=I.target;P&&typeof P.closest=="function"&&P.closest(".bar-chart__col")||G(null)};return window.addEventListener("scroll",S,!0),document.addEventListener("pointerdown",$,!0),()=>{window.removeEventListener("scroll",S,!0),document.removeEventListener("pointerdown",$,!0)}},[ne]),n.jsxs("div",{ref:N,className:ue("bar-chart__wrap"),style:q,children:[n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsx("div",{className:ue("bar-chart__scroll"),children:n.jsxs("div",{className:ue("bar-chart__area"),children:[n.jsxs("div",{className:ue("bar-chart__plot"),style:{height:B},children:[M.slice(0,-1).map((S,$)=>n.jsx("div",{className:ue(`bar-chart__gridline${w!=null&&S===w?" bar-chart__gridline--baseline":""}`),style:{top:O(S)*B},children:n.jsx("span",{className:ue("bar-chart__gridline__label caption-1"),children:S})},$)),e.map((S,$)=>{const I=In(S,w==null),P=B/2,V=Z=>w!=null?Math.min(P,Math.abs($t(Z)-w)/v*P):Math.min(B,Math.max(0,$t(Z)/v*B)),ie=I?0:V(S.a),U=I?0:V(S.b),ce=(S.parts??[]).map($t);return n.jsx("div",{className:ue(`bar-chart__col${y&&g?" bar-chart__col--group":""}`),style:{cursor:I?"default":"pointer"},tabIndex:f&&!I?0:void 0,role:f&&!I?"img":void 0,"aria-label":f&&!I?R(S,ce):void 0,onMouseEnter:I?void 0:Z=>re(Z.currentTarget,S,ce),onFocus:I||!f?void 0:Z=>re(Z.currentTarget,S,ce),onBlur:f?K:void 0,onMouseLeave:K,children:!I&&(g&&y?(d??[]).map((Z,H)=>{const te=ce[H]??0;if(w==null)return n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:V(te),background:Z}},H);const W=$t(te)<w;return n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:!W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(te),background:Z}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(te),background:Z}})})]},H)}):g?n.jsx("div",{className:ue("bar-chart__stack"),style:L,children:(()=>{const Z=ce.reduce((te,W,z)=>W>0?z:te,-1);let H=B;return ce.map((te,W)=>{if(te<=0)return null;const z=Math.min(H,te/v*B);return H-=z,n.jsx("div",{className:ue("bar-chart__stack-segment"),style:{height:z,background:(d??[])[W],borderRadius:W===Z?"6px 6px 0 0":void 0}},W)})})()}):w!=null?n.jsx(n.Fragment,{children:[{v:$t(S.a),c:t},...x?[]:[{v:$t(S.b),c:a}]].map(({v:Z,c:H},te)=>n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:Z>=w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(Z),background:H}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:Z<w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(Z),background:H}})})]},te))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:ie,background:t}}),!x&&n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:U,background:a}})]}))},$)})]}),n.jsx("div",{ref:k,className:ue("bar-chart__x-axis"),children:e.map((S,$)=>{const I=In(S,w==null);return n.jsxs("span",{className:ue(`bar-chart__x-axis__label${I?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:[S.isToday&&n.jsx("span",{className:ue("bar-chart__x-axis__today-dot"),style:{background:t}}),S.label]}),S.sublabel&&n.jsx("span",{className:"caption-1",children:S.sublabel})]},$)})})]})})}),T&&n.jsx(Un,{anchorRect:T.rect,title:T.title,items:T.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Uu({control:e}){const{t}=ke.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ue("chart-section__controls"),children:[n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:r===a.length-1,onClick:i}),n.jsx(xn,{value:s,onChange:l,options:a,size:ra,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(_n,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:b=>h(b),size:ra})]})}function Yo(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Go(u)]?.daily??[])[u.getDate()-1],p=c!=null&&In(c,r)||u>s;return{dt:u,entry:c,isFuture:p}})}function t4(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=fa(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=wa(l),x=f?f.year:null,g=f?f.month1:null,w=x&&g?jn(x,g-1):1;return C.weekly.map((_,E)=>{const v=E+1;let N=_.label,k=!1,D=!1;if(x&&g){const A=w+E*7,B=new Date(x,g-1,A+6),F=B.getMonth()+1,L=B.getDate(),q=F===g?`${L}`:`${F}/${L}`;N=a("manager.chart.weekRange",{start:A,end:q});const M=new Date(h,d-1,m).getTime();k=M>=new Date(x,g-1,A).getTime()&&M<=B.getTime(),D=x>h||x===h&&(g>d||g===d&&A>m)}return{..._,label:N,sublabel:Vu(a,v-1),isToday:k,future:_.future===!0||D||void 0,a:D?-1:_.a,b:D?0:_.b}})}const b=u.find(C=>C.value===i);if(!b)return[];const y=new Date(b.year,b.month-1,jn(b.year,b.month-1)+b.week*7);return Yo(e,y,p,r).map(({dt:C,entry:f,isFuture:x})=>{const g=C.getMonth()+1,w=C.getDate(),_=C.getFullYear();return{label:g===b.month&&_===b.year?`${w}`:`${g}/${w}`,sublabel:c[C.getDay()]??"",future:x||void 0,a:x?-1:f&&f.a>0?f.a:0,b:x?0:f&&f.b>0?f.b:0,isToday:_===h&&g===d&&w===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const n4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function a4({canvasHeight:e,fitHeight:t,focusableBars:a,size:r="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:b,totalLabelKey:y,control:C,hideControls:f=!1,rate:x=!1,rateAgg:g="dayMean",tightMax:w=!1,avgMode:_=!1,totalFormat:E,series:v,seriesMode:N="stack",loading:k=!1,onDetail:D,headExtra:A,headSegment:B,icon:F,disc:L,onClick:q,cardAriaLabel:M,cardTooltip:O,detailSize:T=ra,barGap:G,baseline:K,className:ee,inGrid:re=!1}){const{t:R}=ke.useTranslation(),J={...n4[r],...e===void 0?null:{height:e}},ne=qu(u),S=C??ne,$=o.useMemo(()=>t4(u,S,R,K==null),[u,S,R,K]),I=N==="group"&&!!v&&v.length>0;G!=null&&!I&&Dt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const P=o.useMemo(()=>{if(!x)return $;const z=S.period==="month"?wa(S.monthRange):null,ae=fa(),ve=v?.length??0,me=le=>{const Be=[],Pe=[],Fe=[];for(let Ae=0;Ae<ve;Ae++){let se=0,ye=0,Ce=0;for(const xe of le){const $e=$t(xe.a[Ae]),nt=$t(xe.b[Ae]);nt<=0||(se+=$e,ye+=nt,Ce+=$e/nt*100)}Be.push(g==="weighted"?ye>0?Math.round(se/ye*100):0:le.length?Math.round(Ce/le.length):0),Pe.push(se),Fe.push(ye)}return{pct:Be,ra:Pe,rb:Fe}};return $.map((le,Be)=>{let Pe=le.a===-1?-1:le.b>0?Math.round(le.a/le.b*100):0;if(z&&!In(le)){const Ae=z.year,se=z.month1-1,ye=Yo(u,new Date(Ae,se,jn(Ae,se)+Be*7),ae).filter(Ce=>!Ce.isFuture);if(g==="weighted"){let Ce=0,xe=0;for(const{entry:$e}of ye)$e&&$e.b>0&&(Ce+=$e.a,xe+=$e.b);Pe=xe>0?Math.round(Ce/xe*100):0}else Pe=ye.length?Math.round(ye.reduce((Ce,{entry:xe})=>Ce+(xe&&xe.b>0?xe.a/xe.b*100:0),0)/ye.length):0}let Fe=null;if(I&&!In(le)){let Ae;if(z){const ye=z.year,Ce=z.month1-1;Ae=Yo(u,new Date(ye,Ce,jn(ye,Ce)+Be*7),ae).filter(xe=>!xe.isFuture).map(({entry:xe})=>({a:xe?.parts??[],b:xe?.partsB??[]}))}else Ae=[{a:le.parts??[],b:le.partsB??[]}];const se=me(Ae);Fe={parts:se.pct,rawParts:se.ra,rawPartsB:se.rb}}return{...le,a:Pe,b:le.a===-1?0:d&&le.parts&&le.parts[1]>0?Math.round(le.parts[0]/le.parts[1]*100):0,rawA:le.a===-1?-1:le.a,rawB:le.b,...Fe??{}}})},[$,x,g,d,S.period,S.monthRange,u,I,v?.length]),V=o.useMemo(()=>{if(x||_){const ae=(S.period==="week"?$:u[S.monthRange]?.daily??[]).filter(me=>me.a!==-1);if(ae.length===0)return 0;if(x&&g==="weighted"){let me=0,le=0;for(const Be of ae)Be.b>0&&(me+=Be.a,le+=Be.b);return le>0?Math.round(me/le*100):0}const ve=x?ae.reduce((me,le)=>me+(le.b>0?le.a/le.b*100:0),0):ae.reduce((me,le)=>me+(le.a>0?le.a:0),0);return Math.round(ve/ae.length)}const z=S.period==="month"?u[S.monthRange]?.daily??[]:P;return K!=null?z.reduce((ae,ve)=>ae+(In(ve,!1)?0:$t(ve.a)+(d?$t(ve.b):0)),0):z.reduce((ae,ve)=>ae+(ve.a>0?ve.a:0)+(d&&ve.b>0?ve.b:0),0)},[P,$,x,g,_,K,d,S.period,S.monthRange,u]),ie=v&&v.length>0?v.map(z=>({color:z.color,label:z.label})):[{color:c,label:R(h)},...d?[{color:p,label:R(d)}]:[]],U=r==="small",ce=r==="large",Z=U?"medium":ce?"xLarge":"large",H=ee||void 0,te=l?R(l):"",W=te?R("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):R("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ar,{className:H,size:Z,inGrid:re,icon:F,disc:L,onClick:q,ariaLabel:M,tooltip:O,headSegment:B,headMenuItems:D?[{label:W,icon:"list",onClick:D,closeOnSelect:!0}]:void 0,title:R(l),titleLevel:i,headRight:U?A??void 0:({collapsed:z})=>n.jsxs(n.Fragment,{children:[!f&&n.jsx(Uu,{control:S}),A,D&&!z&&n.jsx("span",{className:ue("bar-chart__detail-btn"),children:n.jsx(be,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:W,showTooltipInfo:W,onClick:D})})]}),legend:n.jsx(qo,{items:ie,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:x||_||y&&E?n.jsx(xa,{label:U?void 0:`${R(S.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${R(y??h)}`,children:E?(E(V).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((z,ae)=>/\d/.test(z)?n.jsx("span",{className:ue(oa(!ce)),children:z},ae):n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:z},ae)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}):n.jsxs(xa,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(h)}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}),children:k?n.jsx("div",{className:ue("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsxs("div",{className:ue("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ue("bar-chart__plot bar-chart__plot--loading"),style:{height:J.height},children:n.jsx(ga,{size:32})}),n.jsx("div",{className:ue("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ue("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),P.some(z=>!!z.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(e4,{focusableBars:a,data:P,colorA:c,colorB:d?p:void 0,labelA:R(h),labelB:d?R(d):void 0,barWidth:s??J.barWidth,barGap:G,baseline:K,height:J.height,fitHeight:t,maxOverride:x?100:void 0,tightMax:w,seriesColors:v?.map(z=>z.color),seriesLabels:v?.map(z=>z.label),rateLabels:x?{total:R("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:R("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:I})})}const Gu=120,r4={left:38,right:16,top:26,bottom:24};function o4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[b,y]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=K=>m(Math.round(K)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const G=new ResizeObserver(([K])=>T(K.contentRect.width));return G.observe(b),()=>{G.disconnect()}},[b]);const{payload:C,anchorRect:f,openAfterDelay:x,close:g}=Zy(Gu),w=o.useCallback((T,G)=>{T&&x(T,G.getBoundingClientRect())},[x]),_=d??i,E=l,{left:v,right:N,top:k,bottom:D}={...r4,...u},[A,B]=t,F=T=>B===A?v:v+(_-v-N)*(T-A)/(B-A),L=T=>k+(E-k-D)*(100-T)/100,q={x:F,y:L,plot:{left:v,right:_-N,top:k,bottom:E-D,width:Math.max(0,_-v-N),height:Math.max(0,E-k-D)}},M=e.filter(T=>!T.hollow),O=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:De("line-chart",h),viewBox:`0 0 ${_} ${E}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:v,x2:_-N,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:v-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(q),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:E-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:O,points:M.map(T=>`${F(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:G=>w(T.description,G.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:De("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:L(T.pct),r:4,stroke:O,fill:T.hollow?void 0:O})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function s4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:De("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:De("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(be,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Ku=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},Yu=(e,t,a,r)=>({from:Zl(e,t,a),to:new Date(Zl(e,t,a+r).getTime()-1),fromYmd:Ku(e,t,a),toYmd:Ku(e,t,a+r-1)});function l4(e,t=0){if(e.period==="month"){const s=wa(e.monthRange),l=fa(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return Yu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Wa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=jn(a.year,a.month-1);return Yu(a.year,a.month-1,r+(a.week+t)*7,7)}const Zo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Zu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Xu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const p=typeof s=="number"?s:Zo[s].diameter,h=l??(typeof s=="number"?12:Zo[s].strokeWidth),d=p/2,m=(p-h)/2,b=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((g,w)=>{const _=g.length>0?g[g.length-1].acc:0,E=Number.isFinite(w.ratio)?w.ratio:0,v=Math.max(0,Math.min(E,1-_));return g.push({color:w.color,rotate:-90+_*360,dash:b*v,acc:_+v}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((g,w)=>g.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:g.color,strokeWidth:h,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${d} ${d})`},w))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=b*y,f=b-C;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Zu(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function i4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...b}){const{t:y}=ke.useTranslation();if(!e)return n.jsx(Xu,{...b});const C=(b.total??0)>0?Zu(Math.min((b.done??0)/b.total,1)):0,f=b.size==="small",x=typeof b.size=="number"?b.size:Zo[b.size??"medium"].diameter,g=b.size==="large",w=f?"medium":g?"xLarge":"large",_=c||void 0,E=r&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:r,className:ue("chart-section__head-icon-inner")})});return n.jsx(Ar,{className:_,size:w,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:y(e),titleLevel:t,headRight:E||(f?void 0:a),legend:i&&n.jsx(qo,{items:i}),subRow:s&&n.jsxs(xa,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:ue(oa(f)),children:C}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:x,height:x},"aria-busy":"true",children:n.jsx(ga,{size:32})})}):n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Xu,{...b,hideCenter:b.hideCenter??f})})})}function u4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(Ar,{type:"stat",title:e,totalNum:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function Ju({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:p,className:h,label:d,formatValue:m,labelPos:b,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:g=!1,showFillTick:w=!1,tickStep:_,tickShape:E="dot"}){t&&!c&&Dt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const v=Math.min(r,Math.max(a,e)),N=r>a?(v-a)/(r-a):0,k=l==="vertical",D=!t,A=ne=>t?.(Number(ne.target.value)),B=typeof p=="number"?`${p}px`:p,F={"--slider-ratio":String(N),"--slider-thumb":`${i}px`,...B?k?{height:B}:{width:B}:{}},L=_??s,q=(g||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(q>0&&q<=100){const ne=E!=="dash",S=ie=>ne?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`,$=ne?"2px":"4px",I=[],P=[],V=[];for(let ie=0;ie<=q;ie++){const U=ie*L/(r-a);if(U>1+1e-6)break;const ce=`${((k?1-U:U)*100).toFixed(4)}%`,Z=U<=N+1e-6;if(Z?!w:!g)continue;const H=Z?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(S(H)),P.push(k?`${$} var(--slider-thumb)`:`var(--slider-thumb) ${$}`),V.push(k?`center ${ce}`:`${ce} center`)}I.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),P.push("100% 100%"),V.push("0 0"),F.backgroundImage=I.join(", "),F.backgroundSize=P.join(", "),F.backgroundPosition=V.join(", "),F.backgroundRepeat="no-repeat"}const M=m?m(v):d==="percent"?`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`:d==="count"?`${v} / ${r}`:v===a&&f?f:v===r&&x?x:void 0,O=n.jsx("input",{type:"range",className:De("slider",`slider--${l}`,D&&"slider--static",!d&&!C&&h),min:a,max:r,step:s,value:v,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:A,style:F});if(!d&&!C)return O;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),G=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),K=C?n.jsxs("div",{className:De("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?G:T,O,k?T:G]}):O;if(!d)return K;const ee=b??(k?"bottom":"right"),re=`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`,R=m?m(v):d==="percent"?re:d==="count"?`${v} / ${r}`:String(v),J=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:De("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ee}`,`slider-wrap--align-${y}`,h),children:[K,J]})}const c4=.86,d4=250,Xo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Jo=(e,t,a,r)=>{const s=Xo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Qo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const b=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null);o.useEffect(()=>{const v=O=>{const T=Jo(O,c,p,h);C.current&&(C.current.textContent=T);const G=b.current;G&&(G.setAttribute("aria-valuenow",String(Xo(O,c,p,h))),G.setAttribute("aria-valuetext",T))},N=e??ef(t)??(x&&x.el===t?x.node:null),k=y.current;if(!N||!k){k?.style.setProperty("--meter-level","0"),v(u);let O=!1;return!e&&t&&ur(t).then(T=>{!O&&T&&g({el:t,node:T})}),()=>{O=!0}}io();const D=new Float32Array(N.fftSize);let A=0,B=0,F=0,L=0,q=null;const M=O=>{const T=tf(N,D);A=T>A?T:A*c4;const G=A>1e-5?20*Math.log10(A):-1/0,K=Math.max(u,G),ee=K-c,re=Math.min(1,Math.max(0,(ee-p)/(h-p)));if(k.style.setProperty("--meter-level",re.toFixed(3)),B+=K,F+=1,O-L>=d4){const R=B/F;q=q==null?R:q*.6+R*.4,v(q),B=0,F=0,L=O}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,p,h]);const w=typeof r=="number"?`${r}px`:r,_=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),E=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:De("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${E}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":Xo(u,c,p,h),"aria-valuetext":Jo(u,c,p,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Jo(u,c,p,h)})]})}const Qu=260;function ec({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const b=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),g=o.useRef(null),w=o.useRef(null),_=o.useRef(null),E=o.useRef(null),v=o.useRef(()=>{});v.current=D=>{D<0||(C.current=Date.now(),f.current=D,y.current=setTimeout(()=>{y.current=null,l(!1),g.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Qu)},D))};const N=o.useCallback(()=>{x.current||!y.current||(x.current=!0,clearTimeout(y.current),y.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),k=o.useCallback(()=>{x.current&&(x.current=!1,v.current(f.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(p.current)return b>0&&!y.current&&(x.current?f.current=b:v.current(b)),d.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const D=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{E.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{D(),l(!0)})})),b>0&&(x.current=!1,v.current(b))}else l(!1),g.current=setTimeout(()=>u(!1),Qu);return d.current=e,()=>{y.current&&clearTimeout(y.current),g.current&&clearTimeout(g.current),w.current&&cancelAnimationFrame(w.current),_.current&&cancelAnimationFrame(_.current),E.current&&clearTimeout(E.current),y.current=null,g.current=null,w.current=null,_.current=null,E.current=null}},[e,b,t]),{mounted:i,showing:s,popupRef:h,pause:N,resume:k}}function Ba({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=ec({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const b=a==="notice"||a==="warning"?a:"normal",y=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(y,document.body):y}const p4=24;function h4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),b=m/d*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=p4?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),s&&(g["--progress-bar-track"]=s),n.jsxs("div",{className:De("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":y,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${y}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(b)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const tc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},m4="rgba(255, 255, 255, 0.16)";function nc({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=ke.useTranslation(),p=vn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=m4),r||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:tc,children:d}),Array.from({length:e}).map((y,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const b=i?n.jsx("span",{role:"status",style:tc,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((y,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function C4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function f4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=ac(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const p=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],p)}l+=c}}return r}function ac(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function b4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?ac(parseInt(a[1],10)):1}function g4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(a(c)?u:0),0);return e.reduce((i,u,c)=>i+(a(c)?0:r(c)),0)>s-l}function y4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((d,m,b)=>d+(a(b)?m:0),0),i=e.reduce((d,m,b)=>d+(a(b)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>a(m)?d:Math.max(r(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,b)=>d+(a(b)?0:m),0));if(h!==0){let d=-1;p.forEach((m,b)=>{!a(b)&&(d<0||m>p[d])&&(d=b)}),d>=0&&(p[d]=Math.max(r(d),p[d]+h))}return p}const v4=16;function _4(e,t=v4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}const rc="declared";function x4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function es({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const b=o.useCallback(y=>{s&&y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?b:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function w4({dir:e}){return n.jsx(e==="asc"?al:nl,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function B4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(w4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:De("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function oc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ts({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:b,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,refitOn:g,size:w="small",title:_,icon:E,count:v,collapsed:N=!1,onToggleCollapse:k,headerActions:D,empty:A,loading:B,dragOver:F=!1,onDragOver:L,onDragLeave:q,onDrop:M,renderExpandedRow:O,expandedId:T}){const{t:G}=ke.useTranslation(),K=o.useId(),ee=`table-title-${K}`,re=`table-row-hint-${K}`,[R,J]=o.useState(null),ne=o.useCallback((Q,_e=0)=>{if(!(Q==null||typeof Q=="boolean")){if(typeof Q=="string"||typeof Q=="number")return String(Q);if(!(_e>6)){if(Array.isArray(Q)){const Oe=Q.map(Ve=>ne(Ve,_e+1)).filter(Boolean);return Oe.length?Oe.join(""):void 0}if(o.isValidElement(Q))return ne(Q.props.children,_e+1)}}},[]),S=o.useCallback((Q,_e)=>{const Oe=e[_e];if(!Oe)return;if(Oe.sortValue)return Oe.sortValue(Q);if(Oe.sortKey)return Q[Oe.sortKey];const Ve=l(Q)[_e]?.content;return typeof Ve=="string"||typeof Ve=="number"?Ve:ne(Ve)},[e,l,ne]),$=!t&&a&&!e.some(Q=>Q.sortDir!==void 0||Q.onClick),I=o.useCallback(Q=>{const _e=e[Q];if(!_e||_e.sortable===!1)return!1;if(_e.sortValue||_e.sortKey)return!0;const Oe=s[0];return Oe!==void 0&&S(Oe,Q)!==void 0},[e,s,S]);o.useEffect(()=>{if(!$||s.length===0)return;const Q=e.filter((_e,Oe)=>_e.sortable!==!1&&!I(Oe));Q.length!==0&&Dt(`Table/sort-mute/${Q.map(_e=>String(_e.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${Q.map(_e=>`'${String(_e.label??"?")}'`).join(" \xB7 ")}`,`
831
+ \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[$,e,s,I]);const P=o.useMemo(()=>t?e.map(Q=>{if(!Q.sortKey||Q.sortDir!==void 0)return Q;const _e=t.field(String(Q.label??""),Q.sortKey);return{...Q,sortDir:_e.sortDir,onClick:Q.onClick??_e.onClick}}):$?e.map((Q,_e)=>I(_e)?{...Q,sortDir:R?.index===_e?R.asc?"asc":"desc":null,onClick:()=>J(Oe=>Oe?.index===_e?{index:_e,asc:!Oe.asc}:{index:_e,asc:!0})}:Q):e,[e,t,$,R,I]),V=o.useMemo(()=>{if(!$||!R)return s;const{index:Q,asc:_e}=R;return[...s].sort((Oe,Ve)=>vr(S(Oe,Q),S(Ve,Q),_e))},[s,$,R,S]),ie=vn("(max-width: 767px)"),U=y&&ie?y:null,ce=C&&!ie,Z=o.useRef(ce);Z.current=ce;const H=48,te=40,W=o.useRef(()=>H),z=x?`table-cols:${x}`:null,ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),[Be,Pe]=o.useState(!1),[Fe,Ae]=o.useState(0),se=o.useCallback(()=>{const Q=me.current;if(!Q)return;const _e=le.current,Oe=ae.current;if(_e&&(_e.style.minWidth="",Oe)){const Ve=Oe.scrollWidth,Bt=Z.current?te:0;_e.style.minWidth=Ve>Q.clientWidth+1?`${Ve+Bt}px`:""}Pe(Q.scrollWidth>Q.clientWidth+1),Ae(Q.clientWidth)},[]),ye=o.useCallback((Q,_e)=>{const Oe=Q.current;Oe&&ve.current&&ve.current.unobserve(Oe),Q.current=_e,_e?(!ve.current&&typeof ResizeObserver<"u"&&(ve.current=new ResizeObserver(()=>se())),ve.current?.observe(_e)):!me.current&&!le.current&&(ve.current?.disconnect(),ve.current=null),se()},[se]),Ce=o.useCallback(Q=>ye(me,Q),[ye]),xe=o.useCallback(Q=>ye(le,Q),[ye]);o.useEffect(()=>{se()}),o.useEffect(()=>{if(typeof window>"u")return;const Q=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>se()):null;return window.addEventListener("resize",se),()=>{Q!=null&&cancelAnimationFrame(Q),window.removeEventListener("resize",se)}},[se]);const $e=o.useRef(()=>!1),nt=o.useRef([]),ct=o.useRef(null),at=Q=>{if(!Q||typeof window>"u")return null;try{const _e=JSON.parse(window.localStorage.getItem(Q)??"null");return Array.isArray(_e)&&_e.length>0&&_e.every(Oe=>typeof Oe=="number"&&Number.isFinite(Oe)&&Oe>0)?_e:null}catch{return null}},[rt,Ee]=o.useState(()=>at(z)),[Ue,Ne]=o.useState(z),[Ye,et]=o.useState(()=>at(z)!==null);if(Ue!==z){Ne(z);const Q=at(z);Ee(Q),et(Q!==null)}const ft=o.useRef(rt);o.useEffect(()=>{ft.current=rt},[rt]);const vt=o.useCallback(Q=>{const _e=ct.current;if(!_e)return;const Oe=ft.current;if(Oe){const Ve=[...Oe],Bt=()=>H;if(_e.next!=null&&_e.startWNext!=null){const Qe=Q.clientX-_e.startX,zt=Math.max(Bt()-_e.startW,Math.min(_e.startWNext-Bt(),Qe));Ve[_e.index]=_e.startW+zt,Ve[_e.next]=_e.startWNext-zt}else Ve[_e.index]=Math.max(Bt(),_e.startW+(Q.clientX-_e.startX));ft.current=Ve,Ee(Ve)}},[]),dt=o.useCallback(()=>{if(ct.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="",z&&ft.current)try{window.localStorage.setItem(z,JSON.stringify(ft.current))}catch{}},[vt,z]),jt=o.useCallback((Q,_e)=>{_e.preventDefault(),_e.stopPropagation();const Oe=ae.current;if(!Oe)return;const Ve=Array.from(Oe.children).map(Qe=>Qe.getBoundingClientRect().width),Bt=f==="fit"?P.findIndex((Qe,zt)=>zt>Q&&Qe.resizable!==!1):-1;ct.current=Bt>=0?{index:Q,startX:_e.clientX,startW:Ve[Q],next:Bt,startWNext:Ve[Bt]}:{index:Q,startX:_e.clientX,startW:Ve[Q]},ft.current=Ve,Ee(Ve),et(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",dt),window.addEventListener("pointercancel",dt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,dt,f,P]),ot=o.useCallback(()=>{const Q=ae.current,_e=Q?.closest(".table-wrap");if(!Q||!_e)return null;const Oe=_e.style.getPropertyValue("--table-grid-cols");_e.style.setProperty("--table-grid-cols",P.map(()=>"max-content").join(" "));const Ve=Array.from(_e.querySelectorAll(".table-row")).filter(Pt=>!Pt.classList.contains("table-row--loading")&&!Pt.classList.contains("table-row--empty")),Bt=Pt=>Array.from(Pt.children).map(St=>{const Mt=window.getComputedStyle(St);return{width:St.getBoundingClientRect().width,span:b4(Mt.gridColumnStart,Mt.gridColumnEnd)}}),Qe=parseFloat(window.getComputedStyle(Q).columnGap)||0,zt=Ve.map(Bt),Ht=Bt(Q),cn=f4([Ht,...zt],P.length,Qe),Yt=_4(P.map((Pt,St)=>({declaredMin:W.current(St),headWidth:Ht[St]?.width??0,sortable:Pt.sortDir!==void 0||!!Pt.onClick,sorted:!!Pt.sortDir}))),Tt=Pt=>Yt[Pt]??W.current(Pt),Jt=P.map((Pt,St)=>{const Mt=cn[St],Gt=$e.current(St)?parseFloat(nt.current[St]):NaN;return Number.isFinite(Gt)&&Math.ceil(Mt)>Gt&&Dt(`table-fixed-col-overflow:${St}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${St+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Mt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Mt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(W.current(St),Math.ceil(Mt))}),en=window.getComputedStyle(Q),An=(parseFloat(en.paddingLeft)||0)+(parseFloat(en.paddingRight)||0),Nn=_e.clientWidth-An;Oe?_e.style.setProperty("--table-grid-cols",Oe):_e.style.removeProperty("--table-grid-cols");const gn={isFixed:Pt=>$e.current(Pt),floorOf:Tt,containerWidth:Nn};return g4(Jt,gn)?rc:y4(Jt,gn)},[P,f]),st=(Q,_e)=>Q!==null&&Q.length===_e.length&&Q.every((Oe,Ve)=>Oe===_e[Ve]),At=o.useRef(ot);o.useEffect(()=>{At.current=ot});const[Nt,Ot]=o.useState(0),Wt=V.length>0,xt=`${z??""}|${Nt}|${P.length}|${Fe}|${g??""}`,it=!Ye&&ce&&z!==null&&!B?`${xt}|${Wt?1:0}`:null,bt=o.useRef(null);o.useEffect(()=>{if(it===null||!Wt||bt.current===xt)return;const Q=At.current();if(Q!==null){if(bt.current=xt,Q===rc){Ee(null);return}Ee(_e=>st(_e,Q)?_e:Q)}},[it]);const pt=o.useCallback(()=>{if(z)try{window.localStorage.removeItem(z)}catch{}et(!1);const Q=At.current(),_e=Array.isArray(Q)?Q:null;Ee(_e),ft.current=_e,Ot(Oe=>Oe+1)},[z]);o.useEffect(()=>()=>{ct.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="")},[vt,dt]);const kt=P.length>0&&P.every(Q=>Q.width!=null)?P.map(Q=>typeof Q.width=="number"?`${Q.width}px`:String(Q.width)).join(" "):null;P.some(Q=>Q.width!=null)&&!kt&&Dt(`table-field-width:${P.map(Q=>Q.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),kt&&b&&Dt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const mt=b??kt??void 0,wt=C4(mt),de=wt.filter(Q=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(Q));de.length>0&&Dt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${de.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const Le=P.findIndex(Q=>!!Q.sortDir);P.filter(Q=>!!Q.sortDir).length>1&&Dt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const Se=Q=>Q===Le?P[Q].sortDir==="asc"?"ascending":"descending":P[Q].onClick?"none":void 0,Je=Q=>/^\d+(\.\d+)?px$/.test(wt[Q]??""),ht=Q=>{const _e=wt[Q]??"",Oe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(_e)??/^(\d+(?:\.\d+)?)px$/.exec(_e);return Oe?parseFloat(Oe[1]):H};$e.current=Je,W.current=ht,nt.current=wt;const Rt=Q=>f==="fit"&&!Je(Q)?"fr":"px",Me=rt&&rt.length===P.length&&!ie,tt=U??(Me?P.map((Q,_e)=>Q.resizable===!1&&wt[_e]?wt[_e]:`${rt[_e]}${Rt(_e)}`).join(" "):mt),Ft=tt?{"--table-grid-cols":tt}:void 0,_t=_!==void 0;return n.jsxs("div",{ref:Ce,className:`table-wrap table-wrap--${w}${ce?" table-wrap--resizable":""}${F?" table-wrap--dragover":""}${N?" table-wrap--collapsed":""}`,style:Ft,onDragOver:L,onDragLeave:q,onDrop:M,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof _=="string"?_:G("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:re,className:"table-row-hint",children:G("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:xe,role:"table","aria-labelledby":_t&&typeof _=="string"?ee:void 0,className:"table body-2",children:[_t&&n.jsxs("div",{className:De("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:N?"chevron-right":"chevron-down",ariaLabel:N?G("common.expand","\uD3BC\uCE58\uAE30"):G("common.collapse","\uC811\uAE30"),ariaExpanded:!N,className:"table-header__chevron"}),E&&n.jsx(lt,{icon:E,label:typeof _=="string"?_:void 0,className:"table-header__icon"}),n.jsx("span",{id:ee,className:"table-header__title h5b",children:_}),v!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:v}),D&&n.jsx("span",{className:"table-header__actions",onClick:Q=>Q.stopPropagation(),children:D})]}),!N&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((Q,_e)=>n.jsx("div",{role:"columnheader","aria-colspan":Q.span,className:De("table-field body-3",Q.className),style:{gridColumn:`span ${Q.span}`},children:Q.label},_e))}),n.jsxs("div",{role:"presentation",className:De("table-fields-strip",ce&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:ae,children:P.map((Q,_e)=>n.jsx(B4,{onClick:Q.onClick,className:De(Q.className,oc(Q.align)),sortDir:Q.sortDir,ariaSort:Se(_e),onResizeStart:ce&&_e<P.length-1&&Q.resizable!==!1&&(f!=="fit"||P.some((Oe,Ve)=>Ve>_e&&Oe.resizable!==!1))?Oe=>jt(_e,Oe):void 0,children:Q.label},_e))}),ce&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:pt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(es,{variant:"loading",colSpan:P.length||void 0}):V.length===0&&A?n.jsx(es,{variant:"empty",colSpan:P.length||void 0,children:A}):V.map((Q,_e)=>{const Oe=m!=null&&Q.id===m,Ve=!!i&&(u?u(Q):!0),Bt=T!=null&&Q.id!=null&&(T instanceof Set?T.has(Q.id)||[...T].some(Qe=>String(Qe)===String(Q.id)):String(Q.id)===String(T));return n.jsx(es,{className:`${Ve?" table-row--clickable":""}${h?" table-row--draggable":""}${Oe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ve?()=>i(Q):void 0,colSpan:P.length||void 0,rowHasButton:l(Q).some(Qe=>!!Qe.rowLabel),describedBy:re,onMouseEnter:c?Qe=>c(Q,Qe):void 0,onMouseLeave:p?Qe=>p(Q,Qe):void 0,onDragStart:h?Qe=>h(Q,Qe):void 0,onDragEnd:d?Qe=>d(Q,Qe):void 0,expandedContent:Bt&&O?O(Q):void 0,children:l(Q).map((Qe,zt)=>n.jsx(x4,{className:De(Qe.className,oc(P[zt]?.align)),style:Qe.style,span:Qe.span,rowLabel:Ve?Qe.rowLabel:void 0,onRowClick:Ve?()=>i(Q):void 0,children:Qe.content},zt))},Q.id!=null?`${typeof Q.id}:${Q.id}`:`__idx:${_e}`)})})]})]})]})}function sc(e,t){return t!=="wornAt"?String(e[t]??""):jv(e.wornYear,e.wornMonth,e.wornDay)}function k4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=ke.useTranslation(),p=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=zy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((g,w)=>{if(f==="worn"){const _=Number(w.worn)-Number(g.worn);return x?_:-_}return vr(sc(g,f),sc(w,f),x)})},[e,h]),{pageRows:b,pageSizeProps:y,paginationProps:C}=Oy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Vo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(be,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(ts,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((f,x)=>({id:f.id??`${f.side}-${x}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:x=>x.stopPropagation(),children:n.jsx(Wo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:x=>{x?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:p(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Du(f.device),fill:"soft",label:Su(f.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Oo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(be,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:x=>{x?.stopPropagation(),r(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function lc(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function A4(e,t){return new Date(e,t+1,0).getDate()}function N4(e,t){return new Date(e,t,1).getDay()}function E4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=ke.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=pr(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[b,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const v={};return e.forEach(N=>{v[N.date]||(v[N.date]=[]),v[N.date].push(N)}),v},[e]),x=o.useMemo(()=>{const v=A4(p,d),N=N4(p,d),k=[];for(let D=0;D<N;D++)k.push(null);for(let D=1;D<=v;D++)k.push(D);for(;k.length<35;)k.push(null);return k},[p,d]),g=o.useCallback(()=>{d===0?(h(v=>v-1),m(11)):m(v=>v-1)},[d]),w=o.useCallback(()=>{d===11?(h(v=>v+1),m(0)):m(v=>v+1)},[d]),_=v=>`${p}-${String(d+1).padStart(2,"0")}-${String(v).padStart(2,"0")}`,E=v=>_(v)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Yl(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(v=>n.jsx("div",{className:"calendar-day-header body-3",children:v},v)),x.map((v,N)=>{if(v===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${N}`);const k=v,D=_(k),A=f[D]??[],B=Gl(D,i.language),F=b===D;return n.jsxs("div",{className:`calendar-cell${E(k)?" today":""}${F?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:D}):void 0,"aria-current":E(k)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(D)))}:void 0,onDragOver:a?L=>{L.preventDefault(),y(D)}:void 0,onDragLeave:a?L=>{L.currentTarget.contains(L.relatedTarget)||y(null)}:void 0,onDrop:a?L=>{L.preventDefault(),C.current!=null&&(a(C.current,D),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),q=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:A.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):L.map(M=>l("calendar.statusCount",{label:M.label,count:M.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${B} ${q}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map((L,q)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${L.status==="noVisit"?" calendar-visit-badge--no-visit":L.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?M=>{C.current=L.id,M.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?M=>{M.stopPropagation(),t(L)}:void 0,...lc(t?()=>t(L):void 0),"aria-label":[B,L.time?Ql(L.time,l):null,L.customer,l(L.status==="noVisit"?"calendar.legend.noVisit":L.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[L.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Ql(L.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:L.customer}),L.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},L.id??q))})]},k)})]})]})}const D4={page:"h3",pagePopup:"h4",popup:"h5"};function ka({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=D4[e],d=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:De("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(lt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let ns=null,ic=!1;function uc(){if(ic||typeof document>"u")return;ic=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(ns="keyboard")},!0);const e=()=>{ns="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}uc();function Nr(){return uc(),ns==="keyboard"}const Er=20;function S4(e){const{t}=ke.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:b="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,g]=o.useState(Math.min(f,Er)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{g(Math.min(f,Er))},[f]),Vi("speechear.data.updated",()=>y(N=>N+1));const _=o.useRef(null),E=o.useRef(null);function v(){const N=document.activeElement;E.current=Nr()&&N&&N.closest?.(".training-block__more")?x:null,g(k=>Math.min(f,k+Er))}return o.useEffect(()=>{const N=E.current;if(N==null)return;E.current=null;const k=document.activeElement;k&&k!==document.body||_.current?.querySelectorAll(".training-block-button")[N]?.focus()},[x]),n.jsxs(ka,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:_,children:(C||[]).slice(0,x).map((N,k)=>{const D=N;return n.jsx(Fo,{index:k,type:a,trainingData:D,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>d(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof m=="function"?A=>m(D,A):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${k}`)})}),f>Er&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:v,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function j4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function T4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??j4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const b=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(g=>g.width===f&&g.card===x?g:{width:f,card:x})};if(b(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,p=c>0?Nf(l.width,c,e):0,h=p>0?Ef(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:De("training-block-grid",h>0&&"training-block-grid--measured",a),style:d,"data-cols":h>0?h:void 0,children:r})}function as(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var M4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const L4=M4,rs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:p=null},h){const{t:d}=ke.useTranslation(),m=e.word||e.title||"",b=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,g]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(x.label!==m||x.subLabel!==C||x.colloquialLabel!==f||!Object.is(x.homonum,e.homonum))&&g({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),_=vn("(max-width: 767px)"),[E,v]=o.useState(!1),[N,k]=o.useState(!1),D=`${typeof y=="string"?y:y?.src??""}\0${m}`,[A,B]=o.useState({for:"",url:""}),F=A.for===D?A.url:"",L=Vl(),q=e.textOnly??(!e.image&&!!x.label&&!!L&&L.entries.length>0&&!L.byWord.has(x.label)),M=q?"":Ca()?.(x.label,x.homonum)??e.image??"",{imgRef:O,loading:T,hasImage:G,onLoad:K,onError:ee}=as(M);o.useEffect(()=>{let V=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){B({for:D,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const U=y.src;if(U){B({for:D,url:U});return}}}const ie=$a();if(ie&&m)try{const U=await Promise.resolve(ie(m));!V&&U&&B({for:D,url:U})}catch{}})(),()=>{V=!0}},[y,m,D]);const re=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,R.current&&Br(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const J=o.useCallback(()=>new Promise(V=>{if(typeof window<"u"&&window.speechSynthesis&&m){v(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{v(!1);try{a?.()}catch{}V()},ie.onerror=()=>{v(!1),V()},window.speechSynthesis.speak(ie)}else V()}),[m,a]),ne=o.useCallback(V=>{const ie=Ja(V,U=>{if(v(!1),U)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),S=o.useCallback(async()=>{if(t||!re.current)return;const V=()=>{R.current===V&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1)},ie=Xa(V);R.current=V;try{window.speechSynthesis?.cancel()}catch{}try{if(F&&(v(!0),await ne(F)))return;const U=ir();if(U&&m)try{k(!0);const ce=await Promise.resolve(U(m));if(!re.current||R.current!==V||(k(!1),ce&&(v(!0),await ne(ce))))return}catch{}if(!re.current||R.current!==V)return;await J()}finally{R.current===V&&k(!1),ie(),R.current===V&&(R.current=null)}},[t,F,m,ne,J]);o.useImperativeHandle(h,()=>({play:()=>S()}),[S]);const $=V=>V.stopPropagation(),I=o.useCallback(V=>{if(V.stopPropagation(),!t){if(E){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1);return}S()}},[t,E,S]),P=De("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:P,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" "||V.key==="Spacebar")&&(V.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:$,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:q?n.jsx("div",{className:"training-word-card__text-face",children:x.label}):G?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:O,className:"training-word-card__image",src:M,alt:x.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:K,onError:ee})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!q&&n.jsx("div",{className:"training-word-card__word",children:x.label}),x.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",x.subLabel,"]"]}),x.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",x.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?$:void 0,children:n.jsx(be,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:E?"pause":"play",label:_?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:E,loading:N,onClick:I,disabled:t,ariaLabel:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${L4}")`}})})]})})});function Dr(e){return String(e)}const Sr=["o","triangle","x"];function cc(e,t){return e===t?null:t}const dc={o:"circle",triangle:"triangle",x:"x"},pc={o:"main",triangle:"warn",x:"danger"};function $4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function os(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function hc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function R4(e,t){return!t&&e>0}const sa={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function P4(e="landscape"){Dt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=sa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function F4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const I4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function mc(e,t){const a=I4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function O4(e,t){const a=mc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=sa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,b)=>Math.min(l/m/yc,i/b/vc),c=Math.max(0,a.cols*a.rows-r),p=u(a.cols,a.rows);let h=a,d=p;for(let m=1;m<=r;m++){const b=Math.ceil(r/m);if(m*b-r>c)continue;const y=u(m,b);y>d&&(h={cols:m,rows:b},d=y)}return d>p*1.05?h:a}const z4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Cc={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},fc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ss={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ls={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function bc(e){return Object.fromEntries(Object.entries(Cc).map(([t,a])=>[t,ss[t]?e(`wordTable.pos.${ss[t]}`,{defaultValue:a}):a]))}function gc(e){return Object.fromEntries(Object.entries(fc).map(([t,a])=>[t,ls[t]?e(`wordSearch.filter.type.${ls[t]}`,{defaultValue:a}):a]))}const W4={pos:ss,wordType:ls};function is(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function us(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",p=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const yc=280,H4=240,V4=280,vc=400,q4=120,U4=280;function _c(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const G4=24,K4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Y4=400,xc=8;function Z4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function cs({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:b=40,wordInfo:y,outerScale:C=1}){const{t:f}=ke.useTranslation(),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[_,E]=o.useState(1),[v,N]=o.useState(!1),[k,D]=o.useState(!1),[A,B]=o.useState({for:"",url:""}),[F,L]=o.useState(null),q=t&&t.length>0?t:J1()?.(e,u)??"",M=Ca()?.(l||e,u)??"",{imgRef:O,loading:T,failed:G,onLoad:K,onError:ee}=as(M),re=o.useCallback(()=>L(g.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),J=gr(!!F,te=>{te?re():R()},g),ne=o.useMemo(()=>{if(!y)return null;const te=[];return y.grade&&te.push(f("wordTable.info.grade",{n:y.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),y.syllables&&te.push(f("wordTable.info.syllables",{n:y.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),y.pos&&te.push(f("wordTable.info.pos",{v:is(y.pos,bc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),y.wordType&&te.push(f("wordTable.info.wordType",{v:is(y.wordType,gc(f)),defaultValue:"\uC720\uD615: {{v}}"})),te.length?te:null},[y,f]),S=q||e,$=A.for===S?A.url:"";o.useEffect(()=>{const te=$a(),W=q||e;if(!te||!W)return;let z=!1;return Promise.resolve(te(W)).then(ae=>{!z&&ae&&B({for:W,url:ae})}),()=>{z=!0}},[q,e]);const I=o.useRef(null),P=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),P.current?.()},[]);const V=o.useRef(null);o.useEffect(()=>()=>{V.current&&(V.current.cancelled=!0)},[]);const ie=o.useCallback(te=>{if(te.stopPropagation(),v||k){I.current?.();return}if(!$){const z=ir(),ae=q||e;if(!z||!ae)return;const ve={cancelled:!1,stop:null};V.current=ve;const me=()=>{ve.cancelled=!0,ve.stop?.(),D(!1),N(!1),P.current?.()};I.current=me,P.current=Xa(me),D(!0),Promise.resolve().then(()=>z(ae)).then(le=>{if(ve.cancelled)return;if(!le){me();return}B({for:ae,url:le});const Be=Ja(le,()=>{N(!1),P.current?.()});w.current=Be.el,ve.stop=Be.stop,D(!1),N(!0)}).catch(()=>{me()});return}N(!0);const W=Ja($,()=>{N(!1),P.current?.()});w.current=W.el,I.current=W.stop,P.current=Xa(W.stop)},[v,k,$,q,e]),U=p&&!!M&&!G,ce=U&&c?yc:U?V4:H4,Z=U&&c?vc:U?U4:q4;o.useEffect(()=>{const te=x.current;if(!te||typeof ResizeObserver>"u")return;const W=new ResizeObserver(([z])=>{const{width:ae,height:ve}=z.contentRect;E(Math.min(ae/ce,ve/Z))});return W.observe(te),()=>W.disconnect()},[ce,Z]);const H=b*C<G4;return n.jsxs("div",{ref:x,className:De("word-table-cell",H&&"word-table-cell--tap-too-small",U?"word-table-cell--with-image":""),"data-ref-w":ce,"data-ref-h":Z,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${_})`},children:[U&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:O,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:K,onError:ee})]}),m&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(ln,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&q&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",q,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":$,children:[n.jsx("span",{"data-play-state":"play",style:{display:v?"none":void 0},children:n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?f("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):f("common.play","\uC7AC\uC0DD"),ariaLabel:e?f("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):f("common.play","\uC7AC\uC0DD"),onClick:ie})}),n.jsx("span",{"data-play-state":"pause",style:{display:v?void 0:"none"},children:n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:f("common.pause","\uBA48\uCDA4"),ariaLabel:e?f("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):f("common.pause","\uBA48\uCDA4"),onClick:ie})})]}),y&&n.jsxs("div",{ref:g,className:"word-table-cell__info-button",onPointerEnter:te=>{Gn(te)||re()},onPointerLeave:te=>{Gn(te)||R()},onFocus:()=>{ta()||re()},onBlur:R,children:[n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:te=>{te.stopPropagation(),J.touchPress()}}),F&&ne&&n.jsx(Un,{anchorRect:F,items:ne,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:f("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?f("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):f("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:te=>{te.stopPropagation(),i.onPick(te.currentTarget.getBoundingClientRect())}})})]})]})}function Aa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:b,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,indexOffset:v=0,totalCount:N,renderCellAction:k,showFillerAdd:D=!1,addableCount:A,contentRef:B,buttonSize:F=40,brand:L,code:q,pageNumber:M,pageNumberPosition:O="right",fitHeight:T=!1,scoring:G=!1,marks:K,onMarkClick:ee,scoreIndexOffset:re=0}){const R=o.useCallback((de,Le)=>{ee?.(re+de,Le)},[ee,re]),J=(de,Le)=>{const Se=de.filter(Boolean).join(" / ");return Se?Le?S("wordPrint.removePairFor",{name:Se,defaultValue:`${Se} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):S("wordPrint.removeWordFor",{name:Se,defaultValue:`${Se} \uBE7C\uAE30`}):Le?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},ne=(de,Le)=>{const Se=K?.[Dr(re+de)]??null;return n.jsx("div",{className:De("word-table-cell__score",Se?"word-table-cell__score--marked":""),style:kt>1?{transform:`translateX(-50%) scale(${kt})`,transformOrigin:"bottom center"}:void 0,children:Sr.map(Je=>n.jsx("span",{className:De("word-table-cell__score-slot",Se===Je?"word-table-cell__score-slot--on":""),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",shape:"pill",icon:dc[Je],variant:Se===Je?pc[Je]:"default",selected:Se===Je,useBorder:!1,...pt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:S(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:S(`wordTable.scoring.${Je}`,{word:Le,defaultValue:`${Le} ${Je}`}),onClick:pt?ht=>{ht.stopPropagation(),R(de,Je)}:void 0})},Je))})},{t:S}=ke.useTranslation(),$=m!==void 0,I=e!=null||!!t||!!a,P=vn("(max-width: 767px)"),V=o.useRef(null),[ie,U]=o.useState(null),ce=d?.length??0,Z=N??ce,[H,te]=o.useState(null),[W,z]=o.useState(""),ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),Be=o.useCallback(de=>{ve.current=de,typeof B=="function"?B(de):B&&(B.current=de)},[B]),Pe=o.useCallback((de,Le)=>{ae.current=v+Le,g?.(de,Le),z(S("wordTable.reorder.moved",{n:v+Le+1,total:Z,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[g,S,Z,v]);o.useEffect(()=>{const de=ae.current;de!=null&&(ae.current=null,(ve.current?.closest(".word-table-block__pages")??ve.current)?.querySelector(`[data-wordtable-index="${de}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{le.current?.()},[]);const Fe=o.useCallback((de,Le)=>{if(!g||!de.altKey||de.ctrlKey||de.metaKey)return;const Se=de.key==="ArrowRight";if(!Se&&de.key!=="ArrowLeft")return;de.preventDefault();const Je=Le+(Se?1:-1),ht=v+Je;ht<0||ht>=Z||Pe(Le,Je)},[g,Z,v,Pe]),Ae=o.useCallback((de,Le)=>{if(!g||de.pointerType==="mouse")return;const Se=de.target.closest?.("button");if(Se&&!Se.closest(".word-table__card-handle"))return;le.current?.();const Je={x:de.clientX,y:de.clientY};let ht=!1;const Rt=Ve=>{ht&&Ve.cancelable&&Ve.preventDefault()};let Me=null,tt=null;const Ft=()=>{const Ve=tt;if(!Ve)return;const Bt=document.elementFromPoint?.(Ve.x,Ve.y)?.closest?.("[data-wordtable-cell]"),Qe=Bt?Number(Bt.dataset.wordtableCell):NaN,zt=Number.isInteger(Qe)?Qe:null;me.current=zt,U(Ht=>Ht===zt?Ht:zt)},_t=Ve=>{if(!ht){(Math.abs(Ve.clientX-Je.x)>xc||Math.abs(Ve.clientY-Je.y)>xc)&&Oe();return}if(tt={x:Ve.clientX,y:Ve.clientY},typeof requestAnimationFrame>"u"){Ft();return}Me===null&&(Me=requestAnimationFrame(()=>{Me=null,Ft()}))},Q=()=>{Me!==null&&(cancelAnimationFrame(Me),Me=null,Ft());const Ve=me.current,Bt=ht;Oe(),Bt&&Ve!=null&&Ve!==Le&&Pe(Le,Ve)},_e=setTimeout(()=>{ht=!0,te(Le),me.current=Le,U(Le),window.addEventListener("touchmove",Rt,{passive:!1})},Y4);function Oe(){clearTimeout(_e),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q),window.removeEventListener("touchmove",Rt),ht=!1,Me!==null&&(cancelAnimationFrame(Me),Me=null),me.current=null,le.current=null,te(null),U(null)}le.current=Oe,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},[g,Pe]),{width:se,height:ye}=sa[s],Ce=typeof T=="number"?T:T&&typeof T=="object"?P?T.narrow:T.wide:null,{scalerRef:xe,scale:$e,offset:nt}=_c(se,T?ye:void 0),ct=$?m?.length??0:d?.length??0,at=Math.max(b??ct,1),rt=!$&&!!i,Ee=O4(s,at),Ue=mc(s,at),Ne=rt?Ee.cols:Ue.cols,Ye=rt?Ee.rows:Ue.rows,et=rt&&s==="landscape"?Ee.cols*2:Ne,ft=rt&&s==="portrait"?Ee.rows*2:Ye,vt=de=>({word:de.length===0||de.includes("word"),image:de.length===0||de.includes("image"),pron:de.length===0||de.includes("standardPron"),colloq:de.length===0||de.includes("colloquialPron"),caption:de.length===0||de.includes("caption")}),dt=vt(l),jt=o.useMemo(()=>{const de=(d??[]).map(Se=>Se.id),Le=de.every(Se=>typeof Se=="string"&&Se.length>0)&&new Set(de).size===de.length;return!Le&&de.length>0&&Dt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Le?de:null},[d]),ot=vt(u??l),st=$?(m??[]).some(de=>de!==null&&de.length>1):(d??[]).some(de=>(de.words??[]).length>1),At=!!L?.show,Nt=!!L?.show&&L?.top!==!1,Ot=!!L?.show&&L?.bottom!==!1,Wt=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=ue(De("word-table__content",z4[c],p&&"word-table__content--outline",h&&st&&"word-table__content--div-line",!At&&M&&O!=="none"&&"word-table__content--page-number",Nt&&"word-table__content--brand-top",Ot&&"word-table__content--brand-bottom")),it={transform:`scale(${1/$e})`,transformOrigin:"center center"},bt=F*Sr.length+4*(Sr.length-1),pt=!!ee,kt=pt?Math.max(1,Math.min(1/$e,se/et/bt)):1,mt=n.jsxs("div",{ref:xe,className:"word-table__scaler",style:{height:ye*$e},children:[n.jsx("div",{className:De("word-table",G&&!pt&&"word-table--score-readonly",!I&&r),style:{width:se,height:ye,transform:`scale(${$e})`,transformOrigin:"top left",marginLeft:nt},children:n.jsxs("div",{ref:Be,className:xt,style:{gridTemplateColumns:`repeat(${et}, 1fr)`,gridTemplateRows:Z4(ft)},children:[$?n.jsx(n.Fragment,{children:(m??[]).map((de,Le)=>n.jsx("div",{className:ue(De("word-table__edit-cell",de?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Le?"word-table__edit-cell--active":"")),style:us(Le,et,ft,c),children:de?n.jsxs(n.Fragment,{children:[de.map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:Se.word,subLabel:Se.pronunciation,colloquialLabel:Se.colloquialPronunciation,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F})]},Je)),G&&ne(Le,de.map(Se=>Se.word).join(" / ")),f&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:de.length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J(de.map(Se=>Se.word),de.length>1),onClick:()=>f(Le)})})]}):C&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[rt&&i&&n.jsx("div",{className:ue("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Ee.cols}`,gridRow:`1 / span ${Ee.rows}`,...us(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((de,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:de.label,subLabel:de.subLabel,colloquialLabel:de.colloquialLabel,captionLabel:de.captionLabel,captionBadge:de.captionBadge,imageLabel:de.imageLabel,pickForm:E&&de.canPickForm?{n:null,onPick:Se=>E(i.id,-1,Se)}:void 0,homonum:de.homonum,showWord:ot.word,showImage:ot.image,showPronunciation:ot.pron,showColloquial:ot.colloq,showCaption:ot.caption,buttonSize:F,wordInfo:de.grade||de.syllables!=null||de.pos||de.wordType?{grade:de.grade,syllables:de.syllables,pos:de.pos,wordType:de.wordType}:void 0})]},Le))}),(d??[]).map((de,Le)=>n.jsxs("div",{"data-wordtable-cell":g?Le:void 0,"data-wordtable-index":g?v+Le:void 0,className:ue(`word-table__card${g?" word-table__card--draggable":""}${ie===Le?" word-table__card--drag-over":""}${H===Le?" word-table__card--dragging":""}`),style:us(Le,Ne,Ye,c),draggable:!!g,onPointerDown:g?Se=>Ae(Se,Le):void 0,onKeyDown:g?Se=>Fe(Se,Le):void 0,onDragStart:g?()=>{V.current=Le}:void 0,onDragOver:g?Se=>{Se.preventDefault(),U(Le)}:void 0,onDragLeave:g?()=>U(null):void 0,onDrop:g?Se=>{Se.preventDefault(),V.current!==null&&V.current!==Le&&g(V.current,Le),V.current=null,U(null)}:void 0,onDragEnd:g?()=>{V.current=null,U(null)}:void 0,children:[(de.words??[]).map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:Se.label,subLabel:Se.subLabel,colloquialLabel:Se.colloquialLabel,captionLabel:Se.captionLabel,captionBadge:Se.captionBadge,imageLabel:Se.imageLabel,pickForm:E&&Se.canPickForm?{n:v+Le+1,onPick:ht=>E(de.id,v+Le,ht)}:void 0,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F,wordInfo:Se.grade||Se.syllables!=null||Se.pos||Se.wordType?{grade:Se.grade,syllables:Se.syllables,pos:Se.pos,wordType:Se.wordType}:void 0})]},Je)),G&&ne(Le,(de.words??[]).map(Se=>Se.label).join(" / ")),(k||x||w||_||g)&&n.jsxs("div",{className:ue("word-table__card-actions"),children:[x&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J((de.words??[]).map(Se=>Se.label),(de.words??[]).length>1),onClick:()=>x(de.id)})}),w&&n.jsx("div",{className:ue("word-table__card-copy"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:S("wordTable.copyItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(de.id,v+Le)})}),_&&n.jsx("div",{className:ue("word-table__card-replace"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):S("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(de.words??[]).length>1?S("wordTable.replacePairAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):S("wordTable.replaceItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>_(de.id,v+Le)})}),k?.(Le,de),g&&n.jsx("div",{className:ue("word-table__card-handle"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:S("wordTable.reorder.handle",{word:(de.words??[]).map(Se=>Se.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},jt?jt[Le]:Le)),Array.from({length:Math.max(0,Ne*Ye-(d?.length??0))}).map((de,Le)=>{const Se=Ne*Ye,Je=A??Se,ht=(d?.length??0)+Le<Je;return n.jsx("div",{className:ue("word-table__card word-table__card--filler"),children:D&&C&&ht&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((d?.length??0)+Le)})})},`filler-${Le}`)})]}),Nt&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:L?.topLogo?.src??wr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const de=[L?.title&&n.jsx("span",{className:"word-table__paper-title",children:L.title},"t"),L?.owner&&n.jsx("span",{className:"word-table__owner",children:L.owner},"o"),q&&n.jsx("span",{className:"word-table__code",children:q},"c")].filter(Boolean);return de.length===0?null:n.jsx("span",{className:"word-table__ident",children:de.map((Le,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Se))})})()]})}),Ot&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[L?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:L.bottomLogo.src,alt:L.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Wt})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&O!=="none"&&n.jsx("span",{className:"word-table__page-count",children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!At&&M&&O!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${O}`,children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),g&&n.jsx("span",{role:"status",style:K4,children:W})]}),wt=Ce==null?mt:n.jsx("div",{className:"word-table__frame",style:{height:Ce},children:mt});return I?n.jsx(ka,{type:"page",icon:t,title:e,disc:a,className:De(ue("word-table__section"),r),children:wt}):wt}function X4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=J4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function J4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==kn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>Q4(e,s)).join(", ")}function Q4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function On({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:b,className:y}){const C=(m??(b==="vertical"?"newline":"inline"))==="inline",{t:f}=ke.useTranslation(),[x,g]=o.useState(l),w=i??x,_=()=>{const B=!w;g(B),u?.(B)},E=B=>{if(!s)return;const F=B.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},v=o.useMemo(()=>r!==void 0||!w?"":X4(p,h,f("common.all","\uC804\uCCB4")),[r,w,p,h,f]),N=r??(v?n.jsx("span",{className:"filter-panel__header-summary body-3",children:v}):null),k=e||a||r||s,D=o.useId(),A=t?`h${t}`:"span";return n.jsxs("div",{className:De("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?D:void 0,children:[k&&n.jsxs("div",{className:"filter-panel__header",onClick:s?E:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(A,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?N:a,s&&n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:_})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:De("filter-panel__sections",C?"filter-panel__sections--row":""),children:p.map(B=>{const F=h[B.label],L=F===void 0||(Array.isArray(F)?F.length===0:!1),q=(B.items??[]).filter(O=>O!=null);B.allOption&&q.some(O=>(typeof O=="string"?O:O.value)===kn)&&Dt(`filter-panel-all-value:${B.label}`,`[FilterPanel] '${B.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${kn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const M=O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"&&!!O.disabled,K=typeof O!="string"?O.labels:void 0,ee=typeof O!="string"?O.displayLabel:void 0,re=typeof O!="string"?O.tooltip:void 0,R=typeof O!="string"?O.descriptionTooltip:void 0,J=typeof O!="string"?O.shape:void 0,ne=Array.isArray(F)?F.includes(T):F===T;return n.jsx(be,{htmlType:"button",size:"keyboard",label:K??ee??T,type:B.itemType??(K?"bar":T.length===1?"dot":void 0),selected:ne,disabled:G,shape:J,showTooltipInfo:!!re,tooltipInfoText:re,tooltipDescription:R,onClick:()=>d?.(T,B.label)},T)};return n.jsxs(o.Fragment,{children:[B.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:B.groupLabel}),B.groupAction]}),n.jsxs("div",{className:De("filter-panel__section",B.layout==="row"?"filter-panel__section--row":"",B.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:B.displayLabel??B.label}),B.labelAction??(B.labelInfo?n.jsx(Za,{...B.labelInfo}):null)]}),B.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:B.content}):B.type==="input"?n.jsx(Yn,{className:"filter-panel__textfield",placeholder:B.placeholder,ariaLabel:B.displayLabel??B.label,value:h[B.label]??"",onChange:O=>d?.(O,B.label),error:B.error}):!B.multiple&&B.display==="segmented"?n.jsx(_n,{ariaLabel:B.displayLabel??B.label,options:[...B.allOption?[{key:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{key:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label]??"",onChange:O=>d?.(O,B.label),size:32}):!B.multiple&&B.display==="dropdown"?n.jsx(xn,{className:"filter-panel__dropdown",ariaLabel:typeof B.label=="string"?B.label:void 0,size:Lt,options:[...B.allOption?[{value:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{value:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label],onChange:O=>d?.(O,B.label)}):n.jsxs("div",{className:B.groups?"filter-panel__item-groups":"filter-panel__items",children:[B.allOption&&!B.groups&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),B.groups?B.groups.map((O,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&B.allOption&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),O.filter(G=>G!=null).map(M)]},T)):q.map(M)]})]})]},B.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const e_=[1,2,3,4,5,6,7,8,9,10,11,12],t_=[8,6,4,2,1],bn="show",Tn="hide",wc=["image","word","caption","standardPron"];function Bc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function kc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Ac(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function Nc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Tc(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...t_.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Mc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function n_(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Lc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function $c(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?bn:Tn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:Tn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:Tn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:Tn}:{}}}function Rc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===kn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===bn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===bn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===bn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===bn),!0):!1}function a_(e){return"sections"in e}function ds(e){const{t}=ke.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(a_(e))return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,setters:g,showCutLine:w=!1,showDivLine2:_=!1,middleSections:E=[],extraSelected:v={},onExtraSelect:N,showPaperBands:k=!1,showTopInfo:D=!0,showBottomInfo:A=!0}=e,B=[kc(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Ac(t),...E,Nc(t),...w?[Sc(t)]:[],..._?[jc(t)]:[],...k?[Ec(t),Dc(t)]:[]],F={...$c(t,{contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:D,showBottomInfo:A}),...v},L=(q,M)=>{Rc(t,q,M,g)||N?.(q,M)};return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:B,selected:F,onSelect:L,...p,sectionAlign:"horizontal"})}function ps(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r_(e){return ps(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function hs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let jr=null,Na=null;function o_(e,t,a,r="",s=""){if(e.length===0||Na&&Na.iframe.isConnected&&Date.now()-Na.at<1e4)return;const l=r?hs(r):"";jr?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),jr===i&&(jr=null)},jr=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}Na={iframe:u,at:Date.now()},c.open(),c.write(ms(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Na?.iframe===u&&(Na=null)},0)})}function ms(e,t,a,r=!1,s="",l=""){s=s?hs(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
832
+ `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${ps(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),m.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
833
833
  `);return`<!DOCTYPE html>
834
- <html${u?` lang="${r_(u)}"`:""} data-theme="${c}">
834
+ <html${c?` lang="${r_(c)}"`:""} data-theme="${u}">
835
835
  <head>
836
836
  <meta charset="utf-8">
837
837
  ${s?`<title>${ps(s)}</title>`:""}
@@ -1038,17 +1038,17 @@ ${y.badge}`:y.badge:void 0;if(x&&u(y.code))return null;if(!y.badge&&!h)return d(
1038
1038
  `:""}
1039
1039
  <\/script>
1040
1040
  </body>
1041
- </html>`}const s_=1e3;function Cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=we.useTranslation(),c=o.useCallback(()=>{o_(e(),t,a,r,l)},[e,t,a,r,l]),u=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(ms(h,t,a,!1,r,l)),d.document.close()},[e,t,a,r,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=ms(h,t,a,!1,r,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(m),v=(r?hs(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:b,download:`${v}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(b),s_)},[e,t,a,r,l,i]);return{print:c,openNewWindow:u,downloadHtml:p}}function Pc(e,t){const{t:a}=we.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[c,u]=o.useState([...wc]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[b,v]=o.useState(!0),[C,f]=o.useState(!0),[_,g]=o.useState(!0),[w,y]=o.useState(8),[A,x]=o.useState("right"),E=e.length,k=e.some(G=>(G.words??[]).length>1),D=e.some(G=>(G.words??[]).some(L=>!!L.colloquialLabel)),N=Bc(e),B=Math.max(1,Math.min(Math.max(E,1),s??Math.max(E,1))),$=Math.min(w,B),M=o.useMemo(()=>F4(e,$),[e,$]),Y=M.length>1,T=$,[R,S]=o.useState(!1);o.useEffect(()=>{let G=!1;if(!ma()){S(!1);return}return Promise.all(e.flatMap(L=>(L.words??[]).map(q=>$l(q.label,q.homonum)))).then(L=>{G||S(L.some(Boolean))},()=>{}),()=>{G=!0}},[e]);const X=o.useMemo(()=>[kc(a,{hasImage:R,hasColloquial:D,hasCaption:N}),Ac(a),...E>0?[Tc(a,{hasPairs:k,itemCount:E,max:s})]:[],Nc(a),...T>1?[Sc(a)]:[],...k?[jc(a)]:[],...r?[Ec(a),Dc(a)]:[]],[a,R,D,N,E,k,Y,T,r,s]),ee={...$c(a,{contentTypes:c,orientation:l,showOutline:d,cutLine:p,showDivLine:_,showTopInfo:b,showBottomInfo:C}),...E>0?{[a(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${$}\uAC1C`}:{},...Y?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:A}:{}},W=o.useCallback((G,L)=>{Rc(a,G,L,{setContentTypes:u,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:g,setShowTopInfo:v,setShowBottomInfo:f})||(L===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||L===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?y(Mc(parseInt(G),E)):L===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(Lc(G)))},[a,E]);return{settings:{orientation:l,contentTypes:c,cutLine:p,showOutline:d,showDivLine:_,count:T,showTopInfo:b,showBottomInfo:C},filterSections:X,filterSelected:ee,handleSelect:W,pages:M,isPaginated:Y,pageNumberPosition:A}}function l_({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:c,buttons:u,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:b,showSettings:v,autoPrint:C,className:f,onClose:_,scoring:g=!1,onScoreChange:w,printHeader:y,brand:A,code:x,beforeClose:E}){const{t:k}=we.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(H=>typeof H=="string"&&H.length>0).map((H,re)=>({id:`${H}-${re}`,words:[{label:H}]})),[e,t]),{settings:N,filterSections:B,filterSelected:$,handleSelect:M,pages:Y,isPaginated:T,pageNumberPosition:R}=Pc(D,{paperBands:!!A?.show,maxItemsPerPage:s}),S=o.useMemo(()=>hc(Y.map(H=>H.length)),[Y]),[X,ee]=o.useState({}),W=o.useCallback((H,re)=>{ee(_e=>({..._e,[Dr(H)]:cc(_e[Dr(H)]??null,re)}))},[]),G=o.useRef(w);o.useEffect(()=>{G.current=w});const L=o.useRef(X);o.useEffect(()=>{L.current!==X&&(L.current=X,G.current?.(os(X)))},[X]);const q=o.useMemo(()=>os(X),[X]),K=o.useRef(null),{toastMessage:z,toastKey:F,showWarning:I,clearToast:P}=Zi("warning"),Z=o.useRef([]),ue=o.useCallback(()=>T?Z.current.filter(H=>H!==null):K.current?[K.current]:[],[T]),{print:U,openNewWindow:pe}=Cs({getElements:ue,paperW:oa[N.orientation].width,paperH:oa[N.orientation].height,fileName:b??"",header:y??"",onPopupBlocked:()=>I(k("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),ae=o.useMemo(()=>h?void 0:p?p({print:U,openNewWindow:pe}):b?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>pe()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>U()},...u??[]]:u,[h,p,b,u,k,U,pe]),V=o.useMemo(()=>h?h({print:U,openNewWindow:pe}):void 0,[h,U,pe]),se=o.useRef(!1),O=o.useRef(U);return o.useEffect(()=>{O.current=U},[U]),o.useEffect(()=>{if(!C||se.current)return;const H=window.setTimeout(()=>{se.current=!0,O.current()},100);return()=>window.clearTimeout(H)},[C]),n.jsxs(Fn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:Ne("word-table-popup",f),buttons:ae,footer:V,footerClassName:d,footerLayout:m,beforeClose:E,onClose:_,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[v&&n.jsx(ds,{sections:B,selected:$,onSelect:M}),T?n.jsx("div",{className:"word-table-popup__pages",children:Y.map((H,re)=>n.jsx(ka,{items:H,orientation:N.orientation,contentTypes:N.contentTypes,baseItem:a,baseContentTypes:r,cutLine:N.cutLine,showOutline:N.showOutline,showDivLine:N.showDivLine,count:N.count,contentRef:_e=>{Z.current[re]=_e},pageNumber:{current:re+1,total:Y.length},pageNumberPosition:R,brand:A&&{...A,top:N.showTopInfo,bottom:N.showBottomInfo},code:x,scoring:g,scoreIndexOffset:S[re],marks:q,onMarkClick:W},re))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(ka,{items:D,orientation:N.orientation,contentTypes:N.contentTypes,baseItem:a,baseContentTypes:r,cutLine:N.cutLine,showOutline:N.showOutline,showDivLine:N.showDivLine,count:N.count,contentRef:K,fitHeight:!0,scoring:g,marks:q,onMarkClick:W,brand:A&&{...A,top:N.showTopInfo,bottom:N.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:c??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(wa,{message:z,position:"top",onClose:P},F)]})}const i_=new Set(["x","triangle"]);function u_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&i_.has(s)&&a.push(e[r])}return a}const c_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Fc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=c_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function d_(e,t){const[,a,r]=mo(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Fc(typeof e=="string"?{name:e}:e),c=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${c}\uBCF5\uC2B5 ${s}`}function p_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Fc(e).round}}function h_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function m_(e){return e.map(t=>t.label).join(" / ")}function C_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Ic(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function f_(e,t,a){const r=Jl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Oc(e,t,a){return a===0?0:(e+t*.5)/a}function b_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const c=s.labels?.[l];if(!c)continue;const u=t.get(c)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")u.o++;else if(i==="triangle")u.triangle++;else if(i==="x")u.x++;else continue;u.latest=i,u.latestAt=s.scoredAt,t.set(c,u)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Ic(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Oc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||fn(s.label,l.label)||fn(s.key??s.label,l.key??l.label)),r}function g_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=c=>Object.values(c.marks).filter(u=>u==="o"||u==="triangle"||u==="x").length,l=r.rows.filter(c=>s(c)>0).sort((c,u)=>c.scoredAt.localeCompare(u.scoredAt));if(l.length===0)continue;const i=l.map(c=>{const u=Object.values(c.marks),p=u.filter(d=>d==="o").length,h=u.filter(d=>d==="triangle").length;return Oc(p,h,s(c))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(c=>c.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function y_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function v_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function __(e){const t=new Map;let a=0,r=0;const s=e.map((i,c)=>({r:i,at:c})).sort((i,c)=>i.r.answeredAt.localeCompare(c.r.answeredAt)||v_(i.r.id,c.r.id)||i.at-c.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const c=i.itemTitle?.trim();if(!c){r++;continue}a++;const u=i.itemId?.trim()||c,p=`${i.trainingType}|${u}`,h=t.get(p)??{trainingType:i.trainingType,itemId:u,title:c,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=c,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,c])=>({key:i,trainingType:c.trainingType,itemId:c.itemId,title:c.title,tried:c.tried,wrong:c.wrong,rate:c.tried===0?0:(c.tried-c.wrong)/c.tried,latestCorrect:c.latestCorrect,latestAt:c.latestAt,lastSelected:c.lastSelected,setIds:c.setIds}));return l.sort((i,c)=>i.rate-c.rate||c.tried-i.tried||fn(i.title,c.title)),{items:l,counted:a,skippedNoTitle:r}}function x_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function w_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const fs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function B_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const c=`${l.trainingType}|${i}`,u=t.get(c)??{setId:i,trainingType:l.trainingType,pending:0};u.pending++,t.set(c,u)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>fs.includes(l.trainingType)).sort(r),word:s.filter(l=>!fs.includes(l.trainingType)).sort(r),noSet:a}}function k_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,c=[];for(const u of l.cellLabels)r.has(u)&&!i.has(u)&&(i.add(u),c.push(u));c.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:c,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||fn(l.name,i.name)),s.slice(0,Math.max(0,a))}function A_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function N_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function bs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function E_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?bs(Zt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?bs(Zt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):bs(Zt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function D_(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function S_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function j_(e,t){return e.filter(a=>a.key!==t)}function T_(e,t,a){const r=e.filter(p=>p.pinned),s=new Set(r.map(p=>p.key)),l=e.length-r.length,i=[],c=new Set(s);for(const p of t){if(i.length>=l)break;const h=a(p);c.has(h)||(c.add(h),i.push({key:h,value:p,pinned:!1}))}const u=[...i];return e.map(p=>p.pinned?p:u.shift()).filter(p=>p!==void 0)}function M_(e){return e.map(t=>t.value)}function L_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(ot,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function $_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,c]=o.useState(()=>l?null:(t&&t[0]?.key)??null),u=l?a:i,p=o.useRef(r);o.useEffect(()=>{p.current=r});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const b=i??d;i==null&&c(b),p.current?.(b)},[l,d]);const m=o.useCallback(b=>{const v=u===b?null:b;h.current=!0,l||c(v),r?.(v)},[u,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(b=>n.jsx(L_,{category:b,isSelected:u===b.key,onClick:()=>m(b.key)},b.key))})}function R_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function P_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=we.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1041
+ </html>`}const s_=1e3;function Cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=ke.useTranslation(),u=o.useCallback(()=>{o_(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(ms(h,t,a,!1,r,l)),d.document.close()},[e,t,a,r,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=ms(h,t,a,!1,r,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(m),y=(r?hs(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:b,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(b),s_)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function Pc(e,t){const{t:a}=ke.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...wc]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[b,y]=o.useState(!0),[C,f]=o.useState(!0),[x,g]=o.useState(!0),[w,_]=o.useState(8),[E,v]=o.useState("right"),N=e.length,k=e.some(re=>(re.words??[]).length>1),D=e.some(re=>(re.words??[]).some(R=>!!R.colloquialLabel)),A=Bc(e),B=Math.max(1,Math.min(Math.max(N,1),s??Math.max(N,1))),F=Math.min(w,B),L=o.useMemo(()=>F4(e,F),[e,F]),q=L.length>1,M=F,[O,T]=o.useState(!1);o.useEffect(()=>{let re=!1;if(!Ca()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(J=>$l(J.label,J.homonum)))).then(R=>{re||T(R.some(Boolean))},()=>{}),()=>{re=!0}},[e]);const G=o.useMemo(()=>[kc(a,{hasImage:O,hasColloquial:D,hasCaption:A}),Ac(a),...N>0?[Tc(a,{hasPairs:k,itemCount:N,max:s})]:[],Nc(a),...M>1?[Sc(a)]:[],...k?[jc(a)]:[],...r?[Ec(a),Dc(a)]:[]],[a,O,D,A,N,k,q,M,r,s]),K={...$c(a,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:x,showTopInfo:b,showBottomInfo:C}),...N>0?{[a(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${F}\uAC1C`}:{},...q?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:E}:{}},ee=o.useCallback((re,R)=>{Rc(a,re,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:g,setShowTopInfo:y,setShowBottomInfo:f})||(R===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||R===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?_(Mc(parseInt(re),N)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&v(Lc(re)))},[a,N]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:x,count:M,showTopInfo:b,showBottomInfo:C},filterSections:G,filterSelected:K,handleSelect:ee,pages:L,isPaginated:q,pageNumberPosition:E}}function l_({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:b,showSettings:y,autoPrint:C,className:f,onClose:x,scoring:g=!1,onScoreChange:w,printHeader:_,brand:E,code:v,beforeClose:N}){const{t:k}=ke.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ae)=>({id:`${z}-${ae}`,words:[{label:z}]})),[e,t]),{settings:A,filterSections:B,filterSelected:F,handleSelect:L,pages:q,isPaginated:M,pageNumberPosition:O}=Pc(D,{paperBands:!!E?.show,maxItemsPerPage:s}),T=o.useMemo(()=>hc(q.map(z=>z.length)),[q]),[G,K]=o.useState({}),ee=o.useCallback((z,ae)=>{K(ve=>({...ve,[Dr(z)]:cc(ve[Dr(z)]??null,ae)}))},[]),re=o.useRef(w);o.useEffect(()=>{re.current=w});const R=o.useRef(G);o.useEffect(()=>{R.current!==G&&(R.current=G,re.current?.(os(G)))},[G]);const J=o.useMemo(()=>os(G),[G]),ne=o.useRef(null),{toastMessage:S,toastKey:$,showWarning:I,clearToast:P}=Zi("warning"),V=o.useRef([]),ie=o.useCallback(()=>M?V.current.filter(z=>z!==null):ne.current?[ne.current]:[],[M]),{print:U,openNewWindow:ce}=Cs({getElements:ie,paperW:sa[A.orientation].width,paperH:sa[A.orientation].height,fileName:b??"",header:_??"",onPopupBlocked:()=>I(k("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),Z=o.useMemo(()=>h?void 0:p?p({print:U,openNewWindow:ce}):b?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ce()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>U()},...c??[]]:c,[h,p,b,c,k,U,ce]),H=o.useMemo(()=>h?h({print:U,openNewWindow:ce}):void 0,[h,U,ce]),te=o.useRef(!1),W=o.useRef(U);return o.useEffect(()=>{W.current=U},[U]),o.useEffect(()=>{if(!C||te.current)return;const z=window.setTimeout(()=>{te.current=!0,W.current()},100);return()=>window.clearTimeout(z)},[C]),n.jsxs(Fn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:De("word-table-popup",f),buttons:Z,footer:H,footerClassName:d,footerLayout:m,beforeClose:N,onClose:x,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(ds,{sections:B,selected:F,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:q.map((z,ae)=>n.jsx(Aa,{items:z,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ve=>{V.current[ae]=ve},pageNumber:{current:ae+1,total:q.length},pageNumberPosition:O,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v,scoring:g,scoreIndexOffset:T[ae],marks:J,onMarkClick:ee},ae))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Aa,{items:D,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ne,fitHeight:!0,scoring:g,marks:J,onMarkClick:ee,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Ba,{message:S,position:"top",onClose:P},$)]})}const i_=new Set(["x","triangle"]);function u_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&i_.has(s)&&a.push(e[r])}return a}const c_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Fc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=c_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function d_(e,t){const[,a,r]=mo(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Fc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function p_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Fc(e).round}}function h_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function m_(e){return e.map(t=>t.label).join(" / ")}function C_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Ic(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function f_(e,t,a){const r=Jl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Oc(e,t,a){return a===0?0:(e+t*.5)/a}function b_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Ic(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Oc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||fn(s.label,l.label)||fn(s.key??s.label,l.key??l.label)),r}function g_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Oc(p,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function y_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function v_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function __(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||v_(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){r++;continue}a++;const c=i.itemId?.trim()||u,p=`${i.trainingType}|${c}`,h=t.get(p)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||fn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function x_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function w_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const fs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function B_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>fs.includes(l.trainingType)).sort(r),word:s.filter(l=>!fs.includes(l.trainingType)).sort(r),noSet:a}}function k_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||fn(l.name,i.name)),s.slice(0,Math.max(0,a))}function A_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function N_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function bs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function E_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?bs(Zt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?bs(Zt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):bs(Zt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function D_(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function S_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function j_(e,t){return e.filter(a=>a.key!==t)}function T_(e,t,a){const r=e.filter(p=>p.pinned),s=new Set(r.map(p=>p.key)),l=e.length-r.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=a(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function M_(e){return e.map(t=>t.value)}function L_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function $_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,p=o.useRef(r);o.useEffect(()=>{p.current=r});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const b=i??d;i==null&&u(b),p.current?.(b)},[l,d]);const m=o.useCallback(b=>{const y=c===b?null:b;h.current=!0,l||u(y),r?.(y)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(b=>n.jsx(L_,{category:b,isSelected:c===b.key,onClick:()=>m(b.key)},b.key))})}function R_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(be,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function P_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=ke.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1042
1042
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1043
1043
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1044
- `).map((i,c,u)=>n.jsxs(o.Fragment,{children:[i,c<u.length-1&&n.jsx("br",{})]},c))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:Po,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function F_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:c,menuLabel:u}){const{t:p}=we.useTranslation(),h=u??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),b=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!d)return;const _=ea(()=>{const y=document.getElementById(b);y&&y.contains(document.activeElement)&&v.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=y=>{y.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{_(),g?.removeEventListener?.("change",w)}},[d,b]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(_,g)=>c?c(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const _=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:_}):n.jsx("div",{className:"landing-header__brand",children:_})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((_,g)=>n.jsx("span",{children:f(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>m(_=>!_),"aria-expanded":d,"aria-controls":b,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:b,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(_,()=>m(!1))},`${g}:${_.href}`))})})]})}function I_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...lc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function O_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,f=C.phase!=="sound"&&C.at>0;s.current=f?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),c=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),u=o.useCallback((C,f,_=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,_)},new Promise(w=>{const y=setTimeout(()=>{r.current===y&&(r.current=null),w(!!e.current&&g===a.current)},C);r.current=y})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),b=o.useCallback(C=>C===a.current,[]),v=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:b,abort:c,waitPad:u,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:v}),[d,m,b,c,u,p,h,l,i,v])}const Na=9,z_=e=>Math.round(Math.min(Na,Math.max(0,e))/Na*100),W_=e=>e/100*Na,or=2,zc=.1,H_=e=>Math.min(or,Math.max(0,e)),V_=.1,q_=e=>Math.round(e*1e6)/1e6;function sr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return H_(t);const a=Math.min(Na,Math.max(0,Number(e.level)||0))/Na,r=Number(e.mainVolume);return r>0?a>0?q_(Math.min(or,Math.max(V_,a/r))):0:1}const Wc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Hc(e){return Wc(e)}function gs(e){return Wc(e)*sr(e)}function ys(e,t=K1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,gs(e)/a)}function sa(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=sr({level:a.level,mainVolume:a.mainVolume})),a}const la={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},vs=o.createContext(null);function Tr(){return o.useContext(vs)}const _s=e=>`${G1()}/${e}`,Vc=e=>Array.from({length:10},(t,a)=>_s(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Mr={get defaultNoise(){return _s("noise1.mp3")},get street(){return Vc("noise2")},get restaurant(){return Vc("noise3")},get buzz(){return _s("noise4.mp3")}};function U_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Mr.defaultNoise;case"street":return Mr.street[t];case"restaurant":return Mr.restaurant[t];case"buzz":return Mr.buzz;default:return null}}function G_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,c]=o.useState(null),u=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),b=o.useRef(null),v=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),f=o.useCallback((A,x=250)=>{const E=l.current;if(!E)return;const k=p.current;if(k){p.current=null;try{E.pause()}catch{}E.src=k,E.load()}if(!E.src)return;m.current+=1,C();try{io(),ur(E).then($=>{if(l.current===E)try{s.current?.("noise",$)}catch{}})}catch{}const D=E.paused?0:cr(E);E.paused&&qn(E,0),E.play().catch(()=>{});const N=performance.now(),B=()=>{const $=Math.min(1,(performance.now()-N)/x);try{qn(E,D+(A-D)*$)}catch{}$<1?d.current=requestAnimationFrame(B):d.current=null};d.current=requestAnimationFrame(B)},[C]),_=o.useCallback((A=250,x)=>{const E=l.current;if(!E||E.paused){x?.();return}const k=++m.current;C();const D=performance.now(),N=cr(E),B=()=>{const $=Math.min(1,(performance.now()-D)/A);try{qn(E,N*(1-$))}catch{}if($<1)d.current=requestAnimationFrame(B);else{d.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{E.pause()}catch{}x?.()}};d.current=requestAnimationFrame(B),b.current=setTimeout(()=>{if(b.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{E.paused||(qn(E,0),E.pause(),x?.())}catch{}}},A+150)},[C]);o.useEffect(()=>{const A=document.createElement("audio");return A.loop=!0,A.crossOrigin="anonymous",l.current=A,()=>{C();try{A.pause(),A.removeAttribute("src"),A.load()}catch{}l.current=null,u.current=null,p.current=null}},[C]);const g=e?ys(e.settings):0,w=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!w)return;let A=0;const x=setInterval(()=>{const E=l.current;if(!E||E.paused){A=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||v()||a.current==="playing"){A=0;return}A+=1,A>=2&&(A=0,_())},400);return()=>clearInterval(x)},[_,w,t,a,v]),o.useEffect(()=>{const A=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const E=t.current,k=!!E&&!E.paused&&!E.ended||v()||a.current==="playing",D=h.current;k&&D?.enabled&&D.volume>0&&f(D.volume)};return document.addEventListener("visibilitychange",A),()=>document.removeEventListener("visibilitychange",A)},[C,f,t,a,v]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const y=o.useRef(null);return o.useEffect(()=>()=>{y.current?.(),y.current=null},[]),o.useEffect(()=>{const A=e?.settings,x=l.current;if(!x)return;const E=A?ys(A):0;if(!A||!A.enabled||E===0){_();return}if(u.current!==A.type){const k=U_(A.type);k&&(u.current=A.type,c(k),p.current=k,_(150,()=>{if(p.current!==k)return;p.current=null,x.src=k,x.load();const D=t.current;if(D&&!D.paused||v()){y.current?.();const N=()=>{x.removeEventListener("canplay",N),y.current===B&&(y.current=null);const $=t.current,M=h.current;($&&!$.paused&&!$.ended||v())&&M?.enabled&&M.volume>0&&f(M.volume)},B=()=>x.removeEventListener("canplay",N);y.current=B,x.addEventListener("canplay",N)}}))}else{const k=t.current,D=!!k&&!k.paused&&!k.ended||v()||a.current==="playing";if(D&&p.current)f(E);else if(D&&x.paused&&x.src)f(E);else if(!x.paused)if(!D)_();else{C();const N=cr(x),B=performance.now(),$=()=>{const M=Math.min(1,(performance.now()-B)/150);try{qn(x,N+(E-N)*M)}catch{}M<1?d.current=requestAnimationFrame($):d.current=null};d.current=requestAnimationFrame($)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,f,_,t,a,h,v]),o.useEffect(()=>{const A=l.current;if(A)try{A.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:f,fadeOutNoise:_}}function K_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:c,fadeInNoise:u,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const b=o.useRef(null),v=o.useRef(0),C=o.useRef(null),f=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const g=(A,x=1)=>{try{const E=(A||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(A||"").length);return Math.max(700,Math.round(E*300/Math.max(.25,x)))}catch{return 1200}},w=o.useCallback(A=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const x=window.speechSynthesis,E=++f.current;try{try{x.cancel()}catch{}const k=A??e,D=Array.isArray(k)?k.filter(T=>!!T):[k||""];D.length===0&&D.push("");const N=Math.max(.3,Math.min(3,t));v.current=D.reduce((T,R)=>T+g(R,N||1),0),b.current=performance.now(),l(0),i("playing"),c("playMode");const B=h.current;B?.enabled&&(B?.volume??0)>0&&u(B.volume);const $=()=>{try{const T=b.current||performance.now(),R=performance.now()-T,S=v.current||1200,X=Math.min(1,R/S);try{r.current&&(r.current.style.left=`${X*100}%`),s.current&&s.current.style.setProperty("--progress",String(X))}catch{}X<1&&(C.current=requestAnimationFrame($))}catch{}},M=()=>{if(E===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},Y=T=>{const R=new SpeechSynthesisUtterance(D[T]);try{R.rate=N}catch{}try{R.volume=Math.max(0,Math.min(1,a))}catch{}R.onend=()=>{if(E===f.current){if(T<D.length-1){try{Y(T+1)}catch{M()}return}M()}},R.onerror=()=>{M()},R.onstart=()=>{if(!(T>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame($)}catch{}},_.current=!0,x.speak(R)};try{Y(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,a,u,r,s,l,i,c,h,d,m]),y=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),p(),b.current=null}catch{}i("stopped"),c("active"),l(0)},[p,i,c,l]);return{startTTS:w,stopTTS:y}}const Y_=.01,Z_=.3;async function X_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),c=i.numberOfChannels>0?i.getChannelData(0):null;if(!c)return null;let u=0;if(r){const b=Math.floor(Z_*i.sampleRate),v=Math.min(c.length,b);for(;u<v&&Math.abs(c[u])<=Y_;)u++;u>=v&&(u=0)}const p=c.length-u,h=a&&a>0?Math.min(p,Math.floor(a*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((b,v)=>{const C=u+v*m,f=Math.min(C+m,u+d,c.length);let _=0;for(let g=C;g<f;g++){const w=Math.abs(c[g]);w>_&&(_=w)}return _})}catch{return null}finally{try{s?.close?.()}catch{}}}async function qc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await X_(l,t,a,r)}catch(s){try{const l=Hl(s)}catch{}return null}}const xs=45,J_=74,Q_=2;function Lr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function $r(e){return Lr(e)/45}const ex=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Uc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Gc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Uc(t),s=Uc(a),l=[];let i=0;return e.forEach((c,u)=>{for(const[p,h]of[["lead",r],["sound",ex(c)],["tail",s]])l.push({kind:p,track:u,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Kc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function tx(e,t){const a=Kc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function nx(e,t,a){const r=Math.max(0,Math.floor(a)),s=Kc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),c=Math.max(1,r-l-i),u=l+c+i-r;return{lead:Math.max(0,l-Math.ceil(u/2)),sound:c,tail:Math.max(0,i-Math.floor(u/2))}}function ax({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const c=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,c/i))}function rx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Gc({durationsSec:[r],leadInMs:s,tailMs:l});return tx(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function ox({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return nx(Gc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function sx(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function lx({ended:e,completedByEnd:t}){return!!e||!!t}function ix(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function ux(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function cx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),c=a(i,t);c&&s.push({code:i,resolvedPath:c})}}return s}function dx(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Yc(a)!==Yc(t):!0}function Yc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Zc=4,px=$r(Zc/xs);function hx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:c=1,totalDuration:u=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:b=0,trackDurationSec:v=0}=e,C=o.useRef(null),f=o.useRef(null),[_,g]=o.useState(null),[w,y]=o.useState(!1),[A,x]=o.useState(null),[E,k]=o.useState(2),[D,N]=o.useState(0),[B,$]=o.useState(null),[M,Y]=o.useState(!1),[T,R]=o.useState(!1),S=3,X=3,ee=1,W=300,G=o.useRef(0),L=o.useCallback(()=>{const te=C.current,ie=f&&f.current?f.current:te?te.closest(".audio-player__wave"):null,Be=ie?ie.getBoundingClientRect():te?te.getBoundingClientRect():null,Le=Be?Be.width:0,Re=Be?Math.max(100,Be.width):320,he=Be?Be.height:0,ge=Math.max(ee,Math.min(W,Math.floor((Re+X)/(S+X)))),Ee=ge*S,ve=Math.max(0,ge-1),Fe=Math.max(0,ve>0?(Re-Ee)/ve:X);return{bars:ge,gap:Fe,height:he,width:Le}},[]),q=o.useRef(void 0),K=o.useRef(null),z=o.useCallback(async(te,ie,{quiet:Be=!1}={})=>{const Le=++G.current,Re=()=>G.current===Le;try{if(Be||y(!1),q.current=te,!te){Re()&&g(null);return}let he=ie;if(!he)try{for(let ve=0;ve<4&&!(C.current||f.current);ve++)await new Promise(Fe=>requestAnimationFrame(Fe));await new Promise(ve=>requestAnimationFrame(ve));const Ee=L();Ee.height>0&&N(Ee.height),he=Ee.bars,k(Ee.gap)}catch{he=120}K.current=he;const ge=await qc(te,he);if(!Re())return;if(!ge){g(null),y(!1);return}g(ge),x(he),y(!0)}catch{if(!Re())return;g(null),y(!1)}},[y,g,N,k,x,L]);o.useEffect(()=>{const te=f.current;if(!te||typeof ResizeObserver>"u")return;let ie=null;const Be=new ResizeObserver(()=>{ie!==null&&cancelAnimationFrame(ie),ie=requestAnimationFrame(()=>{ie=null;try{const Le=L();if(Le.width<=0||(Le.height>0&&N(Le.height),K.current===null||Le.bars===K.current))return;const Re=q.current;k(Le.gap),Re?z(Re,Le.bars,{quiet:!0}).catch(()=>{}):K.current=Le.bars}catch{}})});return Be.observe(te),()=>{Be.disconnect(),ie!==null&&cancelAnimationFrame(ie)}},[L,z]),o.useEffect(()=>{const te=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;z(typeof te=="string"?te:void 0).catch(()=>{}),R(!1)},[t,a,z]),o.useEffect(()=>{let te=!1;if(Y(!1),$(null),!l||!A)return;const ie=u>0?u*(c||1):void 0;return qc(l,A,ie,!0).then(Be=>{te||($(Be),Be||Y(!0))}).catch(()=>{te||($(null),Y(!0))}),()=>{te=!0}},[l,A,u,c]);const F=Math.max(0,Math.min(1,p)),I=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),P=A||40,Z=o.useMemo(()=>ox({bars:P,trackDurationSec:v,leadInMs:m,tailMs:b}),[P,v,m,b]),ue=o.useMemo(()=>Array.from({length:P}).map((te,ie)=>{const Be=ie>=Z.lead&&ie<Z.lead+Z.sound,Le=Z.sound>0&&Be?Math.min(P-1,Math.round((ie-Z.lead)/Z.sound*P)):-1,Re=Be?_&&_[Le]!=null?_[Le]:null:_?0:null,he=Re==null?null:Math.min(1,Re/I*F),ge=he!=null&&D>0&&Lr(he)<=Zc,Ee=he==null?.15:ge?0:$r(he),ve=ge,Fe=P>1?ie/(P-1):0;return n.jsx("div",{className:ve?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":Ee,"--i":ie,"--mix":Fe}},ie)}),[P,_,I,F,D,Z]),U={"--progress":String(Math.max(0,Math.min(1,r)))},pe=o.useMemo(()=>B&&B.length&&Math.max(...B.map(te=>Number.isFinite(te)?Math.abs(te):0))||1,[B]),ae=F*Math.max(0,i),V=!l||!B||!B.length?1:Math.max(1,ae),se={"--bar-gap":`${E}px`,"--wave-h":`${Lr(V)}px`,"--wave-h1":`${xs}px`},O=w&&(l?!!B||M:!0);o.useEffect(()=>{O&&R(!0)},[O]);const H=T?w:O;o.useEffect(()=>{h?.(H)},[H,h]);const re=A||40,_e=o.useMemo(()=>Array.from({length:re}).map((te,ie)=>{const Be=B&&B[ie]!=null?B[ie]:null,Le=Be==null?0:Math.abs(Be)/pe*ae,Re=Math.max(px,$r(Le)),he=re>1?ie/(re-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Re,"--i":ie,"--mix":he}},ie)}),[re,B,pe,ae,D]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:se,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${O?"is-ready":""}`,"aria-hidden":"true",children:_e}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${H?"is-ready":""}`,ref:C,children:ue}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${H?"is-ready":""}`,ref:s,style:U,children:ue})]})]})}const Xc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function ws(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},c=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),a(p)},u=p=>{l||(l=!0,i(),t.rejectOnError?r(new Error(p)):a(0))};s.addEventListener("loadedmetadata",c),s.addEventListener("error",()=>u("audio load failed")),setTimeout(()=>u("audio load timeout"),t.timeoutMs),s.src=e})}const mx=2e3;function Jc(e,t=mx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function Cx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(u=>{if(r.current=u,!u||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),c=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(u=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),u(d)},h=setTimeout(()=>p(!0),a);s.current.push(p)}),[e,t,a]);return o.useEffect(()=>()=>{const u=s.current;s.current=[];for(const p of u)p(!1)},[]),{onReadyChange:l,waitForReady:c,markNotReady:i}}function fx(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function bx({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function gx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const yx=400,vx=2e3,Qc=5;function _x({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:c=0}){const u=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)},[]),m=o.useCallback(()=>{if(u.current!==null)return;let v=0;const C=()=>{if(Wn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&f-v>yx){const _=h.current===null||f-h.current>vx;if(h.current=f,_&&p.current<Qc){p.current+=1;const g=p.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}Dt(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",g>=Qc?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}v=f}try{const f=e.current,_=Array.isArray(r.current)?r.current[s.current||0]:void 0,g=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,w=g?0:gx(f),y=t.current,A=(i||0)>0||(c||0)>0,x=A&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!x)try{y&&y.style.visibility!=="hidden"&&(y.style.visibility="hidden")}catch{}else{const E=g?_.duration:w||0;Wn&&x&&!(E>0)&&Dt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=A?rx({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:E,leadInMs:i||0,tailMs:c||0}):ax({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{y&&(y.style.visibility&&(y.style.visibility=""),y.style.left=`${k*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}u.current=requestAnimationFrame(C)};u.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,c]),b=o.useCallback(v=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${v*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(v))}catch{}},[d,t,a]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:b}}function Bs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:c=!0,showNoiseWaveForm:u=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=we.useTranslation(),m=e,b=Tr(),v=o.useRef(b?.registerAnalyser);o.useEffect(()=>{v.current=b?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),_=o.useRef(null),g=fx(),w=o.useRef(null),y=o.useRef(!1),A=o.useRef(null),{ref:x,rect:E,show:k,hide:D}=bx();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[N,B]=o.useState(!1),[$,M]=o.useState("idle"),[Y,T]=o.useState("stopped"),R=o.useRef("stopped");o.useEffect(()=>{R.current=Y},[Y]);const[S,X]=o.useState(0),[ee,W]=o.useState("active"),G=o.useRef(!1);o.useEffect(()=>{if(ee!=="playMode"||!G.current)return;G.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const de=_.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[ee]);const[L,q]=o.useState(null),[K,z]=o.useState(null),[F,I]=o.useState(0),[P,Z]=o.useState(!1),[ue,U]=o.useState(0),pe=b?.playbackRate??1,ae=b?.mainVolume??1,V=b?gs(b.settings):0,se=b?Hc(b.settings):ae,[O,H]=o.useState("idle"),[re,_e]=o.useState(""),[te]=o.useState("top"),ie=o.useRef(null),Be=o.useRef(0),Le=o.useRef(null),Re=o.useRef(!0),he=O_({mountedRef:Re}),ge=o.useRef(null),Ee=o.useRef(p),ve=o.useRef(h);o.useEffect(()=>{Ee.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{ve.current=Math.max(0,h||0)},[h]);const{start:Fe,stop:ze,settleTo:Ct}=_x({audioRef:C,fillRef:f,waveProgressRef:Le,sourcesRef:ie,currentIndexRef:Be,sequencer:he,leadInMs:p,tailMs:h}),{onReadyChange:ut,waitForReady:nt,markNotReady:ct}=Cx({showSoundWaveForm:c,showNoiseWaveForm:u}),Ae=o.useRef(null),Ue=o.useRef(s),ke=o.useRef(r),Ye=o.useRef(null),et=o.useRef(!1),[ft,vt]=o.useState(!1),it=o.useCallback(J=>{et.current=J,vt(J)},[]),jt=o.useRef(null),{activeNoiseUrl:at,noiseSettingsRef:rt,fadeInNoise:At,fadeOutNoise:Nt}=G_({noisePlayer:b,audioRef:C,playbackStateRef:R,sequencer:he}),{startTTS:Ot,stopTTS:Wt}=K_({ttsText:l,playbackRate:pe,mainVolume:se,fillRef:f,waveProgressRef:Le,setProgress:X,setPlaybackState:T,setStateLocal:W,fadeInNoise:At,fadeOutNoise:Nt,noiseSettingsRef:rt,onDoneRef:ke,handleEndRef:jt});o.useEffect(()=>{wt.current=Wt});const xt=J=>{if(typeof window>"u"||!window.speechSynthesis){try{_e(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(J);return}Je("tts"),Ot(J)},st=Array.isArray(t)?t.filter(Boolean):t?[t]:[],bt=(!st||st.length===0)&&!!l,dt=Array.isArray(L)&&L.length>0?L:Array.isArray(K)&&K.length>0?K:null,kt=Math.max(Array.isArray(dt)?dt.length:0,st.length);o.useEffect(()=>(Re.current=!0,()=>{Re.current=!1}),[]);const ht=()=>{he.abort()},wt=o.useRef(null),ce=o.useRef(null),Me=o.useRef(null),De=o.useRef(null);De.current||(De.current=()=>{Me.current=null;const J=C.current;if(ce.current==="audio"&&J&&(!J.paused||he.isRunning())){ht();try{J.pause()}catch{}Re.current&&(T("paused"),ze(),Nt())}else if(ce.current==="tts")try{wt.current?.()}catch{}});const Je=J=>{ce.current=J,Me.current=Za(De.current)},pt=()=>{Me.current?.(),Me.current=null};o.useEffect(()=>()=>{De.current&&Br(De.current)},[]);const Rt=o.useRef(pe);o.useEffect(()=>{Rt.current=pe||1},[pe]);const Te=o.useCallback(J=>{const de=Rt.current||1;try{J.defaultPlaybackRate=de}catch{}try{J.playbackRate=de}catch{}},[]),tt=o.useCallback((J,de)=>{if(!dx(J,de)){try{J.currentTime=0}catch{}Te(J);return}J.src=de,Te(J),J.load(),Te(J)},[Te]),Ft=o.useCallback(()=>{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),H("idle")},[]),_t=o.useCallback(async(J,de=3,Se=50,qe=0)=>{Ft();const Ge=he.generation(),Xe=!!J&&J.currentTime>0&&!J.ended,gt=Math.max(0,Ee.current-Math.max(0,qe));if(gt>0&&!Xe){Je("audio"),Fe(),T("playing");const mt=rt.current;if(mt?.enabled&&(mt.volume??0)>0)try{At(mt.volume)}catch{}if(!await he.waitPad(gt,"lead",qe)||!Re.current||!he.isCurrent(Ge))return!1}he.enterSound();for(let mt=0;mt<de;mt++){if(!Re.current||!he.isCurrent(Ge))return!1;try{return Je("audio"),await J.play(),!0}catch(be){if((be instanceof Error||typeof be=="object"&&be&&"name"in be?be.name:void 0)==="AbortError"){if(!he.isCurrent(Ge))return!1;await new Promise(j=>setTimeout(j,Se));continue}try{_e(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{_e(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,Fe,he,At,rt,Ft]),ne=o.useCallback(J=>{const de=he.generation(),Se=Math.max(0,ve.current-Math.max(0,J));Fe();const qe=rt.current;if(qe?.enabled&&(qe.volume??0)>0)try{At(qe.volume)}catch{}const Ge=()=>{try{ge.current?.()}catch{}};if(Se<=0){he.leave(),Ge();return}he.waitPad(Se,"tail",J).then(Xe=>{he.leave(),Xe&&he.isCurrent(de)&&Ge()}).catch(()=>{})},[he,Fe,At,rt]),ye=o.useCallback(()=>{const J=C.current;if(!J)return;const de=()=>{T("playing"),W("playMode"),Z(!0),Fe();try{io(),ur(J).then(Xe=>{if(Re.current)try{v.current?.("main",Xe)}catch{}})}catch{}const Ge=rt.current;Ge?.enabled&&(Ge?.volume??0)>0&&At(Ge.volume)},Se=()=>{lx({ended:!!J?.ended,completedByEnd:et.current})||(T("paused"),ze(),Nt())},qe=()=>{const Ge=()=>{try{const Xe=ie.current,gt=sx(Xe,Be.current);if(gt!==null){Be.current=gt,I(gt),Z(!0);const mt=Xe?.[gt]&&Xe[gt].src;if(mt&&J){tt(J,mt),_t(J).catch(()=>{});return}}}catch{}T("stopped"),X(1);try{if(J)try{J.currentTime=0}catch{}}catch{}ze(),Z(!1),Nt();try{!Ue.current&&jt.current&&jt.current()}catch{}};if(ge.current=Ge,ve.current>0){Fe(),he.waitPad(ve.current,"tail").then(Xe=>{he.leave(),Xe&&Ge()}).catch(()=>{});return}Ge()};return J.addEventListener("play",de),J.addEventListener("pause",Se),J.addEventListener("ended",qe),()=>{try{J.removeEventListener("play",de),J.removeEventListener("pause",Se),J.removeEventListener("ended",qe),ze()}catch{}}},[At,Nt,_t,rt,Fe,ze,he]);o.useEffect(()=>ye(),[ye]),o.useEffect(()=>{Ue.current=s},[s]),o.useEffect(()=>{ke.current=r},[r]),o.useEffect(()=>{if(s||ee!=="active")return;const J=A.current;if(!J)return;let de=null;const Se=requestAnimationFrame(()=>{try{const qe=J.getTotalLength();if(!qe)return;const Ge=qe*.2;J.style.strokeDasharray=`${qe-Ge} ${Ge}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${qe}}}`,document.head.appendChild(de),J.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Se),de?.remove()}},[ee,s]),o.useEffect(()=>{ie.current=L},[L]),o.useEffect(()=>{Be.current=F},[F]),o.useEffect(()=>{const J=_.current,de=w.current;if(!J||!de)return;let Se=null;const qe=32,Ge=60,Xe=()=>{try{const mt=Array.from(J.querySelectorAll(":scope > .button"));let be=0;mt.forEach(We=>{if(We===de)return;const Ke=We.getBoundingClientRect();be+=Ke.width});const j=J.getBoundingClientRect().width,Q=Math.max(0,Math.floor(j-be-8)),Ce=kt;if(!Ce||Q<=0){Array.from(de.children).forEach(We=>{try{We.style.width=""}catch{}});return}let $e=Math.floor(Q/Ce);$e>Ge&&($e=Ge),$e<qe&&($e=Math.max(qe,Math.floor(Q/Ce))),Array.from(de.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${$e}px`}catch{}})}catch{}},gt=requestAnimationFrame(Xe);try{Se=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),Se.observe(J),Se.observe(de),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(gt)}catch{}try{Se&&(Se.disconnect(),Se=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[L,K,kt]),o.useEffect(()=>()=>{try{Ae.current&&(clearTimeout(Ae.current),Ae.current=null),Ye.current&&(clearTimeout(Ye.current),Ye.current=null)}catch{}},[]);const Ie=(J,de)=>{q(J),U(de),ct(),z(ix(J)),ie.current=J},Ve=()=>{W("playMode"),I(0),Z(!0)},Bt=async(J,de)=>{it(!1),y.current=!1,tt(J,de),await Jc(J),await nt()!==!1&&(B(!1),Ve(),await _t(J))},Qe=async(J,de=!1)=>{const Se=C.current;B(!0),M("measuring_duration");try{const qe=await ws(J,{timeoutMs:1e4,rejectOnError:!0});Ie([{src:J,objectUrl:null,duration:qe}],qe),M("ready"),de&&Se&&await Bt(Se,J)}finally{y.current=!1,B(!1)}},zt=async(J,de=!1)=>{const Se=C.current;B(!0),M("measuring_duration");try{const qe=await Promise.all(J.map(Xe=>ws(Xe,{timeoutMs:1e4})));if(!Re.current)return;const Ge=J.map((Xe,gt)=>({src:Xe,objectUrl:null,duration:qe[gt]||0}));Ie(Ge,ux(Ge)),M("ready"),de&&Se&&Ge.length>0&&await Bt(Se,Ge[0].src)}finally{y.current=!1,B(!1)}},Ht=async(J=!1,de=!0)=>{const Se=C.current,qe=t?Array.isArray(t)?t:[t]:[];if(!qe||qe.length===0||!qe.some(Boolean))return!1;if(y.current)return null;y.current=!0,de&&B(!0),M("resolving");try{const Ge=cx(t,a,Nl),Xe=[];let gt=0;for(const mt of Ge){let be=mt.src??null,j=null;if(!be&&mt.resolvedPath){try{M("getting_signed_url"),be=await El(mt.resolvedPath)}catch{be=null}if(!Re.current)return!1;if(!be)try{M("downloading");const Ce=await Dl(mt.resolvedPath);if(!Re.current)return!1;if(Ce){const $e=Ce instanceof Blob?Ce:new Blob([Ce]);j=g.track(URL.createObjectURL($e)),be=j}}catch{M("error");try{_e(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),W("active")}catch{}}}if(!be)continue;let Q=0;try{M("measuring_duration"),Q=await ws(be,{timeoutMs:3e3})}catch{Q=0}if(!Re.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const Ce of Xe)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}gt+=Q||0,Xe.push({...mt,src:be,objectUrl:j,duration:Q})}if(Ie(Xe,gt),Xe.length>0&&J&&Se){const mt=Xe[0];it(!1);try{g.keepOnly(Xe.map(be=>be.objectUrl))}catch{}if(M("ready"),y.current=!1,mt.src&&Se)try{if(tt(Se,mt.src),await Jc(Se),await nt()===!1)return!1;de&&B(!1),Ve(),Se&&await _t(Se)}catch{de&&B(!1)}else de&&B(!1);W("playMode"),I(0),Z(!0)}return Xe.length>0}finally{y.current=!1,de&&B(!1),M(Ge=>Ge==="ready"?"ready":"idle")}},cn=async J=>{const de=he.isRunning();if(J.paused&&!de){if(et.current){await Tt();return}const Se=he.resume();if(Se){if(T("playing"),Se.phase==="tail"){ne(Se.elapsed);return}await _t(J,3,50,Se.elapsed);return}await _t(J),T("playing")}else he.pause(),ht(),J.pause(),T("paused"),de&&(ze(),Nt())},Yt=async()=>{const J=C.current;if(!(!J&&!bt)){if(bt){const de=window.speechSynthesis;if(ee==="active"){const Se=La(),qe=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Se&&qe.length>0){if(y.current)return;W("load"),B(!0),M("synthesizing"),y.current=!0;try{const Ge=await Promise.all(qe.map(Xe=>Promise.resolve(Se(Xe))));Ge.length>1?await zt(Ge,!0):await Qe(Ge[0],!0)}catch{y.current=!1,B(!1),W("active"),xt(qe.length>0?qe:void 0)}return}xt(qe.length>0?qe:void 0);return}if(ee==="playMode"){const Se=!!de&&(de.speaking||de.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!Se){await cn(J);return}try{if(de&&de.paused)try{Je("tts"),de.resume(),T("playing")}catch{}else try{de.pause(),T("paused")}catch{}}catch{}}return}if(ee==="active"){if(s&&Array.isArray(ie.current)&&ie.current.length>0){const Se=ie.current[0];try{if(Se.src&&J)try{tt(J,Se.src),Ve(),J&&await _t(J)}catch{}Ve();return}catch{}}W("load");let de;try{de=await Ht(!0)}catch{de=!1}if(de===!1&&Re.current){try{_e(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}W("active")}return}if(ee!=="load"&&(ee==="playMode"||ee==="active"))try{J&&await cn(J)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Tt=async()=>{const J=C.current;if(J)try{const de=ie.current;if(Array.isArray(de)&&de.length>1){await St(0);return}it(!1);try{J.currentTime=0}catch{}J&&await _t(J),T("playing"),W("playMode")}catch{}},Jt=()=>{ht(),pt(),wt.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Nt(),T("stopped"),W("active"),X(0),Z(!1)},en=async(J,{sameSegment:de=!1}={})=>{ht();const Se=he.generation(),qe=C.current,Ge=ie.current?.[J]?.src;try{if(it(!1),I(J),Z(!0),Be.current=J,!Ge||!qe||(de||ct(),tt(qe,Ge),!de&&await nt()===!1)||!he.isCurrent(Se)||(await _t(qe),!he.isCurrent(Se)))return;T("playing"),W("playMode")}catch{}},An=async()=>{const J=ie.current,de=Be.current||0;if(!J||de<=0){await Tt();return}await en(de-1)},Nn=async()=>{const J=ie.current,de=Be.current||0;if(!J||de>=J.length-1){Jt();return}await en(de+1)},gn=()=>{if(et.current)return;const J=200,de=340;it(!0),ht(),pt();try{X(1)}catch{}Ct(1);try{H("hold")}catch{}try{const Se=C.current,qe=bt&&!!Se?.src;if(!bt||qe){if(Se){Se.pause();try{Se.currentTime=0}catch{}}}else Wt();Nt()}catch{}try{T("stopped")}catch{}if(Z(!1),!Ue.current)try{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),Ye.current=setTimeout(()=>{try{H("out")}catch{}Ye.current=setTimeout(()=>{try{typeof ke.current=="function"&&ke.current(!0)}catch{}try{H("idle")}catch{}Ye.current=null},de)},J)}catch{}};o.useEffect(()=>{jt.current=gn});const Pt=o.useCallback(()=>_e(""),[]),St=async J=>{(ie.current||[])[J]&&await en(J,{sameSegment:J===Be.current})},Mt=Y==="playing",Gt=o.useMemo(()=>{if(!K||K.length<=1)return K;const J=K[F];return J?[J]:K},[K,F]),dn=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&Te(J)}catch{}},[pe,Te]);const yn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const de=Math.max(0,Math.min(1,se)),Se=yn.current,qe=()=>{Se.raf!==null&&(cancelAnimationFrame(Se.raf),Se.raf=null),Se.timer!==null&&(clearTimeout(Se.timer),Se.timer=null)};qe();const Ge=cr(J);if(J.paused||Math.abs(Ge-de)<.001||typeof requestAnimationFrame!="function"){try{qn(J,de)}catch{}return}const Xe=performance.now(),gt=()=>{const mt=Math.min(1,(performance.now()-Xe)/150);try{qn(J,Ge+(de-Ge)*mt)}catch{}Se.raf=mt<1?requestAnimationFrame(gt):null};return Se.raf=requestAnimationFrame(gt),Se.timer=setTimeout(()=>{qe();try{qn(J,de)}catch{}},200),qe},[se]);const Vt=O==="hold",En=O==="out",me=ee==="playMode"&&!N&&!ft||Vt||En,je=Y!=="stopped"||Vt||En,Oe=Y==="paused",Ze=Math.max(0,Math.min(100,(S||0)*100)),He=Ne("audio-player__fill",me?"is-visible":"",je?"is-expanded":"",Oe?"is-paused":"",En?"is-out":"");return n.jsxs("div",{className:`audio-player ${dn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Mt?"is-playing":""} ${N?"is-loading":""} ${ee!=="default"?"is-revealed":""}`,children:[N?n.jsxs("div",{className:"audio-player__loading",role:Xc[$]?"status":void 0,"aria-live":Xc[$]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,ee==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:dn,onClick:()=>{G.current=Nr(),D(),Yt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:D,onFocus:k,onBlur:D,children:n.jsx("span",{ref:x,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:A,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,E&&n.jsx(Ln,{anchorRect:E,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${ee==="playMode"||Mt?"is-visible":""}`,inert:!(ee==="playMode"||Mt)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:An,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:ee!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Mt?"pause":"play",onClick:Yt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Mt,width:"60px",variant:"transparent-white",disabled:ee!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Jt,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:ee!=="playMode"}),kt>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:kt}).map((J,de)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{St(de)}catch{}},ariaLabel:d("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:P&&F===de,disabled:ee!=="playMode"||!(Array.isArray(L)&&L[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(L)||L.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Tt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:ee!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Nn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:ee!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:gn,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:ee!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(c||u)&&n.jsx(hx,{segments:Gt,progress:S,totalDuration:ue,waveProgressRef:Le,showSoundWaveForm:c,leadInMs:p,tailMs:h,trackDurationSec:L?.[F]?.duration??0,noiseSrc:u&&b?.settings.enabled&&V>0?at:null,noiseRatio:b?sr(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:ae,onReadyChange:ut})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!c&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(ot,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(wa,{message:re,position:te,onClose:Pt})]})}function Rr(e){const{t}=we.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:c=!1}=e||{},[u,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",u)}catch{}},[u]);const{increase:h,decrease:d,canIncrease:m,canDecrease:b,fontSize:v,lineHeight:C}=Hi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>p(A=>A==="dark"?"light":"dark"),[]),_=o.useCallback(A=>{try{A.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${v}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},y=n.jsxs("div",{className:le(`text-box-tooltip__root ${u==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:le("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:le("text-box-tooltip__text body-1"),style:w,children:g.map((A,x)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[g.length>1?n.jsx("div",{className:le("text-box-tooltip__marker"),children:n.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:A})]},x))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:u==="dark"?"transparent-white":"transparent-gray",disabled:!b}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:u==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:u==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:u==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:_,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:u==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:le(`text-box-tooltip ${u==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:c,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:y}):n.jsx("div",{className:le(`text-box-tooltip ${u==="dark"?"is-dark":""}`),children:y})}function ed({state:e="disabled"}){const{t}=we.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(ot,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function td(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const c=()=>{l=null;const u=r.current(),p=u?Array.from(u.querySelectorAll(Dn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(c))};return l=requestAnimationFrame(c),()=>{l!==null&&cancelAnimationFrame(l);const u=document.activeElement;if(!u||u===document.body||!document.contains(u)||u.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function nd({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:c,usePlayAllBtn:u=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=we.useTranslation(),m=vn("(max-width: 767px)"),b=`training-step__title h4 ${c&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),v=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[f,_]=o.useState(!1),[g,w]=o.useState(null),[y,A]=o.useState(null);td(f&&!!g,()=>{if(typeof document>"u")return null;const N=Array.from(document.querySelectorAll(".tooltip__content"));for(let B=N.length-1;B>=0;B--)if(N[B].querySelector(".text-box-tooltip__root"))return N[B];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const E=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(N=>typeof N=="string"||typeof N=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{_(!1),w(null),A(null)},[]);o.useEffect(()=>{if(!f)return;let N;try{typeof x.current=="function"&&(N=x.current())}catch{}if(N===!1){k();return}A(typeof N<"u"&&N!==null?N:null)},[E]);const D=o.useCallback(()=>{let N;try{typeof l=="function"&&(N=l())}catch{}if(N!==!1){if(A(typeof N<"u"&&N!==null?N:i),!C.current){_(B=>!B);return}if(f)_(!1),w(null),A(null);else{const B=C.current.getBoundingClientRect();w(B),_(!0)}}},[l,i,f]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||u?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[u&&n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:D,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Rr,{text:y??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ks(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ia({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:c=void 0,useTitleFaded:u=void 0,lockedHint:p}){const{t:h}=we.useTranslation(),[d,m]=o.useState(()=>ks(e,t));o.useEffect(()=>{const x=ks(e,t);if(x!==d){const E=setTimeout(()=>m(x),0);return()=>clearTimeout(E)}},[e,t,d]);const b=o.useCallback((...x)=>{ks(e,t)==="done"||d==="done"||typeof c=="function"&&c(...x)},[e,t,d,c]),[v,C]=o.useState(!1),[f,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(x=>{if(!x)return null;try{const E=x;if(typeof x=="object"&&(E.currentTarget||E.target)&&(E.nativeEvent||E.type)){const N=E.currentTarget??E.target;if(N&&typeof N.getBoundingClientRect=="function")return N.getBoundingClientRect()}if(x instanceof DOMRect)return x;const k=x;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const D=x?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((x,{text:E="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:N="center",alignY:B="top"}={})=>{const $=g(x);_({text:E,label:k,anchorRect:$,backdrop:D,alignX:N,alignY:B}),C(!0)},[g]),y=o.useCallback(()=>{C(!1),_(x=>({...x,anchorRect:null}))},[]),A=o.Children.map(l,x=>{if(o.isValidElement(x)){const E=x;if(typeof E.type=="string")return E;const k=E.props??{},D=typeof k.onDone=="function"?k.onDone:b,N=typeof k.disabled=="boolean";let B=d==="disabled";return N&&(B=!!k.disabled),o.cloneElement(E,{onDone:D,disabled:B,showTooltip:w,hideTooltip:y})}return x});return n.jsxs("div",{className:`training-step training-step--${d} ${a?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ed,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(nd,{state:d,title:r,...s,useFaded:u}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),A]}),v?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:y,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Rr,{text:f.text,onClose:y})}):null]})}function ad({context:e,state:t="disabled",theme:a="light"}){const{t:r}=we.useTranslation(),[s,l]=o.useState("disabled"),[i,c]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const u=()=>c(M=>M==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:b,lineHeight:v}=Hi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),_=o.useRef(null),g=o.useRef(!1),w=o.useCallback(()=>{g.current=Nr()&&!!_.current&&_.current.contains(document.activeElement),l("active")},[]),y=o.useCallback(()=>f(""),[]),A=M=>{try{f(M)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const M=setTimeout(()=>l(t),0);return()=>clearTimeout(M)}},[t]);const E=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,D]=o.useState(E);k!==E&&(D(E),l("disabled"));const N=t==="disabled"?s:t,B=N==="disabled"?"training-text-box--disabled":N==="active"?"training-text-box--active":N==="done"?"training-text-box--done":"",$=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${v}px`}),[b,v]);return o.useEffect(()=>{if(N==="disabled"||!g.current)return;g.current=!1;const M=document.activeElement;M&&M!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[N]),n.jsxs("div",{ref:_,className:`training-text-box ${B} ${N!=="disabled"&&i==="dark"?"is-dark":""}`,children:[N==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:w,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":N==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:$,children:E})}),N!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":N==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>A(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>A(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:u,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(wa,{message:C,position:"top",onClose:y})]})}function ua(e){return e==="active"||e==="done"}function As({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:c,answer:u,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:b=!1,choiceIcons:v,shuffleChoices:C=!0}){const{t:f}=we.useTranslation(),_=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",y=Array.isArray(h)&&h.length?h:typeof u<"u"?[u].concat(Array.isArray(p)?p:[]):void 0,A=p?p.join("||"):"",x=h?h.join("||"):"",[E,k]=o.useState(()=>Array.isArray(y)?C?Ia(y):y.slice():void 0);o.useEffect(()=>{Array.isArray(y)&&y.length?k(C?Ia(y):y.slice()):k(void 0)},[u,A,x,C]);const[D,N]=o.useState(null),[B,$]=o.useState(()=>new Set);o.useEffect(()=>{N(null),$(new Set)},[x,u,A]);const M=o.useRef(void 0);o.useEffect(()=>{const R=M.current;typeof R=="number"&&typeof t=="number"&&typeof e=="number"&&R>=e&&t<e&&(N(null),$(new Set)),M.current=t},[t,e]);const Y=o.useCallback(R=>{if(!ua(w))return;const S=E?.[R];if(S==null)return;const X=S;if(d){const ee=new Set(B);ee.has(X)?ee.delete(X):ee.add(X),$(ee),typeof c=="function"&&c({selectedValues:[...ee],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...ee],__ts:Date.now()})}else N(X),typeof c=="function"&&c({selectedIndex:R,selectedValue:X,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:R,selectedValue:X,__ts:Date.now()})},[E,w,d,c,B]),T=`training-step__buttons${Array.isArray(E)&&E.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ia,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(E)&&E.length>0?E.map((R,S)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>Y(S),ariaLabel:String(R),label:R,useLabel:!0,icon:v?v[String(R)]:void 0,variant:"default",disabled:w==="disabled",selected:d?B.has(R):D===R,useDisabledCovered:b,minWidth:0},String(R))):null})})}function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:c,demoSelected:u}){const{t:p}=we.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",b=c&&typeof c=="object"?c.sentence||"":typeof c=="string"?c:"",v=c&&typeof c=="object"?c.choices:void 0,[C,f]=o.useState(u??null),_=`${String(b)}\0${JSON.stringify(v??null)}`,[g,w]=o.useState(_);g!==_&&(w(_),u==null&&f(null));const[y,A]=o.useState(u);Object.is(y,u)||(A(u),f(u??null));const x=o.useRef(void 0);o.useEffect(()=>{const N=x.current;typeof N=="number"&&typeof t=="number"&&typeof e=="number"&&N>=e&&t<e&&u==null&&f(null),x.current=t},[t,e,u]);const E=o.useCallback(N=>{const B=typeof N=="object"&&N!==null?Object.assign({},N,{__ts:Date.now()}):{value:N,__ts:Date.now()};typeof i=="function"&&i(B),ua(m)&&typeof l=="function"&&l(B)},[i,m,l]),k=o.useCallback(()=>{ua(m)&&(f(!1),E(!1))},[E,m]),D=o.useCallback(()=>{ua(m)&&(f(!0),E(!0))},[E,m]);return n.jsxs(ia,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ad,{context:c,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((N,B)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{ua(m)&&(f(B),E&&E(B))},disabled:m==="disabled",ariaLabel:String(N),label:N,variant:m,selected:C===B},B)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function Es({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:c,usePreviewTextBtn:u,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:f}){const{t:_}=we.useTranslation(),g=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ia,{index:e,stepIndex:t,isLast:a,title:g,onDone:s,titleProps:{usePreviewTextBtn:u,previewText:p,onPreviewTextBtn:h},children:n.jsx(Bs,{soundSrc:i,ttsText:i?null:p??g,bucketPath:c,btnLabel:l||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const xx=[];function Ds({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:c=xx}){const{t:u}=we.useTranslation(),p=s??u("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=z=>typeof z=="string"?z:z&&(z.context||z.sentence||z.question||"")||"",[d,m]=o.useState(Array.isArray(c)?c:[]),[b,v]=o.useState(()=>(d||[]).map((z,F)=>({id:F,text:h(z)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",_=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(_.current===c)return;_.current=c;const z=Array.isArray(c)?c:[];m(z);const F=(I=>{const P=(I||[]).map((pe,ae)=>({id:ae,text:h(pe)}));if(P.length<=1)return P;const Z=(pe,ae)=>{if(pe.length!==ae.length)return!1;for(let V=0;V<pe.length;V++)if(pe[V].text!==ae[V].text)return!1;return!0};let ue=Ia(P),U=0;for(;Z(ue,P)&&U<20;)ue=Ia(P),U+=1;return ue})(z);v(F);try{if(typeof i=="function"){const I=F.filter((P,Z)=>P.text===h(z[Z])).length;i({shuffled:F,score:I,total:(z||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=F.filter((P,Z)=>P.text===h(z[Z])).length;g.current=c,l({shuffled:F,score:I,total:(z||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[c]),o.useEffect(()=>{if(C!=="active"||g.current===c||(g.current=c,typeof l!="function"))return;const z=Array.isArray(c)?c:[],F=b.filter((I,P)=>I.text===h(z[P])).length;l({shuffled:b,score:F,total:z.length,initial:!0,__ts:Date.now()})},[C,c]);const w=(z,F)=>{const I=[...b],P=z+F;if(P<0||P>=I.length)return;const Z=I[P];I[P]=I[z],I[z]=Z,X(I);try{if(typeof l=="function"&&C==="active"){const ue=I.filter((U,pe)=>U.text===h(d[pe])).length;l({shuffled:I,score:ue,total:(d||[]).length,__ts:Date.now()})}}catch{}},[y,A]=o.useState(null),x=o.useRef(null),E=o.useRef(null),k=o.useRef(null),D=o.useRef(null),N=o.useRef(null),B=o.useRef({x:0,y:0}),$=o.useRef(null),M=o.useRef({dx:0,dy:0}),Y=()=>{if($.current!==null)return;const z=()=>{if(!x.current){$.current=null;return}$.current=requestAnimationFrame(z);const F=B.current,I=M.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${F.x-I.dx}px, ${F.y-I.dy}px, 0)`)};$.current=requestAnimationFrame(z)},T=o.useRef(new Map),R=o.useRef(new Map),S=()=>{const z=new Map;return T.current.forEach((F,I)=>{F&&F.getBoundingClientRect&&z.set(I,F.getBoundingClientRect())}),z},X=z=>{const F=S();v(z);try{if(typeof i=="function"){const I=z.filter((P,Z)=>P.text===h(d[Z])).length;i({shuffled:z,score:I,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=S();z.forEach(P=>{const Z=F.get(P.id),ue=I.get(P.id),U=T.current.get(P.id);if(!U||!Z||!ue)return;const pe=Z.top-ue.top;pe&&(U.style.transition="none",U.style.transform=`translateY(${pe}px)`,requestAnimationFrame(()=>{U.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",U.style.transform="";const ae=()=>{U.style.transition="",U.removeEventListener("transitionend",ae)};U.addEventListener("transitionend",ae)}))})})},ee=(z,F)=>{try{try{F.dataTransfer?.setData("text/plain",String(z))}catch{}try{F.dataTransfer&&(F.dataTransfer.effectAllowed="move")}catch{}try{const I=document.createElement("div");I.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(I),F.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}A(z);try{const I=b[z],P=document.createElement("div");P.className="order-list__dragging-object order-list__dragging-object--visible",P.textContent=I&&I.text?I.text:"",document.body.appendChild(P),x.current=P;const Z=T.current.get(I.id);let ue=F.clientX||0,U=F.clientY||0;try{if(Z&&Z.getBoundingClientRect){const H=Z.getBoundingClientRect();ue=H.left+H.width/2,U=H.top+H.height/2}}catch{}const pe=P.getBoundingClientRect(),ae=pe.width/2,V=pe.height/2;M.current={dx:ae,dy:V},P.style.transition="none",B.current={x:ue,y:U},P.style.transform=`translate3d(${ue-ae}px, ${U-V}px, 0)`,requestAnimationFrame(()=>{try{P.style.transition=""}catch{}Y()});const se=H=>{const re=H;B.current={x:re.clientX,y:re.clientY},Y()};k.current=se,document.addEventListener("mousemove",se);const O=H=>{const re=H;B.current={x:re.clientX,y:re.clientY},Y()};E.current=O,document.addEventListener("dragover",O);try{F.dataTransfer?.setData("text/plain",String(z));try{F.dataTransfer?.setData("application/json",JSON.stringify({idx:z}))}catch{}}catch{}}catch{}},W=(z,F)=>{F.preventDefault();try{F.dataTransfer&&(F.dataTransfer.dropEffect="move")}catch{}try{N.current!==null&&(clearTimeout(N.current),N.current=null);const I=F.currentTarget&&F.currentTarget.closest?F.currentTarget.closest(".order-list__item"):null;if(I&&D.current!==I){if(D.current)try{D.current.classList.remove("drag-over")}catch{}try{I.classList.add("drag-over")}catch{}D.current=I}}catch{}},G=(z,F)=>{F.preventDefault();const I=F.dataTransfer?.getData("text/plain")||"",P=I?parseInt(I,10):y,Z=z;if(typeof P!="number"||isNaN(P)||P===Z){A(null),K(),L();return}const ue=Lf(b,P,Z);X(ue),A(null),L();try{if(typeof l=="function"&&C==="active"){const U=ue.filter((pe,ae)=>pe.text===h(d[ae])).length;l({shuffled:ue,score:U,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const U=document.querySelectorAll(".order-list .order-list__item")[Z];if(!U)return;const pe=U.querySelector(".order-list__slot")||U;try{pe.classList.add("pulse"),pe.offsetHeight,pe.classList.add("to-dark");const ae=()=>{pe.classList.remove("pulse","to-dark"),pe.removeEventListener("transitionend",ae)};pe.addEventListener("transitionend",ae)}catch{}})}catch{}K()},L=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}E.current&&(document.removeEventListener("dragover",E.current),E.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),$.current!==null&&(cancelAnimationFrame($.current),$.current=null)},q=()=>{A(null),K(),L()};o.useEffect(()=>()=>L(),[]);const K=()=>{try{if(N.current!==null&&(clearTimeout(N.current),N.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(z=>z.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const z=Math.max(1,(b||[]).length);b.forEach((F,I)=>{const P=R.current.get(F.id);if(!P)return;let Z=50;z>1&&(Z=Math.round(I/(z-1)*100));try{P.style.setProperty("--marker-pos",Z+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{L(),N.current!==null&&(clearTimeout(N.current),N.current=null)},[]),n.jsx(ia,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:p,children:n.jsx("div",{className:"order-list",children:b.map((z,F)=>{const I=Math.max(1,(b||[]).length),P=I>1?Math.round(F/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":P+"%"},ref:Z=>{const ue=R.current;Z?ue.set(z.id,Z):ue.delete(z.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:F+1})}):null,n.jsxs("div",{ref:Z=>{const ue=T.current;Z?ue.set(z.id,Z):ue.delete(z.id)},className:`order-list__draggable ${y===F?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?Z=>ee(F,Z):void 0,onDragEnter:f?Z=>W(F,Z):void 0,onDragOver:f?Z=>W(F,Z):void 0,onDragLeave:f?()=>{try{N.current!==null&&clearTimeout(N.current),N.current=setTimeout(()=>{try{const Z=document.querySelectorAll(".order-list .order-list__item");Z&&Z[F]&&(Z[F].classList.remove("drag-over"),D.current===Z[F]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?Z=>G(F,Z):void 0,onDragEnd:f?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:z.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(F,-1),ariaLabel:u("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:F===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(F,1),ariaLabel:u("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:F===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},z.id)})})})}const wx=8e3;function Bx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function rd({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:c=[],selectable:u=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:b}=we.useTranslation(),v=s??b("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(c)?c:c&&c.items||[],[c]),f=d??3,_=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[y,A]=o.useState(null),x=o.useRef([]),[E,k]=o.useState(!1),D=o.useRef(null),N=o.useRef(!0);o.useEffect(()=>(N.current=!0,()=>{N.current=!1}),[]);const B=o.useMemo(()=>C.map(S=>S?.id??S?.word??"").join("|"),[C]);o.useEffect(()=>{A(null)},[B]);const $=o.useRef(void 0);o.useEffect(()=>{const S=$.current;typeof S=="number"&&typeof t=="number"&&typeof e=="number"&&S>=e&&t<e&&A(null),$.current=t},[t,e]);const M=o.useCallback((S,X)=>{if(u)return;const ee={item:S,index:X,__ts:Date.now()};try{typeof i=="function"&&i(ee)}catch{}if(w==="active"&&typeof l=="function")try{l(ee)}catch{}},[u,i,w,l]),Y=o.useRef(m);o.useEffect(()=>{Y.current=Math.max(0,m||0)},[m]);const T=o.useCallback(async()=>{if(E||w==="disabled")return;k(!0);let S=!1;const X=new Promise(ee=>{D.current=()=>{S=!0,ee()}});try{for(let ee=0;ee<_.length&&!(!N.current||S);ee++){const W=x.current[ee];if(!W)continue;await Promise.race([Bx(W.play(),wx),X]);const G=Math.max(0,Y.current||0);G>0&&ee<_.length-1&&!S&&N.current&&await Promise.race([new Promise(L=>{setTimeout(L,G)}),X])}}finally{D.current=null,k(!1)}},[E,w,_.length]),R=o.useCallback((S,X)=>{if(!ua(w))return;A(X);const ee={selectedValue:S.word||S.title||"",selectedIndex:X,item:S,__ts:Date.now()};try{typeof i=="function"&&i(ee)}catch{}if(typeof l=="function")try{l(ee)}catch{}},[i,w,l]);return n.jsx(ia,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,onDone:l,titleProps:{usePlayAllBtn:!h&&_.length>0,onPlayAll:T,playAllActive:E},children:n.jsx("div",{className:"training-step__cards",onClickCapture:S=>{const X=D.current;if(!X)return;const ee=S.target;ee&&typeof ee.closest=="function"&&ee.closest(".training-word-card__bottom")&&X()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map((S,X)=>n.jsx(rs,{ref:ee=>{x.current[X]=ee},item:S,disabled:w==="disabled",onPlayDone:()=>M(S,X),selectable:u,selected:u&&y===X,onSelect:u?()=>R(S,X):void 0,flipDelay:X*120,hideLabel:p,hideAudio:h},S&&S.id||X))})})}const kx=160;function Ax(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function od(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}Ax(Zt.t.bind(Zt)),od(Zt.t.bind(Zt));const Pr="none",Nx=.5,Ex=1.5,Dx=.25;function Ss({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:c,disabled:u,onChange:p}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Ju,{value:a,onChange:p,min:r,max:s,step:l,size:c,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:u,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(Ne("noise-settings-tooltip__value","button-1",u?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function sd({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=we.useTranslation(),s=vn("(max-width: 767px)")?40:24,l=Tr(),i=sr(l?.settings??la),c=l?.settings.type??"defaultNoise",u=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(_=>{try{l?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[l]),b=o.useCallback(_=>{try{l?.setPlaybackRate(_)}catch{}},[l]),v=o.useCallback(_=>{const g=Math.min(or,Math.max(0,Math.round(_*10)/10));try{l?.setSettings({noiseRatio:g})}catch{}},[l]),C=o.useCallback(_=>{try{_===Pr?l?.setSettings({enabled:!1}):l?.setSettings({type:_,enabled:!0})}catch{}},[l]),f=[{key:Pr,label:r("training.noise.type.none","\uC5C6\uC74C")},...od(r).map(_=>({key:_.value,label:_.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(tr,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Ss,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Ss,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:Nx,max:Ex,step:Dx,size:s,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(_n,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:u?c:Pr,onChange:C})}),n.jsx(Ss,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:or,step:zc,size:s,disabled:!u,onChange:v})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(_n,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Pr,onChange:()=>{}})})})]})})}function ld({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:c=1,resultOpen:u=!1,hideNoiseRows:p=!1}){const{t:h}=we.useTranslation(),[d,m]=o.useState(!1),[b,v]=o.useState(null),[C,f]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),w=Tr(),y=c>0,A=y&&i<c-1,x=!y||i>=c-1,E=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),v(null))},[e]);const k=o.useCallback(()=>{m(!1),v(null)},[]),D=o.useCallback(()=>{if(d){m(!1),v(null);return}const X=_?.current?.getBoundingClientRect();X&&v(X),t?.(),m(!0)},[d,t]),N=o.useCallback(()=>{if(d){m(!1),v(null);return}const X=g?.current?.getBoundingClientRect();X&&v(X),t?.(),m(!0)},[d,t]),B=vn("(max-width: 767px)"),$=o.useRef(null),[M,Y]=o.useState(null),T=o.useCallback(()=>{f(X=>{const ee=!X;return Y(ee?$.current?.getBoundingClientRect()??null:null),ee})},[]),R=o.useCallback(()=>{f(!1),Y(null)},[]);o.useEffect(()=>{u&&(f(!1),Y(null))},[u]);const S=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Qo,{analyser:w?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Qo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return td(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[_.current,g.current].map(X=>X?.querySelector("button")??null).find(X=>!!X&&X.getClientRects().length>0)??_.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:N,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:$,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:C,"aria-expanded":B?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!B&&n.jsx("div",{className:"pp-bottom__meters",children:S})]}),e&&C&&B&&M&&n.jsx(Bn,{anchorRect:M,onClose:R,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:S})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!E}),A&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!E})]}),e&&d&&n.jsx(sd,{anchorRect:b,onClose:k,hideNoiseRows:p})]})}function id({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:c,pageCount:u,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:b}=we.useTranslation(),v=vn("(max-width: 767px)"),C=Number.isInteger(h)?h:c||0,f=Number.isInteger(p)?p:u||0,_=d||m,g=Array.isArray(r)?v?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,y=typeof t=="string"?t.trim():t,A=!!(w||y),x=A?w||y:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),E=g||(w?t:void 0),k=v&&typeof E=="string"&&(E.includes(" \xB7 ")||E.includes(" / "))?E.split(/\s[·/]\s/).pop():E,D=o.useMemo(()=>{const N=l&&typeof l=="object"?{...l}:{};return!("width"in N)&&!("height"in N)&&(N.width="40px",N.height="40px"),N},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(_u,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${A?"":" pp-title__title--empty"}`,children:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(nc,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function Sx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function jx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const ud=(e,t)=>{if(!t)return t;const a=typeof Zt?.t=="function"?Zt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function cd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=ei().find(c=>c.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(c=>c.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ud(`topic.${l.key}`,l.label):void 0,i?ud(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function js(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function dd(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Tx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function Mx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:c}){const u=cd(t,a,r),p=typeof c=="function"?c(u)||{}:c||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...u,...p},pages:s,emptyMessage:l,buildResults:i}}function Lx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function $x(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function Rx(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function pd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Px(e,t,a,r){return pd(e,t*a+r)}function Fx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function Ix(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const hd=o.createContext(null);function Ox(){const e=o.useContext(hd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function zx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:c}){const{t:u}=we.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),b=JSON.stringify(l),v=l.length;o.useEffect(()=>{m(Array.from({length:v},()=>null))},[b]);const C=o.useRef(void 0);o.useEffect(()=>{const w=C.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&m(Array.from({length:v},()=>null)),C.current=t},[t,e,v]);const f=o.useMemo(()=>d.filter(w=>w!==null).length+1,[d]),_=o.useCallback(w=>{if(!ua(h))return;const y=d;let A;if(y[w]!=null){const E=y[w];A=y.map(k=>k!==null&&k>=E?null:k)}else A=[...y],A[w]=f;m(A);const x={selectedOrder:A,words:l,__ts:Date.now()};try{typeof c=="function"&&c(x)}catch{}if(y[w]==null&&A.length>0&&A.every(E=>E!==null))try{typeof i=="function"&&i(x)}catch{}},[h,d,f,c,i,l]),g=s??u("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ia,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,y)=>n.jsx(rs,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:d[y]!==null,orderRank:d[y],onSelect:()=>_(y),flipDelay:y*120,hideLabel:!1,hideAudio:!0},`${w}-${y}`))})})}function Fr(e){return null}Fr.__isTrainingPage=!0;function Ea(e,t){const a=Ox();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function md({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Ea(e,t);return n.jsx(Es,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function Cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:c}=Ea(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:c})}function fd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:c}=Ea(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:c})}function bd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:c}=Ea(e,t);return n.jsx(Ds,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:c})}function gd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:c}=Ea(e,t);return n.jsx(rd,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:c})}function Wx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:c}=Ea(e,t);return n.jsx(zx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:c})}const yd=3e4,Hx=/^(https?:|blob:|data:audio|\/|\.\/)/;function vd(e){return typeof e=="string"&&Hx.test(e)?e:null}const Vx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ts=Symbol("timed-out");function qx(e,t){if(t<=0)return Promise.resolve(Ts);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ts),t)})]).finally(()=>clearTimeout(a))}function Ux(e){return e?La()||ir()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Gx(e,t){const a=[],r=vd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",La()],["fallbackUrlResolver",ir()]])i&&a.push({kind:l,resolve:async c=>{let u;try{u=await qx(i(s),c)}catch(h){return Dt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return u===Ts?(Dt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${yd}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):Vx(u)||(Dt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(u)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Kx(){return Date.now()+yd}const Yx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Zx(e){Dt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function Ir(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Xx(e){return Ir(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Jx(e){return vd(Ir(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function _d(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=Ir(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function xd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:c=!1,pending:u=!1}=e||{},{t:p}=we.useTranslation(),h=o.useId(),d=o.useCallback(()=>!u,[u]);o.useEffect(()=>{const N=a??0;if(t!=null&&N>0&&t/N>.5){const B=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(B)}},[t,a]);const m=o.useCallback(N=>{const B=_d(N),$=Ir(N?.wording,N?.label);return B===!0?{variant:"main",label:$??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:B===!1?{variant:"danger",label:$??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:$??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),b=a??0,v=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[_,g]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,g(null)},[]);o.useEffect(()=>w,[w]);const y=o.useRef(0),A=(N,B)=>{if(!Wn)return;const $=Math.round(performance.now()-y.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${$}ms ${N}`,B??"")},x=o.useRef(0),E=o.useCallback((N,B,$)=>{w();const M=++x.current,Y=()=>x.current===M;y.current=Wn?performance.now():0,A(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${N}`,{text:B,rawUrl:$}),g(N),f.current=()=>{A("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,ro()};const T=ee=>{A("\uD2BC\uB2E4",ee);const W=Xa(ee,G=>{A(`\uB05D\uB0AC\uB2E4 \u2014 ${G?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:Y()}),G&&Y()&&(f.current=null,g(null))});return f.current=()=>{A("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,W.stop(),ro()},W.done},R=Gx(B,$);A("\uCC28\uB840",R.map(ee=>ee.kind));const S=R[0]?.kind==="raw",X=S?T($):Promise.resolve(!1);(async()=>{if(await X||!Y())return;const ee=Kx(),W=S?R.slice(1):R;for(let G=0;G<W.length;G++){if(!Y())return;A(`${W[G].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const L=await W[G].resolve(Yx(ee,W.length-G));if(A(`${W[G].kind} \uAC00 \uB2F5\uD588\uB2E4`,L),!Y()||L&&(await T(L)||!Y()))return}Y()&&(A("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Zx(B),f.current=()=>{x.current++,ro()},A("\uB0AD\uB3C5\uD55C\uB2E4"),z1(B,{onEnd:()=>{Y()&&(f.current=null,g(null))}}))})()},[w]),k=o.useMemo(()=>C.map(N=>{const B=N??{},$=Xx(B)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:M,label:Y}=m(B),T=Array.isArray(B.corrects)?B.corrects:[],R=T.length?T.join(", "):B.answer!=null&&B.answer!==""?String(B.answer):null,S=typeof B.selectedText=="string"?B.selectedText:null,X=_d(B)===!0,ee=Jx(B),W=!!ee||Ux($);return{problem:$,variant:M,label:Y,answer:R,selectedText:S,isCorrect:X,sound:ee,canHear:W}}),[C,m,p]),D=o.useMemo(()=>k.some(N=>N.answer!==null||N.selectedText!==null),[k]);return n.jsx(Fn,{onClose:i,closeOnBackdrop:!1,inline:c,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:N,closeWithAnimation:B})=>n.jsxs(n.Fragment,{children:[u&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>N(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:B,disabled:u,onDisabledClick:u?()=>{}:void 0,"aria-describedby":u?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:v,total:b}),children:[n.jsx("span",{className:"trp-score__big",children:v}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:b})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((N,B)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(B+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:N.problem}),N.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:_===B?"square":"volume-2",className:"trp-row__replay",ariaLabel:_===B?p("training.result.replaySoundStop",{no:B+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:B+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>_===B?w():E(B,N.problem,N.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[N.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:N.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${N.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${N.isCorrect?"is-correct":"is-wrong"}`,children:N.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:N.variant,label:N.label,fill:"soft",minWidth:80})})]},B))]})})]})})}const Ms=new Set;function Qx(e){o.useEffect(()=>{if(!e||Ms.has(e))return;Ms.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},c=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const u=()=>{if(c(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,Pf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():u()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",u),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",u),u(),Ms.delete(e)}},[e])}function Or(e,t){return e&&e.id||`page-${t??0}`}function zr(e,t){return e&&e.key||`step-${t??0}`}function Wr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function ew(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const tw=300,nw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},zn=Object.freeze({}),wd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ls(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const aw=e=>n.jsx(xd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function rw(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:c,pageIndex:u,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:b,onRoundFinished:v,onNext:C,onSettings:f,useNoiseSetting:_=!0,children:g,ariaLabel:w,label:y,buildResults:A,onResult:x,typeKey:E,entryPoint:k,dailyTotal:D,itemRef:N,renderResultPopup:B,noiseOverride:$,hideNoiseRows:M=!1}=e;Qx(E&&!wd.has(E)?E:"");const Y=o.useRef(0);o.useEffect(()=>{Y.current=Date.now()},[]);const{t:T}=we.useTranslation(),R=x,S=!!t,X=t?.id||null,ee=t?.meta||{},W=Array.isArray(t?.pages)?t.pages:[],G=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],L=G.length>0,q=me=>me===Fr||me?.__isTrainingPage===!0,K=L&&G.some(me=>q(me.type)),z=K?G.filter(me=>q(me.type)).map((me,je)=>{const Oe=me.props||{};return{id:`children-page-${je}`,steps:o.Children.toArray(Oe.children).filter(o.isValidElement),pageTop:Oe.pageTop||Oe.top||null,pageBottom:Oe.pageBottom||Oe.bottom||null}}):[{id:"children-page-0",steps:G}],F=L&&!S&&typeof g!="function",I=F?Math.max(1,z.length):0;o.useEffect(()=>{if(!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(typeof document>"u"||!document.body)return;const me=document.body;return me.dataset.ihabTrainingPopupCount=String(Number(me.dataset.ihabTrainingPopupCount||"0")+1),me.classList.add("ihab-training-popup-open"),()=>{const je=Number(me.dataset.ihabTrainingPopupCount||"1")-1;je>0?me.dataset.ihabTrainingPopupCount=String(je):(delete me.dataset.ihabTrainingPopupCount,me.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return yv()},[]);const[P,Z]=o.useState({...la,enabled:!1}),ue=o.useRef(P);o.useEffect(()=>{ue.current=P},[P]);const U=o.useRef($),pe=o.useRef(!1),ae=o.useRef(null);o.useEffect(()=>{let me=!1;const je=Oe=>{if(me)return;pe.current=!0;const Ze=Oe?sa({...la,enabled:!1},Oe):{...la},He=ae.current;ae.current=null;const J=He?sa(Ze,He):Ze;ue.current=J,Z(J),He&&!U.current&&fo(J),mr(J);const de=U.current;if(de){const Se=typeof de=="function"?de(J):de,qe=sa(J,Se);ue.current=qe,Z(qe),mr(qe)}};return Kf().then(Oe=>{if(me){const Ze=ae.current;if(ae.current=null,Ze&&!U.current){const He=Oe?sa({...la,enabled:!1},Oe):{...la};fo(sa(He,Ze))}return}je(Oe)}),()=>{me=!0}},[]);const[V,se]=o.useState(null),[O,H]=o.useState(null),re=o.useCallback((me,je)=>{me==="main"?se(je):H(je)},[]),_e=o.useRef(null),te=o.useRef(null),ie=o.useCallback(()=>{te.current!==null&&(clearTimeout(te.current),te.current=null);const me=_e.current;_e.current=null,me&&fo(me)},[]);o.useEffect(()=>{if(typeof window>"u")return;const me=()=>{document.visibilityState==="hidden"&&ie()};return window.addEventListener("pagehide",ie),document.addEventListener("visibilitychange",me),()=>{window.removeEventListener("pagehide",ie),document.removeEventListener("visibilitychange",me),ie()}},[ie]);const Be=o.useCallback(me=>{const je=sa(ue.current,me);if(ue.current=je,Z(je),!pe.current){ae.current={...ae.current??{},...me},mr(je);return}U.current||(_e.current=je,te.current!==null&&clearTimeout(te.current),te.current=setTimeout(ie,tw)),mr(je)},[ie]),Le=P.mainSpeed,Re=P.mainVolume,he=o.useCallback(me=>Be({mainSpeed:me}),[Be]),ge=o.useCallback(me=>Be({mainVolume:me}),[Be]),Ee=o.useMemo(()=>({settings:P,setSettings:Be,registerAnalyser:re,mainAnalyser:V,noiseAnalyser:O,playbackRate:Le,setPlaybackRate:he,mainVolume:Re,setMainVolume:ge}),[P,Be,re,V,O,Le,he,Re,ge]),ve=o.useRef(null),[Fe,ze]=o.useState(0),Ct=o.useRef([]),[ut,nt]=o.useState("center"),[ct,Ae]=o.useState(!1),Ue=o.useRef(!1),ke=o.useRef(null),Ye=o.useCallback(me=>{Ue.current||(Ue.current=!0,Ae(!0),ke.current=setTimeout(()=>{try{me()}catch{Ue.current=!1,Ae(!1)}},nw()?0:kx))},[]);o.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const et=o.useRef(m);o.useEffect(()=>{et.current=m});const ft=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const me=ve.current,je=ft.current;if(_o(me,je),me){const Oe=Array.from(me.querySelectorAll(Dn)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(Oe)try{Oe.focus()}catch{}}return()=>{const Oe=document.activeElement;if(!Oe||Oe===document.body||me&&me.contains(Oe))try{xo(je)?.focus?.()}catch{}}},[]),o.useEffect(()=>ea(()=>Ye(()=>{const me=et.current;typeof me=="function"&&me()})),[Ye]),yo(ve,!0);const[vt,it]=o.useState(!1),jt=o.useRef(!1),[at,rt]=o.useState(null),At=o.useRef(0),Nt=o.useRef(0),Ot=()=>{At.current+=1,Nt.current+=1,rt(null)},[Wt,xt]=o.useState(""),[st,bt]=o.useState(()=>Wr()),dt=o.useRef(typeof u=="number"?u:null);o.useEffect(()=>{!S&&!F||(bt(Wr()),Ot())},[S,X,F]),o.useEffect(()=>{F&&bt(me=>{const je=Math.max(0,Math.min(me.pageIndex,Math.max(0,I-1)));return je!==me.pageIndex?{...me,pageIndex:je,stepIndex:0}:me})},[F,I]);const kt=F?Math.max(0,Math.min(st.pageIndex,I-1)):0,ht=F?z[kt]:null,wt=F&&ht&&Array.isArray(ht.steps)?ht.steps:[],ce=S?st.pageIndex:F?kt:typeof u=="number"?u:0,Me=S?W[Math.max(0,Math.min(st.pageIndex,Math.max(0,W.length-1)))]:null,De=S&&Me&&Array.isArray(Me.steps)?Me.steps:[],Je=S?De.length:F?wt.length:typeof d=="number"?d:0,pt=S||F?Math.max(0,Math.min(st.stepIndex,Math.max(0,Je))):typeof h=="number"?h:0,Rt=S?W.length:F?I:typeof p=="number"?p:0;o.useEffect(()=>{if(!S&&!F)return;const me=S?Or(Me,ce):ht?.id||`children-page-${ce??0}`,je=new Date().toISOString();for(let Oe=0;Oe<=pt;Oe+=1){const Ze=S?zr(De[Oe],Oe):`step-${Oe}`,He=_t(me,Ze);Ft.current.has(He)||Ft.current.set(He,je)}},[S,F,ce,pt,ht?.id]),o.useLayoutEffect(()=>{const me=dt.current;if(typeof ce=="number"&&me!==null&&ce!==me&&ce>me)try{xt(T("training.problemNotice",{n:ce+1}))}catch{}dt.current=typeof ce=="number"?ce:dt.current},[ce,u,T]),o.useLayoutEffect(()=>{const me=ve.current;if(!me)return;const je=()=>me.querySelector(".page-popup__scroll");let Oe=null,Ze=null,He=null;const J=Xe=>{const gt=je();if(!gt)return;const mt=gt.scrollHeight<=gt.clientHeight;if(nt(mt?"center":"top"),Xe&&!jt.current){jt.current=!0;try{it(!0)}catch{}try{qe.disconnect()}catch{}}},de=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>J(!0),60)})},Se=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>J(!1))};de(),window.addEventListener("resize",Se);const qe=new MutationObserver(de);qe.observe(me,{childList:!0,subtree:!0,attributes:!0});const Ge=setTimeout(()=>{jt.current||J(!0)},400);return()=>{window.removeEventListener("resize",Se),Oe!==null&&cancelAnimationFrame(Oe),Ze!==null&&clearTimeout(Ze),He!==null&&cancelAnimationFrame(He),clearTimeout(Ge);try{qe.disconnect()}catch{}}},[ve]);const Te=o.useCallback(me=>{ve.current&&(ve.current._childOnNext=me)},[]),tt=o.useCallback(me=>{ve.current&&(ve.current._childOnResult=me)},[]),Ft=o.useRef(new Map),_t=(me,je)=>`${me}\0${je}`,ne=o.useCallback((me,je,Oe)=>{bt(Ze=>{const He=Ze.answersByPage[me]||{},J=He[je],de=js(Oe),Se=js(J);if(J&&Se>de)return Ze;const qe=dd(Oe,Ft.current.get(_t(me,je)),de);return{...Ze,answersByPage:{...Ze.answersByPage,[me]:{...He,[je]:qe}}}})},[bt]),ye=o.useCallback((me,je,Oe)=>{const Ze=Or(Me,ce),He=zr(me,je);ne(Ze,He,Oe)},[Me,ce,ne]),Ie=o.useCallback((me,je,Oe)=>{const Ze=Or(Me,ce),He=zr(me,je);ne(Ze,He,Oe),!Oe?.allowChange&&me?.autoAdvance!==!1&&bt(J=>({...J,stepIndex:Math.max(J.stepIndex,je+1)}))},[Me,ce,ne,bt]),Ve=o.useCallback((me,je)=>{const Oe=ht?.id||`children-page-${ce??0}`,Ze=typeof je=="number"?je:pt??0,He=`step-${Ze}`;ne(Oe,He,me),me?.allowChange||bt(J=>({...J,stepIndex:Math.max(J.stepIndex,Ze+1)}))},[ht,ce,pt,ne,bt]),Bt=o.useCallback((me,je)=>{const Oe=ht?.id||`children-page-${ce??0}`,Ze=`step-${typeof je=="number"?je:pt??0}`;ne(Oe,Ze,me)},[ht,ce,pt,ne]),Qe=F?{currentPageIndex:ce??0,currentStepIndex:pt??0,totalStepsInPage:wt.length,handleStepDone:Ve,handleStepChange:Bt}:null,zt=async()=>{const me=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:W,flowState:st,answersByPage:st.answersByPage})):null;return typeof R=="function"&&await Promise.resolve(R(me))||me},Ht=async()=>{const me=ht?.id||`children-page-${st.pageIndex}`,je=st.answersByPage[me]||{},Oe=K?(()=>{const J={};let de=0;return z.forEach(Se=>{const qe=st.answersByPage[Se.id]||{},Ge=Array.isArray(Se.steps)?Se.steps.length:0;for(let Xe=0;Xe<Ge;Xe+=1){const gt=qe[`step-${Xe}`];typeof gt<"u"&&(J[`step-${de+Xe}`]=gt)}de+=Ge}),J})():je;if(typeof A=="function"){const J=await Promise.resolve(A(Oe,{pageAnswers:je,answersByPage:st.answersByPage,pages:z,currentPageId:me}));return typeof R=="function"&&await Promise.resolve(R(J))||J}const Ze=Object.entries(je).map(([J,de],Se)=>({index:Se,key:J,payload:de})),He={results:Ze,answers:Ze,score:0};return typeof R=="function"&&await Promise.resolve(R(He))||He},cn=()=>{const me=++At.current,je=()=>me!==At.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(S){const He=zt();rt(zn);const J=He;Promise.resolve(J).then(de=>{je()||rt(de||{isEmpty:!0})}).catch(de=>{!je()&&rt({isEmpty:!0})});return}if(F){const He=Ht();rt(zn);const J=He;Promise.resolve(J).then(de=>{je()||rt(de||{isEmpty:!0})}).catch(de=>{!je()&&rt({isEmpty:!0})});return}const Oe=ve.current&&ve.current._childOnResult,Ze=He=>{try{return He?He():void 0}catch{return}};if(typeof Oe=="function"){const He=Ze(Oe);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?rt(He):rt(He&&typeof He.then=="function"?zn:{});const J=()=>{je()||rt(de=>de===zn?{}:de)};Promise.resolve(He).then(de=>{de&&!je()?rt(de):J()}).catch(de=>{J()});return}if(typeof R=="function"){const He=Ze(R);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?rt(He):rt(He&&typeof He.then=="function"?zn:{});const J=()=>{je()||rt(de=>de===zn?{}:de)};Promise.resolve(He).then(de=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&!je()?rt(de):J()}).catch(de=>{console.error("viewResults external handler failed",de),J()});return}},Yt=()=>{if(S){if(typeof ce=="number"&&typeof Rt=="number"&&ce<Rt-1){bt(je=>({...je,pageIndex:je.pageIndex+1,stepIndex:0}));return}return cn()}if(F){const je=wt.length;if(typeof pt=="number"&&pt<je-1){bt(Oe=>({...Oe,stepIndex:Oe.stepIndex+1}));return}if(typeof ce=="number"&&typeof Rt=="number"&&ce<Rt-1){bt(Oe=>({...Oe,pageIndex:Oe.pageIndex+1,stepIndex:0}));return}return cn()}if(typeof C=="function"){try{C()}catch{}return}const me=ve.current&&ve.current._childOnNext;if(typeof me=="function"){try{me()}catch{}return}},Tt=S?ee.title||ee.label||w||T("common.popup","\uD31D\uC5C5"):a||y||(Array.isArray(s)?s[s.length-1]:void 0)||w||T("common.popup","\uD31D\uC5C5"),Jt=w||Tt,en=S?ee.title??ee.label??Tt:a??y??Tt,An=(me,je)=>{const Oe=Or(Me,ce),Ze=zr(me,je),He=st.answersByPage[Oe]?.[Ze],J=ew(me,{page:Me,pageIndex:ce,step:me,stepIndex:je,storedPayload:He,answersByPage:st.answersByPage,flowState:st}),de={key:Ze,index:je,stepIndex:pt,isLast:je===De.length-1};switch(me?.type){case"listen":return n.jsx(Es,{...de,...J,onDone:Se=>Ie(me,je,Se)});case"confirm":return n.jsx(As,{...de,...J,onDone:Se=>Ie(me,je,Se),onChange:Se=>ye(me,je,Se)});case"confirmWithText":return n.jsx(Ns,{...de,...J,onDone:Se=>Ie(me,je,Se),onChange:Se=>ye(me,je,Se)});case"orderList":return n.jsx(Ds,{...de,...J,onDone:Se=>Ie(me,je,Se),onChange:Se=>ye(me,je,Se)});default:return null}},Nn=o.useRef(void 0);o.useEffect(()=>{const me=Nn.current;if(Nn.current=ce,me===void 0||me===ce||!Nr())return;const je=ve.current;if(!je)return;const Oe=document.activeElement;if(!(!Oe||Oe===document.body||!je.contains(Oe)||Oe.disabled===!0))return;const Ze=je.querySelector(`.training-steps ${Dn.split(", ").join(", .training-steps ")}`)??Array.from(je.querySelectorAll(Dn)).find(He=>!He.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[ce]);const gn=S?W.length>0?n.jsx("div",{className:"training-steps",children:De.map((me,je)=>An(me,je))},`replay-${Fe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Pt=F?n.jsxs(hd.Provider,{value:Qe,children:[ht?.pageTop?n.jsx("div",{className:"training-page-top",children:ht.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((me,je)=>{const Oe=me;return o.cloneElement(Oe,{...Oe.props,_stepIndex:je,_totalSteps:wt.length,_stepKey:`step-${je}`,_pageIndex:ce})})},`replay-${Fe}`),ht?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:ht.pageBottom}):null]}):null,St=o.useRef(-1),Mt=o.useCallback(()=>{if(!E)return;const me=at,{results:je,correct:Oe,total:Ze}=Ls(at),He={correct:Oe,total:Ze,attempt:Ct.current.length+1,previousAttempts:[...Ct.current]};if(St.current===Nt.current)return He;St.current=Nt.current,Ff({items:Gf(je),category:wd.has(E)?"sentence":"word",trainingType:E,entryPoint:k??"sentence",itemRef:N??null,correct:Oe,total:Ze,score:typeof me?.score=="number"?me.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-Y.current)/1e3)),dailyTotal:D??null});try{v?.(He)}catch{}return He},[E,k,D,N,at,v]);o.useEffect(()=>{!at||at===zn||at?.isEmpty||(Ls(at).total??0)>0&&Mt()},[at,Mt]);const Gt=o.useCallback(()=>{const me=Mt();Ot(),Ye(()=>{typeof b=="function"&&b(me),typeof m=="function"&&m()})},[b,m,Mt,rt,Ye]),dn=o.useCallback(()=>xt(""),[xt]),yn=o.useCallback(()=>{Ye(()=>{typeof m=="function"&&m()})},[m,Ye]),Vt=n.jsxs("div",{className:`page-popup${ct?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Jt,children:[n.jsxs("div",{ref:ve,className:`page-popup__panel ${vt?"":"page-popup__panel--measuring"} ${ut==="center"?"page-popup__panel--center":ut==="top"?"page-popup__panel--top":""}`,children:[n.jsx(id,{title:en,subtitle:S?ee.subtitle||ee.label:Array.isArray(s)?s.join(" / "):void 0,desc:S?void 0:r,depth:S?ee.depth:s,icon:S?ee.icon:l,wrapperStyle:S?ee.wrapperStyle:i,iconTooltip:S?ee.iconTooltip:c,progressMax:Rt,progressIndex:ce,pageIndex:ce,pageCount:Rt,onBack:yn,onClose:yn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ut==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:F?Pt:S?gn:typeof g=="function"?g({registerOnNext:Te,registerOnResult:tt,panelRef:ve,setResultOverlay:rt}):g})}),n.jsx(ld,{onSettings:f,onNext:Yt,onResult:cn,useNoiseSettingBtn:!!(S?ee.useNoiseSetting??!0:_),stepIndex:pt,stepCount:Je,pageIndex:ce,pageCount:Rt,resultOpen:!!(at&&!at.isEmpty),hideNoiseRows:M})]}),at&&!at.isEmpty&&(B??aw)({score:at.score,results:at.results||at.answers||[],contextsLength:at.results?at.results.length:at.answers?at.answers.length:0,onReplay:()=>{if(Y.current=Date.now(),at!==zn){const{correct:me,total:je}=Ls(at);Ct.current.push({correct:me,total:je})}if(Ot(),ze(me=>me+1),S){if(bt(Wr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(F){bt(Wr());return}try{const me=ve.current&&ve.current._childOnResult;typeof me=="function"&&me({replay:!0})}catch{}},onClose:Gt,pending:at===zn}),at?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:Gt,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(wa,{message:Wt,position:"top",onClose:dn})]}),En=n.jsx(vs.Provider,{value:Ee,children:Vt});return typeof document<"u"&&document.body?hn.createPortal(En,document.body):En}const Zn=rw;Zn.Page=Fr,Zn.ListenStep=md,Zn.ConfirmStep=Cd,Zn.ConfirmWithTextStep=fd,Zn.OrderListStep=bd,Zn.CardStep=gd,Zn.CardOrderStep=Wx;function ow({label:e,homonum:t}){const a=ma()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:c}=as(a);return l?n.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:le("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:c})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Bd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,c=window.innerWidth;let u=t.left+t.width/2-l/2,p=t.top-i-8;p<8&&(p=t.bottom+8),u=Math.max(8,Math.min(u,c-l-8)),s({left:u,top:p})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:le("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>n.jsx(ow,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function sw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:c,maxSelect:u,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:b,showEmptyText:v=!0,sectionType:C="page",disc:f}){const{t:_,i18n:g}=we.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:y,openAt:A,close:x}=_r(),[E,k]=o.useState(null),D=o.useCallback(()=>{x(),k(null)},[x]);Yy(D,!!E);const N=(r??"").trim(),B=/^[^,[\]\s]+$/.test(N)?N:"",$=B.length>0,M=r===void 0&&t===void 0,Y=$?"match":M?"original":"ganada",[T,R]=o.useState(()=>Y),[S,X]=o.useState("50"),[ee,W]=o.useState(1),[G,L]=o.useState($);G!==$&&(L($),R(Y));const q=T==="match"&&!$||T==="original"&&!M?Y:T,K=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...M?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,M]),z=o.useMemo(()=>["10","25","50","100"].map(he=>({value:he,label:_("wordSearch.pageSize",{count:Number(he),defaultValue:`${he}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),F=he=>he.words?.[0],I=o.useMemo(()=>{const he=[...B].length,ge=vf(B),Ee=new Map;return ve=>{let Fe=Ee.get(ve);return Fe===void 0&&(Fe=ge((ve.words?.[0]?.label??"").slice(0,he))?0:1,Ee.set(ve,Fe)),Fe}},[B]),P=o.useCallback((he,ge)=>{const Ee=ze=>F(ze)?.label??"",ve=ze=>F(ze)?.syllables??[...Ee(ze)].length,Fe=ze=>(ze.words??[]).reduce((Ct,ut)=>{const nt=parseInt(ut.grade??"",10);return Number.isFinite(nt)&&nt<Ct?nt:Ct},999);switch(q){case"match":return I(he)-I(ge)||fn(Ee(he),Ee(ge));case"ganada":return fn(Ee(he),Ee(ge));case"ganada_desc":return fn(Ee(ge),Ee(he));case"syllable":return ve(he)-ve(ge)||fn(Ee(he),Ee(ge));case"syllable_desc":return ve(ge)-ve(he)||fn(Ee(he),Ee(ge));case"grade":return Fe(he)-Fe(ge)||fn(Ee(he),Ee(ge));case"grade_desc":return Fe(ge)-Fe(he)||fn(Ee(he),Ee(ge));default:return 0}},[q,I]),Z=o.useMemo(()=>s.slice().sort(P),[s,P]),ue=Number(S)||10,U=o.useMemo(()=>(l??[]).flatMap(he=>he.items.slice().sort(P).map(ge=>({item:ge,label:he.label}))),[l,P]),pe=l?U.length:Z.length,ae=Math.max(1,Math.ceil(pe/ue)),V=Math.min(ee,ae),se=o.useMemo(()=>Z.slice((V-1)*ue,V*ue),[Z,V,ue]),O=o.useId(),H=o.useMemo(()=>{if(!l)return null;const he=U.slice((V-1)*ue,V*ue),ge=new Map;for(const{item:Ee,label:ve}of he)ge.has(ve)||ge.set(ve,[]),ge.get(ve).push(Ee);return[...ge.entries()].map(([Ee,ve])=>({label:Ee,items:ve}))},[l,U,V,ue]);o.useEffect(()=>{W(1)},[T,S,pe,r]);const re=pe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(xn,{size:Lt,options:K,value:q,onChange:R,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(xn,{size:Lt,options:z,value:S,onChange:X,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Ho,{page:V,totalPages:ae,onChange:W})]}):void 0,_e=he=>{c&&c(he)},te=t!==void 0&&a?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:w?jf(a):a})]}):void 0,ie=t!==void 0&&t>0&&u!==void 0&&a?_("wordSearch.resultDisc",{unit:w?Mf(a):a,max:u,selected:i.length}):void 0,Be=f??ie,Le=l?l.length===0:s.length===0,Re=Le&&!v&&!b;return n.jsxs(Ba,{type:C,className:Ne("word-search-result-block",m),children:[n.jsxs("div",{className:Ne("word-search-result-block__inner",Re&&"word-search-result-block__inner--head-only"),children:[(te||re||Be)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(ot,{icon:e,className:"word-search-result-block__head-icon"}),te&&n.jsx("span",{className:"word-search-result-block__title h3",children:te})]}),re&&n.jsx("div",{className:"word-search-result-block__head-actions",children:re}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),Le&&(v||b)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[v&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),l?(H??[]).map(he=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${O}-${he.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${O}-${he.label}`,children:he.label}),n.jsx("div",{className:"word-search-result-block__items",children:he.items.map(ge=>{const Ee=i.includes(ge.id);return n.jsx("div",{onMouseEnter:ve=>{A(ve.currentTarget),k(ge.words??[])},onMouseLeave:D,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ge.words??[]).map(ve=>ve.label),subLabel:(ge.words??[]).some(ve=>ve.subLabel)?(ge.words??[]).map(ve=>ve.subLabel):void 0,selected:Ee,onClick:()=>_e(ge.id),minWidth:200})},ge.id)})})]},he.label)):n.jsx("div",{className:"word-search-result-block__items",children:se.map(he=>{const ge=i.includes(he.id);return n.jsx("div",{onMouseEnter:Ee=>{A(Ee.currentTarget),k(he.words??[])},onMouseLeave:D,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(he.words??[]).map(Ee=>Ee.label),subLabel:(he.words??[]).some(Ee=>Ee.subLabel)?(he.words??[]).map(Ee=>Ee.subLabel):void 0,selected:ge,onClick:()=>_e(he.id),minWidth:200})},he.id)})}),E&&y&&n.jsx(Bd,{words:E,anchorRect:y})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function lw(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function iw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:c,onSelect:u,placeholder:p="-",className:h,title:d,titleIcon:m,disc:b,showInfoButton:v=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:_,searchDisabled:g=!1,searchLabel:w,searchChecking:y=!1,pairMode:A=!1,sectionType:x="page",beforeSearchContent:E,beforeContent:k,afterContent:D,hideCountControl:N=!1,ordinal:B=!1}){const{t:$}=we.useTranslation(),M=o.useMemo(()=>$("wordPairs.infoNotes",{returnObjects:!0}),[$]),Y=o.useMemo(()=>Array.from({length:s-l+1},(F,I)=>{const P=l+I;return{key:String(P),label:$("wordPairs.count",{n:P})}}),[$,s,l]),T=o.useMemo(()=>$("wordPairs.ordinals",{returnObjects:!0}),[$]),R=o.useCallback(F=>B?$("wordPairs.phonemeOrdinalLabel",{ordinal:T[F-1]??F}):a===1?$("wordPairs.phonemeSingleLabel","\uC74C\uC808"):$("wordPairs.phonemeN",{n:F}),[B,T,a,$]),S=o.useCallback(F=>B?$("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[F-1]??F}):a===1?$("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):$("wordPairs.phonemeContrast",{n:F}),[B,T,a,$]),X=o.useCallback((F,I)=>I?n.jsxs(n.Fragment,{children:[F,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):F,[]),{anchorRect:ee,toggleAt:W,close:G}=_r(),L=o.useCallback(F=>r(Number(F)),[r]),q=vn("(max-width: 767px)"),K=o.useCallback(F=>lw(F,e).map(({label:I,value:P,displayLabel:Z})=>{const ue=!!P&&P!=="\uC5C6\uC74C";return n.jsxs("span",{className:Ne("phoneme-select-block__cell-jamo-part",P?"":"phoneme-select-block__cell-jamo-part--empty",ue?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${P==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:P==="\uC5C6\uC74C"?"x":P||p}),ue&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:Z??I})]},I)}),[e,p]),z=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:ee?"is-selected":void 0,"aria-expanded":!!ee,"aria-haspopup":"dialog",onClick:F=>W(F.currentTarget)})}),ee&&n.jsx(Un,{title:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:M,anchorRect:ee,onClose:G})]});return n.jsxs(Ba,{type:x,title:d,icon:m,disc:b,action:v?z:void 0,className:Ne("phoneme-select-block",h),children:[k,!N&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(_n,{options:Y,value:String(a),onChange:L,size:40,ariaLabel:$("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:A?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((F,I)=>{const P=t[I*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:K(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:R(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:$("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((F,I)=>{const P=t[I*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:K(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:S(I+1)})]},I)})})]}):t.map((F,I)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:K(F)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:R(I+1)})]},I))}),(i||c)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:A?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((F,I)=>{const P=t[I*2]??{};return n.jsx(On,{title:X(R(I+1),I===0),sections:c?c(P,I*2):i,selected:P,onSelect:u?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((F,I)=>{const P=t[I*2+1]??{};return n.jsx(On,{title:S(I+1),sections:c?c(P,I*2+1):i,selected:P,onSelect:u?.(I*2+1),align:"newline"},I)})})]}):t.map((F,I)=>n.jsx(On,{title:X(R(I+1),I===0),sections:c?c(F,I):i,selected:F,onSelect:u?.(I),align:"newline"},I))})}),E&&n.jsx("div",{className:"phoneme-select-block__before-search",children:E}),(C||f||y)&&(()=>{const F=t.every(I=>{const P=ff(I);return Object.entries(P).every(([Z,ue])=>!ue||Z==="coda"&&ue===Il)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:F?_:void 0,children:[C&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:$("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:F,onClick:F?void 0:C}),f?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:y?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:F||g||y,onDisabledClick:y?()=>{}:void 0,"aria-busy":y||void 0,onClick:f}):y?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function uw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,headerAction:p,className:h}){const{t:d}=we.useTranslation();return n.jsx(On,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,headerAction:p,align:"inline"})}function cw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=we.useTranslation();return a.length===0?null:n.jsx(On,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function dw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:c,onInputModeChange:u,className:p}){const{t:h}=we.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=f=>h("wordPairs.count",{n:f}),b=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(Ya,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(Ya,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(Ya,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],v={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:r==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:c==="phoneme"?d.pronInput:d.charInput},C=(f,_)=>{_===d.searchMode?a(f===d.explicit?"explicit":f===d.pick?"pick":"include"):_===d.phonemeOrder?s(f===d.orderMatch?"ordered":"unordered"):_===d.count?i(f===m(2)?2:1):_===d.inputMode&&u(f===d.pronInput?"phoneme":"word")};return n.jsx(On,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:v,onSelect:C,align:"inline"})}function pw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:c,searchFn:u,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:b,onClose:v,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:_,noMatchText:g,countLabel:w,topContent:y,className:A=""}=e,{t:x}=we.useTranslation(),E=c??x("common.search","\uAC80\uC0C9"),k=_??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=g??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[N,B]=o.useState(""),[$,M]=o.useState(p??r[0]?.key??""),[Y,T]=o.useState(h),[R,S]=o.useState(String(f??C[0]??10)),[X,ee]=o.useState(1);o.useEffect(()=>{ee(1)},[N,R]);const W=u!==null,G=o.useCallback((U,pe)=>{if(!pe)return!0;const ae=pe.toLowerCase();return r.some(V=>{const se=U[V.key];return se==null?!1:String(se).toLowerCase().includes(ae)})},[r]),L=u??G,q=o.useMemo(()=>{const U=W?a.filter(pe=>L(pe,N)):a;return $?[...U].sort((pe,ae)=>{const V=pe[$],se=ae[$];return V===se?0:vr(V,se,Y)}):U},[a,N,$,Y,W,L]),K=Math.max(1,Math.ceil(q.length/Number(R)));X>K&&ee(K);const z=Math.min(X,K),F=q.slice((z-1)*Number(R),z*Number(R)),I=o.useCallback(U=>{$===U?T(pe=>!pe):(M(U),T(!0)),ee(1)},[$]),P=o.useMemo(()=>{if(typeof w=="function"){const U=q.length,pe=w(U);if(typeof pe=="string"){const ae=pe.lastIndexOf(String(U));if(ae>=0)return{prefix:pe.slice(0,ae),suffix:pe.slice(ae+String(U).length)}}return{label:pe}}if(typeof w=="string"&&w.includes("{n}")){const[U,pe]=w.split("{n}");return{prefix:U,suffix:pe}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[w,q.length,x]),Z=o.useMemo(()=>r.map(U=>({label:U.label,onClick:U.sortable!==!1?()=>I(U.key):void 0,className:U.className,sortDir:U.sortable!==!1&&$===U.key?Y?"asc":"desc":null})),[r,$,Y,I]),ue=o.useMemo(()=>C.map(U=>({value:String(U),label:x("common.pageSizeLabel",{n:U})})),[C,x]);return n.jsxs(Fn,{className:`popup-list ${A}`,title:t,onClose:v,children:[y,"label"in P&&n.jsx("p",{className:"toolbar__count body-1",children:P.label}),n.jsx(Vo,{count:"label"in P?void 0:{value:q.length,prefix:P.prefix,suffix:P.suffix},search:W?{value:N,onChange:B,placeholder:E}:void 0,pageSize:{options:ue,value:R,onChange:S},pagination:{page:z,total:K,onChange:ee}}),n.jsx(ts,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:Z,items:F,onRowClick:b,renderRow:U=>{const pe=m!=null?U.id!=null&&m.has(U.id):d!=null&&U.id===d;return r.map(ae=>({content:ae.render?ae.render(U):U[ae.key]??"",className:Ne(ae.className,pe&&"popup-list__row--selected")}))},empty:W&&N!==""&&a.length>0?D:k})]})}function kd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:c,hideCancel:u=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:m,closeOnConfirm:b=!0,onClose:v,inline:C,size:f="small",className:_,initialFocus:g="close"}=e,{t:w}=we.useTranslation(),y=o.useRef(null);o.useEffect(()=>{if(C||g==="close")return;const N=y.current?.closest(".popup-panel"),B=Array.from(N?.querySelectorAll(".popup-footer--buttons button")??[]),$=g==="confirm"?B[B.length-1]:u?void 0:B[p?1:0];$&&!$.disabled&&$.focus()},[]);const A=o.useRef(!1),[x,E]=o.useState(!1),k=N=>{let B=!1;return{close:()=>{B=!0,N()},didClose:()=>B}},D=async N=>{if(A.current)return;A.current=!0;const B=typeof document<"u"?document.activeElement:null;E(!0);let $=!1;try{$=await N()}catch(M){typeof console<"u"&&console.error(M)}finally{$||(A.current=!1,E(!1),requestAnimationFrame(()=>{const M=document.activeElement;(!M||M===document.body)&&B?.isConnected&&B.focus()}))}};return n.jsxs(Fn,{title:t,onClose:v,closeDisabled:x,inline:C,size:f,className:Ne("confirm-popup",r!=null&&"confirm-popup--has-top",_),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||x,onClick:async({closeWithAnimation:N})=>{await D(async()=>{const B=k(N);await p.onClick(B.close);const $=p.closeOnClick??!0;return $&&N(),$||B.didClose()})}}]:[],...u?[]:[{label:c??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:N})=>N()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:d||x,onClick:async({closeWithAnimation:N})=>{await D(async()=>{const B=k(N);return await m(B.close),b&&N(),b||B.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(tr,{children:s.map((N,B)=>n.jsx(un,{label:N.label,children:n.jsx("span",{className:"panel-row__text body-2",children:N.value})},B))}),n.jsx("p",{ref:y,className:"body-2 confirm-popup__message",children:a}),l]})}function hw(e,t,a={}){const{t:r}=we.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),c=o.useCallback(()=>{i.current=!0},[]),u=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(kd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:u,discardPopup:p,allowClose:c}}function mw({onApply:e,onCancel:t}){const{t:a}=we.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[c,u]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async v=>{const C=r.trim();if(C){i(!0),u(null);try{await e(C),v()}catch(f){u(Hl(f)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[r,e]),m=o.useCallback((v,C)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&d(C)},[d]),b=v=>{s(v.target.value),u(null)};return n.jsx(Fn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:v})=>v()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:v})=>{d(v)}}],children:({closeWithAnimation:v})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":c?!0:void 0,"aria-errormessage":c?h:void 0,"aria-describedby":c?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:C=>m(C,v),disabled:l,autoComplete:"off",spellCheck:!1}),c&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:c})]})})}const Ad=["var(--color-main)","var(--color-sub)"],Cw=2e3;function fw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function $s({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),f=t-C,_=(g,w)=>Array.from({length:g}).map((y,A)=>{const x=6+Math.random()*12,E=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),k=Ad[Math.floor(Math.random()*Ad.length)],D=Math.random()*300,N=(360+Math.random()*260)*r*1.2,B=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,$=Math.cos(B)*N,M=Math.sin(B)*N*1.35,Y=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),R=Math.random()>.7?"50%":"3px";return{id:`${w}-${A}`,side:w,size:E,color:k,delay:D,vx:$,vy:M,angularVel:Y,life:T,borderRadius:R}});return[..._(C,"left"),..._(f,"right")]},[t,r]),c=o.useRef(null),u=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),b=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const G=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(G)}const C=1200,f=performance.now(),_=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),w=G=>Math.max(40,(G||window.innerWidth)*.02),y=_?.width||window.innerWidth||375,A=_?.height||window.innerHeight||812,x=G=>{const L=[...G].sort((q,K)=>q-K);return L[Math.floor(L.length/2)]||1},E=x(i.map(G=>Math.abs(G.vy))),k=x(i.map(G=>Math.abs(G.vx))),D=Math.sqrt(2*C*(A*.72+g))/E,N=E*D/C,B=y*.5/(k*N),$=(G,L,q)=>Math.min(q,Math.max(L,G)),M=$(D,.8,2.4),Y=$(B,.7,2.2),T=a>0?a/Cw:1,R=i.map(G=>({...G,life:G.life*T,vx:G.vx*Y,vy:G.vy*M,startTime:f+G.delay,ended:!1})),S=_?{x:_.left-w(_.width),y:_.top+_.height+g}:{x:-w(window.innerWidth),y:window.innerHeight+g},X=_?{x:_.left+_.width+w(_.width),y:_.top+_.height+g}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+g},ee=G=>{let L=!1;for(const q of R){const K=u.current[q.id];if(!K||!K)continue;if(G<q.startTime){K.style.display="none",L=!0;continue}if(!q._inited){const V=q.side==="left"?S.x:X.x,se=q.side==="left"?S.y:X.y;K.style.left=`${V}px`,K.style.top=`${se}px`,K.style.transform="translate3d(0px, 0px, 0)",K.style.display="block",K.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(K.style.background=fw(K,q.color)??"#FF0060"),q._inited=!0}const z=(G-q.startTime)/1e3;if(z<0)continue;const F=q.life/1e3;if(z>=F){K.style.opacity="0",K.style.display="none",q.ended=!0;continue}L=!0;const I=q.side==="left"?S.x:X.x,P=q.side==="left"?S.y:X.y,Z=I+q.vx*z,ue=P+q.vy*z+.5*C*z*z,U=(q.angularVel||0)*z,pe=Z-I,ae=ue-P;K.style.transform=`translate3d(${pe}px, ${ae}px, 0) rotate(${U}deg)`,K.style.opacity=`${Math.max(0,1-z/F)}`}L?p.current=requestAnimationFrame(ee):h.current?.()};p.current=requestAnimationFrame(ee);const W=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const G=document.createElement("div");G.className="party-container",G.style.position="fixed",G.style.inset="0",G.style.pointerEvents="none",G.style.overflow="visible",G.style.zIndex="2147483647";for(const L of i){const q=document.createElement("span");q.className=`confetti confetti--${L.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${L.size}px`,q.style.height=`${Math.max(4,L.size*.6)}px`,q.style.background=L.color,q.style.borderRadius=L.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",G.appendChild(q),u.current[L.id]=q}(document.body||m.current).appendChild(G),d.current=G}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(W),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,a,l,i]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:c,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:f=>{u.current[C.id]=f},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?hn.createPortal(v,m.current||document.body):v}const Rs=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function bw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const c=i.detail??{};r(u=>({n:(u?.n??0)+1,count:Rs(c.count),strength:Rs(c.strength),duration:Rs(c.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx($s,{active:t,trigger:e}),a&&n.jsx($s,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function gw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:c,backLabel:u,wrap:p=!1}){const{t:h}=we.useTranslation();$y(typeof e=="string"?e:i??null);const d=u??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[c&&n.jsx(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:c}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(ln,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function yw(e){return e??""}const Nd=o.createContext({words:[],loading:!1});function vw(){return o.useContext(Nd)}function _w({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:c,checkRemoteVersion:u,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:c,checkRemoteVersion:u}),[e,t,a,r,s,l,i,c,u]);return n.jsx(Nd.Provider,{value:h,children:p})}function xw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:Ne("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((c,u)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:c.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof c.value=="string"||typeof c.value=="number"?String(c.value):void 0,children:c.value})]},u))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const ww=(e,t)=>`${e} / ${t}`;function Bw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=ww,pageWidth:l,pageHeight:i,margin:c,className:u,style:p}){const{t:h}=we.useTranslation(),d=o.useRef(null),m=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,f]=o.useState(null),[_,g]=o.useState(!1);o.useEffect(()=>{const T=d.current;if(!T)return;const R=()=>g(T.scrollWidth>T.clientWidth+1);if(R(),typeof ResizeObserver>"u")return;const S=new ResizeObserver(R);return S.observe(T),()=>S.disconnect()},[C]);const w=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),y=C&&C.shape===w?C.pages:null,[A,x]=o.useState(0);o.useEffect(()=>{const T=v.current;if(!T||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>x(T.offsetHeight));return R.observe(T),()=>R.disconnect()},[]);const[E,k]=o.useState(0);o.useEffect(()=>{const T=m.current;if(!T||typeof ResizeObserver>"u")return;let R=null;const S=typeof requestAnimationFrame=="function"?W=>requestAnimationFrame(W):W=>setTimeout(W,16),X=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:W=>clearTimeout(W),ee=new ResizeObserver(()=>{R==null&&(R=S(()=>{R=null,k(W=>W+1)}))});return Array.from(T.children).forEach(W=>ee.observe(W)),()=>{ee.disconnect(),R!=null&&X(R)}},[w]),o.useLayoutEffect(()=>{const T=m.current,R=v.current;if(!T||!R)return;const S=F=>F.getBoundingClientRect().height||F.offsetHeight,X=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(F=>{X.set(F.dataset.chromeSection??"",S(F))});const ee=F=>S(R)-(X.get(F??"")??0),W=Array.from(T.children).map(F=>S(F)),G=[];e.forEach((F,I)=>{const P=G[G.length-1],Z=P?e[P[0]]:void 0;Z&&F.group!=null&&Z.group===F.group&&Z.section===F.section?P.push(I):G.push([I])});const L=[];let q=[],K=0;const z=()=>{q.length&&L.push(q),q=[],K=0};G.forEach(F=>{const I=F.reduce((Z,ue)=>Z+W[ue],0),P=ee(e[F[0]].section);q.length&&e[q[0]].section!==e[F[0]].section&&z(),I>P?F.forEach(Z=>{q.length&&K+W[Z]>P+.01&&z(),q.push(Z),K+=W[Z]}):(q.length&&K+I>P+.01&&z(),F.forEach(Z=>q.push(Z)),K+=I)}),z(),f(F=>F&&F.shape===w&&JSON.stringify(F.pages)===JSON.stringify(L)?F:{shape:w,pages:L})},[w,A,l,i,c,E]);const D=Po,N=D,B=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:N,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),$=(T,R,S)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:S!=null&&t?.[S]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:B}),n.jsx("span",{className:"report-doc__page-no",children:s(T,R)})]})}),M=Array.from(new Set(e.map(T=>T.section??""))),Y={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...c?{"--report-margin":c}:null,...p};return n.jsxs("div",{ref:d,className:Ne("report-doc",u),style:Y,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:v,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:M.map(T=>{const R=$(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[R.header,R.footer]},T)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),y&&n.jsx("div",{className:"report-doc__pages",children:y.map((T,R)=>{const{header:S,footer:X}=$(R+1,y.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[S,T.map(ee=>n.jsx("div",{children:e[ee].content},e[ee].id)),X]},R)})})]})}function kw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:Ne("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ca=new Map;let Hr=null;const Aw=12;function Nw(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Vr(){const e=new Map;for(const t of ca.keys()){if(!t.isConnected)continue;const a=Nw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+Aw)}}}function Ew(e){return typeof window>"u"?()=>{}:(ca.set(e,(ca.get(e)??0)+1),ca.get(e)===1&&typeof ResizeObserver<"u"&&(Hr??(Hr=new ResizeObserver(()=>Vr())),Hr.observe(e)),Vr(),()=>{const t=(ca.get(e)??1)-1;if(t>0){ca.set(e,t),Vr();return}ca.delete(e),Hr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Vr()})}function Dw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:c}=we.useTranslation(),u=a??c("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,b=m?Ew(m):null;return()=>{b?.(),h.current&&d&&d.contains(document.activeElement)&&fr(d)}},[]),n.jsxs("div",{ref:p,className:Ne("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Ks,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:u})]})}function Sw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:c,onClick:u,draggable:p,onDragStart:h,onDragEnd:d,className:m}){const b=t?`h${t}`:"div",v=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(_=>{u&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),u())},[u]);return n.jsxs("div",{className:Ne("training-card",u?"training-card--clickable":"",m),onClick:u,onKeyDown:u?f:void 0,role:u?"button":void 0,"aria-label":u?c??(typeof e=="string"?e:void 0):void 0,tabIndex:u?0:void 0,draggable:p,onDragStart:h,onDragEnd:d,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:_=>_.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),v&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function jw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:c,empty:u=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:b,children:v,className:C}){const{t:f}=we.useTranslation(),_=o.useId(),g=t?`h${t}`:"span",w=s!=null,y=Ne("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:y,onDragOver:d,onDragLeave:m,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?_:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(g,{id:_,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||c!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:A=>A.stopPropagation(),children:[l,i&&n.jsx(xn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("common.sortFor",{name:e}):void 0}),c]})]}),!r&&(u?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:v}))]})}const Tw="speechear:saved_word_tables";function Mw(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function Lw(){try{const e=localStorage.getItem(Tw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Mw):[]}catch{return[]}}function Ed(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function Ps(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function $w(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Rw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:c,filterHeaderSummary:u,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:b,maxItemsPerPage:v,items:C,onSaveComplete:f,onLoad:_,onRemoveItem:g,onCopyItem:w,onReplaceItem:y,onPickForm:A,onReset:x,resetLabel:E,saveButtonLabel:k,secondarySaveButtonLabel:D,onReorder:N,showCellCount:B,onAddItem:$,className:M,renderSavePopup:Y,renderWordSearch:T,hideControls:R,saveOnly:S,tableName:X,nameValue:ee,onNameChange:W,descriptionValue:G,onDescriptionChange:L,namePlaceholder:q,descriptionPlaceholder:K,existingNames:z,editingName:F,onCancel:I,initialItemsPerPage:P,renderCellAction:Z,actionsLeftExtra:ue}){const{t:U}=we.useTranslation(),pe=E??U("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),ae=C===void 0,V=!!W,[se,O]=o.useState([]),H=(ee??"").trim(),re=H||(q??"").trim(),_e=(G??"").trim()||(K??"").trim(),te=(z??[]).map(xe=>xe.trim().toLowerCase()),ie=[F?.trim().toLowerCase(),...se].filter(xe=>!!xe),Be=[...te];for(const xe of ie){const Pe=Be.indexOf(xe);Pe!==-1&&Be.splice(Pe,1)}const Le=H!==""&&Be.includes(H.toLowerCase()),[Re,he]=o.useState(Array(4).fill(null)),[ge,Ee]=o.useState(4),[ve,Fe]=o.useState(null),ze=Re.slice(0,ge),Ct=!!p?.show,[ut,nt]=o.useState(!0),[ct,Ae]=o.useState(!0),Ue=p&&{...p,top:ut,bottom:ct},[ke,Ye]=o.useState("landscape"),[et,ft]=o.useState([...wc]),[vt,it]=o.useState("show"),[jt,at]=o.useState(!0),[rt,At]=o.useState(!0),Nt=o.useRef(null),Ot=o.useRef([]),[Wt,xt]=o.useState(P==="all"?Number.POSITIVE_INFINITY:P??8),[st,bt]=o.useState("right"),[dt,kt]=o.useState(!1),[ht,wt]=o.useState(!1),{toastMessage:ce,toastType:Me,showWarning:De,clearToast:Je}=Zi("warning"),pt=o.useCallback(()=>Fe(null),[Fe]);d&&ae&&Dt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[Rt,Te]=o.useState(()=>Math.max(C?.length??1,1)),tt=Math.max(b??0,C?.length??0,1),Ft=b!=null||!!B,_t=ae?ge:B?Math.max(Rt,C?.length??1,1):tt,{width:ne,height:ye}=oa[ke],Ie=!ae&&!B,Ve=Math.max(1,Math.min(tt,v??tt)),Bt=Math.min(Wt,Ve),Qe=Ie?Bt:_t,zt=Math.ceil((C?.length??0)/Math.max(1,Qe)),Ht=(C?.length??0)<tt?Math.floor((C?.length??0)/Math.max(1,Qe))+1:0,cn=Ie?Math.max(1,zt,Ht):0,Yt=Ie?Array.from({length:cn},(xe,Pe)=>(C??[]).slice(Pe*Qe,(Pe+1)*Qe)):null,Tt=!!Yt&&Yt.length>1,Jt=ae?ze.some(xe=>xe!==null&&xe.length>1):(C??[]).some(xe=>(xe.words??[]).length>1),en=X?.trim()||`${Jl(za())} ${Jt?U("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):U("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,An=o.useCallback(()=>Tt?Ot.current.filter(xe=>xe!==null):Nt.current?[Nt.current]:[],[Tt]),{print:Nn,openNewWindow:gn,downloadHtml:Pt}=Cs({getElements:An,paperW:ne,paperH:ye,fileName:en,onPopupBlocked:()=>{De(U("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),St=xe=>{Ee(xe),he(Pe=>Pe.length>=xe?Pe:[...Pe,...Array(xe-Pe.length).fill(null)]),Fe(null)},Mt=xe=>{he(Pe=>{const lt=[...Pe];return lt[xe]=null,lt}),ve===xe&&Fe(null)},Gt=xe=>{if(ve===null)return;const Pe=ve;he(Et=>{const pn=[...Et];return pn[Pe]=xe.length>0?xe:null,pn});const lt=ze.findIndex((Et,pn)=>pn>Pe&&Et===null);Fe(lt!==-1?lt:null)},dn=ae?ze.some(xe=>xe?.some(Pe=>!!Pe.colloquialPronunciation)):(C??[]).some(xe=>(xe.words??[]).some(Pe=>!!Pe.colloquialLabel)),yn=!ae&&Bc([...d?[d]:[],...C??[]]),Vt=o.useMemo(()=>ma()?ae?Re.slice(0,ge).flatMap(xe=>(xe??[]).map(Pe=>[Pe.word,Pe.homonum])):(xe=>xe.flatMap(Pe=>(Pe.words??[]).map(lt=>[lt.label,lt.homonum])))([...d?[d]:[],...C??[]]):[],[ae,Re,ge,C,d]),[En,me]=o.useState(!1);o.useEffect(()=>{if(Vt.length===0)return;let xe=!1;return Promise.all(Vt.map(([Pe,lt])=>$l(Pe,lt))).then(Pe=>{xe||me(Pe.some(Boolean))},()=>{}),()=>{xe=!0}},[Vt]);const je=Vt.length>0&&En,Oe=o.useMemo(()=>[...ae||B?[{label:U("wordTable.filter.columns","\uCE78 \uC218"),items:e_.map(xe=>({value:`${xe}\uCE78`,displayLabel:U("wordTable.filter.column",{count:xe})})),display:"segmented"}]:[],...Ie&&(C?.length??0)>0?[Tc(U,{hasPairs:Jt,itemCount:tt,max:v})]:[],...Tt?[n_(U)]:[]],[U,ae,B,Ie,C?.length,Jt,tt,v,Tt]),Ze={...ae||B?{[U("wordTable.filter.columns","\uCE78 \uC218")]:`${_t}\uCE78`}:{},...Ie&&(C?.length??0)>0?{[U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Bt}\uAC1C`}:{},...Tt?{[U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:st}:{}},He=(xe,Pe)=>{Pe===U("wordTable.filter.columns","\uCE78 \uC218")?ae?St(parseInt(xe)):Te(parseInt(xe)):Pe===U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Mc(parseInt(xe),tt)):Pe===U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&bt(Lc(xe))},J=ae?$w(ze.filter(xe=>xe!==null&&xe.length>0).map(xe=>({id:Ps(xe),words:xe.map(Ed)}))):C??[],de=()=>{ae&&he(xe=>xe.length>ge?xe.slice(0,ge):xe)},Se=(xe=!1)=>{if(wt(xe),V&&f){const Pe=re.trim().toLowerCase();Pe&&O(lt=>lt.includes(Pe)?lt:[...lt,Pe]),f(re,J,_e||void 0,xe),de();return}if(S&&f){f("",J,void 0,xe),de();return}if(f){kt(!0);return}Pt()},[qe,Ge]=o.useState(!1),[Xe,gt]=o.useState(""),mt=Xe.trim(),be=mt!==""&&te.includes(mt.toLowerCase()),j=()=>{gt(re?U("wordTable.save.copyName",{name:re,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ge(!0)},Q=()=>{!mt||be||!f||(f(mt,J,_e||void 0,!0),de(),Ge(!1))},Ce=J.length===0,$e=Ce||V&&(re===""||Le),We=()=>{if(Ce){De(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(V&&re===""){De(U("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}V&&Le&&De(U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Ke=n.jsx(ka,{items:J,orientation:ke,contentTypes:et,baseItem:d,baseContentTypes:m,cutLine:vt,showOutline:jt,showDivLine:rt,count:_t});return n.jsxs(n.Fragment,{children:[n.jsxs(Ba,{type:"page",icon:t,title:e,disc:a,className:Ne("word-table-block",M),children:[qe&&n.jsx(Fn,{size:"small",title:D??U("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ge(!1),footer:({closeWithAnimation:xe})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:xe}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:U("common.save","\uC800\uC7A5"),disabled:!mt||be,onClick:Q})]}),children:n.jsx(Yn,{label:U("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:gt,placeholder:U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:Q,error:be?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),dt&&f&&Y?.({defaultName:typeof e=="string"?e:U("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Ke,previewW:ne,previewH:ye,items:J,existingNames:Lw().map(xe=>xe.name),saveAsNew:ht,onSave:(xe,Pe)=>{f(xe,J,Pe,ht),de(),kt(!1)},onCancel:()=>kt(!1)}),(ae||$)&&ve!==null&&T?.({cellIndex:ve,onConfirm:ae?Gt:xe=>{if($){const Pe=xe[0];if(Pe){const lt=new Set((C??[]).map(pn=>pn.id));let Et=Ps([Pe]);for(let pn=2;lt.has(Et);pn++)Et=`${Ps([Pe])}~${pn}`;$({id:Et,words:[Ed(Pe)]})}}Fe(null)},onClose:pt}),!R&&n.jsx(ds,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,hasImage:je,hasColloquial:dn,hasCaption:yn,contentTypes:et,orientation:ke,showOutline:jt,cutLine:vt,showDivLine:rt,setters:{setContentTypes:ft,setOrientation:Ye,setShowOutline:at,setCutLine:it,setShowDivLine:At,setShowTopInfo:nt,setShowBottomInfo:Ae},showCutLine:(Ie?Qe:_t)>1,showDivLine2:Jt,middleSections:Oe,extraSelected:Ze,onExtraSelect:He,showPaperBands:Ct,showTopInfo:ut,showBottomInfo:ct}),Tt&&Yt?n.jsx("div",{className:"word-table-block__pages",children:Yt.map((xe,Pe)=>n.jsx(ka,{orientation:ke,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:rt,count:Qe,items:xe,baseItem:d,baseContentTypes:m,onRemoveItem:g,onCopyItem:w,onReplaceItem:y,onPickForm:A,onReorder:N&&((lt,Et)=>N(lt+Pe*Qe,Et+Pe*Qe)),indexOffset:Pe*Qe,totalCount:C?.length??0,renderCellAction:Z&&((lt,Et)=>Z(lt+Pe*Qe,Et)),showFillerAdd:!!$,onActivateCell:$?(lt=>Fe(lt+Pe*Qe)):void 0,addableCount:Ft?Math.max(0,Math.min(Qe,tt-Pe*Qe)):void 0,brand:Ue,code:h,contentRef:lt=>{Ot.current[Pe]=lt},pageNumber:{current:Pe+1,total:Yt.length},pageNumberPosition:st},Pe))}):n.jsx(ka,{orientation:ke,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:rt,count:_t,items:ae?void 0:C??[],baseItem:ae?void 0:d,baseContentTypes:m,editCells:ae?ze:void 0,activeCell:ve,onActivateCell:ae||$?Fe:void 0,onRemoveCell:ae?Mt:void 0,onRemoveItem:ae?void 0:g,onCopyItem:ae?void 0:w,onReplaceItem:ae?void 0:y,onPickForm:ae?void 0:A,onReorder:ae?void 0:N,addableCount:Ft?_t:void 0,renderCellAction:ae?void 0:Z,brand:Ue,code:h,showFillerAdd:!!$,contentRef:Nt}),!R&&!S&&ue!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ue}),V&&!R&&n.jsxs(tr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:U("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{required:!0,value:ee??"",onChange:W,placeholder:q?q+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Le?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:xe=>{(xe.key==="Tab"&&!xe.shiftKey||xe.key===" ")&&!(ee??"").trim()&&(q??"").trim()&&(xe.preventDefault(),W?.(q??""))}})}),n.jsx(un,{variant:"custom",label:U("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{value:G??"",onChange:L,placeholder:K?K+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:xe=>{(xe.key==="Tab"&&!xe.shiftKey||xe.key===" ")&&!(G??"").trim()&&(K??"").trim()&&(xe.preventDefault(),L?.(K??""))}})})]})]}),!R&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!S&&_&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:U("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:_}),!S&&x&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:pe,onClick:x}),!S&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:U("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:gn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[I&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:I}),!S&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:U("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Nn}),D&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:D,onClick:()=>V?j():Se(!0),disabled:Ce,onDisabledClick:()=>{De(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??U("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>Se(!1),disabled:$e,onDisabledClick:We})]})]}),n.jsx(wa,{message:ce,type:Me,onClose:Je})]})}const Pw=8;function Dd({items:e,className:t}){const{t:a}=we.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),c=o.useCallback(()=>l(null),[]),u=gr(!!s,w=>{w?i():c()},r),p=e.length,h=p<=3?1:2,d=Pw,m=p>d,b=e.slice(0,m?d-1:d),v=p-b.length,C=e.slice(b.length).map(w=>w.words?.length?w.words.map(y=>y.label).join(" / "):w.id),f=Math.min(5,Math.ceil(C.length/25)),_=Math.ceil(Math.min(p,d)/h)||1,g=h*_;return n.jsx("div",{className:Ne("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:g},(w,y)=>{if(m&&y===d-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:v,words:C.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:x=>{Gn(x)||i()},onPointerLeave:x=>{Gn(x)||c()},onFocus:()=>{ta()||i()},onBlur:c,onClick:x=>{x.stopPropagation(),u.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:v,defaultValue:"+{{count}}"})}),s&&C.length>0&&n.jsx(Un,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1,columns:f})]},y);const A=b[y];return A?n.jsx("div",{className:"word-table-thumb__cell",children:(A.words?.length?A.words:[{label:A.id}]).map((x,E)=>n.jsxs(o.Fragment,{children:[E>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:x.label})]},E))},y):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},y)})})}function Fw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:c,sharedLabel:u,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:b,onPublisherClick:v,selected:C,onClick:f,onMore:_,titleNode:g,className:w}){const{t:y}=we.useTranslation(),A=g!=null,x=h!=null||d!=null||m!=null||b!=null,E=k=>{k.target===k.currentTarget&&!A&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),f?.())};return n.jsxs("div",{className:Ne("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:A?void 0:f,onKeyDown:E,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":y("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Dd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),_&&!A&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:y("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),_(k)}})]}),(s||r||l||c)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?Xl(r,y):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||c)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??y("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),c&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:u??y("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":y("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),v()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:Xl(d,y)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":y("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),b!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":y("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1044
+ `).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:Po,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function F_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=ke.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),b=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!d)return;const x=ea(()=>{const _=document.getElementById(b);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=_=>{_.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{x(),g?.removeEventListener?.("change",w)}},[d,b]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,g)=>u?u(x,{onClick:g}):n.jsx("a",{href:x.href,onClick:g,"aria-current":x.current?"page":void 0,children:x.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const x=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:x}):n.jsx("div",{className:"landing-header__brand",children:x})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((x,g)=>n.jsx("span",{children:f(x)},`${g}:${x.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(x=>!x),"aria-expanded":d,"aria-controls":b,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:b,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${g}:${x.href}`))})})]})}function I_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...lc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function O_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,f=C.phase!=="sound"&&C.at>0;s.current=f?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,f,x=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(w=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),w(!!e.current&&g===a.current)},C);r.current=_})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),b=o.useCallback(C=>C===a.current,[]),y=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:b,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[d,m,b,u,c,p,h,l,i,y])}const Ea=9,z_=e=>Math.round(Math.min(Ea,Math.max(0,e))/Ea*100),W_=e=>e/100*Ea,or=2,zc=.1,H_=e=>Math.min(or,Math.max(0,e)),V_=.1,q_=e=>Math.round(e*1e6)/1e6;function sr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return H_(t);const a=Math.min(Ea,Math.max(0,Number(e.level)||0))/Ea,r=Number(e.mainVolume);return r>0?a>0?q_(Math.min(or,Math.max(V_,a/r))):0:1}const Wc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Hc(e){return Wc(e)}function gs(e){return Wc(e)*sr(e)}function ys(e,t=K1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,gs(e)/a)}function la(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=sr({level:a.level,mainVolume:a.mainVolume})),a}const ia={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},vs=o.createContext(null);function Tr(){return o.useContext(vs)}const _s=e=>`${G1()}/${e}`,Vc=e=>Array.from({length:10},(t,a)=>_s(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Mr={get defaultNoise(){return _s("noise1.mp3")},get street(){return Vc("noise2")},get restaurant(){return Vc("noise3")},get buzz(){return _s("noise4.mp3")}};function U_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Mr.defaultNoise;case"street":return Mr.street[t];case"restaurant":return Mr.restaurant[t];case"buzz":return Mr.buzz;default:return null}}function G_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),b=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),f=o.useCallback((E,v=250)=>{const N=l.current;if(!N)return;const k=p.current;if(k){p.current=null;try{N.pause()}catch{}N.src=k,N.load()}if(!N.src)return;m.current+=1,C();try{io(),ur(N).then(F=>{if(l.current===N)try{s.current?.("noise",F)}catch{}})}catch{}const D=N.paused?0:cr(N);N.paused&&qn(N,0),N.play().catch(()=>{});const A=performance.now(),B=()=>{const F=Math.min(1,(performance.now()-A)/v);try{qn(N,D+(E-D)*F)}catch{}F<1?d.current=requestAnimationFrame(B):d.current=null};d.current=requestAnimationFrame(B)},[C]),x=o.useCallback((E=250,v)=>{const N=l.current;if(!N||N.paused){v?.();return}const k=++m.current;C();const D=performance.now(),A=cr(N),B=()=>{const F=Math.min(1,(performance.now()-D)/E);try{qn(N,A*(1-F))}catch{}if(F<1)d.current=requestAnimationFrame(B);else{d.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{N.pause()}catch{}v?.()}};d.current=requestAnimationFrame(B),b.current=setTimeout(()=>{if(b.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{N.paused||(qn(N,0),N.pause(),v?.())}catch{}}},E+150)},[C]);o.useEffect(()=>{const E=document.createElement("audio");return E.loop=!0,E.crossOrigin="anonymous",l.current=E,()=>{C();try{E.pause(),E.removeAttribute("src"),E.load()}catch{}l.current=null,c.current=null,p.current=null}},[C]);const g=e?ys(e.settings):0,w=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!w)return;let E=0;const v=setInterval(()=>{const N=l.current;if(!N||N.paused){E=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||y()||a.current==="playing"){E=0;return}E+=1,E>=2&&(E=0,x())},400);return()=>clearInterval(v)},[x,w,t,a,y]),o.useEffect(()=>{const E=()=>{const v=l.current;if(document.hidden){if(v&&!v.paused){C();try{v.pause()}catch{}}return}if(!v||!v.paused)return;const N=t.current,k=!!N&&!N.paused&&!N.ended||y()||a.current==="playing",D=h.current;k&&D?.enabled&&D.volume>0&&f(D.volume)};return document.addEventListener("visibilitychange",E),()=>document.removeEventListener("visibilitychange",E)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const E=e?.settings,v=l.current;if(!v)return;const N=E?ys(E):0;if(!E||!E.enabled||N===0){x();return}if(c.current!==E.type){const k=U_(E.type);k&&(c.current=E.type,u(k),p.current=k,x(150,()=>{if(p.current!==k)return;p.current=null,v.src=k,v.load();const D=t.current;if(D&&!D.paused||y()){_.current?.();const A=()=>{v.removeEventListener("canplay",A),_.current===B&&(_.current=null);const F=t.current,L=h.current;(F&&!F.paused&&!F.ended||y())&&L?.enabled&&L.volume>0&&f(L.volume)},B=()=>v.removeEventListener("canplay",A);_.current=B,v.addEventListener("canplay",A)}}))}else{const k=t.current,D=!!k&&!k.paused&&!k.ended||y()||a.current==="playing";if(D&&p.current)f(N);else if(D&&v.paused&&v.src)f(N);else if(!v.paused)if(!D)x();else{C();const A=cr(v),B=performance.now(),F=()=>{const L=Math.min(1,(performance.now()-B)/150);try{qn(v,A+(N-A)*L)}catch{}L<1?d.current=requestAnimationFrame(F):d.current=null};d.current=requestAnimationFrame(F)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,f,x,t,a,h,y]),o.useEffect(()=>{const E=l.current;if(E)try{E.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:f,fadeOutNoise:x}}function K_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const b=o.useRef(null),y=o.useRef(0),C=o.useRef(null),f=o.useRef(0),x=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),x.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}x.current=!1}}catch{}},[]);const g=(E,v=1)=>{try{const N=(E||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(E||"").length);return Math.max(700,Math.round(N*300/Math.max(.25,v)))}catch{return 1200}},w=o.useCallback(E=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const v=window.speechSynthesis,N=++f.current;try{try{v.cancel()}catch{}const k=E??e,D=Array.isArray(k)?k.filter(M=>!!M):[k||""];D.length===0&&D.push("");const A=Math.max(.3,Math.min(3,t));y.current=D.reduce((M,O)=>M+g(O,A||1),0),b.current=performance.now(),l(0),i("playing"),u("playMode");const B=h.current;B?.enabled&&(B?.volume??0)>0&&c(B.volume);const F=()=>{try{const M=b.current||performance.now(),O=performance.now()-M,T=y.current||1200,G=Math.min(1,O/T);try{r.current&&(r.current.style.left=`${G*100}%`),s.current&&s.current.style.setProperty("--progress",String(G))}catch{}G<1&&(C.current=requestAnimationFrame(F))}catch{}},L=()=>{if(N===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},q=M=>{const O=new SpeechSynthesisUtterance(D[M]);try{O.rate=A}catch{}try{O.volume=Math.max(0,Math.min(1,a))}catch{}O.onend=()=>{if(N===f.current){if(M<D.length-1){try{q(M+1)}catch{L()}return}L()}},O.onerror=()=>{L()},O.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(F)}catch{}},x.current=!0,v.speak(O)};try{q(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,d,m]),_=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),p(),b.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:w,stopTTS:_}}const Y_=.01,Z_=.3;async function X_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const b=Math.floor(Z_*i.sampleRate),y=Math.min(u.length,b);for(;c<y&&Math.abs(u[c])<=Y_;)c++;c>=y&&(c=0)}const p=u.length-c,h=a&&a>0?Math.min(p,Math.floor(a*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((b,y)=>{const C=c+y*m,f=Math.min(C+m,c+d,u.length);let x=0;for(let g=C;g<f;g++){const w=Math.abs(u[g]);w>x&&(x=w)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function qc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await X_(l,t,a,r)}catch(s){try{const l=Hl(s)}catch{}return null}}const xs=45,J_=74,Q_=2;function Lr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function $r(e){return Lr(e)/45}const ex=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Uc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Gc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Uc(t),s=Uc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",r],["sound",ex(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Kc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function tx(e,t){const a=Kc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function nx(e,t,a){const r=Math.max(0,Math.floor(a)),s=Kc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function ax({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function rx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Gc({durationsSec:[r],leadInMs:s,tailMs:l});return tx(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function ox({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return nx(Gc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function sx(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function lx({ended:e,completedByEnd:t}){return!!e||!!t}function ix(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function ux(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function cx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function dx(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Yc(a)!==Yc(t):!0}function Yc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Zc=4,px=$r(Zc/xs);function hx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:b=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null),[w,_]=o.useState(!1),[E,v]=o.useState(null),[N,k]=o.useState(2),[D,A]=o.useState(0),[B,F]=o.useState(null),[L,q]=o.useState(!1),[M,O]=o.useState(!1),T=3,G=3,K=1,ee=300,re=o.useRef(0),R=o.useCallback(()=>{const me=C.current,le=f&&f.current?f.current:me?me.closest(".audio-player__wave"):null,Be=le?le.getBoundingClientRect():me?me.getBoundingClientRect():null,Pe=Be?Be.width:0,Fe=Be?Math.max(100,Be.width):320,Ae=Be?Be.height:0,se=Math.max(K,Math.min(ee,Math.floor((Fe+G)/(T+G)))),ye=se*T,Ce=Math.max(0,se-1),xe=Math.max(0,Ce>0?(Fe-ye)/Ce:G);return{bars:se,gap:xe,height:Ae,width:Pe}},[]),J=o.useRef(void 0),ne=o.useRef(null),S=o.useCallback(async(me,le,{quiet:Be=!1}={})=>{const Pe=++re.current,Fe=()=>re.current===Pe;try{if(Be||_(!1),J.current=me,!me){Fe()&&g(null);return}let Ae=le;if(!Ae)try{for(let Ce=0;Ce<4&&!(C.current||f.current);Ce++)await new Promise(xe=>requestAnimationFrame(xe));await new Promise(Ce=>requestAnimationFrame(Ce));const ye=R();ye.height>0&&A(ye.height),Ae=ye.bars,k(ye.gap)}catch{Ae=120}ne.current=Ae;const se=await qc(me,Ae);if(!Fe())return;if(!se){g(null),_(!1);return}g(se),v(Ae),_(!0)}catch{if(!Fe())return;g(null),_(!1)}},[_,g,A,k,v,R]);o.useEffect(()=>{const me=f.current;if(!me||typeof ResizeObserver>"u")return;let le=null;const Be=new ResizeObserver(()=>{le!==null&&cancelAnimationFrame(le),le=requestAnimationFrame(()=>{le=null;try{const Pe=R();if(Pe.width<=0||(Pe.height>0&&A(Pe.height),ne.current===null||Pe.bars===ne.current))return;const Fe=J.current;k(Pe.gap),Fe?S(Fe,Pe.bars,{quiet:!0}).catch(()=>{}):ne.current=Pe.bars}catch{}})});return Be.observe(me),()=>{Be.disconnect(),le!==null&&cancelAnimationFrame(le)}},[R,S]),o.useEffect(()=>{const me=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;S(typeof me=="string"?me:void 0).catch(()=>{}),O(!1)},[t,a,S]),o.useEffect(()=>{let me=!1;if(q(!1),F(null),!l||!E)return;const le=c>0?c*(u||1):void 0;return qc(l,E,le,!0).then(Be=>{me||(F(Be),Be||q(!0))}).catch(()=>{me||(F(null),q(!0))}),()=>{me=!0}},[l,E,c,u]);const $=Math.max(0,Math.min(1,p)),I=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),P=E||40,V=o.useMemo(()=>ox({bars:P,trackDurationSec:y,leadInMs:m,tailMs:b}),[P,y,m,b]),ie=o.useMemo(()=>Array.from({length:P}).map((me,le)=>{const Be=le>=V.lead&&le<V.lead+V.sound,Pe=V.sound>0&&Be?Math.min(P-1,Math.round((le-V.lead)/V.sound*P)):-1,Fe=Be?x&&x[Pe]!=null?x[Pe]:null:x?0:null,Ae=Fe==null?null:Math.min(1,Fe/I*$),se=Ae!=null&&D>0&&Lr(Ae)<=Zc,ye=Ae==null?.15:se?0:$r(Ae),Ce=se,xe=P>1?le/(P-1):0;return n.jsx("div",{className:Ce?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":le,"--mix":xe}},le)}),[P,x,I,$,D,V]),U={"--progress":String(Math.max(0,Math.min(1,r)))},ce=o.useMemo(()=>B&&B.length&&Math.max(...B.map(me=>Number.isFinite(me)?Math.abs(me):0))||1,[B]),Z=$*Math.max(0,i),H=!l||!B||!B.length?1:Math.max(1,Z),te={"--bar-gap":`${N}px`,"--wave-h":`${Lr(H)}px`,"--wave-h1":`${xs}px`},W=w&&(l?!!B||L:!0);o.useEffect(()=>{W&&O(!0)},[W]);const z=M?w:W;o.useEffect(()=>{h?.(z)},[z,h]);const ae=E||40,ve=o.useMemo(()=>Array.from({length:ae}).map((me,le)=>{const Be=B&&B[le]!=null?B[le]:null,Pe=Be==null?0:Math.abs(Be)/ce*Z,Fe=Math.max(px,$r(Pe)),Ae=ae>1?le/(ae-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Fe,"--i":le,"--mix":Ae}},le)}),[ae,B,ce,Z,D]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:te,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:ve}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${z?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${z?"is-ready":""}`,ref:s,style:U,children:ie})]})]})}const Xc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function ws(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),a(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?r(new Error(p)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const mx=2e3;function Jc(e,t=mx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function Cx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),a);s.current.push(p)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function fx(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function bx({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function gx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const yx=400,vx=2e3,Qc=5;function _x({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let y=0;const C=()=>{if(Wn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>yx){const x=h.current===null||f-h.current>vx;if(h.current=f,x&&p.current<Qc){p.current+=1;const g=p.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}Dt(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",g>=Qc?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,g=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,w=g?0:gx(f),_=t.current,E=(i||0)>0||(u||0)>0,v=E&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!v)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const N=g?x.duration:w||0;Wn&&v&&!(N>0)&&Dt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=E?rx({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:N,leadInMs:i||0,tailMs:u||0}):ax({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${k*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),b=o.useCallback(y=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[d,t,a]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:b}}function Bs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=ke.useTranslation(),m=e,b=Tr(),y=o.useRef(b?.registerAnalyser);o.useEffect(()=>{y.current=b?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),g=fx(),w=o.useRef(null),_=o.useRef(!1),E=o.useRef(null),{ref:v,rect:N,show:k,hide:D}=bx();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[A,B]=o.useState(!1),[F,L]=o.useState("idle"),[q,M]=o.useState("stopped"),O=o.useRef("stopped");o.useEffect(()=>{O.current=q},[q]);const[T,G]=o.useState(0),[K,ee]=o.useState("active"),re=o.useRef(!1);o.useEffect(()=>{if(K!=="playMode"||!re.current)return;re.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const pe=x.current?.querySelectorAll("button")[1];try{pe?.focus()}catch{}},[K]);const[R,J]=o.useState(null),[ne,S]=o.useState(null),[$,I]=o.useState(0),[P,V]=o.useState(!1),[ie,U]=o.useState(0),ce=b?.playbackRate??1,Z=b?.mainVolume??1,H=b?gs(b.settings):0,te=b?Hc(b.settings):Z,[W,z]=o.useState("idle"),[ae,ve]=o.useState(""),[me]=o.useState("top"),le=o.useRef(null),Be=o.useRef(0),Pe=o.useRef(null),Fe=o.useRef(!0),Ae=O_({mountedRef:Fe}),se=o.useRef(null),ye=o.useRef(p),Ce=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{Ce.current=Math.max(0,h||0)},[h]);const{start:xe,stop:$e,settleTo:nt}=_x({audioRef:C,fillRef:f,waveProgressRef:Pe,sourcesRef:le,currentIndexRef:Be,sequencer:Ae,leadInMs:p,tailMs:h}),{onReadyChange:ct,waitForReady:at,markNotReady:rt}=Cx({showSoundWaveForm:u,showNoiseWaveForm:c}),Ee=o.useRef(null),Ue=o.useRef(s),Ne=o.useRef(r),Ye=o.useRef(null),et=o.useRef(!1),[ft,vt]=o.useState(!1),dt=o.useCallback(Y=>{et.current=Y,vt(Y)},[]),jt=o.useRef(null),{activeNoiseUrl:ot,noiseSettingsRef:st,fadeInNoise:At,fadeOutNoise:Nt}=G_({noisePlayer:b,audioRef:C,playbackStateRef:O,sequencer:Ae}),{startTTS:Ot,stopTTS:Wt}=K_({ttsText:l,playbackRate:ce,mainVolume:te,fillRef:f,waveProgressRef:Pe,setProgress:G,setPlaybackState:M,setStateLocal:ee,fadeInNoise:At,fadeOutNoise:Nt,noiseSettingsRef:st,onDoneRef:Ne,handleEndRef:jt});o.useEffect(()=>{wt.current=Wt});const xt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{ve(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(Y);return}Je("tts"),Ot(Y)},it=Array.isArray(t)?t.filter(Boolean):t?[t]:[],bt=(!it||it.length===0)&&!!l,pt=Array.isArray(R)&&R.length>0?R:Array.isArray(ne)&&ne.length>0?ne:null,kt=Math.max(Array.isArray(pt)?pt.length:0,it.length);o.useEffect(()=>(Fe.current=!0,()=>{Fe.current=!1}),[]);const mt=()=>{Ae.abort()},wt=o.useRef(null),de=o.useRef(null),Le=o.useRef(null),Se=o.useRef(null);Se.current||(Se.current=()=>{Le.current=null;const Y=C.current;if(de.current==="audio"&&Y&&(!Y.paused||Ae.isRunning())){mt();try{Y.pause()}catch{}Fe.current&&(M("paused"),$e(),Nt())}else if(de.current==="tts")try{wt.current?.()}catch{}});const Je=Y=>{de.current=Y,Le.current=Xa(Se.current)},ht=()=>{Le.current?.(),Le.current=null};o.useEffect(()=>()=>{Se.current&&Br(Se.current)},[]);const Rt=o.useRef(ce);o.useEffect(()=>{Rt.current=ce||1},[ce]);const Me=o.useCallback(Y=>{const pe=Rt.current||1;try{Y.defaultPlaybackRate=pe}catch{}try{Y.playbackRate=pe}catch{}},[]),tt=o.useCallback((Y,pe)=>{if(!dx(Y,pe)){try{Y.currentTime=0}catch{}Me(Y);return}Y.src=pe,Me(Y),Y.load(),Me(Y)},[Me]),Ft=o.useCallback(()=>{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),z("idle")},[]),_t=o.useCallback(async(Y,pe=3,je=50,qe=0)=>{Ft();const Ge=Ae.generation(),Xe=!!Y&&Y.currentTime>0&&!Y.ended,gt=Math.max(0,ye.current-Math.max(0,qe));if(gt>0&&!Xe){Je("audio"),xe(),M("playing");const Ct=st.current;if(Ct?.enabled&&(Ct.volume??0)>0)try{At(Ct.volume)}catch{}if(!await Ae.waitPad(gt,"lead",qe)||!Fe.current||!Ae.isCurrent(Ge))return!1}Ae.enterSound();for(let Ct=0;Ct<pe;Ct++){if(!Fe.current||!Ae.isCurrent(Ge))return!1;try{return Je("audio"),await Y.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!Ae.isCurrent(Ge))return!1;await new Promise(j=>setTimeout(j,je));continue}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,xe,Ae,At,st,Ft]),Q=o.useCallback(Y=>{const pe=Ae.generation(),je=Math.max(0,Ce.current-Math.max(0,Y));xe();const qe=st.current;if(qe?.enabled&&(qe.volume??0)>0)try{At(qe.volume)}catch{}const Ge=()=>{try{se.current?.()}catch{}};if(je<=0){Ae.leave(),Ge();return}Ae.waitPad(je,"tail",Y).then(Xe=>{Ae.leave(),Xe&&Ae.isCurrent(pe)&&Ge()}).catch(()=>{})},[Ae,xe,At,st]),_e=o.useCallback(()=>{const Y=C.current;if(!Y)return;const pe=()=>{M("playing"),ee("playMode"),V(!0),xe();try{io(),ur(Y).then(Xe=>{if(Fe.current)try{y.current?.("main",Xe)}catch{}})}catch{}const Ge=st.current;Ge?.enabled&&(Ge?.volume??0)>0&&At(Ge.volume)},je=()=>{lx({ended:!!Y?.ended,completedByEnd:et.current})||(M("paused"),$e(),Nt())},qe=()=>{const Ge=()=>{try{const Xe=le.current,gt=sx(Xe,Be.current);if(gt!==null){Be.current=gt,I(gt),V(!0);const Ct=Xe?.[gt]&&Xe[gt].src;if(Ct&&Y){tt(Y,Ct),_t(Y).catch(()=>{});return}}}catch{}M("stopped"),G(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}$e(),V(!1),Nt();try{!Ue.current&&jt.current&&jt.current()}catch{}};if(se.current=Ge,Ce.current>0){xe(),Ae.waitPad(Ce.current,"tail").then(Xe=>{Ae.leave(),Xe&&Ge()}).catch(()=>{});return}Ge()};return Y.addEventListener("play",pe),Y.addEventListener("pause",je),Y.addEventListener("ended",qe),()=>{try{Y.removeEventListener("play",pe),Y.removeEventListener("pause",je),Y.removeEventListener("ended",qe),$e()}catch{}}},[At,Nt,_t,st,xe,$e,Ae]);o.useEffect(()=>_e(),[_e]),o.useEffect(()=>{Ue.current=s},[s]),o.useEffect(()=>{Ne.current=r},[r]),o.useEffect(()=>{if(s||K!=="active")return;const Y=E.current;if(!Y)return;let pe=null;const je=requestAnimationFrame(()=>{try{const qe=Y.getTotalLength();if(!qe)return;const Ge=qe*.2;Y.style.strokeDasharray=`${qe-Ge} ${Ge}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);pe=document.createElement("style"),pe.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${qe}}}`,document.head.appendChild(pe),Y.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(je),pe?.remove()}},[K,s]),o.useEffect(()=>{le.current=R},[R]),o.useEffect(()=>{Be.current=$},[$]),o.useEffect(()=>{const Y=x.current,pe=w.current;if(!Y||!pe)return;let je=null;const qe=32,Ge=60,Xe=()=>{try{const Ct=Array.from(Y.querySelectorAll(":scope > .button"));let ge=0;Ct.forEach(We=>{if(We===pe)return;const Ke=We.getBoundingClientRect();ge+=Ke.width});const j=Y.getBoundingClientRect().width,X=Math.max(0,Math.floor(j-ge-8)),fe=kt;if(!fe||X<=0){Array.from(pe.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(X/fe);Re>Ge&&(Re=Ge),Re<qe&&(Re=Math.max(qe,Math.floor(X/fe))),Array.from(pe.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},gt=requestAnimationFrame(Xe);try{je=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),je.observe(Y),je.observe(pe),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(gt)}catch{}try{je&&(je.disconnect(),je=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[R,ne,kt]),o.useEffect(()=>()=>{try{Ee.current&&(clearTimeout(Ee.current),Ee.current=null),Ye.current&&(clearTimeout(Ye.current),Ye.current=null)}catch{}},[]);const Oe=(Y,pe)=>{J(Y),U(pe),rt(),S(ix(Y)),le.current=Y},Ve=()=>{ee("playMode"),I(0),V(!0)},Bt=async(Y,pe)=>{dt(!1),_.current=!1,tt(Y,pe),await Jc(Y),await at()!==!1&&(B(!1),Ve(),await _t(Y))},Qe=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await ws(Y,{timeoutMs:1e4,rejectOnError:!0});Oe([{src:Y,objectUrl:null,duration:qe}],qe),L("ready"),pe&&je&&await Bt(je,Y)}finally{_.current=!1,B(!1)}},zt=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await Promise.all(Y.map(Xe=>ws(Xe,{timeoutMs:1e4})));if(!Fe.current)return;const Ge=Y.map((Xe,gt)=>({src:Xe,objectUrl:null,duration:qe[gt]||0}));Oe(Ge,ux(Ge)),L("ready"),pe&&je&&Ge.length>0&&await Bt(je,Ge[0].src)}finally{_.current=!1,B(!1)}},Ht=async(Y=!1,pe=!0)=>{const je=C.current,qe=t?Array.isArray(t)?t:[t]:[];if(!qe||qe.length===0||!qe.some(Boolean))return!1;if(_.current)return null;_.current=!0,pe&&B(!0),L("resolving");try{const Ge=cx(t,a,Nl),Xe=[];let gt=0;for(const Ct of Ge){let ge=Ct.src??null,j=null;if(!ge&&Ct.resolvedPath){try{L("getting_signed_url"),ge=await El(Ct.resolvedPath)}catch{ge=null}if(!Fe.current)return!1;if(!ge)try{L("downloading");const fe=await Dl(Ct.resolvedPath);if(!Fe.current)return!1;if(fe){const Re=fe instanceof Blob?fe:new Blob([fe]);j=g.track(URL.createObjectURL(Re)),ge=j}}catch{L("error");try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ee("active")}catch{}}}if(!ge)continue;let X=0;try{L("measuring_duration"),X=await ws(ge,{timeoutMs:3e3})}catch{X=0}if(!Fe.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const fe of Xe)if(fe.objectUrl)try{URL.revokeObjectURL(fe.objectUrl)}catch{}return!1}gt+=X||0,Xe.push({...Ct,src:ge,objectUrl:j,duration:X})}if(Oe(Xe,gt),Xe.length>0&&Y&&je){const Ct=Xe[0];dt(!1);try{g.keepOnly(Xe.map(ge=>ge.objectUrl))}catch{}if(L("ready"),_.current=!1,Ct.src&&je)try{if(tt(je,Ct.src),await Jc(je),await at()===!1)return!1;pe&&B(!1),Ve(),je&&await _t(je)}catch{pe&&B(!1)}else pe&&B(!1);ee("playMode"),I(0),V(!0)}return Xe.length>0}finally{_.current=!1,pe&&B(!1),L(Ge=>Ge==="ready"?"ready":"idle")}},cn=async Y=>{const pe=Ae.isRunning();if(Y.paused&&!pe){if(et.current){await Tt();return}const je=Ae.resume();if(je){if(M("playing"),je.phase==="tail"){Q(je.elapsed);return}await _t(Y,3,50,je.elapsed);return}await _t(Y),M("playing")}else Ae.pause(),mt(),Y.pause(),M("paused"),pe&&($e(),Nt())},Yt=async()=>{const Y=C.current;if(!(!Y&&!bt)){if(bt){const pe=window.speechSynthesis;if(K==="active"){const je=$a(),qe=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(je&&qe.length>0){if(_.current)return;ee("load"),B(!0),L("synthesizing"),_.current=!0;try{const Ge=await Promise.all(qe.map(Xe=>Promise.resolve(je(Xe))));Ge.length>1?await zt(Ge,!0):await Qe(Ge[0],!0)}catch{_.current=!1,B(!1),ee("active"),xt(qe.length>0?qe:void 0)}return}xt(qe.length>0?qe:void 0);return}if(K==="playMode"){const je=!!pe&&(pe.speaking||pe.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!je){await cn(Y);return}try{if(pe&&pe.paused)try{Je("tts"),pe.resume(),M("playing")}catch{}else try{pe.pause(),M("paused")}catch{}}catch{}}return}if(K==="active"){if(s&&Array.isArray(le.current)&&le.current.length>0){const je=le.current[0];try{if(je.src&&Y)try{tt(Y,je.src),Ve(),Y&&await _t(Y)}catch{}Ve();return}catch{}}ee("load");let pe;try{pe=await Ht(!0)}catch{pe=!1}if(pe===!1&&Fe.current){try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ee("active")}return}if(K!=="load"&&(K==="playMode"||K==="active"))try{Y&&await cn(Y)}catch(pe){(pe instanceof Error||typeof pe=="object"&&pe&&"name"in pe)&&pe.name}}},Tt=async()=>{const Y=C.current;if(Y)try{const pe=le.current;if(Array.isArray(pe)&&pe.length>1){await St(0);return}dt(!1);try{Y.currentTime=0}catch{}Y&&await _t(Y),M("playing"),ee("playMode")}catch{}},Jt=()=>{mt(),ht(),wt.current?.();const Y=C.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}Nt(),M("stopped"),ee("active"),G(0),V(!1)},en=async(Y,{sameSegment:pe=!1}={})=>{mt();const je=Ae.generation(),qe=C.current,Ge=le.current?.[Y]?.src;try{if(dt(!1),I(Y),V(!0),Be.current=Y,!Ge||!qe||(pe||rt(),tt(qe,Ge),!pe&&await at()===!1)||!Ae.isCurrent(je)||(await _t(qe),!Ae.isCurrent(je)))return;M("playing"),ee("playMode")}catch{}},An=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe<=0){await Tt();return}await en(pe-1)},Nn=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe>=Y.length-1){Jt();return}await en(pe+1)},gn=()=>{if(et.current)return;const Y=200,pe=340;dt(!0),mt(),ht();try{G(1)}catch{}nt(1);try{z("hold")}catch{}try{const je=C.current,qe=bt&&!!je?.src;if(!bt||qe){if(je){je.pause();try{je.currentTime=0}catch{}}}else Wt();Nt()}catch{}try{M("stopped")}catch{}if(V(!1),!Ue.current)try{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),Ye.current=setTimeout(()=>{try{z("out")}catch{}Ye.current=setTimeout(()=>{try{typeof Ne.current=="function"&&Ne.current(!0)}catch{}try{z("idle")}catch{}Ye.current=null},pe)},Y)}catch{}};o.useEffect(()=>{jt.current=gn});const Pt=o.useCallback(()=>ve(""),[]),St=async Y=>{(le.current||[])[Y]&&await en(Y,{sameSegment:Y===Be.current})},Mt=q==="playing",Gt=o.useMemo(()=>{if(!ne||ne.length<=1)return ne;const Y=ne[$];return Y?[Y]:ne},[ne,$]),dn=s===!0;o.useEffect(()=>{try{const Y=C.current;Y&&typeof Y.playbackRate=="number"&&Me(Y)}catch{}},[ce,Me]);const yn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=C.current;if(!Y)return;const pe=Math.max(0,Math.min(1,te)),je=yn.current,qe=()=>{je.raf!==null&&(cancelAnimationFrame(je.raf),je.raf=null),je.timer!==null&&(clearTimeout(je.timer),je.timer=null)};qe();const Ge=cr(Y);if(Y.paused||Math.abs(Ge-pe)<.001||typeof requestAnimationFrame!="function"){try{qn(Y,pe)}catch{}return}const Xe=performance.now(),gt=()=>{const Ct=Math.min(1,(performance.now()-Xe)/150);try{qn(Y,Ge+(pe-Ge)*Ct)}catch{}je.raf=Ct<1?requestAnimationFrame(gt):null};return je.raf=requestAnimationFrame(gt),je.timer=setTimeout(()=>{qe();try{qn(Y,pe)}catch{}},200),qe},[te]);const Vt=W==="hold",En=W==="out",he=K==="playMode"&&!A&&!ft||Vt||En,Te=q!=="stopped"||Vt||En,ze=q==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),He=De("audio-player__fill",he?"is-visible":"",Te?"is-expanded":"",ze?"is-paused":"",En?"is-out":"");return n.jsxs("div",{className:`audio-player ${dn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Mt?"is-playing":""} ${A?"is-loading":""} ${K!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:Xc[F]?"status":void 0,"aria-live":Xc[F]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,K==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:dn,onClick:()=>{re.current=Nr(),D(),Yt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:D,onFocus:k,onBlur:D,children:n.jsx("span",{ref:v,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:E,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,N&&n.jsx(Ln,{anchorRect:N,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${K==="playMode"||Mt?"is-visible":""}`,inert:!(K==="playMode"||Mt)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:An,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Mt?"pause":"play",onClick:Yt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Mt,width:"60px",variant:"transparent-white",disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Jt,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),kt>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:kt}).map((Y,pe)=>n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(pe+1),onClick:()=>{try{St(pe)}catch{}},ariaLabel:d("training.sourcePlay",{n:pe+1}),variant:"transparent-white",selected:P&&$===pe,disabled:K!=="playMode"||!(Array.isArray(R)&&R[pe]),showTooltipInfo:!0},pe))}):null,!Array.isArray(R)||R.length<=1?n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Tt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"}):null,n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Nn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:gn,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(hx,{segments:Gt,progress:T,totalDuration:ie,waveProgressRef:Pe,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:R?.[$]?.duration??0,noiseSrc:c&&b?.settings.enabled&&H>0?ot:null,noiseRatio:b?sr(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:Z,onReadyChange:ct})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Ba,{message:ae,position:me,onClose:Pt})]})}function Rr(e){const{t}=ke.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:d,canIncrease:m,canDecrease:b,fontSize:y,lineHeight:C}=Hi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>p(E=>E==="dark"?"light":"dark"),[]),x=o.useCallback(E=>{try{E.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},_=n.jsxs("div",{className:ue(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ue("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:ue("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:ue("text-box-tooltip__text body-1"),style:w,children:g.map((E,v)=>n.jsxs("div",{className:ue("text-box-tooltip__line"),children:[g.length>1?n.jsx("div",{className:ue("text-box-tooltip__marker"),children:n.jsx("span",{className:ue("text-box-tooltip__line-number button-1"),children:v+1})}):null,n.jsx("span",{className:ue("text-box-tooltip__line-text"),children:E})]},v))})]}),n.jsxs("div",{className:ue("text-box-tooltip__buttons"),children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!b}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:x,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:_}):n.jsx("div",{className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function ed({state:e="disabled"}){const{t}=ke.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function td(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),p=c?Array.from(c.querySelectorAll(Dn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function nd({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=ke.useTranslation(),m=vn("(max-width: 767px)"),b=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),y=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[f,x]=o.useState(!1),[g,w]=o.useState(null),[_,E]=o.useState(null);td(f&&!!g,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let B=A.length-1;B>=0;B--)if(A[B].querySelector(".text-box-tooltip__root"))return A[B];return null},()=>C.current?.querySelector("button")??null);const v=o.useRef(l);o.useEffect(()=>{v.current=l});const N=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{x(!1),w(null),E(null)},[]);o.useEffect(()=>{if(!f)return;let A;try{typeof v.current=="function"&&(A=v.current())}catch{}if(A===!1){k();return}E(typeof A<"u"&&A!==null?A:null)},[N]);const D=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(E(typeof A<"u"&&A!==null?A:i),!C.current){x(B=>!B);return}if(f)x(!1),w(null),E(null);else{const B=C.current.getBoundingClientRect();w(B),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:D,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Rr,{text:_??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ks(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ua({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(()=>ks(e,t));o.useEffect(()=>{const v=ks(e,t);if(v!==d){const N=setTimeout(()=>m(v),0);return()=>clearTimeout(N)}},[e,t,d]);const b=o.useCallback((...v)=>{ks(e,t)==="done"||d==="done"||typeof u=="function"&&u(...v)},[e,t,d,u]),[y,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(v=>{if(!v)return null;try{const N=v;if(typeof v=="object"&&(N.currentTarget||N.target)&&(N.nativeEvent||N.type)){const A=N.currentTarget??N.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(v instanceof DOMRect)return v;const k=v;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const D=v?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((v,{text:N="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:A="center",alignY:B="top"}={})=>{const F=g(v);x({text:N,label:k,anchorRect:F,backdrop:D,alignX:A,alignY:B}),C(!0)},[g]),_=o.useCallback(()=>{C(!1),x(v=>({...v,anchorRect:null}))},[]),E=o.Children.map(l,v=>{if(o.isValidElement(v)){const N=v;if(typeof N.type=="string")return N;const k=N.props??{},D=typeof k.onDone=="function"?k.onDone:b,A=typeof k.disabled=="boolean";let B=d==="disabled";return A&&(B=!!k.disabled),o.cloneElement(N,{onDone:D,disabled:B,showTooltip:w,hideTooltip:_})}return v});return n.jsxs("div",{className:`training-step training-step--${d} ${a?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ed,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(nd,{state:d,title:r,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),E]}),y?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Rr,{text:f.text,onClose:_})}):null]})}function ad({context:e,state:t="disabled",theme:a="light"}){const{t:r}=ke.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(L=>L==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:b,lineHeight:y}=Hi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),g=o.useRef(!1),w=o.useCallback(()=>{g.current=Nr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>f(""),[]),E=L=>{try{f(L)}catch{}},v=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const L=setTimeout(()=>l(t),0);return()=>clearTimeout(L)}},[t]);const N=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,D]=o.useState(N);k!==N&&(D(N),l("disabled"));const A=t==="disabled"?s:t,B=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",F=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${y}px`}),[b,y]);return o.useEffect(()=>{if(A==="disabled"||!g.current)return;g.current=!1;const L=document.activeElement;L&&L!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:x,className:`training-text-box ${B} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",onClick:w,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:F,children:N})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>E(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>E(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Ba,{message:C,position:"top",onClose:_})]})}function ca(e){return e==="active"||e==="done"}function As({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:b=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=ke.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,E=p?p.join("||"):"",v=h?h.join("||"):"",[N,k]=o.useState(()=>Array.isArray(_)?C?Oa(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?k(C?Oa(_):_.slice()):k(void 0)},[c,E,v,C]);const[D,A]=o.useState(null),[B,F]=o.useState(()=>new Set);o.useEffect(()=>{A(null),F(new Set)},[v,c,E]);const L=o.useRef(void 0);o.useEffect(()=>{const O=L.current;typeof O=="number"&&typeof t=="number"&&typeof e=="number"&&O>=e&&t<e&&(A(null),F(new Set)),L.current=t},[t,e]);const q=o.useCallback(O=>{if(!ca(w))return;const T=N?.[O];if(T==null)return;const G=T;if(d){const K=new Set(B);K.has(G)?K.delete(G):K.add(G),F(K),typeof u=="function"&&u({selectedValues:[...K],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...K],__ts:Date.now()})}else A(G),typeof u=="function"&&u({selectedIndex:O,selectedValue:G,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:O,selectedValue:G,__ts:Date.now()})},[N,w,d,u,B]),M=`training-step__buttons${Array.isArray(N)&&N.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(N)&&N.length>0?N.map((O,T)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>q(T),ariaLabel:String(O),label:O,useLabel:!0,icon:y?y[String(O)]:void 0,variant:"default",disabled:w==="disabled",selected:d?B.has(O):D===O,useDisabledCovered:b,minWidth:0},String(O))):null})})}function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=ke.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",b=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",y=u&&typeof u=="object"?u.choices:void 0,[C,f]=o.useState(c??null),x=`${String(b)}\0${JSON.stringify(y??null)}`,[g,w]=o.useState(x);g!==x&&(w(x),c==null&&f(null));const[_,E]=o.useState(c);Object.is(_,c)||(E(c),f(c??null));const v=o.useRef(void 0);o.useEffect(()=>{const A=v.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&c==null&&f(null),v.current=t},[t,e,c]);const N=o.useCallback(A=>{const B=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(B),ca(m)&&typeof l=="function"&&l(B)},[i,m,l]),k=o.useCallback(()=>{ca(m)&&(f(!1),N(!1))},[N,m]),D=o.useCallback(()=>{ca(m)&&(f(!0),N(!0))},[N,m]);return n.jsxs(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ad,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((A,B)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>{ca(m)&&(f(B),N&&N(B))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:C===B},B)):n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function Es({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:x}=ke.useTranslation(),g=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,title:g,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(Bs,{soundSrc:i,ttsText:i?null:p??g,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const xx=[];function Ds({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=xx}){const{t:c}=ke.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=S=>typeof S=="string"?S:S&&(S.context||S.sentence||S.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[b,y]=o.useState(()=>(d||[]).map((S,$)=>({id:$,text:h(S)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",x=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const S=Array.isArray(u)?u:[];m(S);const $=(I=>{const P=(I||[]).map((ce,Z)=>({id:Z,text:h(ce)}));if(P.length<=1)return P;const V=(ce,Z)=>{if(ce.length!==Z.length)return!1;for(let H=0;H<ce.length;H++)if(ce[H].text!==Z[H].text)return!1;return!0};let ie=Oa(P),U=0;for(;V(ie,P)&&U<20;)ie=Oa(P),U+=1;return ie})(S);y($);try{if(typeof i=="function"){const I=$.filter((P,V)=>P.text===h(S[V])).length;i({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=$.filter((P,V)=>P.text===h(S[V])).length;g.current=u,l({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof l!="function"))return;const S=Array.isArray(u)?u:[],$=b.filter((I,P)=>I.text===h(S[P])).length;l({shuffled:b,score:$,total:S.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(S,$)=>{const I=[...b],P=S+$;if(P<0||P>=I.length)return;const V=I[P];I[P]=I[S],I[S]=V,G(I);try{if(typeof l=="function"&&C==="active"){const ie=I.filter((U,ce)=>U.text===h(d[ce])).length;l({shuffled:I,score:ie,total:(d||[]).length,__ts:Date.now()})}}catch{}},[_,E]=o.useState(null),v=o.useRef(null),N=o.useRef(null),k=o.useRef(null),D=o.useRef(null),A=o.useRef(null),B=o.useRef({x:0,y:0}),F=o.useRef(null),L=o.useRef({dx:0,dy:0}),q=()=>{if(F.current!==null)return;const S=()=>{if(!v.current){F.current=null;return}F.current=requestAnimationFrame(S);const $=B.current,I=L.current||{dx:0,dy:0};v.current&&(v.current.style.transform=`translate3d(${$.x-I.dx}px, ${$.y-I.dy}px, 0)`)};F.current=requestAnimationFrame(S)},M=o.useRef(new Map),O=o.useRef(new Map),T=()=>{const S=new Map;return M.current.forEach(($,I)=>{$&&$.getBoundingClientRect&&S.set(I,$.getBoundingClientRect())}),S},G=S=>{const $=T();y(S);try{if(typeof i=="function"){const I=S.filter((P,V)=>P.text===h(d[V])).length;i({shuffled:S,score:I,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=T();S.forEach(P=>{const V=$.get(P.id),ie=I.get(P.id),U=M.current.get(P.id);if(!U||!V||!ie)return;const ce=V.top-ie.top;ce&&(U.style.transition="none",U.style.transform=`translateY(${ce}px)`,requestAnimationFrame(()=>{U.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",U.style.transform="";const Z=()=>{U.style.transition="",U.removeEventListener("transitionend",Z)};U.addEventListener("transitionend",Z)}))})})},K=(S,$)=>{try{try{$.dataTransfer?.setData("text/plain",String(S))}catch{}try{$.dataTransfer&&($.dataTransfer.effectAllowed="move")}catch{}try{const I=document.createElement("div");I.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(I),$.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}E(S);try{const I=b[S],P=document.createElement("div");P.className="order-list__dragging-object order-list__dragging-object--visible",P.textContent=I&&I.text?I.text:"",document.body.appendChild(P),v.current=P;const V=M.current.get(I.id);let ie=$.clientX||0,U=$.clientY||0;try{if(V&&V.getBoundingClientRect){const z=V.getBoundingClientRect();ie=z.left+z.width/2,U=z.top+z.height/2}}catch{}const ce=P.getBoundingClientRect(),Z=ce.width/2,H=ce.height/2;L.current={dx:Z,dy:H},P.style.transition="none",B.current={x:ie,y:U},P.style.transform=`translate3d(${ie-Z}px, ${U-H}px, 0)`,requestAnimationFrame(()=>{try{P.style.transition=""}catch{}q()});const te=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};k.current=te,document.addEventListener("mousemove",te);const W=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};N.current=W,document.addEventListener("dragover",W);try{$.dataTransfer?.setData("text/plain",String(S));try{$.dataTransfer?.setData("application/json",JSON.stringify({idx:S}))}catch{}}catch{}}catch{}},ee=(S,$)=>{$.preventDefault();try{$.dataTransfer&&($.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const I=$.currentTarget&&$.currentTarget.closest?$.currentTarget.closest(".order-list__item"):null;if(I&&D.current!==I){if(D.current)try{D.current.classList.remove("drag-over")}catch{}try{I.classList.add("drag-over")}catch{}D.current=I}}catch{}},re=(S,$)=>{$.preventDefault();const I=$.dataTransfer?.getData("text/plain")||"",P=I?parseInt(I,10):_,V=S;if(typeof P!="number"||isNaN(P)||P===V){E(null),ne(),R();return}const ie=Lf(b,P,V);G(ie),E(null),R();try{if(typeof l=="function"&&C==="active"){const U=ie.filter((ce,Z)=>ce.text===h(d[Z])).length;l({shuffled:ie,score:U,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const U=document.querySelectorAll(".order-list .order-list__item")[V];if(!U)return;const ce=U.querySelector(".order-list__slot")||U;try{ce.classList.add("pulse"),ce.offsetHeight,ce.classList.add("to-dark");const Z=()=>{ce.classList.remove("pulse","to-dark"),ce.removeEventListener("transitionend",Z)};ce.addEventListener("transitionend",Z)}catch{}})}catch{}ne()},R=()=>{if(v.current){try{document.body.removeChild(v.current)}catch{}v.current=null}N.current&&(document.removeEventListener("dragover",N.current),N.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)},J=()=>{E(null),ne(),R()};o.useEffect(()=>()=>R(),[]);const ne=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(S=>S.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const S=Math.max(1,(b||[]).length);b.forEach(($,I)=>{const P=O.current.get($.id);if(!P)return;let V=50;S>1&&(V=Math.round(I/(S-1)*100));try{P.style.setProperty("--marker-pos",V+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:p,children:n.jsx("div",{className:"order-list",children:b.map((S,$)=>{const I=Math.max(1,(b||[]).length),P=I>1?Math.round($/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":P+"%"},ref:V=>{const ie=O.current;V?ie.set(S.id,V):ie.delete(S.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:$+1})}):null,n.jsxs("div",{ref:V=>{const ie=M.current;V?ie.set(S.id,V):ie.delete(S.id)},className:`order-list__draggable ${_===$?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?V=>K($,V):void 0,onDragEnter:f?V=>ee($,V):void 0,onDragOver:f?V=>ee($,V):void 0,onDragLeave:f?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const V=document.querySelectorAll(".order-list .order-list__item");V&&V[$]&&(V[$].classList.remove("drag-over"),D.current===V[$]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?V=>re($,V):void 0,onDragEnd:f?J:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:S.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},S.id)})})})}const wx=8e3;function Bx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function rd({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:b}=ke.useTranslation(),y=s??b("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),f=d??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[_,E]=o.useState(null),v=o.useRef([]),[N,k]=o.useState(!1),D=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const B=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{E(null)},[B]);const F=o.useRef(void 0);o.useEffect(()=>{const T=F.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&E(null),F.current=t},[t,e]);const L=o.useCallback((T,G)=>{if(c)return;const K={item:T,index:G,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(w==="active"&&typeof l=="function")try{l(K)}catch{}},[c,i,w,l]),q=o.useRef(m);o.useEffect(()=>{q.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(N||w==="disabled")return;k(!0);let T=!1;const G=new Promise(K=>{D.current=()=>{T=!0,K()}});try{for(let K=0;K<x.length&&!(!A.current||T);K++){const ee=v.current[K];if(!ee)continue;await Promise.race([Bx(ee.play(),wx),G]);const re=Math.max(0,q.current||0);re>0&&K<x.length-1&&!T&&A.current&&await Promise.race([new Promise(R=>{setTimeout(R,re)}),G])}}finally{D.current=null,k(!1)}},[N,w,x.length]),O=o.useCallback((T,G)=>{if(!ca(w))return;E(G);const K={selectedValue:T.word||T.title||"",selectedIndex:G,item:T,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(typeof l=="function")try{l(K)}catch{}},[i,w,l]);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:M,playAllActive:N},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const G=D.current;if(!G)return;const K=T.target;K&&typeof K.closest=="function"&&K.closest(".training-word-card__bottom")&&G()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((T,G)=>n.jsx(rs,{ref:K=>{v.current[G]=K},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,G),selectable:c,selected:c&&_===G,onSelect:c?()=>O(T,G):void 0,flipDelay:G*120,hideLabel:p,hideAudio:h},T&&T.id||G))})})}const kx=160;function Ax(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function od(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}Ax(Zt.t.bind(Zt)),od(Zt.t.bind(Zt));const Pr="none",Nx=.5,Ex=1.5,Dx=.25;function Ss({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Ju,{value:a,onChange:p,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ue("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ue(De("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function sd({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=ke.useTranslation(),s=vn("(max-width: 767px)")?40:24,l=Tr(),i=sr(l?.settings??ia),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),b=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),y=o.useCallback(x=>{const g=Math.min(or,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:g})}catch{}},[l]),C=o.useCallback(x=>{try{x===Pr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Pr,label:r("training.noise.type.none","\uC5C6\uC74C")},...od(r).map(x=>({key:x.value,label:x.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:ue("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(nr,{className:ue("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Ss,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Ss,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:Nx,max:Ex,step:Dx,size:s,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(_n,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Pr,onChange:C})}),n.jsx(Ss,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:or,step:zc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:ue("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(_n,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Pr,onChange:()=>{}})})})]})})}function ld({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:p=!1}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(!1),[b,y]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=Tr(),_=u>0,E=_&&i<u-1,v=!_||i>=u-1,N=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const k=o.useCallback(()=>{m(!1),y(null)},[]),D=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=x?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=g?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),B=vn("(max-width: 767px)"),F=o.useRef(null),[L,q]=o.useState(null),M=o.useCallback(()=>{f(G=>{const K=!G;return q(K?F.current?.getBoundingClientRect()??null:null),K})},[]),O=o.useCallback(()=>{f(!1),q(null)},[]);o.useEffect(()=>{c&&(f(!1),q(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Qo,{analyser:w?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Qo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return td(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,g.current].map(G=>G?.querySelector("button")??null).find(G=>!!G&&G.getClientRects().length>0)??x.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:x,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:F,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:M,selected:C,"aria-expanded":B?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!B&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&B&&L&&n.jsx(Bn,{anchorRect:L,onClose:O,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[v&&n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!N}),E&&n.jsx(be,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!N})]}),e&&d&&n.jsx(sd,{anchorRect:b,onClose:k,hideNoiseRows:p})]})}function id({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:b}=ke.useTranslation(),y=vn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(p)?p:c||0,x=d||m,g=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,E=!!(w||_),v=E?w||_:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),N=g||(w?t:void 0),k=y&&typeof N=="string"&&(N.includes(" \xB7 ")||N.includes(" / "))?N.split(/\s[·/]\s/).pop():N,D=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(be,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(_u,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${E?"":" pp-title__title--empty"}`,children:v}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(nc,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function Sx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function jx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const ud=(e,t)=>{if(!t)return t;const a=typeof Zt?.t=="function"?Zt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function cd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=ei().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ud(`topic.${l.key}`,l.label):void 0,i?ud(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function js(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function dd(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Tx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function Mx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=cd(t,a,r),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function Lx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function $x(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function Rx(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function pd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Px(e,t,a,r){return pd(e,t*a+r)}function Fx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function Ix(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const hd=o.createContext(null);function Ox(){const e=o.useContext(hd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function zx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=ke.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),b=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[b]);const C=o.useRef(void 0);o.useEffect(()=>{const w=C.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const f=o.useMemo(()=>d.filter(w=>w!==null).length+1,[d]),x=o.useCallback(w=>{if(!ca(h))return;const _=d;let E;if(_[w]!=null){const N=_[w];E=_.map(k=>k!==null&&k>=N?null:k)}else E=[..._],E[w]=f;m(E);const v={selectedOrder:E,words:l,__ts:Date.now()};try{typeof u=="function"&&u(v)}catch{}if(_[w]==null&&E.length>0&&E.every(N=>N!==null))try{typeof i=="function"&&i(v)}catch{}},[h,d,f,u,i,l]),g=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,_)=>n.jsx(rs,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:d[_]!==null,orderRank:d[_],onSelect:()=>x(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${w}-${_}`))})})}function Fr(e){return null}Fr.__isTrainingPage=!0;function Da(e,t){const a=Ox();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function md({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Da(e,t);return n.jsx(Es,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function Cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function fd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function bd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ds,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function gd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(rd,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Wx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(zx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const yd=3e4,Hx=/^(https?:|blob:|data:audio|\/|\.\/)/;function vd(e){return typeof e=="string"&&Hx.test(e)?e:null}const Vx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ts=Symbol("timed-out");function qx(e,t){if(t<=0)return Promise.resolve(Ts);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ts),t)})]).finally(()=>clearTimeout(a))}function Ux(e){return e?$a()||ir()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Gx(e,t){const a=[],r=vd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",$a()],["fallbackUrlResolver",ir()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await qx(i(s),u)}catch(h){return Dt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===Ts?(Dt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${yd}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):Vx(c)||(Dt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Kx(){return Date.now()+yd}const Yx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Zx(e){Dt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function Ir(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Xx(e){return Ir(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Jx(e){return vd(Ir(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function _d(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=Ir(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function xd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=ke.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=a??0;if(t!=null&&A>0&&t/A>.5){const B=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(B)}},[t,a]);const m=o.useCallback(A=>{const B=_d(A),F=Ir(A?.wording,A?.label);return B===!0?{variant:"main",label:F??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:B===!1?{variant:"danger",label:F??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:F??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),b=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,g]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,g(null)},[]);o.useEffect(()=>w,[w]);const _=o.useRef(0),E=(A,B)=>{if(!Wn)return;const F=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${F}ms ${A}`,B??"")},v=o.useRef(0),N=o.useCallback((A,B,F)=>{w();const L=++v.current,q=()=>v.current===L;_.current=Wn?performance.now():0,E(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:B,rawUrl:F}),g(A),f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),v.current++,ro()};const M=K=>{E("\uD2BC\uB2E4",K);const ee=Ja(K,re=>{E(`\uB05D\uB0AC\uB2E4 \u2014 ${re?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:q()}),re&&q()&&(f.current=null,g(null))});return f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),v.current++,ee.stop(),ro()},ee.done},O=Gx(B,F);E("\uCC28\uB840",O.map(K=>K.kind));const T=O[0]?.kind==="raw",G=T?M(F):Promise.resolve(!1);(async()=>{if(await G||!q())return;const K=Kx(),ee=T?O.slice(1):O;for(let re=0;re<ee.length;re++){if(!q())return;E(`${ee[re].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await ee[re].resolve(Yx(K,ee.length-re));if(E(`${ee[re].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!q()||R&&(await M(R)||!q()))return}q()&&(E("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Zx(B),f.current=()=>{v.current++,ro()},E("\uB0AD\uB3C5\uD55C\uB2E4"),z1(B,{onEnd:()=>{q()&&(f.current=null,g(null))}}))})()},[w]),k=o.useMemo(()=>C.map(A=>{const B=A??{},F=Xx(B)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:q}=m(B),M=Array.isArray(B.corrects)?B.corrects:[],O=M.length?M.join(", "):B.answer!=null&&B.answer!==""?String(B.answer):null,T=typeof B.selectedText=="string"?B.selectedText:null,G=_d(B)===!0,K=Jx(B),ee=!!K||Ux(F);return{problem:F,variant:L,label:q,answer:O,selectedText:T,isCorrect:G,sound:K,canHear:ee}}),[C,m,p]),D=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(Fn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:B})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:B,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:y,total:b}),children:[n.jsx("span",{className:"trp-score__big",children:y}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:b})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,B)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(B+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(be,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===B?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===B?p("training.result.replaySoundStop",{no:B+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:B+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===B?w():N(B,A.problem,A.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},B))]})})]})})}const Ms=new Set;function Qx(e){o.useEffect(()=>{if(!e||Ms.has(e))return;Ms.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,Pf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Ms.delete(e)}},[e])}function Or(e,t){return e&&e.id||`page-${t??0}`}function zr(e,t){return e&&e.key||`step-${t??0}`}function Wr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function ew(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const tw=300,nw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},zn=Object.freeze({}),wd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ls(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const aw=e=>n.jsx(xd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function rw(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:b,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:g,ariaLabel:w,label:_,buildResults:E,onResult:v,typeKey:N,entryPoint:k,dailyTotal:D,itemRef:A,renderResultPopup:B,noiseOverride:F,hideNoiseRows:L=!1}=e;Qx(N&&!wd.has(N)?N:"");const q=o.useRef(0);o.useEffect(()=>{q.current=Date.now()},[]);const{t:M}=ke.useTranslation(),O=v,T=!!t,G=t?.id||null,K=t?.meta||{},ee=Array.isArray(t?.pages)?t.pages:[],re=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=re.length>0,J=he=>he===Fr||he?.__isTrainingPage===!0,ne=R&&re.some(he=>J(he.type)),S=ne?re.filter(he=>J(he.type)).map((he,Te)=>{const ze=he.props||{};return{id:`children-page-${Te}`,steps:o.Children.toArray(ze.children).filter(o.isValidElement),pageTop:ze.pageTop||ze.top||null,pageBottom:ze.pageBottom||ze.bottom||null}}):[{id:"children-page-0",steps:re}],$=R&&!T&&typeof g!="function",I=$?Math.max(1,S.length):0;o.useEffect(()=>{if(!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(typeof document>"u"||!document.body)return;const he=document.body;return he.dataset.ihabTrainingPopupCount=String(Number(he.dataset.ihabTrainingPopupCount||"0")+1),he.classList.add("ihab-training-popup-open"),()=>{const Te=Number(he.dataset.ihabTrainingPopupCount||"1")-1;Te>0?he.dataset.ihabTrainingPopupCount=String(Te):(delete he.dataset.ihabTrainingPopupCount,he.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return yv()},[]);const[P,V]=o.useState({...ia,enabled:!1}),ie=o.useRef(P);o.useEffect(()=>{ie.current=P},[P]);const U=o.useRef(F),ce=o.useRef(!1),Z=o.useRef(null);o.useEffect(()=>{let he=!1;const Te=ze=>{if(he)return;ce.current=!0;const Ze=ze?la({...ia,enabled:!1},ze):{...ia},He=Z.current;Z.current=null;const Y=He?la(Ze,He):Ze;ie.current=Y,V(Y),He&&!U.current&&fo(Y),mr(Y);const pe=U.current;if(pe){const je=typeof pe=="function"?pe(Y):pe,qe=la(Y,je);ie.current=qe,V(qe),mr(qe)}};return Kf().then(ze=>{if(he){const Ze=Z.current;if(Z.current=null,Ze&&!U.current){const He=ze?la({...ia,enabled:!1},ze):{...ia};fo(la(He,Ze))}return}Te(ze)}),()=>{he=!0}},[]);const[H,te]=o.useState(null),[W,z]=o.useState(null),ae=o.useCallback((he,Te)=>{he==="main"?te(Te):z(Te)},[]),ve=o.useRef(null),me=o.useRef(null),le=o.useCallback(()=>{me.current!==null&&(clearTimeout(me.current),me.current=null);const he=ve.current;ve.current=null,he&&fo(he)},[]);o.useEffect(()=>{if(typeof window>"u")return;const he=()=>{document.visibilityState==="hidden"&&le()};return window.addEventListener("pagehide",le),document.addEventListener("visibilitychange",he),()=>{window.removeEventListener("pagehide",le),document.removeEventListener("visibilitychange",he),le()}},[le]);const Be=o.useCallback(he=>{const Te=la(ie.current,he);if(ie.current=Te,V(Te),!ce.current){Z.current={...Z.current??{},...he},mr(Te);return}U.current||(ve.current=Te,me.current!==null&&clearTimeout(me.current),me.current=setTimeout(le,tw)),mr(Te)},[le]),Pe=P.mainSpeed,Fe=P.mainVolume,Ae=o.useCallback(he=>Be({mainSpeed:he}),[Be]),se=o.useCallback(he=>Be({mainVolume:he}),[Be]),ye=o.useMemo(()=>({settings:P,setSettings:Be,registerAnalyser:ae,mainAnalyser:H,noiseAnalyser:W,playbackRate:Pe,setPlaybackRate:Ae,mainVolume:Fe,setMainVolume:se}),[P,Be,ae,H,W,Pe,Ae,Fe,se]),Ce=o.useRef(null),[xe,$e]=o.useState(0),nt=o.useRef([]),[ct,at]=o.useState("center"),[rt,Ee]=o.useState(!1),Ue=o.useRef(!1),Ne=o.useRef(null),Ye=o.useCallback(he=>{Ue.current||(Ue.current=!0,Ee(!0),Ne.current=setTimeout(()=>{try{he()}catch{Ue.current=!1,Ee(!1)}},nw()?0:kx))},[]);o.useEffect(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);const et=o.useRef(m);o.useEffect(()=>{et.current=m});const ft=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const he=Ce.current,Te=ft.current;if(_o(he,Te),he){const ze=Array.from(he.querySelectorAll(Dn)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(ze)try{ze.focus()}catch{}}return()=>{const ze=document.activeElement;if(!ze||ze===document.body||he&&he.contains(ze))try{xo(Te)?.focus?.()}catch{}}},[]),o.useEffect(()=>ea(()=>Ye(()=>{const he=et.current;typeof he=="function"&&he()})),[Ye]),yo(Ce,!0);const[vt,dt]=o.useState(!1),jt=o.useRef(!1),[ot,st]=o.useState(null),At=o.useRef(0),Nt=o.useRef(0),Ot=()=>{At.current+=1,Nt.current+=1,st(null)},[Wt,xt]=o.useState(""),[it,bt]=o.useState(()=>Wr()),pt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!$||(bt(Wr()),Ot())},[T,G,$]),o.useEffect(()=>{$&&bt(he=>{const Te=Math.max(0,Math.min(he.pageIndex,Math.max(0,I-1)));return Te!==he.pageIndex?{...he,pageIndex:Te,stepIndex:0}:he})},[$,I]);const kt=$?Math.max(0,Math.min(it.pageIndex,I-1)):0,mt=$?S[kt]:null,wt=$&&mt&&Array.isArray(mt.steps)?mt.steps:[],de=T?it.pageIndex:$?kt:typeof c=="number"?c:0,Le=T?ee[Math.max(0,Math.min(it.pageIndex,Math.max(0,ee.length-1)))]:null,Se=T&&Le&&Array.isArray(Le.steps)?Le.steps:[],Je=T?Se.length:$?wt.length:typeof d=="number"?d:0,ht=T||$?Math.max(0,Math.min(it.stepIndex,Math.max(0,Je))):typeof h=="number"?h:0,Rt=T?ee.length:$?I:typeof p=="number"?p:0;o.useEffect(()=>{if(!T&&!$)return;const he=T?Or(Le,de):mt?.id||`children-page-${de??0}`,Te=new Date().toISOString();for(let ze=0;ze<=ht;ze+=1){const Ze=T?zr(Se[ze],ze):`step-${ze}`,He=_t(he,Ze);Ft.current.has(He)||Ft.current.set(He,Te)}},[T,$,de,ht,mt?.id]),o.useLayoutEffect(()=>{const he=pt.current;if(typeof de=="number"&&he!==null&&de!==he&&de>he)try{xt(M("training.problemNotice",{n:de+1}))}catch{}pt.current=typeof de=="number"?de:pt.current},[de,c,M]),o.useLayoutEffect(()=>{const he=Ce.current;if(!he)return;const Te=()=>he.querySelector(".page-popup__scroll");let ze=null,Ze=null,He=null;const Y=Xe=>{const gt=Te();if(!gt)return;const Ct=gt.scrollHeight<=gt.clientHeight;if(at(Ct?"center":"top"),Xe&&!jt.current){jt.current=!0;try{dt(!0)}catch{}try{qe.disconnect()}catch{}}},pe=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>Y(!0),60)})},je=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>Y(!1))};pe(),window.addEventListener("resize",je);const qe=new MutationObserver(pe);qe.observe(he,{childList:!0,subtree:!0,attributes:!0});const Ge=setTimeout(()=>{jt.current||Y(!0)},400);return()=>{window.removeEventListener("resize",je),ze!==null&&cancelAnimationFrame(ze),Ze!==null&&clearTimeout(Ze),He!==null&&cancelAnimationFrame(He),clearTimeout(Ge);try{qe.disconnect()}catch{}}},[Ce]);const Me=o.useCallback(he=>{Ce.current&&(Ce.current._childOnNext=he)},[]),tt=o.useCallback(he=>{Ce.current&&(Ce.current._childOnResult=he)},[]),Ft=o.useRef(new Map),_t=(he,Te)=>`${he}\0${Te}`,Q=o.useCallback((he,Te,ze)=>{bt(Ze=>{const He=Ze.answersByPage[he]||{},Y=He[Te],pe=js(ze),je=js(Y);if(Y&&je>pe)return Ze;const qe=dd(ze,Ft.current.get(_t(he,Te)),pe);return{...Ze,answersByPage:{...Ze.answersByPage,[he]:{...He,[Te]:qe}}}})},[bt]),_e=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze)},[Le,de,Q]),Oe=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze),!ze?.allowChange&&he?.autoAdvance!==!1&&bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Te+1)}))},[Le,de,Q,bt]),Ve=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=typeof Te=="number"?Te:ht??0,He=`step-${Ze}`;Q(ze,He,he),he?.allowChange||bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ze+1)}))},[mt,de,ht,Q,bt]),Bt=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=`step-${typeof Te=="number"?Te:ht??0}`;Q(ze,Ze,he)},[mt,de,ht,Q]),Qe=$?{currentPageIndex:de??0,currentStepIndex:ht??0,totalStepsInPage:wt.length,handleStepDone:Ve,handleStepChange:Bt}:null,zt=async()=>{const he=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:ee,flowState:it,answersByPage:it.answersByPage})):null;return typeof O=="function"&&await Promise.resolve(O(he))||he},Ht=async()=>{const he=mt?.id||`children-page-${it.pageIndex}`,Te=it.answersByPage[he]||{},ze=ne?(()=>{const Y={};let pe=0;return S.forEach(je=>{const qe=it.answersByPage[je.id]||{},Ge=Array.isArray(je.steps)?je.steps.length:0;for(let Xe=0;Xe<Ge;Xe+=1){const gt=qe[`step-${Xe}`];typeof gt<"u"&&(Y[`step-${pe+Xe}`]=gt)}pe+=Ge}),Y})():Te;if(typeof E=="function"){const Y=await Promise.resolve(E(ze,{pageAnswers:Te,answersByPage:it.answersByPage,pages:S,currentPageId:he}));return typeof O=="function"&&await Promise.resolve(O(Y))||Y}const Ze=Object.entries(Te).map(([Y,pe],je)=>({index:je,key:Y,payload:pe})),He={results:Ze,answers:Ze,score:0};return typeof O=="function"&&await Promise.resolve(O(He))||He},cn=()=>{const he=++At.current,Te=()=>he!==At.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(T){const He=zt();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}if($){const He=Ht();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}const ze=Ce.current&&Ce.current._childOnResult,Ze=He=>{try{return He?He():void 0}catch{return}};if(typeof ze=="function"){const He=Ze(ze);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{pe&&!Te()?st(pe):Y()}).catch(pe=>{Y()});return}if(typeof O=="function"){const He=Ze(O);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}pe&&!Te()?st(pe):Y()}).catch(pe=>{console.error("viewResults external handler failed",pe),Y()});return}},Yt=()=>{if(T){if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return cn()}if($){const Te=wt.length;if(typeof ht=="number"&&ht<Te-1){bt(ze=>({...ze,stepIndex:ze.stepIndex+1}));return}if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(ze=>({...ze,pageIndex:ze.pageIndex+1,stepIndex:0}));return}return cn()}if(typeof C=="function"){try{C()}catch{}return}const he=Ce.current&&Ce.current._childOnNext;if(typeof he=="function"){try{he()}catch{}return}},Tt=T?K.title||K.label||w||M("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),Jt=w||Tt,en=T?K.title??K.label??Tt:a??_??Tt,An=(he,Te)=>{const ze=Or(Le,de),Ze=zr(he,Te),He=it.answersByPage[ze]?.[Ze],Y=ew(he,{page:Le,pageIndex:de,step:he,stepIndex:Te,storedPayload:He,answersByPage:it.answersByPage,flowState:it}),pe={key:Ze,index:Te,stepIndex:ht,isLast:Te===Se.length-1};switch(he?.type){case"listen":return n.jsx(Es,{...pe,...Y,onDone:je=>Oe(he,Te,je)});case"confirm":return n.jsx(As,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"confirmWithText":return n.jsx(Ns,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"orderList":return n.jsx(Ds,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});default:return null}},Nn=o.useRef(void 0);o.useEffect(()=>{const he=Nn.current;if(Nn.current=de,he===void 0||he===de||!Nr())return;const Te=Ce.current;if(!Te)return;const ze=document.activeElement;if(!(!ze||ze===document.body||!Te.contains(ze)||ze.disabled===!0))return;const Ze=Te.querySelector(`.training-steps ${Dn.split(", ").join(", .training-steps ")}`)??Array.from(Te.querySelectorAll(Dn)).find(He=>!He.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[de]);const gn=T?ee.length>0?n.jsx("div",{className:"training-steps",children:Se.map((he,Te)=>An(he,Te))},`replay-${xe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||M("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Pt=$?n.jsxs(hd.Provider,{value:Qe,children:[mt?.pageTop?n.jsx("div",{className:"training-page-top",children:mt.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((he,Te)=>{const ze=he;return o.cloneElement(ze,{...ze.props,_stepIndex:Te,_totalSteps:wt.length,_stepKey:`step-${Te}`,_pageIndex:de})})},`replay-${xe}`),mt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:mt.pageBottom}):null]}):null,St=o.useRef(-1),Mt=o.useCallback(()=>{if(!N)return;const he=ot,{results:Te,correct:ze,total:Ze}=Ls(ot),He={correct:ze,total:Ze,attempt:nt.current.length+1,previousAttempts:[...nt.current]};if(St.current===Nt.current)return He;St.current=Nt.current,Ff({items:Gf(Te),category:wd.has(N)?"sentence":"word",trainingType:N,entryPoint:k??"sentence",itemRef:A??null,correct:ze,total:Ze,score:typeof he?.score=="number"?he.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-q.current)/1e3)),dailyTotal:D??null});try{y?.(He)}catch{}return He},[N,k,D,A,ot,y]);o.useEffect(()=>{!ot||ot===zn||ot?.isEmpty||(Ls(ot).total??0)>0&&Mt()},[ot,Mt]);const Gt=o.useCallback(()=>{const he=Mt();Ot(),Ye(()=>{typeof b=="function"&&b(he),typeof m=="function"&&m()})},[b,m,Mt,st,Ye]),dn=o.useCallback(()=>xt(""),[xt]),yn=o.useCallback(()=>{Ye(()=>{typeof m=="function"&&m()})},[m,Ye]),Vt=n.jsxs("div",{className:`page-popup${rt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Jt,children:[n.jsxs("div",{ref:Ce,className:`page-popup__panel ${vt?"":"page-popup__panel--measuring"} ${ct==="center"?"page-popup__panel--center":ct==="top"?"page-popup__panel--top":""}`,children:[n.jsx(id,{title:en,subtitle:T?K.subtitle||K.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?K.depth:s,icon:T?K.icon:l,wrapperStyle:T?K.wrapperStyle:i,iconTooltip:T?K.iconTooltip:u,progressMax:Rt,progressIndex:de,pageIndex:de,pageCount:Rt,onBack:yn,onClose:yn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ct==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:$?Pt:T?gn:typeof g=="function"?g({registerOnNext:Me,registerOnResult:tt,panelRef:Ce,setResultOverlay:st}):g})}),n.jsx(ld,{onSettings:f,onNext:Yt,onResult:cn,useNoiseSettingBtn:!!(T?K.useNoiseSetting??!0:x),stepIndex:ht,stepCount:Je,pageIndex:de,pageCount:Rt,resultOpen:!!(ot&&!ot.isEmpty),hideNoiseRows:L})]}),ot&&!ot.isEmpty&&(B??aw)({score:ot.score,results:ot.results||ot.answers||[],contextsLength:ot.results?ot.results.length:ot.answers?ot.answers.length:0,onReplay:()=>{if(q.current=Date.now(),ot!==zn){const{correct:he,total:Te}=Ls(ot);nt.current.push({correct:he,total:Te})}if(Ot(),$e(he=>he+1),T){if(bt(Wr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if($){bt(Wr());return}try{const he=Ce.current&&Ce.current._childOnResult;typeof he=="function"&&he({replay:!0})}catch{}},onClose:Gt,pending:ot===zn}),ot?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(be,{htmlType:"button",variant:"main",size:48,onClick:Gt,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Ba,{message:Wt,position:"top",onClose:dn})]}),En=n.jsx(vs.Provider,{value:ye,children:Vt});return typeof document<"u"&&document.body?hn.createPortal(En,document.body):En}const Zn=rw;Zn.Page=Fr,Zn.ListenStep=md,Zn.ConfirmStep=Cd,Zn.ConfirmWithTextStep=fd,Zn.OrderListStep=bd,Zn.CardStep=gd,Zn.CardOrderStep=Wx;function ow(e=[]){const t=o.useRef(null),a=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const b=Math.min(i.length,Math.ceil((m+c)/(u+c)));b<=1||(h.style.gridColumn=`span ${b}`,h.setAttribute("data-wide",""))}},[]),r=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))a(l)},[a]);return o.useLayoutEffect(()=>{r();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>r());return l.observe(s),()=>l.disconnect()},[r,...e]),t}function sw({label:e,homonum:t}){const a=Ca()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=as(a);return l?n.jsxs("div",{className:ue("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ue("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:ue("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Bd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,p=t.top-i-8;p<8&&(p=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:p})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:ue("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:ue("word-image-tooltip__cells"),children:e.map(l=>n.jsx(sw,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function lw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:b,showEmptyText:y=!0,sectionType:C="page",disc:f}){const{t:x,i18n:g}=ke.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:_,openAt:E,close:v}=_r(),[N,k]=o.useState(null),D=o.useCallback(()=>{v(),k(null)},[v]);Yy(D,!!N);const A=(r??"").trim(),B=/^[^,[\]\s]+$/.test(A)?A:"",F=B.length>0,L=r===void 0&&t===void 0,q=F?"match":L?"original":"ganada",[M,O]=o.useState(()=>q),[T,G]=o.useState("50"),[K,ee]=o.useState(1),[re,R]=o.useState(F);re!==F&&(R(F),O(q));const J=M==="match"&&!F||M==="original"&&!L?q:M,ne=o.useMemo(()=>[...F?[{value:"match",label:x("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{value:"original",label:x("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:x("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:x("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:x("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:x("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:x("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:x("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[x,F,L]),S=o.useMemo(()=>["10","25","50","100"].map(se=>({value:se,label:x("wordSearch.pageSize",{count:Number(se),defaultValue:`${se}\uAC1C\uC529 \uBCF4\uAE30`})})),[x]),$=se=>se.words?.[0],I=o.useMemo(()=>{const se=[...B].length,ye=vf(B),Ce=new Map;return xe=>{let $e=Ce.get(xe);return $e===void 0&&($e=ye((xe.words?.[0]?.label??"").slice(0,se))?0:1,Ce.set(xe,$e)),$e}},[B]),P=o.useCallback((se,ye)=>{const Ce=nt=>$(nt)?.label??"",xe=nt=>$(nt)?.syllables??[...Ce(nt)].length,$e=nt=>(nt.words??[]).reduce((ct,at)=>{const rt=parseInt(at.grade??"",10);return Number.isFinite(rt)&&rt<ct?rt:ct},999);switch(J){case"match":return I(se)-I(ye)||fn(Ce(se),Ce(ye));case"ganada":return fn(Ce(se),Ce(ye));case"ganada_desc":return fn(Ce(ye),Ce(se));case"syllable":return xe(se)-xe(ye)||fn(Ce(se),Ce(ye));case"syllable_desc":return xe(ye)-xe(se)||fn(Ce(se),Ce(ye));case"grade":return $e(se)-$e(ye)||fn(Ce(se),Ce(ye));case"grade_desc":return $e(ye)-$e(se)||fn(Ce(se),Ce(ye));default:return 0}},[J,I]),V=o.useMemo(()=>s.slice().sort(P),[s,P]),ie=Number(T)||10,U=o.useMemo(()=>(l??[]).flatMap(se=>se.items.slice().sort(P).map(ye=>({item:ye,label:se.label}))),[l,P]),ce=l?U.length:V.length,Z=Math.max(1,Math.ceil(ce/ie)),H=Math.min(K,Z),te=o.useMemo(()=>V.slice((H-1)*ie,H*ie),[V,H,ie]),W=o.useId(),z=o.useMemo(()=>{if(!l)return null;const se=U.slice((H-1)*ie,H*ie),ye=new Map;for(const{item:Ce,label:xe}of se)ye.has(xe)||ye.set(xe,[]),ye.get(xe).push(Ce);return[...ye.entries()].map(([Ce,xe])=>({label:Ce,items:xe}))},[l,U,H,ie]);o.useEffect(()=>{ee(1)},[M,T,ce,r]);const ae=ce>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(xn,{size:Lt,options:ne,value:J,onChange:O,ariaLabel:x("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(xn,{size:Lt,options:S,value:T,onChange:G,ariaLabel:x("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Ho,{page:H,totalPages:Z,onChange:ee})]}):void 0,ve=se=>{u&&u(se)},me=t!==void 0&&a?n.jsxs(n.Fragment,{children:[x("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),x("wordSearch.resultTitleSuffix",{unit:w?jf(a):a})]}):void 0,le=t!==void 0&&t>0&&c!==void 0&&a?x("wordSearch.resultDisc",{unit:w?Mf(a):a,max:c,selected:i.length}):void 0,Be=f??le,Pe=l?l.length===0:s.length===0,Fe=ow([l,te,M,ie,K]),Ae=Pe&&!y&&!b;return n.jsxs(ka,{type:C,className:De("word-search-result-block",m),children:[n.jsxs("div",{ref:Fe,className:De("word-search-result-block__inner",Ae&&"word-search-result-block__inner--head-only"),children:[(me||ae||Be)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(lt,{icon:e,className:"word-search-result-block__head-icon"}),me&&n.jsx("span",{className:"word-search-result-block__title h3",children:me})]}),ae&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ae}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),Pe&&(y||b)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:x("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),l?(z??[]).map(se=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${W}-${se.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${W}-${se.label}`,children:se.label}),n.jsx("div",{className:"word-search-result-block__items",children:se.items.map(ye=>{const Ce=i.includes(ye.id);return n.jsx("div",{onMouseEnter:xe=>{E(xe.currentTarget),k(ye.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(xe=>xe.label),subLabel:(ye.words??[]).some(xe=>xe.subLabel)?(ye.words??[]).map(xe=>xe.subLabel):void 0,selected:Ce,onClick:()=>ve(ye.id),minWidth:200})},ye.id)})})]},se.label)):n.jsx("div",{className:"word-search-result-block__items",children:te.map(se=>{const ye=i.includes(se.id);return n.jsx("div",{onMouseEnter:Ce=>{E(Ce.currentTarget),k(se.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(se.words??[]).map(Ce=>Ce.label),subLabel:(se.words??[]).some(Ce=>Ce.subLabel)?(se.words??[]).map(Ce=>Ce.subLabel):void 0,selected:ye,onClick:()=>ve(se.id),minWidth:200})},se.id)})}),N&&_&&n.jsx(Bd,{words:N,anchorRect:_})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:x("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function iw(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function uw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:b,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:g=!1,searchLabel:w,searchChecking:_=!1,pairMode:E=!1,sectionType:v="page",beforeSearchContent:N,beforeContent:k,afterContent:D,hideCountControl:A=!1,ordinal:B=!1}){const{t:F}=ke.useTranslation(),L=o.useMemo(()=>F("wordPairs.infoNotes",{returnObjects:!0}),[F]),q=o.useMemo(()=>Array.from({length:s-l+1},($,I)=>{const P=l+I;return{key:String(P),label:F("wordPairs.count",{n:P})}}),[F,s,l]),M=o.useMemo(()=>F("wordPairs.ordinals",{returnObjects:!0}),[F]),O=o.useCallback($=>B?F("wordPairs.phonemeOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeSingleLabel","\uC74C\uC808"):F("wordPairs.phonemeN",{n:$}),[B,M,a,F]),T=o.useCallback($=>B?F("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):F("wordPairs.phonemeContrast",{n:$}),[B,M,a,F]),G=o.useCallback(($,I)=>I?n.jsxs(n.Fragment,{children:[$,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):$,[]),{anchorRect:K,toggleAt:ee,close:re}=_r(),R=o.useCallback($=>r(Number($)),[r]),J=vn("(max-width: 767px)"),ne=o.useCallback($=>iw($,e).map(({label:I,value:P,displayLabel:V})=>{const ie=!!P&&P!=="\uC5C6\uC74C";return n.jsxs("span",{className:De("phoneme-select-block__cell-jamo-part",P?"":"phoneme-select-block__cell-jamo-part--empty",ie?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${P==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:P==="\uC5C6\uC74C"?"x":P||p}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:V??I})]},I)}),[e,p]),S=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:J?"dot":void 0,icon:"info",label:J?void 0:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:K?"is-selected":void 0,"aria-expanded":!!K,"aria-haspopup":"dialog",onClick:$=>ee($.currentTarget)})}),K&&n.jsx(Un,{title:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:K,onClose:re})]});return n.jsxs(ka,{type:v,title:d,icon:m,disc:b,action:y?S:void 0,className:De("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(_n,{options:q,value:String(a),onChange:R,size:40,ariaLabel:F("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:E?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:F("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(I+1)})]},I)})})]}):t.map(($,I)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ne($)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:E?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2]??{};return n.jsx(On,{title:G(O(I+1),I===0),sections:u?u(P,I*2):i,selected:P,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2+1]??{};return n.jsx(On,{title:T(I+1),sections:u?u(P,I*2+1):i,selected:P,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map(($,I)=>n.jsx(On,{title:G(O(I+1),I===0),sections:u?u($,I):i,selected:$,onSelect:c?.(I),align:"newline"},I))})}),N&&n.jsx("div",{className:"phoneme-select-block__before-search",children:N}),(C||f||_)&&(()=>{const $=t.every(I=>{const P=ff(I);return Object.entries(P).every(([V,ie])=>!ie||V==="coda"&&ie===Il)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:$?x:void 0,children:[C&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:F("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:$,onClick:$?void 0:C}),f?n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:$||g||_,onDisabledClick:_?()=>{}:void 0,"aria-busy":_||void 0,onClick:f}):_?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:w??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function cw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=ke.useTranslation();return n.jsx(On,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function dw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=ke.useTranslation();return a.length===0?null:n.jsx(On,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function pw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=ke.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=f=>h("wordPairs.count",{n:f}),b=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(Za,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(Za,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(Za,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],y={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:r==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},C=(f,x)=>{x===d.searchMode?a(f===d.explicit?"explicit":f===d.pick?"pick":"include"):x===d.phonemeOrder?s(f===d.orderMatch?"ordered":"unordered"):x===d.count?i(f===m(2)?2:1):x===d.inputMode&&c(f===d.pronInput?"phoneme":"word")};return n.jsx(On,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:y,onSelect:C,align:"inline"})}function hw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:b,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:g,countLabel:w,topContent:_,className:E=""}=e,{t:v}=ke.useTranslation(),N=u??v("common.search","\uAC80\uC0C9"),k=x??v("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=g??v("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,B]=o.useState(""),[F,L]=o.useState(p??r[0]?.key??""),[q,M]=o.useState(h),[O,T]=o.useState(String(f??C[0]??10)),[G,K]=o.useState(1);o.useEffect(()=>{K(1)},[A,O]);const ee=c!==null,re=o.useCallback((U,ce)=>{if(!ce)return!0;const Z=ce.toLowerCase();return r.some(H=>{const te=U[H.key];return te==null?!1:String(te).toLowerCase().includes(Z)})},[r]),R=c??re,J=o.useMemo(()=>{const U=ee?a.filter(ce=>R(ce,A)):a;return F?[...U].sort((ce,Z)=>{const H=ce[F],te=Z[F];return H===te?0:vr(H,te,q)}):U},[a,A,F,q,ee,R]),ne=Math.max(1,Math.ceil(J.length/Number(O)));G>ne&&K(ne);const S=Math.min(G,ne),$=J.slice((S-1)*Number(O),S*Number(O)),I=o.useCallback(U=>{F===U?M(ce=>!ce):(L(U),M(!0)),K(1)},[F]),P=o.useMemo(()=>{if(typeof w=="function"){const U=J.length,ce=w(U);if(typeof ce=="string"){const Z=ce.lastIndexOf(String(U));if(Z>=0)return{prefix:ce.slice(0,Z),suffix:ce.slice(Z+String(U).length)}}return{label:ce}}if(typeof w=="string"&&w.includes("{n}")){const[U,ce]=w.split("{n}");return{prefix:U,suffix:ce}}return{prefix:v("common.totalCountPrefix","\uCD1D "),suffix:v("common.totalCountSuffix","\uAC1C")}},[w,J.length,v]),V=o.useMemo(()=>r.map(U=>({label:U.label,onClick:U.sortable!==!1?()=>I(U.key):void 0,className:U.className,sortDir:U.sortable!==!1&&F===U.key?q?"asc":"desc":null})),[r,F,q,I]),ie=o.useMemo(()=>C.map(U=>({value:String(U),label:v("common.pageSizeLabel",{n:U})})),[C,v]);return n.jsxs(Fn,{className:`popup-list ${E}`,title:t,onClose:y,children:[_,"label"in P&&n.jsx("p",{className:"toolbar__count body-1",children:P.label}),n.jsx(Vo,{count:"label"in P?void 0:{value:J.length,prefix:P.prefix,suffix:P.suffix},search:ee?{value:A,onChange:B,placeholder:N}:void 0,pageSize:{options:ie,value:O,onChange:T},pagination:{page:S,total:ne,onChange:K}}),n.jsx(ts,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:V,items:$,onRowClick:b,renderRow:U=>{const ce=m!=null?U.id!=null&&m.has(U.id):d!=null&&U.id===d;return r.map(Z=>({content:Z.render?Z.render(U):U[Z.key]??"",className:De(Z.className,ce&&"popup-list__row--selected")}))},empty:ee&&A!==""&&a.length>0?D:k})]})}function kd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:m,closeOnConfirm:b=!0,onClose:y,inline:C,size:f="small",className:x,initialFocus:g="close"}=e,{t:w}=ke.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||g==="close")return;const A=_.current?.closest(".popup-panel"),B=Array.from(A?.querySelectorAll(".popup-footer--buttons button")??[]),F=g==="confirm"?B[B.length-1]:c?void 0:B[p?1:0];F&&!F.disabled&&F.focus()},[]);const E=o.useRef(!1),[v,N]=o.useState(!1),k=A=>{let B=!1;return{close:()=>{B=!0,A()},didClose:()=>B}},D=async A=>{if(E.current)return;E.current=!0;const B=typeof document<"u"?document.activeElement:null;N(!0);let F=!1;try{F=await A()}catch(L){typeof console<"u"&&console.error(L)}finally{F||(E.current=!1,N(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&B?.isConnected&&B.focus()}))}};return n.jsxs(Fn,{title:t,onClose:y,closeDisabled:v,inline:C,size:f,className:De("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);await p.onClick(B.close);const F=p.closeOnClick??!0;return F&&A(),F||B.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:v,onClick:({closeWithAnimation:A})=>A()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:d||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);return await m(B.close),b&&A(),b||B.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(nr,{children:s.map((A,B)=>n.jsx(un,{label:A.label,children:n.jsx("span",{className:"panel-row__text body-2",children:A.value})},B))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function mw(e,t,a={}){const{t:r}=ke.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(kd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function Cw({onApply:e,onCancel:t}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(Hl(f)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&d(C)},[d]),b=y=>{s(y.target.value),c(null)};return n.jsx(Fn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:y})=>y()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:y})=>{d(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:C=>m(C,y),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const Ad=["var(--color-main)","var(--color-sub)"],fw=2e3;function bw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function $s({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),f=t-C,x=(g,w)=>Array.from({length:g}).map((_,E)=>{const v=6+Math.random()*12,N=Math.round(Math.min(18,v*Math.min(1.5,1+r*.4))),k=Ad[Math.floor(Math.random()*Ad.length)],D=Math.random()*300,A=(360+Math.random()*260)*r*1.2,B=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,F=Math.cos(B)*A,L=Math.sin(B)*A*1.35,q=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),O=Math.random()>.7?"50%":"3px";return{id:`${w}-${E}`,side:w,size:N,color:k,delay:D,vx:F,vy:L,angularVel:q,life:M,borderRadius:O}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),b=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const re=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(re)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),w=re=>Math.max(40,(re||window.innerWidth)*.02),_=x?.width||window.innerWidth||375,E=x?.height||window.innerHeight||812,v=re=>{const R=[...re].sort((J,ne)=>J-ne);return R[Math.floor(R.length/2)]||1},N=v(i.map(re=>Math.abs(re.vy))),k=v(i.map(re=>Math.abs(re.vx))),D=Math.sqrt(2*C*(E*.72+g))/N,A=N*D/C,B=_*.5/(k*A),F=(re,R,J)=>Math.min(J,Math.max(R,re)),L=F(D,.8,2.4),q=F(B,.7,2.2),M=a>0?a/fw:1,O=i.map(re=>({...re,life:re.life*M,vx:re.vx*q,vy:re.vy*L,startTime:f+re.delay,ended:!1})),T=x?{x:x.left-w(x.width),y:x.top+x.height+g}:{x:-w(window.innerWidth),y:window.innerHeight+g},G=x?{x:x.left+x.width+w(x.width),y:x.top+x.height+g}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+g},K=re=>{let R=!1;for(const J of O){const ne=c.current[J.id];if(!ne||!ne)continue;if(re<J.startTime){ne.style.display="none",R=!0;continue}if(!J._inited){const H=J.side==="left"?T.x:G.x,te=J.side==="left"?T.y:G.y;ne.style.left=`${H}px`,ne.style.top=`${te}px`,ne.style.transform="translate3d(0px, 0px, 0)",ne.style.display="block",ne.style.zIndex="100000",typeof J.color=="string"&&J.color.startsWith("var(")&&(ne.style.background=bw(ne,J.color)??"#FF0060"),J._inited=!0}const S=(re-J.startTime)/1e3;if(S<0)continue;const $=J.life/1e3;if(S>=$){ne.style.opacity="0",ne.style.display="none",J.ended=!0;continue}R=!0;const I=J.side==="left"?T.x:G.x,P=J.side==="left"?T.y:G.y,V=I+J.vx*S,ie=P+J.vy*S+.5*C*S*S,U=(J.angularVel||0)*S,ce=V-I,Z=ie-P;ne.style.transform=`translate3d(${ce}px, ${Z}px, 0) rotate(${U}deg)`,ne.style.opacity=`${Math.max(0,1-S/$)}`}R?p.current=requestAnimationFrame(K):h.current?.()};p.current=requestAnimationFrame(K);const ee=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const re=document.createElement("div");re.className="party-container",re.style.position="fixed",re.style.inset="0",re.style.pointerEvents="none",re.style.overflow="visible",re.style.zIndex="2147483647";for(const R of i){const J=document.createElement("span");J.className=`confetti confetti--${R.side}`,J.setAttribute("aria-hidden","true"),J.style.display="none",J.style.position="fixed",J.style.left="0px",J.style.top="0px",J.style.width=`${R.size}px`,J.style.height=`${Math.max(4,R.size*.6)}px`,J.style.background=R.color,J.style.borderRadius=R.borderRadius,J.style.transform="translate3d(0,0,0)",J.style.opacity="0",re.appendChild(J),c.current[R.id]=J}(document.body||m.current).appendChild(re),d.current=re}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ee),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,a,l,i]),!e)return null;const y=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:f=>{c.current[C.id]=f},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?hn.createPortal(y,m.current||document.body):y}const Rs=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function gw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Rs(u.count),strength:Rs(u.strength),duration:Rs(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx($s,{active:t,trigger:e}),a&&n.jsx($s,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function yw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=ke.useTranslation();$y(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(be,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(ln,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function vw(e){return e??""}const Nd=o.createContext({words:[],loading:!1});function _w(){return o.useContext(Nd)}function xw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(Nd.Provider,{value:h,children:p})}function ww({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:De("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const Bw=(e,t)=>`${e} / ${t}`;function kw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Bw,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=ke.useTranslation(),d=o.useRef(null),m=o.useRef(null),b=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[x,g]=o.useState(!1);o.useEffect(()=>{const M=d.current;if(!M)return;const O=()=>g(M.scrollWidth>M.clientWidth+1);if(O(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(O);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),_=C&&C.shape===w?C.pages:null,[E,v]=o.useState(0);o.useEffect(()=>{const M=y.current;if(!M||typeof ResizeObserver>"u")return;const O=new ResizeObserver(()=>v(M.offsetHeight));return O.observe(M),()=>O.disconnect()},[]);const[N,k]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let O=null;const T=typeof requestAnimationFrame=="function"?ee=>requestAnimationFrame(ee):ee=>setTimeout(ee,16),G=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ee=>clearTimeout(ee),K=new ResizeObserver(()=>{O==null&&(O=T(()=>{O=null,k(ee=>ee+1)}))});return Array.from(M.children).forEach(ee=>K.observe(ee)),()=>{K.disconnect(),O!=null&&G(O)}},[w]),o.useLayoutEffect(()=>{const M=m.current,O=y.current;if(!M||!O)return;const T=$=>$.getBoundingClientRect().height||$.offsetHeight,G=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach($=>{G.set($.dataset.chromeSection??"",T($))});const K=$=>T(O)-(G.get($??"")??0),ee=Array.from(M.children).map($=>T($)),re=[];e.forEach(($,I)=>{const P=re[re.length-1],V=P?e[P[0]]:void 0;V&&$.group!=null&&V.group===$.group&&V.section===$.section?P.push(I):re.push([I])});const R=[];let J=[],ne=0;const S=()=>{J.length&&R.push(J),J=[],ne=0};re.forEach($=>{const I=$.reduce((V,ie)=>V+ee[ie],0),P=K(e[$[0]].section);J.length&&e[J[0]].section!==e[$[0]].section&&S(),I>P?$.forEach(V=>{J.length&&ne+ee[V]>P+.01&&S(),J.push(V),ne+=ee[V]}):(J.length&&ne+I>P+.01&&S(),$.forEach(V=>J.push(V)),ne+=I)}),S(),f($=>$&&$.shape===w&&JSON.stringify($.pages)===JSON.stringify(R)?$:{shape:w,pages:R})},[w,E,l,i,u,N]);const D=Po,A=D,B=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:A,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),F=(M,O,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:B}),n.jsx("span",{className:"report-doc__page-no",children:s(M,O)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),q={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return n.jsxs("div",{ref:d,className:De("report-doc",c),style:q,tabIndex:x?0:void 0,role:x?"group":void 0,"aria-label":x?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:y,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:L.map(M=>{const O=F(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[O.header,O.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((M,O)=>{const{header:T,footer:G}=F(O+1,_.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(K=>n.jsx("div",{children:e[K].content},e[K].id)),G]},O)})})]})}function Aw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:De("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const da=new Map;let Hr=null;const Nw=12;function Ew(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Vr(){const e=new Map;for(const t of da.keys()){if(!t.isConnected)continue;const a=Ew(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+Nw)}}}function Dw(e){return typeof window>"u"?()=>{}:(da.set(e,(da.get(e)??0)+1),da.get(e)===1&&typeof ResizeObserver<"u"&&(Hr??(Hr=new ResizeObserver(()=>Vr())),Hr.observe(e)),Vr(),()=>{const t=(da.get(e)??1)-1;if(t>0){da.set(e,t),Vr();return}da.delete(e),Hr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Vr()})}function Sw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=ke.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,b=m?Dw(m):null;return()=>{b?.(),h.current&&d&&d.contains(document.activeElement)&&fr(d)}},[]),n.jsxs("div",{ref:p,className:De("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Ks,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(be,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function jw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:p,onDragStart:h,onDragEnd:d,className:m}){const b=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(x=>{c&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),c())},[c]);return n.jsxs("div",{className:De("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?f:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:p,onDragStart:h,onDragEnd:d,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:x=>x.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),y&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function Tw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:b,children:y,className:C}){const{t:f}=ke.useTranslation(),x=o.useId(),g=t?`h${t}`:"span",w=s!=null,_=De("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:d,onDragLeave:m,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?x:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(g,{id:x,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:E=>E.stopPropagation(),children:[l,i&&n.jsx(xn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const Mw="speechear:saved_word_tables";function Lw(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function $w(){try{const e=localStorage.getItem(Mw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Lw):[]}catch{return[]}}function Ed(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function Ps(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Rw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Pw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:b,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReset:v,resetLabel:N,saveButtonLabel:k,secondarySaveButtonLabel:D,onReorder:A,showCellCount:B,onAddItem:F,className:L,renderSavePopup:q,renderWordSearch:M,hideControls:O,saveOnly:T,tableName:G,nameValue:K,onNameChange:ee,descriptionValue:re,onDescriptionChange:R,namePlaceholder:J,descriptionPlaceholder:ne,existingNames:S,editingName:$,onCancel:I,initialItemsPerPage:P,renderCellAction:V,actionsLeftExtra:ie}){const{t:U}=ke.useTranslation(),ce=N??U("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),Z=C===void 0,H=!!ee,[te,W]=o.useState([]),z=(K??"").trim(),ae=z||(J??"").trim(),ve=(re??"").trim()||(ne??"").trim(),me=(S??[]).map(we=>we.trim().toLowerCase()),le=[$?.trim().toLowerCase(),...te].filter(we=>!!we),Be=[...me];for(const we of le){const Ie=Be.indexOf(we);Ie!==-1&&Be.splice(Ie,1)}const Pe=z!==""&&Be.includes(z.toLowerCase()),[Fe,Ae]=o.useState(Array(4).fill(null)),[se,ye]=o.useState(4),[Ce,xe]=o.useState(null),$e=Fe.slice(0,se),nt=!!p?.show,[ct,at]=o.useState(!0),[rt,Ee]=o.useState(!0),Ue=p&&{...p,top:ct,bottom:rt},[Ne,Ye]=o.useState("landscape"),[et,ft]=o.useState([...wc]),[vt,dt]=o.useState("show"),[jt,ot]=o.useState(!0),[st,At]=o.useState(!0),Nt=o.useRef(null),Ot=o.useRef([]),[Wt,xt]=o.useState(P==="all"?Number.POSITIVE_INFINITY:P??8),[it,bt]=o.useState("right"),[pt,kt]=o.useState(!1),[mt,wt]=o.useState(!1),{toastMessage:de,toastType:Le,showWarning:Se,clearToast:Je}=Zi("warning"),ht=o.useCallback(()=>xe(null),[xe]);d&&Z&&Dt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[Rt,Me]=o.useState(()=>Math.max(C?.length??1,1)),tt=Math.max(b??0,C?.length??0,1),Ft=b!=null||!!B,_t=Z?se:B?Math.max(Rt,C?.length??1,1):tt,{width:Q,height:_e}=sa[Ne],Oe=!Z&&!B,Ve=Math.max(1,Math.min(tt,y??tt)),Bt=Math.min(Wt,Ve),Qe=Oe?Bt:_t,zt=Math.ceil((C?.length??0)/Math.max(1,Qe)),Ht=(C?.length??0)<tt?Math.floor((C?.length??0)/Math.max(1,Qe))+1:0,cn=Oe?Math.max(1,zt,Ht):0,Yt=Oe?Array.from({length:cn},(we,Ie)=>(C??[]).slice(Ie*Qe,(Ie+1)*Qe)):null,Tt=!!Yt&&Yt.length>1,Jt=Z?$e.some(we=>we!==null&&we.length>1):(C??[]).some(we=>(we.words??[]).length>1),en=G?.trim()||`${Jl(Wa())} ${Jt?U("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):U("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,An=o.useCallback(()=>Tt?Ot.current.filter(we=>we!==null):Nt.current?[Nt.current]:[],[Tt]),{print:Nn,openNewWindow:gn,downloadHtml:Pt}=Cs({getElements:An,paperW:Q,paperH:_e,fileName:en,onPopupBlocked:()=>{Se(U("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),St=we=>{ye(we),Ae(Ie=>Ie.length>=we?Ie:[...Ie,...Array(we-Ie.length).fill(null)]),xe(null)},Mt=we=>{Ae(Ie=>{const ut=[...Ie];return ut[we]=null,ut}),Ce===we&&xe(null)},Gt=we=>{if(Ce===null)return;const Ie=Ce;Ae(Et=>{const pn=[...Et];return pn[Ie]=we.length>0?we:null,pn});const ut=$e.findIndex((Et,pn)=>pn>Ie&&Et===null);xe(ut!==-1?ut:null)},dn=Z?$e.some(we=>we?.some(Ie=>!!Ie.colloquialPronunciation)):(C??[]).some(we=>(we.words??[]).some(Ie=>!!Ie.colloquialLabel)),yn=!Z&&Bc([...d?[d]:[],...C??[]]),Vt=o.useMemo(()=>Ca()?Z?Fe.slice(0,se).flatMap(we=>(we??[]).map(Ie=>[Ie.word,Ie.homonum])):(we=>we.flatMap(Ie=>(Ie.words??[]).map(ut=>[ut.label,ut.homonum])))([...d?[d]:[],...C??[]]):[],[Z,Fe,se,C,d]),[En,he]=o.useState(!1);o.useEffect(()=>{if(Vt.length===0)return;let we=!1;return Promise.all(Vt.map(([Ie,ut])=>$l(Ie,ut))).then(Ie=>{we||he(Ie.some(Boolean))},()=>{}),()=>{we=!0}},[Vt]);const Te=Vt.length>0&&En,ze=o.useMemo(()=>[...Z||B?[{label:U("wordTable.filter.columns","\uCE78 \uC218"),items:e_.map(we=>({value:`${we}\uCE78`,displayLabel:U("wordTable.filter.column",{count:we})})),display:"segmented"}]:[],...Oe&&(C?.length??0)>0?[Tc(U,{hasPairs:Jt,itemCount:tt,max:y})]:[],...Tt?[n_(U)]:[]],[U,Z,B,Oe,C?.length,Jt,tt,y,Tt]),Ze={...Z||B?{[U("wordTable.filter.columns","\uCE78 \uC218")]:`${_t}\uCE78`}:{},...Oe&&(C?.length??0)>0?{[U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Bt}\uAC1C`}:{},...Tt?{[U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:it}:{}},He=(we,Ie)=>{Ie===U("wordTable.filter.columns","\uCE78 \uC218")?Z?St(parseInt(we)):Me(parseInt(we)):Ie===U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Mc(parseInt(we),tt)):Ie===U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&bt(Lc(we))},Y=Z?Rw($e.filter(we=>we!==null&&we.length>0).map(we=>({id:Ps(we),words:we.map(Ed)}))):C??[],pe=()=>{Z&&Ae(we=>we.length>se?we.slice(0,se):we)},je=(we=!1)=>{if(wt(we),H&&f){const Ie=ae.trim().toLowerCase();Ie&&W(ut=>ut.includes(Ie)?ut:[...ut,Ie]),f(ae,Y,ve||void 0,we),pe();return}if(T&&f){f("",Y,void 0,we),pe();return}if(f){kt(!0);return}Pt()},[qe,Ge]=o.useState(!1),[Xe,gt]=o.useState(""),Ct=Xe.trim(),ge=Ct!==""&&me.includes(Ct.toLowerCase()),j=()=>{gt(ae?U("wordTable.save.copyName",{name:ae,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ge(!0)},X=()=>{!Ct||ge||!f||(f(Ct,Y,ve||void 0,!0),pe(),Ge(!1))},fe=Y.length===0,Re=fe||H&&(ae===""||Pe),We=()=>{if(fe){Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&ae===""){Se(U("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Pe&&Se(U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Ke=n.jsx(Aa,{items:Y,orientation:Ne,contentTypes:et,baseItem:d,baseContentTypes:m,cutLine:vt,showOutline:jt,showDivLine:st,count:_t});return n.jsxs(n.Fragment,{children:[n.jsxs(ka,{type:"page",icon:t,title:e,disc:a,className:De("word-table-block",L),children:[qe&&n.jsx(Fn,{size:"small",title:D??U("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ge(!1),footer:({closeWithAnimation:we})=>n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:48,type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:we}),n.jsx(be,{htmlType:"button",size:48,type:"bar",variant:"main",label:U("common.save","\uC800\uC7A5"),disabled:!Ct||ge,onClick:X})]}),children:n.jsx(Yn,{label:U("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:gt,placeholder:U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:X,error:ge?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),pt&&f&&q?.({defaultName:typeof e=="string"?e:U("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Ke,previewW:Q,previewH:_e,items:Y,existingNames:$w().map(we=>we.name),saveAsNew:mt,onSave:(we,Ie)=>{f(we,Y,Ie,mt),pe(),kt(!1)},onCancel:()=>kt(!1)}),(Z||F)&&Ce!==null&&M?.({cellIndex:Ce,onConfirm:Z?Gt:we=>{if(F){const Ie=we[0];if(Ie){const ut=new Set((C??[]).map(pn=>pn.id));let Et=Ps([Ie]);for(let pn=2;ut.has(Et);pn++)Et=`${Ps([Ie])}~${pn}`;F({id:Et,words:[Ed(Ie)]})}}xe(null)},onClose:ht}),!O&&n.jsx(ds,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Te,hasColloquial:dn,hasCaption:yn,contentTypes:et,orientation:Ne,showOutline:jt,cutLine:vt,showDivLine:st,setters:{setContentTypes:ft,setOrientation:Ye,setShowOutline:ot,setCutLine:dt,setShowDivLine:At,setShowTopInfo:at,setShowBottomInfo:Ee},showCutLine:(Oe?Qe:_t)>1,showDivLine2:Jt,middleSections:ze,extraSelected:Ze,onExtraSelect:He,showPaperBands:nt,showTopInfo:ct,showBottomInfo:rt}),Tt&&Yt?n.jsx("div",{className:"word-table-block__pages",children:Yt.map((we,Ie)=>n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:Qe,items:we,baseItem:d,baseContentTypes:m,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReorder:A&&((ut,Et)=>A(ut+Ie*Qe,Et+Ie*Qe)),indexOffset:Ie*Qe,totalCount:C?.length??0,renderCellAction:V&&((ut,Et)=>V(ut+Ie*Qe,Et)),showFillerAdd:!!F,onActivateCell:F?(ut=>xe(ut+Ie*Qe)):void 0,addableCount:Ft?Math.max(0,Math.min(Qe,tt-Ie*Qe)):void 0,brand:Ue,code:h,contentRef:ut=>{Ot.current[Ie]=ut},pageNumber:{current:Ie+1,total:Yt.length},pageNumberPosition:it},Ie))}):n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:_t,items:Z?void 0:C??[],baseItem:Z?void 0:d,baseContentTypes:m,editCells:Z?$e:void 0,activeCell:Ce,onActivateCell:Z||F?xe:void 0,onRemoveCell:Z?Mt:void 0,onRemoveItem:Z?void 0:g,onCopyItem:Z?void 0:w,onReplaceItem:Z?void 0:_,onPickForm:Z?void 0:E,onReorder:Z?void 0:A,addableCount:Ft?_t:void 0,renderCellAction:Z?void 0:V,brand:Ue,code:h,showFillerAdd:!!F,contentRef:Nt}),!O&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!O&&n.jsxs(nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:U("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{required:!0,value:K??"",onChange:ee,placeholder:J?J+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Pe?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(K??"").trim()&&(J??"").trim()&&(we.preventDefault(),ee?.(J??""))}})}),n.jsx(un,{variant:"custom",label:U("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{value:re??"",onChange:R,placeholder:ne?ne+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(re??"").trim()&&(ne??"").trim()&&(we.preventDefault(),R?.(ne??""))}})})]})]}),!O&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&x&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!T&&v&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:ce,onClick:v}),!T&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:gn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[I&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:I}),!T&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Nn}),D&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:D,onClick:()=>H?j():je(!0),disabled:fe,onDisabledClick:()=>{Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??U("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>je(!1),disabled:Re,onDisabledClick:We})]})]}),n.jsx(Ba,{message:de,type:Le,onClose:Je})]})}const Fw=8;function Dd({items:e,className:t}){const{t:a}=ke.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=gr(!!s,w=>{w?i():u()},r),p=e.length,h=p<=3?1:2,d=Fw,m=p>d,b=e.slice(0,m?d-1:d),y=p-b.length,C=e.slice(b.length).map(w=>w.words?.length?w.words.map(_=>_.label).join(" / "):w.id),f=Math.min(5,Math.ceil(C.length/25)),x=Math.ceil(Math.min(p,d)/h)||1,g=h*x;return n.jsx("div",{className:De("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:g},(w,_)=>{if(m&&_===d-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:y,words:C.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:v=>{Gn(v)||i()},onPointerLeave:v=>{Gn(v)||u()},onFocus:()=>{ta()||i()},onBlur:u,onClick:v=>{v.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:y,defaultValue:"+{{count}}"})}),s&&C.length>0&&n.jsx(Un,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1,columns:f})]},_);const E=b[_];return E?n.jsx("div",{className:"word-table-thumb__cell",children:(E.words?.length?E.words:[{label:E.id}]).map((v,N)=>n.jsxs(o.Fragment,{children:[N>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:v.label})]},N))},_):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},_)})})}function Iw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:b,onPublisherClick:y,selected:C,onClick:f,onMore:x,titleNode:g,className:w}){const{t:_}=ke.useTranslation(),E=g!=null,v=h!=null||d!=null||m!=null||b!=null,N=k=>{k.target===k.currentTarget&&!E&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),f?.())};return n.jsxs("div",{className:De("word-table-button",C?"word-table-button--selected":"",v?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:E?void 0:f,onKeyDown:N,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Dd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),x&&!E&&n.jsx(be,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),x(k)}})]}),(s||r||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?Xl(r,_):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??_("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),v&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":_("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:Xl(d,_)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),b!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":_("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1045
1045
  * @license lucide-react v1.38.0 - ISC
1046
1046
  *
1047
1047
  * This source code is licensed under the ISC license.
1048
1048
  * See the LICENSE file in the root directory of this source tree.
1049
- */const Iw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ow=oe("image",Iw);/**
1049
+ */const Ow=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],zw=oe("image",Ow);/**
1050
1050
  * @license lucide-react v1.38.0 - ISC
1051
1051
  *
1052
1052
  * This source code is licensed under the ISC license.
1053
1053
  * See the LICENSE file in the root directory of this source tree.
1054
- */const zw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Ww=oe("circle-x",zw);function Hw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Fs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=we.useTranslation(),i=a==="done",c=a==="pending",u=a==="error",p=i?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":u?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Js,{size:22,color:"white",strokeWidth:2.5}):u?n.jsx(Ww,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${c?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${c?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(ln,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):u?n.jsx(ln,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!c&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":u?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||u?`${u?100:p}%`:void 0}})})]})]})}function Vw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=we.useTranslation(),{phase:c,error:u,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:b}=t,v=Hw(c),C=c==="done",f=!!u;function _(E){return f&&v===E?"error":v>E?"done":v===E?"active":"pending"}const g=_(1),w=_(2),y=_(3),A=c==="image-match"&&m?Math.round((d??0)/m*100):void 0,x=o.useMemo(()=>{if(w!=="done"){if(c==="image-list")return i("wordData.checkingPage",{page:h??1});if(c==="image-match"&&m)return i("wordData.imageCount",{done:bo(d),total:bo(m)})}},[w,c,h,m,d,i]);return n.jsx(Fn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Fs,{icon:n.jsx(Gs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:bo(p),count:p}):void 0}),n.jsx(Fs,{icon:n.jsx(Ow,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:A,subText:x}),n.jsx(Fs,{icon:n.jsx(Zs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:y,pct:y==="active"?b??0:void 0,subText:void 0})]})})}function qw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=we.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),c=b=>{let v=null;b==="noise"?v={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:b==="short"?v={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:b==="long"?v={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:b==="order"&&(v={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(v),s(b)},u=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>c("noise"),[]),h=o.useCallback(()=>c("short"),[]),d=o.useCallback(()=>c("long"),[]),m=o.useCallback(()=>c("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:u,onClose:u}):null]}):null}exports.Accordion=i2,exports.ActionCard=vy,exports.Alert=X2,exports.AppHeader=m2,exports.AudioMeter=Qo,exports.AudioPlayer=Bs,exports.Avatar=rv,exports.Badge=ln,exports.BarChart=a4,exports.BarChartControls=Uu,exports.Board=xv,exports.BottomNav=eu,exports.BrandIdentity=ou,exports.BrandLogo=Yv,exports.Breadcrumb=lv,exports.BulkBar=qv,exports.Button=fe,exports.CONSENT_KINDS=Fu,exports.CORE_VERSION=cy,exports.Calendar=E4,exports.CardStep=gd,exports.ChartLegend=qo,exports.ChartSection=Ar,exports.ChartTotal=ar,exports.Checkbox=Wo,exports.ChoiceChips=R_,exports.CircleBadge=Sn,exports.CodeBox=Vv,exports.ColorPicker=pv,exports.CompanyMeta=Ev,exports.ConfirmPopup=kd,exports.ConfirmStep=Cd,exports.ConfirmWithTextStep=fd,exports.ConsentRecordPopup=Iv,exports.ContrastFilterPanel=dw,exports.CoreScope=_y,exports.CountTile=gv,exports.CouponInputPopup=mw,exports.DEFAULT_NOISE_SETTINGS=la,exports.DatePicker=Pu,exports.DebugResultLauncher=qw,exports.DescriptionTooltip=Un,exports.DeviceSideTable=k4,exports.Dialog=_v,exports.Divider=K2,exports.Dropdown=xn,exports.EffectPartyPopper=$s,exports.EffectPartyPopperHost=bw,exports.EmptyState=gy,exports.ErrorState=yy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=sv,exports.FilterPanel=On,exports.FilterSectionInfo=Ya,exports.Footer=P_,exports.GameIntro=s4,exports.Header=su,exports.Icon=ot,exports.IconGridMenu=$_,exports.IconRenderer=ot,exports.InfoTooltip=Ln,exports.ItemActions=Gv,exports.LEVEL_MAX=Na,exports.LINE_CHART_HOVER_DELAY_MS=Gu,exports.LandingBottomSticky=I_,exports.LandingHeader=F_,exports.LineChart=o4,exports.ListPopup=pw,exports.ListenStep=md,exports.Loader=ba,exports.MARKS=Sr,exports.MARK_ICON=dc,exports.MARK_VARIANT=pc,exports.MediaQueryOverrideContext=ui,exports.MenuTooltip=Ua,exports.NOISE_RATIO_MAX=or,exports.NOISE_RATIO_STEP=zc,exports.NoisePlayerContext=vs,exports.NoiseSettingsTooltip=sd,exports.NoticeBox=wy,exports.NotifyTextPreview=Kv,exports.OrderListStep=bd,exports.PASS_CARD_BG_VARS=aa,exports.POS_LABEL=Cc,exports.PROMO_BANNER_BG_COMPONENTS=Wi,exports.PROMO_BANNER_BG_OPTIONS=My,exports.PROMO_BANNER_BG_VARS=Ha,exports.Page=Fr,exports.PageTitle=gw,exports.Pagination=Ho,exports.Panel=tr,exports.PanelGrid=Mv,exports.PanelRow=un,exports.PanelRowDevice=Tv,exports.PassCard=fu,exports.PassCardBg=V2,exports.PassCardBgIHAB=q2,exports.PassCardBgLeftColorGrid=U2,exports.PassCardBgTwoCircle=du,exports.PaymentPlan=H2,exports.PersonCard=wv,exports.PhonemeFilterPanel=cw,exports.PhonemeSelectBlock=iw,exports.Popup=Fn,exports.ProgressBar=h4,exports.ProgressIndicator=nc,exports.PromoBanner=o2,exports.PromoBannerBgDark=Ni,exports.PromoBannerBgDeep=_i,exports.PromoBannerBgDiagonal=ji,exports.PromoBannerBgDots=Mi,exports.PromoBannerBgInstagram=zi,exports.PromoBannerBgMain=Ci,exports.PromoBannerBgNaver=Ii,exports.PromoBannerBgOutline=$i,exports.PromoBannerBgRadial=Di,exports.PromoBannerBgSoft=bi,exports.PromoBannerBgSoftSub=wi,exports.PromoBannerBgSub=yi,exports.PromoBannerBgSuccess=Pi,exports.PromoBannerBgWarm=ki,exports.PublicationCard=kv,exports.Radio=vu,exports.RadioGroup=Y2,exports.Rating=uv,exports.ReportDocument=Bw,exports.ReportInfoPanel=kw,exports.RingChart=i4,exports.SENTENCE_TRAINING_TYPES=fs,exports.SearchSummary=ev,exports.Section=Ba,exports.SectionHeadFloat=Ou,exports.SectionHeader=Nv,exports.SegmentedControl=_n,exports.ShortcutBadge=yu,exports.SideNav=ru,exports.Slider=Ju,exports.SoundCompass=G2,exports.SplashLogo=Av,exports.StatChart=u4,exports.SummaryStrip=xw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=xu,exports.Table=ts,exports.TableFilterPanel=ds,exports.Tabs=tv,exports.TextBoxTooltip=Rr,exports.TextField=Yn,exports.Timeline=Bv,exports.Toast=wa,exports.Toggle=Nu,exports.Toolbar=Vo,exports.Tooltip=Bn,exports.TooltipInfo=Ln,exports.TooltipTextBox=Rr,exports.TopBanner=s2,exports.TrainingBlock=S4,exports.TrainingBlockButton=Fo,exports.TrainingBlockGrid=T4,exports.TrainingCard=Sw,exports.TrainingCardGroup=jw,exports.TrainingPagePopup=Zn,exports.TrainingPagePopupBottom=ld,exports.TrainingPagePopupTitle=id,exports.TrainingResultPopup=xd,exports.TrainingStep=ia,exports.TrainingStepAudioPlayer=Bs,exports.TrainingStepBullet=ed,exports.TrainingStepCard=rd,exports.TrainingStepConfirm=As,exports.TrainingStepConfirmWithText=Ns,exports.TrainingStepListen=Es,exports.TrainingStepOrderList=Ds,exports.TrainingStepTextBox=ad,exports.TrainingStepTitle=nd,exports.TrainingTooltip=wu,exports.TrainingWordCard=rs,exports.UpdateAlert=Dw,exports.WAVE_A_MAX=Q_,exports.WAVE_H1_PX=xs,exports.WAVE_HMAX_PX=J_,exports.WORD_LABEL_I18N_KEYS=W4,exports.WORD_TABLE_PAPER=oa,exports.WORD_TYPE_LABEL=fc,exports.WordDataProvider=_w,exports.WordDataUpdatePopup=Vw,exports.WordImageTooltip=Bd,exports.WordSearchFilterPanel=uw,exports.WordSearchResultBlock=sw,exports.WordTable=ka,exports.WordTableBlock=Rw,exports.WordTableButton=Fw,exports.WordTablePopup=l_,exports.WordTableThumbnail=Dd,exports.buildMonthChartData=Jv,exports.cellKey=C_,exports.cellLabel=m_,exports.cellsForLabels=N_,exports.chartTotalNumClass=_a,exports.clearPassCardBgTheme=Pn,exports.clearPromoBannerBgTheme=an,exports.closeTrainingPopup=Sx,exports.companyTypeLabel=yw,exports.createTrainingScenario=Mx,exports.cx=Ne,exports.deriveNoiseContexts=Ix,exports.derivePassCard=iu,exports.draftValues=M_,exports.effectiveNoiseVolume=gs,exports.effectiveSpeechVolume=Hc,exports.expandSlashLabel=is,exports.formatDuration=E_,exports.getControlDateRange=l4,exports.getPayloadTimestamp=js,exports.getPromoBannerBgTheme=Ao,exports.getSelectedFromPayload=$x,exports.getSelectedText=Rx,exports.getStepPayload=pd,exports.getSteppedPayload=Px,exports.injectPassCardBgTheme=Rn,exports.injectPromoBannerBgTheme=nn,exports.isSelectionCorrect=Fx,exports.labelOfCellKey=Ic,exports.labelsForSave=h_,exports.levelToPct=z_,exports.markAfterClick=cc,exports.marksForSave=os,exports.mergeNoiseSettings=sa,exports.missesByType=w_,exports.monthKeyOf=rr,exports.monthKeyOfDate=Go,exports.nextFocus=y_,exports.nextMisses=x_,exports.noiseElementVolume=ys,exports.noiseRatioOf=sr,exports.pageStartIndexes=hc,exports.parseMonthKey=xa,exports.passCardBgIhabTheme=bu,exports.passCardBgLeftColorGridTheme=gu,exports.passCardBgTwoCircleTheme=cu,exports.pctToLevel=W_,exports.posLabels=bc,exports.printWordTable=P4,exports.promoBannerBgDarkTheme=Ai,exports.promoBannerBgDeepTheme=vi,exports.promoBannerBgDiagonalTheme=Si,exports.promoBannerBgDotsTheme=Ti,exports.promoBannerBgInstagramTheme=Oi,exports.promoBannerBgMainTheme=mi,exports.promoBannerBgNaverTheme=Fi,exports.promoBannerBgOutlineTheme=Li,exports.promoBannerBgRadialTheme=Ei,exports.promoBannerBgSoftSubTheme=xi,exports.promoBannerBgSoftTheme=fi,exports.promoBannerBgSubTheme=gi,exports.promoBannerBgSuccessTheme=Ri,exports.promoBannerBgWarmTheme=Bi,exports.recommendTables=k_,exports.regenerateUnpinned=T_,exports.removeItem=j_,exports.resolveTrainingItems=Tx,exports.resolveTrainingPopupMeta=cd,exports.reviewCells=u_,exports.reviewMeta=p_,exports.reviewSetPlan=B_,exports.reviewTableName=d_,exports.scoreKey=Dr,exports.scoreSheetHeader=f_,exports.shouldConfirmDiscard=R4,exports.splitTrainingVariants=jx,exports.summarize=$4,exports.summarizeMisses=__,exports.tableTrends=g_,exports.toDraft=D_,exports.toTrainingText=Lx,exports.togglePin=S_,exports.uncoveredLabels=A_,exports.useAnchoredMenu=qa,exports.useBarChartControl=qu,exports.useCalendarMonth=$u,exports.useComboboxSuggestions=Tu,exports.useDiscardGuard=hw,exports.useFitScale=_c,exports.useNoisePlayer=Tr,exports.useSoundCompassExam=Xy,exports.useToastLifecycle=ec,exports.useWordData=vw,exports.useWordTableDisplaySettings=Pc,exports.useWordTablePrint=Cs,exports.waveBarPx=Lr,exports.waveBarVal=$r,exports.weakItems=b_,exports.weekValueOf=Ko,exports.withStepTimes=dd,exports.wordTypeLabels=gc;
1054
+ */const Ww=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Hw=oe("circle-x",Ww);function Vw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Fs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=ke.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",p=i?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Js,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Hw,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(ln,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(ln,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:p}%`:void 0}})})]})]})}function qw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=ke.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:b}=t,y=Vw(u),C=u==="done",f=!!c;function x(N){return f&&y===N?"error":y>N?"done":y===N?"active":"pending"}const g=x(1),w=x(2),_=x(3),E=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,v=o.useMemo(()=>{if(w!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:bo(d),total:bo(m)})}},[w,u,h,m,d,i]);return n.jsx(Fn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(be,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Fs,{icon:n.jsx(Gs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:bo(p),count:p}):void 0}),n.jsx(Fs,{icon:n.jsx(zw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:E,subText:v}),n.jsx(Fs,{icon:n.jsx(Zs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?b??0:void 0,subText:void 0})]})})}function Uw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=b=>{let y=null;b==="noise"?y={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:b==="short"?y={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:b==="long"?y={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:b==="order"&&(y={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(y),s(b)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=i2,exports.ActionCard=vy,exports.Alert=X2,exports.AppHeader=m2,exports.AudioMeter=Qo,exports.AudioPlayer=Bs,exports.Avatar=rv,exports.Badge=ln,exports.BarChart=a4,exports.BarChartControls=Uu,exports.Board=xv,exports.BottomNav=eu,exports.BrandIdentity=ou,exports.BrandLogo=Yv,exports.Breadcrumb=lv,exports.BulkBar=qv,exports.Button=be,exports.CONSENT_KINDS=Fu,exports.CORE_VERSION=cy,exports.Calendar=E4,exports.CardStep=gd,exports.ChartLegend=qo,exports.ChartSection=Ar,exports.ChartTotal=xa,exports.Checkbox=Wo,exports.ChoiceChips=R_,exports.CircleBadge=Sn,exports.CodeBox=Vv,exports.ColorPicker=pv,exports.CompanyMeta=Ev,exports.ConfirmPopup=kd,exports.ConfirmStep=Cd,exports.ConfirmWithTextStep=fd,exports.ConsentRecordPopup=Iv,exports.ContrastFilterPanel=pw,exports.CoreScope=_y,exports.CountTile=gv,exports.CouponInputPopup=Cw,exports.DEFAULT_NOISE_SETTINGS=ia,exports.DatePicker=Pu,exports.DebugResultLauncher=Uw,exports.DescriptionTooltip=Un,exports.DeviceSideTable=k4,exports.Dialog=_v,exports.Divider=K2,exports.Dropdown=xn,exports.EffectPartyPopper=$s,exports.EffectPartyPopperHost=gw,exports.EmptyState=gy,exports.ErrorState=yy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=sv,exports.FilterPanel=On,exports.FilterSectionInfo=Za,exports.Footer=P_,exports.GameIntro=s4,exports.Header=su,exports.Icon=lt,exports.IconGridMenu=$_,exports.IconRenderer=lt,exports.InfoTooltip=Ln,exports.ItemActions=Gv,exports.LEVEL_MAX=Ea,exports.LINE_CHART_HOVER_DELAY_MS=Gu,exports.LandingBottomSticky=I_,exports.LandingHeader=F_,exports.LineChart=o4,exports.ListPopup=hw,exports.ListenStep=md,exports.Loader=ga,exports.MARKS=Sr,exports.MARK_ICON=dc,exports.MARK_VARIANT=pc,exports.MediaQueryOverrideContext=ui,exports.MenuTooltip=Ga,exports.NOISE_RATIO_MAX=or,exports.NOISE_RATIO_STEP=zc,exports.NoisePlayerContext=vs,exports.NoiseSettingsTooltip=sd,exports.NoticeBox=wy,exports.NotifyTextPreview=Kv,exports.OrderListStep=bd,exports.PASS_CARD_BG_VARS=aa,exports.POS_LABEL=Cc,exports.PROMO_BANNER_BG_COMPONENTS=Wi,exports.PROMO_BANNER_BG_OPTIONS=My,exports.PROMO_BANNER_BG_VARS=Va,exports.Page=Fr,exports.PageTitle=yw,exports.Pagination=Ho,exports.Panel=nr,exports.PanelGrid=Mv,exports.PanelRow=un,exports.PanelRowDevice=Tv,exports.PassCard=fu,exports.PassCardBg=V2,exports.PassCardBgIHAB=q2,exports.PassCardBgLeftColorGrid=U2,exports.PassCardBgTwoCircle=du,exports.PaymentPlan=H2,exports.PersonCard=wv,exports.PhonemeFilterPanel=dw,exports.PhonemeSelectBlock=uw,exports.Popup=Fn,exports.ProgressBar=h4,exports.ProgressIndicator=nc,exports.PromoBanner=o2,exports.PromoBannerBgDark=Ni,exports.PromoBannerBgDeep=_i,exports.PromoBannerBgDiagonal=ji,exports.PromoBannerBgDots=Mi,exports.PromoBannerBgInstagram=zi,exports.PromoBannerBgMain=Ci,exports.PromoBannerBgNaver=Ii,exports.PromoBannerBgOutline=$i,exports.PromoBannerBgRadial=Di,exports.PromoBannerBgSoft=bi,exports.PromoBannerBgSoftSub=wi,exports.PromoBannerBgSub=yi,exports.PromoBannerBgSuccess=Pi,exports.PromoBannerBgWarm=ki,exports.PublicationCard=kv,exports.Radio=vu,exports.RadioGroup=Y2,exports.Rating=uv,exports.ReportDocument=kw,exports.ReportInfoPanel=Aw,exports.RingChart=i4,exports.SENTENCE_TRAINING_TYPES=fs,exports.SearchSummary=ev,exports.Section=ka,exports.SectionHeadFloat=Ou,exports.SectionHeader=Nv,exports.SegmentedControl=_n,exports.ShortcutBadge=yu,exports.SideNav=ru,exports.Slider=Ju,exports.SoundCompass=G2,exports.SplashLogo=Av,exports.StatChart=u4,exports.SummaryStrip=ww,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=xu,exports.Table=ts,exports.TableFilterPanel=ds,exports.Tabs=tv,exports.TextBoxTooltip=Rr,exports.TextField=Yn,exports.Timeline=Bv,exports.Toast=Ba,exports.Toggle=Nu,exports.Toolbar=Vo,exports.Tooltip=Bn,exports.TooltipInfo=Ln,exports.TooltipTextBox=Rr,exports.TopBanner=s2,exports.TrainingBlock=S4,exports.TrainingBlockButton=Fo,exports.TrainingBlockGrid=T4,exports.TrainingCard=jw,exports.TrainingCardGroup=Tw,exports.TrainingPagePopup=Zn,exports.TrainingPagePopupBottom=ld,exports.TrainingPagePopupTitle=id,exports.TrainingResultPopup=xd,exports.TrainingStep=ua,exports.TrainingStepAudioPlayer=Bs,exports.TrainingStepBullet=ed,exports.TrainingStepCard=rd,exports.TrainingStepConfirm=As,exports.TrainingStepConfirmWithText=Ns,exports.TrainingStepListen=Es,exports.TrainingStepOrderList=Ds,exports.TrainingStepTextBox=ad,exports.TrainingStepTitle=nd,exports.TrainingTooltip=wu,exports.TrainingWordCard=rs,exports.UpdateAlert=Sw,exports.WAVE_A_MAX=Q_,exports.WAVE_H1_PX=xs,exports.WAVE_HMAX_PX=J_,exports.WORD_LABEL_I18N_KEYS=W4,exports.WORD_TABLE_PAPER=sa,exports.WORD_TYPE_LABEL=fc,exports.WordDataProvider=xw,exports.WordDataUpdatePopup=qw,exports.WordImageTooltip=Bd,exports.WordSearchFilterPanel=cw,exports.WordSearchResultBlock=lw,exports.WordTable=Aa,exports.WordTableBlock=Pw,exports.WordTableButton=Iw,exports.WordTablePopup=l_,exports.WordTableThumbnail=Dd,exports.buildMonthChartData=Jv,exports.cellKey=C_,exports.cellLabel=m_,exports.cellsForLabels=N_,exports.chartTotalNumClass=oa,exports.clearPassCardBgTheme=Pn,exports.clearPromoBannerBgTheme=an,exports.closeTrainingPopup=Sx,exports.companyTypeLabel=vw,exports.createTrainingScenario=Mx,exports.cx=De,exports.deriveNoiseContexts=Ix,exports.derivePassCard=iu,exports.draftValues=M_,exports.effectiveNoiseVolume=gs,exports.effectiveSpeechVolume=Hc,exports.expandSlashLabel=is,exports.formatDuration=E_,exports.getControlDateRange=l4,exports.getPayloadTimestamp=js,exports.getPromoBannerBgTheme=Ao,exports.getSelectedFromPayload=$x,exports.getSelectedText=Rx,exports.getStepPayload=pd,exports.getSteppedPayload=Px,exports.injectPassCardBgTheme=Rn,exports.injectPromoBannerBgTheme=nn,exports.isSelectionCorrect=Fx,exports.labelOfCellKey=Ic,exports.labelsForSave=h_,exports.levelToPct=z_,exports.markAfterClick=cc,exports.marksForSave=os,exports.mergeNoiseSettings=la,exports.missesByType=w_,exports.monthKeyOf=rr,exports.monthKeyOfDate=Go,exports.nextFocus=y_,exports.nextMisses=x_,exports.noiseElementVolume=ys,exports.noiseRatioOf=sr,exports.pageStartIndexes=hc,exports.parseMonthKey=wa,exports.passCardBgIhabTheme=bu,exports.passCardBgLeftColorGridTheme=gu,exports.passCardBgTwoCircleTheme=cu,exports.pctToLevel=W_,exports.posLabels=bc,exports.printWordTable=P4,exports.promoBannerBgDarkTheme=Ai,exports.promoBannerBgDeepTheme=vi,exports.promoBannerBgDiagonalTheme=Si,exports.promoBannerBgDotsTheme=Ti,exports.promoBannerBgInstagramTheme=Oi,exports.promoBannerBgMainTheme=mi,exports.promoBannerBgNaverTheme=Fi,exports.promoBannerBgOutlineTheme=Li,exports.promoBannerBgRadialTheme=Ei,exports.promoBannerBgSoftSubTheme=xi,exports.promoBannerBgSoftTheme=fi,exports.promoBannerBgSubTheme=gi,exports.promoBannerBgSuccessTheme=Ri,exports.promoBannerBgWarmTheme=Bi,exports.recommendTables=k_,exports.regenerateUnpinned=T_,exports.removeItem=j_,exports.resolveTrainingItems=Tx,exports.resolveTrainingPopupMeta=cd,exports.reviewCells=u_,exports.reviewMeta=p_,exports.reviewSetPlan=B_,exports.reviewTableName=d_,exports.scoreKey=Dr,exports.scoreSheetHeader=f_,exports.shouldConfirmDiscard=R4,exports.splitTrainingVariants=jx,exports.summarize=$4,exports.summarizeMisses=__,exports.tableTrends=g_,exports.toDraft=D_,exports.toTrainingText=Lx,exports.togglePin=S_,exports.uncoveredLabels=A_,exports.useAnchoredMenu=Ua,exports.useBarChartControl=qu,exports.useCalendarMonth=$u,exports.useComboboxSuggestions=Tu,exports.useDiscardGuard=mw,exports.useFitScale=_c,exports.useNoisePlayer=Tr,exports.useSoundCompassExam=Xy,exports.useToastLifecycle=ec,exports.useWordData=_w,exports.useWordTableDisplaySettings=Pc,exports.useWordTablePrint=Cs,exports.waveBarPx=Lr,exports.waveBarVal=$r,exports.weakItems=b_,exports.weekValueOf=Ko,exports.withStepTimes=dd,exports.wordTypeLabels=gc;