@ihabdevteam/core 0.383.0 → 0.384.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/dist/components.cjs.js +13 -13
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +19 -19
- package/dist/ihabdevteam-core.d.ts +18 -2
- package/dist/packages/core/src/components/Table.css +27 -1
- package/dist/packages/core/src/components/Table.js +44 -21
- package/dist/packages/core/src/components/Word/WordTableBlock.js +4 -0
- package/dist/packages/core/src/components/WordTable.d.ts +17 -1
- package/dist/packages/core/src/components/WordTable.js +24 -10
- package/dist/packages/core/src/components/tableFitWidths.d.ts +46 -0
- package/dist/packages/core/src/components/tableFitWidths.js +55 -0
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
package/dist/components.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var n=require("react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";var n=require("react/jsx-runtime"),o=require("react"),Vt=require("i18next"),Be=require("react-i18next"),un=require("react-dom"),En=typeof document<"u"?document.currentScript:null;function gd(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 Ls=gd(o);function ke(...e){return e.filter(Boolean).join(" ")}const $s=new Set,In=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function kt(e,...t){!In||$s.has(e)||($s.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.
|
|
@@ -794,8 +794,8 @@
|
|
|
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
796
|
*/const zC=[["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"}]],WC=oe("thumbs-up",zC),Or={"alert-triangle":Is,"align-start-vertical":Nd,anchor:aC,armchair:oC,"arrow-down":Dd,"arrow-left":jd,"arrow-right":Md,"arrow-right-left":$d,"audio-lines":Pd,ban:Fd,bell:zd,"book-marked":Hd,"book-open":qd,"bow-arrow":Gd,braces:Yd,bug:Xd,calendar:Zs,"calendar-check":Qd,"calendar-days":tp,camera:ap,car:iC,"chart-column":op,"chart-line":lp,"chart-pie":up,check:Fs,"chevron-down":Xs,"chevron-left":Os,"chevron-right":zs,"chevron-up":Js,circle:LC,"clipboard-list":mp,coffee:cC,combine:fp,copy:gp,"chevrons-left-right-ellipsis":vp,"credit-card":xp,database:Ws,diff:kp,download:Hs,ear:Ep,edit:Sp,"edit-2":Tp,"edit-3":Lp,ellipsis:Vs,eraser:Pp,"external-link":Fp,eye:zp,"file-text":Hp,"flip-horizontal":qp,"folder-open":Gp,"folder-plus":Yp,gamepad:Xp,"gamepad-2":pC,clock:mC,lock:Oh,"search-x":Vm,"share-2":Zm,tag:v0,target:fC,percent:gC,gavel:Qp,"git-merge":qs,globe:nh,"grip-vertical":rh,headphones:sh,heart:ih,home:ch,inbox:vC,info:ph,"key-round":mh,landmark:fh,layers:gh,"layout-dashboard":vh,leaf:xh,lightbulb:Bh,link:Ah,"link-2":Eh,"link-2-off":Sh,list:Th,"list-checks":Lh,"list-ordered":Rh,loader:Ih,"log-out":Wh,mail:Vh,"map-pin":Uh,menu:IC,"message-circle":Kh,"message-circle-question-mark":Zh,"message-square":Jh,"message-square-more":xC,"message-square-text":em,minus:BC,"minus-circle":nm,moon:OC,"more-horizontal":Vs,package:rm,"party-popper":sm,pause:im,pencil:cm,phone:pm,play:mm,"play-circle":fm,plus:gm,printer:vm,"refresh-cw":xm,repeat:Bm,replace:Am,rocket:Em,"rotate-ccw":Sm,"rotate-cw":Tm,salad:Lm,"scan-search":Rm,search:Om,"circle-alert":Us,"alert-circle":Us,"check-circle":Gs,scissors:Wm,send:Um,settings:Km,"shield-check":Jm,"shopping-cart":e0,shuffle:n0,"skip-back":r0,"skip-forward":s0,sparkles:AC,square:i0,star:c0,store:p0,"sun-medium":m0,table:f0,"table-2":g0,terminal:x0,"text-cursor-input":B0,"text-initial":A0,"thumbs-up":WC,ticket:E0,trash:T0,triangle:RC,"trash-2":S0,"trending-up":L0,"triangle-alert":Is,trophy:R0,type:EC,unlink:I0,upload:O0,user:Fr,"user-plus":H0,"user-round":q0,"user-round-check":G0,users:Y0,"users-round":X0,volume:SC,"volume-2":Ks,wrench:eC,x:Ys};Object.freeze(Object.keys(Or));function HC(e){return Or[e]??null}const Qs=new Set;function VC(e){return In&&!(e in Or)&&!Qs.has(e)&&(Qs.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 qC=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 UC(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?qC(a):null}const el=new Map;function GC(e){const t=typeof e=="string"?UC(e):null,a=t?HC(t)??el.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return VC(t).then(i=>{el.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 tl(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 KC(e){if(Array.isArray(e))return e}function YC(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,d=!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){d=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw s}}return u}}function ZC(){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 XC(e,t){return KC(e)||YC(e,t)||JC(e,t)||ZC()}function JC(e,t){if(e){if(typeof e=="string")return tl(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)?tl(e,t):void 0}}const nl=Object.entries,al=Object.setPrototypeOf,QC=Object.isFrozen,e1=Object.getPrototypeOf,t1=Object.getOwnPropertyDescriptor;let Ht=Object.freeze,qt=Object.seal,oa=Object.create,rl=typeof Reflect<"u"&&Reflect,zr=rl.apply,Wr=rl.construct;Ht||(Ht=function(t){return t}),qt||(qt=function(t){return t}),zr||(zr=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)}),Wr||(Wr=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 qn=Ot(Array.prototype.forEach),n1=Ot(Array.prototype.lastIndexOf),ol=Ot(Array.prototype.pop),Ba=Ot(Array.prototype.push),a1=Ot(Array.prototype.splice),sa=Array.isArray,ka=Ot(String.prototype.toLowerCase),Hr=Ot(String.prototype.toString),sl=Ot(String.prototype.match),Aa=Ot(String.prototype.replace),ll=Ot(String.prototype.indexOf),r1=Ot(String.prototype.trim),o1=Ot(Number.prototype.toString),s1=Ot(Boolean.prototype.toString),il=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),ul=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),an=Ot(Object.prototype.hasOwnProperty),Na=Ot(Object.prototype.toString),Zt=Ot(RegExp.prototype.test),Un=l1(TypeError);function Ot(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 zr(e,t,r)}}function l1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Wr(e,a)}}function Ct(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ka;if(al&&al(e,null),!sa(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(QC(t)||(t[r]=l),s=l)}e[s]=!0}return e}function i1(e){for(let t=0;t<e.length;t++)an(e,t)||(e[t]=null);return e}function dn(e){const t=oa(null);for(const r of nl(e)){var a=XC(r,2);const s=a[0],l=a[1];an(e,s)&&(sa(l)?t[s]=i1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=dn(l):t[s]=l)}return t}function u1(e){switch(typeof e){case"string":return e;case"number":return o1(e);case"boolean":return s1(e);case"bigint":return il?il(e):"0";case"symbol":return ul?ul(e):"Symbol()";case"undefined":return Na(e);case"function":case"object":{if(e===null)return Na(e);const t=e,a=_n(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Na(r)}return Na(e)}default:return Na(e)}}function _n(e,t){for(;e!==null;){const r=t1(e,t);if(r){if(r.get)return Ot(r.get);if(typeof r.value=="function")return Ot(r.value)}e=e1(e)}function a(){return null}return a}function c1(e){try{return Zt(e,""),!0}catch{return!1}}const cl=Ht(["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"]),Vr=Ht(["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"]),qr=Ht(["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"]),d1=Ht(["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"]),Ur=Ht(["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"]),p1=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dl=Ht(["#text"]),pl=Ht(["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"]),Gr=Ht(["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"]),hl=Ht(["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"]),nr=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),h1=qt(/{{[\w\W]*|^[\w\W]*}}/g),m1=qt(/<%[\w\W]*|^[\w\W]*%>/g),C1=qt(/\${[\w\W]*/g),f1=qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),b1=qt(/^aria-[\-\w]+$/),ml=qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),g1=qt(/^(?:\w+script|data):/i),y1=qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),v1=qt(/^html$/i),_1=qt(/^[a-z][.\w]*(-[.\w]+)+$/i),Cl=qt(/<[/\w!]/g),fl=qt(/<[/\w]/g),x1=qt(/<\/no(script|embed|frames)/i),w1=qt(/\/>/i),pn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],B1=Ht(Ct({},bl)),k1=(function(){const e={};return qn(bl,t=>{e[t]=qt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ht(e)})(),A1=function(){return typeof window>"u"?null:window},N1=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}},gl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Fn=function(t,a,r,s){return an(t,a)&&sa(t[a])?Ct(s.base?dn(s.base):{},t[a],s.transform):r},Kr=function(t,a,r){const s=an(t,a)?t[a]:void 0;return s&&typeof s=="object"?dn(s):r()};function yl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A1();const t=ye=>yl(ye);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==pn.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,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=_n(m,"cloneNode"),y=_n(m,"remove"),C=_n(m,"nextSibling"),f=_n(m,"childNodes"),x=_n(m,"parentNode"),b=_n(m,"shadowRoot"),k=_n(m,"attributes"),_=i&&i.prototype?_n(i.prototype,"nodeType"):null,N=i&&i.prototype?_n(i.prototype,"nodeName"):null,v=i&&i.prototype?_n(i.prototype,"ownerDocument"):null,B=function(j){return _?_(j):j.nodeType},w=function(j){return N?N(j):j.nodeName};if(typeof l=="function"){const ye=a.createElement("template");ye.content&&ye.content.ownerDocument&&(a=ye.content.ownerDocument)}let E,D="",A,R=!1,$=0;const Y=function(){if($>0)throw Un('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(),$++;try{return E.createHTML(j)}finally{$--}},P=function(j){Y(),$++;try{return E.createScriptURL(j)}finally{$--}},M=function(){return R||(A=N1(p,s),R=!0),A},Z=a,V=Z.implementation,O=Z.createNodeIterator,te=Z.createDocumentFragment,I=Z.getElementsByTagName,U=r.importNode;let Q=gl();t.isSupported=typeof nl=="function"&&typeof x=="function"&&V&&V.createHTMLDocument!==void 0;const H=h1,S=m1,F=C1,L=f1,G=b1,ae=g1,se=y1,me=_1;let X=ml,z=null;const ne=Ct({},[...cl,...Vr,...qr,...Ur,...dl]);let W=null;const q=Ct({},[...pl,...Gr,...hl,...nr]);let pe=Object.seal(oa(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}})),Se=null,ve=null;const Ce=Object.seal(oa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,fe=!0,be=!1,he=!0,Le=!1,Fe=!0,$e=!1,qe=!1,He=null,it=null,rt=!1,Qe=!1,ft=!1,Ee=!1,Ue=!0,Ae=!1;const Ve="user-content-";let Je=!0,ot=!1,At={},_t=null;const It=Ct({},["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 et=null;const at=Ct({},["audio","video","img","source","image","track"]);let xt=null;const Bt=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),St="http://www.w3.org/1998/Math/MathML",Pt="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml";let Te=xe,Me=!1,We=null;const dt=Ct({},[St,Pt,xe],Hr),ut=Ht(["mi","mo","mn","ms","mtext"]);let ct=Ct({},ut);const Ze=Ht(["annotation-xml"]);let gt=Ct({},Ze);const jt=Ct({},["title","style","font","a","script"]);let wt=null;const bt=["application/xhtml+xml","text/html"],yt="text/html";let ke=null,nt=null;const re=a.createElement("form"),_e=function(j){return j instanceof RegExp||j instanceof Function},Pe=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===j)return;(!j||typeof j!="object")&&(j={}),j=dn(j),wt=bt.indexOf(j.PARSER_MEDIA_TYPE)===-1?yt:j.PARSER_MEDIA_TYPE,ke=wt==="application/xhtml+xml"?Hr:ka,z=Fn(j,"ALLOWED_TAGS",ne,{transform:ke}),W=Fn(j,"ALLOWED_ATTR",q,{transform:ke}),We=Fn(j,"ALLOWED_NAMESPACES",dt,{transform:Hr}),xt=Fn(j,"ADD_URI_SAFE_ATTR",Bt,{transform:ke,base:Bt}),et=Fn(j,"ADD_DATA_URI_TAGS",at,{transform:ke,base:at}),_t=Fn(j,"FORBID_CONTENTS",It,{transform:ke}),Se=Fn(j,"FORBID_TAGS",dn({}),{transform:ke}),ve=Fn(j,"FORBID_ATTR",dn({}),{transform:ke}),At=an(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?dn(j.USE_PROFILES):j.USE_PROFILES:!1,de=j.ALLOW_ARIA_ATTR!==!1,fe=j.ALLOW_DATA_ATTR!==!1,be=j.ALLOW_UNKNOWN_PROTOCOLS||!1,he=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=j.SAFE_FOR_TEMPLATES||!1,Fe=j.SAFE_FOR_XML!==!1,$e=j.WHOLE_DOCUMENT||!1,Qe=j.RETURN_DOM||!1,ft=j.RETURN_DOM_FRAGMENT||!1,Ee=j.RETURN_TRUSTED_TYPE||!1,rt=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,Ae=j.SANITIZE_NAMED_PROPS||!1,Je=j.KEEP_CONTENT!==!1,ot=j.IN_PLACE||!1,X=c1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:ml,Te=typeof j.NAMESPACE=="string"?j.NAMESPACE:xe,ct=Kr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ct({},ut)),gt=Kr(j,"HTML_INTEGRATION_POINTS",()=>Ct({},Ze));const ee=Kr(j,"CUSTOM_ELEMENT_HANDLING",()=>oa(null));if(pe=oa(null),an(ee,"tagNameCheck")&&_e(ee.tagNameCheck)&&(pe.tagNameCheck=ee.tagNameCheck),an(ee,"attributeNameCheck")&&_e(ee.attributeNameCheck)&&(pe.attributeNameCheck=ee.attributeNameCheck),an(ee,"allowCustomizedBuiltInElements")&&typeof ee.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=ee.allowCustomizedBuiltInElements),qt(pe),Le&&(fe=!1),ft&&(Qe=!0),At&&(z=Ct({},dl),W=oa(null),At.html===!0&&(Ct(z,cl),Ct(W,pl)),At.svg===!0&&(Ct(z,Vr),Ct(W,Gr),Ct(W,nr)),At.svgFilters===!0&&(Ct(z,qr),Ct(W,Gr),Ct(W,nr)),At.mathMl===!0&&(Ct(z,Ur),Ct(W,hl),Ct(W,nr))),Ce.tagCheck=null,Ce.attributeCheck=null,an(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?Ce.tagCheck=j.ADD_TAGS:sa(j.ADD_TAGS)&&(z===ne&&(z=dn(z)),Ct(z,j.ADD_TAGS,ke))),an(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?Ce.attributeCheck=j.ADD_ATTR:sa(j.ADD_ATTR)&&(W===q&&(W=dn(W)),Ct(W,j.ADD_ATTR,ke))),an(j,"ADD_FORBID_CONTENTS")&&sa(j.ADD_FORBID_CONTENTS)&&(_t===It&&(_t=dn(_t)),Ct(_t,j.ADD_FORBID_CONTENTS,ke)),Je&&(z["#text"]=!0),$e&&Ct(z,["html","head","body"]),z.table&&(Ct(z,["tbody"]),delete Se.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=E;E=j.TRUSTED_TYPES_POLICY;try{D=T("")}catch(ie){throw E=K,ie}}else j.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=M()),E&&typeof D=="string"&&(D=T("")));Ht&&Ht(j),nt=j},Ge=Ct({},[...Vr,...qr,...d1]),vt=Ct({},[...Ur,...p1]),st=function(j,ee,K){return ee.namespaceURI===xe?j==="svg":ee.namespaceURI===St?j==="svg"&&(K==="annotation-xml"||ct[K]):!!Ge[j]},Vt=function(j,ee,K){return ee.namespaceURI===xe?j==="math":ee.namespaceURI===Pt?j==="math"&>[K]:!!vt[j]},Yt=function(j,ee,K){return ee.namespaceURI===Pt&&!gt[K]||ee.namespaceURI===St&&!ct[K]?!1:!vt[j]&&(jt[j]||!Ge[j])},Xt=function(j){let ee=x(j);(!ee||!ee.tagName)&&(ee={namespaceURI:Te,tagName:"template"});const K=ka(j.tagName),ie=ka(ee.tagName);return We[j.namespaceURI]?j.namespaceURI===Pt?st(K,ee,ie):j.namespaceURI===St?Vt(K,ee,ie):j.namespaceURI===xe?Yt(K,ee,ie):!!(wt==="application/xhtml+xml"&&We[j.namespaceURI]):!1},$t=function(j){Ba(t.removed,{element:j});try{x(j).removeChild(j)}catch{if(y(j),!x(j))throw Un("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zt=function(j,ee,K){try{j.removeAttributeNode(ee)}catch{try{j.removeAttribute(K)}catch{}}},sn=function(j){Nt(j);const ee=f(j);if(ee){const ie=[];qn(ee,je=>{Ba(ie,je)}),qn(ie,je=>{try{y(je)}catch{}})}const K=k(j);if(K)for(let ie=K.length-1;ie>=0;--ie){const je=K[ie],ze=je&&je.name;typeof ze=="string"&&zt(j,je,ze)}},Ft=function(j,ee,K){if(!K)try{K=ee.getAttributeNode(j)}catch{K=null}Ba(t.removed,{attribute:K||null,from:ee});try{K?ee.removeAttributeNode(K):ee.removeAttribute(j)}catch{try{ee.removeAttribute(j)}catch{}}if(j==="is")if(Qe||ft)try{$t(ee)}catch{}else try{ee.setAttribute(j,"")}catch{}},Cn=function(j){const ee=k(j);if(ee)for(let K=ee.length-1;K>=0;--K){const ie=ee[K],je=ie&&ie.name;typeof je!="string"||W[ke(je)]||zt(j,ie,je)}},Nt=function(j){const ee=[j];for(;ee.length>0;){const K=ee.pop();B(K)===pn.element&&Cn(K);const je=f(K);if(je)for(let ze=je.length-1;ze>=0;--ze)ee.push(je[ze])}},kt=function(j,ee){return Fe?j==="patchsrc"?!0:j==="for"&&ee!=="label"&&ee!=="output":!1},pt=function(j){if(!Fe)return;const ee=[j];for(;ee.length>0;){const K=ee.pop(),ie=B(K);if(ie===pn.processingInstruction||ie===pn.comment&&Zt(fl,K.data)){try{y(K)}catch{}continue}if(ie===pn.element){const ze=K,lt=ke(w(K));try{ze.hasAttribute&&ze.hasAttribute("patchsrc")&&ze.removeAttribute("patchsrc"),ze.hasAttribute&&ze.hasAttribute("for")&&kt("for",lt)&&ze.removeAttribute("for")}catch{}}const je=f(K);if(je)for(let ze=je.length-1;ze>=0;--ze)ee.push(je[ze])}},Tt=function(j){let ee=null,K=null;if(rt)j="<remove></remove>"+j;else{const ze=sl(j,/^[\r\n\t ]+/);K=ze&&ze[0]}wt==="application/xhtml+xml"&&Te===xe&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ie=E?T(j):j;if(Te===xe)try{ee=new h().parseFromString(ie,wt)}catch{}if(!ee||!ee.documentElement){ee=V.createDocument(Te,"template",null);try{ee.documentElement.innerHTML=Me?D:ie}catch{}}const je=ee.body||ee.documentElement;return j&&K&&je.insertBefore(a.createTextNode(K),je.childNodes[0]||null),Te===xe?I.call(ee,$e?"html":"body")[0]:$e?ee.documentElement:je},ln=function(j){const ee=v?v(j):j.ownerDocument;return O.call(ee||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},fn=function(j){return j=Aa(j,H," "),j=Aa(j,S," "),j=Aa(j,F," "),j},Wt=function(j){var ee;j.normalize();const K=v?v(j):j.ownerDocument,ie=O.call(K||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let je=ie.nextNode();for(;je;)je.data=fn(je.data),je=ie.nextNode();const ze=(ee=j.querySelectorAll)===null||ee===void 0?void 0:ee.call(j,"template");ze&&qn(ze,lt=>{un(lt.content)&&Wt(lt.content)})},vn=function(j){const ee=N?N(j):null;return typeof ee!="string"||ke(ee)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==k(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)},un=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===pn.documentFragment}catch{return!1}},bn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Ut(ye,j,ee){ye.length!==0&&qn(ye,K=>{K.call(t,j,ee,nt)})}const Bn=function(j,ee){return!!(Fe&&j.hasChildNodes()&&!bn(j.firstElementChild)&&Zt(Cl,j.textContent)&&Zt(Cl,j.innerHTML)||Fe&&j.namespaceURI===xe&&B1[ee]&&(bn(j.firstElementChild)||typeof j.textContent=="string"&&Zt(k1[ee],j.textContent))||j.nodeType===pn.processingInstruction||Fe&&j.nodeType===pn.comment&&Zt(fl,j.data))},ce=function(j,ee){if(j instanceof RegExp)return Zt(j,ee);if(j instanceof Function){for(var K=arguments.length,ie=new Array(K>2?K-2:0),je=2;je<K;je++)ie[je-2]=arguments[je];return!!j(ee,...ie)}return!1},we=function(j,ee,K){if(!Se[ee]&&De(ee)&&ce(pe.tagNameCheck,ee))return!1;if(Je&&!_t[ee]){const ie=x(j),je=f(j);if(je&&ie){const ze=je.length;for(let lt=ze-1;lt>=0;--lt){const Mt=j===K?g(je[lt],!0):je[lt];ie.insertBefore(Mt,C(j))}}}return $t(j),!0},Re=function(j,ee,K,ie){return j.length===0?ee:ee===K||ee===ie?dn(ee):ee},Ke=function(j,ee){return j===ee||x(j)!==null?!1:(ot&&Nt(j),!0)},Oe=function(j,ee){if(Ut(Q.beforeSanitizeElements,j,null),Ke(j,ee))return!0;if(vn(j))return $t(j),!0;const K=ke(w(j));if(z=Re(Q.uponSanitizeElement,z,ne,He),Ut(Q.uponSanitizeElement,j,{tagName:K,allowedTags:z}),Ke(j,ee))return!0;if(Bn(j,K))return $t(j),!0;if(Se[K]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(K))&&!z[K]){const je=we(j,K,ee);return je===!1&&Ut(Q.afterSanitizeElements,j,null),je}if(B(j)===pn.element&&!Xt(j)||(K==="noscript"||K==="noembed"||K==="noframes")&&Zt(x1,j.innerHTML))return $t(j),!0;if(Le&&j.nodeType===pn.text){const je=fn(j.textContent);j.textContent!==je&&(Ba(t.removed,{element:j.cloneNode()}),j.textContent=je)}return Ut(Q.afterSanitizeElements,j,null),!1},J=function(j,ee,K){if(ve[ee]||kt(ee,j)||Ue&&(ee==="id"||ee==="name")&&(K in a||K in re))return!1;const ie=W[ee]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(ee,j);return fe&&Zt(L,ee)||de&&Zt(G,ee)?!0:ie?xt[ee]||Zt(X,Aa(K,se,""))||(ee==="src"||ee==="xlink:href"||ee==="href")&&j!=="script"&&ll(K,"data:")===0&&et[j]||be&&!Zt(ae,Aa(K,se,""))?!0:!K:De(j)&&ce(pe.tagNameCheck,j)&&ce(pe.attributeNameCheck,ee,j)||ee==="is"&&pe.allowCustomizedBuiltInElements&&ce(pe.tagNameCheck,K)},ue=Ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),De=function(j){return!ue[ka(j)]&&Zt(me,j)},Ie=function(j,ee,K,ie){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!K)switch(p.getAttributeType(j,ee)){case"TrustedHTML":return T(ie);case"TrustedScriptURL":return P(ie)}return ie},Ye=function(j,ee,K,ie){try{K?j.setAttributeNS(K,ee,ie):j.setAttribute(ee,ie),vn(j)?$t(j):ol(t.removed)}catch{Ft(ee,j)}},Xe=function(j){Ut(Q.beforeSanitizeAttributes,j,null);const ee=j.attributes;if(!ee||vn(j))return;W=Re(Q.uponSanitizeAttribute,W,q,it);const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let ie=ee.length;const je=ke(j.nodeName);for(;ie--;){const ze=ee[ie],lt=ze.name,Mt=ze.namespaceURI,tn=ze.value,nn=ke(lt),Pr=tn;let Jt=lt==="value"?Pr:r1(Pr);if(K.attrName=nn,K.attrValue=Jt,K.keepAttr=!0,K.forceKeepAttr=void 0,Ut(Q.uponSanitizeAttribute,j,K),Jt=K.attrValue,Ae&&(nn==="id"||nn==="name")&&ll(Jt,Ve)!==0&&(Ft(lt,j,ze),Jt=Ve+Jt),Fe&&Zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Jt)){Ft(lt,j,ze);continue}if(nn==="attributename"&&sl(Jt,"href")){Ft(lt,j,ze);continue}if(!K.forceKeepAttr){if(!K.keepAttr){Ft(lt,j,ze);continue}if(!he&&Zt(w1,Jt)){Ft(lt,j,ze);continue}if(Le&&(Jt=fn(Jt)),!J(je,nn,Jt)){Ft(lt,j,ze);continue}Jt=Ie(je,nn,Mt,Jt),Jt!==Pr&&Ye(j,lt,Mt,Jt)}}Ut(Q.afterSanitizeAttributes,j,null)},ht=function(j){let ee=null;const K=ln(j);for(Ut(Q.beforeSanitizeShadowDOM,j,null);ee=K.nextNode();)if(Ut(Q.uponSanitizeShadowNode,ee,null),Oe(ee,j),Xe(ee),un(ee.content)&&ht(ee.content),B(ee)===pn.element){const ie=b(ee);un(ie)&&(mt(ie),ht(ie))}Ut(Q.afterSanitizeShadowDOM,j,null)},mt=function(j){const ee=[{node:j,shadow:null}];for(;ee.length>0;){const K=ee.pop();if(K.shadow){ht(K.shadow);continue}const ie=K.node,ze=B(ie)===pn.element,lt=f(ie);if(lt)for(let Mt=lt.length-1;Mt>=0;--Mt)ee.push({node:lt[Mt],shadow:null});if(ze){const Mt=N?N(ie):null;if(typeof Mt=="string"&&ke(Mt)==="template"){const tn=ie.content;un(tn)&&ee.push({node:tn,shadow:null})}}if(ze){const Mt=b(ie);un(Mt)&&ee.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}};return t.sanitize=function(ye){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=null,K=null,ie=null,je=null;if(Me=!ye,Me&&(ye="<!-->"),typeof ye!="string"&&!bn(ye)&&(ye=u1(ye),typeof ye!="string"))throw Un("dirty is not a string, aborting");if(!t.isSupported)return ye;qe?(z=He,W=it):Pe(j),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(z=dn(z)),Q.uponSanitizeAttribute.length>0&&(W=dn(W)),t.removed=[];const ze=ot&&typeof ye!="string"&&bn(ye);if(ze){pt(ye);const tn=w(ye);if(typeof tn=="string"){const nn=ke(tn);if(!z[nn]||Se[nn])throw sn(ye),Un("root node is forbidden and cannot be sanitized in-place")}if(vn(ye))throw sn(ye),Un("root node is clobbered and cannot be sanitized in-place");try{mt(ye)}catch(nn){throw sn(ye),nn}}else if(bn(ye))ee=Tt("<!---->"),K=ee.ownerDocument.importNode(ye,!0),K.nodeType===pn.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?ee=K:ee.appendChild(K),mt(K);else{if(!Qe&&!Le&&!$e&&ye.indexOf("<")===-1)return E&&Ee?T(ye):ye;if(ee=Tt(ye),!ee)return Qe?null:Ee?D:""}ee&&rt&&$t(ee.firstChild);const lt=ze?ye:ee;try{const tn=ln(lt);for(;ie=tn.nextNode();)Oe(ie,lt),Xe(ie),un(ie.content)&&ht(ie.content)}catch(tn){throw ze&&(sn(ye),qn(t.removed,nn=>{nn.element&&Nt(nn.element)})),tn}if(ze)return qn(t.removed,tn=>{tn.element&&Nt(tn.element)}),Le&&Wt(ye),ye;if(Qe){if(Le&&Wt(ee),ft)for(je=te.call(ee.ownerDocument);ee.firstChild;)je.appendChild(ee.firstChild);else je=ee;return(W.shadowroot||W.shadowrootmode)&&(je=U.call(r,je,!0)),je}let Mt=$e?ee.outerHTML:ee.innerHTML;return $e&&z["!doctype"]&&ee.ownerDocument&&ee.ownerDocument.doctype&&ee.ownerDocument.doctype.name&&Zt(v1,ee.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+ee.ownerDocument.doctype.name+`>
|
|
798
|
-
`+
|
|
797
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XC(e,t){return KC(e)||YC(e,t)||JC(e,t)||ZC()}function JC(e,t){if(e){if(typeof e=="string")return tl(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)?tl(e,t):void 0}}const nl=Object.entries,al=Object.setPrototypeOf,QC=Object.isFrozen,e1=Object.getPrototypeOf,t1=Object.getOwnPropertyDescriptor;let Ot=Object.freeze,Wt=Object.seal,oa=Object.create,rl=typeof Reflect<"u"&&Reflect,zr=rl.apply,Wr=rl.construct;Ot||(Ot=function(t){return t}),Wt||(Wt=function(t){return t}),zr||(zr=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)}),Wr||(Wr=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 qn=It(Array.prototype.forEach),n1=It(Array.prototype.lastIndexOf),ol=It(Array.prototype.pop),Ba=It(Array.prototype.push),a1=It(Array.prototype.splice),sa=Array.isArray,ka=It(String.prototype.toLowerCase),Hr=It(String.prototype.toString),sl=It(String.prototype.match),Aa=It(String.prototype.replace),ll=It(String.prototype.indexOf),r1=It(String.prototype.trim),o1=It(Number.prototype.toString),s1=It(Boolean.prototype.toString),il=typeof BigInt>"u"?null:It(BigInt.prototype.toString),ul=typeof Symbol>"u"?null:It(Symbol.prototype.toString),nn=It(Object.prototype.hasOwnProperty),Na=It(Object.prototype.toString),Kt=It(RegExp.prototype.test),Un=l1(TypeError);function It(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 zr(e,t,r)}}function l1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Wr(e,a)}}function Ct(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ka;if(al&&al(e,null),!sa(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(QC(t)||(t[r]=l),s=l)}e[s]=!0}return e}function i1(e){for(let t=0;t<e.length;t++)nn(e,t)||(e[t]=null);return e}function cn(e){const t=oa(null);for(const r of nl(e)){var a=XC(r,2);const s=a[0],l=a[1];nn(e,s)&&(sa(l)?t[s]=i1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=cn(l):t[s]=l)}return t}function u1(e){switch(typeof e){case"string":return e;case"number":return o1(e);case"boolean":return s1(e);case"bigint":return il?il(e):"0";case"symbol":return ul?ul(e):"Symbol()";case"undefined":return Na(e);case"function":case"object":{if(e===null)return Na(e);const t=e,a=yn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Na(r)}return Na(e)}default:return Na(e)}}function yn(e,t){for(;e!==null;){const r=t1(e,t);if(r){if(r.get)return It(r.get);if(typeof r.value=="function")return It(r.value)}e=e1(e)}function a(){return null}return a}function c1(e){try{return Kt(e,""),!0}catch{return!1}}const cl=Ot(["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"]),Vr=Ot(["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"]),qr=Ot(["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"]),d1=Ot(["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"]),Ur=Ot(["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"]),p1=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dl=Ot(["#text"]),pl=Ot(["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"]),Gr=Ot(["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"]),hl=Ot(["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"]),nr=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),h1=Wt(/{{[\w\W]*|^[\w\W]*}}/g),m1=Wt(/<%[\w\W]*|^[\w\W]*%>/g),C1=Wt(/\${[\w\W]*/g),f1=Wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),b1=Wt(/^aria-[\-\w]+$/),ml=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),g1=Wt(/^(?:\w+script|data):/i),y1=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),v1=Wt(/^html$/i),_1=Wt(/^[a-z][.\w]*(-[.\w]+)+$/i),Cl=Wt(/<[/\w!]/g),fl=Wt(/<[/\w]/g),x1=Wt(/<\/no(script|embed|frames)/i),w1=Wt(/\/>/i),dn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],B1=Ot(Ct({},bl)),k1=(function(){const e={};return qn(bl,t=>{e[t]=Wt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ot(e)})(),A1=function(){return typeof window>"u"?null:window},N1=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}},gl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Fn=function(t,a,r,s){return nn(t,a)&&sa(t[a])?Ct(s.base?cn(s.base):{},t[a],s.transform):r},Kr=function(t,a,r){const s=nn(t,a)?t[a]:void 0;return s&&typeof s=="object"?cn(s):r()};function yl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A1();const t=_e=>yl(_e);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==dn.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,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=yn(m,"cloneNode"),y=yn(m,"remove"),C=yn(m,"nextSibling"),f=yn(m,"childNodes"),x=yn(m,"parentNode"),b=yn(m,"shadowRoot"),B=yn(m,"attributes"),_=i&&i.prototype?yn(i.prototype,"nodeType"):null,N=i&&i.prototype?yn(i.prototype,"nodeName"):null,v=i&&i.prototype?yn(i.prototype,"ownerDocument"):null,k=function(j){return _?_(j):j.nodeType},w=function(j){return N?N(j):j.nodeName};if(typeof l=="function"){const _e=a.createElement("template");_e.content&&_e.content.ownerDocument&&(a=_e.content.ownerDocument)}let A,D="",E,R=!1,$=0;const G=function(){if($>0)throw Un('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){G(),$++;try{return A.createHTML(j)}finally{$--}},F=function(j){G(),$++;try{return A.createScriptURL(j)}finally{$--}},M=function(){return R||(E=N1(p,s),R=!0),E},X=a,Z=X.implementation,O=X.createNodeIterator,Y=X.createDocumentFragment,I=X.getElementsByTagName,q=r.importNode;let Q=gl();t.isSupported=typeof nl=="function"&&typeof x=="function"&&Z&&Z.createHTMLDocument!==void 0;const H=h1,S=m1,P=C1,L=f1,U=b1,ae=g1,se=y1,me=_1;let te=ml,z=null;const ne=Ct({},[...cl,...Vr,...qr,...Ur,...dl]);let W=null;const V=Ct({},[...pl,...Gr,...hl,...nr]);let pe=Object.seal(oa(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}})),Ee=null,xe=null;const Ce=Object.seal(oa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ce=!0,ge=!0,be=!1,he=!0,Me=!1,We=!0,Re=!1,qe=!1,He=null,st=null,lt=!1,Qe=!1,dt=!1,Se=!1,Ge=!0,Ne=!1;const Ie="user-content-";let Je=!0,nt=!1,Nt={},_t=null;const Lt=Ct({},["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 et=null;const at=Ct({},["audio","video","img","source","image","track"]);let Et=null;const wt=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tt="http://www.w3.org/1998/Math/MathML",Dt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let rt=gt,ut=!1,ye=null;const Le=Ct({},[Tt,Dt,gt],Hr),je=Ot(["mi","mo","mn","ms","mtext"]);let Ze=Ct({},je);const Ue=Ot(["annotation-xml"]);let yt=Ct({},Ue);const bt=Ct({},["title","style","font","a","script"]);let Bt=null;const pt=["application/xhtml+xml","text/html"],vt="text/html";let Te=null,it=null;const re=a.createElement("form"),fe=function(j){return j instanceof RegExp||j instanceof Function},Pe=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(it&&it===j)return;(!j||typeof j!="object")&&(j={}),j=cn(j),Bt=pt.indexOf(j.PARSER_MEDIA_TYPE)===-1?vt:j.PARSER_MEDIA_TYPE,Te=Bt==="application/xhtml+xml"?Hr:ka,z=Fn(j,"ALLOWED_TAGS",ne,{transform:Te}),W=Fn(j,"ALLOWED_ATTR",V,{transform:Te}),ye=Fn(j,"ALLOWED_NAMESPACES",Le,{transform:Hr}),Et=Fn(j,"ADD_URI_SAFE_ATTR",wt,{transform:Te,base:wt}),et=Fn(j,"ADD_DATA_URI_TAGS",at,{transform:Te,base:at}),_t=Fn(j,"FORBID_CONTENTS",Lt,{transform:Te}),Ee=Fn(j,"FORBID_TAGS",cn({}),{transform:Te}),xe=Fn(j,"FORBID_ATTR",cn({}),{transform:Te}),Nt=nn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?cn(j.USE_PROFILES):j.USE_PROFILES:!1,ce=j.ALLOW_ARIA_ATTR!==!1,ge=j.ALLOW_DATA_ATTR!==!1,be=j.ALLOW_UNKNOWN_PROTOCOLS||!1,he=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Me=j.SAFE_FOR_TEMPLATES||!1,We=j.SAFE_FOR_XML!==!1,Re=j.WHOLE_DOCUMENT||!1,Qe=j.RETURN_DOM||!1,dt=j.RETURN_DOM_FRAGMENT||!1,Se=j.RETURN_TRUSTED_TYPE||!1,lt=j.FORCE_BODY||!1,Ge=j.SANITIZE_DOM!==!1,Ne=j.SANITIZE_NAMED_PROPS||!1,Je=j.KEEP_CONTENT!==!1,nt=j.IN_PLACE||!1,te=c1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:ml,rt=typeof j.NAMESPACE=="string"?j.NAMESPACE:gt,Ze=Kr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ct({},je)),yt=Kr(j,"HTML_INTEGRATION_POINTS",()=>Ct({},Ue));const ee=Kr(j,"CUSTOM_ELEMENT_HANDLING",()=>oa(null));if(pe=oa(null),nn(ee,"tagNameCheck")&&fe(ee.tagNameCheck)&&(pe.tagNameCheck=ee.tagNameCheck),nn(ee,"attributeNameCheck")&&fe(ee.attributeNameCheck)&&(pe.attributeNameCheck=ee.attributeNameCheck),nn(ee,"allowCustomizedBuiltInElements")&&typeof ee.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=ee.allowCustomizedBuiltInElements),Wt(pe),Me&&(ge=!1),dt&&(Qe=!0),Nt&&(z=Ct({},dl),W=oa(null),Nt.html===!0&&(Ct(z,cl),Ct(W,pl)),Nt.svg===!0&&(Ct(z,Vr),Ct(W,Gr),Ct(W,nr)),Nt.svgFilters===!0&&(Ct(z,qr),Ct(W,Gr),Ct(W,nr)),Nt.mathMl===!0&&(Ct(z,Ur),Ct(W,hl),Ct(W,nr))),Ce.tagCheck=null,Ce.attributeCheck=null,nn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?Ce.tagCheck=j.ADD_TAGS:sa(j.ADD_TAGS)&&(z===ne&&(z=cn(z)),Ct(z,j.ADD_TAGS,Te))),nn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?Ce.attributeCheck=j.ADD_ATTR:sa(j.ADD_ATTR)&&(W===V&&(W=cn(W)),Ct(W,j.ADD_ATTR,Te))),nn(j,"ADD_FORBID_CONTENTS")&&sa(j.ADD_FORBID_CONTENTS)&&(_t===Lt&&(_t=cn(_t)),Ct(_t,j.ADD_FORBID_CONTENTS,Te)),Je&&(z["#text"]=!0),Re&&Ct(z,["html","head","body"]),z.table&&(Ct(z,["tbody"]),delete Ee.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=A;A=j.TRUSTED_TYPES_POLICY;try{D=T("")}catch(ie){throw A=K,ie}}else j.TRUSTED_TYPES_POLICY===null?(A=void 0,D=""):(A===void 0&&(A=M()),A&&typeof D=="string"&&(D=T("")));Ot&&Ot(j),it=j},Ve=Ct({},[...Vr,...qr,...d1]),ft=Ct({},[...Ur,...p1]),ot=function(j,ee,K){return ee.namespaceURI===gt?j==="svg":ee.namespaceURI===Tt?j==="svg"&&(K==="annotation-xml"||Ze[K]):!!Ve[j]},zt=function(j,ee,K){return ee.namespaceURI===gt?j==="math":ee.namespaceURI===Dt?j==="math"&&yt[K]:!!ft[j]},Jt=function(j,ee,K){return ee.namespaceURI===Dt&&!yt[K]||ee.namespaceURI===Tt&&!Ze[K]?!1:!ft[j]&&(bt[j]||!Ve[j])},Qt=function(j){let ee=x(j);(!ee||!ee.tagName)&&(ee={namespaceURI:rt,tagName:"template"});const K=ka(j.tagName),ie=ka(ee.tagName);return ye[j.namespaceURI]?j.namespaceURI===Dt?ot(K,ee,ie):j.namespaceURI===Tt?zt(K,ee,ie):j.namespaceURI===gt?Jt(K,ee,ie):!!(Bt==="application/xhtml+xml"&&ye[j.namespaceURI]):!1},$t=function(j){Ba(t.removed,{element:j});try{x(j).removeChild(j)}catch{if(y(j),!x(j))throw Un("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},on=function(j,ee,K){try{j.removeAttributeNode(ee)}catch{try{j.removeAttribute(K)}catch{}}},sn=function(j){xt(j);const ee=f(j);if(ee){const ie=[];qn(ee,De=>{Ba(ie,De)}),qn(ie,De=>{try{y(De)}catch{}})}const K=B(j);if(K)for(let ie=K.length-1;ie>=0;--ie){const De=K[ie],ze=De&&De.name;typeof ze=="string"&&on(j,De,ze)}},Pt=function(j,ee,K){if(!K)try{K=ee.getAttributeNode(j)}catch{K=null}Ba(t.removed,{attribute:K||null,from:ee});try{K?ee.removeAttributeNode(K):ee.removeAttribute(j)}catch{try{ee.removeAttribute(j)}catch{}}if(j==="is")if(Qe||dt)try{$t(ee)}catch{}else try{ee.setAttribute(j,"")}catch{}},xn=function(j){const ee=B(j);if(ee)for(let K=ee.length-1;K>=0;--K){const ie=ee[K],De=ie&&ie.name;typeof De!="string"||W[Te(De)]||on(j,ie,De)}},xt=function(j){const ee=[j];for(;ee.length>0;){const K=ee.pop();k(K)===dn.element&&xn(K);const De=f(K);if(De)for(let ze=De.length-1;ze>=0;--ze)ee.push(De[ze])}},Rt=function(j,ee){return We?j==="patchsrc"?!0:j==="for"&&ee!=="label"&&ee!=="output":!1},Ut=function(j){if(!We)return;const ee=[j];for(;ee.length>0;){const K=ee.pop(),ie=k(K);if(ie===dn.processingInstruction||ie===dn.comment&&Kt(fl,K.data)){try{y(K)}catch{}continue}if(ie===dn.element){const ze=K,ct=Te(w(K));try{ze.hasAttribute&&ze.hasAttribute("patchsrc")&&ze.removeAttribute("patchsrc"),ze.hasAttribute&&ze.hasAttribute("for")&&Rt("for",ct)&&ze.removeAttribute("for")}catch{}}const De=f(K);if(De)for(let ze=De.length-1;ze>=0;--ze)ee.push(De[ze])}},Gt=function(j){let ee=null,K=null;if(lt)j="<remove></remove>"+j;else{const ze=sl(j,/^[\r\n\t ]+/);K=ze&&ze[0]}Bt==="application/xhtml+xml"&&rt===gt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ie=A?T(j):j;if(rt===gt)try{ee=new h().parseFromString(ie,Bt)}catch{}if(!ee||!ee.documentElement){ee=Z.createDocument(rt,"template",null);try{ee.documentElement.innerHTML=ut?D:ie}catch{}}const De=ee.body||ee.documentElement;return j&&K&&De.insertBefore(a.createTextNode(K),De.childNodes[0]||null),rt===gt?I.call(ee,Re?"html":"body")[0]:Re?ee.documentElement:De},Pn=function(j){const ee=v?v(j):j.ownerDocument;return O.call(ee||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mn=function(j){return j=Aa(j,H," "),j=Aa(j,S," "),j=Aa(j,P," "),j},Ft=function(j){var ee;j.normalize();const K=v?v(j):j.ownerDocument,ie=O.call(K||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let De=ie.nextNode();for(;De;)De.data=mn(De.data),De=ie.nextNode();const ze=(ee=j.querySelectorAll)===null||ee===void 0?void 0:ee.call(j,"template");ze&&qn(ze,ct=>{ln(ct.content)&&Ft(ct.content)})},gn=function(j){const ee=N?N(j):null;return typeof ee!="string"||Te(ee)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==B(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)},ln=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===dn.documentFragment}catch{return!1}},Cn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Ht(_e,j,ee){_e.length!==0&&qn(_e,K=>{K.call(t,j,ee,it)})}const wn=function(j,ee){return!!(We&&j.hasChildNodes()&&!Cn(j.firstElementChild)&&Kt(Cl,j.textContent)&&Kt(Cl,j.innerHTML)||We&&j.namespaceURI===gt&&B1[ee]&&(Cn(j.firstElementChild)||typeof j.textContent=="string"&&Kt(k1[ee],j.textContent))||j.nodeType===dn.processingInstruction||We&&j.nodeType===dn.comment&&Kt(fl,j.data))},de=function(j,ee){if(j instanceof RegExp)return Kt(j,ee);if(j instanceof Function){for(var K=arguments.length,ie=new Array(K>2?K-2:0),De=2;De<K;De++)ie[De-2]=arguments[De];return!!j(ee,...ie)}return!1},we=function(j,ee,K){if(!Ee[ee]&&Ae(ee)&&de(pe.tagNameCheck,ee))return!1;if(Je&&!_t[ee]){const ie=x(j),De=f(j);if(De&&ie){const ze=De.length;for(let ct=ze-1;ct>=0;--ct){const St=j===K?g(De[ct],!0):De[ct];ie.insertBefore(St,C(j))}}}return $t(j),!0},$e=function(j,ee,K,ie){return j.length===0?ee:ee===K||ee===ie?cn(ee):ee},Ke=function(j,ee){return j===ee||x(j)!==null?!1:(nt&&xt(j),!0)},Oe=function(j,ee){if(Ht(Q.beforeSanitizeElements,j,null),Ke(j,ee))return!0;if(gn(j))return $t(j),!0;const K=Te(w(j));if(z=$e(Q.uponSanitizeElement,z,ne,He),Ht(Q.uponSanitizeElement,j,{tagName:K,allowedTags:z}),Ke(j,ee))return!0;if(wn(j,K))return $t(j),!0;if(Ee[K]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(K))&&!z[K]){const De=we(j,K,ee);return De===!1&&Ht(Q.afterSanitizeElements,j,null),De}if(k(j)===dn.element&&!Qt(j)||(K==="noscript"||K==="noembed"||K==="noframes")&&Kt(x1,j.innerHTML))return $t(j),!0;if(Me&&j.nodeType===dn.text){const De=mn(j.textContent);j.textContent!==De&&(Ba(t.removed,{element:j.cloneNode()}),j.textContent=De)}return Ht(Q.afterSanitizeElements,j,null),!1},J=function(j,ee,K){if(xe[ee]||Rt(ee,j)||Ge&&(ee==="id"||ee==="name")&&(K in a||K in re))return!1;const ie=W[ee]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(ee,j);return ge&&Kt(L,ee)||ce&&Kt(U,ee)?!0:ie?Et[ee]||Kt(te,Aa(K,se,""))||(ee==="src"||ee==="xlink:href"||ee==="href")&&j!=="script"&&ll(K,"data:")===0&&et[j]||be&&!Kt(ae,Aa(K,se,""))?!0:!K:Ae(j)&&de(pe.tagNameCheck,j)&&de(pe.attributeNameCheck,ee,j)||ee==="is"&&pe.allowCustomizedBuiltInElements&&de(pe.tagNameCheck,K)},ue=Ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ae=function(j){return!ue[ka(j)]&&Kt(me,j)},Fe=function(j,ee,K,ie){if(A&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!K)switch(p.getAttributeType(j,ee)){case"TrustedHTML":return T(ie);case"TrustedScriptURL":return F(ie)}return ie},Ye=function(j,ee,K,ie){try{K?j.setAttributeNS(K,ee,ie):j.setAttribute(ee,ie),gn(j)?$t(j):ol(t.removed)}catch{Pt(ee,j)}},Xe=function(j){Ht(Q.beforeSanitizeAttributes,j,null);const ee=j.attributes;if(!ee||gn(j))return;W=$e(Q.uponSanitizeAttribute,W,V,st);const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let ie=ee.length;const De=Te(j.nodeName);for(;ie--;){const ze=ee[ie],ct=ze.name,St=ze.namespaceURI,en=ze.value,tn=Te(ct),Pr=en;let Yt=ct==="value"?Pr:r1(Pr);if(K.attrName=tn,K.attrValue=Yt,K.keepAttr=!0,K.forceKeepAttr=void 0,Ht(Q.uponSanitizeAttribute,j,K),Yt=K.attrValue,Ne&&(tn==="id"||tn==="name")&&ll(Yt,Ie)!==0&&(Pt(ct,j,ze),Yt=Ie+Yt),We&&Kt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Yt)){Pt(ct,j,ze);continue}if(tn==="attributename"&&sl(Yt,"href")){Pt(ct,j,ze);continue}if(!K.forceKeepAttr){if(!K.keepAttr){Pt(ct,j,ze);continue}if(!he&&Kt(w1,Yt)){Pt(ct,j,ze);continue}if(Me&&(Yt=mn(Yt)),!J(De,tn,Yt)){Pt(ct,j,ze);continue}Yt=Fe(De,tn,St,Yt),Yt!==Pr&&Ye(j,ct,St,Yt)}}Ht(Q.afterSanitizeAttributes,j,null)},ht=function(j){let ee=null;const K=Pn(j);for(Ht(Q.beforeSanitizeShadowDOM,j,null);ee=K.nextNode();)if(Ht(Q.uponSanitizeShadowNode,ee,null),Oe(ee,j),Xe(ee),ln(ee.content)&&ht(ee.content),k(ee)===dn.element){const ie=b(ee);ln(ie)&&(mt(ie),ht(ie))}Ht(Q.afterSanitizeShadowDOM,j,null)},mt=function(j){const ee=[{node:j,shadow:null}];for(;ee.length>0;){const K=ee.pop();if(K.shadow){ht(K.shadow);continue}const ie=K.node,ze=k(ie)===dn.element,ct=f(ie);if(ct)for(let St=ct.length-1;St>=0;--St)ee.push({node:ct[St],shadow:null});if(ze){const St=N?N(ie):null;if(typeof St=="string"&&Te(St)==="template"){const en=ie.content;ln(en)&&ee.push({node:en,shadow:null})}}if(ze){const St=b(ie);ln(St)&&ee.push({node:null,shadow:St},{node:St,shadow:null})}}};return t.sanitize=function(_e){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=null,K=null,ie=null,De=null;if(ut=!_e,ut&&(_e="<!-->"),typeof _e!="string"&&!Cn(_e)&&(_e=u1(_e),typeof _e!="string"))throw Un("dirty is not a string, aborting");if(!t.isSupported)return _e;qe?(z=He,W=st):Pe(j),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(z=cn(z)),Q.uponSanitizeAttribute.length>0&&(W=cn(W)),t.removed=[];const ze=nt&&typeof _e!="string"&&Cn(_e);if(ze){Ut(_e);const en=w(_e);if(typeof en=="string"){const tn=Te(en);if(!z[tn]||Ee[tn])throw sn(_e),Un("root node is forbidden and cannot be sanitized in-place")}if(gn(_e))throw sn(_e),Un("root node is clobbered and cannot be sanitized in-place");try{mt(_e)}catch(tn){throw sn(_e),tn}}else if(Cn(_e))ee=Gt("<!---->"),K=ee.ownerDocument.importNode(_e,!0),K.nodeType===dn.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?ee=K:ee.appendChild(K),mt(K);else{if(!Qe&&!Me&&!Re&&_e.indexOf("<")===-1)return A&&Se?T(_e):_e;if(ee=Gt(_e),!ee)return Qe?null:Se?D:""}ee&<&&$t(ee.firstChild);const ct=ze?_e:ee;try{const en=Pn(ct);for(;ie=en.nextNode();)Oe(ie,ct),Xe(ie),ln(ie.content)&&ht(ie.content)}catch(en){throw ze&&(sn(_e),qn(t.removed,tn=>{tn.element&&xt(tn.element)})),en}if(ze)return qn(t.removed,en=>{en.element&&xt(en.element)}),Me&&Ft(_e),_e;if(Qe){if(Me&&Ft(ee),dt)for(De=Y.call(ee.ownerDocument);ee.firstChild;)De.appendChild(ee.firstChild);else De=ee;return(W.shadowroot||W.shadowrootmode)&&(De=q.call(r,De,!0)),De}let St=Re?ee.outerHTML:ee.innerHTML;return Re&&z["!doctype"]&&ee.ownerDocument&&ee.ownerDocument.doctype&&ee.ownerDocument.doctype.name&&Kt(v1,ee.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+ee.ownerDocument.doctype.name+`>
|
|
798
|
+
`+St),Me&&(St=mn(St)),A&&Se?T(St):St},t.setConfig=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pe(_e),qe=!0,He=z,st=W},t.clearConfig=function(){it=null,qe=!1,He=null,st=null,A=E,D=""},t.isValidAttribute=function(_e,j,ee){it||Pe({});const K=Te(_e),ie=Te(j);return J(K,ie,ee)},t.addHook=function(_e,j){typeof j=="function"&&nn(Q,_e)&&Ba(Q[_e],j)},t.removeHook=function(_e,j){if(nn(Q,_e)){if(j!==void 0){const ee=n1(Q[_e],j);return ee===-1?void 0:a1(Q[_e],ee,1)[0]}return ol(Q[_e])}},t.removeHooks=function(_e){nn(Q,_e)&&(Q[_e]=[])},t.removeAllHooks=function(){Q=gl()},t}var la=yl();let Yr=null;const E1=1500;function Zr(){Yr?.clear(),Yr=null}function D1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;Zr();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{Zr();try{r.cancel();const d=new SpeechSynthesisUtterance(e),h=r.getVoices().find(p=>p.lang.startsWith("ko"));h&&(d.voice=h),d.rate=a,d.onend=t?l:null,d.onerror=t?l:null,r.speak(d)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,E1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Yr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function Xr(){Zr(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const S1=/^(?:[a-z]+:)?\/\//i,j1="__ihab_core_asset_base_url__";function T1(){return globalThis[j1]??""}function Jr(e){const t=String(e||"").trim();if(!t)return"";if(S1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=T1();return r?`${r}${a}`:a}const vl="__ihab_core_storage_resolvers__";function Ea(){return globalThis[vl]??null}function M1(e){globalThis[vl]=e}let _l=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:
|
|
@@ -815,22 +815,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
815
815
|
npm install @supabase/supabase-js
|
|
816
816
|
pnpm add @supabase/supabase-js
|
|
817
817
|
`),this.name="StorageNotConfiguredError"}};function L1(e){M1(e)}function xl(e,t){if(!e)return null;const a=Ea();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function wl(e){if(!e)return null;const t=Ea();if(!t)throw new _l("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Bl(e){const t=Ea();if(!t)throw new _l("downloadSound");return t.download(e)}function $1(){return Ea()?.noiseBaseUrl??"/sounds/noise"}function R1(){const e=Number(Ea()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function P1(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 I1(e){return e===400||e===404||e===410}const kl="__ihab_core_tts_config__";function Da(){return globalThis[kl]?.urlResolver??null}function ar(){return globalThis[kl]?.fallbackUrlResolver??null}const F1="__ihab_core_pronunciation_resolver__";function O1(){return globalThis[F1]??null}let On=null;const Sa=new WeakMap,Qr=new WeakMap,eo=new WeakMap;let Al=!1;const Nl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function z1(){if(Al||typeof document>"u")return;Al=!0;const e=()=>{try{On&&On.state!=="running"&&On.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function El(){if(On)return On;try{const e=window.AudioContext||window.webkitAudioContext;return e?(On=new e,z1(),On):null}catch{return null}}function to(){try{On?.resume()}catch{}}function no(e,t){const a=Sa.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=Nl(Qr.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 Sa.set(t,i),i}catch{return null}}function rr(e){if(!e)return Promise.resolve(null);const t=Sa.get(e);if(t)return Promise.resolve(t.analyser);const a=El();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(no(a,e)?.analyser??null);const r=eo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?no(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{eo.delete(e)});return eo.set(e,s),s}function W1(e){if(!e)return null;const t=Sa.get(e);if(t)return t.analyser;const a=El();return a?a.state==="running"?no(a,e)?.analyser??null:(rr(e),null):null}function zn(e,t){const a=Nl(t);Qr.set(e,a);const r=Sa.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 or(e){return Qr.get(e)??e.volume}function H1(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 V1="__ihab_core_image_config__";function ia(){return globalThis[V1]??null}const Dl="word_image_existence_map_v1",q1="ihab:image-existence-updated";let ja=null;function U1(){ja!==null&&(clearTimeout(ja),ja=null),typeof window<"u"&&window.dispatchEvent(new Event(q1))}function G1(){ja===null&&(ja=setTimeout(U1,200))}let Gn=null,ao=0;const Ta=new Map;function K1(){if(Gn)return Gn;try{const e=typeof localStorage<"u"?localStorage.getItem(Dl):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);Gn=a}catch{Gn={}}return Gn}let ro=null;function Y1(){ro===null&&(ro=setTimeout(()=>{ro=null;try{typeof localStorage<"u"&&Gn&&localStorage.setItem(Dl,JSON.stringify(Gn))}catch{}},200))}function Z1(e,t){return`${e}_${t??1}`}async function X1(e,t,a=!1){const r=K1(),s=Z1(e,t);if(!a&&s in r)return r[s];if(!a&&Ta.has(s))return Ta.get(s);const l=ia();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:P1(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:I1(d.status)?!1:null,()=>null).then(d=>Ta.get(s)!==c?d??!1:(Ta.delete(s),d===null?!1:(r[s]=d,ao++,Y1(),d)));return Ta.set(s,c),c}async function Sl(e,t){const a=ao,r=await X1(e,t);return ao!==a&&G1(),r}const jl=90;function Tl(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 J1(e){return Tl(e)>90?"LMS":"SMS"}function Ml(e,t=85){const a=Tl(e),r=J1(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 Q1=["onset","vowel","coda","glide"],Ll="none",ef={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},tf="\uC5C6\uC74C";function nf(e){return Q1.includes(e)}function af(e){const t={};for(const[a,r]of Object.entries(e)){const s=nf(a)?a:ef[a];s&&(t[s]=r===tf?Ll:r)}return t}const rf={\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"}},$l=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Rl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],of=["","\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 Ma(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 sf(e){const t=Ma(e[0]||"");return t?$l[t.cho]:""}function lf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>$l.includes(i),r=i=>Rl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ma(i)?"syl":"other"),l=t.map(i=>Ma(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 d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(sf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=Ma(p);if(!g||Rl[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=Ma(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const uf={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(uf).map(([e,t])=>[t.join(""),of[Number(e)]]));const cf="word_pair_index_v2",df="word_pair_index_sig_v2";let sr=null;function pf(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 hf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(cf),t=localStorage.getItem(df);if(!e||!t)return null;const a=JSON.parse(e);return pf(a)?{index:a,sig:t}:null}catch{return null}}function mf(){if(sr)return sr;const e=hf();return e?(sr=e.index,e.sig,sr):null}function Cf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function ff(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 oo=/[ㄱ-ㅎ]/,bf=/[ㅏ-ㅣ]/;function Pl(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||oo.test(a)||bf.test(a))return a}return null}function gf(e){const t=Pl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":oo.test(t)?"\uC774":"\uAC00"}function yf(e){return`${e}${gf(e)}`}function vf(e){const t=Pl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":oo.test(t)?"\uC744":"\uB97C"}function _f(e){return`${e}${vf(e)}`}function xf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function La(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 wf=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Gt?.t=="function"?Gt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Il(e,t){if(t===void 0&&(t=wf()),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 Bf="__ihab_core_word_pool__";function Fl(){return globalThis[Bf]??null}const Ol=globalThis;function zl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function kf(e){zl("time",()=>Ol.__ihabTrainingTimeLogger?.(e))}function Af(e){zl("completion",()=>Ol.__ihabTrainingCompletionLogger?.(e))}const Nf="Asia/Seoul",Ef=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function $a(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=Ef.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 Df(e){return $a(e)!==null}const Sf=e=>$a(e);function Wl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Sf(e);return r?r.toLocaleDateString(a,{timeZone:Nf,year:"numeric",month:"short",day:"numeric"}):""}function Hl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function jf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Hl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function so(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||jf(a,r,t)}function Ra(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&$a(e)?.toISOString().slice(0,10)===e?e:Ra()}function ua(){return Mf(Ra())}const Tf=540*60*1e3;function Vl(e,t,a){return new Date(Date.UTC(e,t,a)-Tf)}function Mf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function io(e){if(e==null||e==="")return"";const t=$a(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ql(e,t){if(!e)return"";const a=$a(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),d=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(d,11)}):t("store.time.yearsAgo",{n:h})}function Ul(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function lr(e){if(typeof e=="string"){const t=e.trim();return t&&Df(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 rn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Lf(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 $f(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:rn(r.contextCode)??rn(r.itemId)??rn(r.itemCode)??rn(r.id),question:rn(r.question)??rn(r.q)??rn(r.sentence)??rn(r.text)??rn(r.prompt)??rn(r.word)??rn(r.targetSyllable),answer:rn(r.answer),selected:rn(r.selectedText)??rn(r.selected),correct:Lf(r),shownAt:lr(r.shownAt)??lr(r.shown_at),answeredAt:lr(r.answeredAt)??lr(r.answered_at)}}):[]}const uo=globalThis;async function Rf(){try{return await uo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function co(e){const t=a=>{};try{const a=uo.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function ir(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Pf(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 ca(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Gl(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 po(e){return(e??0).toLocaleString("ko-KR")}const If=[{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"}]}],Ff=[{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 Kl(){return If}function Of(){return Ff}const zf=[],Wf=[],Hf=[],Vf=[];function qf(){return{LISTEN_IN_NOISE:zf,SHORT_STORY:Wf,LONG_STORY:Hf,ORDERING_SENTENCE:Vf}}const Uf=[{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."}],Yl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Gf(e){return Uf.map(t=>{const a=Yl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Kf={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."},Yf={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"],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"},Zf={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"}},Xf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Jf={selected:"\uC120\uD0DD\uB428"},Qf={placeholder:"\uC120\uD0DD"},eb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},tb={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"},nb={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"},ab={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"}}}},rb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},ob={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."}}},sb={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"}},lb={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"}},ib={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"}}}},ub={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},cb={showN:"{{n}}\uAC1C\uC529"},db={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."}},pb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},hb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},mb={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",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}}"},Cb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",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"},fb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},bb={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"}},gb={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"}},yb={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"}},vb={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",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."]},_b={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
818
|
+
`||a==="\r"?t+=2:t+=r<128?1:2}return t}function J1(e){return Tl(e)>90?"LMS":"SMS"}function Ml(e,t=85){const a=Tl(e),r=J1(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 Q1=["onset","vowel","coda","glide"],Ll="none",ef={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},tf="\uC5C6\uC74C";function nf(e){return Q1.includes(e)}function af(e){const t={};for(const[a,r]of Object.entries(e)){const s=nf(a)?a:ef[a];s&&(t[s]=r===tf?Ll:r)}return t}const rf={\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"}},$l=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Rl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],of=["","\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 Ma(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 sf(e){const t=Ma(e[0]||"");return t?$l[t.cho]:""}function lf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>$l.includes(i),r=i=>Rl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ma(i)?"syl":"other"),l=t.map(i=>Ma(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 d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(sf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=Ma(p);if(!g||Rl[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=Ma(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const uf={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(uf).map(([e,t])=>[t.join(""),of[Number(e)]]));const cf="word_pair_index_v2",df="word_pair_index_sig_v2";let sr=null;function pf(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 hf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(cf),t=localStorage.getItem(df);if(!e||!t)return null;const a=JSON.parse(e);return pf(a)?{index:a,sig:t}:null}catch{return null}}function mf(){if(sr)return sr;const e=hf();return e?(sr=e.index,e.sig,sr):null}function Cf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function ff(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 oo=/[ㄱ-ㅎ]/,bf=/[ㅏ-ㅣ]/;function Pl(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||oo.test(a)||bf.test(a))return a}return null}function gf(e){const t=Pl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":oo.test(t)?"\uC774":"\uAC00"}function yf(e){return`${e}${gf(e)}`}function vf(e){const t=Pl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":oo.test(t)?"\uC744":"\uB97C"}function _f(e){return`${e}${vf(e)}`}function xf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function La(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 wf=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Vt?.t=="function"?Vt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Il(e,t){if(t===void 0&&(t=wf()),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 Bf="__ihab_core_word_pool__";function Fl(){return globalThis[Bf]??null}const Ol=globalThis;function zl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function kf(e){zl("time",()=>Ol.__ihabTrainingTimeLogger?.(e))}function Af(e){zl("completion",()=>Ol.__ihabTrainingCompletionLogger?.(e))}const Nf="Asia/Seoul",Ef=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function $a(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=Ef.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 Df(e){return $a(e)!==null}const Sf=e=>$a(e);function Wl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Sf(e);return r?r.toLocaleDateString(a,{timeZone:Nf,year:"numeric",month:"short",day:"numeric"}):""}function Hl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function jf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Hl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function so(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||jf(a,r,t)}function Ra(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&$a(e)?.toISOString().slice(0,10)===e?e:Ra()}function ua(){return Mf(Ra())}const Tf=540*60*1e3;function Vl(e,t,a){return new Date(Date.UTC(e,t,a)-Tf)}function Mf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function io(e){if(e==null||e==="")return"";const t=$a(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ql(e,t){if(!e)return"";const a=$a(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),d=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(d,11)}):t("store.time.yearsAgo",{n:h})}function Ul(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function lr(e){if(typeof e=="string"){const t=e.trim();return t&&Df(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 an(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Lf(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 $f(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:an(r.contextCode)??an(r.itemId)??an(r.itemCode)??an(r.id),question:an(r.question)??an(r.q)??an(r.sentence)??an(r.text)??an(r.prompt)??an(r.word)??an(r.targetSyllable),answer:an(r.answer),selected:an(r.selectedText)??an(r.selected),correct:Lf(r),shownAt:lr(r.shownAt)??lr(r.shown_at),answeredAt:lr(r.answeredAt)??lr(r.answered_at)}}):[]}const uo=globalThis;async function Rf(){try{return await uo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function co(e){const t=a=>{};try{const a=uo.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function ir(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Pf(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 ca(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Gl(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 po(e){return(e??0).toLocaleString("ko-KR")}const If=[{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"}]}],Ff=[{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 Kl(){return If}function Of(){return Ff}const zf=[],Wf=[],Hf=[],Vf=[];function qf(){return{LISTEN_IN_NOISE:zf,SHORT_STORY:Wf,LONG_STORY:Hf,ORDERING_SENTENCE:Vf}}const Uf=[{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."}],Yl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Gf(e){return Uf.map(t=>{const a=Yl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Kf={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."},Yf={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"],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"},Zf={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"}},Xf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Jf={selected:"\uC120\uD0DD\uB428"},Qf={placeholder:"\uC120\uD0DD"},eb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},tb={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"},nb={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"},ab={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"}}}},rb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},ob={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."}}},sb={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"}},lb={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"}},ib={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"}}}},ub={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},cb={showN:"{{n}}\uAC1C\uC529"},db={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."}},pb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},hb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},mb={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",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}}"},Cb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",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"},fb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},bb={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"}},gb={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"}},yb={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"}},vb={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",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."]},_b={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"},xb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},wb={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"},Bb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},kb={ariaLabel:"\uC120\uD0DD \uD0ED"},Ab={ariaLabel:"\uD0ED"},Nb={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Eb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Db={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Sb={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"},jb={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"}},Tb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Mb={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"},Lb={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"},$b={viewWords:"\uB0B1\uB9D0"},Rb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Pb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Ib={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Fb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Ob={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},zb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Wb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Hb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Vb={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},qb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Ub={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Gb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Kb={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"},Yb={common:Kf,calendar:Yf,passCard:Zf,rating:Xf,colorPicker:Jf,dropdown:Qf,accordion:eb,header:tb,nav:nb,settings:ab,usage:rb,account:ob,training:sb,customers:lb,payment:ib,coupons:ub,visits:cb,trainingType:db,myWordTable:pb,keyWords:hb,wordTable:mb,wordSearch:Cb,wordPrint:fb,topic:bb,device:gb,manager:yb,wordPairs:vb,footer:_b,date:xb,wordData:wb,textField:Bb,segmentedControl:kb,tabs:Ab,fileUpload:Nb,avatar:Eb,myHomework:Db,trainingStatus:Sb,store:jb,progress:Tb,trainingMiss:Mb,table:Lb,wordScore:$b,topBanner:Rb,datePicker:Pb,report:Ib,tooltip:Fb,phonemeProfile:Ob,bulkBar:zb,debug:Wb,badge:Hb,loader:Vb,soundCompass:qb,breadcrumb:Ub,board:Gb,promoBannerBg:Kb},Zb={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."},Xb={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"]},Jb={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"}},Qb={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},eg={selected:"selected"},tg={placeholder:"Select"},ng={collapse:"Collapse",expand:"Expand"},ag={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},rg={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"},og={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"}}}},sg={couponButton:"Enter Coupon"},lg={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."}}},ig={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"}},ug={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"}},cg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},dg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},pg={showN:"Show {{n}}"},hg={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."}},mg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Cg={title:"Key Words",empty:"No key words available."},fg={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",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}}"},bg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",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"},gg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},yg={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"}},vg={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"}},_g={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}}"}},xg={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",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."]},wg={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"},Bg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},kg={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"},Ag={clearAriaLabel:"Clear input"},Ng={ariaLabel:"Select tab"},Eg={ariaLabel:"Tabs"},Dg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Sg={ariaLabel:"User avatar"},jg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Tg={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"},Mg={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"}},Lg={steps:"Step {{current}} of {{total}}"},$g={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"},Rg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Pg={viewWords:"Words"},Ig={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Fg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Og={previewRegion:"Report preview \u2014 scrollable sideways"},zg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Wg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Hg={clearSelection:"Clear selection"},Vg={showResult:"Show {{type}} result"},qg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Ug={loading:"Loading"},Gg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Kg={ariaLabel:"Breadcrumb"},Yg={empty:"No items yet."},Zg={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"},Xg={common:Zb,calendar:Xb,passCard:Jb,rating:Qb,colorPicker:eg,dropdown:tg,accordion:ng,header:ag,nav:rg,settings:og,usage:sg,account:lg,training:ig,customers:ug,payment:cg,coupons:dg,visits:pg,trainingType:hg,myWordTable:mg,keyWords:Cg,wordTable:fg,wordSearch:bg,wordPrint:gg,topic:yg,device:vg,manager:_g,wordPairs:xg,footer:wg,date:Bg,wordData:kg,textField:Ag,segmentedControl:Ng,tabs:Eg,fileUpload:Dg,avatar:Sg,myHomework:jg,trainingStatus:Tg,store:Mg,progress:Lg,trainingMiss:$g,table:Rg,wordScore:Pg,topBanner:Ig,datePicker:Fg,report:Og,tooltip:zg,phonemeProfile:Wg,bulkBar:Hg,debug:Vg,badge:qg,loader:Ug,soundCompass:Gg,breadcrumb:Kg,board:Yg,promoBannerBg:Zg};const Jg="0.383.0",Qg=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],ho="ko",ey="ihab_display_language";function Zl(){if(typeof window>"u")return ho;try{const e=localStorage.getItem(ey);if(e&&Qg.some(t=>t.code===e))return e}catch{}return ho}function Xl(e){try{document.documentElement.lang=e}catch{}}Gt.on("languageChanged",Xl),Xl(Zl()),Gt.use(Be.initReactI18next).init({resources:{ko:{translation:Yb},en:{translation:Xg}},lng:Zl(),fallbackLng:ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ty=new Map;try{Gt.store?.on?.("added",()=>ty.clear())}catch{}let ur=null,Jl=null,Ql=null;function ny(){const e=Fl();if(e&&e.entries.length>0){const t=mf();if(ur&&Jl===e&&Ql===t)return ur;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 ur=r,Jl=e,Ql=t,ur}return[]}new Proxy([],{get(e,t){const a=ny(),r=a[t];return typeof r=="function"?r.bind(a):r}});function ay(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 ry(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&ay(r.attrValue)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function oy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,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 p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=Jr(e):/^(Logo|Symbol)/i.test(p)?m=Jr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)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(p)return;if(/^\s*<svg[\s>]/i.test(f)){const x=ry(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=GC(g),{iconToUse:C,mode:f,svgText:x,blobUrl:b}=oy(g),k=(w,E={})=>n.jsx("span",{className:d,style:u,...E,children:w}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(w,E={})=>n.jsx("img",{src:w,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...E,style:_?{...E.style,..._}:E.style});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(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 k(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const w={"--icon-url":b?`url(${b})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return k(n.jsx("span",{className:p,style:w}),{"aria-hidden":"true"})}return f==="img"?k(N(C,{onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?k(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}:void 0}),{"aria-hidden":"true"}):k(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Jr(t),{style:u,onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}});const v=typeof c=="number"?c:20,B=`<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 k(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:B}}),{"aria-hidden":"true"})}function ei(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 sy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ei(r?.onClick);return n.jsxs("div",{className:Ne("empty-state",s),children:[e&&n.jsx(tt,{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(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ly({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=Be.useTranslation(),{pending:u,press:c}=ei(r);return n.jsxs("div",{className:Ne("empty-state","error-state",l),role:"alert",children:[n.jsx(tt,{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(tt,{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 iy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:Ne("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(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,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:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function uy({as:e="div",className:t="",children:a,storage:r,...s}){r&&L1({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 cy(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 mo(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(kn)).filter(cy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const kn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function bo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function ti(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 cr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ti(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(kn)).filter(c=>!(e&&e.contains(c))&&ti(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 dy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Be.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&cr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"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,b)=>n.jsx("span",{className:"notice-box__line body-3",children:x},b))}):C.children??null})]},f)),g]});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,g]})}const py={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function da(e){const{t}=Be.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)),d=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:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}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:py,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 pa=[];let dr=!1;function ni(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=pa[pa.length-1];t&&(e.stopPropagation(),t())}function Kn(e){return pa.push(e),!dr&&typeof document<"u"&&(document.addEventListener("keydown",ni),dr=!0),()=>{const t=pa.lastIndexOf(e);t>=0&&pa.splice(t,1),pa.length===0&&dr&&typeof document<"u"&&(document.removeEventListener("keydown",ni),dr=!1)}}const ai=o.createContext(null);function hy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ri=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function my(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 Ls.useSyncExternalStore(t,()=>ri(e),()=>!1)}function Cy(e){const[t,a]=o.useState(ri(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 fy=typeof Ls.useSyncExternalStore=="function"?my:Cy;function gn(e){const t=o.useContext(ai),a=fy(e);return t&&typeof t.mobile=="boolean"&&hy(e)?t.mobile:a}const by="(prefers-reduced-motion: reduce)";function go(){return gn(by)}const oi={"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","stat-chart__card":"manager-stat-card"};function gy(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 yy(e){return gy(oi,e)}function le(e){if(!e||Object.keys(oi).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=yy(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function xn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[x,b]=o.useState({position:"fixed",left:0,top:-9999}),[k,_]=o.useState(!1),[N,v]=o.useState("bottom"),[B,w]=o.useState(!1),[E,D]=o.useState(!1),A=!t&&!a,R=o.useRef(null),$=o.useCallback((I=!1,U=!1)=>{if(E&&m)return;const Q=a?a.getBoundingClientRect():t,H=U&&R.current?R.current:Q;if(!H||!f.current)return;const S=f.current,{offsetWidth:F,offsetHeight:L}=S,G=window.innerWidth,ae=window.innerHeight,se=G-H.right,me=H.left,X=H.top,z=ae-H.bottom;let ne=0,W=0,q="top";if(X>=L+r)q="top",W=H.top-r-L,ne=H.left+H.width/2-F/2;else if(z>=L+r)q="bottom",W=H.bottom+r,ne=H.left+H.width/2-F/2;else if(se>=F+r)q="right",ne=H.right+r,W=H.top+H.height/2-L/2;else if(me>=F+r)q="left",ne=H.left-r-F,W=H.top+H.height/2-L/2;else{const Ce=Math.max(X,z,se,me);Ce===X?(q="top",W=H.top-r-L,ne=H.left+H.width/2-F/2):Ce===z?(q="bottom",W=H.bottom+r,ne=H.left+H.width/2-F/2):Ce===se?(q="right",ne=H.right+r,W=H.top+H.height/2-L/2):(q="left",ne=H.left-r-F,W=H.top+H.height/2-L/2)}const pe=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,pe),G-F-pe),W=Math.min(Math.max(W,pe),ae-L-pe);const Se=Math.round(ne),ve=Math.round(W);I&&f.current?(f.current.style.left=`${Se}px`,f.current.style.top=`${ve}px`,f.current.dataset.placement=q):(v(q||N),b({position:"fixed",left:Se,top:ve}),w(!0))},[E,m,a,t,r,s,N]);o.useEffect(()=>()=>{R.current=null},[a,t]),o.useLayoutEffect(()=>{if(A)return;if(E&&m){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),w(!0);return}R.current===null&&(R.current=a?a.getBoundingClientRect():t??null),$(!1,!0);const I=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(I)},[t,a,r,h,s,A,E,m,$]),o.useEffect(()=>{if(A||E&&m||!f.current||typeof ResizeObserver>"u")return;const I=new ResizeObserver(()=>{t&&$()});return I.observe(f.current),()=>I.disconnect()},[t,h,s,A,E,m,$]),o.useEffect(()=>{if(A||E&&m)return;let I=null;const U=()=>{if(a&&(R.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}I===null&&(I=requestAnimationFrame(()=>{I=null,$(!0)}))},Q=H=>{if(!a&&l){const S=H.target;if(S&&f.current&&f.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}Z.current(!0);return}U()};return window.addEventListener("resize",U),document.addEventListener("scroll",Q,{passive:!0,capture:!0}),()=>{I!==null&&cancelAnimationFrame(I),window.removeEventListener("resize",U),document.removeEventListener("scroll",Q,{capture:!0})}},[t,a,l,r,h,s,A,E,m,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const I=window.matchMedia("(max-width: 768px)"),U=()=>D(!!I.matches);U();try{I.addEventListener?I.addEventListener("change",U):I.addListener(U)}catch{try{I.addListener(U)}catch{}}return()=>{try{I.removeEventListener?I.removeEventListener("change",U):I.removeListener(U)}catch{}}},[]);const Y=o.useRef(!1),T=o.useRef(null),P=go(),M=o.useCallback((I=!1)=>{if(l&&!(k||Y.current)){if(Y.current=!0,I){_(!0);try{l&&l()}catch{Y.current=!1,_(!1)}return}_(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{Y.current=!1,_(!1)}},P?0:200)}},[k,l,_,P]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(A)return;const I=H=>{const S=f.current;if(!S)return;const F=H.target;if(F&&!S.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},U=H=>{const S=f.current;if(!S)return;const F=H.target;if(F&&!S.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},Q=H=>{if(H.key==="Tab"){const S=f.current;if(!S)return;const F=S.querySelectorAll(kn);if(!F||F.length===0)return;const L=F[0],G=F[F.length-1],ae=document.activeElement;H.shiftKey?ae===L&&(H.preventDefault(),G.focus()):ae===G&&(H.preventDefault(),L.focus())}};return document.addEventListener("pointerdown",I,!0),document.addEventListener("click",U,!0),document.addEventListener("keydown",Q),()=>{document.removeEventListener("pointerdown",I,!0),document.removeEventListener("click",U,!0),document.removeEventListener("keydown",Q)}},[l,i,M,A]);const Z=o.useRef(M);o.useEffect(()=>{Z.current=M});const V=!!l;o.useEffect(()=>{if(!(A||!V))return Kn(()=>Z.current())},[A,V]),o.useEffect(()=>{const I=()=>{M(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",I),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",I)}},[M]);const O=o.useRef(null);o.useEffect(()=>{if(A||C===!1||!B)return;const I=f.current;if(!I)return;const U=I.querySelector(kn);if(U)return O.current=document.activeElement,U.focus({preventScroll:!0}),()=>{const Q=O.current;O.current=null,Q&&document.contains(Q)&&Q.focus({preventScroll:!0})}},[A,C,B]),o.useEffect(()=>{c==="dialog"&&!d&&Et("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,d]);const te=n.jsxs("div",{ref:f,className:le(`tooltip__content ${A?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${k?"is-closing":""} ${u} ${E&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:A?{}:{...x,visibility:B?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":A?"":x.left,"data-top":A?"":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:le("tooltip__header h5"),children:y}),h]});if(A||typeof document>"u")return te;if(p||E&&m){const I=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&M(!0)}}),te]});return cn.createPortal(I,document.body)}return cn.createPortal(te,document.body)}function Sn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(xn,{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 Yn(e){const{t}=Be.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(xn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,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"),children:h.map((p,m)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Pa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,si=!1;function li(){si||typeof document>"u"||(si=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}li();function ha(e){return!!e&&e.pointerType==="touch"}function ma(e=1e3){return li(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Pa(e),i=Pa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const b=h.getBoundingClientRect();return x.clientX>=b.left&&x.clientX<=b.right&&x.clientY>=b.top&&x.clientY<=b.bottom},y=f=>{m=g(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!g(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function vy(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:f="center",nowrap:x=!1,selected:b,toggleable:k=!1,ariaExpanded:_,ariaControls:N,disabled:v=!1,loading:B=!1,useLabel:w=!0,useBorder:E=!0,useBG:D=!0,useDisabledCovered:A=!1,useDisabledInvisible:R=!1,useDisabledFilled:$=!1,width:Y,minWidth:T,onClick:P,onDisabledClick:M,showTooltipInfo:Z=!1,tooltipInfoText:V=null,tooltipDescription:O=null,tooltipOnly:te=!1,iconSize:I="medium",iconColor:U,shape:Q="rounded",color:H,className:S,...F}=e,L=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),G=L.match(/^\d+$/)?`button${L}`:`button-${L}`,ae=Number(a),se=!isNaN(ae)&&ae<40?"button-2":"button-1",me=h??g,X=v||!!F.disabled,z=X?A?"disabled-covered":R?"disabled-invisibled":$?"disabled-filled":"disabled":C,ne=z?`button--variant-${z}`:"",W=f?`button--align-${f}`:"",q=x?"button--nowrap":"",pe=Q?`button--shape-${Q}`:"",Se=typeof U=="string"&&U.startsWith("--")?`var(${U})`:U,ve={...Y?{width:typeof Y=="number"?`${Y}px`:Y}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...E?{}:{"--button-border":X?"0":"1px solid transparent"},...Se?{"--button-icon-color":Se}:{},...H?{"--color-main":H}:{}},Ce=w===!1?"":me,de=Array.isArray(Ce)?Ce.length>0:!!Ce,fe=!!d,be=r??(de||c||fe?"bar":"dot"),he=`${G}--${be}`,Le=o.useRef(null);o.useEffect(()=>{!In||s!==void 0||Le.current?.closest("form")&&Et(`button-in-form:${typeof me=="string"?me:""}`,'[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 me=="string"&&me?` \uB2E8\uCD94: ${me}`:""))},[s,me]);const Fe=o.useRef(t);Fe.current=t;const $e=o.useCallback(ke=>{Le.current=ke;const nt=Fe.current;typeof nt=="function"?nt(ke):nt&&(nt.current=ke)},[]),qe=o.useRef(X),[He,it]=o.useState(!!b),[rt,Qe]=o.useState(!1),[ft,Ee]=o.useState(null),Ue=o.useCallback(()=>Qe(!1),[]),[Ae,Ve]=o.useState(!1),Je=o.useId();o.useEffect(()=>{typeof b=="boolean"&&it(b)},[b]),o.useEffect(()=>{if(qe.current&&!X&&Le.current){const ke=Le.current;let nt=!1;try{nt=ke.matches(":focus:not(:focus-visible)")}catch{nt=!1}nt&&ke.blur(),ke.style.pointerEvents="none";const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le.current&&(Le.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(re)}qe.current=X},[X]);const ot=typeof b=="boolean"?!!b:He,At=typeof _=="boolean"?void 0:k||typeof b=="boolean"?ot?"true":"false":F["aria-pressed"],_t=Ne("button",G,he,ne,W,q,pe,ot?"is-selected":null,D?null:"button--no-bg",te?"button--tooltip-only":null,S),It=`button__icon button__icon--${I}`,et=Array.isArray(m)?m:m!==void 0?[m]:[],at=()=>{if(Array.isArray(Ce))return Ce.map((nt,re)=>{const _e=et[re];return n.jsxs("span",{className:`button__label-text${_e!==void 0?" button__label-text--has-sub":""}`,children:[nt,_e!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:_e})]},re)});const ke=m!==void 0;return n.jsxs("span",{className:`button__label-text${ke?" button__label-text--has-sub":""}`,children:[Ce,p!=null&&n.jsx("span",{className:"button__count",children:p}),ke&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},xt=ke=>{typeof b!="boolean"&&!k&&it(!1),ke.currentTarget.blur()},Bt=ke=>{X||(typeof F.onMouseLeave=="function"&&F.onMouseLeave(ke),xt(ke))},St=ke=>{if(te&&Te&&Me.touchPress(ke.currentTarget),X){Te&&Me.touchPress(ke.currentTarget),ke.preventDefault(),M?.(ke);return}typeof b!="boolean"&&k&&it(nt=>!nt),P?.(ke)},Pt=o.useCallback(()=>{(Z||O)&&(Qe(!0),Ee(Le.current?.getBoundingClientRect()??null))},[Z,O]),xe=o.useCallback(()=>{(Z||O)&&(Qe(!1),Ee(null))},[Z,O]),Te=!!(Z||O),Me=vo(rt,ke=>{ke?Pt():xe()},Le,{enabled:Te&&(X||te),fallbackOnParent:Te&&X}),We={...F};delete We.disabled,delete We.className,delete We.faded,delete We.useFaded,delete We.loading,delete We.onMouseLeave,delete We.onPointerEnter,delete We.onPointerLeave,delete We.onPointerUp,delete We.onFocus,delete We.onBlur,X&&(Object.keys(We).forEach(ke=>{/^on[A-Z]/.test(ke)&&typeof We[ke]=="function"&&delete We[ke]}),We["aria-disabled"]="true"),B&&(We["aria-busy"]="true");const dt=(typeof Z=="string"?Z:null)??(typeof V=="string"?V:null)??(typeof y=="string"?y:null)??(typeof me=="string"?me:null)??void 0,ut=typeof y=="string"?y:typeof me=="string"?me:dt,ct=O?[O.title,...O.items??[]].filter(Boolean).join(". "):Z&&dt&&dt!==ut?dt:"",Ze=[typeof F["aria-describedby"]=="string"?F["aria-describedby"]:void 0,ct?Je:null].filter(Boolean).join(" ")||void 0,gt=()=>n.jsx("span",{className:`${It} button__spinner`,"aria-hidden":"true",children:n.jsx(da,{variant:"spinner",size:"100%"})}),jt=(ke,nt)=>n.jsx(tt,{icon:ke,label:nt??ut,className:It,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),wt=ke=>B?gt():jt(c,ke),bt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[wt(),de&&n.jsx("span",{className:`button__label ${se}`,children:at()})]}):f==="center"&&(c||B)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:wt()}),de&&n.jsx("span",{className:`button__label ${se}`,children:at()})]}),fe&&n.jsx("span",{className:"button__right",children:jt(d)})]}):n.jsxs(n.Fragment,{children:[(c||B)&&n.jsx("span",{className:"button__left",children:wt(y??me)}),de&&n.jsx("span",{className:`button__label ${se}`,children:at()}),fe&&n.jsx("span",{className:"button__right",children:jt(d)})]}),yt=!!l&&!X;return n.jsxs(n.Fragment,{children:[n.jsxs(yt?"a":"button",{...We,ref:$e,...yt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:X&&!M&&!Ae},className:_t,"aria-pressed":At,"aria-expanded":typeof _=="boolean"?_:F["aria-expanded"],"aria-controls":N??F["aria-controls"],"aria-label":ut,"aria-disabled":X&&(yt||M||Ae)?!0:void 0,"aria-describedby":Ze,style:ve,onClick:St,onMouseLeave:Bt,onPointerEnter:ke=>{ha(ke)||Pt(),!X&&typeof F.onPointerEnter=="function"&&F.onPointerEnter(ke)},onPointerLeave:ke=>{ha(ke)||xe(),!X&&typeof F.onPointerLeave=="function"&&F.onPointerLeave(ke)},onPointerUp:ke=>{X&&Te&&Me.touchPress(ke.currentTarget),!X&&typeof F.onPointerUp=="function"&&F.onPointerUp(ke)},onFocus:ke=>{Ve(!0),ma()||Pt(),!X&&typeof F.onFocus=="function"&&F.onFocus(ke)},onBlur:ke=>{Ve(!1),X||xt(ke),xe(),!X&&typeof F.onBlur=="function"&&F.onBlur(ke)},children:[bt(),ct?n.jsx("span",{id:Je,hidden:!0,"aria-label":ct}):null]}),rt&&O?n.jsx(Yn,{anchorRect:ft,title:O.title,items:O.items,onClose:Ue}):rt&&dt?n.jsx(Sn,{anchorRect:ft,text:dt,onClose:Ue}):null]})}const ge=o.forwardRef(vy);ge.displayName="Button";function Rt(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 Ia={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},_o=new WeakMap;function xo(e){if(e)return _o.get(e)}function Qt(e,t){e&&(e.style.setProperty(Ia.title,t.title),e.style.setProperty(Ia.description,t.description),_o.set(e,t))}function en(e){e&&(e.style.removeProperty(Ia.title),e.style.removeProperty(Ia.description),_o.delete(e))}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function ui(){const e=Rt(ii,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ci={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function di(){const e=Rt(ci,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function hi(){const e=Rt(pi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ci(){const e=Rt(mi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const fi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=Rt(fi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const gi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function yi(){const e=Rt(gi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const vi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function _i(){const e=Rt(vi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wi(){const e=Rt(xi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Bi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Rt(Bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ai={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ni(){const e=Rt(Ai,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Ei={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Di(){const e=Rt(Ei,Qt,en);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 Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ji(){const e=Rt(Si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ti={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Mi(){const e=Rt(Ti,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function $i(){const e=Rt(Li,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const on=(e,t,a)=>({key:e,get label(){return Gt.t(`promoBannerBg.${e}`,t)},textTone:a}),_y=[on("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("soft","\uC18C\uD504\uD2B8","dark"),on("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),on("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),on("warm","\uC6DC(\uAC15\uC870)","dark"),on("dark","\uB2E4\uD06C","light"),on("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),on("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),on("outline","\uC544\uC6C3\uB77C\uC778","dark"),on("success","\uC131\uACF5/\uC644\uB8CC","light"),on("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),on("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ri={main:ui,soft:di,sub:hi,deep:Ci,softSub:bi,warm:yi,dark:_i,radial:wi,diagonal:ki,dots:Ni,outline:Di,success:ji,naver:Mi,instagram:$i};function Pi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=k=>Math.max(a,Math.min(r,Number(k))),u=k=>{try{const _=localStorage.getItem(k),N=_?Number(_):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=k=>{d(typeof k=="function"?_=>i(k(_)):i(k))},g=()=>m(k=>+(k+s).toFixed(6)),y=()=>m(k=>+(k-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),b=Math.round(x*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:b}}function Ii(e,t){const a=Pa(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",Fi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),xy=o.createContext(!1),Zn=[];let Oi=null;function wy(e){const t=o.useContext(xy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Zn.length===0&&(Oi=document.title);const a={text:Fi?`${e}${wo}${Fi}`:e};return Zn.push(a),document.title=a.text,()=>{const r=Zn.lastIndexOf(a);r>=0&&Zn.splice(r,1),document.title=Zn.length?Zn[Zn.length-1].text:Oi??document.title}},[e,t])}const Bo=[{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"}],By=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function hn(e,t){return By().compare(e,t)}const pr=new Map;function ky(e){const t=pr.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)),pr.size>5e3&&pr.clear(),pr.set(e,a),a}function Ay(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 Ny(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ay(h);return p!==null?[p]:ky(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=hn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:hn(r,s)}const zi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function hr(e,t,a){const r=zi(e),s=zi(t);if(r||s)return r===s?0:r?1:-1;const l=Ny(e,t);return a?l:-l}function Ey(e,t,a){const{t:r}=Be.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Bo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Bo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Bo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function Dy(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 d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>hr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const wn="\uC804\uCCB4";Object.fromEntries(Object.entries(rf).map(([e,{nucleus:t}])=>[e,t]));const Sy={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"})},jy={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"})},Ty={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 My(e,t){if("place"in t)return Sy[t.place](e);const a=jy[t.vowel](e);return t.glide?`${a} \xB7 ${Ty[t.glide](e)}`:a}const Ly=(e,{defaultValue:t})=>t,Wi=(e,t)=>({jamos:e,phonetic:t,tooltip:My(Ly,t)}),jn=(e,t)=>t.map(a=>Wi([a],{place:e})),Kt=(e,t,a)=>Wi([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[jn("labial",["\u3142","\u3143","\u314D","\u3141"]),jn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),jn("alveolar",["\u3145","\u3146"]),jn("palatal",["\u3148","\u3149","\u314A"]),jn("velar",["\u3131","\u3132","\u314B"]),jn("glottal",["\u314E"])],jung:[[Kt("\u3163","frontHigh"),Kt("\u315F","frontHigh","w"),Kt("\u3162","frontHigh","velar")],[Kt("\u3161","backHighUnrounded")],[Kt("\u315C","backHighRounded"),Kt("\u3160","backHighRounded","j")],[Kt("\u3154\u3150","frontMid"),Kt("\u3156\u3152","frontMid","j"),Kt("\u3159\u315A\u315E","frontMid","w")],[Kt("\u3153","backMidUnrounded"),Kt("\u3155","backMidUnrounded","j"),Kt("\u315D","backMidUnrounded","w")],[Kt("\u3157","backMidRounded"),Kt("\u315B","backMidRounded","j")],[Kt("\u314F","low"),Kt("\u3151","low","j"),Kt("\u3158","low","w")]],jong:[jn("labial",["\u3142","\u3141"]),jn("alveolar",["\u3137","\u3134","\u3139"]),jn("velar",["\u3131","\u3147"])]},$y=e=>e===Ry?[]:Array.from(e),Ry="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Hi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Hi.jung.flat().forEach(({v:e})=>{for(const t of $y(e));}),new Set(Hi.cho.flat().map(e=>e.v));function Py(e,t=!0){const a=Pa(e);o.useEffect(()=>{if(t)return Kn(()=>{a.current?.()})},[t,a])}function Fa(){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 Iy(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,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Vi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Oa(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 za({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),d=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 g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const B=d.current?.offsetHeight??0;if(B!==g){if(g=B,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const f=B=>{const w=B.target;r&&w.closest?.(r)||c.current?.contains(w)||d.current?.contains(w)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const b=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},k=B=>{d.current?.contains(B.target)||(t==="reposition"?b():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",k,!0);const _=()=>{a==="reposition"?b():a==="close"&&l(!1)};let N=null;const v=()=>{_(),N&&clearTimeout(N),N=setTimeout(()=>{N=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",k,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",v)),N&&clearTimeout(N)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Kn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function Fy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,f]=o.useState([]),[x,b]=o.useState(null),[k,_]=o.useState(0),N=o.useRef(0),v=o.useCallback(I=>{N.current=typeof I=="function"?I(N.current):I,_(N.current)},[]),B=o.useRef(r),w=o.useRef(s);o.useEffect(()=>{B.current=r,w.current=s},[r,s]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},A=(I,U)=>{E.current.push(setTimeout(U,I))};o.useEffect(()=>()=>D(),[]);const R=u[d]?.id??null,$=o.useRef(null),Y=o.useCallback(()=>{D(),m("playing"),f([]),b(null),v(0);let I=0;e.forEach((U,Q)=>{A(I,()=>{h(Q),y(U.id),B.current?.(U)}),A(I+1e3,()=>{y(null),f(H=>[...H,U.id])}),I+=1300}),A(I,()=>{m("done"),w.current?.({score:0,total:e.length})})},[e,v]),T=o.useCallback((I,U)=>{if(U>=I.length){m("done"),w.current?.({score:N.current,total:I.length});return}$.current=null,h(U),b(null),m("playing"),y(I[U].id),B.current?.(I[U]),A(l,()=>{y(null),m("waiting")})},[l]),P=o.useCallback(()=>{D();const I=La(e);c(I),v(0),f([]),T(I,0)},[e,T,v]),M=o.useCallback(()=>{t==="playback"?(c(e),Y()):P()},[t,e,Y,P]),Z=o.useCallback(()=>{D(),m("idle"),y(null),f([]),b(null),h(0),v(0),c([])},[v]),V=JSON.stringify(e.map(I=>[I.id,I.label,I.angleDeg,I.deg,I.row,I.shortcut]));o.useEffect(()=>(a?M():Z(),()=>D()),[t,V,a]);const O=o.useCallback(I=>{p!=="waiting"||t==="playback"||$.current===d||($.current=d,b(I),I===u[d]?.id&&v(U=>U+1),t==="exam"?(m("playing"),A(400,()=>T(u,d+1))):(m("feedback"),A(i,()=>T(u,d+1))))},[p,t,u,d,T,i,v]),te=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:x,answerId:R,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:te,score:k,phase:p,done:p==="done",start:M,reset:Z}}const No=new Map,Eo=new Map,Oy=()=>()=>{},zy=()=>!0,Wy=()=>!1;function qi(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 Hy(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)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function Vy(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"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function qy(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Uy(e,t=!0){const a=o.useSyncExternalStore(Oy,zy,Wy)&&t&&e?qi(e)??No.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=qi(e)??No.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return qy(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 Gy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=gn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const k=m.current;if(!k)return;const _=xo(k),N=(v,B,w)=>{if(w!==void 0)k.style.setProperty(B,w),f.current[v]=!0;else if(f.current[v]){const E=_?.[v];E?k.style.setProperty(B,E):k.style.removeProperty(B),f.current[v]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const k=m.current;if(!k)return;const _=xo(k);y(_?.actionVariant??"main")},[p]);const x=Ne("promo-banner",`promo-banner--${i}`,h),b=Ri[p];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(b,{}),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(ge,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Ky({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=Be.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),b=o.useRef(null),k=o.useRef(null),_=go(),N=p||g||C,v=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||_)return;const w=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(w)},[c,t,N,_]);const B=w=>{b.current!=null&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>{b.current=null,f(!1)},w)};return o.useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current)},[]),o.useEffect(()=>{if(!C)return;const w=E=>{E.pointerType==="touch"&&(k.current&&k.current.contains(E.target)||(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!1)))};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[C]),c===0?null:n.jsxs("section",{ref:k,className:Ne("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:w=>{x.current=w.pointerType},onPointerDown:w=>{x.current=w.pointerType,w.pointerType==="touch"&&(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!0))},onPointerUp:w=>{w.pointerType==="touch"&&B(5e3)},onPointerCancel:w=>{w.pointerType==="touch"&&B(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:w=>{let E=!0;try{E=w.target.matches(":focus-visible")}catch{E=!0}y(E)},onBlur:w=>{w.currentTarget.contains(w.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((w,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==v,...E!==v?{inert:!0}:{},children:w},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[v]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((w,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===v?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===v,onClick:()=>h(E)},E))})]})}function Yy({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Be.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:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[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(tt,{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 Zy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(Yy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function Xy(){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 Jy(){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 Qy(){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 Lt(e){const{t}=Be.useTranslation(),{type:a="bar",size:r,className:s="","aria-label":l,"aria-hidden":i}=e;if(a==="dot"){const{icon:N,number:v,position:B="top-right",onClick:w,animate:E=!1}=e,D=N??"check",A=v!==void 0?"number":D,R=typeof r=="number"?r:32,$=Ne("circle-badge",`circle-badge--${A}`,`circle-badge--${B}`,`circle-badge--${R}`,E?"circle-badge--animate":"",w?"circle-badge--clickable":"",s),Y=v!==void 0?t("badge.nthSelected",{n:v,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:$,onClick:w,onKeyDown:w?T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.currentTarget.click())}:void 0,"aria-label":i?void 0:l??Y,"aria-hidden":i||void 0,role:w?"button":i?void 0:"img",tabIndex:w?0:void 0,children:[v!==void 0&&v,v===void 0&&D==="check"&&n.jsx(Xy,{}),v===void 0&&D==="remove"&&n.jsx(Jy,{}),v===void 0&&D==="minus"&&n.jsx(Qy,{})]})}const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=typeof r=="number"?"medium":r??"medium",f={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",x={small:12,medium:14,large:16}[C]??14,b=Ne("badge",`badge--${d}`,`badge--${C}`,h!=="filled"?`badge--${h}`:"",f,s),k=y?.startsWith("--")?`var(${y})`:y,_=p!==void 0||k?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...k?{"--badge-color":k}:{}}:void 0;return n.jsxs("span",{className:b,style:_,"aria-label":i?void 0:l,role:l&&!i?"img":void 0,"aria-hidden":i||void 0,children:[m&&n.jsx(tt,{icon:m,size:x,className:"badge__icon"}),u??c,g&&n.jsx(tt,{icon:g,size:x,className:"badge__icon"})]})}function Wa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=Be.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const b of i){const k=x?.[b.ci]?.items?.[b.ii];if(!k||!Array.isArray(k.children)||!k.children.length)break;x=[{title:null,items:k.children}],f.push({title:k.label||null,columns:x})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let f=0,x=0;const b=()=>{const k=m.current?.querySelector("button:not([disabled])");if(k&&k.offsetParent){k.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(b))};return f=requestAnimationFrame(b),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,b)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(k=>[...k.slice(0,h),{ci:x,ii:b}]);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:[(c.length>1||d.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?n.jsx(ge,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((f,x)=>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((b,k)=>n.jsxs(o.Fragment,{children:[b.separatorBefore&&k>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(ge,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:b.label?"bar":"dot",icon:b.selected?"check":b.icon||"none",rightIcon:Array.isArray(b.children)&&b.children.length?"chevron-right":b.badgeCount?n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(b.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:b.label,ariaLabel:b.label&&b.badgeCount&&b.badgeCount>0?s("nav.badgeLabel",{label:b.label,count:b.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):b.label,onClick:()=>C(b,x,k),selected:b.selected,disabled:b.disabled,showTooltipInfo:b.tooltip||!1,useBorder:!1,align:"left"})]},k))})]},x))})]})}const Ui=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ui);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Et("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ui}) \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 So=52,mr=10,Gi=e=>e&&e>0?e:0;function Ki({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Be.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const I=p.current;if(!I)return;const U=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(I):null,F=I.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),L=I.querySelector(".bottom-nav__left"),G=L?.nextElementSibling,ae=(L?.offsetWidth??0)+(L&&G?.classList.contains("bottom-nav__divider")?G.offsetWidth:0);g(Math.max(0,F-ae))};if(U(),typeof ResizeObserver>"u")return;const Q=new ResizeObserver(U);Q.observe(I);const H=I.querySelector(".bottom-nav__left");return H&&Q.observe(H),()=>Q.disconnect()},[s]);const C=So+1,f=I=>Math.max(0,Math.floor((I+mr)/(So+mr))),x=y*(So+mr)-mr<=m,b=m<=0||l.length===0&&x?y:Math.min(y,f(m-C)),k=m>0&&b<y,_=k?b:y,N=e.slice(0,_),v=e.slice(_),B=k||l.length>0,w=o.useCallback((I,U)=>({position:"fixed",bottom:window.innerHeight-I.top+8,right:window.innerWidth-I.right,zIndex:Oa(U)}),[]),E=o.useId(),{open:D,toggle:A,close:R,style:$,triggerRef:Y,menuRef:T}=za({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((I,U)=>U>0?u("nav.badgeLabel",{label:I,count:U,defaultValue:"{{label}}, {{count}}\uAC1C"}):I,[u]),M=o.useCallback((I,U)=>U>0?u("nav.badgeInsideLabel",{label:I,count:U,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):I,[u]),Z=o.useCallback(()=>s?.(c),[s,c]),V=o.useMemo(()=>v.find(I=>!!I.key&&I.key===t)??l.find(I=>I.selected||I.key&&I.key===t),[v,t,l]),O=o.useMemo(()=>[{items:[...v.map(I=>({label:I.label,icon:I.icon,badgeCount:I.badgeCount,selected:!!I.key&&I.key===t,closeOnSelect:!0,disabled:I.state==="disabled",onClick:()=>{I.state!=="disabled"&&(I.key&&a&&(a(I.key),Do(i,"BottomNav")),R())}})),...l.map(I=>({label:I.label,icon:I.icon,badgeCount:I.badgeCount,selected:I.selected??(!!I.key&&I.key===t),closeOnSelect:!0,onClick:()=>{I.onClick?.(),R()}}))]}],[v,l,t,a,R]),te=[...v,...l].reduce((I,U)=>I+Gi(U.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"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(ge,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:Z})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map((I,U)=>{const Q=Gi(I.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(ge,{htmlType:"button",size:52,type:"dot",icon:I.icon,ariaLabel:P(I.label,Q),selected:!!I.key&&I.key===t,disabled:I.state==="disabled",className:"bottom-nav-item",onClick:()=>{I.key&&(a?.(I.key),Do(i,"BottomNav"))}}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})})]},I.key??`__slot-${U}`)})}),B&&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(ge,{htmlType:"button",size:52,type:"dot",icon:V?.icon??"ellipsis",ariaLabel:M(V?.label??u("nav.more","\uB354\uBCF4\uAE30"),te),selected:!!V,className:"bottom-nav-item",onClick:A,"aria-expanded":D,"aria-controls":D?E:void 0}),te>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(te,99),size:24})}),D&&cn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:T,children:n.jsx(Wa,{columns:O,onClose:R})}),document.body)]})})]})]})}function Yi(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 Zi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function e2(e){const{t}=Be.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(ge,{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"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(ge,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Zi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Lt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(ge,{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(ge,{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"}),c&&n.jsx(ge,{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"}),d&&n.jsx(ge,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Xi(e){const{t}=Be.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",x=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,b=o.useCallback(k=>{if(f)return;const _=k.detail>0;if(_)try{k.currentTarget.blur()}catch{}u?.(p,k.currentTarget,_)},[f,p,u]);return n.jsxs("button",{type:"button",className:x,onClick:b,"aria-label":typeof m=="string"?Zi(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(Lt,{type:"dot",position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ji(e){const{t}=Be.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),x=o.useRef(null),[b,k]=o.useState(null);o.useEffect(()=>{const w=x.current;if(!w)return;let E=null;const D=()=>{const{scrollHeight:$,clientHeight:Y,scrollTop:T}=w;if($<=Y+1){k(O=>O===null?O:null);return}const P=Math.max(24,Y/$*Y),M=Y-P,Z=$-Y,V={top:Math.round(T/Z*M),height:Math.round(P)};k(O=>O&&O.top===V.top&&O.height===V.height?O:V)},A=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),w.addEventListener("scroll",A,{passive:!0});const R=typeof ResizeObserver<"u"?new ResizeObserver(A):null;R?.observe(w);for(const $ of Array.from(w.children))R?.observe($);return()=>{E!==null&&cancelAnimationFrame(E),w.removeEventListener("scroll",A),R?.disconnect()}},[a]);const _=o.useRef(null),N=o.useCallback(w=>{const E=x.current;E&&(w.preventDefault(),_.current={y:w.clientY,top:E.scrollTop},w.currentTarget.setPointerCapture(w.pointerId))},[]),v=o.useCallback(w=>{const E=x.current,D=_.current;!E||!D||(E.scrollTop=D.top+(w.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),B=o.useCallback(w=>{_.current=null,w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId)},[]);return n.jsxs("nav",{ref:x,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[b&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:b.top,height:b.height},onPointerDown:N,onPointerMove:v,onPointerUp:B,onPointerCancel:B})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(w=>!w.section&&(w.key||w.label)).map((w,E)=>n.jsxs(o.Fragment,{children:[w.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Xi,{item:w,active:!!w.key&&w.key===r,state:w.disabled?"disabled":void 0,onClick:(D,A,R)=>{if(w.disabled)return;if(w.href){if(Yi(w.href)&&window.open(w.href,"_blank","noopener,noreferrer"),R)try{A?.blur()}catch{}return}if(s?.(w.key),Do(y,"SideNav"),!R)return;try{A?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const Y=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&Y&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const T=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",T)};$.addEventListener("mouseenter",T)}}}})]},w.key??`side-nav__item-${E}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(Xi,{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(e2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var Cr='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>',jo='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>',t2='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 Qi({appMode:e}){const{t}=Be.useTranslation(),a=e==="manager",r=a?jo:Cr,s=t2;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 eu({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=Be.useTranslation(),f=gn("(max-width: 767px)"),x=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),b=o.useCallback($=>{const Y=a?.find(T=>T.key===$);if(!Y?.disabled){if(Y?.href){Yi(Y.href)&&window.open(Y.href,"_blank","noopener,noreferrer");return}t?.($)}},[a,t]),k=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&$.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&$.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&$.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&$.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),$},[C,i,u,d,h,p,c,l]),_=o.useCallback(($,Y)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Oa(Y)}),[]),N=o.useId(),{open:v,toggle:B,close:w,style:E,triggerRef:D,menuRef:A}=za({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),R=o.useMemo(()=>[{items:k.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),w()}}))}],[k,e,w]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qi,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(ge,{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:B,"aria-expanded":v,"aria-controls":v?N:void 0}),!!u&&!!l&&l>0&&n.jsx(Lt,{type:"dot",number:Math.min(l,99),size:24,"aria-hidden":!0}),v&&cn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:E,ref:A,children:n.jsx(Wa,{columns:R,onClose:w})}),document.body)]})]}),n.jsx(Ji,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),f&&n.jsx(Ki,{items:x,activeKey:e??void 0,onChange:b,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const n2=eu,a2=()=>Gt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tu(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 ca(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ca(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function r2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function o2(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||a2()}function s2(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 nu(e){return{type:e.type??r2(e),plan:o2(e),label:e.label,price:tu(e.price),originalPrice:tu(e.originalPrice),discountLabel:e.discountLabel}}var l2='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>',i2='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>',au='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 Xn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function u2(e){if(e)return To.get(e)}function Tn(e,t){e&&(e.style.setProperty(Xn.text,t.text),e.style.setProperty(Xn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Xn.copyright,t.copyrightColor),To.set(e,t))}function Mn(e){e&&(e.style.removeProperty(Xn.text),e.style.removeProperty(Xn.sub),e.style.removeProperty(Xn.copyright),To.delete(e))}const ru={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function ou(e={}){const t=Rt(ru,Tn,Mn);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("${au}")`}})]})}const su="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",Ca=240;var Ha='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 c2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},d2=100,p2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lu(e={}){const t=Rt(c2,Tn,Mn),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:p2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*d2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${Ha}")`}})]})}const h2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},m2=100,C2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function f2(e={}){const t=Rt(h2,Tn,Mn),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:C2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*m2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${au}")`}})]})}const b2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function g2(e={}){const t=Rt(b2,Tn,Mn);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("${Ha}")`}})]})}const y2={Logo_SpeechEar_ko:{"":Cr,_mono:l2},Logo_SpeechEarManager_ko:{"":jo,_mono:i2}};function v2(e,t){if(e)return y2[e]?.[t??""]??void 0}const _2={speechear:Cr,manager:jo},x2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},iu=10;function w2(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 uu(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 B2(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===Gt.t("passCard.specialLabel");return r?n.jsx(g2,{}):s?n.jsx(f2,{}):n.jsx(lu,{})}return n.jsx(ou,{})}function cu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:f,originalPrice:x,discountLabel:b,onUse:k,onRefund:_,onDelete:N}){const{t:v}=Be.useTranslation(),B=t?nu(t):void 0,w=s??B?.type??"speechear",E=r??B?.plan??v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??B?.label,A=f??(a?B?.price:void 0),R=x??(a?B?.originalPrice:void 0),$=b??B?.discountLabel,Y=o.useMemo(()=>{if(A)return null;const W=t?.durationDays??s2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:uu(i,v)}:null;const q=W*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&l){const Ce=new Date(l).getTime();if(Number.isNaN(Ce))return null;const de=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),fe=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ra()),be=Math.round(de&&fe?(Date.UTC(+de[1],+de[2]-1,+de[3])-Date.UTC(+fe[1],+fe[2]-1,+fe[3]))/864e5:(Ce-Date.now())/864e5);pe=Math.max(0,u?be+1:be)*86400}else c==="expired"?pe=0:pe=q;const Se=w2(pe),ve=Math.max(0,Math.min(100,Math.floor(Math.min(Se,q)/q*100)));return c==="pending"&&ve>=100?null:{percent:ve,remainingLabel:c==="expired"?v("passCard.expired","\uB9CC\uB8CC\uB428"):uu(pe,v)}},[A,c,l,i,u,t?.durationDays,t?.code,v]),T=o.useRef(null),[P,M]=o.useState({}),[Z,V]=o.useState(null),O=!!(k||_||N),te=o.useRef(!1),I=o.useRef(void 0),[U,Q]=o.useState(y);o.useLayoutEffect(()=>{Q(y)},[y]),o.useLayoutEffect(()=>{const W=T.current;W&&(p!==void 0&&W.style.setProperty("--pass-card-text",p),m!==void 0&&W.style.setProperty("--pass-card-sub",m),g!==void 0&&W.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const W=T.current;if(!W)return;const q=u2(W);if(!y){const pe=x2[w],Se=c==="expired"?"_mono":q?.logoColor??"",ve=v2(pe,Se);Q(ve)}},[d,y,w,c]);const H=W=>{const q=T.current;if(!q)return null;const{left:pe,top:Se,width:ve,height:Ce}=q.getBoundingClientRect(),de=(W.clientX-pe)/ve-.5;return{rotateX:-((W.clientY-Se)/Ce-.5)*iu,rotateY:de*iu}},S=(W,q)=>{const pe=q*-.7,Se=W*.7+10,ve=20+(Math.abs(W)+Math.abs(q))*.4;return`${pe}px ${Se}px ${ve}px rgba(0, 0, 0, 0.18)`},F=o.useCallback(W=>{if(ma())return;te.current=!0,clearTimeout(I.current),I.current=setTimeout(()=>{te.current=!1},200);const q=H(W);q&&M({transform:`perspective(800px) rotateX(${q.rotateX}deg) rotateY(${q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(q.rotateX,q.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)"})},[]),L=o.useCallback(W=>{if(ma())return;const q=H(W);if(!q)return;const pe=te.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";M({transform:`perspective(800px) rotateX(${q.rotateX}deg) rotateY(${q.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(q.rotateX,q.rotateY),transition:pe})},[]),G=o.useCallback(()=>{clearTimeout(I.current),te.current=!1,M({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)"})},[]),ae=o.useCallback(()=>V(null),[]),se=o.useMemo(()=>{const W=v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),q=E.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),pe=q.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?v("passCard.unitYear","\uB144"):v("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:q})},[E,v]),me=o.useMemo(()=>{const W=ca(A);if(!W)return null;const q=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!q)return n.jsx("span",{className:"h1",children:W});const[,pe,Se,ve]=q;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Se}),ve.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ve.trim()})]})},[A]),X=o.useCallback(()=>{O&&V(W=>{if(W)return null;const q=T.current?.getBoundingClientRect();if(!q)return null;const pe=50;return{left:q.left,right:q.right,width:q.width,height:q.height,x:q.x,y:q.y+pe,top:q.top+pe,bottom:q.bottom+pe}})},[O]),z=o.useCallback(W=>{O&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),X())},[O,X]),ne=[{items:[...k?[{label:v("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{k(),V(null)},closeOnSelect:!0}]:[],..._?[{label:v("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),V(null)},closeOnSelect:!0}]:[],...N?[{label:v("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),V(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--${c}${O?" pass-card--clickable":""}`,style:P,onMouseEnter:F,onMouseMove:L,onMouseLeave:G,onPointerUp:W=>{W.pointerType==="touch"&&G()},onPointerCancel:W=>{W.pointerType==="touch"&&G()},onClick:X,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!Z:void 0,children:[d??B2(w,E,D),!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:U??_2[w],className:"pass-card__logo",alt:w==="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:se}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?v("passCard.labeledPlan",{label:D}):v("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),A?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[R&&n.jsx("span",{className:"pass-card__price-original body-3",children:ca(R)}),me]})]}):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."})]})]})}),Z&&n.jsx(xn,{anchorRect:Z,onClose:ae,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:ne,onClose:ae,size:"small"})})]})}const k2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function A2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Rt(k2,Tn,Mn);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("${Ha}")`}})]})}const N2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function E2(e={}){const t=Rt(N2,Tn,Mn);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("${Ha}")`}})]})}function D2(e,t){if(e){if(t==="manager_pro")return n.jsx(E2,{});if(t==="manager_standard")return n.jsx(A2,{});if(t==="manager_lite")return n.jsx(lu,{})}}function S2(e){const t=ca(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 j2(e){const{t}=Be.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(_),d=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>d(_)&&c(_.code)),p=_=>{const N=_.prices?_.prices[i]:_.price;return N?(s.tiers||[]).some(v=>!!v.badge&&v.originals?.[i]===N):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=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 N=C(_);return N==="\uBB34\uB8CC"||N===g||N==="0\uC6D0"||typeof N=="string"&&/\d/.test(N)&&!/[1-9]/.test(N)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB38\uC758"||N===y}),b=s.group==="org",k=b?"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(Lt,{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((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),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((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(ge,{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 N=_.label||a,v=d(_),B=v||_.openPromo===!0,w=N.replace(/^오픈\s*특가\s*/,"")||a,E=_.prices?_.prices[i]:_.price,D=_.badge?B?`${r}
|
|
823
|
-
${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return p(_)?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:S2(E)})})]},_.id);const A=s.tier??(b?s.title:void 0),R=n.jsx(cu,{showPrice:!0,product:{type:k,code:_.code,name:w,label:A,price:E,originalPrice:_.originals?.[i]??void 0,discountLabel:D},bg:D2(b,s.id)}),$=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:R});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:$,onKeyDown:l?Y=>{Y.target===Y.currentTarget&&(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),$())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:R},_.id)})})})})]})}function T2({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 Mo='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 du={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function M2(){const e=Rt(du,Tn,Mn);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("${Mo}")`}})})}const pu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function L2(e={}){const t=Rt(pu,Tn,Mn);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("${Ha}")`}})]})}function hu({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 Va=(e,t,a)=>e+(t-e)*a;function $2({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:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:b=!1,shortcutAnchor:k="top-right",shortcutScale:_,scaleShortcut:N=!1}){const{t:v}=Be.useTranslation(),B=Math.max(0,Math.min(1,a)),w=t/2,E=110/300,D=.18,A=W=>t*(E+(W-1)*D),R=W=>{const q=A(W.row??1),pe=W.angleDeg*Math.PI/180;return{x:w+q*Math.cos(pe),y:w+q*Math.sin(pe)}},$=Math.max(...e.map(W=>W.row??1),1),Y=t*.08,T=t*.1,P=t*.24,M=t-2*Y,Z=t-T-P,V=t-P/2,O=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,q)=>W-q),[e]),te=O.length,I=Math.max(68,te>1?M/(te-1):0),U=o.useMemo(()=>new Map(O.map((W,q)=>[W,q])),[O]),Q=W=>{const q=U.get(W.deg)??0,pe=w+(q-(te-1)/2)*I,Se=$>1?Math.min(68,Z/($-1)):0,ve=Se*($-1),Ce=T+(Z-ve)/2,de=$===1?T+Z*.4:Ce+($-(W.row??1))*Se;return{x:pe,y:de}},H=W=>{const q=R(W),pe=Q(W);return{x:Va(q.x,pe.x,B),y:Va(q.y,pe.y,B)}},S={x:w,y:Va(w,V,B)},F=Math.round(g*1.2),L=Math.round(Math.max(16,Math.min(80,g*.7))),G=[],ae=new Map;for(const W of e){const q=W.row??1;ae.has(q)||ae.set(q,[]),ae.get(q).push(W)}for(const[W,q]of ae.entries()){if(q.length<2)continue;const pe=[...q].sort((He,it)=>He.deg-it.deg),Se=pe.map(He=>H(He)),ve=pe.map(He=>He.deg),Ce=ve[ve.length-1]-ve[0],de=Ce/(ve.length-1),fe=360-Ce,be=pe.length>=3&&de>0&&fe<=de*1.5,he=Math.round(A(W)*1e3)/1e3,Le=(He,it,rt,Qe)=>{const ft=(it.angleDeg-He.angleDeg+540)%360-180;if(ft===0)return`L ${Qe.x} ${Qe.y}`;if(B===0)return`A ${he} ${he} 0 0 ${ft>0?1:0} ${Qe.x} ${Qe.y}`;const Ee=(He.angleDeg+ft/2)*Math.PI/180,Ue={x:w+he*Math.cos(Ee),y:w+he*Math.sin(Ee)},Ae={x:(rt.x+Qe.x)/2,y:(rt.y+Qe.y)/2},Ve={x:Va(Ue.x,Ae.x,B),y:Va(Ue.y,Ae.y,B)},Je={x:2*Ve.x-Ae.x,y:2*Ve.y-Ae.y};return`Q ${Je.x} ${Je.y} ${Qe.x} ${Qe.y}`},Fe=be?[...pe,pe[0]]:pe,$e=be?[...Se,Se[0]]:Se;let qe=`M ${$e[0].x} ${$e[0].y}`;for(let He=1;He<$e.length;He++)qe+=" "+Le(Fe[He-1],Fe[He],$e[He-1],$e[He]);G.push({key:`arc-${W}`,d:qe})}const se=o.useMemo(()=>new Set(s??[]),[s]),me=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],X=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return se.has(W.id)?"played":"idle"},z=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,ne=(W,q)=>{switch(W){case"played":case"correct":return n.jsx(Fs,{size:q});case"wrong":return n.jsx(Ys,{size:q});default:return n.jsx(Ks,{size:q})}};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:[B===0&&e.map(W=>{const{x:q,y:pe}=H(W);return n.jsx("line",{x1:S.x,y1:S.y,x2:q,y2:pe,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),G.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),b&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:F,height:F,left:S.x-F/2,top:S.y-F/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:F,height:F,left:S.x,top:S.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Fr,{size:L,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:F,height:F,left:S.x,top:S.y},children:n.jsx(Fr,{size:L,color:"currentColor",strokeWidth:1.5})}),e.map((W,q)=>{const{x:pe,y:Se}=H(W),ve=X(W),Ce=z(W),de={..._!==void 0||N?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ve!=="idle"?10:1},fe=g,be=Math.round(Math.max(10,Math.min(56,fe*.38))),he=Math.round(Math.max(7,Math.min(18,fe*.2))),Le=Math.round(Math.max(10,Math.min(56,fe*.4))),Fe=y==="answered"&&(ve==="played"||ve==="correct"||ve==="wrong"),$e=y===!0||Fe,qe=!Fe;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...de,left:pe-fe/2,top:Se-fe/2},children:[Ce&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ve}`+(Ce==="once"?" sound-compass__pulse--once":""),style:{width:fe,height:fe,...Ce==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ve}`,style:{width:fe,height:fe},"aria-label":me(ve)?`${W.label}, ${me(ve)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[$e&&ne(ve,be),qe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?he:Le},children:q+1})]}),W.shortcut&&n.jsx(hu,{keys:W.shortcut,anchor:k,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function R2({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:Ne("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function P2({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 mu({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 I2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=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(mu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const F2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function O2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=Be.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const b=p.current;b&&b.contains(document.activeElement)&&cr(b),h(!0),l?.()},[l]);if(d)return null;const g=Ne("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:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(tt,{icon:F2[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 z2={ready:"search",guide:"info",error:"circle-alert"};function W2(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 H2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??z2[e],u=Ne("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?W2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(tt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function qa({title:e,items:t}){const{t:a}=Be.useTranslation(),{anchorRect:r,openAt:s,close:l}=Fa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(ge,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ha(c)||s(c.currentTarget)},onPointerLeave:c=>{ha(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ma()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Yn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function V2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=Be.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=p())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=p(),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===d);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===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,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 q2={xs:12,sm:16,md:20,lg:28,xl:36};function U2(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 G2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=Be.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?U2(t):"",h=!!e&&!c,p=!h&&!!d,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&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(tt,{icon:"user-round",size:q2[a],className:"avatar__icon"})]})}function K2(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 Y2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Be.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=v=>{if(!v||v.length===0)return;const B=Array.from(v).filter(E=>K2(E,t));if(B.length===0)return;const w=a?B:B.slice(0,1);if(l===void 0){const E=a?[...y,...w]:w;g(E),e?.(E)}else e?.(w)},f=v=>{v.preventDefault(),!r&&p(!0)},x=v=>{v.preventDefault(),p(!1)},b=v=>{v.preventDefault(),p(!1),!r&&C(v.dataTransfer.files)},k=v=>{const B=v.target;try{C(B.files)}finally{B.value=""}},_=()=>{r||d.current?.click()},N=v=>{if(!r&&(i?.(v),l===void 0)){const B=y.filter((w,E)=>E!==v);g(B),i||e?.(B)}};return n.jsxs("div",{className:`file-upload ${u}`.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:_,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),_())},onDragOver:f,onDragLeave:x,onDrop:b,children:[n.jsx(tt,{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:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:k,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((v,B)=>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:()=>N(B),children:n.jsx(tt,{icon:"x",size:14})})]},`${v.name}-${B}`))})]})}function Z2({items:e,className:t=""}){const{t:a}=Be.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(tt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const X2={small:14,medium:20,large:28};function J2({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Be.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=X2[s],y=v=>{v!==e&&t?.(v)},C=v=>{c||y(v)},f=v=>{c||ma()||h(v)},x=o.useRef(null),b=v=>{const B=Math.min(a,Math.max(1,v));y(B),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(w=>w.dataset.star===String(B))?.focus()},k=v=>{if(!c){switch(v.key){case"ArrowRight":case"ArrowUp":b((p||0)+1);break;case"ArrowLeft":case"ArrowDown":b((p||1)-1);break;case"Home":b(1);break;case"End":b(a);break;default:return}v.preventDefault()}},_=p>=1&&p<=a?Math.round(p):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:k,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:v=>{v.pointerType==="touch"&&N()},onPointerCancel:v=>{v.pointerType==="touch"&&N()},children:Array.from({length:a},(v,B)=>{const w=B+1,E=Math.max(0,Math.min(1,m-B)),D=E>0&&E<1,A=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(tt,{icon:"star",size:g,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(tt,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:A},w):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===w,"aria-label":u("rating.starLabel",{n:w}),"data-star":w,tabIndex:w===_?0:-1,onClick:()=>C(w),onMouseEnter:()=>f(w),children:A},w)})})}const Q2=20,ev=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function tv({value:e,onChange:t,palette:a=ev,size:r=40,className:s="",ariaLabel:l}){const{t:i}=Be.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(tt,{icon:"check",size:Q2,className:"color-picker__check"})},u)})})}function Cu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Be.useTranslation(),d=u==="small",h=Ne("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const w=r&&typeof r=="object"?{...r}:{};return!s&&!l?w:{...w,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[b,k]=o.useState(null);o.useLayoutEffect(()=>{g&&k(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const w=E=>{const D=m.current;if(!D)return;const A=E.target;A&&!D.contains(A)&&y(!1)};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[g]);const _=o.useCallback(()=>{i&&y(!0)},[i]),N=o.useCallback(()=>{i&&y(!1)},[i]),v=o.useCallback(()=>y(!1),[]),B=o.useCallback(w=>{if(w.key==="Escape"){y(!1);return}(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),y(E=>!E))},[]);return n.jsxs("span",{ref:m,className:Ne("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:N,onFocus:_,onBlur:N,onKeyDown:B,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":g,"data-tooltip-ignore":!0,children:[n.jsx(tt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&f&&n.jsx(Sn,{anchorRect:b,text:typeof f=="string"?f:void 0,offset:8,onClose:v,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Wn=null;function Ua(e){if(Wn&&Wn!==e)try{Wn()}catch{}return Wn=e,()=>{Wn===e&&(Wn=null)}}function fr(e){if(Wn===e){Wn=null;try{e()}catch{}}}function Ga(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Et("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 nv(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 av(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=nv(e,t),x=`${C.join(",")}|${f??""}`,b=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const N=[],v=[];for(const B of C)try{const w=xl(B,f);if(!w){N.push("");continue}let E=null;try{E=await wl(w)}catch{}if(!E)try{const D=await Bl(w);D&&(E=URL.createObjectURL(D),v.push(E))}catch{}N.push(E??"")}catch{N.push("")}_?v.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}):(y.current.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}),y.current=v,u({key:x,urls:N}))})(),()=>{_=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const k=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),d.current){h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!b.filter(Boolean).length)return;let N=null;const v=()=>{d.current=!1,N?.stop()};h.current=v;const B=Ua(v);d.current=!0,r(!0);for(let w=0;w<b.length&&d.current;w++){const E=b[w];if(E&&(l(w),N=Ga(E),c.current=N.el,!await N.done))break}B(),h.current===v&&(h.current=null,d.current=!1,r(!1),l(-1))},[b]);return o.useEffect(()=>()=>{h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:b,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:k}}const rv=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 Lo(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:b,size:k="square"}=e||{},{t:_}=Be.useTranslation(),[N,v]=o.useState(!1),B=o.useRef(null),[w,E]=o.useState(!1);o.useEffect(()=>{B.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:A,previewUrls:R,previewHover:$,setPreviewHover:Y,previewBtnRef:T,handlePreview:P}=av(r,a?.key),M=o.useCallback(()=>{f?f():v(!0)},[f]),Z=o.useCallback(()=>v(!1),[]),V=o.useCallback(()=>E(!0),[]),O=o.useCallback(()=>E(!1),[]),te=o.useCallback(()=>Y(!0),[Y]),I=o.useCallback(()=>Y(!1),[Y]),[U,Q]=o.useState(null);o.useLayoutEffect(()=>{$&&Q(T.current?.getBoundingClientRect()??null)},[$,T]);const[H,S]=o.useState(null);o.useLayoutEffect(()=>{w&&!N&&p&&S(B.current?.getBoundingClientRect()??null)},[w,N,p]);const F=o.useCallback(Ae=>{Ae.target===Ae.currentTarget&&(Ae.key==="Enter"||Ae.key===" ")&&(Ae.preventDefault(),M())},[M]),L=r||null,G=o.useMemo(()=>{if(!p)return null;const Ae=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ve=Ae&&Ae.length>0?Ae:rv(L);return Ve&&Ve.length>0?Ve:null},[p,h,L]),ae=o.useCallback(Ae=>{Ae.stopPropagation(),m?.()},[m]),se=o.useCallback(Ae=>Ae.stopPropagation(),[]),me=o.useCallback(Ae=>{typeof C=="function"&&C(Ae)},[C]),X=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!X&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Ii("speechear.popup.close",Z);const ne=Kl(),W=`${a?.label||""} ${t+1}`,q=L?.title||L?.name||W;let pe=a?.icon,Se,ve="",Ce="";try{const Ae=L?.category_0||L?.category_main_code||L?.category_main,Ve=L?.category_1||L?.category_sub_code||L?.category_sub,Je=ne.find(ot=>ot.key===Ae);Je?.icon&&(pe=Je.icon),!Se&&Je?.color&&(Se={"--t-item-fg":Je.color}),!Se&&L?.iconColor&&(Se={"--t-item-fg":L.iconColor}),ve=Je?_(`topic.${Je.key}`,{defaultValue:Je.label||""}):"";try{const ot=Je?.subs?.find(At=>At.key===Ve);Ce=ot?_(`topic.sub.${ot.key}`,{defaultValue:ot.label||""}):""}catch{}}catch{}const de=Ce?`${ve} / ${Ce}`:ve||a?.label||q,fe=Ae=>_("training.countQuestions",{n:Ae,count:Ae}),be=Ae=>_("training.countSentences",{n:Ae,count:Ae});let he="";try{if(L)if(a?.key==="LISTEN_IN_NOISE"){let Ae=0;Array.isArray(L.items)&&L.items.length>0?Ae=L.items.length:Array.isArray(L.sentences)&&L.sentences.length>0?Ae=L.sentences.length:L.sentences&&(Ae=1),he=be(Ae)}else if(a?.key==="SHORT_STORY"){let Ae=1;Array.isArray(r?.items)?Ae=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Ae=r.raw.items.length:Array.isArray(L?.questions)?Ae=L.questions.length:Array.isArray(L?.sentences)&&(Ae=L.sentences.length),he=fe(Ae)}else if(a?.key==="LONG_STORY"){let Ae=1;if(Array.isArray(L.items)&&L.items.length>0){const Ve=L.items.reduce((Je,ot)=>{const At=ot.questionItems;return Array.isArray(At)?Je+At.length:Array.isArray(ot.questions)?Je+ot.questions.length:Je},0);Ae=Ve>0?Ve:L.items.length}else Array.isArray(L.questions)&&L.questions.length>0?Ae=L.questions.length:Array.isArray(L.sentences)&&L.sentences.length>0&&(Ae=L.sentences.length);he=fe(Ae)}else if(a?.key==="ORDERING_SENTENCE"){let Ae=1;Array.isArray(L.items)&&L.items.length>0?Ae=L.items.length:Array.isArray(L.sentences)&&L.sentences.length>0&&(Ae=L.sentences.length),he=be(Ae)}else Array.isArray(L.items)&&(he=L.items.length>0?fe(L.items.length):"")}catch{}const Le=k==="row",Fe=k==="list"||Le,$e=k==="compact",qe=k==="small",He=qe&&a?.key?Of().find(Ae=>Ae.key===a.key):void 0,it=He?Yl[He.key]:void 0,rt=He?it?_(`trainingType.${it}.title`,{defaultValue:He.label}):He.label??"":"",Qe=y&&a?.label&&a.label!==String(q)?String(a.label):qe&&rt&&rt!==String(q)?rt:"",ft=!!Qe,Ee=b!==void 0?b:he,Ue=[Qe,typeof q=="string"?q:"",Ee].map(Ae=>String(Ae??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:B,className:`training-block-button${Fe?" training-block-button--list":""}${Le?" training-block-button--row":""}${$e?" training-block-button--compact":""}${qe?" training-block-button--small":""}${X?" training-block-button--completed":""}${z?" training-block-button--selected":""}${ft&&!qe?" training-block-button--withType":""}${qe&&!ft?" training-block-button--no-type-label":""}`,onClick:M,onPointerEnter:V,onPointerLeave:O,role:"button",tabIndex:0,onKeyDown:F,"aria-label":typeof s=="string"?s:Ue||void 0,title:!p&&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(q)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),qe&&rt&&rt!==String(q)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:rt}),n.jsx(Cu,{icon:pe,label:q,tooltip:de,wrapperStyle:Se,iconSize:qe||$e?"small":"medium"}),!g&&(X||z)&&!(m&&w)&&n.jsx(Lt,{className:m?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":X?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Lt,{className:`training-block-button__remove${w?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":_("common.remove","\uC81C\uAC70"),onClick:ae}),n.jsx("div",{className:`training-block-button__title ${$e?"body-3":qe?"body-3b":"h3"}`,children:String(q)}),n.jsxs("div",{className:"training-block-button__description",children:[Ee?n.jsx("div",{className:`training-block-button__count ${qe?"caption-2":"caption-1"}`,children:Ee}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(tt,{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:qe?12:20})})]}),(Fe&&!Le||qe)&&R.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:se,onPointerEnter:te,onPointerLeave:I,children:n.jsx(ge,{htmlType:"button",size:qe?28:32,type:"dot",icon:D?"pause":"play",variant:qe?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(q).trim()?D?_("training.stopFor",{name:q,defaultValue:`${q} \uC815\uC9C0`}):_("training.previewFor",{name:q,defaultValue:`${q} \uBBF8\uB9AC \uB4E3\uAE30`}):D?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Ae=>{Ae.stopPropagation(),x(Ae)},children:n.jsx(ge,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(q).trim()?_("common.moreFor",{name:q}):_("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(Sn,{anchorRect:U,text:D?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:I}),w&&!N&&p&&(G?n.jsx(Yn,{anchorRect:H,items:G,activeIndex:A,onClose:O}):L?.subTitle?n.jsx(Sn,{anchorRect:H,text:L.subTitle,offset:8,onClose:O}):null),N&&i&&i({trainingData:L,typeKey:a?.key??"",onClose:Z,onComplete:me,popupTitle:String(q),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:pe,popupIconTooltip:String(de),popupWrapperStyle:Se})]})}const fu=200;function ov(e){return e.itemId?(qf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function bu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=Be.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Gf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(ov).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:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):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:d})}),n.jsx("div",{className:le("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Lo,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(xn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const sv=200;function lv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=Ne("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(g&&r&&s),b=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),k=o.useCallback(()=>{b(),y(null)},[b]),_=o.useCallback(()=>{!s||!r||(b(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},fu))},[s,r,b]),N=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},sv))},[]);return o.useEffect(()=>()=>{b()},[b]),o.useEffect(()=>{(!s||!r)&&k()},[s,r,k]),o.useEffect(()=>{if(!x)return;const v=w=>w instanceof Element&&(m.current?.contains(w)||!!w.closest(".training-tooltip")),B=w=>{v(w.target)?b():N()};return document.addEventListener("pointerover",B,!0),()=>document.removeEventListener("pointerover",B,!0)},[x,b,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?v=>{k(),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"?k():_()},onMouseEnter:c,onMouseLeave:v=>{N(),d?.(v)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(tt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(bu,{plan:r,anchorRect:g,onClose:k})]})}let Ka=0,gu="",$o="",Ya=0;function yu(){return vu(!1)}function iv(){return vu(!0)}function vu(e){const t=typeof document<"u";Ka===0&&t&&(gu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Ya===0&&($o=document.body.style.paddingRight),Ya++,document.body.style.paddingRight="0px"),Ka++;let a=!1;return()=>{a||(a=!0,Ka=Math.max(0,Ka-1),e&&t&&(Ya=Math.max(0,Ya-1),Ya===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Ka===0&&t&&(document.body.style.overflow=gu))}}function uv(){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 cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=Be.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const b=document.activeElement,k=yu(),_=g.current;return fo(_,b),_?.focus(),()=>{k();const N=document.activeElement;(!N||N===document.body||_&&_.contains(N))&&bo(b)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return Kn(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return mo(g,e),!e||typeof document>"u"?null:cn.createPortal(n.jsx("div",{className:Ne("dialog",d),onPointerDown:i?b=>{x.current=b.target===b.currentTarget}:void 0,onMouseDown:b=>{b.target===b.currentTarget&&b.preventDefault()},onClick:i?b=>{const k=x.current;x.current=!1,k&&b.target===b.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,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:b=>b.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":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(uv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function dv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=Be.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:Ne("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(p=>n.jsx("th",{scope:"col",className:Ne("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.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??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:Ne("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function pv({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(u=>n.jsx("li",{children:u},u))}):null]})}function hv({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 mv({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:Ne("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 Cv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Pa(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 fv({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: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(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function bv({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))})}function _u(e){return typeof e=="string"?e:e.label}function xu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const A=e??"";return s===!1?a:A?typeof s=="function"?s(a,A):a.filter(R=>_u(R).toLowerCase().includes(A.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),x=y&&g.length===0?f.current:g;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const b=o.useCallback(()=>C(!0),[]),k=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||p(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<x.length?h:_<x.length?_:-1,v=o.useCallback(A=>{l?l(A):t?.(_u(A)),d(!1)},[t,l]),B=o.useCallback(()=>d(!0),[]),w=o.useCallback(()=>{d(!0),p(_)},[_]),E=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(A=>{A.nativeEvent.isComposing||A.keyCode===229||(A.key==="ArrowDown"?(A.preventDefault(),d(!0),p(R=>Math.min(x.length-1,(R<x.length?R:_)+1))):A.key==="ArrowUp"?(A.preventDefault(),p(R=>Math.max(_,(R<x.length?R:x.length)-1))):A.key==="Enter"?N>=0&&v(x[N]):A.key==="Escape"&&c&&(A.preventDefault(),d(!1)))},[x,N,c,v,_]);return{listId:u,open:c,activeIdx:N,filtered:x,handleFocus:B,handleBlur:E,handleInput:w,handleKeyDown:D,handleSelect:v,handleCompositionStart:b,handleCompositionEnd:k}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Jn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:x,maxLength:b,size:k=40,variant:_="input",fullWidth:N=!1,newline:v=!1,multiline:B=!1,rows:w=3,leftIcon:E,rightIcon:D,clearable:A=!1,list:R,showCount:$=!0,className:Y="",onFocus:T,onBlur:P,onKeyDown:M,onEnter:Z,inputMode:V,autoComplete:O,autoFocus:te,suggestions:I,filterSuggestions:U,onSelectSuggestion:Q,autoActiveFirst:H,openOnFocus:S=!1}=e,F=C||y?void 0:I,{t:L}=Be.useTranslation(),G=o.useId();!i&&!u&&Et(`TextField:unnamed:${G}`,"[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 ae=`tf-${G}`,se=`tf-helper-${G}`,me=o.useRef(null),X=xu({value:t??"",onChange:l,suggestions:F??[],openOnFocus:S,filterSuggestions:U,onSelectSuggestion:Q,autoActiveFirst:H}),z=!!F&&X.open&&X.filtered.length>0,ne=o.useRef(null),[W,q]=o.useState(null),pe=o.useCallback(()=>{const Ee=ne.current;if(!Ee||typeof window>"u")return;const Ue=Ee.getBoundingClientRect(),Ae=230,Ve=window.innerHeight-Ue.bottom<Ae+8&&Ue.top>Ae+8;q({position:"fixed",left:Ue.left,width:Ue.width,...Ve?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:Oa(Ee)})},[]);Ro(()=>{if(!z)return;pe();let Ee=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){pe();return}Ee===null&&(Ee=requestAnimationFrame(()=>{Ee=null,pe()}))},Ae=Ve=>{const Je=Ve.target;Je&&Je.nodeType===1&&Je.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",Ae,!0),window.addEventListener("resize",Ue),()=>{Ee!==null&&cancelAnimationFrame(Ee),window.removeEventListener("scroll",Ae,!0),window.removeEventListener("resize",Ue)}},[z,pe]);const Se=o.useCallback(Ee=>{me.current=Ee,typeof s=="function"?s(Ee):s&&(s.current=Ee)},[s]),ve=p?`${p}${m??L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,Ce=t!==void 0,de=Ce&&g==="password",[fe,be]=o.useState((a??"").length),he=Ce?(t??"").length:fe,Le=o.useRef(t);Ro(()=>{Le.current=t}),o.useEffect(()=>{const Ee=me.current;if(!de||!Ee)return;const Ue=t??"";Ee.value!==Ue&&(Ee.value=Ue)},[de,t]),o.useEffect(()=>{if(!v||!me.current)return;const Ee=me.current;Ee.style.height="",Ee.scrollHeight>Ee.clientHeight&&(Ee.style.height=`${Ee.scrollHeight}px`)},[t,fe,v]);const Fe=b!=null&&he>b,$e=k===32?16:20,qe=Ne("text-field",`text-field--s${k}`,_==="display"?"text-field--display":"",N?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",E?"text-field--has-left-icon":"",D||A?"text-field--has-right-icon":"",Y),He={id:ae,...de?{}:Ce?{value:t}:{defaultValue:a},ref:Se,placeholder:ve,name:r,disabled:y,readOnly:C,autoFocus:te,maxLength:b,list:R,inputMode:V,autoComplete:O,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[x||f?se:null,c].filter(Boolean).join(" ")||void 0,role:F?"combobox":void 0,"aria-autocomplete":F?"list":void 0,"aria-haspopup":F?"listbox":void 0,"aria-expanded":F?z:void 0,"aria-controls":z?X.listId:void 0,"aria-activedescendant":z&&X.activeIdx>=0?`${X.listId}-option-${X.activeIdx}`:void 0,onChange:Ee=>{const Ue=Ee.target;Ce||be(Ue.value.length),l?.(Ue.value),F&&X.handleInput(),de&&queueMicrotask(()=>{const Ae=Le.current??"";Ue.value!==Ae&&(Ue.value=Ae)})},onCompositionStart:F?X.handleCompositionStart:void 0,onCompositionEnd:F?X.handleCompositionEnd:void 0,onFocus:(Ee=>{T?.(Ee),F&&X.handleFocus()}),onBlur:(Ee=>{P?.(Ee),F&&X.handleBlur()}),onKeyDown:(Ee=>{const Ue=(Ee.key==="Tab"&&!Ee.shiftKey||Ee.key===" ")&&!Ee.nativeEvent.isComposing;if(p&&Ue&&!C&&!y&&!(Ee.currentTarget.value??"").trim()){Ee.preventDefault();const Ae=Ee.currentTarget;Ce||(Ae.value=p,be(p.length)),l?.(p);return}F&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&X.activeIdx>=0?Ee.preventDefault():Z&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&(Ee.preventDefault(),Z()),M?.(Ee),F&&X.handleKeyDown(Ee)})},it=A&&!y&&!C&&he>0,rt=()=>v?n.jsx("textarea",{...He,className:"text-field__input text-field__input--auto body-2",rows:1}):B?n.jsx("textarea",{...He,className:"text-field__input text-field__input--textarea body-2",rows:w}):n.jsx("input",{...He,type:g,className:"text-field__input body-2"}),Qe=_==="display"&&!v&&!B&&!!ve,ft=()=>n.jsxs(n.Fragment,{children:[rt(),Qe&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ve})]});return n.jsxs("div",{ref:ne,className:qe,children:[i&&n.jsxs("label",{htmlFor:ae,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(tt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:$e})}),ft(),b!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${Fe?" text-field__count--over":""}`,children:[he,"/",b]}),it&&n.jsx(ge,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:L("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ee=>{Ee.preventDefault()},onClick:()=>{!Ce&&me.current&&(me.current.value="",be(0)),l?.("")},tabIndex:-1}),D&&!it&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(tt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:$e})})]}),!!F&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:X.open&&(t??"").length>0&&X.filtered.length===0?L("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:cn.createPortal(n.jsx("ul",{id:X.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:X.filtered.map((Ee,Ue)=>n.jsx("li",{id:`${X.listId}-option-${Ue}`,role:"option","aria-selected":Ue===X.activeIdx,className:`text-field__suggestion body-2${Ue===X.activeIdx?" is-active":""}`,onMouseDown:Ae=>Ae.preventDefault(),onClick:()=>{X.handleSelect(Ee),me.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:se,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}function yn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=Be.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((T,P)=>{const M=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...M?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Oa(P)}},[]),{open:x,setOpen:b,toggle:k,style:_,triggerRef:N,menuRef:v}=za({computeStyle:f}),[B,w]=o.useState(-1),E=o.useCallback(()=>w(-1),[]),D=e.find(T=>T.value===t);o.useEffect(()=>{if(x){const T=e.findIndex(P=>P.value===t);w(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const P=v.current;if(!P)return;const M=P.querySelectorAll(".dropdown__option")[T];M&&(P.scrollTop=Math.max(0,M.offsetTop-P.clientHeight/2+M.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&w(T=>{if(T>=0&&T<e.length)return T;const P=e.findIndex(M=>M.value===t);return P>=0?P:e.length?0:-1})},[x,e.length]);const A=o.useCallback(()=>{s||k()},[s,k]),R=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),b(!1))},[a,b,s,t]);o.useEffect(()=>{s&&b(!1)},[s,b]);const $=o.useCallback(T=>{if(!s){if(!x){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),b(!0));return}if(T.key==="Escape"){T.preventDefault(),b(!1);return}T.key==="ArrowDown"?(T.preventDefault(),w(P=>{let M=P+1;for(;M<e.length&&e[M].disabled;)M++;return M<e.length?M:P})):T.key==="ArrowUp"?(T.preventDefault(),w(P=>{let M=P-1;for(;M>=0&&e[M].disabled;)M--;return M>=0?M:P})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[B]?R(e[B]):b(!1))}},[s,x,e,B,R,b]),Y=x?n.jsx("div",{ref:v,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:E,onMouseDown:T=>T.preventDefault(),children:e.map((T,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":T.value===t,className:Ne("dropdown__option body-2",T.value===t?"dropdown__option--active":"",P===B?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:M=>M.preventDefault(),onClick:()=>R(T),onMouseEnter:()=>w(P),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}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:$,children:[n.jsxs("button",{ref:N,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?g:void 0,"aria-activedescendant":x&&B>=0?`${g}-option-${B}`:void 0,"aria-label":d,"aria-describedby":[d&&D?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:A,onBlur:T=>{x&&!v.current?.contains(T.relatedTarget)&&b(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.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"&&cn.createPortal(Y,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Po({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=Be.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:Ne("pagination",l),children:[n.jsx(ge,{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),d)," / ",d]}),n.jsx(ge,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Za=new Map;function An(e){const{t}=Be.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!In||p!=null&&p!=="")){if(Za.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Za.size>1){const _=[...Za.values()].sort();Et(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Za.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()=>{Za.delete(y)}}},[p,C,y]);const f=_=>{if(!g.length)return;const N=Math.max(0,g.findIndex(B=>B.key===r)),v=_==="first"?g[0]:_==="last"?g[g.length-1]:g[(N+_+g.length)%g.length];v&&(s(v.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(B=>B.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()},b=_=>{const N=v=>typeof v=="string"||typeof v=="number";if(!(!N(_.label)||_.count==null||_.count===!1||!N(_.count)))return`${_.label}, ${_.count}`},k=g.some(_=>_.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:Ne("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"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":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(ge,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===k?0:-1,label:_.label,count:_.count,ariaLabel:b(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}function Io({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=Be.useTranslation(),d=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:Ne("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,m)=>n.jsx(An,{size:40,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Jn,{className:"toolbar__search",size:40,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((p,m)=>n.jsx(yn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(yn,{size:40,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(Po,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function wu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(wu).join(""):""}function gv(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"},Bg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},kg={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"},Ag={clearAriaLabel:"Clear input"},Ng={ariaLabel:"Select tab"},Eg={ariaLabel:"Tabs"},Dg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Sg={ariaLabel:"User avatar"},jg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Tg={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"},Mg={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"}},Lg={steps:"Step {{current}} of {{total}}"},$g={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"},Rg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Pg={viewWords:"Words"},Ig={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Fg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Og={previewRegion:"Report preview \u2014 scrollable sideways"},zg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Wg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Hg={clearSelection:"Clear selection"},Vg={showResult:"Show {{type}} result"},qg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Ug={loading:"Loading"},Gg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Kg={ariaLabel:"Breadcrumb"},Yg={empty:"No items yet."},Zg={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"},Xg={common:Zb,calendar:Xb,passCard:Jb,rating:Qb,colorPicker:eg,dropdown:tg,accordion:ng,header:ag,nav:rg,settings:og,usage:sg,account:lg,training:ig,customers:ug,payment:cg,coupons:dg,visits:pg,trainingType:hg,myWordTable:mg,keyWords:Cg,wordTable:fg,wordSearch:bg,wordPrint:gg,topic:yg,device:vg,manager:_g,wordPairs:xg,footer:wg,date:Bg,wordData:kg,textField:Ag,segmentedControl:Ng,tabs:Eg,fileUpload:Dg,avatar:Sg,myHomework:jg,trainingStatus:Tg,store:Mg,progress:Lg,trainingMiss:$g,table:Rg,wordScore:Pg,topBanner:Ig,datePicker:Fg,report:Og,tooltip:zg,phonemeProfile:Wg,bulkBar:Hg,debug:Vg,badge:qg,loader:Ug,soundCompass:Gg,breadcrumb:Kg,board:Yg,promoBannerBg:Zg};const Jg="0.384.0",Qg=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],ho="ko",ey="ihab_display_language";function Zl(){if(typeof window>"u")return ho;try{const e=localStorage.getItem(ey);if(e&&Qg.some(t=>t.code===e))return e}catch{}return ho}function Xl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Xl),Xl(Zl()),Vt.use(Be.initReactI18next).init({resources:{ko:{translation:Yb},en:{translation:Xg}},lng:Zl(),fallbackLng:ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ty=new Map;try{Vt.store?.on?.("added",()=>ty.clear())}catch{}let ur=null,Jl=null,Ql=null;function ny(){const e=Fl();if(e&&e.entries.length>0){const t=mf();if(ur&&Jl===e&&Ql===t)return ur;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 ur=r,Jl=e,Ql=t,ur}return[]}new Proxy([],{get(e,t){const a=ny(),r=a[t];return typeof r=="function"?r.bind(a):r}});function ay(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 ry(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&ay(r.attrValue)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function oy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,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 p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=Jr(e):/^(Logo|Symbol)/i.test(p)?m=Jr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)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(p)return;if(/^\s*<svg[\s>]/i.test(f)){const x=ry(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=GC(g),{iconToUse:C,mode:f,svgText:x,blobUrl:b}=oy(g),B=(w,A={})=>n.jsx("span",{className:d,style:u,...A,children:w}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(w,A={})=>n.jsx("img",{src:w,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...A,style:_?{...A.style,..._}:A.style});if(!t)return null;if(typeof t!="string")return B(t);if(t==="none")return B(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 B(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const w={"--icon-url":b?`url(${b})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return B(n.jsx("span",{className:p,style:w}),{"aria-hidden":"true"})}return f==="img"?B(N(C,{onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?B(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}:void 0}),{"aria-hidden":"true"}):B(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Jr(t),{style:u,onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}});const v=typeof c=="number"?c:20,k=`<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 B(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:k}}),{"aria-hidden":"true"})}function ei(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 sy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ei(r?.onClick);return n.jsxs("div",{className:ke("empty-state",s),children:[e&&n.jsx(tt,{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(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ly({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=Be.useTranslation(),{pending:u,press:c}=ei(r);return n.jsxs("div",{className:ke("empty-state","error-state",l),role:"alert",children:[n.jsx(tt,{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(tt,{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 iy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:ke("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(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,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:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function uy({as:e="div",className:t="",children:a,storage:r,...s}){r&&L1({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=ke("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function cy(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 mo(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(Bn)).filter(cy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Bn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function bo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function ti(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 cr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ti(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Bn)).filter(c=>!(e&&e.contains(c))&&ti(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 dy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Be.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&cr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"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,b)=>n.jsx("span",{className:"notice-box__line body-3",children:x},b))}):C.children??null})]},f)),g]});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,g]})}const py={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function da(e){const{t}=Be.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)),d=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:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}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:py,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 pa=[];let dr=!1;function ni(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=pa[pa.length-1];t&&(e.stopPropagation(),t())}function Kn(e){return pa.push(e),!dr&&typeof document<"u"&&(document.addEventListener("keydown",ni),dr=!0),()=>{const t=pa.lastIndexOf(e);t>=0&&pa.splice(t,1),pa.length===0&&dr&&typeof document<"u"&&(document.removeEventListener("keydown",ni),dr=!1)}}const ai=o.createContext(null);function hy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ri=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function my(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 Ls.useSyncExternalStore(t,()=>ri(e),()=>!1)}function Cy(e){const[t,a]=o.useState(ri(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 fy=typeof Ls.useSyncExternalStore=="function"?my:Cy;function fn(e){const t=o.useContext(ai),a=fy(e);return t&&typeof t.mobile=="boolean"&&hy(e)?t.mobile:a}const by="(prefers-reduced-motion: reduce)";function go(){return fn(by)}const oi={"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","stat-chart__card":"manager-stat-card"};function gy(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 yy(e){return gy(oi,e)}function le(e){if(!e||Object.keys(oi).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=yy(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[x,b]=o.useState({position:"fixed",left:0,top:-9999}),[B,_]=o.useState(!1),[N,v]=o.useState("bottom"),[k,w]=o.useState(!1),[A,D]=o.useState(!1),E=!t&&!a,R=o.useRef(null),$=o.useCallback((I=!1,q=!1)=>{if(A&&m)return;const Q=a?a.getBoundingClientRect():t,H=q&&R.current?R.current:Q;if(!H||!f.current)return;const S=f.current,{offsetWidth:P,offsetHeight:L}=S,U=window.innerWidth,ae=window.innerHeight,se=U-H.right,me=H.left,te=H.top,z=ae-H.bottom;let ne=0,W=0,V="top";if(te>=L+r)V="top",W=H.top-r-L,ne=H.left+H.width/2-P/2;else if(z>=L+r)V="bottom",W=H.bottom+r,ne=H.left+H.width/2-P/2;else if(se>=P+r)V="right",ne=H.right+r,W=H.top+H.height/2-L/2;else if(me>=P+r)V="left",ne=H.left-r-P,W=H.top+H.height/2-L/2;else{const Ce=Math.max(te,z,se,me);Ce===te?(V="top",W=H.top-r-L,ne=H.left+H.width/2-P/2):Ce===z?(V="bottom",W=H.bottom+r,ne=H.left+H.width/2-P/2):Ce===se?(V="right",ne=H.right+r,W=H.top+H.height/2-L/2):(V="left",ne=H.left-r-P,W=H.top+H.height/2-L/2)}const pe=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,pe),U-P-pe),W=Math.min(Math.max(W,pe),ae-L-pe);const Ee=Math.round(ne),xe=Math.round(W);I&&f.current?(f.current.style.left=`${Ee}px`,f.current.style.top=`${xe}px`,f.current.dataset.placement=V):(v(V||N),b({position:"fixed",left:Ee,top:xe}),w(!0))},[A,m,a,t,r,s,N]);o.useEffect(()=>()=>{R.current=null},[a,t]),o.useLayoutEffect(()=>{if(E)return;if(A&&m){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),w(!0);return}R.current===null&&(R.current=a?a.getBoundingClientRect():t??null),$(!1,!0);const I=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(I)},[t,a,r,h,s,E,A,m,$]),o.useEffect(()=>{if(E||A&&m||!f.current||typeof ResizeObserver>"u")return;const I=new ResizeObserver(()=>{t&&$()});return I.observe(f.current),()=>I.disconnect()},[t,h,s,E,A,m,$]),o.useEffect(()=>{if(E||A&&m)return;let I=null;const q=()=>{if(a&&(R.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}I===null&&(I=requestAnimationFrame(()=>{I=null,$(!0)}))},Q=H=>{if(!a&&l){const S=H.target;if(S&&f.current&&f.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}X.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Q,{passive:!0,capture:!0}),()=>{I!==null&&cancelAnimationFrame(I),window.removeEventListener("resize",q),document.removeEventListener("scroll",Q,{capture:!0})}},[t,a,l,r,h,s,E,A,m,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const I=window.matchMedia("(max-width: 768px)"),q=()=>D(!!I.matches);q();try{I.addEventListener?I.addEventListener("change",q):I.addListener(q)}catch{try{I.addListener(q)}catch{}}return()=>{try{I.removeEventListener?I.removeEventListener("change",q):I.removeListener(q)}catch{}}},[]);const G=o.useRef(!1),T=o.useRef(null),F=go(),M=o.useCallback((I=!1)=>{if(l&&!(B||G.current)){if(G.current=!0,I){_(!0);try{l&&l()}catch{G.current=!1,_(!1)}return}_(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{G.current=!1,_(!1)}},F?0:200)}},[B,l,_,F]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(E)return;const I=H=>{const S=f.current;if(!S)return;const P=H.target;if(P&&!S.contains(P)){try{if(P.closest&&P.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},q=H=>{const S=f.current;if(!S)return;const P=H.target;if(P&&!S.contains(P)){try{if(P.closest&&P.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},Q=H=>{if(H.key==="Tab"){const S=f.current;if(!S)return;const P=S.querySelectorAll(Bn);if(!P||P.length===0)return;const L=P[0],U=P[P.length-1],ae=document.activeElement;H.shiftKey?ae===L&&(H.preventDefault(),U.focus()):ae===U&&(H.preventDefault(),L.focus())}};return document.addEventListener("pointerdown",I,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Q),()=>{document.removeEventListener("pointerdown",I,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Q)}},[l,i,M,E]);const X=o.useRef(M);o.useEffect(()=>{X.current=M});const Z=!!l;o.useEffect(()=>{if(!(E||!Z))return Kn(()=>X.current())},[E,Z]),o.useEffect(()=>{const I=()=>{M(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",I),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",I)}},[M]);const O=o.useRef(null);o.useEffect(()=>{if(E||C===!1||!k)return;const I=f.current;if(!I)return;const q=I.querySelector(Bn);if(q)return O.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Q=O.current;O.current=null,Q&&document.contains(Q)&&Q.focus({preventScroll:!0})}},[E,C,k]),o.useEffect(()=>{c==="dialog"&&!d&&kt("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,d]);const Y=n.jsxs("div",{ref:f,className:le(`tooltip__content ${E?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${B?"is-closing":""} ${u} ${A&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:E?{}:{...x,visibility:k?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":E?"":x.left,"data-top":E?"":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:le("tooltip__header h5"),children:y}),h]});if(E||typeof document>"u")return Y;if(p||A&&m){const I=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&M(!0)}}),Y]});return un.createPortal(I,document.body)}return un.createPortal(Y,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(vn,{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 Yn(e){const{t}=Be.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,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"),children:h.map((p,m)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Pa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,si=!1;function li(){si||typeof document>"u"||(si=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}li();function ha(e){return!!e&&e.pointerType==="touch"}function ma(e=1e3){return li(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Pa(e),i=Pa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const b=h.getBoundingClientRect();return x.clientX>=b.left&&x.clientX<=b.right&&x.clientY>=b.top&&x.clientY<=b.bottom},y=f=>{m=g(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!g(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function vy(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:f="center",nowrap:x=!1,selected:b,toggleable:B=!1,ariaExpanded:_,ariaControls:N,disabled:v=!1,loading:k=!1,useLabel:w=!0,useBorder:A=!0,useBG:D=!0,useDisabledCovered:E=!1,useDisabledInvisible:R=!1,useDisabledFilled:$=!1,width:G,minWidth:T,onClick:F,onDisabledClick:M,showTooltipInfo:X=!1,tooltipInfoText:Z=null,tooltipDescription:O=null,tooltipOnly:Y=!1,iconSize:I="medium",iconColor:q,shape:Q="rounded",color:H,className:S,...P}=e,L=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),U=L.match(/^\d+$/)?`button${L}`:`button-${L}`,ae=Number(a),se=!isNaN(ae)&&ae<40?"button-2":"button-1",me=h??g,te=v||!!P.disabled,z=te?E?"disabled-covered":R?"disabled-invisibled":$?"disabled-filled":"disabled":C,ne=z?`button--variant-${z}`:"",W=f?`button--align-${f}`:"",V=x?"button--nowrap":"",pe=Q?`button--shape-${Q}`:"",Ee=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,xe={...G?{width:typeof G=="number"?`${G}px`:G}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...A?{}:{"--button-border":te?"0":"1px solid transparent"},...Ee?{"--button-icon-color":Ee}:{},...H?{"--color-main":H}:{}},Ce=w===!1?"":me,ce=Array.isArray(Ce)?Ce.length>0:!!Ce,ge=!!d,be=r??(ce||c||ge?"bar":"dot"),he=`${U}--${be}`,Me=o.useRef(null);o.useEffect(()=>{!In||s!==void 0||Me.current?.closest("form")&&kt(`button-in-form:${typeof me=="string"?me:""}`,'[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 me=="string"&&me?` \uB2E8\uCD94: ${me}`:""))},[s,me]);const We=o.useRef(t);We.current=t;const Re=o.useCallback(Te=>{Me.current=Te;const it=We.current;typeof it=="function"?it(Te):it&&(it.current=Te)},[]),qe=o.useRef(te),[He,st]=o.useState(!!b),[lt,Qe]=o.useState(!1),[dt,Se]=o.useState(null),Ge=o.useCallback(()=>Qe(!1),[]),[Ne,Ie]=o.useState(!1),Je=o.useId();o.useEffect(()=>{typeof b=="boolean"&&st(b)},[b]),o.useEffect(()=>{if(qe.current&&!te&&Me.current){const Te=Me.current;let it=!1;try{it=Te.matches(":focus:not(:focus-visible)")}catch{it=!1}it&&Te.blur(),Te.style.pointerEvents="none";const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Me.current&&(Me.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(re)}qe.current=te},[te]);const nt=typeof b=="boolean"?!!b:He,Nt=typeof _=="boolean"?void 0:B||typeof b=="boolean"?nt?"true":"false":P["aria-pressed"],_t=ke("button",U,he,ne,W,V,pe,nt?"is-selected":null,D?null:"button--no-bg",Y?"button--tooltip-only":null,S),Lt=`button__icon button__icon--${I}`,et=Array.isArray(m)?m:m!==void 0?[m]:[],at=()=>{if(Array.isArray(Ce))return Ce.map((it,re)=>{const fe=et[re];return n.jsxs("span",{className:`button__label-text${fe!==void 0?" button__label-text--has-sub":""}`,children:[it,fe!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:fe})]},re)});const Te=m!==void 0;return n.jsxs("span",{className:`button__label-text${Te?" button__label-text--has-sub":""}`,children:[Ce,p!=null&&n.jsx("span",{className:"button__count",children:p}),Te&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Et=Te=>{typeof b!="boolean"&&!B&&st(!1),Te.currentTarget.blur()},wt=Te=>{te||(typeof P.onMouseLeave=="function"&&P.onMouseLeave(Te),Et(Te))},Tt=Te=>{if(Y&&rt&&ut.touchPress(Te.currentTarget),te){rt&&ut.touchPress(Te.currentTarget),Te.preventDefault(),M?.(Te);return}typeof b!="boolean"&&B&&st(it=>!it),F?.(Te)},Dt=o.useCallback(()=>{(X||O)&&(Qe(!0),Se(Me.current?.getBoundingClientRect()??null))},[X,O]),gt=o.useCallback(()=>{(X||O)&&(Qe(!1),Se(null))},[X,O]),rt=!!(X||O),ut=vo(lt,Te=>{Te?Dt():gt()},Me,{enabled:rt&&(te||Y),fallbackOnParent:rt&&te}),ye={...P};delete ye.disabled,delete ye.className,delete ye.faded,delete ye.useFaded,delete ye.loading,delete ye.onMouseLeave,delete ye.onPointerEnter,delete ye.onPointerLeave,delete ye.onPointerUp,delete ye.onFocus,delete ye.onBlur,te&&(Object.keys(ye).forEach(Te=>{/^on[A-Z]/.test(Te)&&typeof ye[Te]=="function"&&delete ye[Te]}),ye["aria-disabled"]="true"),k&&(ye["aria-busy"]="true");const Le=(typeof X=="string"?X:null)??(typeof Z=="string"?Z:null)??(typeof y=="string"?y:null)??(typeof me=="string"?me:null)??void 0,je=typeof y=="string"?y:typeof me=="string"?me:Le,Ze=O?[O.title,...O.items??[]].filter(Boolean).join(". "):X&&Le&&Le!==je?Le:"",Ue=[typeof P["aria-describedby"]=="string"?P["aria-describedby"]:void 0,Ze?Je:null].filter(Boolean).join(" ")||void 0,yt=()=>n.jsx("span",{className:`${Lt} button__spinner`,"aria-hidden":"true",children:n.jsx(da,{variant:"spinner",size:"100%"})}),bt=(Te,it)=>n.jsx(tt,{icon:Te,label:it??je,className:Lt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Bt=Te=>k?yt():bt(c,Te),pt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[Bt(),ce&&n.jsx("span",{className:`button__label ${se}`,children:at()})]}):f==="center"&&(c||k)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Bt()}),ce&&n.jsx("span",{className:`button__label ${se}`,children:at()})]}),ge&&n.jsx("span",{className:"button__right",children:bt(d)})]}):n.jsxs(n.Fragment,{children:[(c||k)&&n.jsx("span",{className:"button__left",children:Bt(y??me)}),ce&&n.jsx("span",{className:`button__label ${se}`,children:at()}),ge&&n.jsx("span",{className:"button__right",children:bt(d)})]}),vt=!!l&&!te;return n.jsxs(n.Fragment,{children:[n.jsxs(vt?"a":"button",{...ye,ref:Re,...vt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:te&&!M&&!Ne},className:_t,"aria-pressed":Nt,"aria-expanded":typeof _=="boolean"?_:P["aria-expanded"],"aria-controls":N??P["aria-controls"],"aria-label":je,"aria-disabled":te&&(vt||M||Ne)?!0:void 0,"aria-describedby":Ue,style:xe,onClick:Tt,onMouseLeave:wt,onPointerEnter:Te=>{ha(Te)||Dt(),!te&&typeof P.onPointerEnter=="function"&&P.onPointerEnter(Te)},onPointerLeave:Te=>{ha(Te)||gt(),!te&&typeof P.onPointerLeave=="function"&&P.onPointerLeave(Te)},onPointerUp:Te=>{te&&rt&&ut.touchPress(Te.currentTarget),!te&&typeof P.onPointerUp=="function"&&P.onPointerUp(Te)},onFocus:Te=>{Ie(!0),ma()||Dt(),!te&&typeof P.onFocus=="function"&&P.onFocus(Te)},onBlur:Te=>{Ie(!1),te||Et(Te),gt(),!te&&typeof P.onBlur=="function"&&P.onBlur(Te)},children:[pt(),Ze?n.jsx("span",{id:Je,hidden:!0,"aria-label":Ze}):null]}),lt&&O?n.jsx(Yn,{anchorRect:dt,title:O.title,items:O.items,onClose:Ge}):lt&&Le?n.jsx(Dn,{anchorRect:dt,text:Le,onClose:Ge}):null]})}const ve=o.forwardRef(vy);ve.displayName="Button";function Mt(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 Ia={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},_o=new WeakMap;function xo(e){if(e)return _o.get(e)}function Zt(e,t){e&&(e.style.setProperty(Ia.title,t.title),e.style.setProperty(Ia.description,t.description),_o.set(e,t))}function Xt(e){e&&(e.style.removeProperty(Ia.title),e.style.removeProperty(Ia.description),_o.delete(e))}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function ui(){const e=Mt(ii,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ci={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function di(){const e=Mt(ci,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function hi(){const e=Mt(pi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ci(){const e=Mt(mi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const fi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=Mt(fi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const gi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function yi(){const e=Mt(gi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const vi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function _i(){const e=Mt(vi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wi(){const e=Mt(xi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Bi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ai={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Ei={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Di(){const e=Mt(Ei,Zt,Xt);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 Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ji(){const e=Mt(Si,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ti={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Mi(){const e=Mt(Ti,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function $i(){const e=Mt(Li,Zt,Xt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const rn=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),_y=[rn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("soft","\uC18C\uD504\uD2B8","dark"),rn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),rn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),rn("warm","\uC6DC(\uAC15\uC870)","dark"),rn("dark","\uB2E4\uD06C","light"),rn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),rn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),rn("outline","\uC544\uC6C3\uB77C\uC778","dark"),rn("success","\uC131\uACF5/\uC644\uB8CC","light"),rn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),rn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ri={main:ui,soft:di,sub:hi,deep:Ci,softSub:bi,warm:yi,dark:_i,radial:wi,diagonal:ki,dots:Ni,outline:Di,success:ji,naver:Mi,instagram:$i};function Pi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=B=>Math.max(a,Math.min(r,Number(B))),u=B=>{try{const _=localStorage.getItem(B),N=_?Number(_):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=B=>{d(typeof B=="function"?_=>i(B(_)):i(B))},g=()=>m(B=>+(B+s).toFixed(6)),y=()=>m(B=>+(B-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),b=Math.round(x*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:b}}function Ii(e,t){const a=Pa(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",Fi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),xy=o.createContext(!1),Zn=[];let Oi=null;function wy(e){const t=o.useContext(xy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Zn.length===0&&(Oi=document.title);const a={text:Fi?`${e}${wo}${Fi}`:e};return Zn.push(a),document.title=a.text,()=>{const r=Zn.lastIndexOf(a);r>=0&&Zn.splice(r,1),document.title=Zn.length?Zn[Zn.length-1].text:Oi??document.title}},[e,t])}const Bo=[{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"}],By=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function pn(e,t){return By().compare(e,t)}const pr=new Map;function ky(e){const t=pr.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)),pr.size>5e3&&pr.clear(),pr.set(e,a),a}function Ay(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 Ny(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ay(h);return p!==null?[p]:ky(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=pn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:pn(r,s)}const zi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function hr(e,t,a){const r=zi(e),s=zi(t);if(r||s)return r===s?0:r?1:-1;const l=Ny(e,t);return a?l:-l}function Ey(e,t,a){const{t:r}=Be.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Bo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Bo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Bo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function Dy(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 d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>hr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const _n="\uC804\uCCB4";Object.fromEntries(Object.entries(rf).map(([e,{nucleus:t}])=>[e,t]));const Sy={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"})},jy={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"})},Ty={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 My(e,t){if("place"in t)return Sy[t.place](e);const a=jy[t.vowel](e);return t.glide?`${a} \xB7 ${Ty[t.glide](e)}`:a}const Ly=(e,{defaultValue:t})=>t,Wi=(e,t)=>({jamos:e,phonetic:t,tooltip:My(Ly,t)}),Sn=(e,t)=>t.map(a=>Wi([a],{place:e})),qt=(e,t,a)=>Wi([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[Sn("labial",["\u3142","\u3143","\u314D","\u3141"]),Sn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Sn("alveolar",["\u3145","\u3146"]),Sn("palatal",["\u3148","\u3149","\u314A"]),Sn("velar",["\u3131","\u3132","\u314B"]),Sn("glottal",["\u314E"])],jung:[[qt("\u3163","frontHigh"),qt("\u315F","frontHigh","w"),qt("\u3162","frontHigh","velar")],[qt("\u3161","backHighUnrounded")],[qt("\u315C","backHighRounded"),qt("\u3160","backHighRounded","j")],[qt("\u3154\u3150","frontMid"),qt("\u3156\u3152","frontMid","j"),qt("\u3159\u315A\u315E","frontMid","w")],[qt("\u3153","backMidUnrounded"),qt("\u3155","backMidUnrounded","j"),qt("\u315D","backMidUnrounded","w")],[qt("\u3157","backMidRounded"),qt("\u315B","backMidRounded","j")],[qt("\u314F","low"),qt("\u3151","low","j"),qt("\u3158","low","w")]],jong:[Sn("labial",["\u3142","\u3141"]),Sn("alveolar",["\u3137","\u3134","\u3139"]),Sn("velar",["\u3131","\u3147"])]},$y=e=>e===Ry?[]:Array.from(e),Ry="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Hi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Hi.jung.flat().forEach(({v:e})=>{for(const t of $y(e));}),new Set(Hi.cho.flat().map(e=>e.v));function Py(e,t=!0){const a=Pa(e);o.useEffect(()=>{if(t)return Kn(()=>{a.current?.()})},[t,a])}function Fa(){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 Iy(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,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Vi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Oa(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 za({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),d=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 g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const k=d.current?.offsetHeight??0;if(k!==g){if(g=k,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const f=k=>{const w=k.target;r&&w.closest?.(r)||c.current?.contains(w)||d.current?.contains(w)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const b=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},B=k=>{d.current?.contains(k.target)||(t==="reposition"?b():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",B,!0);const _=()=>{a==="reposition"?b():a==="close"&&l(!1)};let N=null;const v=()=>{_(),N&&clearTimeout(N),N=setTimeout(()=>{N=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",B,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",v)),N&&clearTimeout(N)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Kn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function Fy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,f]=o.useState([]),[x,b]=o.useState(null),[B,_]=o.useState(0),N=o.useRef(0),v=o.useCallback(I=>{N.current=typeof I=="function"?I(N.current):I,_(N.current)},[]),k=o.useRef(r),w=o.useRef(s);o.useEffect(()=>{k.current=r,w.current=s},[r,s]);const A=o.useRef([]),D=()=>{A.current.forEach(clearTimeout),A.current=[]},E=(I,q)=>{A.current.push(setTimeout(q,I))};o.useEffect(()=>()=>D(),[]);const R=u[d]?.id??null,$=o.useRef(null),G=o.useCallback(()=>{D(),m("playing"),f([]),b(null),v(0);let I=0;e.forEach((q,Q)=>{E(I,()=>{h(Q),y(q.id),k.current?.(q)}),E(I+1e3,()=>{y(null),f(H=>[...H,q.id])}),I+=1300}),E(I,()=>{m("done"),w.current?.({score:0,total:e.length})})},[e,v]),T=o.useCallback((I,q)=>{if(q>=I.length){m("done"),w.current?.({score:N.current,total:I.length});return}$.current=null,h(q),b(null),m("playing"),y(I[q].id),k.current?.(I[q]),E(l,()=>{y(null),m("waiting")})},[l]),F=o.useCallback(()=>{D();const I=La(e);c(I),v(0),f([]),T(I,0)},[e,T,v]),M=o.useCallback(()=>{t==="playback"?(c(e),G()):F()},[t,e,G,F]),X=o.useCallback(()=>{D(),m("idle"),y(null),f([]),b(null),h(0),v(0),c([])},[v]),Z=JSON.stringify(e.map(I=>[I.id,I.label,I.angleDeg,I.deg,I.row,I.shortcut]));o.useEffect(()=>(a?M():X(),()=>D()),[t,Z,a]);const O=o.useCallback(I=>{p!=="waiting"||t==="playback"||$.current===d||($.current=d,b(I),I===u[d]?.id&&v(q=>q+1),t==="exam"?(m("playing"),E(400,()=>T(u,d+1))):(m("feedback"),E(i,()=>T(u,d+1))))},[p,t,u,d,T,i,v]),Y=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:x,answerId:R,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:Y,score:B,phase:p,done:p==="done",start:M,reset:X}}const No=new Map,Eo=new Map,Oy=()=>()=>{},zy=()=>!0,Wy=()=>!1;function qi(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 Hy(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)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function Vy(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"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function qy(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Uy(e,t=!0){const a=o.useSyncExternalStore(Oy,zy,Wy)&&t&&e?qi(e)??No.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=qi(e)??No.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return qy(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 Gy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=fn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B),N=(v,k,w)=>{if(w!==void 0)B.style.setProperty(k,w),f.current[v]=!0;else if(f.current[v]){const A=_?.[v];A?B.style.setProperty(k,A):B.style.removeProperty(k),f.current[v]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B);y(_?.actionVariant??"main")},[p]);const x=ke("promo-banner",`promo-banner--${i}`,h),b=Ri[p];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(b,{}),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(ve,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Ky({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=Be.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),b=o.useRef(null),B=o.useRef(null),_=go(),N=p||g||C,v=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||_)return;const w=window.setInterval(()=>h(A=>(Math.min(A,c-1)+1)%c),t);return()=>window.clearInterval(w)},[c,t,N,_]);const k=w=>{b.current!=null&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>{b.current=null,f(!1)},w)};return o.useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current)},[]),o.useEffect(()=>{if(!C)return;const w=A=>{A.pointerType==="touch"&&(B.current&&B.current.contains(A.target)||(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!1)))};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[C]),c===0?null:n.jsxs("section",{ref:B,className:ke("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:w=>{x.current=w.pointerType},onPointerDown:w=>{x.current=w.pointerType,w.pointerType==="touch"&&(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!0))},onPointerUp:w=>{w.pointerType==="touch"&&k(5e3)},onPointerCancel:w=>{w.pointerType==="touch"&&k(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:w=>{let A=!0;try{A=w.target.matches(":focus-visible")}catch{A=!0}y(A)},onBlur:w=>{w.currentTarget.contains(w.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((w,A)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":A!==v,...A!==v?{inert:!0}:{},children:w},A))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[v]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((w,A)=>n.jsx("button",{type:"button",className:`top-banner__dot${A===v?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:A+1,defaultValue:`${c}\uAC1C \uC911 ${A+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":A===v,onClick:()=>h(A)},A))})]})}function Yy({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Be.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:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[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(tt,{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 Zy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(Yy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function Xy(){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 Jy(){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 Qy(){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 jt(e){const{t}=Be.useTranslation(),{type:a="bar",size:r,className:s="","aria-label":l,"aria-hidden":i}=e;if(a==="dot"){const{icon:N,number:v,position:k="top-right",onClick:w,animate:A=!1}=e,D=N??"check",E=v!==void 0?"number":D,R=typeof r=="number"?r:32,$=ke("circle-badge",`circle-badge--${E}`,`circle-badge--${k}`,`circle-badge--${R}`,A?"circle-badge--animate":"",w?"circle-badge--clickable":"",s),G=v!==void 0?t("badge.nthSelected",{n:v,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:$,onClick:w,onKeyDown:w?T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.currentTarget.click())}:void 0,"aria-label":i?void 0:l??G,"aria-hidden":i||void 0,role:w?"button":i?void 0:"img",tabIndex:w?0:void 0,children:[v!==void 0&&v,v===void 0&&D==="check"&&n.jsx(Xy,{}),v===void 0&&D==="remove"&&n.jsx(Jy,{}),v===void 0&&D==="minus"&&n.jsx(Qy,{})]})}const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=typeof r=="number"?"medium":r??"medium",f={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",x={small:12,medium:14,large:16}[C]??14,b=ke("badge",`badge--${d}`,`badge--${C}`,h!=="filled"?`badge--${h}`:"",f,s),B=y?.startsWith("--")?`var(${y})`:y,_=p!==void 0||B?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...B?{"--badge-color":B}:{}}:void 0;return n.jsxs("span",{className:b,style:_,"aria-label":i?void 0:l,role:l&&!i?"img":void 0,"aria-hidden":i||void 0,children:[m&&n.jsx(tt,{icon:m,size:x,className:"badge__icon"}),u??c,g&&n.jsx(tt,{icon:g,size:x,className:"badge__icon"})]})}function Wa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=Be.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const b of i){const B=x?.[b.ci]?.items?.[b.ii];if(!B||!Array.isArray(B.children)||!B.children.length)break;x=[{title:null,items:B.children}],f.push({title:B.label||null,columns:x})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let f=0,x=0;const b=()=>{const B=m.current?.querySelector("button:not([disabled])");if(B&&B.offsetParent){B.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(b))};return f=requestAnimationFrame(b),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,b)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(B=>[...B.slice(0,h),{ci:x,ii:b}]);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:[(c.length>1||d.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?n.jsx(ve,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((f,x)=>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((b,B)=>n.jsxs(o.Fragment,{children:[b.separatorBefore&&B>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(ve,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:b.label?"bar":"dot",icon:b.selected?"check":b.icon||"none",rightIcon:Array.isArray(b.children)&&b.children.length?"chevron-right":b.badgeCount?n.jsx(jt,{type:"dot",position:"inline",number:Math.min(b.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:b.label,ariaLabel:b.label&&b.badgeCount&&b.badgeCount>0?s("nav.badgeLabel",{label:b.label,count:b.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):b.label,onClick:()=>C(b,x,B),selected:b.selected,disabled:b.disabled,showTooltipInfo:b.tooltip||!1,useBorder:!1,align:"left"})]},B))})]},x))})]})}const Ui=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ui);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&kt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ui}) \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 So=52,mr=10,Gi=e=>e&&e>0?e:0;function Ki({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Be.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const I=p.current;if(!I)return;const q=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(I):null,P=I.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),L=I.querySelector(".bottom-nav__left"),U=L?.nextElementSibling,ae=(L?.offsetWidth??0)+(L&&U?.classList.contains("bottom-nav__divider")?U.offsetWidth:0);g(Math.max(0,P-ae))};if(q(),typeof ResizeObserver>"u")return;const Q=new ResizeObserver(q);Q.observe(I);const H=I.querySelector(".bottom-nav__left");return H&&Q.observe(H),()=>Q.disconnect()},[s]);const C=So+1,f=I=>Math.max(0,Math.floor((I+mr)/(So+mr))),x=y*(So+mr)-mr<=m,b=m<=0||l.length===0&&x?y:Math.min(y,f(m-C)),B=m>0&&b<y,_=B?b:y,N=e.slice(0,_),v=e.slice(_),k=B||l.length>0,w=o.useCallback((I,q)=>({position:"fixed",bottom:window.innerHeight-I.top+8,right:window.innerWidth-I.right,zIndex:Oa(q)}),[]),A=o.useId(),{open:D,toggle:E,close:R,style:$,triggerRef:G,menuRef:T}=za({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),F=o.useCallback((I,q)=>q>0?u("nav.badgeLabel",{label:I,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):I,[u]),M=o.useCallback((I,q)=>q>0?u("nav.badgeInsideLabel",{label:I,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):I,[u]),X=o.useCallback(()=>s?.(c),[s,c]),Z=o.useMemo(()=>v.find(I=>!!I.key&&I.key===t)??l.find(I=>I.selected||I.key&&I.key===t),[v,t,l]),O=o.useMemo(()=>[{items:[...v.map(I=>({label:I.label,icon:I.icon,badgeCount:I.badgeCount,selected:!!I.key&&I.key===t,closeOnSelect:!0,disabled:I.state==="disabled",onClick:()=>{I.state!=="disabled"&&(I.key&&a&&(a(I.key),Do(i,"BottomNav")),R())}})),...l.map(I=>({label:I.label,icon:I.icon,badgeCount:I.badgeCount,selected:I.selected??(!!I.key&&I.key===t),closeOnSelect:!0,onClick:()=>{I.onClick?.(),R()}}))]}],[v,l,t,a,R]),Y=[...v,...l].reduce((I,q)=>I+Gi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"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(ve,{htmlType:"button",size:52,type:"dot",icon:d,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:N.map((I,q)=>{const Q=Gi(I.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(ve,{htmlType:"button",size:52,type:"dot",icon:I.icon,ariaLabel:F(I.label,Q),selected:!!I.key&&I.key===t,disabled:I.state==="disabled",className:"bottom-nav-item",onClick:()=>{I.key&&(a?.(I.key),Do(i,"BottomNav"))}}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})})]},I.key??`__slot-${q}`)})}),k&&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:G,className:"bottom-nav__slot",children:[n.jsx(ve,{htmlType:"button",size:52,type:"dot",icon:Z?.icon??"ellipsis",ariaLabel:M(Z?.label??u("nav.more","\uB354\uBCF4\uAE30"),Y),selected:!!Z,className:"bottom-nav-item",onClick:E,"aria-expanded":D,"aria-controls":D?A:void 0}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(Y,99),size:24})}),D&&un.createPortal(n.jsx("div",{id:A,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:T,children:n.jsx(Wa,{columns:O,onClose:R})}),document.body)]})})]})]})}function Yi(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 Zi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function e2(e){const{t}=Be.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(ve,{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"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(ve,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Zi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(jt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(ve,{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(ve,{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"}),c&&n.jsx(ve,{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"}),d&&n.jsx(ve,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Xi(e){const{t}=Be.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",x=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,b=o.useCallback(B=>{if(f)return;const _=B.detail>0;if(_)try{B.currentTarget.blur()}catch{}u?.(p,B.currentTarget,_)},[f,p,u]);return n.jsxs("button",{type:"button",className:x,onClick:b,"aria-label":typeof m=="string"?Zi(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(jt,{type:"dot",position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ji(e){const{t}=Be.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),x=o.useRef(null),[b,B]=o.useState(null);o.useEffect(()=>{const w=x.current;if(!w)return;let A=null;const D=()=>{const{scrollHeight:$,clientHeight:G,scrollTop:T}=w;if($<=G+1){B(O=>O===null?O:null);return}const F=Math.max(24,G/$*G),M=G-F,X=$-G,Z={top:Math.round(T/X*M),height:Math.round(F)};B(O=>O&&O.top===Z.top&&O.height===Z.height?O:Z)},E=()=>{if(typeof requestAnimationFrame>"u"){D();return}A===null&&(A=requestAnimationFrame(()=>{A=null,D()}))};D(),w.addEventListener("scroll",E,{passive:!0});const R=typeof ResizeObserver<"u"?new ResizeObserver(E):null;R?.observe(w);for(const $ of Array.from(w.children))R?.observe($);return()=>{A!==null&&cancelAnimationFrame(A),w.removeEventListener("scroll",E),R?.disconnect()}},[a]);const _=o.useRef(null),N=o.useCallback(w=>{const A=x.current;A&&(w.preventDefault(),_.current={y:w.clientY,top:A.scrollTop},w.currentTarget.setPointerCapture(w.pointerId))},[]),v=o.useCallback(w=>{const A=x.current,D=_.current;!A||!D||(A.scrollTop=D.top+(w.clientY-D.y)*(A.scrollHeight/A.clientHeight))},[]),k=o.useCallback(w=>{_.current=null,w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId)},[]);return n.jsxs("nav",{ref:x,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[b&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:b.top,height:b.height},onPointerDown:N,onPointerMove:v,onPointerUp:k,onPointerCancel:k})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(w=>!w.section&&(w.key||w.label)).map((w,A)=>n.jsxs(o.Fragment,{children:[w.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Xi,{item:w,active:!!w.key&&w.key===r,state:w.disabled?"disabled":void 0,onClick:(D,E,R)=>{if(w.disabled)return;if(w.href){if(Yi(w.href)&&window.open(w.href,"_blank","noopener,noreferrer"),R)try{E?.blur()}catch{}return}if(s?.(w.key),Do(y,"SideNav"),!R)return;try{E?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const G=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const T=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",T)};$.addEventListener("mouseenter",T)}}}})]},w.key??`side-nav__item-${A}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(Xi,{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(e2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var Cr='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>',jo='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>',t2='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 Qi({appMode:e}){const{t}=Be.useTranslation(),a=e==="manager",r=a?jo:Cr,s=t2;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 eu({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=Be.useTranslation(),f=fn("(max-width: 767px)"),x=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),b=o.useCallback($=>{const G=a?.find(T=>T.key===$);if(!G?.disabled){if(G?.href){Yi(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.($)}},[a,t]),B=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&$.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&$.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&$.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&$.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),$},[C,i,u,d,h,p,c,l]),_=o.useCallback(($,G)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Oa(G)}),[]),N=o.useId(),{open:v,toggle:k,close:w,style:A,triggerRef:D,menuRef:E}=za({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),R=o.useMemo(()=>[{items:B.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),w()}}))}],[B,e,w]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qi,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(ve,{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:k,"aria-expanded":v,"aria-controls":v?N:void 0}),!!u&&!!l&&l>0&&n.jsx(jt,{type:"dot",number:Math.min(l,99),size:24,"aria-hidden":!0}),v&&un.createPortal(n.jsx("div",{id:N,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:A,ref:E,children:n.jsx(Wa,{columns:R,onClose:w})}),document.body)]})]}),n.jsx(Ji,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),f&&n.jsx(Ki,{items:x,activeKey:e??void 0,onChange:b,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const n2=eu,a2=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tu(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 ca(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ca(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function r2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function o2(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||a2()}function s2(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 nu(e){return{type:e.type??r2(e),plan:o2(e),label:e.label,price:tu(e.price),originalPrice:tu(e.originalPrice),discountLabel:e.discountLabel}}var l2='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>',i2='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>',au='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 Xn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function u2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Xn.text,t.text),e.style.setProperty(Xn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Xn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Xn.text),e.style.removeProperty(Xn.sub),e.style.removeProperty(Xn.copyright),To.delete(e))}const ru={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function ou(e={}){const t=Mt(ru,jn,Tn);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("${au}")`}})]})}const su="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",Ca=240;var Ha='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 c2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},d2=100,p2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lu(e={}){const t=Mt(c2,jn,Tn),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:p2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*d2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${Ha}")`}})]})}const h2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},m2=100,C2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function f2(e={}){const t=Mt(h2,jn,Tn),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:C2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*m2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${au}")`}})]})}const b2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function g2(e={}){const t=Mt(b2,jn,Tn);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("${Ha}")`}})]})}const y2={Logo_SpeechEar_ko:{"":Cr,_mono:l2},Logo_SpeechEarManager_ko:{"":jo,_mono:i2}};function v2(e,t){if(e)return y2[e]?.[t??""]??void 0}const _2={speechear:Cr,manager:jo},x2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},iu=10;function w2(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 uu(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 B2(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===Vt.t("passCard.specialLabel");return r?n.jsx(g2,{}):s?n.jsx(f2,{}):n.jsx(lu,{})}return n.jsx(ou,{})}function cu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:f,originalPrice:x,discountLabel:b,onUse:B,onRefund:_,onDelete:N}){const{t:v}=Be.useTranslation(),k=t?nu(t):void 0,w=s??k?.type??"speechear",A=r??k?.plan??v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??k?.label,E=f??(a?k?.price:void 0),R=x??(a?k?.originalPrice:void 0),$=b??k?.discountLabel,G=o.useMemo(()=>{if(E)return null;const W=t?.durationDays??s2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:uu(i,v)}:null;const V=W*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&l){const Ce=new Date(l).getTime();if(Number.isNaN(Ce))return null;const ce=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),ge=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ra()),be=Math.round(ce&&ge?(Date.UTC(+ce[1],+ce[2]-1,+ce[3])-Date.UTC(+ge[1],+ge[2]-1,+ge[3]))/864e5:(Ce-Date.now())/864e5);pe=Math.max(0,u?be+1:be)*86400}else c==="expired"?pe=0:pe=V;const Ee=w2(pe),xe=Math.max(0,Math.min(100,Math.floor(Math.min(Ee,V)/V*100)));return c==="pending"&&xe>=100?null:{percent:xe,remainingLabel:c==="expired"?v("passCard.expired","\uB9CC\uB8CC\uB428"):uu(pe,v)}},[E,c,l,i,u,t?.durationDays,t?.code,v]),T=o.useRef(null),[F,M]=o.useState({}),[X,Z]=o.useState(null),O=!!(B||_||N),Y=o.useRef(!1),I=o.useRef(void 0),[q,Q]=o.useState(y);o.useLayoutEffect(()=>{Q(y)},[y]),o.useLayoutEffect(()=>{const W=T.current;W&&(p!==void 0&&W.style.setProperty("--pass-card-text",p),m!==void 0&&W.style.setProperty("--pass-card-sub",m),g!==void 0&&W.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const W=T.current;if(!W)return;const V=u2(W);if(!y){const pe=x2[w],Ee=c==="expired"?"_mono":V?.logoColor??"",xe=v2(pe,Ee);Q(xe)}},[d,y,w,c]);const H=W=>{const V=T.current;if(!V)return null;const{left:pe,top:Ee,width:xe,height:Ce}=V.getBoundingClientRect(),ce=(W.clientX-pe)/xe-.5;return{rotateX:-((W.clientY-Ee)/Ce-.5)*iu,rotateY:ce*iu}},S=(W,V)=>{const pe=V*-.7,Ee=W*.7+10,xe=20+(Math.abs(W)+Math.abs(V))*.4;return`${pe}px ${Ee}px ${xe}px rgba(0, 0, 0, 0.18)`},P=o.useCallback(W=>{if(ma())return;Y.current=!0,clearTimeout(I.current),I.current=setTimeout(()=>{Y.current=!1},200);const V=H(W);V&&M({transform:`perspective(800px) rotateX(${V.rotateX}deg) rotateY(${V.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(V.rotateX,V.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)"})},[]),L=o.useCallback(W=>{if(ma())return;const V=H(W);if(!V)return;const pe=Y.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";M({transform:`perspective(800px) rotateX(${V.rotateX}deg) rotateY(${V.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(V.rotateX,V.rotateY),transition:pe})},[]),U=o.useCallback(()=>{clearTimeout(I.current),Y.current=!1,M({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)"})},[]),ae=o.useCallback(()=>Z(null),[]),se=o.useMemo(()=>{const W=v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),V=A.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),pe=V.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?v("passCard.unitYear","\uB144"):v("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:V})},[A,v]),me=o.useMemo(()=>{const W=ca(E);if(!W)return null;const V=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!V)return n.jsx("span",{className:"h1",children:W});const[,pe,Ee,xe]=V;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Ee}),xe.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:xe.trim()})]})},[E]),te=o.useCallback(()=>{O&&Z(W=>{if(W)return null;const V=T.current?.getBoundingClientRect();if(!V)return null;const pe=50;return{left:V.left,right:V.right,width:V.width,height:V.height,x:V.x,y:V.y+pe,top:V.top+pe,bottom:V.bottom+pe}})},[O]),z=o.useCallback(W=>{O&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),te())},[O,te]),ne=[{items:[...B?[{label:v("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{B(),Z(null)},closeOnSelect:!0}]:[],..._?[{label:v("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),Z(null)},closeOnSelect:!0}]:[],...N?[{label:v("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),Z(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--${c}${O?" pass-card--clickable":""}`,style:F,onMouseEnter:P,onMouseMove:L,onMouseLeave:U,onPointerUp:W=>{W.pointerType==="touch"&&U()},onPointerCancel:W=>{W.pointerType==="touch"&&U()},onClick:te,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!X:void 0,children:[d??B2(w,A,D),!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??_2[w],className:"pass-card__logo",alt:w==="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:se}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?v("passCard.labeledPlan",{label:D}):v("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),E?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[R&&n.jsx("span",{className:"pass-card__price-original body-3",children:ca(R)}),me]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.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(vn,{anchorRect:X,onClose:ae,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:ne,onClose:ae,size:"small"})})]})}const k2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function A2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(k2,jn,Tn);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("${Ha}")`}})]})}const N2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function E2(e={}){const t=Mt(N2,jn,Tn);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("${Ha}")`}})]})}function D2(e,t){if(e){if(t==="manager_pro")return n.jsx(E2,{});if(t==="manager_standard")return n.jsx(A2,{});if(t==="manager_lite")return n.jsx(lu,{})}}function S2(e){const t=ca(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 j2(e){const{t}=Be.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(_),d=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>d(_)&&c(_.code)),p=_=>{const N=_.prices?_.prices[i]:_.price;return N?(s.tiers||[]).some(v=>!!v.badge&&v.originals?.[i]===N):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=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 N=C(_);return N==="\uBB34\uB8CC"||N===g||N==="0\uC6D0"||typeof N=="string"&&/\d/.test(N)&&!/[1-9]/.test(N)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB38\uC758"||N===y}),b=s.group==="org",B=b?"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(jt,{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((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),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((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(ve,{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 N=_.label||a,v=d(_),k=v||_.openPromo===!0,w=N.replace(/^오픈\s*특가\s*/,"")||a,A=_.prices?_.prices[i]:_.price,D=_.badge?k?`${r}
|
|
823
|
+
${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return p(_)?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:S2(A)})})]},_.id);const E=s.tier??(b?s.title:void 0),R=n.jsx(cu,{showPrice:!0,product:{type:B,code:_.code,name:w,label:E,price:A,originalPrice:_.originals?.[i]??void 0,discountLabel:D},bg:D2(b,s.id)}),$=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:R});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:$,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:R},_.id)})})})})]})}function T2({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 Mo='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 du={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function M2(){const e=Mt(du,jn,Tn);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("${Mo}")`}})})}const pu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function L2(e={}){const t=Mt(pu,jn,Tn);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("${Ha}")`}})]})}function hu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:ke("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 Va=(e,t,a)=>e+(t-e)*a;function $2({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:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:b=!1,shortcutAnchor:B="top-right",shortcutScale:_,scaleShortcut:N=!1}){const{t:v}=Be.useTranslation(),k=Math.max(0,Math.min(1,a)),w=t/2,A=110/300,D=.18,E=W=>t*(A+(W-1)*D),R=W=>{const V=E(W.row??1),pe=W.angleDeg*Math.PI/180;return{x:w+V*Math.cos(pe),y:w+V*Math.sin(pe)}},$=Math.max(...e.map(W=>W.row??1),1),G=t*.08,T=t*.1,F=t*.24,M=t-2*G,X=t-T-F,Z=t-F/2,O=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,V)=>W-V),[e]),Y=O.length,I=Math.max(68,Y>1?M/(Y-1):0),q=o.useMemo(()=>new Map(O.map((W,V)=>[W,V])),[O]),Q=W=>{const V=q.get(W.deg)??0,pe=w+(V-(Y-1)/2)*I,Ee=$>1?Math.min(68,X/($-1)):0,xe=Ee*($-1),Ce=T+(X-xe)/2,ce=$===1?T+X*.4:Ce+($-(W.row??1))*Ee;return{x:pe,y:ce}},H=W=>{const V=R(W),pe=Q(W);return{x:Va(V.x,pe.x,k),y:Va(V.y,pe.y,k)}},S={x:w,y:Va(w,Z,k)},P=Math.round(g*1.2),L=Math.round(Math.max(16,Math.min(80,g*.7))),U=[],ae=new Map;for(const W of e){const V=W.row??1;ae.has(V)||ae.set(V,[]),ae.get(V).push(W)}for(const[W,V]of ae.entries()){if(V.length<2)continue;const pe=[...V].sort((He,st)=>He.deg-st.deg),Ee=pe.map(He=>H(He)),xe=pe.map(He=>He.deg),Ce=xe[xe.length-1]-xe[0],ce=Ce/(xe.length-1),ge=360-Ce,be=pe.length>=3&&ce>0&&ge<=ce*1.5,he=Math.round(E(W)*1e3)/1e3,Me=(He,st,lt,Qe)=>{const dt=(st.angleDeg-He.angleDeg+540)%360-180;if(dt===0)return`L ${Qe.x} ${Qe.y}`;if(k===0)return`A ${he} ${he} 0 0 ${dt>0?1:0} ${Qe.x} ${Qe.y}`;const Se=(He.angleDeg+dt/2)*Math.PI/180,Ge={x:w+he*Math.cos(Se),y:w+he*Math.sin(Se)},Ne={x:(lt.x+Qe.x)/2,y:(lt.y+Qe.y)/2},Ie={x:Va(Ge.x,Ne.x,k),y:Va(Ge.y,Ne.y,k)},Je={x:2*Ie.x-Ne.x,y:2*Ie.y-Ne.y};return`Q ${Je.x} ${Je.y} ${Qe.x} ${Qe.y}`},We=be?[...pe,pe[0]]:pe,Re=be?[...Ee,Ee[0]]:Ee;let qe=`M ${Re[0].x} ${Re[0].y}`;for(let He=1;He<Re.length;He++)qe+=" "+Me(We[He-1],We[He],Re[He-1],Re[He]);U.push({key:`arc-${W}`,d:qe})}const se=o.useMemo(()=>new Set(s??[]),[s]),me=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],te=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return se.has(W.id)?"played":"idle"},z=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,ne=(W,V)=>{switch(W){case"played":case"correct":return n.jsx(Fs,{size:V});case"wrong":return n.jsx(Ys,{size:V});default:return n.jsx(Ks,{size:V})}};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:[k===0&&e.map(W=>{const{x:V,y:pe}=H(W);return n.jsx("line",{x1:S.x,y1:S.y,x2:V,y2:pe,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),U.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),b&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:P,height:P,left:S.x-P/2,top:S.y-P/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:P,height:P,left:S.x,top:S.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Fr,{size:L,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:P,height:P,left:S.x,top:S.y},children:n.jsx(Fr,{size:L,color:"currentColor",strokeWidth:1.5})}),e.map((W,V)=>{const{x:pe,y:Ee}=H(W),xe=te(W),Ce=z(W),ce={..._!==void 0||N?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:xe!=="idle"?10:1},ge=g,be=Math.round(Math.max(10,Math.min(56,ge*.38))),he=Math.round(Math.max(7,Math.min(18,ge*.2))),Me=Math.round(Math.max(10,Math.min(56,ge*.4))),We=y==="answered"&&(xe==="played"||xe==="correct"||xe==="wrong"),Re=y===!0||We,qe=!We;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ce,left:pe-ge/2,top:Ee-ge/2},children:[Ce&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${xe}`+(Ce==="once"?" sound-compass__pulse--once":""),style:{width:ge,height:ge,...Ce==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${xe}`,style:{width:ge,height:ge},"aria-label":me(xe)?`${W.label}, ${me(xe)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Re&&ne(xe,be),qe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?he:Me},children:V+1})]}),W.shortcut&&n.jsx(hu,{keys:W.shortcut,anchor:B,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function R2({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:ke("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function P2({orientation:e="horizontal",label:t,className:a=""}){const r=ke("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 mu({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 I2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=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(mu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const F2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function O2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=Be.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const b=p.current;b&&b.contains(document.activeElement)&&cr(b),h(!0),l?.()},[l]);if(d)return null;const g=ke("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:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(tt,{icon:F2[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 z2={ready:"search",guide:"info",error:"circle-alert"};function W2(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 H2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??z2[e],u=ke("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?W2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(tt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function qa({title:e,items:t}){const{t:a}=Be.useTranslation(),{anchorRect:r,openAt:s,close:l}=Fa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(ve,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ha(c)||s(c.currentTarget)},onPointerLeave:c=>{ha(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ma()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Yn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function V2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=Be.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=p())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=p(),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===d);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===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,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 q2={xs:12,sm:16,md:20,lg:28,xl:36};function U2(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 G2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=Be.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?U2(t):"",h=!!e&&!c,p=!h&&!!d,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&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(tt,{icon:"user-round",size:q2[a],className:"avatar__icon"})]})}function K2(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 Y2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Be.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=v=>{if(!v||v.length===0)return;const k=Array.from(v).filter(A=>K2(A,t));if(k.length===0)return;const w=a?k:k.slice(0,1);if(l===void 0){const A=a?[...y,...w]:w;g(A),e?.(A)}else e?.(w)},f=v=>{v.preventDefault(),!r&&p(!0)},x=v=>{v.preventDefault(),p(!1)},b=v=>{v.preventDefault(),p(!1),!r&&C(v.dataTransfer.files)},B=v=>{const k=v.target;try{C(k.files)}finally{k.value=""}},_=()=>{r||d.current?.click()},N=v=>{if(!r&&(i?.(v),l===void 0)){const k=y.filter((w,A)=>A!==v);g(k),i||e?.(k)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:ke("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:b,children:[n.jsx(tt,{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:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:B,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((v,k)=>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:()=>N(k),children:n.jsx(tt,{icon:"x",size:14})})]},`${v.name}-${k}`))})]})}function Z2({items:e,className:t=""}){const{t:a}=Be.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(tt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const X2={small:14,medium:20,large:28};function J2({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Be.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=X2[s],y=v=>{v!==e&&t?.(v)},C=v=>{c||y(v)},f=v=>{c||ma()||h(v)},x=o.useRef(null),b=v=>{const k=Math.min(a,Math.max(1,v));y(k),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(w=>w.dataset.star===String(k))?.focus()},B=v=>{if(!c){switch(v.key){case"ArrowRight":case"ArrowUp":b((p||0)+1);break;case"ArrowLeft":case"ArrowDown":b((p||1)-1);break;case"Home":b(1);break;case"End":b(a);break;default:return}v.preventDefault()}},_=p>=1&&p<=a?Math.round(p):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:B,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:v=>{v.pointerType==="touch"&&N()},onPointerCancel:v=>{v.pointerType==="touch"&&N()},children:Array.from({length:a},(v,k)=>{const w=k+1,A=Math.max(0,Math.min(1,m-k)),D=A>0&&A<1,E=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(tt,{icon:"star",size:g,className:"rating__star rating__star--empty"}),A>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${A*100}%`}:void 0,children:n.jsx(tt,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:E},w):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===w,"aria-label":u("rating.starLabel",{n:w}),"data-star":w,tabIndex:w===_?0:-1,onClick:()=>C(w),onMouseEnter:()=>f(w),children:E},w)})})}const Q2=20,ev=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function tv({value:e,onChange:t,palette:a=ev,size:r=40,className:s="",ariaLabel:l}){const{t:i}=Be.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(tt,{icon:"check",size:Q2,className:"color-picker__check"})},u)})})}function Cu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Be.useTranslation(),d=u==="small",h=ke("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const w=r&&typeof r=="object"?{...r}:{};return!s&&!l?w:{...w,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[b,B]=o.useState(null);o.useLayoutEffect(()=>{g&&B(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const w=A=>{const D=m.current;if(!D)return;const E=A.target;E&&!D.contains(E)&&y(!1)};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[g]);const _=o.useCallback(()=>{i&&y(!0)},[i]),N=o.useCallback(()=>{i&&y(!1)},[i]),v=o.useCallback(()=>y(!1),[]),k=o.useCallback(w=>{if(w.key==="Escape"){y(!1);return}(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),y(A=>!A))},[]);return n.jsxs("span",{ref:m,className:ke("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:N,onFocus:_,onBlur:N,onKeyDown:k,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":g,"data-tooltip-ignore":!0,children:[n.jsx(tt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&f&&n.jsx(Dn,{anchorRect:b,text:typeof f=="string"?f:void 0,offset:8,onClose:v,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Wn=null;function Ua(e){if(Wn&&Wn!==e)try{Wn()}catch{}return Wn=e,()=>{Wn===e&&(Wn=null)}}function fr(e){if(Wn===e){Wn=null;try{e()}catch{}}}function Ga(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){kt("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 nv(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 av(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=nv(e,t),x=`${C.join(",")}|${f??""}`,b=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const N=[],v=[];for(const k of C)try{const w=xl(k,f);if(!w){N.push("");continue}let A=null;try{A=await wl(w)}catch{}if(!A)try{const D=await Bl(w);D&&(A=URL.createObjectURL(D),v.push(A))}catch{}N.push(A??"")}catch{N.push("")}_?v.forEach(k=>{try{URL.revokeObjectURL(k)}catch{}}):(y.current.forEach(k=>{try{URL.revokeObjectURL(k)}catch{}}),y.current=v,u({key:x,urls:N}))})(),()=>{_=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const B=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),d.current){h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!b.filter(Boolean).length)return;let N=null;const v=()=>{d.current=!1,N?.stop()};h.current=v;const k=Ua(v);d.current=!0,r(!0);for(let w=0;w<b.length&&d.current;w++){const A=b[w];if(A&&(l(w),N=Ga(A),c.current=N.el,!await N.done))break}k(),h.current===v&&(h.current=null,d.current=!1,r(!1),l(-1))},[b]);return o.useEffect(()=>()=>{h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:b,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:B}}const rv=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 Lo(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:b,size:B="square"}=e||{},{t:_}=Be.useTranslation(),[N,v]=o.useState(!1),k=o.useRef(null),[w,A]=o.useState(!1);o.useEffect(()=>{k.current?.matches(":hover")&&A(!0)},[]);const{playing:D,playingIndex:E,previewUrls:R,previewHover:$,setPreviewHover:G,previewBtnRef:T,handlePreview:F}=av(r,a?.key),M=o.useCallback(()=>{f?f():v(!0)},[f]),X=o.useCallback(()=>v(!1),[]),Z=o.useCallback(()=>A(!0),[]),O=o.useCallback(()=>A(!1),[]),Y=o.useCallback(()=>G(!0),[G]),I=o.useCallback(()=>G(!1),[G]),[q,Q]=o.useState(null);o.useLayoutEffect(()=>{$&&Q(T.current?.getBoundingClientRect()??null)},[$,T]);const[H,S]=o.useState(null);o.useLayoutEffect(()=>{w&&!N&&p&&S(k.current?.getBoundingClientRect()??null)},[w,N,p]);const P=o.useCallback(Ne=>{Ne.target===Ne.currentTarget&&(Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),M())},[M]),L=r||null,U=o.useMemo(()=>{if(!p)return null;const Ne=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ie=Ne&&Ne.length>0?Ne:rv(L);return Ie&&Ie.length>0?Ie:null},[p,h,L]),ae=o.useCallback(Ne=>{Ne.stopPropagation(),m?.()},[m]),se=o.useCallback(Ne=>Ne.stopPropagation(),[]),me=o.useCallback(Ne=>{typeof C=="function"&&C(Ne)},[C]),te=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!te&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Ii("speechear.popup.close",X);const ne=Kl(),W=`${a?.label||""} ${t+1}`,V=L?.title||L?.name||W;let pe=a?.icon,Ee,xe="",Ce="";try{const Ne=L?.category_0||L?.category_main_code||L?.category_main,Ie=L?.category_1||L?.category_sub_code||L?.category_sub,Je=ne.find(nt=>nt.key===Ne);Je?.icon&&(pe=Je.icon),!Ee&&Je?.color&&(Ee={"--t-item-fg":Je.color}),!Ee&&L?.iconColor&&(Ee={"--t-item-fg":L.iconColor}),xe=Je?_(`topic.${Je.key}`,{defaultValue:Je.label||""}):"";try{const nt=Je?.subs?.find(Nt=>Nt.key===Ie);Ce=nt?_(`topic.sub.${nt.key}`,{defaultValue:nt.label||""}):""}catch{}}catch{}const ce=Ce?`${xe} / ${Ce}`:xe||a?.label||V,ge=Ne=>_("training.countQuestions",{n:Ne,count:Ne}),be=Ne=>_("training.countSentences",{n:Ne,count:Ne});let he="";try{if(L)if(a?.key==="LISTEN_IN_NOISE"){let Ne=0;Array.isArray(L.items)&&L.items.length>0?Ne=L.items.length:Array.isArray(L.sentences)&&L.sentences.length>0?Ne=L.sentences.length:L.sentences&&(Ne=1),he=be(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(L?.questions)?Ne=L.questions.length:Array.isArray(L?.sentences)&&(Ne=L.sentences.length),he=ge(Ne)}else if(a?.key==="LONG_STORY"){let Ne=1;if(Array.isArray(L.items)&&L.items.length>0){const Ie=L.items.reduce((Je,nt)=>{const Nt=nt.questionItems;return Array.isArray(Nt)?Je+Nt.length:Array.isArray(nt.questions)?Je+nt.questions.length:Je},0);Ne=Ie>0?Ie:L.items.length}else Array.isArray(L.questions)&&L.questions.length>0?Ne=L.questions.length:Array.isArray(L.sentences)&&L.sentences.length>0&&(Ne=L.sentences.length);he=ge(Ne)}else if(a?.key==="ORDERING_SENTENCE"){let Ne=1;Array.isArray(L.items)&&L.items.length>0?Ne=L.items.length:Array.isArray(L.sentences)&&L.sentences.length>0&&(Ne=L.sentences.length),he=be(Ne)}else Array.isArray(L.items)&&(he=L.items.length>0?ge(L.items.length):"")}catch{}const Me=B==="row",We=B==="list"||Me,Re=B==="compact",qe=B==="small",He=qe&&a?.key?Of().find(Ne=>Ne.key===a.key):void 0,st=He?Yl[He.key]:void 0,lt=He?st?_(`trainingType.${st}.title`,{defaultValue:He.label}):He.label??"":"",Qe=y&&a?.label&&a.label!==String(V)?String(a.label):qe&<&<!==String(V)?lt:"",dt=!!Qe,Se=b!==void 0?b:he,Ge=[Qe,typeof V=="string"?V:"",Se].map(Ne=>String(Ne??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:k,className:`training-block-button${We?" training-block-button--list":""}${Me?" training-block-button--row":""}${Re?" training-block-button--compact":""}${qe?" training-block-button--small":""}${te?" training-block-button--completed":""}${z?" training-block-button--selected":""}${dt&&!qe?" training-block-button--withType":""}${qe&&!dt?" training-block-button--no-type-label":""}`,onClick:M,onPointerEnter:Z,onPointerLeave:O,role:"button",tabIndex:0,onKeyDown:P,"aria-label":typeof s=="string"?s:Ge||void 0,title:!p&&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(V)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),qe&<&<!==String(V)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:lt}),n.jsx(Cu,{icon:pe,label:V,tooltip:ce,wrapperStyle:Ee,iconSize:qe||Re?"small":"medium"}),!g&&(te||z)&&!(m&&w)&&n.jsx(jt,{className:m?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":te?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(jt,{className:`training-block-button__remove${w?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":_("common.remove","\uC81C\uAC70"),onClick:ae}),n.jsx("div",{className:`training-block-button__title ${Re?"body-3":qe?"body-3b":"h3"}`,children:String(V)}),n.jsxs("div",{className:"training-block-button__description",children:[Se?n.jsx("div",{className:`training-block-button__count ${qe?"caption-2":"caption-1"}`,children:Se}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(tt,{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:qe?12:20})})]}),(We&&!Me||qe)&&R.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:se,onPointerEnter:Y,onPointerLeave:I,children:n.jsx(ve,{htmlType:"button",size:qe?28:32,type:"dot",icon:D?"pause":"play",variant:qe?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(V).trim()?D?_("training.stopFor",{name:V,defaultValue:`${V} \uC815\uC9C0`}):_("training.previewFor",{name:V,defaultValue:`${V} \uBBF8\uB9AC \uB4E3\uAE30`}):D?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:F})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Ne=>{Ne.stopPropagation(),x(Ne)},children:n.jsx(ve,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(V).trim()?_("common.moreFor",{name:V}):_("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(Dn,{anchorRect:q,text:D?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:I}),w&&!N&&p&&(U?n.jsx(Yn,{anchorRect:H,items:U,activeIndex:E,onClose:O}):L?.subTitle?n.jsx(Dn,{anchorRect:H,text:L.subTitle,offset:8,onClose:O}):null),N&&i&&i({trainingData:L,typeKey:a?.key??"",onClose:X,onComplete:me,popupTitle:String(V),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:pe,popupIconTooltip:String(ce),popupWrapperStyle:Ee})]})}const fu=200;function ov(e){return e.itemId?(qf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function bu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=Be.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Gf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(ov).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:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):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:d})}),n.jsx("div",{className:le("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Lo,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(vn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const sv=200;function lv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=ke("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(g&&r&&s),b=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),B=o.useCallback(()=>{b(),y(null)},[b]),_=o.useCallback(()=>{!s||!r||(b(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},fu))},[s,r,b]),N=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},sv))},[]);return o.useEffect(()=>()=>{b()},[b]),o.useEffect(()=>{(!s||!r)&&B()},[s,r,B]),o.useEffect(()=>{if(!x)return;const v=w=>w instanceof Element&&(m.current?.contains(w)||!!w.closest(".training-tooltip")),k=w=>{v(w.target)?b():N()};return document.addEventListener("pointerover",k,!0),()=>document.removeEventListener("pointerover",k,!0)},[x,b,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?v=>{B(),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"?B():_()},onMouseEnter:c,onMouseLeave:v=>{N(),d?.(v)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(tt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(bu,{plan:r,anchorRect:g,onClose:B})]})}let Ka=0,gu="",$o="",Ya=0;function yu(){return vu(!1)}function iv(){return vu(!0)}function vu(e){const t=typeof document<"u";Ka===0&&t&&(gu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Ya===0&&($o=document.body.style.paddingRight),Ya++,document.body.style.paddingRight="0px"),Ka++;let a=!1;return()=>{a||(a=!0,Ka=Math.max(0,Ka-1),e&&t&&(Ya=Math.max(0,Ya-1),Ya===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Ka===0&&t&&(document.body.style.overflow=gu))}}function uv(){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 cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=Be.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const b=document.activeElement,B=yu(),_=g.current;return fo(_,b),_?.focus(),()=>{B();const N=document.activeElement;(!N||N===document.body||_&&_.contains(N))&&bo(b)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return Kn(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return mo(g,e),!e||typeof document>"u"?null:un.createPortal(n.jsx("div",{className:ke("dialog",d),onPointerDown:i?b=>{x.current=b.target===b.currentTarget}:void 0,onMouseDown:b=>{b.target===b.currentTarget&&b.preventDefault()},onClick:i?b=>{const B=x.current;x.current=!1,B&&b.target===b.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:ke("dialog__surface",`dialog__surface--${l}`,h),onClick:b=>b.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":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(uv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function dv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=Be.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:ke("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(p=>n.jsx("th",{scope:"col",className:ke("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.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??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:ke("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function pv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:ke("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 hv({groups:e,className:t=""}){return n.jsx("div",{className:ke("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 mv({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:ke("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 Cv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Pa(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 fv({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:ke("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 bv({items:e,className:t=""}){return n.jsx("ul",{className:ke("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))})}function _u(e){return typeof e=="string"?e:e.label}function xu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const E=e??"";return s===!1?a:E?typeof s=="function"?s(a,E):a.filter(R=>_u(R).toLowerCase().includes(E.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),x=y&&g.length===0?f.current:g;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const b=o.useCallback(()=>C(!0),[]),B=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||p(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<x.length?h:_<x.length?_:-1,v=o.useCallback(E=>{l?l(E):t?.(_u(E)),d(!1)},[t,l]),k=o.useCallback(()=>d(!0),[]),w=o.useCallback(()=>{d(!0),p(_)},[_]),A=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(E=>{E.nativeEvent.isComposing||E.keyCode===229||(E.key==="ArrowDown"?(E.preventDefault(),d(!0),p(R=>Math.min(x.length-1,(R<x.length?R:_)+1))):E.key==="ArrowUp"?(E.preventDefault(),p(R=>Math.max(_,(R<x.length?R:x.length)-1))):E.key==="Enter"?N>=0&&v(x[N]):E.key==="Escape"&&c&&(E.preventDefault(),d(!1)))},[x,N,c,v,_]);return{listId:u,open:c,activeIdx:N,filtered:x,handleFocus:k,handleBlur:A,handleInput:w,handleKeyDown:D,handleSelect:v,handleCompositionStart:b,handleCompositionEnd:B}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Jn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:x,maxLength:b,size:B=40,variant:_="input",fullWidth:N=!1,newline:v=!1,multiline:k=!1,rows:w=3,leftIcon:A,rightIcon:D,clearable:E=!1,list:R,showCount:$=!0,className:G="",onFocus:T,onBlur:F,onKeyDown:M,onEnter:X,inputMode:Z,autoComplete:O,autoFocus:Y,suggestions:I,filterSuggestions:q,onSelectSuggestion:Q,autoActiveFirst:H,openOnFocus:S=!1}=e,P=C||y?void 0:I,{t:L}=Be.useTranslation(),U=o.useId();!i&&!u&&kt(`TextField:unnamed:${U}`,"[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 ae=`tf-${U}`,se=`tf-helper-${U}`,me=o.useRef(null),te=xu({value:t??"",onChange:l,suggestions:P??[],openOnFocus:S,filterSuggestions:q,onSelectSuggestion:Q,autoActiveFirst:H}),z=!!P&&te.open&&te.filtered.length>0,ne=o.useRef(null),[W,V]=o.useState(null),pe=o.useCallback(()=>{const Se=ne.current;if(!Se||typeof window>"u")return;const Ge=Se.getBoundingClientRect(),Ne=230,Ie=window.innerHeight-Ge.bottom<Ne+8&&Ge.top>Ne+8;V({position:"fixed",left:Ge.left,width:Ge.width,...Ie?{bottom:window.innerHeight-Ge.top+8}:{top:Ge.bottom+8},zIndex:Oa(Se)})},[]);Ro(()=>{if(!z)return;pe();let Se=null;const Ge=()=>{if(typeof requestAnimationFrame>"u"){pe();return}Se===null&&(Se=requestAnimationFrame(()=>{Se=null,pe()}))},Ne=Ie=>{const Je=Ie.target;Je&&Je.nodeType===1&&Je.closest?.(".text-field__suggestions")||Ge()};return window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ge),()=>{Se!==null&&cancelAnimationFrame(Se),window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ge)}},[z,pe]);const Ee=o.useCallback(Se=>{me.current=Se,typeof s=="function"?s(Se):s&&(s.current=Se)},[s]),xe=p?`${p}${m??L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,Ce=t!==void 0,ce=Ce&&g==="password",[ge,be]=o.useState((a??"").length),he=Ce?(t??"").length:ge,Me=o.useRef(t);Ro(()=>{Me.current=t}),o.useEffect(()=>{const Se=me.current;if(!ce||!Se)return;const Ge=t??"";Se.value!==Ge&&(Se.value=Ge)},[ce,t]),o.useEffect(()=>{if(!v||!me.current)return;const Se=me.current;Se.style.height="",Se.scrollHeight>Se.clientHeight&&(Se.style.height=`${Se.scrollHeight}px`)},[t,ge,v]);const We=b!=null&&he>b,Re=B===32?16:20,qe=ke("text-field",`text-field--s${B}`,_==="display"?"text-field--display":"",N?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",A?"text-field--has-left-icon":"",D||E?"text-field--has-right-icon":"",G),He={id:ae,...ce?{}:Ce?{value:t}:{defaultValue:a},ref:Ee,placeholder:xe,name:r,disabled:y,readOnly:C,autoFocus:Y,maxLength:b,list:R,inputMode:Z,autoComplete:O,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[x||f?se:null,c].filter(Boolean).join(" ")||void 0,role:P?"combobox":void 0,"aria-autocomplete":P?"list":void 0,"aria-haspopup":P?"listbox":void 0,"aria-expanded":P?z:void 0,"aria-controls":z?te.listId:void 0,"aria-activedescendant":z&&te.activeIdx>=0?`${te.listId}-option-${te.activeIdx}`:void 0,onChange:Se=>{const Ge=Se.target;Ce||be(Ge.value.length),l?.(Ge.value),P&&te.handleInput(),ce&&queueMicrotask(()=>{const Ne=Me.current??"";Ge.value!==Ne&&(Ge.value=Ne)})},onCompositionStart:P?te.handleCompositionStart:void 0,onCompositionEnd:P?te.handleCompositionEnd:void 0,onFocus:(Se=>{T?.(Se),P&&te.handleFocus()}),onBlur:(Se=>{F?.(Se),P&&te.handleBlur()}),onKeyDown:(Se=>{const Ge=(Se.key==="Tab"&&!Se.shiftKey||Se.key===" ")&&!Se.nativeEvent.isComposing;if(p&&Ge&&!C&&!y&&!(Se.currentTarget.value??"").trim()){Se.preventDefault();const Ne=Se.currentTarget;Ce||(Ne.value=p,be(p.length)),l?.(p);return}P&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&te.activeIdx>=0?Se.preventDefault():X&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&(Se.preventDefault(),X()),M?.(Se),P&&te.handleKeyDown(Se)})},st=E&&!y&&!C&&he>0,lt=()=>v?n.jsx("textarea",{...He,className:"text-field__input text-field__input--auto body-2",rows:1}):k?n.jsx("textarea",{...He,className:"text-field__input text-field__input--textarea body-2",rows:w}):n.jsx("input",{...He,type:g,className:"text-field__input body-2"}),Qe=_==="display"&&!v&&!k&&!!xe,dt=()=>n.jsxs(n.Fragment,{children:[lt(),Qe&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:xe})]});return n.jsxs("div",{ref:ne,className:qe,children:[i&&n.jsxs("label",{htmlFor:ae,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[A&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(tt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:Re})}),dt(),b!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${We?" text-field__count--over":""}`,children:[he,"/",b]}),st&&n.jsx(ve,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:L("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Se=>{Se.preventDefault()},onClick:()=>{!Ce&&me.current&&(me.current.value="",be(0)),l?.("")},tabIndex:-1}),D&&!st&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(tt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Re})})]}),!!P&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:te.open&&(t??"").length>0&&te.filtered.length===0?L("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:un.createPortal(n.jsx("ul",{id:te.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:te.filtered.map((Se,Ge)=>n.jsx("li",{id:`${te.listId}-option-${Ge}`,role:"option","aria-selected":Ge===te.activeIdx,className:`text-field__suggestion body-2${Ge===te.activeIdx?" is-active":""}`,onMouseDown:Ne=>Ne.preventDefault(),onClick:()=>{te.handleSelect(Se),me.current?.focus()},children:typeof Se=="string"?Se:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Se.label}),Se.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Se.hint})]})},typeof Se=="string"?`${Se}-${Ge}`:Se.id))}),document.body)),(x||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:se,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}function bn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=Be.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((T,F)=>{const M=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...M?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Oa(F)}},[]),{open:x,setOpen:b,toggle:B,style:_,triggerRef:N,menuRef:v}=za({computeStyle:f}),[k,w]=o.useState(-1),A=o.useCallback(()=>w(-1),[]),D=e.find(T=>T.value===t);o.useEffect(()=>{if(x){const T=e.findIndex(F=>F.value===t);w(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const F=v.current;if(!F)return;const M=F.querySelectorAll(".dropdown__option")[T];M&&(F.scrollTop=Math.max(0,M.offsetTop-F.clientHeight/2+M.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&w(T=>{if(T>=0&&T<e.length)return T;const F=e.findIndex(M=>M.value===t);return F>=0?F:e.length?0:-1})},[x,e.length]);const E=o.useCallback(()=>{s||B()},[s,B]),R=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),b(!1))},[a,b,s,t]);o.useEffect(()=>{s&&b(!1)},[s,b]);const $=o.useCallback(T=>{if(!s){if(!x){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),b(!0));return}if(T.key==="Escape"){T.preventDefault(),b(!1);return}T.key==="ArrowDown"?(T.preventDefault(),w(F=>{let M=F+1;for(;M<e.length&&e[M].disabled;)M++;return M<e.length?M:F})):T.key==="ArrowUp"?(T.preventDefault(),w(F=>{let M=F-1;for(;M>=0&&e[M].disabled;)M--;return M>=0?M:F})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[k]?R(e[k]):b(!1))}},[s,x,e,k,R,b]),G=x?n.jsx("div",{ref:v,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:A,onMouseDown:T=>T.preventDefault(),children:e.map((T,F)=>n.jsxs("button",{id:`${g}-option-${F}`,type:"button",role:"option","aria-selected":T.value===t,className:ke("dropdown__option body-2",T.value===t?"dropdown__option--active":"",F===k?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:M=>M.preventDefault(),onClick:()=>R(T),onMouseEnter:()=>w(F),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:ke("dropdown",`dropdown--s${i}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:$,children:[n.jsxs("button",{ref:N,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?g:void 0,"aria-activedescendant":x&&k>=0?`${g}-option-${k}`:void 0,"aria-label":d,"aria-describedby":[d&&D?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:E,onBlur:T=>{x&&!v.current?.contains(T.relatedTarget)&&b(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.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"&&un.createPortal(G,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Po({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=Be.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:ke("pagination",l),children:[n.jsx(ve,{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),d)," / ",d]}),n.jsx(ve,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Za=new Map;function kn(e){const{t}=Be.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!In||p!=null&&p!=="")){if(Za.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Za.size>1){const _=[...Za.values()].sort();kt(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Za.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()=>{Za.delete(y)}}},[p,C,y]);const f=_=>{if(!g.length)return;const N=Math.max(0,g.findIndex(k=>k.key===r)),v=_==="first"?g[0]:_==="last"?g[g.length-1]:g[(N+_+g.length)%g.length];v&&(s(v.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(k=>k.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()},b=_=>{const N=v=>typeof v=="string"||typeof v=="number";if(!(!N(_.label)||_.count==null||_.count===!1||!N(_.count)))return`${_.label}, ${_.count}`},B=g.some(_=>_.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:ke("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"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":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(ve,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===B?0:-1,label:_.label,count:_.count,ariaLabel:b(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}function Io({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=Be.useTranslation(),d=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:ke("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,m)=>n.jsx(kn,{size:40,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Jn,{className:"toolbar__search",size:40,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((p,m)=>n.jsx(bn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(bn,{size:40,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(Po,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function wu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(wu).join(""):""}function gv(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
828
|
`)}const yv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),vv=/^(?: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 _v(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
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 d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(vv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&yv.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 g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function xv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=Be.useTranslation(),[u,c]=o.useState(!1),d=gv(wu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Pf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=_v(d,t),g=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(ge,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,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} ${g}`,children:y.content},C))})})]})}function Bu({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:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function ku({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:Ne("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.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 wv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=Be.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const b=p.current,k=g.current;if(g.current=c,c&&!k){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!b?.contains(_)?_:null}else!c&&k&&b&&b.contains(document.activeElement)&&cr(b,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const b=h.current;if(!b)return;const k=E=>{f.current=E,C(E)},_=()=>{const E=b.firstElementChild??b,D=Array.from(E.children);if(D.length<2){k(!1);return}const A=D[0].offsetTop,R=D.some(M=>M.offsetTop!==A);if(!f.current){x.current=b.clientWidth,R&&k(!0);return}if(R)return;const $=D[0],Y=D[D.length-1],T=Y.offsetLeft+Y.offsetWidth-$.offsetLeft,P=x.current;(P==null||T<=P)&&k(!1)};if(_(),typeof ResizeObserver>"u")return;const N=new ResizeObserver(_);N.observe(b);const v=b.parentElement;let B=v?.clientWidth??0;const w=new ResizeObserver(()=>{const E=v?.clientWidth??0;E!==B&&(B=E,x.current=null,_())});return v&&w.observe(v),()=>{N.disconnect(),w.disconnect()}},[l,e]),n.jsxs("div",{ref:p,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(Lt,{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(ge,{htmlType:"button",size:40,label:d,onClick:a}),t.map((b,k)=>n.jsx(ge,{htmlType:"button",size:40,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},k))]})]})}const Bv=[{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 kv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:Ne("item-actions",a),children:Bv.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(ge,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Au(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[g,y]=lo(t).split("-");return{y:+g,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 g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function br(e,t){return new Date(e,t+1,0).getDate()}function Av(e,t){return new Date(e,t,1).getDay()}function Xa(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Nv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Ev(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:Xa(a,r-1,s)}const Dv=1900;function Sv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Dv,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 Nu(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 jv({value:e,onChange:t,size:a=48,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=Be.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=lo(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:x,setViewYM:b}=Au(e,c),k=o.useId(),_=o.useCallback((z,ne)=>{const W=window.innerHeight,q=window.innerWidth,pe=typeof document<"u"?document.getElementById(k):null,Se=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,ve=Math.max(z.width,pe?.offsetWidth||0,260),Ce=W-z.bottom,de=z.top,fe=Ce<Se&&de>Ce,be=8,he=(Le,Fe)=>Math.min(Math.max(be,Le),Math.max(be,Fe));return{position:"fixed",left:he(z.left,q-ve-be),width:z.width,minWidth:260,...fe?{top:"auto",bottom:he(W-z.top+6,W-Se-be)}:{bottom:"auto",top:he(z.bottom+6,W-Se-be)},zIndex:Oa(ne)}},[k]),{open:N,setOpen:v,toggle:B,style:w,triggerRef:E,menuRef:D}=za({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!N)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(kn)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[N,D,E]);const[A,R]=o.useState(1),$=o.useRef(null),Y=o.useRef(null);o.useEffect(()=>{if(!N)return;const z=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;R(z)},[N]),o.useEffect(()=>{if(Y.current==null)return;const z=Y.current;Y.current=null,$.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{R(z=>Math.min(z,br(y,C)))},[y,C]);const T=o.useCallback(z=>{let ne=Xa(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[W,q,pe]=ne.split("-").map(Number);(W!==y||q-1!==C)&&b(W,q-1),R(pe),Y.current=pe},[r,s,y,C,b]),P=o.useCallback(z=>{const ne=new Date(y,C,A),W=pe=>{ne.setDate(ne.getDate()+pe),T(ne)},q=pe=>{const Se=ne.getFullYear()*12+ne.getMonth()+pe,ve=Math.floor(Se/12),Ce=Se-ve*12;T(new Date(ve,Ce,Math.min(ne.getDate(),br(ve,Ce))))};switch(z.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-ne.getDay());break;case"End":W(6-ne.getDay());break;case"PageUp":z.shiftKey?q(-12):q(-1);break;case"PageDown":z.shiftKey?q(12):q(1);break;default:return}z.preventDefault()},[y,C,A,T]),M=o.useCallback(z=>{l||(t(Xa(y,C,z)),v(!1))},[y,C,t,v,l]);o.useEffect(()=>{l&&v(!1)},[l,v]);const Z=z=>{const ne=Xa(y,C,z);return!!(r&&ne<r||s&&ne>s)},V=(()=>{const z=br(y,C);if(A>=1&&A<=z&&!Z(A))return A;for(let ne=1;ne<=z;ne++)if(!Z(ne))return ne;return-1})(),O=[];for(let z=0;z<Av(y,C);z++)O.push(null);for(let z=1;z<=br(y,C);z++)O.push(z);const te=a===64?20:a===40?16:18,I=Hl(h.language),U=z=>new Intl.DateTimeFormat(I,{year:"numeric"}).format(new Date(z,0,1)),Q=(z,ne)=>new Intl.DateTimeFormat(I,{month:"long"}).format(new Date(z,ne-1,1)),H=Sv(y,+g.slice(0,4),U,r,s),S=Nu(y,Q,r,s),F=z=>{const ne=Nu(z,Q,r,s);if(ne.length===0)return;const W=ne.some(q=>+q.value===C+1);b(z,W?C:+ne[0].value-1)},[L,G]=o.useState(null);o.useEffect(()=>{G(null)},[e]);const ae=o.useCallback(z=>{G(z);const ne=Ev(z);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[W,q]=ne.split("-");b(+W,+q-1)},[r,s,t,b]),se=o.useCallback(()=>{G(null)},[]),me=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),se(),v(!1)):z.key==="Escape"?(se(),v(!1)):z.key==="ArrowDown"&&!N&&(z.preventDefault(),v(!0))},[se,v,N]),X=N?cn.createPortal(n.jsxs("div",{ref:D,id:k,className:"date-picker__dropdown",style:w,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("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":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Os,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(yn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:H,value:String(y),onChange:z=>F(+z),size:40}),n.jsx(yn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(C+1),onChange:z=>b(y,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(zs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:$,onKeyDown:P,children:[m.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const W=Xa(y,C,z),q=W===e,pe=W===g,Se=Z(z),ve=ne%7;return n.jsx("button",{type:"button",disabled:Se,"data-day":z,tabIndex:z===V?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Se&&M(z),className:Ne("date-picker__day caption-1",q&&"date-picker__day--selected",pe&&!q&&"date-picker__day--today",Se&&"date-picker__day--disabled",ve===0&&"date-picker__day--sun",ve===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:Ne("date-picker",`date-picker--s${a}`,N&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:L??Nv(e),placeholder:p,onChange:z=>ae(z.target.value),onClick:()=>!l&&!N&&B(),onKeyDown:me,onBlur:se,disabled:l,"aria-haspopup":"dialog","aria-expanded":N,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&B(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":N,children:n.jsx(Zs,{size:te,className:"date-picker__icon",strokeWidth:1.5})})]}),X]})}function Tv({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?Ml(i.sms):Ml(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(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):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?`${jl}\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 ${jl}\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 Mv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Uy(e,i),c="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&&u?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:Vy(Hy(u),c)}}):n.jsx("img",{src:e,alt:t,className:Ne("brand-logo",a),style:r,draggable:!1})}function Eu({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:Ne("section-head-float",t),children:e})}function Fo({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))})}function Ja({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})}function Oo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:f,subRowAlign:x="start",className:b,inGrid:k=!1,children:_}){const{t:N}=Be.useTranslation(),v=o.useRef(null),{anchorRect:B,openAt:w,close:E}=Fa(),D=o.useCallback(()=>{m&&v.current&&w(v.current)},[m,w]),[A,R]=o.useState(!1);Ro(()=>{const S=v.current;if(!S||!u)return;const F=G=>R(G>0&&G<d);if(F(S.clientWidth),typeof ResizeObserver>"u")return;const L=new ResizeObserver(G=>F(G[0].contentRect.width));return L.observe(S),()=>L.disconnect()},[u,d]);const[$,Y]=o.useState(null),T=o.useCallback(()=>Y(null),[]),P=o.useCallback(S=>{const F=S.currentTarget.getBoundingClientRect();Y(L=>L?null:{left:F.left,right:F.right,top:F.top,bottom:F.bottom,width:F.width,height:F.height,x:F.x,y:F.y})},[]),M=!!u&&A;o.useEffect(()=>{M||Y(null)},[M]);const Z=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,F)=>F===0?{...S,separatorBefore:!0}:S)]:[],V=o.useCallback(S=>{if(!h)return;const F=S.target;F&&typeof F.closest=="function"&&F.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),O=o.useCallback(S=>{h&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},[h]),te=typeof l=="function"?l({collapsed:M}):l,I=g!=null||C?n.jsxs(Ja,{label:C,children:[g!=null&&n.jsx("span",{className:le("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:y})]}):null,U=te||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(M?n.jsx(ge,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:P}):n.jsx(An,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),te]}):null,Q=o.useId(),H=a?`h${a}`:"div";return n.jsxs("section",{ref:v,className:le(["chart-section",k&&"chart-section--grid",h&&"chart-section--clickable",b].filter(Boolean).join(" ")),onClick:h?V:void 0,onKeyDown:h?O:void 0,onPointerEnter:m?D:void 0,onPointerLeave:m?E:void 0,onFocus:m?D:void 0,onBlur:m?E:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Q:void 0,children:[m&&B&&n.jsx(Sn,{anchorRect:{left:B.left,top:B.top+21,right:B.right,bottom:B.bottom,width:B.width,height:B.height},text:m}),i&&n.jsx(Eu,{children:i}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:le("chart-section__icon")}),n.jsx(H,{id:Q,className:le(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),U,s&&n.jsx("div",{className:le("chart-section__disc body-3"),children:s})]}),(I||f)&&n.jsxs("div",{className:le(["chart-section__sub-row",x!=="start"&&`chart-section__sub-row--${x}`].filter(Boolean).join(" ")),children:[I,f]}),_,$&&n.jsx(xn,{anchorRect:$,onClose:T,ariaLabel:u?.ariaLabel??N("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:[{items:Z}],onClose:T,size:"small"})})]})}const Qa=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,zo=e=>Qa(e.getFullYear(),e.getMonth()+1);function fa(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 Wo=(e,t)=>`${e}#${t}`;function Nn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Lv(){const e=ua();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Nn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Nn(t,a))/7),l=Qa(t,a+1);return{monthKey:l,value:Wo(l,s)}}function $v(e){const t=ua(),a=zo(t),r=(c,d)=>Qa(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=Nn(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(f=>f.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((_,N)=>Math.max(_,N.parts?.length??0,N.partsB?.length??0),0),C=d.some(_=>_.partsB),f=new Array(g+1).fill(0),x=new Array(g+1).fill(0),b=Array.from({length:g+1},()=>new Array(y).fill(0)),k=Array.from({length:g+1},()=>new Array(y).fill(0));for(const _ of d){const N=_.date.getDate();if(f[N]+=_.a,x[N]+=_.b,_.parts)for(let v=0;v<y;v++)b[N][v]+=_.parts[v]??0;if(_.partsB)for(let v=0;v<y;v++)k[N][v]+=_.partsB[v]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:f,dayB:x,dayParts:b,dayPartsB:k})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:f}=d,x=h===t.getFullYear()&&p===t.getMonth(),b=t.getDate(),k=l.get(r(p===11?h+1:h,(p+1)%12)),_=d.partsLen,N=[];for(let B=1;B<=m;B++){const w=x&&B>b;N.push({label:String(B),...w&&g[B]===0&&y[B]===0?{future:!0}:{},a:w&&g[B]===0&&y[B]===0?-1:g[B],b:y[B],..._?{parts:C[B]}:{},..._&&d.hasPartsB?{partsB:f[B]}:{}})}const v=[];for(let B=Nn(h,p);B<=m;B+=7){const w=Math.max(0,B+6-m),E=w&&k?Math.max(_,k.partsLen):_,D=d.hasPartsB||!!(w&&k?.hasPartsB);let A=0,R=0;const $=new Array(E).fill(0),Y=new Array(E).fill(0);for(let P=B;P<=Math.min(B+6,m);P++){A+=g[P],R+=y[P];for(let M=0;M<_;M++)$[M]+=C[P][M],Y[M]+=f[P][M]}if(w&&k)for(let P=1;P<=w&&!i(k.year,k.month,P);P++){A+=k.dayA[P],R+=k.dayB[P];for(let M=0;M<k.partsLen;M++)$[M]+=k.dayParts[P][M],Y[M]+=k.dayPartsB[P][M]}const T=w?`${(p+1)%12+1}/${w}`:`${B+6}`;v.push({label:`${v.length+1}\uC8FC`,sublabel:`[${B}\uC77C~${T}\uC77C]`,a:A,b:R,...E?{parts:$}:{},...E&&D?{partsB:Y}:{}})}u[c]={weekly:v,daily:N}}return u}function Du(){const e=ua(),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:Qa(s,i),year:s,month:i})}return r.reverse()}Du();function Rv(){return Du()}function Su(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 ju(e){const{t,i18n:a}=Be.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Rv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of l){const A=new Date(D.year,D.month,0).getDate(),R=Nn(D.year,D.month-1),$=Math.ceil((A-R+1)/7);for(let Y=$-1;Y>=0;Y--)E.push({value:Wo(D.value,Y),monthKey:D.value,year:D.year,month:D.month,week:Y})}return E},[l]),u=o.useCallback(E=>`${so(t,a.language,E.year,E.month)} ${Su(t,E.week)}`,[t]),c=o.useMemo(()=>l.map(E=>({value:E.value,label:so(t,a.language,E.year,E.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),h=o.useMemo(()=>Lv(),[e]),p=o.useMemo(()=>l.find(E=>E.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(E=>E.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,f]=o.useState("");o.useEffect(()=>{l.find(E=>E.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(E=>E.value===C)||f(m)},[i,C,m]);const x=r==="month"?c:d,b=r==="month"?g:C,k=r==="month"?y:f,_=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),N=x.findIndex(E=>E.value===b),v=o.useCallback(()=>{const E=x.findIndex(D=>D.value===b);E<x.length-1&&k(x[E+1].value)},[x,b,k]),B=o.useCallback(()=>{const E=x.findIndex(D=>D.value===b);E>0&&k(x[E-1].value)},[x,b,k]),w=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:b,setRange:k,activeOptions:x,activeIdx:N,handlePrev:v,handleNext:B,periodOptions:w,monthRange:g,weekRange:C,weekRanges:i,DOW:_}}const Dt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Ln(e,t=!0){return e.future===!0||t&&e.a===-1}function Pv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const f=!a,x=!!(h&&h.length>0),b=y,k=o.useMemo(()=>x?Math.max(0,...e.filter(O=>!Ln(O,b==null)).map(O=>g?Math.max(0,...(O.parts??[]).map(Dt)):(O.parts??[]).reduce((te,I)=>te+Math.max(0,Dt(I)),0))):Math.max(0,...e.filter(O=>!Ln(O,b==null)).flatMap(O=>f?[Dt(O.a)]:[Dt(O.a),Dt(O.b)])),[e,f,x,g]),_=o.useMemo(()=>{if(b==null)return 0;const O=e.filter(te=>!Ln(te,b==null)).flatMap(te=>x?(te.parts??[]).map(Dt):f?[Dt(te.a)]:[Dt(te.a),Dt(te.b)]);return Math.max(0,...O.map(te=>Math.abs(te-b)))},[e,b,x,f]),N=o.useMemo(()=>{const O=b!=null?_:k;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[k,_,b,c,d]),v=u,B=x?g?Math.max(1,h.length):1:f?1:2,w={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(O*B)+6)))},[e.length,B,l])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(N/2);return b!=null?[b+N,...O!==N?[b+O]:[],b,...O!==N?[b-O]:[],b-N]:O!==N?[N,O,0]:[N,0]},[N,b]),A=O=>b!=null?1-(O-(b-N))/(2*N):1-O/N,[R,$]=o.useState(null),Y=o.useCallback(()=>$(null),[]),T=o.useCallback((O,te)=>{const I=[O.label,O.sublabel].filter(Boolean).join(" ");let U;if(x&&g&&O.rawPartsB)U=(p??[]).map((Q,H)=>{const S=O.rawPartsB[H]??0;return{text:S>0?`${Q}: ${te[H]??0}% (${O.rawParts?.[H]??0}/${S})`:`${Q}: -`,color:(h??[])[H]}});else if(x&&g)U=(p??[]).map((Q,H)=>({text:`${Q}: ${Z(te[H]??0)}`,color:(h??[])[H]}));else if(x){const Q=(p??[]).map((S,F)=>({text:`${S}: ${te[F]??0}`,color:(h??[])[F]})),H=Q.filter((S,F)=>(te[F]??0)>0);U=H.length?H:Q}else m&&!f?U=[{text:`${r} ${Dt(O.a)}%`,color:t},{text:`${s} ${Dt(O.b)}%`,color:a}]:m&&O.rawB!==void 0?U=[{text:`${m.total} ${O.rawB}`},{text:`${m.done} ${O.rawA??0}`,color:t}]:f?U=[{text:`${r}: ${Dt(O.a)}`,color:t}]:U=[{text:`${r}: ${Dt(O.a)}`,color:t},{text:`${s}: ${Dt(O.b)}`,color:a}];return{title:I,items:U}},[x,g,p,h,m,f,r,s,t,a,b]),P=o.useCallback((O,te,I)=>{const U=O.getBoundingClientRect(),{title:Q,items:H}=T(te,I);$({rect:{left:U.left,top:U.top,right:U.right,bottom:U.bottom,width:U.width,height:U.height},title:Q,items:H})},[T]),M=o.useCallback((O,te)=>{const{title:I,items:U}=T(O,te);return[I,...U.map(Q=>Q.text)].filter(Boolean).join(", ")},[T]),Z=O=>b!=null&&O>b?`+${O}`:`${O}`,V=R!=null;return o.useEffect(()=>{if(!V)return;const O=()=>$(null),te=I=>{const U=I.target;U&&typeof U.closest=="function"&&U.closest(".bar-chart__col")||$(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",te,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",te,!0)}},[V]),n.jsxs("div",{className:le("bar-chart__wrap"),style:E,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:v},children:[D.slice(0,-1).map((O,te)=>n.jsx("div",{className:le(`bar-chart__gridline${b!=null&&O===b?" bar-chart__gridline--baseline":""}`),style:{top:A(O)*v},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:O})},te)),e.map((O,te)=>{const I=Ln(O,b==null),U=v/2,Q=L=>b!=null?Math.min(U,Math.abs(Dt(L)-b)/N*U):Math.min(v,Math.max(0,Dt(L)/N*v)),H=I?0:Q(O.a),S=I?0:Q(O.b),F=(O.parts??[]).map(Dt);return n.jsx("div",{className:le(`bar-chart__col${g&&x?" bar-chart__col--group":""}`),style:{cursor:I?"default":"pointer"},tabIndex:C&&!I?0:void 0,role:C&&!I?"img":void 0,"aria-label":C&&!I?M(O,F):void 0,onMouseEnter:I?void 0:L=>P(L.currentTarget,O,F),onFocus:I||!C?void 0:L=>P(L.currentTarget,O,F),onBlur:C?Y:void 0,onMouseLeave:Y,children:!I&&(x&&g?(h??[]).map((L,G)=>{const ae=F[G]??0;if(b==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:Q(ae),background:L}},G);const se=Dt(ae)<b;return n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!se&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Q(ae),background:L}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:se&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Q(ae),background:L}})})]},G)}):x?n.jsx("div",{className:le("bar-chart__stack"),style:w,children:(()=>{const L=F.reduce((ae,se,me)=>se>0?me:ae,-1);let G=v;return F.map((ae,se)=>{if(ae<=0)return null;const me=Math.min(G,ae/N*v);return G-=me,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:me,background:(h??[])[se],borderRadius:se===L?"6px 6px 0 0":void 0}},se)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:Dt(O.a),c:t},...f?[]:[{v:Dt(O.b),c:a}]].map(({v:L,c:G},ae)=>n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:L>=b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Q(L),background:G}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:L<b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Q(L),background:G}})})]},ae))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:H,background:t}}),!f&&n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:S,background:a}})]}))},te)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((O,te)=>{const I=Ln(O,b==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${I?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[O.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},te)})})]})})}),R&&n.jsx(Yn,{anchorRect:R.rect,title:R.title,items:R.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Tu({control:e}){const{t}=Be.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="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(ge,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(yn,{value:s,onChange:l,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(ge,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(An,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:40})]})}function Ho(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[zo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Ln(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Iv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ua(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=fa(l),x=f?f.year:null,b=f?f.month1:null,k=x&&b?Nn(x,b-1):1;return C.weekly.map((_,N)=>{const v=N+1;let B=_.label,w=!1,E=!1;if(x&&b){const D=k+N*7,A=new Date(x,b-1,D+6),R=A.getMonth()+1,$=A.getDate(),Y=R===b?`${$}`:`${R}/${$}`;B=a("manager.chart.weekRange",{start:D,end:Y});const T=new Date(h,p-1,m).getTime();w=T>=new Date(x,b-1,D).getTime()&&T<=A.getTime(),E=x>h||x===h&&(b>p||b===p&&D>m)}return{..._,label:B,sublabel:Su(a,v-1),isToday:w,future:_.future===!0||E||void 0,a:E?-1:_.a,b:E?0:_.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,Nn(g.year,g.month-1)+g.week*7);return Ho(e,y,d,r).map(({dt:C,entry:f,isFuture:x})=>{const b=C.getMonth()+1,k=C.getDate(),_=C.getFullYear();return{label:b===g.month&&_===g.year?`${k}`:`${b}/${k}`,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&&b===p&&k===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const Fv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Ov({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:f="dayMean",tightMax:x=!1,avgMode:b=!1,totalFormat:k,series:_,seriesMode:N="stack",loading:v=!1,onDetail:B,headExtra:w,headSegment:E,icon:D,disc:A,onClick:R,cardAriaLabel:$,cardTooltip:Y,detailSize:T=32,barGap:P,baseline:M,className:Z,inGrid:V=!1}){const{t:O}=Be.useTranslation(),te=Fv[t],I=ju(l),U=g??I,Q=o.useMemo(()=>Iv(l,U,O,M==null),[l,U,O,M]),H=N==="group"&&!!_&&_.length>0;P!=null&&!H&&Et("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 S=o.useMemo(()=>{if(!C)return Q;const X=U.period==="month"?fa(U.monthRange):null,z=ua(),ne=_?.length??0,W=q=>{const pe=[],Se=[],ve=[];for(let Ce=0;Ce<ne;Ce++){let de=0,fe=0,be=0;for(const he of q){const Le=Dt(he.a[Ce]),Fe=Dt(he.b[Ce]);Fe<=0||(de+=Le,fe+=Fe,be+=Le/Fe*100)}pe.push(f==="weighted"?fe>0?Math.round(de/fe*100):0:q.length?Math.round(be/q.length):0),Se.push(de),ve.push(fe)}return{pct:pe,ra:Se,rb:ve}};return Q.map((q,pe)=>{let Se=q.a===-1?-1:q.b>0?Math.round(q.a/q.b*100):0;if(X&&!Ln(q)){const Ce=X.year,de=X.month1-1,fe=Ho(l,new Date(Ce,de,Nn(Ce,de)+pe*7),z).filter(be=>!be.isFuture);if(f==="weighted"){let be=0,he=0;for(const{entry:Le}of fe)Le&&Le.b>0&&(be+=Le.a,he+=Le.b);Se=he>0?Math.round(be/he*100):0}else Se=fe.length?Math.round(fe.reduce((be,{entry:he})=>be+(he&&he.b>0?he.a/he.b*100:0),0)/fe.length):0}let ve=null;if(H&&!Ln(q)){let Ce;if(X){const fe=X.year,be=X.month1-1;Ce=Ho(l,new Date(fe,be,Nn(fe,be)+pe*7),z).filter(he=>!he.isFuture).map(({entry:he})=>({a:he?.parts??[],b:he?.partsB??[]}))}else Ce=[{a:q.parts??[],b:q.partsB??[]}];const de=W(Ce);ve={parts:de.pct,rawParts:de.ra,rawPartsB:de.rb}}return{...q,a:Se,b:q.a===-1?0:d&&q.parts&&q.parts[1]>0?Math.round(q.parts[0]/q.parts[1]*100):0,rawA:q.a===-1?-1:q.a,rawB:q.b,...ve??{}}})},[Q,C,f,d,U.period,U.monthRange,l,H,_?.length]),F=o.useMemo(()=>{if(C||b){const z=(U.period==="week"?Q:l[U.monthRange]?.daily??[]).filter(W=>W.a!==-1);if(z.length===0)return 0;if(C&&f==="weighted"){let W=0,q=0;for(const pe of z)pe.b>0&&(W+=pe.a,q+=pe.b);return q>0?Math.round(W/q*100):0}const ne=C?z.reduce((W,q)=>W+(q.b>0?q.a/q.b*100:0),0):z.reduce((W,q)=>W+(q.a>0?q.a:0),0);return Math.round(ne/z.length)}const X=U.period==="month"?l[U.monthRange]?.daily??[]:S;return M!=null?X.reduce((z,ne)=>z+(Ln(ne,!1)?0:Dt(ne.a)+(d?Dt(ne.b):0)),0):X.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,Q,C,f,b,M,d,U.period,U.monthRange,l]),L=_&&_.length>0?_.map(X=>({color:X.color,label:X.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],G=t==="small",ae=[G?"chart-section--compact":t==="large"?"chart-section--full":void 0,Z].filter(Boolean).join(" ")||void 0,se=r?O(r):"",me=se?O("trainingStatus.detailFor",{name:se,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Oo,{className:ae,inGrid:V,icon:D,disc:A,onClick:R,ariaLabel:$,tooltip:Y,headSegment:E,headMenuItems:B?[{label:me,icon:"list",onClick:B,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:s,titleClassName:G?"h5 chart-section-title--small":void 0,headRight:G?w??void 0:({collapsed:X})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Tu,{control:U}),w,B&&!X&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(ge,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:me,showTooltipInfo:me,onClick:B})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||b||m&&k?n.jsx(Ja,{label:G?void 0:`${O(U.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(m??c)}`,children:k?(k(F).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((X,z)=>/\d/.test(X)?n.jsx("span",{className:le("chart-section__total__num h0"),children:X},z):n.jsx("span",{className:le("chart-section__total__unit h5"),children:X},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:F}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(p)})]})}):n.jsxs(Ja,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:F}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(c)}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(p)})]}):n.jsx("span",{}),n.jsx(Fo,{items:L,className:"caption-1"})]}),children:v?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:te.height},children:n.jsx(da,{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"}),S.some(X=>!!X.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Pv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??te.barWidth,barGap:P,baseline:M,height:te.height,maxOverride:C?100:void 0,tightMax:x,seriesColors:_?.map(X=>X.color),seriesLabels:_?.map(X=>X.label),rateLabels:C?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:H})})}const Mu=120,zv={left:38,right:16,top:26,bottom:24};function Wv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const M=V=>m(Math.round(V)||null);if(M(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(([V])=>M(V.contentRect.width));return Z.observe(g),()=>{Z.disconnect()}},[g]);const{payload:C,anchorRect:f,openAfterDelay:x,close:b}=Iy(Mu),k=o.useCallback((M,Z)=>{M&&x(M,Z.getBoundingClientRect())},[x]),_=p??i,N=l,{left:v,right:B,top:w,bottom:E}={...zv,...u},[D,A]=t,R=M=>A===D?v:v+(_-v-B)*(M-D)/(A-D),$=M=>w+(N-w-E)*(100-M)/100,Y={x:R,y:$,plot:{left:v,right:_-B,top:w,bottom:N-E,width:Math.max(0,_-v-B),height:Math.max(0,N-w-E)}},T=e.filter(M=>!M.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:Ne("line-chart",h),viewBox:`0 0 ${_} ${N}`,role:"img","aria-label":d??e.map(M=>M.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(M=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:v,x2:_-B,y1:$(M),y2:$(M)}),n.jsxs("text",{className:"line-chart__tick",x:v-6,y:$(M)+4,textAnchor:"end",children:[M,"%"]})]},M)),c?.(Y),a.map(M=>n.jsx("text",{className:"line-chart__tick",x:R(M.x),y:N-5,textAnchor:"middle",children:M.label},M.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:T.map(M=>`${R(M.x)},${$(M.pct)}`).join(" ")}),e.map(M=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:Z=>k(M.description,Z.currentTarget),onPointerLeave:b,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:R(M.x),cy:$(M.pct),r:12}),n.jsx("circle",{className:Ne("line-chart__dot-main",M.hollow&&"is-hollow"),cx:R(M.x),cy:$(M.pct),r:4,stroke:P,fill:M.hollow?void 0:P})]},M.x))]}),C!=null&&n.jsx(xn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function Hv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:Ne("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:Ne("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>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,p)=>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})]},p))]},d)),i&&n.jsx(ge,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Lu=(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")}`},$u=(e,t,a,r)=>({from:Vl(e,t,a),to:new Date(Vl(e,t,a+r).getTime()-1),fromYmd:Lu(e,t,a),toYmd:Lu(e,t,a+r-1)});function Vv(e,t=0){if(e.period==="month"){const s=fa(e.monthRange),l=ua(),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 $u(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Ra();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Nn(a.year,a.month-1);return $u(a.year,a.month-1,r+(a.week+t)*7,7)}const Vo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Ru(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Pu({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 d=typeof s=="number"?s:Vo[s].diameter,h=l??(typeof s=="number"?12:Vo[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((b,k)=>{const _=b.length>0?b[b.length-1].acc:0,N=Number.isFinite(k.ratio)?k.ratio:0,v=Math.max(0,Math.min(N,1-_));return b.push({color:k.color,rotate:-90+_*360,dash:g*v,acc:_+v}),b},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((b,k)=>b.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:b.color,strokeWidth:h,strokeDasharray:`${b.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${b.rotate} ${p} ${p})`},k))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,f=g-C;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Ru(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function qv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=Be.useTranslation();if(!e)return n.jsx(Pu,{...g});const C=(g.total??0)>0?Ru(Math.min((g.done??0)/g.total,1)):0,f=g.size==="small",x=typeof g.size=="number"?g.size:Vo[g.size??"medium"].diameter,b=g.size==="large",k=[c,f?"chart-section--compact":b?"chart-section--full":""].filter(Boolean).join(" ")||void 0,_=r&&n.jsx("span",{className:le("chart-section-icon"),children:n.jsx(tt,{icon:r,className:le("chart-section-icon-inner")})});return n.jsx(Oo,{className:k,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:_||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(Ja,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:C}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Fo,{items:i})]}),children:u?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:x,height:x},"aria-busy":"true",children:n.jsx(da,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Pu,{...g,hideCenter:g.hideCenter??f})})})}function Uv({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=Fa(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:le(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Sn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:le("stat-chart__card__label-row"),children:[n.jsx("span",{className:le("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:le("stat-chart__card__icon"),children:n.jsx(tt,{icon:s,className:le("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:le("stat-chart__card__content"),children:[n.jsxs("div",{className:le("stat-chart__card__left"),children:[n.jsx("div",{className:le("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:le(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:le("stat-chart__card__body"),children:u})]})]})}function Iu({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:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:b=!1,showFillTick:k=!1,tickStep:_,tickShape:N="dot"}){t&&!c&&Et("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)),B=r>a?(v-a)/(r-a):0,w=l==="vertical",E=!t,D=Q=>t?.(Number(Q.target.value)),A=typeof d=="number"?`${d}px`:d,R={"--slider-ratio":String(B),"--slider-thumb":`${i}px`,...A?w?{height:A}:{width:A}:{}},$=_??s,Y=(b||k)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(Y>0&&Y<=100){const Q=N!=="dash",H=ae=>Q?`radial-gradient(circle, ${ae} 0.5px, transparent 1px)`:w?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`,S=Q?"2px":"4px",F=[],L=[],G=[];for(let ae=0;ae<=Y;ae++){const se=ae*$/(r-a);if(se>1+1e-6)break;const me=`${((w?1-se:se)*100).toFixed(4)}%`,X=se<=B+1e-6;if(X?!k:!b)continue;const z=X?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";F.push(H(z)),L.push(w?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),G.push(w?`center ${me}`:`${me} center`)}F.push(w?"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))"),L.push("100% 100%"),G.push("0 0"),R.backgroundImage=F.join(", "),R.backgroundSize=L.join(", "),R.backgroundPosition=G.join(", "),R.backgroundRepeat="no-repeat"}const T=m?m(v):p==="percent"?`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`:p==="count"?`${v} / ${r}`:v===a&&f?f:v===r&&x?x:void 0,P=n.jsx("input",{type:"range",className:Ne("slider",`slider--${l}`,E&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:v,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":T,"aria-orientation":l,onChange:D,style:R});if(!p&&!C)return P;const M=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),Z=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),V=C?n.jsxs("div",{className:Ne("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[w?Z:M,P,w?M:Z]}):P;if(!p)return V;const O=g??(w?"bottom":"right"),te=`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`,I=m?m(v):p==="percent"?te:p==="count"?`${v} / ${r}`:String(v),U=n.jsx("span",{className:"slider-wrap__value body-3b",children:I});return n.jsxs("div",{className:Ne("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${O}`,`slider-wrap--align-${y}`,h),children:[V,U]})}const Gv=.86,Kv=250,qo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Uo=(e,t,a,r)=>{const s=qo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Go({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,b]=o.useState(null);o.useEffect(()=>{const v=P=>{const M=Uo(P,c,d,h);C.current&&(C.current.textContent=M);const Z=g.current;Z&&(Z.setAttribute("aria-valuenow",String(qo(P,c,d,h))),Z.setAttribute("aria-valuetext",M))},B=e??W1(t)??(x&&x.el===t?x.node:null),w=y.current;if(!B||!w){w?.style.setProperty("--meter-level","0"),v(u);let P=!1;return!e&&t&&rr(t).then(M=>{!P&&M&&b({el:t,node:M})}),()=>{P=!0}}to();const E=new Float32Array(B.fftSize);let D=0,A=0,R=0,$=0,Y=null;const T=P=>{const M=H1(B,E);D=M>D?M:D*Gv;const Z=D>1e-5?20*Math.log10(D):-1/0,V=Math.max(u,Z),O=V-c,te=Math.min(1,Math.max(0,(O-d)/(h-d)));if(w.style.setProperty("--meter-level",te.toFixed(3)),A+=V,R+=1,P-$>=Kv){const I=A/R;Y=Y==null?I:Y*.6+I*.4,v(Y),A=0,R=0,$=P}f.current=requestAnimationFrame(T)};return f.current=requestAnimationFrame(T),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,d,h]);const k=typeof r=="number"?`${r}px`:r,_=n.jsx("div",{className:"audio-meter__track",style:k?a==="vertical"?{height:k}:{width:k}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),N=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:Ne("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":qo(u,c,d,h),"aria-valuetext":Uo(u,c,d,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Uo(u,c,d,h)})]})}const Fu=260;function Ou({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),b=o.useRef(null),k=o.useRef(null),_=o.useRef(null),N=o.useRef(null),v=o.useRef(()=>{});v.current=E=>{E<0||(C.current=Date.now(),f.current=E,y.current=setTimeout(()=>{y.current=null,l(!1),b.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Fu)},E))};const B=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)))},[]),w=o.useCallback(()=>{x.current&&(x.current=!1,v.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)),e){if(d.current)return g>0&&!y.current&&(x.current?f.current=g:v.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)};const E=()=>{const D=h.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),k.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{E(),l(!0)})})),g>0&&(x.current=!1,v.current(g))}else l(!1),b.current=setTimeout(()=>u(!1),Fu);return p.current=e,()=>{y.current&&clearTimeout(y.current),b.current&&clearTimeout(b.current),k.current&&cancelAnimationFrame(k.current),_.current&&cancelAnimationFrame(_.current),N.current&&clearTimeout(N.current),y.current=null,b.current=null,k.current=null,_.current=null,N.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:B,resume:w}}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:d}=Ou({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=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:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(y,document.body):y}const Yv=24;function Zv({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=Yv?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),b={};return r&&(b["--progress-bar-fill"]=r),s&&(b["--progress-bar-track"]=s),n.jsxs("div",{className:Ne("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:b,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":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Xv="rgba(255, 255, 255, 0.16)";function Wu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Be.useTranslation(),d=gn("(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,p=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"]=Xv),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:p,children:[i&&n.jsx("span",{style:zu,children:p}),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 g=i?n.jsx("span",{role:"status",style:zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,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 Jv(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 Qv(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=Hu(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Hu(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function e4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Hu(parseInt(a[1],10)):1}function t4({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 Ko({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=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(da,{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?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function n4({dir:e}){return n.jsx(e==="asc"?Js:Xs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function a4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(n4,{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:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Vu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Yo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,size:b="small",title:k,icon:_,count:N,collapsed:v=!1,onToggleCollapse:B,headerActions:w,empty:E,loading:D,dragOver:A=!1,onDragOver:R,onDragLeave:$,onDrop:Y,renderExpandedRow:T,expandedId:P}){const{t:M}=Be.useTranslation(),Z=o.useId(),V=`table-title-${Z}`,O=`table-row-hint-${Z}`,[te,I]=o.useState(null),U=o.useCallback((re,_e)=>{const Pe=e[_e];if(!Pe)return;if(Pe.sortValue)return Pe.sortValue(re);if(Pe.sortKey)return re[Pe.sortKey];const Ge=l(re)[_e]?.content;return typeof Ge=="string"||typeof Ge=="number"?Ge:void 0},[e,l]),Q=!t&&a&&!e.some(re=>re.sortDir!==void 0||re.onClick),H=o.useCallback(re=>{const _e=e[re];if(!_e||_e.sortable===!1)return!1;if(_e.sortValue||_e.sortKey)return!0;const Pe=s[0];return Pe!==void 0&&U(Pe,re)!==void 0},[e,s,U]),S=o.useMemo(()=>t?e.map(re=>{if(!re.sortKey||re.sortDir!==void 0)return re;const _e=t.field(String(re.label??""),re.sortKey);return{...re,sortDir:_e.sortDir,onClick:re.onClick??_e.onClick}}):Q?e.map((re,_e)=>H(_e)?{...re,sortDir:te?.index===_e?te.asc?"asc":"desc":null,onClick:()=>I(Pe=>Pe?.index===_e?{index:_e,asc:!Pe.asc}:{index:_e,asc:!0})}:re):e,[e,t,Q,te,H]),F=o.useMemo(()=>{if(!Q||!te)return s;const{index:re,asc:_e}=te;return[...s].sort((Pe,Ge)=>hr(U(Pe,re),U(Ge,re),_e))},[s,Q,te,U]),L=gn("(max-width: 767px)"),G=y&&L?y:null,ae=C&&!L,se=o.useRef(ae);se.current=ae;const me=48,X=40,z=o.useRef(()=>me),ne=x?`table-cols:${x}`:null,W=o.useRef(null),q=o.useRef(null),pe=o.useRef(null),Se=o.useRef(null),[ve,Ce]=o.useState(!1),[de,fe]=o.useState(0),be=o.useCallback(()=>{const re=pe.current;if(!re)return;const _e=Se.current,Pe=W.current;if(_e&&(_e.style.minWidth="",Pe)){const Ge=Pe.scrollWidth,vt=se.current?X:0;_e.style.minWidth=Ge>re.clientWidth+1?`${Ge+vt}px`:""}Ce(re.scrollWidth>re.clientWidth+1),fe(re.clientWidth)},[]),he=o.useCallback((re,_e)=>{const Pe=re.current;Pe&&q.current&&q.current.unobserve(Pe),re.current=_e,_e?(!q.current&&typeof ResizeObserver<"u"&&(q.current=new ResizeObserver(()=>be())),q.current?.observe(_e)):!pe.current&&!Se.current&&(q.current?.disconnect(),q.current=null),be()},[be]),Le=o.useCallback(re=>he(pe,re),[he]),Fe=o.useCallback(re=>he(Se,re),[he]);o.useEffect(()=>{be()}),o.useEffect(()=>{if(typeof window>"u")return;const re=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>be()):null;return window.addEventListener("resize",be),()=>{re!=null&&cancelAnimationFrame(re),window.removeEventListener("resize",be)}},[be]);const $e=o.useRef(()=>!1),qe=o.useRef([]),He=o.useRef(null),it=re=>{if(!re||typeof window>"u")return null;try{const _e=JSON.parse(window.localStorage.getItem(re)??"null");return Array.isArray(_e)&&_e.length>0&&_e.every(Pe=>typeof Pe=="number"&&Number.isFinite(Pe)&&Pe>0)?_e:null}catch{return null}},[rt,Qe]=o.useState(()=>it(ne)),[ft,Ee]=o.useState(ne),[Ue,Ae]=o.useState(()=>it(ne)!==null);if(ft!==ne){Ee(ne);const re=it(ne);Qe(re),Ae(re!==null)}const Ve=o.useRef(rt);o.useEffect(()=>{Ve.current=rt},[rt]);const Je=o.useCallback(re=>{const _e=He.current;if(!_e)return;const Pe=Ve.current;if(Pe){const Ge=[...Pe],vt=()=>me;if(_e.next!=null&&_e.startWNext!=null){const st=re.clientX-_e.startX,Vt=Math.max(vt()-_e.startW,Math.min(_e.startWNext-vt(),st));Ge[_e.index]=_e.startW+Vt,Ge[_e.next]=_e.startWNext-Vt}else Ge[_e.index]=Math.max(vt(),_e.startW+(re.clientX-_e.startX));Ve.current=Ge,Qe(Ge)}},[]),ot=o.useCallback(()=>{if(He.current=null,window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",ot),window.removeEventListener("pointercancel",ot),document.body.style.cursor="",document.body.style.userSelect="",ne&&Ve.current)try{window.localStorage.setItem(ne,JSON.stringify(Ve.current))}catch{}},[Je,ne]),At=o.useCallback((re,_e)=>{_e.preventDefault(),_e.stopPropagation();const Pe=W.current;if(!Pe)return;const Ge=Array.from(Pe.children).map(st=>st.getBoundingClientRect().width),vt=f==="fit"?S.findIndex((st,Vt)=>Vt>re&&st.resizable!==!1):-1;He.current=vt>=0?{index:re,startX:_e.clientX,startW:Ge[re],next:vt,startWNext:Ge[vt]}:{index:re,startX:_e.clientX,startW:Ge[re]},Ve.current=Ge,Qe(Ge),Ae(!0),window.addEventListener("pointermove",Je),window.addEventListener("pointerup",ot),window.addEventListener("pointercancel",ot),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Je,ot,f,S]),_t=o.useCallback(()=>{const re=W.current,_e=re?.closest(".table-wrap");if(!re||!_e)return null;const Pe=_e.style.getPropertyValue("--table-grid-cols");_e.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Ge=Array.from(_e.querySelectorAll(".table-row")).filter(Nt=>!Nt.classList.contains("table-row--loading")&&!Nt.classList.contains("table-row--empty")),vt=Nt=>Array.from(Nt.children).map(kt=>{const pt=window.getComputedStyle(kt);return{width:kt.getBoundingClientRect().width,span:e4(pt.gridColumnStart,pt.gridColumnEnd)}}),st=parseFloat(window.getComputedStyle(re).columnGap)||0,Vt=Qv([vt(re),...Ge.map(vt)],S.length,st),Yt=S.map((Nt,kt)=>{const pt=Vt[kt],Tt=$e.current(kt)?parseFloat(qe.current[kt]):NaN;return Number.isFinite(Tt)&&Math.ceil(pt)>Tt&&Et(`table-fixed-col-overflow:${kt}:${Tt}`,`[ihabdevteam-core] Table \uC758 ${kt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Tt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(pt)}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(pt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Tt)?Tt:Math.max(z.current(kt),Math.ceil(pt))}),Xt=window.getComputedStyle(re),$t=re.clientWidth-(parseFloat(Xt.paddingLeft)||0)-(parseFloat(Xt.paddingRight)||0);Pe?_e.style.setProperty("--table-grid-cols",Pe):_e.style.removeProperty("--table-grid-cols");let zt=Yt;const sn=Yt.reduce((Nt,kt,pt)=>Nt+($e.current(pt)?kt:0),0),Ft=Yt.reduce((Nt,kt,pt)=>Nt+($e.current(pt)?0:kt),0),Cn=$t-sn;if($t>0&&Ft>0&&Cn>0){const Nt=Cn/Ft;zt=Yt.map((pt,Tt)=>$e.current(Tt)?pt:Math.max(z.current(Tt),Math.round(pt*Nt)));const kt=Math.round(Cn-zt.reduce((pt,Tt,ln)=>pt+($e.current(ln)?0:Tt),0));if(kt!==0){let pt=-1;zt.forEach((Tt,ln)=>{!$e.current(ln)&&(pt<0||Tt>zt[pt])&&(pt=ln)}),pt>=0&&(zt[pt]=Math.max(z.current(pt),zt[pt]+kt))}}return zt},[S,f]),It=(re,_e)=>re!==null&&re.length===_e.length&&re.every((Pe,Ge)=>Pe===_e[Ge]),et=o.useRef(_t);o.useEffect(()=>{et.current=_t});const[at,xt]=o.useState(0),Bt=F.length>0,St=`${ne??""}|${at}|${S.length}|${de}`,Pt=!Ue&&ae&&ne!==null&&!D?`${St}|${Bt?1:0}`:null,xe=o.useRef(null);o.useEffect(()=>{if(Pt===null||!Bt||xe.current===St)return;const re=et.current();re&&(xe.current=St,Qe(_e=>It(_e,re)?_e:re))},[Pt]);const Te=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}Ae(!1);const re=et.current();Qe(re),Ve.current=re,xt(_e=>_e+1)},[ne]);o.useEffect(()=>()=>{He.current&&(window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",ot),window.removeEventListener("pointercancel",ot),document.body.style.cursor="",document.body.style.userSelect="")},[Je,ot]);const Me=S.length>0&&S.every(re=>re.width!=null)?S.map(re=>typeof re.width=="number"?`${re.width}px`:String(re.width)).join(" "):null;S.some(re=>re.width!=null)&&!Me&&Et(`table-field-width:${S.map(re=>re.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."),Me&&g&&Et("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 We=g??Me??void 0,dt=Jv(We),ut=dt.filter(re=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(re));ut.length>0&&Et(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${ut.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: ${g})`);const ct=S.findIndex(re=>!!re.sortDir);S.filter(re=>!!re.sortDir).length>1&&Et("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 Ze=re=>re===ct?S[re].sortDir==="asc"?"ascending":"descending":S[re].onClick?"none":void 0,gt=re=>/^\d+(\.\d+)?px$/.test(dt[re]??""),jt=re=>{const _e=dt[re]??"",Pe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(_e)??/^(\d+(?:\.\d+)?)px$/.exec(_e);return Pe?parseFloat(Pe[1]):me};$e.current=gt,z.current=jt,qe.current=dt;const wt=re=>f==="fit"&&!gt(re)?"fr":"px",bt=rt&&rt.length===S.length&&!L,yt=G??(bt?S.map((re,_e)=>re.resizable===!1&&dt[_e]?dt[_e]:`${rt[_e]}${wt(_e)}`).join(" "):We),ke=yt?{"--table-grid-cols":yt}:void 0,nt=k!==void 0;return n.jsxs("div",{ref:Le,className:`table-wrap table-wrap--${b}${ae?" table-wrap--resizable":""}${A?" table-wrap--dragover":""}${v?" table-wrap--collapsed":""}`,style:ke,onDragOver:R,onDragLeave:$,onDrop:Y,tabIndex:ve?0:void 0,role:ve?"region":void 0,"aria-label":ve?typeof k=="string"?k:M("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:M("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Fe,role:"table","aria-labelledby":nt&&typeof k=="string"?V:void 0,className:"table body-2",children:[nt&&n.jsxs("div",{className:Ne("table-header",B&&"table-header--clickable"),onClick:B,role:"caption",children:[B&&n.jsx(ge,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:v?"chevron-right":"chevron-down",ariaLabel:v?M("common.expand","\uD3BC\uCE58\uAE30"):M("common.collapse","\uC811\uAE30"),ariaExpanded:!v,className:"table-header__chevron"}),_&&n.jsx(tt,{icon:_,label:typeof k=="string"?k:void 0,className:"table-header__icon"}),n.jsx("span",{id:V,className:"table-header__title h5b",children:k}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),w&&n.jsx("span",{className:"table-header__actions",onClick:re=>re.stopPropagation(),children:w})]}),!v&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((re,_e)=>n.jsx("div",{role:"columnheader","aria-colspan":re.span,className:Ne("table-field body-3",re.className),style:{gridColumn:`span ${re.span}`},children:re.label},_e))}),n.jsxs("div",{role:"presentation",className:Ne("table-fields-strip",ae&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:W,children:S.map((re,_e)=>n.jsx(a4,{onClick:re.onClick,className:Ne(re.className,Vu(re.align)),sortDir:re.sortDir,ariaSort:Ze(_e),onResizeStart:ae&&_e<S.length-1&&re.resizable!==!1&&(f!=="fit"||S.some((Pe,Ge)=>Ge>_e&&Pe.resizable!==!1))?Pe=>At(_e,Pe):void 0,children:re.label},_e))}),ae&&n.jsx(ge,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:Te})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Ko,{variant:"loading",colSpan:S.length||void 0}):F.length===0&&E?n.jsx(Ko,{variant:"empty",colSpan:S.length||void 0,children:E}):F.map((re,_e)=>{const Pe=m!=null&&re.id===m,Ge=!!i&&(u?u(re):!0),vt=P!=null&&re.id!=null&&(P instanceof Set?P.has(re.id)||[...P].some(st=>String(st)===String(re.id)):String(re.id)===String(P));return n.jsx(Ko,{className:`${Ge?" table-row--clickable":""}${h?" table-row--draggable":""}${Pe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ge?()=>i(re):void 0,colSpan:S.length||void 0,rowHasButton:l(re).some(st=>!!st.rowLabel),describedBy:O,onMouseEnter:c?st=>c(re,st):void 0,onMouseLeave:d?st=>d(re,st):void 0,onDragStart:h?st=>h(re,st):void 0,onDragEnd:p?st=>p(re,st):void 0,expandedContent:vt&&T?T(re):void 0,children:l(re).map((st,Vt)=>n.jsx(t4,{className:Ne(st.className,Vu(S[Vt]?.align)),style:st.style,span:st.span,rowLabel:Ge?st.rowLabel:void 0,onRowClick:Ge?()=>i(re):void 0,children:st.content},Vt))},re.id!=null?`${typeof re.id}:${re.id}`:`__idx:${_e}`)})})]})]})]})}const r4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function qu(e){return e?r4[e]??null:null}function Uu(e){switch(qu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Gu(e,t){const a=qu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Zo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=Wl(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 o4(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Ku(e,t){return t!=="wornAt"?String(e[t]??""):o4(e.wornYear,e.wornMonth,e.wornDay)}function s4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Be.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=Dy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((b,k)=>{if(f==="worn"){const _=Number(k.worn)-Number(b.worn);return x?_:-_}return hr(Ku(b,f),Ku(k,f),x)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Ey(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Io,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(ge,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Yo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:g.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(ku,{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:d(f.side)})},{content:f.device?n.jsx(Lt,{size:"small",variant:Uu(f.device),fill:"soft",label:Gu(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:Zo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(ge,{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 Yu(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 l4(e,t){return new Date(e,t+1,0).getDate()}function i4(e,t){return new Date(e,t,1).getDay()}function u4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=Be.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=lo(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const v={};return e.forEach(B=>{v[B.date]||(v[B.date]=[]),v[B.date].push(B)}),v},[e]),x=o.useMemo(()=>{const v=l4(d,p),B=i4(d,p),w=[];for(let E=0;E<B;E++)w.push(null);for(let E=1;E<=v;E++)w.push(E);for(;w.length<35;)w.push(null);return w},[d,p]),b=o.useCallback(()=>{p===0?(h(v=>v-1),m(11)):m(v=>v-1)},[p]),k=o.useCallback(()=>{p===11?(h(v=>v+1),m(0)):m(v=>v+1)},[p]),_=v=>`${d}-${String(p+1).padStart(2,"0")}-${String(v).padStart(2,"0")}`,N=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:b,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:k,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{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,B)=>{if(v===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${B}`);const w=v,E=_(w),D=f[E]??[],A=Wl(E,i.language),R=g===E;return n.jsxs("div",{className:`calendar-cell${N(w)?" today":""}${R?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(w)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(E)))}:void 0,onDragOver:a?$=>{$.preventDefault(),y(E)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||y(null)}:void 0,onDrop:a?$=>{$.preventDefault(),C.current!=null&&(a(C.current,E),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:w}),D.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),Y=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.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":`${A} ${Y}`,children:[$.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map(($,Y)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{C.current=$.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t($)}:void 0,...Yu(t?()=>t($):void 0),"aria-label":[A,$.time?Gl($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Gl($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??Y))})]},w)})]})]})}const c4={page:"h3",pagePopup:"h4",popup:"h5"};function ya({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=c4[e],p=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:Ne("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{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 Xo=null,Zu=!1;function Xu(){if(Zu||typeof document>"u")return;Zu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Xo="keyboard")},!0);const e=()=>{Xo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Xu();function gr(){return Xu(),Xo==="keyboard"}const yr=20;function d4(e){const{t}=Be.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,b]=o.useState(Math.min(f,yr)),k=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{b(Math.min(f,yr))},[f]),Ii("speechear.data.updated",()=>y(B=>B+1));const _=o.useRef(null),N=o.useRef(null);function v(){const B=document.activeElement;N.current=gr()&&B&&B.closest?.(".training-block__more")?x:null,b(w=>Math.min(f,w+yr))}return o.useEffect(()=>{const B=N.current;if(B==null)return;N.current=null;const w=document.activeElement;w&&w!==document.body||_.current?.querySelectorAll(".training-block-button")[B]?.focus()},[x]),n.jsxs(ya,{type:g,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((B,w)=>{const E=B;return n.jsx(Lo,{index:w,type:a,trainingData:E,depth:k,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?D=>m(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${w}`)})}),f>yr&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(ge,{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 p4(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 h4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??p4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(b=>b.width===f&&b.card===x?b:{width:f,card:x})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?Cf(l.width,c,e):0,h=d>0?ff(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:Ne("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function Jo(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 C4=m4,Qo=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:d=null},h){const{t:p}=Be.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,b]=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))&&b({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const k=o.useRef(null),_=gn("(max-width: 767px)"),[N,v]=o.useState(!1),[B,w]=o.useState(!1),E=`${typeof y=="string"?y:y?.src??""}\0${m}`,[D,A]=o.useState({for:"",url:""}),R=D.for===E?D.url:"",$=Fl(),Y=e.textOnly??(!e.image&&!!x.label&&!!$&&$.entries.length>0&&!$.byWord.has(x.label)),T=Y?"":ia()?.(x.label,x.homonum)??e.image??"",{imgRef:P,loading:M,hasImage:Z,onLoad:V,onError:O}=Jo(T);o.useEffect(()=>{let G=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){A({for:E,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const se=y.src;if(se){A({for:E,url:se});return}}}const ae=Da();if(ae&&m)try{const se=await Promise.resolve(ae(m));!G&&se&&A({for:E,url:se})}catch{}})(),()=>{G=!0}},[y,m,E]);const te=o.useRef(!0),I=o.useRef(null);o.useEffect(()=>(te.current=!0,()=>{te.current=!1,I.current&&fr(I.current),I.current=null;try{k.current?.pause()}catch{}k.current=null}),[]);const U=o.useCallback(()=>new Promise(G=>{if(typeof window<"u"&&window.speechSynthesis&&m){v(!0),window.speechSynthesis.cancel();const ae=new SpeechSynthesisUtterance(m);ae.lang="ko-KR",ae.onend=()=>{v(!1);try{a?.()}catch{}G()},ae.onerror=()=>{v(!1),G()},window.speechSynthesis.speak(ae)}else G()}),[m,a]),Q=o.useCallback(G=>{const ae=Ga(G,se=>{if(v(!1),se)try{a?.()}catch{}});return k.current=ae.el,ae.done},[a]),H=o.useCallback(async()=>{if(t||!te.current)return;const G=()=>{I.current===G&&(I.current=null);try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1)},ae=Ua(G);I.current=G;try{window.speechSynthesis?.cancel()}catch{}try{if(R&&(v(!0),await Q(R)))return;const se=ar();if(se&&m)try{w(!0);const me=await Promise.resolve(se(m));if(!te.current||I.current!==G||(w(!1),me&&(v(!0),await Q(me))))return}catch{}if(!te.current||I.current!==G)return;await U()}finally{I.current===G&&w(!1),ae(),I.current===G&&(I.current=null)}},[t,R,m,Q,U]);o.useImperativeHandle(h,()=>({play:()=>H()}),[H]);const S=G=>G.stopPropagation(),F=o.useCallback(G=>{if(G.stopPropagation(),!t){if(N){try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1);return}H()}},[t,N,H]),L=Ne("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:L,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?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" "||G.key==="Spacebar")&&(G.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:S,children:n.jsx(Lt,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("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:x.label}):Z?n.jsxs(n.Fragment,{children:[M&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:T,alt:x.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:M?0:1},onLoad:V,onError:O})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!Y&&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?S:void 0,children:n.jsx(ge,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:N?"pause":"play",label:_?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:B,onClick:F,disabled:t,ariaLabel:p("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("${C4}")`}})})]})})}),f4=260;function Hn(e){const{t}=Be.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:b=!0,className:k="",ariaLabel:_,useTitle:N=!0,inline:v=!1,size:B,layer:w="modal",height:E,fillBody:D=!1,resetScrollKey:A}=e||{},[R,$]=o.useState(!1),Y=o.useRef(!1),T=o.useRef(null),P=o.useId(),M=o.useRef(null);o.useEffect(()=>{},[v,a,_,k]),o.useEffect(()=>{A!==void 0&&M.current&&(M.current.scrollTop=0)},[A]);const[Z,V]=o.useState(!1);o.useEffect(()=>{const z=M.current;if(!z)return;const ne=()=>V(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(ne);W.observe(z);const q=z.firstElementChild;return q&&W.observe(q),()=>W.disconnect()},[i,A]),o.useEffect(()=>{if(!v)return yu()},[v]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(v)return;const z=O.current,ne=T.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(kn)??ne).focus(),()=>{const W=document.activeElement;(!W||W===document.body||ne&&ne.contains(W))&&bo(z)?.focus?.()}},[v]),mo(T,!v);const te=o.useRef(!0),I=go(),U=o.useRef(null);o.useEffect(()=>(te.current=!0,()=>{te.current=!1,U.current&&(clearTimeout(U.current),U.current=null)}),[]);const Q=o.useCallback(()=>{!te.current||!Y.current||(Y.current=!1,$(!1))},[]),H=o.useCallback((z,ne=!1)=>{if(ne&&!te.current||Y.current)return;Y.current=!0,$(!0);const W=setTimeout(()=>{U.current===W&&(U.current=null);let q;try{q=z?z():void 0}catch{Q();return}q&&typeof q.then=="function"&&q.then(()=>{setTimeout(Q,120)},Q)},I?0:f4);ne&&(U.current=W)},[Q,I]),S=o.useCallback(()=>{f||x&&x()===!1||H(C,!0)},[H,C,f,x]),F=o.useRef(S);o.useEffect(()=>{F.current=S});const L=!v&&!!C;o.useEffect(()=>{if(L)return Kn(()=>F.current())},[L]);const G=L&&b,ae=o.useRef(!1),se=z=>{ae.current=z.target===z.currentTarget},me=z=>{const ne=ae.current;ae.current=!1,ne&&z.target===z.currentTarget&&S()},X=n.jsx("div",{className:`popup ${v?"popup--inline":""} ${w==="belowPagePopup"?"popup--below-page-popup":""} ${R?"popup--closing":""} ${k}`,onPointerDown:G?se:void 0,onClick:G?me:void 0,onMouseDown:v?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${B?` popup-panel--${B}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:v?void 0:"dialog","aria-modal":v?void 0:!0,"aria-labelledby":!v&&N&&a?P:void 0,"aria-label":!v&&!(N&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!N&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(ge,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,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:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(An,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(ge,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:M,tabIndex:Z?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:H,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:H,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:H,closeWithAnimation:S}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((z,ne)=>n.jsx(ge,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:H,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:H,closeWithAnimation:S}):c}):null]})});return v||typeof document>"u"?X:cn.createPortal(X,document.body)}function vr(e){return String(e)}const _r=["o","triangle","x"];function Ju(e,t){return e===t?null:t}const Qu={o:"circle",triangle:"triangle",x:"x"},ec={o:"main",triangle:"warn",x:"danger"};function b4(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 es(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function tc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function g4(e,t){return!t&&e>0}const Qn={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 y4(e="landscape"){Et("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}=Qn[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 v4(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 _4={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 nc(e,t){const a=_4[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 x4(e,t){const a=nc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=Qn[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/lc,i/g/ic),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const w4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},ac={\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"},rc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ts={\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"},ns={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function oc(e){return Object.fromEntries(Object.entries(ac).map(([t,a])=>[t,ts[t]?e(`wordTable.pos.${ts[t]}`,{defaultValue:a}):a]))}function sc(e){return Object.fromEntries(Object.entries(rc).map(([t,a])=>[t,ns[t]?e(`wordSearch.filter.type.${ns[t]}`,{defaultValue:a}):a]))}const B4={pos:ts,wordType:ns};function as(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function rs(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",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const lc=280,k4=240,A4=280,ic=400,N4=120,E4=280;function uc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const D4=24,S4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},j4=400,cc=8;function os({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,homonum:l,showWord:i=!0,showImage:u=!0,showPronunciation:c=!0,showColloquial:d=!0,showCaption:h=!0,buttonSize:p=40,wordInfo:m,outerScale:g=1}){const{t:y}=Be.useTranslation(),C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),[b,k]=o.useState(1),[_,N]=o.useState(!1),[v,B]=o.useState(!1),[w,E]=o.useState({for:"",url:""}),[D,A]=o.useState(null),R=t&&t.length>0?t:O1()?.(e,l)??"",$=ia()?.(e,l)??"",{imgRef:Y,loading:T,failed:P,onLoad:M,onError:Z}=Jo($),V=o.useCallback(()=>A(f.current?.getBoundingClientRect()??null),[]),O=o.useCallback(()=>A(null),[]),te=vo(!!D,X=>{X?V():O()},f),I=o.useMemo(()=>{if(!m)return null;const X=[];return m.grade&&X.push(y("wordTable.info.grade",{n:m.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),m.syllables&&X.push(y("wordTable.info.syllables",{n:m.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),m.pos&&X.push(y("wordTable.info.pos",{v:as(m.pos,oc(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),m.wordType&&X.push(y("wordTable.info.wordType",{v:as(m.wordType,sc(y)),defaultValue:"\uC720\uD615: {{v}}"})),X.length?X:null},[m,y]),U=R||e,Q=w.for===U?w.url:"";o.useEffect(()=>{const X=Da(),z=R||e;if(!X||!z)return;let ne=!1;return Promise.resolve(X(z)).then(W=>{!ne&&W&&E({for:z,url:W})}),()=>{ne=!0}},[R,e]);const H=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),S.current?.()},[]);const F=o.useRef(null);o.useEffect(()=>()=>{F.current&&(F.current.cancelled=!0)},[]);const L=o.useCallback(X=>{if(X.stopPropagation(),_||v){H.current?.();return}if(!Q){const ne=ar(),W=R||e;if(!ne||!W)return;const q={cancelled:!1,stop:null};F.current=q;const pe=()=>{q.cancelled=!0,q.stop?.(),B(!1),N(!1),S.current?.()};H.current=pe,S.current=Ua(pe),B(!0),Promise.resolve().then(()=>ne(W)).then(Se=>{if(q.cancelled)return;if(!Se){pe();return}E({for:W,url:Se});const ve=Ga(Se,()=>{N(!1),S.current?.()});x.current=ve.el,q.stop=ve.stop,B(!1),N(!0)}).catch(()=>{pe()});return}N(!0);const z=Ga(Q,()=>{N(!1),S.current?.()});x.current=z.el,H.current=z.stop,S.current=Ua(z.stop)},[_,v,Q,R,e]),G=u&&!!$&&!P,ae=G&&i?lc:G?A4:k4,se=G&&i?ic:G?E4:N4;o.useEffect(()=>{const X=C.current;if(!X||typeof ResizeObserver>"u")return;const z=new ResizeObserver(([ne])=>{const{width:W,height:q}=ne.contentRect;k(Math.min(W/ae,q/se))});return z.observe(X),()=>z.disconnect()},[ae,se]);const me=p*g<D4;return n.jsxs("div",{ref:C,className:Ne("word-table-cell",me&&"word-table-cell--tap-too-small",G?"word-table-cell--with-image":""),"data-ref-w":ae,"data-ref-h":se,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${b})`},children:[G&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:Y,className:"word-table-cell__image",src:$,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:M,onError:Z})]}),h&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(Lt,{type:"bar",fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),c&&R&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",R,"]"]}),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":Q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(ge,{htmlType:"button",size:p,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:v,showTooltipInfo:v?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:L})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(ge,{htmlType:"button",size:p,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:L})})]}),m&&n.jsxs("div",{ref:f,className:"word-table-cell__info-button",onPointerEnter:X=>{ha(X)||V()},onPointerLeave:X=>{ha(X)||O()},onFocus:()=>{ma()||V()},onBlur:O,children:[n.jsx(ge,{htmlType:"button",size:p,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:X=>{X.stopPropagation(),te.touchPress()}}),D&&I&&n.jsx(Yn,{anchorRect:D,items:I,showIndex:!1})]})]})]})}function va({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:b,renderCellAction:k,showFillerAdd:_=!1,addableCount:N,contentRef:v,buttonSize:B=40,brand:w,code:E,pageNumber:D,pageNumberPosition:A="right",fitHeight:R=!1,scoring:$=!1,marks:Y,onMarkClick:T,scoreIndexOffset:P=0}){const M=o.useCallback((xe,Te)=>{T?.(P+xe,Te)},[T,P]),Z=(xe,Te)=>{const Me=Y?.[vr(P+xe)]??null;return n.jsx("div",{className:Ne("word-table-cell__score",Me?"word-table-cell__score--marked":""),style:Bt>1?{transform:`translateX(-50%) scale(${Bt})`,transformOrigin:"bottom center"}:void 0,children:_r.map(We=>n.jsx("span",{className:Ne("word-table-cell__score-slot",Me===We?"word-table-cell__score-slot--on":""),children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",shape:"pill",icon:Qu[We],variant:Me===We?ec[We]:"default",selected:Me===We,useBorder:!1,...xt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:V(`wordTable.scoring.markName.${We}`,{defaultValue:We}),ariaLabel:V(`wordTable.scoring.${We}`,{word:Te,defaultValue:`${Te} ${We}`}),onClick:xt?dt=>{dt.stopPropagation(),M(xe,We)}:void 0})},We))})},{t:V}=Be.useTranslation(),O=m!==void 0,te=e!=null||!!t||!!a,I=gn("(max-width: 767px)"),U=o.useRef(null),[Q,H]=o.useState(null),S=p?.length??0,[F,L]=o.useState(null),[G,ae]=o.useState(""),se=o.useRef(null),me=o.useRef(null),X=o.useRef(null),z=o.useRef(null),ne=o.useCallback(xe=>{me.current=xe,typeof v=="function"?v(xe):v&&(v.current=xe)},[v]),W=o.useCallback((xe,Te)=>{se.current=Te,b?.(xe,Te),ae(V("wordTable.reorder.moved",{n:Te+1,total:S,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[b,V,S]);o.useEffect(()=>{const xe=se.current;xe!=null&&(se.current=null,me.current?.querySelectorAll(".word-table__card:not(.word-table__card--filler):not(.word-table__card--base)")?.[xe]?.querySelector(".word-table__card-handle button")?.focus())}),o.useEffect(()=>()=>{z.current?.()},[]);const q=o.useCallback((xe,Te)=>{if(!b||!xe.altKey||xe.ctrlKey||xe.metaKey)return;const Me=xe.key==="ArrowRight";if(!Me&&xe.key!=="ArrowLeft")return;xe.preventDefault();const We=Te+(Me?1:-1);We<0||We>=S||W(Te,We)},[b,S,W]),pe=o.useCallback((xe,Te)=>{if(!b||xe.pointerType==="mouse")return;const Me=xe.target.closest?.("button");if(Me&&!Me.closest(".word-table__card-handle"))return;z.current?.();const We={x:xe.clientX,y:xe.clientY};let dt=!1;const ut=ke=>{dt&&ke.cancelable&&ke.preventDefault()};let ct=null,Ze=null;const gt=()=>{const ke=Ze;if(!ke)return;const nt=document.elementFromPoint?.(ke.x,ke.y)?.closest?.("[data-wordtable-cell]"),re=nt?Number(nt.dataset.wordtableCell):NaN,_e=Number.isInteger(re)?re:null;X.current=_e,H(Pe=>Pe===_e?Pe:_e)},jt=ke=>{if(!dt){(Math.abs(ke.clientX-We.x)>cc||Math.abs(ke.clientY-We.y)>cc)&&yt();return}if(Ze={x:ke.clientX,y:ke.clientY},typeof requestAnimationFrame>"u"){gt();return}ct===null&&(ct=requestAnimationFrame(()=>{ct=null,gt()}))},wt=()=>{ct!==null&&(cancelAnimationFrame(ct),ct=null,gt());const ke=X.current,nt=dt;yt(),nt&&ke!=null&&ke!==Te&&W(Te,ke)},bt=setTimeout(()=>{dt=!0,L(Te),X.current=Te,H(Te),window.addEventListener("touchmove",ut,{passive:!1})},j4);function yt(){clearTimeout(bt),window.removeEventListener("pointermove",jt),window.removeEventListener("pointerup",wt),window.removeEventListener("pointercancel",wt),window.removeEventListener("touchmove",ut),dt=!1,ct!==null&&(cancelAnimationFrame(ct),ct=null),X.current=null,z.current=null,L(null),H(null)}z.current=yt,window.addEventListener("pointermove",jt),window.addEventListener("pointerup",wt),window.addEventListener("pointercancel",wt)},[b,W]),{width:Se,height:ve}=Qn[s],Ce=typeof R=="number"?R:R&&typeof R=="object"?I?R.narrow:R.wide:null,{scalerRef:de,scale:fe,offset:be}=uc(Se,R?ve:void 0),he=O?m?.length??0:p?.length??0,Le=Math.max(g??he,1),Fe=!O&&!!i,$e=x4(s,Le),qe=nc(s,Le),He=Fe?$e.cols:qe.cols,it=Fe?$e.rows:qe.rows,rt=Fe&&s==="landscape"?$e.cols*2:He,Qe=Fe&&s==="portrait"?$e.rows*2:it,ft=xe=>({word:xe.length===0||xe.includes("word"),image:xe.length===0||xe.includes("image"),pron:xe.length===0||xe.includes("standardPron"),colloq:xe.length===0||xe.includes("colloquialPron"),caption:xe.length===0||xe.includes("caption")}),Ee=ft(l),Ue=o.useMemo(()=>{const xe=(p??[]).map(Me=>Me.id),Te=xe.every(Me=>typeof Me=="string"&&Me.length>0)&&new Set(xe).size===xe.length;return!Te&&xe.length>0&&Et("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."),Te?xe:null},[p]),Ae=ft(u??l),Ve=O?(m??[]).some(xe=>xe!==null&&xe.length>1):(p??[]).some(xe=>(xe.words??[]).length>1),Je=!!w?.show,ot=!!w?.show&&w?.top!==!1,At=!!w?.show&&w?.bottom!==!1,_t=w?.copyright??"\xA9 IHAB, Inc. All rights reserved.",It=le(Ne("word-table__content",w4[c],d&&"word-table__content--outline",h&&Ve&&"word-table__content--div-line",!Je&&D&&A!=="none"&&"word-table__content--page-number",ot&&"word-table__content--brand-top",At&&"word-table__content--brand-bottom")),et={transform:`scale(${1/fe})`,transformOrigin:"center center"},at=B*_r.length+4*(_r.length-1),xt=!!T,Bt=xt?Math.max(1,Math.min(1/fe,Se/rt/at)):1,St=n.jsxs("div",{ref:de,className:"word-table__scaler",style:{height:ve*fe},children:[n.jsx("div",{className:Ne("word-table",$&&!xt&&"word-table--score-readonly",!te&&r),style:{width:Se,height:ve,transform:`scale(${fe})`,transformOrigin:"top left",marginLeft:be},children:n.jsxs("div",{ref:ne,className:It,style:{gridTemplateColumns:`repeat(${rt}, 1fr)`,gridTemplateRows:`repeat(${Qe}, 1fr)`},children:[O?n.jsx(n.Fragment,{children:(m??[]).map((xe,Te)=>n.jsx("div",{className:le(Ne("word-table__edit-cell",xe?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Te?"word-table__edit-cell--active":"")),style:rs(Te,rt,Qe,c),children:xe?n.jsxs(n.Fragment,{children:[xe.map((Me,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:fe,label:Me.word,subLabel:Me.pronunciation,colloquialLabel:Me.colloquialPronunciation,homonum:Me.homonum,showWord:Ee.word,showImage:Ee.image,showPronunciation:Ee.pron,showColloquial:Ee.colloq,showCaption:Ee.caption,buttonSize:B})]},We)),$&&Z(Te,xe.map(Me=>Me.word).join(" / ")),f&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:xe.length>1?V("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):V("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:xe.length>1?V("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):V("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Te)})})]}):C&&n.jsx("div",{style:et,children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",icon:"plus",variant:"default",ariaLabel:V("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:V("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Te)})})},Te))}):n.jsxs(n.Fragment,{children:[Fe&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${$e.cols}`,gridRow:`1 / span ${$e.rows}`,...rs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((xe,Te)=>n.jsxs(o.Fragment,{children:[Te>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:fe,label:xe.label,subLabel:xe.subLabel,colloquialLabel:xe.colloquialLabel,captionLabel:xe.captionLabel,captionBadge:xe.captionBadge,homonum:xe.homonum,showWord:Ae.word,showImage:Ae.image,showPronunciation:Ae.pron,showColloquial:Ae.colloq,showCaption:Ae.caption,buttonSize:B,wordInfo:xe.grade||xe.syllables!=null||xe.pos||xe.wordType?{grade:xe.grade,syllables:xe.syllables,pos:xe.pos,wordType:xe.wordType}:void 0})]},Te))}),(p??[]).map((xe,Te)=>n.jsxs("div",{"data-wordtable-cell":b?Te:void 0,className:le(`word-table__card${b?" word-table__card--draggable":""}${Q===Te?" word-table__card--drag-over":""}${F===Te?" word-table__card--dragging":""}`),style:rs(Te,He,it,c),draggable:!!b,onPointerDown:b?Me=>pe(Me,Te):void 0,onKeyDown:b?Me=>q(Me,Te):void 0,onDragStart:b?()=>{U.current=Te}:void 0,onDragOver:b?Me=>{Me.preventDefault(),H(Te)}:void 0,onDragLeave:b?()=>H(null):void 0,onDrop:b?Me=>{Me.preventDefault(),U.current!==null&&U.current!==Te&&b(U.current,Te),U.current=null,H(null)}:void 0,onDragEnd:b?()=>{U.current=null,H(null)}:void 0,children:[(xe.words??[]).map((Me,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:fe,label:Me.label,subLabel:Me.subLabel,colloquialLabel:Me.colloquialLabel,captionLabel:Me.captionLabel,captionBadge:Me.captionBadge,homonum:Me.homonum,showWord:Ee.word,showImage:Ee.image,showPronunciation:Ee.pron,showColloquial:Ee.colloq,showCaption:Ee.caption,buttonSize:B,wordInfo:Me.grade||Me.syllables!=null||Me.pos||Me.wordType?{grade:Me.grade,syllables:Me.syllables,pos:Me.pos,wordType:Me.wordType}:void 0})]},We)),$&&Z(Te,(xe.words??[]).map(Me=>Me.label).join(" / ")),(k||x||b)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[x&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(xe.words??[]).length>1?V("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):V("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(xe.words??[]).length>1?V("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):V("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(xe.id)})}),k?.(Te,xe),b&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:V("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:V("wordTable.reorder.handle",{word:(xe.words??[]).map(Me=>Me.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Ue?Ue[Te]:Te)),Array.from({length:Math.max(0,He*it-(p?.length??0))}).map((xe,Te)=>{const Me=(p?.length??0)+Te<(N??Le);return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:_&&C&&Me&&n.jsx("div",{style:et,children:n.jsx(ge,{htmlType:"button",size:B,type:"dot",icon:"plus",variant:"default",ariaLabel:V("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:V("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Te)})})},`filler-${Te}`)})]}),ot&&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:w?.topLogo?.src??Cr,alt:w?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const xe=[w?.title&&n.jsx("span",{className:"word-table__paper-title",children:w.title},"t"),w?.owner&&n.jsx("span",{className:"word-table__owner",children:w.owner},"o"),E&&n.jsx("span",{className:"word-table__code",children:E},"c")].filter(Boolean);return xe.length===0?null:n.jsx("span",{className:"word-table__ident",children:xe.map((Te,Me)=>n.jsxs(o.Fragment,{children:[Me>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Te]},Me))})})()]})}),At&&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:[w?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:w.bottomLogo.src,alt:w.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:_t})]}),n.jsxs("span",{className:"word-table__band-end",children:[w?.link&&n.jsx("span",{className:"word-table__link",children:w.link}),D&&A!=="none"&&n.jsx("span",{className:"word-table__page-count",children:V("wordTable.filter.pageIndicator",{current:D.current,total:D.total})})]})]})}),!Je&&D&&A!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${A}`,children:V("wordTable.filter.pageIndicator",{current:D.current,total:D.total})})]})}),b&&n.jsx("span",{role:"status",style:S4,children:G})]}),Pt=Ce==null?St:n.jsx("div",{className:"word-table__frame",style:{height:Ce},children:St});return te?n.jsx(ya,{type:"page",icon:t,title:e,disc:a,className:Ne(le("word-table__section"),r),children:Pt}):Pt}function T4(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=M4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function M4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==wn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>L4(e,s)).join(", ")}function L4(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 $n({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:f}=Be.useTranslation(),[x,b]=o.useState(l),k=i??x,_=()=>{const A=!k;b(A),u?.(A)},N=A=>{if(!s)return;const R=A.target;!R||typeof R.closest!="function"||R.closest(".filter-panel__collapse-toggle")||R.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},v=o.useMemo(()=>r!==void 0||!k?"":T4(d,h,f("common.all","\uC804\uCCB4")),[r,k,d,h,f]),B=r??(v?n.jsx("span",{className:"filter-panel__header-summary body-3",children:v}):null),w=e||a||r||s,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:Ne("filter-panel",s?"filter-panel--collapsible":"",k?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[w&&n.jsxs("div",{className:"filter-panel__header",onClick:s?N:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[k?B:a,s&&n.jsx(ge,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:k?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:k?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:k?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!k,onClick:_})]})]}),!k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Ne("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(A=>{const R=h[A.label],$=R===void 0||(Array.isArray(R)?R.length===0:!1),Y=(A.items??[]).filter(P=>P!=null);A.allOption&&Y.some(P=>(typeof P=="string"?P:P.value)===wn)&&Et(`filter-panel-all-value:${A.label}`,`[FilterPanel] '${A.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${wn}' \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=P=>{const M=typeof P=="string"?P:P.value,Z=typeof P!="string"&&!!P.disabled,V=typeof P!="string"?P.labels:void 0,O=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.tooltip:void 0,I=typeof P!="string"?P.descriptionTooltip:void 0,U=typeof P!="string"?P.shape:void 0,Q=Array.isArray(R)?R.includes(M):R===M;return n.jsx(ge,{htmlType:"button",size:"keyboard",label:V??O??M,type:A.itemType??(V?"bar":M.length===1?"dot":void 0),selected:Q,disabled:Z,shape:U,showTooltipInfo:!!te,tooltipInfoText:te,tooltipDescription:I,onClick:()=>p?.(M,A.label)},M)};return n.jsxs(o.Fragment,{children:[A.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:A.groupLabel}),A.groupAction]}),n.jsxs("div",{className:Ne("filter-panel__section",A.layout==="row"?"filter-panel__section--row":"",A.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:A.displayLabel??A.label}),A.labelAction??(A.labelInfo?n.jsx(qa,{...A.labelInfo}):null)]}),A.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:A.content}):A.type==="input"?n.jsx(Jn,{className:"filter-panel__textfield",placeholder:A.placeholder,ariaLabel:A.displayLabel??A.label,value:h[A.label]??"",onChange:P=>p?.(P,A.label),error:A.error}):!A.multiple&&A.display==="segmented"?n.jsx(An,{ariaLabel:A.displayLabel??A.label,options:[...A.allOption?[{key:wn,label:A.allLabel??f("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...Y.map(P=>{const M=typeof P=="string"?P:P.value,Z=typeof P!="string"?P.displayLabel:void 0,V=typeof P!="string"?P.disabled:void 0;return{key:M,label:Z??M,disabled:V}})],value:$&&A.allOption?wn:h[A.label]??"",onChange:P=>p?.(P,A.label),size:32}):!A.multiple&&A.display==="dropdown"?n.jsx(yn,{className:"filter-panel__dropdown",ariaLabel:typeof A.label=="string"?A.label:void 0,size:40,options:[...A.allOption?[{value:wn,label:A.allLabel??f("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...Y.map(P=>{const M=typeof P=="string"?P:P.value,Z=typeof P!="string"?P.displayLabel:void 0,V=typeof P!="string"?P.disabled:void 0;return{value:M,label:Z??M,disabled:V}})],value:$&&A.allOption?wn:h[A.label],onChange:P=>p?.(P,A.label)}):n.jsxs("div",{className:A.groups?"filter-panel__item-groups":"filter-panel__items",children:[A.allOption&&!A.groups&&n.jsx(ge,{htmlType:"button",size:"keyboard",label:A.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(wn,A.label)}),A.groups?A.groups.map((P,M)=>n.jsxs("div",{className:"filter-panel__item-group",children:[M===0&&A.allOption&&n.jsx(ge,{htmlType:"button",size:"keyboard",label:A.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(wn,A.label)}),P.filter(Z=>Z!=null).map(T)]},M)):Y.map(T)]})]})]},A.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const $4=[1,2,3,4,5,6,7,8,9,10,11,12],R4=[8,6,4,2,1],mn="show",En="hide";function dc(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 pc(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 hc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Cc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:mn,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:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function bc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function gc(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,...R4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function yc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function P4(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:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function vc(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?mn:En,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?mn:En,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?mn:En}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?mn:En}:{}}}function xc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===wn?(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===mn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===mn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===mn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===mn),!0):!1}function I4(e){return"sections"in e}function ss(e){const{t}=Be.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(I4(e))return n.jsx($n,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:x,setters:b,showCutLine:k=!1,showDivLine2:_=!1,middleSections:N=[],extraSelected:v={},onExtraSelect:B,showPaperBands:w=!1,showTopInfo:E=!0,showBottomInfo:D=!0}=e,A=[dc(t,{hasImage:h,hasColloquial:p,hasCaption:m}),pc(t),...N,hc(t),...k?[fc(t)]:[],..._?[bc(t)]:[],...w?[mc(t),Cc(t)]:[]],R={..._c(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:E,showBottomInfo:D}),...v},$=(Y,T)=>{xc(t,Y,T,b)||B?.(Y,T)};return n.jsx($n,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:A,selected:R,onSelect:$,...d,sectionAlign:"horizontal"})}function ls(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function F4(e){return ls(e).replace(/"/g,""").replace(/'/g,"'")}function is(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,_a=null;function O4(e,t,a,r="",s=""){if(e.length===0||_a&&_a.iframe.isConnected&&Date.now()-_a.at<1e4)return;const l=r?is(r):"";xr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=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}_a={iframe:u,at:Date.now()},c.open(),c.write(us(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),_a?.iframe===u&&(_a=null)},0)})}function us(e,t,a,r=!1,s="",l=""){s=s?is(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
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 d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(vv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&yv.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 g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function xv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=Be.useTranslation(),[u,c]=o.useState(!1),d=gv(wu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Pf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=_v(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:ke("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(ve,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,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} ${g}`,children:y.content},C))})})]})}function Bu({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:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function ku({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:ke("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.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 wv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=Be.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const b=p.current,B=g.current;if(g.current=c,c&&!B){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!b?.contains(_)?_:null}else!c&&B&&b&&b.contains(document.activeElement)&&cr(b,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const b=h.current;if(!b)return;const B=A=>{f.current=A,C(A)},_=()=>{const A=b.firstElementChild??b,D=Array.from(A.children);if(D.length<2){B(!1);return}const E=D[0].offsetTop,R=D.some(M=>M.offsetTop!==E);if(!f.current){x.current=b.clientWidth,R&&B(!0);return}if(R)return;const $=D[0],G=D[D.length-1],T=G.offsetLeft+G.offsetWidth-$.offsetLeft,F=x.current;(F==null||T<=F)&&B(!1)};if(_(),typeof ResizeObserver>"u")return;const N=new ResizeObserver(_);N.observe(b);const v=b.parentElement;let k=v?.clientWidth??0;const w=new ResizeObserver(()=>{const A=v?.clientWidth??0;A!==k&&(k=A,x.current=null,_())});return v&&w.observe(v),()=>{N.disconnect(),w.disconnect()}},[l,e]),n.jsxs("div",{ref:p,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(jt,{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(ve,{htmlType:"button",size:40,label:d,onClick:a}),t.map((b,B)=>n.jsx(ve,{htmlType:"button",size:40,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},B))]})]})}const Bv=[{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 kv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:ke("item-actions",a),children:Bv.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(ve,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Au(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[g,y]=lo(t).split("-");return{y:+g,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 g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function br(e,t){return new Date(e,t+1,0).getDate()}function Av(e,t){return new Date(e,t,1).getDay()}function Xa(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Nv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Ev(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:Xa(a,r-1,s)}const Dv=1900;function Sv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Dv,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 Nu(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 jv({value:e,onChange:t,size:a=48,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=Be.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=lo(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:x,setViewYM:b}=Au(e,c),B=o.useId(),_=o.useCallback((z,ne)=>{const W=window.innerHeight,V=window.innerWidth,pe=typeof document<"u"?document.getElementById(B):null,Ee=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,xe=Math.max(z.width,pe?.offsetWidth||0,260),Ce=W-z.bottom,ce=z.top,ge=Ce<Ee&&ce>Ce,be=8,he=(Me,We)=>Math.min(Math.max(be,Me),Math.max(be,We));return{position:"fixed",left:he(z.left,V-xe-be),width:z.width,minWidth:260,...ge?{top:"auto",bottom:he(W-z.top+6,W-Ee-be)}:{bottom:"auto",top:he(z.bottom+6,W-Ee-be)},zIndex:Oa(ne)}},[B]),{open:N,setOpen:v,toggle:k,style:w,triggerRef:A,menuRef:D}=za({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!N)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(Bn)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&A.current?.focus?.()}},[N,D,A]);const[E,R]=o.useState(1),$=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!N)return;const z=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;R(z)},[N]),o.useEffect(()=>{if(G.current==null)return;const z=G.current;G.current=null,$.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{R(z=>Math.min(z,br(y,C)))},[y,C]);const T=o.useCallback(z=>{let ne=Xa(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[W,V,pe]=ne.split("-").map(Number);(W!==y||V-1!==C)&&b(W,V-1),R(pe),G.current=pe},[r,s,y,C,b]),F=o.useCallback(z=>{const ne=new Date(y,C,E),W=pe=>{ne.setDate(ne.getDate()+pe),T(ne)},V=pe=>{const Ee=ne.getFullYear()*12+ne.getMonth()+pe,xe=Math.floor(Ee/12),Ce=Ee-xe*12;T(new Date(xe,Ce,Math.min(ne.getDate(),br(xe,Ce))))};switch(z.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-ne.getDay());break;case"End":W(6-ne.getDay());break;case"PageUp":z.shiftKey?V(-12):V(-1);break;case"PageDown":z.shiftKey?V(12):V(1);break;default:return}z.preventDefault()},[y,C,E,T]),M=o.useCallback(z=>{l||(t(Xa(y,C,z)),v(!1))},[y,C,t,v,l]);o.useEffect(()=>{l&&v(!1)},[l,v]);const X=z=>{const ne=Xa(y,C,z);return!!(r&&ne<r||s&&ne>s)},Z=(()=>{const z=br(y,C);if(E>=1&&E<=z&&!X(E))return E;for(let ne=1;ne<=z;ne++)if(!X(ne))return ne;return-1})(),O=[];for(let z=0;z<Av(y,C);z++)O.push(null);for(let z=1;z<=br(y,C);z++)O.push(z);const Y=a===64?20:a===40?16:18,I=Hl(h.language),q=z=>new Intl.DateTimeFormat(I,{year:"numeric"}).format(new Date(z,0,1)),Q=(z,ne)=>new Intl.DateTimeFormat(I,{month:"long"}).format(new Date(z,ne-1,1)),H=Sv(y,+g.slice(0,4),q,r,s),S=Nu(y,Q,r,s),P=z=>{const ne=Nu(z,Q,r,s);if(ne.length===0)return;const W=ne.some(V=>+V.value===C+1);b(z,W?C:+ne[0].value-1)},[L,U]=o.useState(null);o.useEffect(()=>{U(null)},[e]);const ae=o.useCallback(z=>{U(z);const ne=Ev(z);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[W,V]=ne.split("-");b(+W,+V-1)},[r,s,t,b]),se=o.useCallback(()=>{U(null)},[]),me=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),se(),v(!1)):z.key==="Escape"?(se(),v(!1)):z.key==="ArrowDown"&&!N&&(z.preventDefault(),v(!0))},[se,v,N]),te=N?un.createPortal(n.jsxs("div",{ref:D,id:B,className:"date-picker__dropdown",style:w,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("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":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Os,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(bn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:H,value:String(y),onChange:z=>P(+z),size:40}),n.jsx(bn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(C+1),onChange:z=>b(y,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(zs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:$,onKeyDown:F,children:[m.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const W=Xa(y,C,z),V=W===e,pe=W===g,Ee=X(z),xe=ne%7;return n.jsx("button",{type:"button",disabled:Ee,"data-day":z,tabIndex:z===Z?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Ee&&M(z),className:ke("date-picker__day caption-1",V&&"date-picker__day--selected",pe&&!V&&"date-picker__day--today",Ee&&"date-picker__day--disabled",xe===0&&"date-picker__day--sun",xe===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:ke("date-picker",`date-picker--s${a}`,N&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:A,type:"text",className:"date-picker__trigger body-2",value:L??Nv(e),placeholder:p,onChange:z=>ae(z.target.value),onClick:()=>!l&&!N&&k(),onKeyDown:me,onBlur:se,disabled:l,"aria-haspopup":"dialog","aria-expanded":N,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&k(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":N,children:n.jsx(Zs,{size:Y,className:"date-picker__icon",strokeWidth:1.5})})]}),te]})}function Tv({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?Ml(i.sms):Ml(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(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):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?`${jl}\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 ${jl}\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 Mv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Uy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:ke("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:ke("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:Vy(Hy(u),c)}}):n.jsx("img",{src:e,alt:t,className:ke("brand-logo",a),style:r,draggable:!1})}function Eu({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:ke("section-head-float",t),children:e})}function Fo({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))})}function Ja({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})}function Oo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:f,subRowAlign:x="start",className:b,inGrid:B=!1,children:_}){const{t:N}=Be.useTranslation(),v=o.useRef(null),{anchorRect:k,openAt:w,close:A}=Fa(),D=o.useCallback(()=>{m&&v.current&&w(v.current)},[m,w]),[E,R]=o.useState(!1);Ro(()=>{const S=v.current;if(!S||!u)return;const P=U=>R(U>0&&U<d);if(P(S.clientWidth),typeof ResizeObserver>"u")return;const L=new ResizeObserver(U=>P(U[0].contentRect.width));return L.observe(S),()=>L.disconnect()},[u,d]);const[$,G]=o.useState(null),T=o.useCallback(()=>G(null),[]),F=o.useCallback(S=>{const P=S.currentTarget.getBoundingClientRect();G(L=>L?null:{left:P.left,right:P.right,top:P.top,bottom:P.bottom,width:P.width,height:P.height,x:P.x,y:P.y})},[]),M=!!u&&E;o.useEffect(()=>{M||G(null)},[M]);const X=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,P)=>P===0?{...S,separatorBefore:!0}:S)]:[],Z=o.useCallback(S=>{if(!h)return;const P=S.target;P&&typeof P.closest=="function"&&P.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),O=o.useCallback(S=>{h&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},[h]),Y=typeof l=="function"?l({collapsed:M}):l,I=g!=null||C?n.jsxs(Ja,{label:C,children:[g!=null&&n.jsx("span",{className:le("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:y})]}):null,q=Y||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(M?n.jsx(ve,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:F}):n.jsx(kn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),Y]}):null,Q=o.useId(),H=a?`h${a}`:"div";return n.jsxs("section",{ref:v,className:le(["chart-section",B&&"chart-section--grid",h&&"chart-section--clickable",b].filter(Boolean).join(" ")),onClick:h?Z:void 0,onKeyDown:h?O:void 0,onPointerEnter:m?D:void 0,onPointerLeave:m?A:void 0,onFocus:m?D:void 0,onBlur:m?A:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Q:void 0,children:[m&&k&&n.jsx(Dn,{anchorRect:{left:k.left,top:k.top+21,right:k.right,bottom:k.bottom,width:k.width,height:k.height},text:m}),i&&n.jsx(Eu,{children:i}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:le("chart-section__icon")}),n.jsx(H,{id:Q,className:le(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:le("chart-section__disc body-3"),children:s})]}),(I||f)&&n.jsxs("div",{className:le(["chart-section__sub-row",x!=="start"&&`chart-section__sub-row--${x}`].filter(Boolean).join(" ")),children:[I,f]}),_,$&&n.jsx(vn,{anchorRect:$,onClose:T,ariaLabel:u?.ariaLabel??N("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:[{items:X}],onClose:T,size:"small"})})]})}const Qa=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,zo=e=>Qa(e.getFullYear(),e.getMonth()+1);function fa(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 Wo=(e,t)=>`${e}#${t}`;function An(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Lv(){const e=ua();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<An(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-An(t,a))/7),l=Qa(t,a+1);return{monthKey:l,value:Wo(l,s)}}function $v(e){const t=ua(),a=zo(t),r=(c,d)=>Qa(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=An(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(f=>f.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((_,N)=>Math.max(_,N.parts?.length??0,N.partsB?.length??0),0),C=d.some(_=>_.partsB),f=new Array(g+1).fill(0),x=new Array(g+1).fill(0),b=Array.from({length:g+1},()=>new Array(y).fill(0)),B=Array.from({length:g+1},()=>new Array(y).fill(0));for(const _ of d){const N=_.date.getDate();if(f[N]+=_.a,x[N]+=_.b,_.parts)for(let v=0;v<y;v++)b[N][v]+=_.parts[v]??0;if(_.partsB)for(let v=0;v<y;v++)B[N][v]+=_.partsB[v]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:f,dayB:x,dayParts:b,dayPartsB:B})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:f}=d,x=h===t.getFullYear()&&p===t.getMonth(),b=t.getDate(),B=l.get(r(p===11?h+1:h,(p+1)%12)),_=d.partsLen,N=[];for(let k=1;k<=m;k++){const w=x&&k>b;N.push({label:String(k),...w&&g[k]===0&&y[k]===0?{future:!0}:{},a:w&&g[k]===0&&y[k]===0?-1:g[k],b:y[k],..._?{parts:C[k]}:{},..._&&d.hasPartsB?{partsB:f[k]}:{}})}const v=[];for(let k=An(h,p);k<=m;k+=7){const w=Math.max(0,k+6-m),A=w&&B?Math.max(_,B.partsLen):_,D=d.hasPartsB||!!(w&&B?.hasPartsB);let E=0,R=0;const $=new Array(A).fill(0),G=new Array(A).fill(0);for(let F=k;F<=Math.min(k+6,m);F++){E+=g[F],R+=y[F];for(let M=0;M<_;M++)$[M]+=C[F][M],G[M]+=f[F][M]}if(w&&B)for(let F=1;F<=w&&!i(B.year,B.month,F);F++){E+=B.dayA[F],R+=B.dayB[F];for(let M=0;M<B.partsLen;M++)$[M]+=B.dayParts[F][M],G[M]+=B.dayPartsB[F][M]}const T=w?`${(p+1)%12+1}/${w}`:`${k+6}`;v.push({label:`${v.length+1}\uC8FC`,sublabel:`[${k}\uC77C~${T}\uC77C]`,a:E,b:R,...A?{parts:$}:{},...A&&D?{partsB:G}:{}})}u[c]={weekly:v,daily:N}}return u}function Du(){const e=ua(),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:Qa(s,i),year:s,month:i})}return r.reverse()}Du();function Rv(){return Du()}function Su(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 ju(e){const{t,i18n:a}=Be.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Rv().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const D of l){const E=new Date(D.year,D.month,0).getDate(),R=An(D.year,D.month-1),$=Math.ceil((E-R+1)/7);for(let G=$-1;G>=0;G--)A.push({value:Wo(D.value,G),monthKey:D.value,year:D.year,month:D.month,week:G})}return A},[l]),u=o.useCallback(A=>`${so(t,a.language,A.year,A.month)} ${Su(t,A.week)}`,[t]),c=o.useMemo(()=>l.map(A=>({value:A.value,label:so(t,a.language,A.year,A.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(A=>({value:A.value,label:u(A)})),[i,u]),h=o.useMemo(()=>Lv(),[e]),p=o.useMemo(()=>l.find(A=>A.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(A=>A.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,f]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(A=>A.value===C)||f(m)},[i,C,m]);const x=r==="month"?c:d,b=r==="month"?g:C,B=r==="month"?y:f,_=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),N=x.findIndex(A=>A.value===b),v=o.useCallback(()=>{const A=x.findIndex(D=>D.value===b);A<x.length-1&&B(x[A+1].value)},[x,b,B]),k=o.useCallback(()=>{const A=x.findIndex(D=>D.value===b);A>0&&B(x[A-1].value)},[x,b,B]),w=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:b,setRange:B,activeOptions:x,activeIdx:N,handlePrev:v,handleNext:k,periodOptions:w,monthRange:g,weekRange:C,weekRanges:i,DOW:_}}const At=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Pv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const f=!a,x=!!(h&&h.length>0),b=y,B=o.useMemo(()=>x?Math.max(0,...e.filter(O=>!Mn(O,b==null)).map(O=>g?Math.max(0,...(O.parts??[]).map(At)):(O.parts??[]).reduce((Y,I)=>Y+Math.max(0,At(I)),0))):Math.max(0,...e.filter(O=>!Mn(O,b==null)).flatMap(O=>f?[At(O.a)]:[At(O.a),At(O.b)])),[e,f,x,g]),_=o.useMemo(()=>{if(b==null)return 0;const O=e.filter(Y=>!Mn(Y,b==null)).flatMap(Y=>x?(Y.parts??[]).map(At):f?[At(Y.a)]:[At(Y.a),At(Y.b)]);return Math.max(0,...O.map(Y=>Math.abs(Y-b)))},[e,b,x,f]),N=o.useMemo(()=>{const O=b!=null?_:B;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[B,_,b,c,d]),v=u,k=x?g?Math.max(1,h.length):1:f?1:2,w={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(O*k)+6)))},[e.length,k,l])}px`},A={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(N/2);return b!=null?[b+N,...O!==N?[b+O]:[],b,...O!==N?[b-O]:[],b-N]:O!==N?[N,O,0]:[N,0]},[N,b]),E=O=>b!=null?1-(O-(b-N))/(2*N):1-O/N,[R,$]=o.useState(null),G=o.useCallback(()=>$(null),[]),T=o.useCallback((O,Y)=>{const I=[O.label,O.sublabel].filter(Boolean).join(" ");let q;if(x&&g&&O.rawPartsB)q=(p??[]).map((Q,H)=>{const S=O.rawPartsB[H]??0;return{text:S>0?`${Q}: ${Y[H]??0}% (${O.rawParts?.[H]??0}/${S})`:`${Q}: -`,color:(h??[])[H]}});else if(x&&g)q=(p??[]).map((Q,H)=>({text:`${Q}: ${X(Y[H]??0)}`,color:(h??[])[H]}));else if(x){const Q=(p??[]).map((S,P)=>({text:`${S}: ${Y[P]??0}`,color:(h??[])[P]})),H=Q.filter((S,P)=>(Y[P]??0)>0);q=H.length?H:Q}else m&&!f?q=[{text:`${r} ${At(O.a)}%`,color:t},{text:`${s} ${At(O.b)}%`,color:a}]:m&&O.rawB!==void 0?q=[{text:`${m.total} ${O.rawB}`},{text:`${m.done} ${O.rawA??0}`,color:t}]:f?q=[{text:`${r}: ${At(O.a)}`,color:t}]:q=[{text:`${r}: ${At(O.a)}`,color:t},{text:`${s}: ${At(O.b)}`,color:a}];return{title:I,items:q}},[x,g,p,h,m,f,r,s,t,a,b]),F=o.useCallback((O,Y,I)=>{const q=O.getBoundingClientRect(),{title:Q,items:H}=T(Y,I);$({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Q,items:H})},[T]),M=o.useCallback((O,Y)=>{const{title:I,items:q}=T(O,Y);return[I,...q.map(Q=>Q.text)].filter(Boolean).join(", ")},[T]),X=O=>b!=null&&O>b?`+${O}`:`${O}`,Z=R!=null;return o.useEffect(()=>{if(!Z)return;const O=()=>$(null),Y=I=>{const q=I.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||$(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",Y,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",Y,!0)}},[Z]),n.jsxs("div",{className:le("bar-chart__wrap"),style:A,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:v},children:[D.slice(0,-1).map((O,Y)=>n.jsx("div",{className:le(`bar-chart__gridline${b!=null&&O===b?" bar-chart__gridline--baseline":""}`),style:{top:E(O)*v},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:O})},Y)),e.map((O,Y)=>{const I=Mn(O,b==null),q=v/2,Q=L=>b!=null?Math.min(q,Math.abs(At(L)-b)/N*q):Math.min(v,Math.max(0,At(L)/N*v)),H=I?0:Q(O.a),S=I?0:Q(O.b),P=(O.parts??[]).map(At);return n.jsx("div",{className:le(`bar-chart__col${g&&x?" bar-chart__col--group":""}`),style:{cursor:I?"default":"pointer"},tabIndex:C&&!I?0:void 0,role:C&&!I?"img":void 0,"aria-label":C&&!I?M(O,P):void 0,onMouseEnter:I?void 0:L=>F(L.currentTarget,O,P),onFocus:I||!C?void 0:L=>F(L.currentTarget,O,P),onBlur:C?G:void 0,onMouseLeave:G,children:!I&&(x&&g?(h??[]).map((L,U)=>{const ae=P[U]??0;if(b==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:Q(ae),background:L}},U);const se=At(ae)<b;return n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!se&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Q(ae),background:L}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:se&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Q(ae),background:L}})})]},U)}):x?n.jsx("div",{className:le("bar-chart__stack"),style:w,children:(()=>{const L=P.reduce((ae,se,me)=>se>0?me:ae,-1);let U=v;return P.map((ae,se)=>{if(ae<=0)return null;const me=Math.min(U,ae/N*v);return U-=me,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:me,background:(h??[])[se],borderRadius:se===L?"6px 6px 0 0":void 0}},se)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:At(O.a),c:t},...f?[]:[{v:At(O.b),c:a}]].map(({v:L,c:U},ae)=>n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:L>=b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Q(L),background:U}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:L<b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Q(L),background:U}})})]},ae))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:H,background:t}}),!f&&n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:S,background:a}})]}))},Y)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((O,Y)=>{const I=Mn(O,b==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${I?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[O.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},Y)})})]})})}),R&&n.jsx(Yn,{anchorRect:R.rect,title:R.title,items:R.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Tu({control:e}){const{t}=Be.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="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(ve,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(bn,{value:s,onChange:l,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(ve,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(kn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:40})]})}function Ho(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[zo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Iv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ua(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=fa(l),x=f?f.year:null,b=f?f.month1:null,B=x&&b?An(x,b-1):1;return C.weekly.map((_,N)=>{const v=N+1;let k=_.label,w=!1,A=!1;if(x&&b){const D=B+N*7,E=new Date(x,b-1,D+6),R=E.getMonth()+1,$=E.getDate(),G=R===b?`${$}`:`${R}/${$}`;k=a("manager.chart.weekRange",{start:D,end:G});const T=new Date(h,p-1,m).getTime();w=T>=new Date(x,b-1,D).getTime()&&T<=E.getTime(),A=x>h||x===h&&(b>p||b===p&&D>m)}return{..._,label:k,sublabel:Su(a,v-1),isToday:w,future:_.future===!0||A||void 0,a:A?-1:_.a,b:A?0:_.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,An(g.year,g.month-1)+g.week*7);return Ho(e,y,d,r).map(({dt:C,entry:f,isFuture:x})=>{const b=C.getMonth()+1,B=C.getDate(),_=C.getFullYear();return{label:b===g.month&&_===g.year?`${B}`:`${b}/${B}`,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&&b===p&&B===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const Fv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Ov({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:f="dayMean",tightMax:x=!1,avgMode:b=!1,totalFormat:B,series:_,seriesMode:N="stack",loading:v=!1,onDetail:k,headExtra:w,headSegment:A,icon:D,disc:E,onClick:R,cardAriaLabel:$,cardTooltip:G,detailSize:T=32,barGap:F,baseline:M,className:X,inGrid:Z=!1}){const{t:O}=Be.useTranslation(),Y=Fv[t],I=ju(l),q=g??I,Q=o.useMemo(()=>Iv(l,q,O,M==null),[l,q,O,M]),H=N==="group"&&!!_&&_.length>0;F!=null&&!H&&kt("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 S=o.useMemo(()=>{if(!C)return Q;const te=q.period==="month"?fa(q.monthRange):null,z=ua(),ne=_?.length??0,W=V=>{const pe=[],Ee=[],xe=[];for(let Ce=0;Ce<ne;Ce++){let ce=0,ge=0,be=0;for(const he of V){const Me=At(he.a[Ce]),We=At(he.b[Ce]);We<=0||(ce+=Me,ge+=We,be+=Me/We*100)}pe.push(f==="weighted"?ge>0?Math.round(ce/ge*100):0:V.length?Math.round(be/V.length):0),Ee.push(ce),xe.push(ge)}return{pct:pe,ra:Ee,rb:xe}};return Q.map((V,pe)=>{let Ee=V.a===-1?-1:V.b>0?Math.round(V.a/V.b*100):0;if(te&&!Mn(V)){const Ce=te.year,ce=te.month1-1,ge=Ho(l,new Date(Ce,ce,An(Ce,ce)+pe*7),z).filter(be=>!be.isFuture);if(f==="weighted"){let be=0,he=0;for(const{entry:Me}of ge)Me&&Me.b>0&&(be+=Me.a,he+=Me.b);Ee=he>0?Math.round(be/he*100):0}else Ee=ge.length?Math.round(ge.reduce((be,{entry:he})=>be+(he&&he.b>0?he.a/he.b*100:0),0)/ge.length):0}let xe=null;if(H&&!Mn(V)){let Ce;if(te){const ge=te.year,be=te.month1-1;Ce=Ho(l,new Date(ge,be,An(ge,be)+pe*7),z).filter(he=>!he.isFuture).map(({entry:he})=>({a:he?.parts??[],b:he?.partsB??[]}))}else Ce=[{a:V.parts??[],b:V.partsB??[]}];const ce=W(Ce);xe={parts:ce.pct,rawParts:ce.ra,rawPartsB:ce.rb}}return{...V,a:Ee,b:V.a===-1?0:d&&V.parts&&V.parts[1]>0?Math.round(V.parts[0]/V.parts[1]*100):0,rawA:V.a===-1?-1:V.a,rawB:V.b,...xe??{}}})},[Q,C,f,d,q.period,q.monthRange,l,H,_?.length]),P=o.useMemo(()=>{if(C||b){const z=(q.period==="week"?Q:l[q.monthRange]?.daily??[]).filter(W=>W.a!==-1);if(z.length===0)return 0;if(C&&f==="weighted"){let W=0,V=0;for(const pe of z)pe.b>0&&(W+=pe.a,V+=pe.b);return V>0?Math.round(W/V*100):0}const ne=C?z.reduce((W,V)=>W+(V.b>0?V.a/V.b*100:0),0):z.reduce((W,V)=>W+(V.a>0?V.a:0),0);return Math.round(ne/z.length)}const te=q.period==="month"?l[q.monthRange]?.daily??[]:S;return M!=null?te.reduce((z,ne)=>z+(Mn(ne,!1)?0:At(ne.a)+(d?At(ne.b):0)),0):te.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,Q,C,f,b,M,d,q.period,q.monthRange,l]),L=_&&_.length>0?_.map(te=>({color:te.color,label:te.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],U=t==="small",ae=[U?"chart-section--compact":t==="large"?"chart-section--full":void 0,X].filter(Boolean).join(" ")||void 0,se=r?O(r):"",me=se?O("trainingStatus.detailFor",{name:se,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Oo,{className:ae,inGrid:Z,icon:D,disc:E,onClick:R,ariaLabel:$,tooltip:G,headSegment:A,headMenuItems:k?[{label:me,icon:"list",onClick:k,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:s,titleClassName:U?"h5 chart-section-title--small":void 0,headRight:U?w??void 0:({collapsed:te})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Tu,{control:q}),w,k&&!te&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(ve,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:me,showTooltipInfo:me,onClick:k})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||b||m&&B?n.jsx(Ja,{label:U?void 0:`${O(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(m??c)}`,children:B?(B(P).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((te,z)=>/\d/.test(te)?n.jsx("span",{className:le("chart-section__total__num h0"),children:te},z):n.jsx("span",{className:le("chart-section__total__unit h5"),children:te},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:P}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(p)})]})}):n.jsxs(Ja,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:P}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(c)}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:O(p)})]}):n.jsx("span",{}),n.jsx(Fo,{items:L,className:"caption-1"})]}),children:v?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:Y.height},children:n.jsx(da,{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"}),S.some(te=>!!te.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Pv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??Y.barWidth,barGap:F,baseline:M,height:Y.height,maxOverride:C?100:void 0,tightMax:x,seriesColors:_?.map(te=>te.color),seriesLabels:_?.map(te=>te.label),rateLabels:C?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:H})})}const Mu=120,zv={left:38,right:16,top:26,bottom:24};function Wv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const M=Z=>m(Math.round(Z)||null);if(M(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const X=new ResizeObserver(([Z])=>M(Z.contentRect.width));return X.observe(g),()=>{X.disconnect()}},[g]);const{payload:C,anchorRect:f,openAfterDelay:x,close:b}=Iy(Mu),B=o.useCallback((M,X)=>{M&&x(M,X.getBoundingClientRect())},[x]),_=p??i,N=l,{left:v,right:k,top:w,bottom:A}={...zv,...u},[D,E]=t,R=M=>E===D?v:v+(_-v-k)*(M-D)/(E-D),$=M=>w+(N-w-A)*(100-M)/100,G={x:R,y:$,plot:{left:v,right:_-k,top:w,bottom:N-A,width:Math.max(0,_-v-k),height:Math.max(0,N-w-A)}},T=e.filter(M=>!M.hollow),F=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:ke("line-chart",h),viewBox:`0 0 ${_} ${N}`,role:"img","aria-label":d??e.map(M=>M.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(M=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:v,x2:_-k,y1:$(M),y2:$(M)}),n.jsxs("text",{className:"line-chart__tick",x:v-6,y:$(M)+4,textAnchor:"end",children:[M,"%"]})]},M)),c?.(G),a.map(M=>n.jsx("text",{className:"line-chart__tick",x:R(M.x),y:N-5,textAnchor:"middle",children:M.label},M.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:F,points:T.map(M=>`${R(M.x)},${$(M.pct)}`).join(" ")}),e.map(M=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:X=>B(M.description,X.currentTarget),onPointerLeave:b,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:R(M.x),cy:$(M.pct),r:12}),n.jsx("circle",{className:ke("line-chart__dot-main",M.hollow&&"is-hollow"),cx:R(M.x),cy:$(M.pct),r:4,stroke:F,fill:M.hollow?void 0:F})]},M.x))]}),C!=null&&n.jsx(vn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function Hv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:ke("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:ke("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>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,p)=>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})]},p))]},d)),i&&n.jsx(ve,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Lu=(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")}`},$u=(e,t,a,r)=>({from:Vl(e,t,a),to:new Date(Vl(e,t,a+r).getTime()-1),fromYmd:Lu(e,t,a),toYmd:Lu(e,t,a+r-1)});function Vv(e,t=0){if(e.period==="month"){const s=fa(e.monthRange),l=ua(),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 $u(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Ra();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=An(a.year,a.month-1);return $u(a.year,a.month-1,r+(a.week+t)*7,7)}const Vo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Ru(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Pu({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 d=typeof s=="number"?s:Vo[s].diameter,h=l??(typeof s=="number"?12:Vo[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((b,B)=>{const _=b.length>0?b[b.length-1].acc:0,N=Number.isFinite(B.ratio)?B.ratio:0,v=Math.max(0,Math.min(N,1-_));return b.push({color:B.color,rotate:-90+_*360,dash:g*v,acc:_+v}),b},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((b,B)=>b.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:b.color,strokeWidth:h,strokeDasharray:`${b.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${b.rotate} ${p} ${p})`},B))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,f=g-C;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Ru(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function qv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=Be.useTranslation();if(!e)return n.jsx(Pu,{...g});const C=(g.total??0)>0?Ru(Math.min((g.done??0)/g.total,1)):0,f=g.size==="small",x=typeof g.size=="number"?g.size:Vo[g.size??"medium"].diameter,b=g.size==="large",B=[c,f?"chart-section--compact":b?"chart-section--full":""].filter(Boolean).join(" ")||void 0,_=r&&n.jsx("span",{className:le("chart-section-icon"),children:n.jsx(tt,{icon:r,className:le("chart-section-icon-inner")})});return n.jsx(Oo,{className:B,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:_||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(Ja,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:C}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Fo,{items:i})]}),children:u?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:x,height:x},"aria-busy":"true",children:n.jsx(da,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Pu,{...g,hideCenter:g.hideCenter??f})})})}function Uv({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=Fa(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:le(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Dn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:le("stat-chart__card__label-row"),children:[n.jsx("span",{className:le("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:le("stat-chart__card__icon"),children:n.jsx(tt,{icon:s,className:le("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:le("stat-chart__card__content"),children:[n.jsxs("div",{className:le("stat-chart__card__left"),children:[n.jsx("div",{className:le("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:le(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:le("stat-chart__card__body"),children:u})]})]})}function Iu({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:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:b=!1,showFillTick:B=!1,tickStep:_,tickShape:N="dot"}){t&&!c&&kt("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)),k=r>a?(v-a)/(r-a):0,w=l==="vertical",A=!t,D=Q=>t?.(Number(Q.target.value)),E=typeof d=="number"?`${d}px`:d,R={"--slider-ratio":String(k),"--slider-thumb":`${i}px`,...E?w?{height:E}:{width:E}:{}},$=_??s,G=(b||B)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(G>0&&G<=100){const Q=N!=="dash",H=ae=>Q?`radial-gradient(circle, ${ae} 0.5px, transparent 1px)`:w?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`,S=Q?"2px":"4px",P=[],L=[],U=[];for(let ae=0;ae<=G;ae++){const se=ae*$/(r-a);if(se>1+1e-6)break;const me=`${((w?1-se:se)*100).toFixed(4)}%`,te=se<=k+1e-6;if(te?!B:!b)continue;const z=te?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";P.push(H(z)),L.push(w?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),U.push(w?`center ${me}`:`${me} center`)}P.push(w?"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))"),L.push("100% 100%"),U.push("0 0"),R.backgroundImage=P.join(", "),R.backgroundSize=L.join(", "),R.backgroundPosition=U.join(", "),R.backgroundRepeat="no-repeat"}const T=m?m(v):p==="percent"?`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`:p==="count"?`${v} / ${r}`:v===a&&f?f:v===r&&x?x:void 0,F=n.jsx("input",{type:"range",className:ke("slider",`slider--${l}`,A&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:v,disabled:u,readOnly:A,tabIndex:A?-1:void 0,"aria-label":c,"aria-valuetext":T,"aria-orientation":l,onChange:D,style:R});if(!p&&!C)return F;const M=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),X=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),Z=C?n.jsxs("div",{className:ke("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[w?X:M,F,w?M:X]}):F;if(!p)return Z;const O=g??(w?"bottom":"right"),Y=`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`,I=m?m(v):p==="percent"?Y:p==="count"?`${v} / ${r}`:String(v),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:I});return n.jsxs("div",{className:ke("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${O}`,`slider-wrap--align-${y}`,h),children:[Z,q]})}const Gv=.86,Kv=250,qo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Uo=(e,t,a,r)=>{const s=qo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Go({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,b]=o.useState(null);o.useEffect(()=>{const v=F=>{const M=Uo(F,c,d,h);C.current&&(C.current.textContent=M);const X=g.current;X&&(X.setAttribute("aria-valuenow",String(qo(F,c,d,h))),X.setAttribute("aria-valuetext",M))},k=e??W1(t)??(x&&x.el===t?x.node:null),w=y.current;if(!k||!w){w?.style.setProperty("--meter-level","0"),v(u);let F=!1;return!e&&t&&rr(t).then(M=>{!F&&M&&b({el:t,node:M})}),()=>{F=!0}}to();const A=new Float32Array(k.fftSize);let D=0,E=0,R=0,$=0,G=null;const T=F=>{const M=H1(k,A);D=M>D?M:D*Gv;const X=D>1e-5?20*Math.log10(D):-1/0,Z=Math.max(u,X),O=Z-c,Y=Math.min(1,Math.max(0,(O-d)/(h-d)));if(w.style.setProperty("--meter-level",Y.toFixed(3)),E+=Z,R+=1,F-$>=Kv){const I=E/R;G=G==null?I:G*.6+I*.4,v(G),E=0,R=0,$=F}f.current=requestAnimationFrame(T)};return f.current=requestAnimationFrame(T),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,d,h]);const B=typeof r=="number"?`${r}px`:r,_=n.jsx("div",{className:"audio-meter__track",style:B?a==="vertical"?{height:B}:{width:B}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),N=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:ke("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":qo(u,c,d,h),"aria-valuetext":Uo(u,c,d,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Uo(u,c,d,h)})]})}const Fu=260;function Ou({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),b=o.useRef(null),B=o.useRef(null),_=o.useRef(null),N=o.useRef(null),v=o.useRef(()=>{});v.current=A=>{A<0||(C.current=Date.now(),f.current=A,y.current=setTimeout(()=>{y.current=null,l(!1),b.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Fu)},A))};const k=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)))},[]),w=o.useCallback(()=>{x.current&&(x.current=!1,v.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)),e){if(d.current)return g>0&&!y.current&&(x.current?f.current=g:v.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)};const A=()=>{const D=h.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(A(),l(!0)):(u(!0),B.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{A(),l(!0)})})),g>0&&(x.current=!1,v.current(g))}else l(!1),b.current=setTimeout(()=>u(!1),Fu);return p.current=e,()=>{y.current&&clearTimeout(y.current),b.current&&clearTimeout(b.current),B.current&&cancelAnimationFrame(B.current),_.current&&cancelAnimationFrame(_.current),N.current&&clearTimeout(N.current),y.current=null,b.current=null,B.current=null,_.current=null,N.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:k,resume:w}}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:d}=Ou({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=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:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?un.createPortal(y,document.body):y}const Yv=24;function Zv({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=Yv?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),b={};return r&&(b["--progress-bar-fill"]=r),s&&(b["--progress-bar-track"]=s),n.jsxs("div",{className:ke("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:b,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":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Xv="rgba(255, 255, 255, 0.16)";function Wu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Be.useTranslation(),d=fn("(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,p=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"]=Xv),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:p,children:[i&&n.jsx("span",{style:zu,children:p}),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 g=i?n.jsx("span",{role:"status",style:zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,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 Jv(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 Qv(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=Hu(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Hu(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function e4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Hu(parseInt(a[1],10)):1}function t4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,g)=>p+(a(g)?m:0),0),i=e.reduce((p,m,g)=>p+(a(g)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,g)=>p+(a(g)?0:m),0));if(h!==0){let p=-1;d.forEach((m,g)=>{!a(g)&&(p<0||m>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const n4=16;function a4(e,t=n4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function r4({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 Ko({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=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(da,{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?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function o4({dir:e}){return n.jsx(e==="asc"?Js:Xs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function s4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(o4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:ke("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 Vu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Yo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,size:b="small",title:B,icon:_,count:N,collapsed:v=!1,onToggleCollapse:k,headerActions:w,empty:A,loading:D,dragOver:E=!1,onDragOver:R,onDragLeave:$,onDrop:G,renderExpandedRow:T,expandedId:F}){const{t:M}=Be.useTranslation(),X=o.useId(),Z=`table-title-${X}`,O=`table-row-hint-${X}`,[Y,I]=o.useState(null),q=o.useCallback((re,fe)=>{const Pe=e[fe];if(!Pe)return;if(Pe.sortValue)return Pe.sortValue(re);if(Pe.sortKey)return re[Pe.sortKey];const Ve=l(re)[fe]?.content;return typeof Ve=="string"||typeof Ve=="number"?Ve:void 0},[e,l]),Q=!t&&a&&!e.some(re=>re.sortDir!==void 0||re.onClick),H=o.useCallback(re=>{const fe=e[re];if(!fe||fe.sortable===!1)return!1;if(fe.sortValue||fe.sortKey)return!0;const Pe=s[0];return Pe!==void 0&&q(Pe,re)!==void 0},[e,s,q]),S=o.useMemo(()=>t?e.map(re=>{if(!re.sortKey||re.sortDir!==void 0)return re;const fe=t.field(String(re.label??""),re.sortKey);return{...re,sortDir:fe.sortDir,onClick:re.onClick??fe.onClick}}):Q?e.map((re,fe)=>H(fe)?{...re,sortDir:Y?.index===fe?Y.asc?"asc":"desc":null,onClick:()=>I(Pe=>Pe?.index===fe?{index:fe,asc:!Pe.asc}:{index:fe,asc:!0})}:re):e,[e,t,Q,Y,H]),P=o.useMemo(()=>{if(!Q||!Y)return s;const{index:re,asc:fe}=Y;return[...s].sort((Pe,Ve)=>hr(q(Pe,re),q(Ve,re),fe))},[s,Q,Y,q]),L=fn("(max-width: 767px)"),U=y&&L?y:null,ae=C&&!L,se=o.useRef(ae);se.current=ae;const me=48,te=40,z=o.useRef(()=>me),ne=x?`table-cols:${x}`:null,W=o.useRef(null),V=o.useRef(null),pe=o.useRef(null),Ee=o.useRef(null),[xe,Ce]=o.useState(!1),[ce,ge]=o.useState(0),be=o.useCallback(()=>{const re=pe.current;if(!re)return;const fe=Ee.current,Pe=W.current;if(fe&&(fe.style.minWidth="",Pe)){const Ve=Pe.scrollWidth,ft=se.current?te:0;fe.style.minWidth=Ve>re.clientWidth+1?`${Ve+ft}px`:""}Ce(re.scrollWidth>re.clientWidth+1),ge(re.clientWidth)},[]),he=o.useCallback((re,fe)=>{const Pe=re.current;Pe&&V.current&&V.current.unobserve(Pe),re.current=fe,fe?(!V.current&&typeof ResizeObserver<"u"&&(V.current=new ResizeObserver(()=>be())),V.current?.observe(fe)):!pe.current&&!Ee.current&&(V.current?.disconnect(),V.current=null),be()},[be]),Me=o.useCallback(re=>he(pe,re),[he]),We=o.useCallback(re=>he(Ee,re),[he]);o.useEffect(()=>{be()}),o.useEffect(()=>{if(typeof window>"u")return;const re=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>be()):null;return window.addEventListener("resize",be),()=>{re!=null&&cancelAnimationFrame(re),window.removeEventListener("resize",be)}},[be]);const Re=o.useRef(()=>!1),qe=o.useRef([]),He=o.useRef(null),st=re=>{if(!re||typeof window>"u")return null;try{const fe=JSON.parse(window.localStorage.getItem(re)??"null");return Array.isArray(fe)&&fe.length>0&&fe.every(Pe=>typeof Pe=="number"&&Number.isFinite(Pe)&&Pe>0)?fe:null}catch{return null}},[lt,Qe]=o.useState(()=>st(ne)),[dt,Se]=o.useState(ne),[Ge,Ne]=o.useState(()=>st(ne)!==null);if(dt!==ne){Se(ne);const re=st(ne);Qe(re),Ne(re!==null)}const Ie=o.useRef(lt);o.useEffect(()=>{Ie.current=lt},[lt]);const Je=o.useCallback(re=>{const fe=He.current;if(!fe)return;const Pe=Ie.current;if(Pe){const Ve=[...Pe],ft=()=>me;if(fe.next!=null&&fe.startWNext!=null){const ot=re.clientX-fe.startX,zt=Math.max(ft()-fe.startW,Math.min(fe.startWNext-ft(),ot));Ve[fe.index]=fe.startW+zt,Ve[fe.next]=fe.startWNext-zt}else Ve[fe.index]=Math.max(ft(),fe.startW+(re.clientX-fe.startX));Ie.current=Ve,Qe(Ve)}},[]),nt=o.useCallback(()=>{if(He.current=null,window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",nt),window.removeEventListener("pointercancel",nt),document.body.style.cursor="",document.body.style.userSelect="",ne&&Ie.current)try{window.localStorage.setItem(ne,JSON.stringify(Ie.current))}catch{}},[Je,ne]),Nt=o.useCallback((re,fe)=>{fe.preventDefault(),fe.stopPropagation();const Pe=W.current;if(!Pe)return;const Ve=Array.from(Pe.children).map(ot=>ot.getBoundingClientRect().width),ft=f==="fit"?S.findIndex((ot,zt)=>zt>re&&ot.resizable!==!1):-1;He.current=ft>=0?{index:re,startX:fe.clientX,startW:Ve[re],next:ft,startWNext:Ve[ft]}:{index:re,startX:fe.clientX,startW:Ve[re]},Ie.current=Ve,Qe(Ve),Ne(!0),window.addEventListener("pointermove",Je),window.addEventListener("pointerup",nt),window.addEventListener("pointercancel",nt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Je,nt,f,S]),_t=o.useCallback(()=>{const re=W.current,fe=re?.closest(".table-wrap");if(!re||!fe)return null;const Pe=fe.style.getPropertyValue("--table-grid-cols");fe.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Ve=Array.from(fe.querySelectorAll(".table-row")).filter(xt=>!xt.classList.contains("table-row--loading")&&!xt.classList.contains("table-row--empty")),ft=xt=>Array.from(xt.children).map(Rt=>{const Ut=window.getComputedStyle(Rt);return{width:Rt.getBoundingClientRect().width,span:e4(Ut.gridColumnStart,Ut.gridColumnEnd)}}),ot=parseFloat(window.getComputedStyle(re).columnGap)||0,zt=Ve.map(ft),Jt=ft(re),Qt=Qv([Jt,...zt],S.length,ot),$t=a4(S.map((xt,Rt)=>({declaredMin:z.current(Rt),headWidth:Jt[Rt]?.width??0,sortable:xt.sortDir!==void 0||!!xt.onClick,sorted:!!xt.sortDir}))),on=xt=>$t[xt]??z.current(xt),sn=S.map((xt,Rt)=>{const Ut=Qt[Rt],Gt=Re.current(Rt)?parseFloat(qe.current[Rt]):NaN;return Number.isFinite(Gt)&&Math.ceil(Ut)>Gt&&kt(`table-fixed-col-overflow:${Rt}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${Rt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ut)}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(Ut)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(z.current(Rt),Math.ceil(Ut))}),Pt=window.getComputedStyle(re),xn=re.clientWidth-(parseFloat(Pt.paddingLeft)||0)-(parseFloat(Pt.paddingRight)||0);return Pe?fe.style.setProperty("--table-grid-cols",Pe):fe.style.removeProperty("--table-grid-cols"),t4(sn,{isFixed:xt=>Re.current(xt),floorOf:on,containerWidth:xn})},[S,f]),Lt=(re,fe)=>re!==null&&re.length===fe.length&&re.every((Pe,Ve)=>Pe===fe[Ve]),et=o.useRef(_t);o.useEffect(()=>{et.current=_t});const[at,Et]=o.useState(0),wt=P.length>0,Tt=`${ne??""}|${at}|${S.length}|${ce}`,Dt=!Ge&&ae&&ne!==null&&!D?`${Tt}|${wt?1:0}`:null,gt=o.useRef(null);o.useEffect(()=>{if(Dt===null||!wt||gt.current===Tt)return;const re=et.current();re&&(gt.current=Tt,Qe(fe=>Lt(fe,re)?fe:re))},[Dt]);const rt=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}Ne(!1);const re=et.current();Qe(re),Ie.current=re,Et(fe=>fe+1)},[ne]);o.useEffect(()=>()=>{He.current&&(window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",nt),window.removeEventListener("pointercancel",nt),document.body.style.cursor="",document.body.style.userSelect="")},[Je,nt]);const ut=S.length>0&&S.every(re=>re.width!=null)?S.map(re=>typeof re.width=="number"?`${re.width}px`:String(re.width)).join(" "):null;S.some(re=>re.width!=null)&&!ut&&kt(`table-field-width:${S.map(re=>re.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."),ut&&g&&kt("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 ye=g??ut??void 0,Le=Jv(ye),je=Le.filter(re=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(re));je.length>0&&kt(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${je.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: ${g})`);const Ze=S.findIndex(re=>!!re.sortDir);S.filter(re=>!!re.sortDir).length>1&&kt("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 Ue=re=>re===Ze?S[re].sortDir==="asc"?"ascending":"descending":S[re].onClick?"none":void 0,yt=re=>/^\d+(\.\d+)?px$/.test(Le[re]??""),bt=re=>{const fe=Le[re]??"",Pe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(fe)??/^(\d+(?:\.\d+)?)px$/.exec(fe);return Pe?parseFloat(Pe[1]):me};Re.current=yt,z.current=bt,qe.current=Le;const Bt=re=>f==="fit"&&!yt(re)?"fr":"px",pt=lt&<.length===S.length&&!L,vt=U??(pt?S.map((re,fe)=>re.resizable===!1&&Le[fe]?Le[fe]:`${lt[fe]}${Bt(fe)}`).join(" "):ye),Te=vt?{"--table-grid-cols":vt}:void 0,it=B!==void 0;return n.jsxs("div",{ref:Me,className:`table-wrap table-wrap--${b}${ae?" table-wrap--resizable":""}${E?" table-wrap--dragover":""}${v?" table-wrap--collapsed":""}`,style:Te,onDragOver:R,onDragLeave:$,onDrop:G,tabIndex:xe?0:void 0,role:xe?"region":void 0,"aria-label":xe?typeof B=="string"?B:M("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:M("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:We,role:"table","aria-labelledby":it&&typeof B=="string"?Z:void 0,className:"table body-2",children:[it&&n.jsxs("div",{className:ke("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(ve,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:v?"chevron-right":"chevron-down",ariaLabel:v?M("common.expand","\uD3BC\uCE58\uAE30"):M("common.collapse","\uC811\uAE30"),ariaExpanded:!v,className:"table-header__chevron"}),_&&n.jsx(tt,{icon:_,label:typeof B=="string"?B:void 0,className:"table-header__icon"}),n.jsx("span",{id:Z,className:"table-header__title h5b",children:B}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),w&&n.jsx("span",{className:"table-header__actions",onClick:re=>re.stopPropagation(),children:w})]}),!v&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((re,fe)=>n.jsx("div",{role:"columnheader","aria-colspan":re.span,className:ke("table-field body-3",re.className),style:{gridColumn:`span ${re.span}`},children:re.label},fe))}),n.jsxs("div",{role:"presentation",className:ke("table-fields-strip",ae&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:W,children:S.map((re,fe)=>n.jsx(s4,{onClick:re.onClick,className:ke(re.className,Vu(re.align)),sortDir:re.sortDir,ariaSort:Ue(fe),onResizeStart:ae&&fe<S.length-1&&re.resizable!==!1&&(f!=="fit"||S.some((Pe,Ve)=>Ve>fe&&Pe.resizable!==!1))?Pe=>Nt(fe,Pe):void 0,children:re.label},fe))}),ae&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(ve,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:rt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Ko,{variant:"loading",colSpan:S.length||void 0}):P.length===0&&A?n.jsx(Ko,{variant:"empty",colSpan:S.length||void 0,children:A}):P.map((re,fe)=>{const Pe=m!=null&&re.id===m,Ve=!!i&&(u?u(re):!0),ft=F!=null&&re.id!=null&&(F instanceof Set?F.has(re.id)||[...F].some(ot=>String(ot)===String(re.id)):String(re.id)===String(F));return n.jsx(Ko,{className:`${Ve?" table-row--clickable":""}${h?" table-row--draggable":""}${Pe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ve?()=>i(re):void 0,colSpan:S.length||void 0,rowHasButton:l(re).some(ot=>!!ot.rowLabel),describedBy:O,onMouseEnter:c?ot=>c(re,ot):void 0,onMouseLeave:d?ot=>d(re,ot):void 0,onDragStart:h?ot=>h(re,ot):void 0,onDragEnd:p?ot=>p(re,ot):void 0,expandedContent:ft&&T?T(re):void 0,children:l(re).map((ot,zt)=>n.jsx(r4,{className:ke(ot.className,Vu(S[zt]?.align)),style:ot.style,span:ot.span,rowLabel:Ve?ot.rowLabel:void 0,onRowClick:Ve?()=>i(re):void 0,children:ot.content},zt))},re.id!=null?`${typeof re.id}:${re.id}`:`__idx:${fe}`)})})]})]})]})}const l4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function qu(e){return e?l4[e]??null:null}function Uu(e){switch(qu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Gu(e,t){const a=qu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Zo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=Wl(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 i4(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Ku(e,t){return t!=="wornAt"?String(e[t]??""):i4(e.wornYear,e.wornMonth,e.wornDay)}function u4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Be.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=Dy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((b,B)=>{if(f==="worn"){const _=Number(B.worn)-Number(b.worn);return x?_:-_}return hr(Ku(b,f),Ku(B,f),x)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Ey(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Io,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(ve,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Yo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:g.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(ku,{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:d(f.side)})},{content:f.device?n.jsx(jt,{size:"small",variant:Uu(f.device),fill:"soft",label:Gu(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:Zo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(ve,{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 Yu(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 c4(e,t){return new Date(e,t+1,0).getDate()}function d4(e,t){return new Date(e,t,1).getDay()}function p4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=Be.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=lo(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const v={};return e.forEach(k=>{v[k.date]||(v[k.date]=[]),v[k.date].push(k)}),v},[e]),x=o.useMemo(()=>{const v=c4(d,p),k=d4(d,p),w=[];for(let A=0;A<k;A++)w.push(null);for(let A=1;A<=v;A++)w.push(A);for(;w.length<35;)w.push(null);return w},[d,p]),b=o.useCallback(()=>{p===0?(h(v=>v-1),m(11)):m(v=>v-1)},[p]),B=o.useCallback(()=>{p===11?(h(v=>v+1),m(0)):m(v=>v+1)},[p]),_=v=>`${d}-${String(p+1).padStart(2,"0")}-${String(v).padStart(2,"0")}`,N=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:b,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:B,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{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,k)=>{if(v===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${k}`);const w=v,A=_(w),D=f[A]??[],E=Wl(A,i.language),R=g===A;return n.jsxs("div",{className:`calendar-cell${N(w)?" today":""}${R?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:A}):void 0,"aria-current":N(w)?"date":void 0,onClick:r?()=>r(A):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(A)))}:void 0,onDragOver:a?$=>{$.preventDefault(),y(A)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||y(null)}:void 0,onDrop:a?$=>{$.preventDefault(),C.current!=null&&(a(C.current,A),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:w}),D.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),G=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.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":`${E} ${G}`,children:[$.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map(($,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{C.current=$.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t($)}:void 0,...Yu(t?()=>t($):void 0),"aria-label":[E,$.time?Gl($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Gl($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??G))})]},w)})]})]})}const h4={page:"h3",pagePopup:"h4",popup:"h5"};function ya({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=h4[e],p=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:ke("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{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 Xo=null,Zu=!1;function Xu(){if(Zu||typeof document>"u")return;Zu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Xo="keyboard")},!0);const e=()=>{Xo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Xu();function gr(){return Xu(),Xo==="keyboard"}const yr=20;function m4(e){const{t}=Be.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,b]=o.useState(Math.min(f,yr)),B=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{b(Math.min(f,yr))},[f]),Ii("speechear.data.updated",()=>y(k=>k+1));const _=o.useRef(null),N=o.useRef(null);function v(){const k=document.activeElement;N.current=gr()&&k&&k.closest?.(".training-block__more")?x:null,b(w=>Math.min(f,w+yr))}return o.useEffect(()=>{const k=N.current;if(k==null)return;N.current=null;const w=document.activeElement;w&&w!==document.body||_.current?.querySelectorAll(".training-block-button")[k]?.focus()},[x]),n.jsxs(ya,{type:g,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((k,w)=>{const A=k;return n.jsx(Lo,{index:w,type:a,trainingData:A,depth:B,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&A?.id!=null&&u.has(String(A.id))?()=>p(A):void 0,onComplete:typeof c=="function"&&A?.id!=null?()=>c(String(A.id)):void 0,onMore:typeof m=="function"?D=>m(A,D):void 0},A?.id!=null?`${a?.key||"t"}-${String(A.id)}`:`${a?.key||"t"}-${w}`)})}),f>yr&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(ve,{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 C4(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 f4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??C4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(b=>b.width===f&&b.card===x?b:{width:f,card:x})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?Cf(l.width,c,e):0,h=d>0?ff(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:ke("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function Jo(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 b4='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 g4=b4,Qo=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:d=null},h){const{t:p}=Be.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,b]=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))&&b({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const B=o.useRef(null),_=fn("(max-width: 767px)"),[N,v]=o.useState(!1),[k,w]=o.useState(!1),A=`${typeof y=="string"?y:y?.src??""}\0${m}`,[D,E]=o.useState({for:"",url:""}),R=D.for===A?D.url:"",$=Fl(),G=e.textOnly??(!e.image&&!!x.label&&!!$&&$.entries.length>0&&!$.byWord.has(x.label)),T=G?"":ia()?.(x.label,x.homonum)??e.image??"",{imgRef:F,loading:M,hasImage:X,onLoad:Z,onError:O}=Jo(T);o.useEffect(()=>{let U=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){E({for:A,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const se=y.src;if(se){E({for:A,url:se});return}}}const ae=Da();if(ae&&m)try{const se=await Promise.resolve(ae(m));!U&&se&&E({for:A,url:se})}catch{}})(),()=>{U=!0}},[y,m,A]);const Y=o.useRef(!0),I=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,I.current&&fr(I.current),I.current=null;try{B.current?.pause()}catch{}B.current=null}),[]);const q=o.useCallback(()=>new Promise(U=>{if(typeof window<"u"&&window.speechSynthesis&&m){v(!0),window.speechSynthesis.cancel();const ae=new SpeechSynthesisUtterance(m);ae.lang="ko-KR",ae.onend=()=>{v(!1);try{a?.()}catch{}U()},ae.onerror=()=>{v(!1),U()},window.speechSynthesis.speak(ae)}else U()}),[m,a]),Q=o.useCallback(U=>{const ae=Ga(U,se=>{if(v(!1),se)try{a?.()}catch{}});return B.current=ae.el,ae.done},[a]),H=o.useCallback(async()=>{if(t||!Y.current)return;const U=()=>{I.current===U&&(I.current=null);try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1)},ae=Ua(U);I.current=U;try{window.speechSynthesis?.cancel()}catch{}try{if(R&&(v(!0),await Q(R)))return;const se=ar();if(se&&m)try{w(!0);const me=await Promise.resolve(se(m));if(!Y.current||I.current!==U||(w(!1),me&&(v(!0),await Q(me))))return}catch{}if(!Y.current||I.current!==U)return;await q()}finally{I.current===U&&w(!1),ae(),I.current===U&&(I.current=null)}},[t,R,m,Q,q]);o.useImperativeHandle(h,()=>({play:()=>H()}),[H]);const S=U=>U.stopPropagation(),P=o.useCallback(U=>{if(U.stopPropagation(),!t){if(N){try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1);return}H()}},[t,N,H]),L=ke("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:L,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?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" "||U.key==="Spacebar")&&(U.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:S,children:n.jsx(jt,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:G?n.jsx("div",{className:"training-word-card__text-face",children:x.label}):X?n.jsxs(n.Fragment,{children:[M&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:F,className:"training-word-card__image",src:T,alt:x.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:M?0:1},onLoad:Z,onError:O})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!G&&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?S:void 0,children:n.jsx(ve,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:N?"pause":"play",label:_?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:k,onClick:P,disabled:t,ariaLabel:p("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("${g4}")`}})})]})})}),y4=260;function Hn(e){const{t}=Be.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:b=!0,className:B="",ariaLabel:_,useTitle:N=!0,inline:v=!1,size:k,layer:w="modal",height:A,fillBody:D=!1,resetScrollKey:E}=e||{},[R,$]=o.useState(!1),G=o.useRef(!1),T=o.useRef(null),F=o.useId(),M=o.useRef(null);o.useEffect(()=>{},[v,a,_,B]),o.useEffect(()=>{E!==void 0&&M.current&&(M.current.scrollTop=0)},[E]);const[X,Z]=o.useState(!1);o.useEffect(()=>{const z=M.current;if(!z)return;const ne=()=>Z(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(ne);W.observe(z);const V=z.firstElementChild;return V&&W.observe(V),()=>W.disconnect()},[i,E]),o.useEffect(()=>{if(!v)return yu()},[v]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(v)return;const z=O.current,ne=T.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(Bn)??ne).focus(),()=>{const W=document.activeElement;(!W||W===document.body||ne&&ne.contains(W))&&bo(z)?.focus?.()}},[v]),mo(T,!v);const Y=o.useRef(!0),I=go(),q=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Q=o.useCallback(()=>{!Y.current||!G.current||(G.current=!1,$(!1))},[]),H=o.useCallback((z,ne=!1)=>{if(ne&&!Y.current||G.current)return;G.current=!0,$(!0);const W=setTimeout(()=>{q.current===W&&(q.current=null);let V;try{V=z?z():void 0}catch{Q();return}V&&typeof V.then=="function"&&V.then(()=>{setTimeout(Q,120)},Q)},I?0:y4);ne&&(q.current=W)},[Q,I]),S=o.useCallback(()=>{f||x&&x()===!1||H(C,!0)},[H,C,f,x]),P=o.useRef(S);o.useEffect(()=>{P.current=S});const L=!v&&!!C;o.useEffect(()=>{if(L)return Kn(()=>P.current())},[L]);const U=L&&b,ae=o.useRef(!1),se=z=>{ae.current=z.target===z.currentTarget},me=z=>{const ne=ae.current;ae.current=!1,ne&&z.target===z.currentTarget&&S()},te=n.jsx("div",{className:`popup ${v?"popup--inline":""} ${w==="belowPagePopup"?"popup--below-page-popup":""} ${R?"popup--closing":""} ${B}`,onPointerDown:U?se:void 0,onClick:U?me:void 0,onMouseDown:v?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${k?` popup-panel--${k}`:""}${A!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:A!=null?{"--popup-height":typeof A=="number"?`${A}px`:A}:void 0,tabIndex:-1,role:v?void 0:"dialog","aria-modal":v?void 0:!0,"aria-labelledby":!v&&N&&a?F:void 0,"aria-label":!v&&!(N&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!N&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(ve,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,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:F,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:F,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(kn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(ve,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:M,tabIndex:X?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:H,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:H,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:H,closeWithAnimation:S}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((z,ne)=>n.jsx(ve,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:H,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:H,closeWithAnimation:S}):c}):null]})});return v||typeof document>"u"?te:un.createPortal(te,document.body)}function vr(e){return String(e)}const _r=["o","triangle","x"];function Ju(e,t){return e===t?null:t}const Qu={o:"circle",triangle:"triangle",x:"x"},ec={o:"main",triangle:"warn",x:"danger"};function v4(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 es(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function tc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function _4(e,t){return!t&&e>0}const Qn={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 x4(e="landscape"){kt("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}=Qn[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 w4(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 B4={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 nc(e,t){const a=B4[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 k4(e,t){const a=nc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=Qn[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/lc,i/g/ic),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const A4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},ac={\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"},rc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ts={\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"},ns={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function oc(e){return Object.fromEntries(Object.entries(ac).map(([t,a])=>[t,ts[t]?e(`wordTable.pos.${ts[t]}`,{defaultValue:a}):a]))}function sc(e){return Object.fromEntries(Object.entries(rc).map(([t,a])=>[t,ns[t]?e(`wordSearch.filter.type.${ns[t]}`,{defaultValue:a}):a]))}const N4={pos:ts,wordType:ns};function as(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function rs(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",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const lc=280,E4=240,D4=280,ic=400,S4=120,j4=280;function uc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const T4=24,M4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},L4=400,cc=8;function os({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,homonum:l,showWord:i=!0,showImage:u=!0,showPronunciation:c=!0,showColloquial:d=!0,showCaption:h=!0,buttonSize:p=40,wordInfo:m,outerScale:g=1}){const{t:y}=Be.useTranslation(),C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),[b,B]=o.useState(1),[_,N]=o.useState(!1),[v,k]=o.useState(!1),[w,A]=o.useState({for:"",url:""}),[D,E]=o.useState(null),R=t&&t.length>0?t:O1()?.(e,l)??"",$=ia()?.(e,l)??"",{imgRef:G,loading:T,failed:F,onLoad:M,onError:X}=Jo($),Z=o.useCallback(()=>E(f.current?.getBoundingClientRect()??null),[]),O=o.useCallback(()=>E(null),[]),Y=vo(!!D,te=>{te?Z():O()},f),I=o.useMemo(()=>{if(!m)return null;const te=[];return m.grade&&te.push(y("wordTable.info.grade",{n:m.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),m.syllables&&te.push(y("wordTable.info.syllables",{n:m.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),m.pos&&te.push(y("wordTable.info.pos",{v:as(m.pos,oc(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),m.wordType&&te.push(y("wordTable.info.wordType",{v:as(m.wordType,sc(y)),defaultValue:"\uC720\uD615: {{v}}"})),te.length?te:null},[m,y]),q=R||e,Q=w.for===q?w.url:"";o.useEffect(()=>{const te=Da(),z=R||e;if(!te||!z)return;let ne=!1;return Promise.resolve(te(z)).then(W=>{!ne&&W&&A({for:z,url:W})}),()=>{ne=!0}},[R,e]);const H=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),S.current?.()},[]);const P=o.useRef(null);o.useEffect(()=>()=>{P.current&&(P.current.cancelled=!0)},[]);const L=o.useCallback(te=>{if(te.stopPropagation(),_||v){H.current?.();return}if(!Q){const ne=ar(),W=R||e;if(!ne||!W)return;const V={cancelled:!1,stop:null};P.current=V;const pe=()=>{V.cancelled=!0,V.stop?.(),k(!1),N(!1),S.current?.()};H.current=pe,S.current=Ua(pe),k(!0),Promise.resolve().then(()=>ne(W)).then(Ee=>{if(V.cancelled)return;if(!Ee){pe();return}A({for:W,url:Ee});const xe=Ga(Ee,()=>{N(!1),S.current?.()});x.current=xe.el,V.stop=xe.stop,k(!1),N(!0)}).catch(()=>{pe()});return}N(!0);const z=Ga(Q,()=>{N(!1),S.current?.()});x.current=z.el,H.current=z.stop,S.current=Ua(z.stop)},[_,v,Q,R,e]),U=u&&!!$&&!F,ae=U&&i?lc:U?D4:E4,se=U&&i?ic:U?j4:S4;o.useEffect(()=>{const te=C.current;if(!te||typeof ResizeObserver>"u")return;const z=new ResizeObserver(([ne])=>{const{width:W,height:V}=ne.contentRect;B(Math.min(W/ae,V/se))});return z.observe(te),()=>z.disconnect()},[ae,se]);const me=p*g<T4;return n.jsxs("div",{ref:C,className:ke("word-table-cell",me&&"word-table-cell--tap-too-small",U?"word-table-cell--with-image":""),"data-ref-w":ae,"data-ref-h":se,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${b})`},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:G,className:"word-table-cell__image",src:$,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:M,onError:X})]}),h&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(jt,{type:"bar",fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),c&&R&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",R,"]"]}),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":Q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(ve,{htmlType:"button",size:p,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:v,showTooltipInfo:v?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:L})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(ve,{htmlType:"button",size:p,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:L})})]}),m&&n.jsxs("div",{ref:f,className:"word-table-cell__info-button",onPointerEnter:te=>{ha(te)||Z()},onPointerLeave:te=>{ha(te)||O()},onFocus:()=>{ma()||Z()},onBlur:O,children:[n.jsx(ve,{htmlType:"button",size:p,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:te=>{te.stopPropagation(),Y.touchPress()}}),D&&I&&n.jsx(Yn,{anchorRect:D,items:I,showIndex:!1})]})]})]})}function va({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:b,indexOffset:B=0,totalCount:_,renderCellAction:N,showFillerAdd:v=!1,addableCount:k,contentRef:w,buttonSize:A=40,brand:D,code:E,pageNumber:R,pageNumberPosition:$="right",fitHeight:G=!1,scoring:T=!1,marks:F,onMarkClick:M,scoreIndexOffset:X=0}){const Z=o.useCallback((ye,Le)=>{M?.(X+ye,Le)},[M,X]),O=(ye,Le)=>{const je=F?.[vr(X+ye)]??null;return n.jsx("div",{className:ke("word-table-cell__score",je?"word-table-cell__score--marked":""),style:gt>1?{transform:`translateX(-50%) scale(${gt})`,transformOrigin:"bottom center"}:void 0,children:_r.map(Ze=>n.jsx("span",{className:ke("word-table-cell__score-slot",je===Ze?"word-table-cell__score-slot--on":""),children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",shape:"pill",icon:Qu[Ze],variant:je===Ze?ec[Ze]:"default",selected:je===Ze,useBorder:!1,...Dt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:Y(`wordTable.scoring.markName.${Ze}`,{defaultValue:Ze}),ariaLabel:Y(`wordTable.scoring.${Ze}`,{word:Le,defaultValue:`${Le} ${Ze}`}),onClick:Dt?Ue=>{Ue.stopPropagation(),Z(ye,Ze)}:void 0})},Ze))})},{t:Y}=Be.useTranslation(),I=m!==void 0,q=e!=null||!!t||!!a,Q=fn("(max-width: 767px)"),H=o.useRef(null),[S,P]=o.useState(null),L=p?.length??0,U=_??L,[ae,se]=o.useState(null),[me,te]=o.useState(""),z=o.useRef(null),ne=o.useRef(null),W=o.useRef(null),V=o.useRef(null),pe=o.useCallback(ye=>{ne.current=ye,typeof w=="function"?w(ye):w&&(w.current=ye)},[w]),Ee=o.useCallback((ye,Le)=>{z.current=B+Le,b?.(ye,Le),te(Y("wordTable.reorder.moved",{n:B+Le+1,total:U,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[b,Y,U,B]);o.useEffect(()=>{const ye=z.current;ye!=null&&(z.current=null,(ne.current?.closest(".word-table-block__pages")??ne.current)?.querySelector(`[data-wordtable-index="${ye}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{V.current?.()},[]);const xe=o.useCallback((ye,Le)=>{if(!b||!ye.altKey||ye.ctrlKey||ye.metaKey)return;const je=ye.key==="ArrowRight";if(!je&&ye.key!=="ArrowLeft")return;ye.preventDefault();const Ze=Le+(je?1:-1),Ue=B+Ze;Ue<0||Ue>=U||Ee(Le,Ze)},[b,U,B,Ee]),Ce=o.useCallback((ye,Le)=>{if(!b||ye.pointerType==="mouse")return;const je=ye.target.closest?.("button");if(je&&!je.closest(".word-table__card-handle"))return;V.current?.();const Ze={x:ye.clientX,y:ye.clientY};let Ue=!1;const yt=fe=>{Ue&&fe.cancelable&&fe.preventDefault()};let bt=null,Bt=null;const pt=()=>{const fe=Bt;if(!fe)return;const Pe=document.elementFromPoint?.(fe.x,fe.y)?.closest?.("[data-wordtable-cell]"),Ve=Pe?Number(Pe.dataset.wordtableCell):NaN,ft=Number.isInteger(Ve)?Ve:null;W.current=ft,P(ot=>ot===ft?ot:ft)},vt=fe=>{if(!Ue){(Math.abs(fe.clientX-Ze.x)>cc||Math.abs(fe.clientY-Ze.y)>cc)&&re();return}if(Bt={x:fe.clientX,y:fe.clientY},typeof requestAnimationFrame>"u"){pt();return}bt===null&&(bt=requestAnimationFrame(()=>{bt=null,pt()}))},Te=()=>{bt!==null&&(cancelAnimationFrame(bt),bt=null,pt());const fe=W.current,Pe=Ue;re(),Pe&&fe!=null&&fe!==Le&&Ee(Le,fe)},it=setTimeout(()=>{Ue=!0,se(Le),W.current=Le,P(Le),window.addEventListener("touchmove",yt,{passive:!1})},L4);function re(){clearTimeout(it),window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",Te),window.removeEventListener("pointercancel",Te),window.removeEventListener("touchmove",yt),Ue=!1,bt!==null&&(cancelAnimationFrame(bt),bt=null),W.current=null,V.current=null,se(null),P(null)}V.current=re,window.addEventListener("pointermove",vt),window.addEventListener("pointerup",Te),window.addEventListener("pointercancel",Te)},[b,Ee]),{width:ce,height:ge}=Qn[s],be=typeof G=="number"?G:G&&typeof G=="object"?Q?G.narrow:G.wide:null,{scalerRef:he,scale:Me,offset:We}=uc(ce,G?ge:void 0),Re=I?m?.length??0:p?.length??0,qe=Math.max(g??Re,1),He=!I&&!!i,st=k4(s,qe),lt=nc(s,qe),Qe=He?st.cols:lt.cols,dt=He?st.rows:lt.rows,Se=He&&s==="landscape"?st.cols*2:Qe,Ge=He&&s==="portrait"?st.rows*2:dt,Ne=ye=>({word:ye.length===0||ye.includes("word"),image:ye.length===0||ye.includes("image"),pron:ye.length===0||ye.includes("standardPron"),colloq:ye.length===0||ye.includes("colloquialPron"),caption:ye.length===0||ye.includes("caption")}),Ie=Ne(l),Je=o.useMemo(()=>{const ye=(p??[]).map(je=>je.id),Le=ye.every(je=>typeof je=="string"&&je.length>0)&&new Set(ye).size===ye.length;return!Le&&ye.length>0&&kt("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?ye:null},[p]),nt=Ne(u??l),Nt=I?(m??[]).some(ye=>ye!==null&&ye.length>1):(p??[]).some(ye=>(ye.words??[]).length>1),_t=!!D?.show,Lt=!!D?.show&&D?.top!==!1,et=!!D?.show&&D?.bottom!==!1,at=D?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Et=le(ke("word-table__content",A4[c],d&&"word-table__content--outline",h&&Nt&&"word-table__content--div-line",!_t&&R&&$!=="none"&&"word-table__content--page-number",Lt&&"word-table__content--brand-top",et&&"word-table__content--brand-bottom")),wt={transform:`scale(${1/Me})`,transformOrigin:"center center"},Tt=A*_r.length+4*(_r.length-1),Dt=!!M,gt=Dt?Math.max(1,Math.min(1/Me,ce/Se/Tt)):1,rt=n.jsxs("div",{ref:he,className:"word-table__scaler",style:{height:ge*Me},children:[n.jsx("div",{className:ke("word-table",T&&!Dt&&"word-table--score-readonly",!q&&r),style:{width:ce,height:ge,transform:`scale(${Me})`,transformOrigin:"top left",marginLeft:We},children:n.jsxs("div",{ref:pe,className:Et,style:{gridTemplateColumns:`repeat(${Se}, 1fr)`,gridTemplateRows:`repeat(${Ge}, 1fr)`},children:[I?n.jsx(n.Fragment,{children:(m??[]).map((ye,Le)=>n.jsx("div",{className:le(ke("word-table__edit-cell",ye?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Le?"word-table__edit-cell--active":"")),style:rs(Le,Se,Ge,c),children:ye?n.jsxs(n.Fragment,{children:[ye.map((je,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:Me,label:je.word,subLabel:je.pronunciation,colloquialLabel:je.colloquialPronunciation,homonum:je.homonum,showWord:Ie.word,showImage:Ie.image,showPronunciation:Ie.pron,showColloquial:Ie.colloq,showCaption:Ie.caption,buttonSize:A})]},Ze)),T&&O(Le,ye.map(je=>je.word).join(" / ")),f&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ye.length>1?Y("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):Y("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ye.length>1?Y("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):Y("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Le)})})]}):C&&n.jsx("div",{style:wt,children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",icon:"plus",variant:"default",ariaLabel:Y("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:Y("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[He&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${st.cols}`,gridRow:`1 / span ${st.rows}`,...rs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ye,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:Me,label:ye.label,subLabel:ye.subLabel,colloquialLabel:ye.colloquialLabel,captionLabel:ye.captionLabel,captionBadge:ye.captionBadge,homonum:ye.homonum,showWord:nt.word,showImage:nt.image,showPronunciation:nt.pron,showColloquial:nt.colloq,showCaption:nt.caption,buttonSize:A,wordInfo:ye.grade||ye.syllables!=null||ye.pos||ye.wordType?{grade:ye.grade,syllables:ye.syllables,pos:ye.pos,wordType:ye.wordType}:void 0})]},Le))}),(p??[]).map((ye,Le)=>n.jsxs("div",{"data-wordtable-cell":b?Le:void 0,"data-wordtable-index":b?B+Le:void 0,className:le(`word-table__card${b?" word-table__card--draggable":""}${S===Le?" word-table__card--drag-over":""}${ae===Le?" word-table__card--dragging":""}`),style:rs(Le,Qe,dt,c),draggable:!!b,onPointerDown:b?je=>Ce(je,Le):void 0,onKeyDown:b?je=>xe(je,Le):void 0,onDragStart:b?()=>{H.current=Le}:void 0,onDragOver:b?je=>{je.preventDefault(),P(Le)}:void 0,onDragLeave:b?()=>P(null):void 0,onDrop:b?je=>{je.preventDefault(),H.current!==null&&H.current!==Le&&b(H.current,Le),H.current=null,P(null)}:void 0,onDragEnd:b?()=>{H.current=null,P(null)}:void 0,children:[(ye.words??[]).map((je,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:Me,label:je.label,subLabel:je.subLabel,colloquialLabel:je.colloquialLabel,captionLabel:je.captionLabel,captionBadge:je.captionBadge,homonum:je.homonum,showWord:Ie.word,showImage:Ie.image,showPronunciation:Ie.pron,showColloquial:Ie.colloq,showCaption:Ie.caption,buttonSize:A,wordInfo:je.grade||je.syllables!=null||je.pos||je.wordType?{grade:je.grade,syllables:je.syllables,pos:je.pos,wordType:je.wordType}:void 0})]},Ze)),T&&O(Le,(ye.words??[]).map(je=>je.label).join(" / ")),(N||x||b)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[x&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ye.words??[]).length>1?Y("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):Y("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(ye.words??[]).length>1?Y("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):Y("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(ye.id)})}),N?.(Le,ye),b&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Y("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:Y("wordTable.reorder.handle",{word:(ye.words??[]).map(je=>je.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Je?Je[Le]:Le)),Array.from({length:Math.max(0,Qe*dt-(p?.length??0))}).map((ye,Le)=>{const je=(p?.length??0)+Le<(k??qe);return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:v&&C&&je&&n.jsx("div",{style:wt,children:n.jsx(ve,{htmlType:"button",size:A,type:"dot",icon:"plus",variant:"default",ariaLabel:Y("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:Y("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Le)})})},`filler-${Le}`)})]}),Lt&&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:D?.topLogo?.src??Cr,alt:D?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ye=[D?.title&&n.jsx("span",{className:"word-table__paper-title",children:D.title},"t"),D?.owner&&n.jsx("span",{className:"word-table__owner",children:D.owner},"o"),E&&n.jsx("span",{className:"word-table__code",children:E},"c")].filter(Boolean);return ye.length===0?null:n.jsx("span",{className:"word-table__ident",children:ye.map((Le,je)=>n.jsxs(o.Fragment,{children:[je>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},je))})})()]})}),et&&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:[D?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:D.bottomLogo.src,alt:D.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:at})]}),n.jsxs("span",{className:"word-table__band-end",children:[D?.link&&n.jsx("span",{className:"word-table__link",children:D.link}),R&&$!=="none"&&n.jsx("span",{className:"word-table__page-count",children:Y("wordTable.filter.pageIndicator",{current:R.current,total:R.total})})]})]})}),!_t&&R&&$!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${$}`,children:Y("wordTable.filter.pageIndicator",{current:R.current,total:R.total})})]})}),b&&n.jsx("span",{role:"status",style:M4,children:me})]}),ut=be==null?rt:n.jsx("div",{className:"word-table__frame",style:{height:be},children:rt});return q?n.jsx(ya,{type:"page",icon:t,title:e,disc:a,className:ke(le("word-table__section"),r),children:ut}):ut}function $4(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=R4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function R4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==_n);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>P4(e,s)).join(", ")}function P4(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 Ln({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:f}=Be.useTranslation(),[x,b]=o.useState(l),B=i??x,_=()=>{const E=!B;b(E),u?.(E)},N=E=>{if(!s)return;const R=E.target;!R||typeof R.closest!="function"||R.closest(".filter-panel__collapse-toggle")||R.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},v=o.useMemo(()=>r!==void 0||!B?"":$4(d,h,f("common.all","\uC804\uCCB4")),[r,B,d,h,f]),k=r??(v?n.jsx("span",{className:"filter-panel__header-summary body-3",children:v}):null),w=e||a||r||s,A=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:ke("filter-panel",s?"filter-panel--collapsible":"",B?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?A:void 0,children:[w&&n.jsxs("div",{className:"filter-panel__header",onClick:s?N:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:A,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[B?k:a,s&&n.jsx(ve,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:B?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:B?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:B?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!B,onClick:_})]})]}),!B&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ke("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(E=>{const R=h[E.label],$=R===void 0||(Array.isArray(R)?R.length===0:!1),G=(E.items??[]).filter(F=>F!=null);E.allOption&&G.some(F=>(typeof F=="string"?F:F.value)===_n)&&kt(`filter-panel-all-value:${E.label}`,`[FilterPanel] '${E.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${_n}' \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=F=>{const M=typeof F=="string"?F:F.value,X=typeof F!="string"&&!!F.disabled,Z=typeof F!="string"?F.labels:void 0,O=typeof F!="string"?F.displayLabel:void 0,Y=typeof F!="string"?F.tooltip:void 0,I=typeof F!="string"?F.descriptionTooltip:void 0,q=typeof F!="string"?F.shape:void 0,Q=Array.isArray(R)?R.includes(M):R===M;return n.jsx(ve,{htmlType:"button",size:"keyboard",label:Z??O??M,type:E.itemType??(Z?"bar":M.length===1?"dot":void 0),selected:Q,disabled:X,shape:q,showTooltipInfo:!!Y,tooltipInfoText:Y,tooltipDescription:I,onClick:()=>p?.(M,E.label)},M)};return n.jsxs(o.Fragment,{children:[E.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:E.groupLabel}),E.groupAction]}),n.jsxs("div",{className:ke("filter-panel__section",E.layout==="row"?"filter-panel__section--row":"",E.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:E.displayLabel??E.label}),E.labelAction??(E.labelInfo?n.jsx(qa,{...E.labelInfo}):null)]}),E.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:E.content}):E.type==="input"?n.jsx(Jn,{className:"filter-panel__textfield",placeholder:E.placeholder,ariaLabel:E.displayLabel??E.label,value:h[E.label]??"",onChange:F=>p?.(F,E.label),error:E.error}):!E.multiple&&E.display==="segmented"?n.jsx(kn,{ariaLabel:E.displayLabel??E.label,options:[...E.allOption?[{key:_n,label:E.allLabel??f("common.all","\uC804\uCCB4"),disabled:E.allOptionDisabled}]:[],...G.map(F=>{const M=typeof F=="string"?F:F.value,X=typeof F!="string"?F.displayLabel:void 0,Z=typeof F!="string"?F.disabled:void 0;return{key:M,label:X??M,disabled:Z}})],value:$&&E.allOption?_n:h[E.label]??"",onChange:F=>p?.(F,E.label),size:32}):!E.multiple&&E.display==="dropdown"?n.jsx(bn,{className:"filter-panel__dropdown",ariaLabel:typeof E.label=="string"?E.label:void 0,size:40,options:[...E.allOption?[{value:_n,label:E.allLabel??f("common.all","\uC804\uCCB4"),disabled:E.allOptionDisabled}]:[],...G.map(F=>{const M=typeof F=="string"?F:F.value,X=typeof F!="string"?F.displayLabel:void 0,Z=typeof F!="string"?F.disabled:void 0;return{value:M,label:X??M,disabled:Z}})],value:$&&E.allOption?_n:h[E.label],onChange:F=>p?.(F,E.label)}):n.jsxs("div",{className:E.groups?"filter-panel__item-groups":"filter-panel__items",children:[E.allOption&&!E.groups&&n.jsx(ve,{htmlType:"button",size:"keyboard",label:E.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:E.allOptionDisabled,onClick:()=>p?.(_n,E.label)}),E.groups?E.groups.map((F,M)=>n.jsxs("div",{className:"filter-panel__item-group",children:[M===0&&E.allOption&&n.jsx(ve,{htmlType:"button",size:"keyboard",label:E.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:E.allOptionDisabled,onClick:()=>p?.(_n,E.label)}),F.filter(X=>X!=null).map(T)]},M)):G.map(T)]})]})]},E.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const I4=[1,2,3,4,5,6,7,8,9,10,11,12],F4=[8,6,4,2,1],hn="show",Nn="hide";function dc(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 pc(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 hc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Cc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:hn,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:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function bc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function gc(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,...F4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function yc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function O4(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:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function vc(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?hn:Nn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:Nn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:Nn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:Nn}:{}}}function xc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===_n?(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===hn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===hn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===hn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===hn),!0):!1}function z4(e){return"sections"in e}function ss(e){const{t}=Be.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(z4(e))return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:x,setters:b,showCutLine:B=!1,showDivLine2:_=!1,middleSections:N=[],extraSelected:v={},onExtraSelect:k,showPaperBands:w=!1,showTopInfo:A=!0,showBottomInfo:D=!0}=e,E=[dc(t,{hasImage:h,hasColloquial:p,hasCaption:m}),pc(t),...N,hc(t),...B?[fc(t)]:[],..._?[bc(t)]:[],...w?[mc(t),Cc(t)]:[]],R={..._c(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:A,showBottomInfo:D}),...v},$=(G,T)=>{xc(t,G,T,b)||k?.(G,T)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:E,selected:R,onSelect:$,...d,sectionAlign:"horizontal"})}function ls(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function W4(e){return ls(e).replace(/"/g,""").replace(/'/g,"'")}function is(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,_a=null;function H4(e,t,a,r="",s=""){if(e.length===0||_a&&_a.iframe.isConnected&&Date.now()-_a.at<1e4)return;const l=r?is(r):"";xr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=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}_a={iframe:u,at:Date.now()},c.open(),c.write(us(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),_a?.iframe===u&&(_a=null)},0)})}function us(e,t,a,r=!1,s="",l=""){s=s?is(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
831
831
|
`),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${ls(l)}</div>`:"",h=e.map(p=>{const m=p.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(g=>g.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(g=>g.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(g=>g.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(g=>g.remove()),m.querySelectorAll("img").forEach(g=>{g.style.opacity==="0"&&(g.setAttribute("onload","this.style.opacity=''"),g.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${m.outerHTML}</div>`}).join(`
|
|
832
832
|
`);return`<!DOCTYPE html>
|
|
833
|
-
<html${c?` lang="${
|
|
833
|
+
<html${c?` lang="${W4(c)}"`:""} data-theme="${u}">
|
|
834
834
|
<head>
|
|
835
835
|
<meta charset="utf-8">
|
|
836
836
|
${s?`<title>${ls(s)}</title>`:""}
|
|
@@ -1034,17 +1034,17 @@ ${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return p(
|
|
|
1034
1034
|
`:""}
|
|
1035
1035
|
<\/script>
|
|
1036
1036
|
</body>
|
|
1037
|
-
</html>`}const z4=1e3;function cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=Be.useTranslation(),u=o.useCallback(()=>{O4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(us(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=us(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?is(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),z4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function wc(e,t){const{t:a}=Be.useTranslation(),r=t?.paperBands===!0,[s,l]=o.useState("landscape"),[i,u]=o.useState(["image","word","standardPron"]),[c,d]=o.useState("show"),[h,p]=o.useState(!0),[m,g]=o.useState(!0),[y,C]=o.useState(!0),[f,x]=o.useState(!0),[b,k]=o.useState(8),[_,N]=o.useState("right"),v=e.length,B=e.some(Z=>(Z.words??[]).length>1),w=e.some(Z=>(Z.words??[]).some(V=>!!V.colloquialLabel)),E=Math.min(b,Math.max(v,1)),D=o.useMemo(()=>v4(e,E),[e,E]),A=D.length>1,R=E,[$,Y]=o.useState(!1);o.useEffect(()=>{let Z=!1;if(!ia()){Y(!1);return}return Promise.all(e.flatMap(V=>(V.words??[]).map(O=>Sl(O.label,O.homonum)))).then(V=>{Z||Y(V.some(Boolean))},()=>{}),()=>{Z=!0}},[e]);const T=o.useMemo(()=>[dc(a,{hasImage:$,hasColloquial:w}),pc(a),...v>0?[gc(a,{hasPairs:B,itemCount:v})]:[],hc(a),...R>1?[fc(a)]:[],...B?[bc(a)]:[],...r?[mc(a),Cc(a)]:[]],[a,$,w,v,B,A,R,r]),P={..._c(a,{contentTypes:i,orientation:s,showOutline:h,cutLine:c,showDivLine:f,showTopInfo:m,showBottomInfo:y}),...v>0?{[a(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${E}\uAC1C`}:{},...A?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:_}:{}},M=o.useCallback((Z,V)=>{xc(a,Z,V,{setContentTypes:u,setOrientation:l,setShowOutline:p,setCutLine:d,setShowDivLine:x,setShowTopInfo:g,setShowBottomInfo:C})||(V===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||V===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?k(yc(parseInt(Z),v)):V===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&N(vc(Z)))},[a,v]);return{settings:{orientation:s,contentTypes:i,cutLine:c,showOutline:h,showDivLine:f,count:R,showTopInfo:m,showBottomInfo:y},filterSections:T,filterSelected:P,handleSelect:M,pages:D,isPaginated:A,pageNumberPosition:_}}function W4({items:e,words:t,title:a,subtitle:r,emptyText:s,buttons:l,renderButtons:i,renderFooter:u,footerClassName:c,footerLayout:d,printFileName:h,showSettings:p,autoPrint:m,className:g,onClose:y,scoring:C=!1,onScoreChange:f,printHeader:x,brand:b,code:k,beforeClose:_}){const{t:N}=Be.useTranslation(),v=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ne)=>({id:`${z}-${ne}`,words:[{label:z}]})),[e,t]),{settings:B,filterSections:w,filterSelected:E,handleSelect:D,pages:A,isPaginated:R,pageNumberPosition:$}=wc(v,{paperBands:!!b?.show}),Y=o.useMemo(()=>tc(A.map(z=>z.length)),[A]),[T,P]=o.useState({}),M=o.useCallback((z,ne)=>{P(W=>({...W,[vr(z)]:Ju(W[vr(z)]??null,ne)}))},[]),Z=o.useRef(f);o.useEffect(()=>{Z.current=f});const V=o.useRef(T);o.useEffect(()=>{V.current!==T&&(V.current=T,Z.current?.(es(T)))},[T]);const O=o.useMemo(()=>es(T),[T]),te=o.useRef(null),{toastMessage:I,toastKey:U,showWarning:Q,clearToast:H}=Vi("warning"),S=o.useRef([]),F=o.useCallback(()=>R?S.current.filter(z=>z!==null):te.current?[te.current]:[],[R]),{print:L,openNewWindow:G}=cs({getElements:F,paperW:Qn[B.orientation].width,paperH:Qn[B.orientation].height,fileName:h??"",header:x??"",onPopupBlocked:()=>Q(N("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(()=>u?void 0:i?i({print:L,openNewWindow:G}):h?[{label:N("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>G()},{label:N("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>L()},...l??[]]:l,[u,i,h,l,N,L,G]),se=o.useMemo(()=>u?u({print:L,openNewWindow:G}):void 0,[u,L,G]),me=o.useRef(!1),X=o.useRef(L);return o.useEffect(()=>{X.current=L},[L]),o.useEffect(()=>{if(!m||me.current)return;const z=window.setTimeout(()=>{me.current=!0,X.current()},100);return()=>window.clearTimeout(z)},[m]),n.jsxs(Hn,{title:a??N("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:r,size:"large",className:Ne("word-table-popup",g),buttons:ae,footer:se,footerClassName:c,footerLayout:d,beforeClose:_,onClose:y,children:[v.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[p&&n.jsx(ss,{sections:w,selected:E,onSelect:D}),R?n.jsx("div",{className:"word-table-popup__pages",children:A.map((z,ne)=>n.jsx(va,{items:z,orientation:B.orientation,contentTypes:B.contentTypes,cutLine:B.cutLine,showOutline:B.showOutline,showDivLine:B.showDivLine,count:B.count,contentRef:W=>{S.current[ne]=W},pageNumber:{current:ne+1,total:A.length},pageNumberPosition:$,brand:b&&{...b,top:B.showTopInfo,bottom:B.showBottomInfo},code:k,scoring:C,scoreIndexOffset:Y[ne],marks:O,onMarkClick:M},ne))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(va,{items:v,orientation:B.orientation,contentTypes:B.contentTypes,cutLine:B.cutLine,showOutline:B.showOutline,showDivLine:B.showDivLine,count:B.count,contentRef:te,fitHeight:!0,scoring:C,marks:O,onMarkClick:M,brand:b&&{...b,top:B.showTopInfo,bottom:B.showBottomInfo},code:k})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:s??N("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ba,{message:I,position:"top",onClose:H},U)]})}const H4=new Set(["x","triangle"]);function V4(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&H4.has(s)&&a.push(e[r])}return a}const q4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Bc(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=q4.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 U4(e,t){const[,a,r]=io(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Bc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function G4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Bc(e).round}}function K4(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 Y4(e){return e.map(t=>t.label).join(" / ")}function Z4(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function kc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function X4(e,t,a){const r=Ul(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Ac(e,t,a){return a===0?0:(e+t*.5)/a}function J4(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:kc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Ac(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||hn(s.label,l.label)||hn(s.key??s.label,l.key??l.label)),r}function Q4(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),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Ac(d,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 e_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function t_(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 n_(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)||t_(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,d=`${i.trainingType}|${c}`,h=t.get(d)??{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 p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,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||hn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function a_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function r_(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 ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function o_(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=>ds.includes(l.trainingType)).sort(r),word:s.filter(l=>!ds.includes(l.trainingType)).sort(r),noSet:a}}function s_(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||hn(l.name,i.name)),s.slice(0,Math.max(0,a))}function l_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function i_(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 ps(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function u_(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?ps(Gt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?ps(Gt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ps(Gt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function c_(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 d_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function p_(e,t){return e.filter(a=>a.key!==t)}function h_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function m_(e){return e.map(t=>t.value)}function C_(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(tt,{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 f_(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,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;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(g=>n.jsx(C_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function b_({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(ge,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function g_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=Be.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
|
|
1037
|
+
</html>`}const V4=1e3;function cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=Be.useTranslation(),u=o.useCallback(()=>{H4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(us(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=us(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?is(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),V4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function wc(e,t){const{t:a}=Be.useTranslation(),r=t?.paperBands===!0,[s,l]=o.useState("landscape"),[i,u]=o.useState(["image","word","standardPron"]),[c,d]=o.useState("show"),[h,p]=o.useState(!0),[m,g]=o.useState(!0),[y,C]=o.useState(!0),[f,x]=o.useState(!0),[b,B]=o.useState(8),[_,N]=o.useState("right"),v=e.length,k=e.some(X=>(X.words??[]).length>1),w=e.some(X=>(X.words??[]).some(Z=>!!Z.colloquialLabel)),A=Math.min(b,Math.max(v,1)),D=o.useMemo(()=>w4(e,A),[e,A]),E=D.length>1,R=A,[$,G]=o.useState(!1);o.useEffect(()=>{let X=!1;if(!ia()){G(!1);return}return Promise.all(e.flatMap(Z=>(Z.words??[]).map(O=>Sl(O.label,O.homonum)))).then(Z=>{X||G(Z.some(Boolean))},()=>{}),()=>{X=!0}},[e]);const T=o.useMemo(()=>[dc(a,{hasImage:$,hasColloquial:w}),pc(a),...v>0?[gc(a,{hasPairs:k,itemCount:v})]:[],hc(a),...R>1?[fc(a)]:[],...k?[bc(a)]:[],...r?[mc(a),Cc(a)]:[]],[a,$,w,v,k,E,R,r]),F={..._c(a,{contentTypes:i,orientation:s,showOutline:h,cutLine:c,showDivLine:f,showTopInfo:m,showBottomInfo:y}),...v>0?{[a(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${A}\uAC1C`}:{},...E?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:_}:{}},M=o.useCallback((X,Z)=>{xc(a,X,Z,{setContentTypes:u,setOrientation:l,setShowOutline:p,setCutLine:d,setShowDivLine:x,setShowTopInfo:g,setShowBottomInfo:C})||(Z===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||Z===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?B(yc(parseInt(X),v)):Z===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&N(vc(X)))},[a,v]);return{settings:{orientation:s,contentTypes:i,cutLine:c,showOutline:h,showDivLine:f,count:R,showTopInfo:m,showBottomInfo:y},filterSections:T,filterSelected:F,handleSelect:M,pages:D,isPaginated:E,pageNumberPosition:_}}function q4({items:e,words:t,title:a,subtitle:r,emptyText:s,buttons:l,renderButtons:i,renderFooter:u,footerClassName:c,footerLayout:d,printFileName:h,showSettings:p,autoPrint:m,className:g,onClose:y,scoring:C=!1,onScoreChange:f,printHeader:x,brand:b,code:B,beforeClose:_}){const{t:N}=Be.useTranslation(),v=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ne)=>({id:`${z}-${ne}`,words:[{label:z}]})),[e,t]),{settings:k,filterSections:w,filterSelected:A,handleSelect:D,pages:E,isPaginated:R,pageNumberPosition:$}=wc(v,{paperBands:!!b?.show}),G=o.useMemo(()=>tc(E.map(z=>z.length)),[E]),[T,F]=o.useState({}),M=o.useCallback((z,ne)=>{F(W=>({...W,[vr(z)]:Ju(W[vr(z)]??null,ne)}))},[]),X=o.useRef(f);o.useEffect(()=>{X.current=f});const Z=o.useRef(T);o.useEffect(()=>{Z.current!==T&&(Z.current=T,X.current?.(es(T)))},[T]);const O=o.useMemo(()=>es(T),[T]),Y=o.useRef(null),{toastMessage:I,toastKey:q,showWarning:Q,clearToast:H}=Vi("warning"),S=o.useRef([]),P=o.useCallback(()=>R?S.current.filter(z=>z!==null):Y.current?[Y.current]:[],[R]),{print:L,openNewWindow:U}=cs({getElements:P,paperW:Qn[k.orientation].width,paperH:Qn[k.orientation].height,fileName:h??"",header:x??"",onPopupBlocked:()=>Q(N("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(()=>u?void 0:i?i({print:L,openNewWindow:U}):h?[{label:N("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>U()},{label:N("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>L()},...l??[]]:l,[u,i,h,l,N,L,U]),se=o.useMemo(()=>u?u({print:L,openNewWindow:U}):void 0,[u,L,U]),me=o.useRef(!1),te=o.useRef(L);return o.useEffect(()=>{te.current=L},[L]),o.useEffect(()=>{if(!m||me.current)return;const z=window.setTimeout(()=>{me.current=!0,te.current()},100);return()=>window.clearTimeout(z)},[m]),n.jsxs(Hn,{title:a??N("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:r,size:"large",className:ke("word-table-popup",g),buttons:ae,footer:se,footerClassName:c,footerLayout:d,beforeClose:_,onClose:y,children:[v.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[p&&n.jsx(ss,{sections:w,selected:A,onSelect:D}),R?n.jsx("div",{className:"word-table-popup__pages",children:E.map((z,ne)=>n.jsx(va,{items:z,orientation:k.orientation,contentTypes:k.contentTypes,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:W=>{S.current[ne]=W},pageNumber:{current:ne+1,total:E.length},pageNumberPosition:$,brand:b&&{...b,top:k.showTopInfo,bottom:k.showBottomInfo},code:B,scoring:C,scoreIndexOffset:G[ne],marks:O,onMarkClick:M},ne))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(va,{items:v,orientation:k.orientation,contentTypes:k.contentTypes,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:Y,fitHeight:!0,scoring:C,marks:O,onMarkClick:M,brand:b&&{...b,top:k.showTopInfo,bottom:k.showBottomInfo},code:B})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:s??N("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ba,{message:I,position:"top",onClose:H},q)]})}const U4=new Set(["x","triangle"]);function G4(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&U4.has(s)&&a.push(e[r])}return a}const K4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Bc(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=K4.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 Y4(e,t){const[,a,r]=io(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Bc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function Z4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Bc(e).round}}function X4(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 J4(e){return e.map(t=>t.label).join(" / ")}function Q4(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function kc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function e_(e,t,a){const r=Ul(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Ac(e,t,a){return a===0?0:(e+t*.5)/a}function t_(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:kc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Ac(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||pn(s.label,l.label)||pn(s.key??s.label,l.key??l.label)),r}function n_(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),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Ac(d,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 a_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function r_(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 o_(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)||r_(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,d=`${i.trainingType}|${c}`,h=t.get(d)??{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 p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,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||pn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function s_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function l_(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 ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function i_(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=>ds.includes(l.trainingType)).sort(r),word:s.filter(l=>!ds.includes(l.trainingType)).sort(r),noSet:a}}function u_(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||pn(l.name,i.name)),s.slice(0,Math.max(0,a))}function c_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function d_(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 ps(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function p_(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?ps(Vt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?ps(Vt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ps(Vt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function h_(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 m_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function C_(e,t){return e.filter(a=>a.key!==t)}function f_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function b_(e){return e.map(t=>t.value)}function g_(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(tt,{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 y_(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,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;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(g=>n.jsx(g_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function v_({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(ve,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function __({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=Be.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
|
|
1038
1038
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
1039
1039
|
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
|
|
1040
|
-
`).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:Mo,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 y_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=Be.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const x=Kn(()=>{const _=document.getElementById(g);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),b=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,k=_=>{_.matches&&m(!1)};return b&&(b.matches&&m(!1),b.addEventListener?.("change",k)),()=>{x(),b?.removeEventListener?.("change",k)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,b)=>u?u(x,{onClick:b}):n.jsx("a",{href:x.href,onClick:b,"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,b)=>n.jsx("span",{children:f(x)},`${b}:${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":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"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:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,b)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${b}:${x.href}`))})})]})}function v_({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,...Yu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function __({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 b=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(k=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),k(!!e.current&&b===a.current)},C);r.current=_})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=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:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const xa=9,x_=e=>Math.round(Math.min(xa,Math.max(0,e))/xa*100),w_=e=>e/100*xa,er=2,Nc=.1,B_=e=>Math.min(er,Math.max(0,e)),k_=.1,A_=e=>Math.round(e*1e6)/1e6;function tr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return B_(t);const a=Math.min(xa,Math.max(0,Number(e.level)||0))/xa,r=Number(e.mainVolume);return r>0?a>0?A_(Math.min(er,Math.max(k_,a/r))):0:1}const Ec=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Dc(e){return Ec(e)}function hs(e){return Ec(e)*tr(e)}function ms(e,t=R1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,hs(e)/a)}function ea(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=tr({level:a.level,mainVolume:a.mainVolume})),a}const ta={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Cs=o.createContext(null);function wr(){return o.useContext(Cs)}const fs=e=>`${$1()}/${e}`,Sc=e=>Array.from({length:10},(t,a)=>fs(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Br={get defaultNoise(){return fs("noise1.mp3")},get street(){return Sc("noise2")},get restaurant(){return Sc("noise3")},get buzz(){return fs("noise4.mp3")}};function N_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Br.defaultNoise;case"street":return Br.street[t];case"restaurant":return Br.restaurant[t];case"buzz":return Br.buzz;default:return null}}function E_({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),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),f=o.useCallback((N,v=250)=>{const B=l.current;if(!B)return;const w=d.current;if(w){d.current=null;try{B.pause()}catch{}B.src=w,B.load()}if(!B.src)return;m.current+=1,C();try{to(),rr(B).then(R=>{if(l.current===B)try{s.current?.("noise",R)}catch{}})}catch{}const E=B.paused?0:or(B);B.paused&&zn(B,0),B.play().catch(()=>{});const D=performance.now(),A=()=>{const R=Math.min(1,(performance.now()-D)/v);try{zn(B,E+(N-E)*R)}catch{}R<1?p.current=requestAnimationFrame(A):p.current=null};p.current=requestAnimationFrame(A)},[C]),x=o.useCallback((N=250,v)=>{const B=l.current;if(!B||B.paused){v?.();return}const w=++m.current;C();const E=performance.now(),D=or(B),A=()=>{const R=Math.min(1,(performance.now()-E)/N);try{zn(B,D*(1-R))}catch{}if(R<1)p.current=requestAnimationFrame(A);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{B.pause()}catch{}v?.()}};p.current=requestAnimationFrame(A),g.current=setTimeout(()=>{if(g.current=null,m.current===w){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{B.paused||(zn(B,0),B.pause(),v?.())}catch{}}},N+150)},[C]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{C();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const b=e?ms(e.settings):0,k=!!e?.settings.enabled&&b>0;o.useEffect(()=>{if(!k)return;let N=0;const v=setInterval(()=>{const B=l.current;if(!B||B.paused){N=0;return}const w=t.current;if(w&&!w.paused&&!w.ended||y()||a.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,x())},400);return()=>clearInterval(v)},[x,k,t,a,y]),o.useEffect(()=>{const N=()=>{const v=l.current;if(document.hidden){if(v&&!v.paused){C();try{v.pause()}catch{}}return}if(!v||!v.paused)return;const B=t.current,w=!!B&&!B.paused&&!B.ended||y()||a.current==="playing",E=h.current;w&&E?.enabled&&E.volume>0&&f(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:b,type:e.settings.type}:null},[e,e?.settings.enabled,b,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const N=e?.settings,v=l.current;if(!v)return;const B=N?ms(N):0;if(!N||!N.enabled||B===0){x();return}if(c.current!==N.type){const w=N_(N.type);w&&(c.current=N.type,u(w),d.current=w,x(150,()=>{if(d.current!==w)return;d.current=null,v.src=w,v.load();const E=t.current;if(E&&!E.paused||y()){_.current?.();const D=()=>{v.removeEventListener("canplay",D),_.current===A&&(_.current=null);const R=t.current,$=h.current;(R&&!R.paused&&!R.ended||y())&&$?.enabled&&$.volume>0&&f($.volume)},A=()=>v.removeEventListener("canplay",D);_.current=A,v.addEventListener("canplay",D)}}))}else{const w=t.current,E=!!w&&!w.paused&&!w.ended||y()||a.current==="playing";if(E&&d.current)f(B);else if(E&&v.paused&&v.src)f(B);else if(!v.paused)if(!E)x();else{C();const D=or(v),A=performance.now(),R=()=>{const $=Math.min(1,(performance.now()-A)/150);try{zn(v,D+(B-D)*$)}catch{}$<1?p.current=requestAnimationFrame(R):p.current=null};p.current=requestAnimationFrame(R)}}},[e?.settings,e?.settings.enabled,b,e?.settings.type,C,f,x,t,a,h,y]),o.useEffect(()=>{const N=l.current;if(N)try{N.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 D_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=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 b=(N,v=1)=>{try{const B=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(B*300/Math.max(.25,v)))}catch{return 1200}},k=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const v=window.speechSynthesis,B=++f.current;try{try{v.cancel()}catch{}const w=N??e,E=Array.isArray(w)?w.filter(T=>!!T):[w||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));y.current=E.reduce((T,P)=>T+b(P,D||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const A=h.current;A?.enabled&&(A?.volume??0)>0&&c(A.volume);const R=()=>{try{const T=g.current||performance.now(),P=performance.now()-T,M=y.current||1200,Z=Math.min(1,P/M);try{r.current&&(r.current.style.left=`${Z*100}%`),s.current&&s.current.style.setProperty("--progress",String(Z))}catch{}Z<1&&(C.current=requestAnimationFrame(R))}catch{}},$=()=>{if(B===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},Y=T=>{const P=new SpeechSynthesisUtterance(E[T]);try{P.rate=D}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(B===f.current){if(T<E.length-1){try{Y(T+1)}catch{$()}return}$()}},P.onerror=()=>{$()},P.onstart=()=>{if(!(T>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(R)}catch{}},x.current=!0,v.speak(P)};try{Y(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),_=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:k,stopTTS:_}}const S_=.01,j_=.3;async function T_(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 g=Math.floor(j_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=S_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,f=Math.min(C+m,c+p,u.length);let x=0;for(let b=C;b<f;b++){const k=Math.abs(u[b]);k>x&&(x=k)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function jc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await T_(l,t,a,r)}catch(s){try{const l=Il(s)}catch{}return null}}const bs=45,M_=74,L_=2;function kr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function Ar(e){return kr(e)/45}const $_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Tc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Mc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Tc(t),s=Tc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",$_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Lc(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 R_(e,t){const a=Lc(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 P_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Lc(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 I_({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 F_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Mc({durationsSec:[r],leadInMs:s,tailMs:l});return R_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function O_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return P_(Mc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function z_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function W_({ended:e,completedByEnd:t}){return!!e||!!t}function H_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function V_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function q_(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 U_(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?$c(a)!==$c(t):!0}function $c(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Rc=4,G_=Ar(Rc/bs);function K_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[x,b]=o.useState(null),[k,_]=o.useState(!1),[N,v]=o.useState(null),[B,w]=o.useState(2),[E,D]=o.useState(0),[A,R]=o.useState(null),[$,Y]=o.useState(!1),[T,P]=o.useState(!1),M=3,Z=3,V=1,O=300,te=o.useRef(0),I=o.useCallback(()=>{const ve=C.current,Ce=f&&f.current?f.current:ve?ve.closest(".audio-player__wave"):null,de=Ce?Ce.getBoundingClientRect():ve?ve.getBoundingClientRect():null,fe=de?de.width:0,be=de?Math.max(100,de.width):320,he=de?de.height:0,Le=Math.max(V,Math.min(O,Math.floor((be+Z)/(M+Z)))),Fe=Le*M,$e=Math.max(0,Le-1),qe=Math.max(0,$e>0?(be-Fe)/$e:Z);return{bars:Le,gap:qe,height:he,width:fe}},[]),U=o.useRef(void 0),Q=o.useRef(null),H=o.useCallback(async(ve,Ce,{quiet:de=!1}={})=>{const fe=++te.current,be=()=>te.current===fe;try{if(de||_(!1),U.current=ve,!ve){be()&&b(null);return}let he=Ce;if(!he)try{for(let $e=0;$e<4&&!(C.current||f.current);$e++)await new Promise(qe=>requestAnimationFrame(qe));await new Promise($e=>requestAnimationFrame($e));const Fe=I();Fe.height>0&&D(Fe.height),he=Fe.bars,w(Fe.gap)}catch{he=120}Q.current=he;const Le=await jc(ve,he);if(!be())return;if(!Le){b(null),_(!1);return}b(Le),v(he),_(!0)}catch{if(!be())return;b(null),_(!1)}},[_,b,D,w,v,I]);o.useEffect(()=>{const ve=f.current;if(!ve||typeof ResizeObserver>"u")return;let Ce=null;const de=new ResizeObserver(()=>{Ce!==null&&cancelAnimationFrame(Ce),Ce=requestAnimationFrame(()=>{Ce=null;try{const fe=I();if(fe.width<=0||(fe.height>0&&D(fe.height),Q.current===null||fe.bars===Q.current))return;const be=U.current;w(fe.gap),be?H(be,fe.bars,{quiet:!0}).catch(()=>{}):Q.current=fe.bars}catch{}})});return de.observe(ve),()=>{de.disconnect(),Ce!==null&&cancelAnimationFrame(Ce)}},[I,H]),o.useEffect(()=>{const ve=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;H(typeof ve=="string"?ve:void 0).catch(()=>{}),P(!1)},[t,a,H]),o.useEffect(()=>{let ve=!1;if(Y(!1),R(null),!l||!N)return;const Ce=c>0?c*(u||1):void 0;return jc(l,N,Ce,!0).then(de=>{ve||(R(de),de||Y(!0))}).catch(()=>{ve||(R(null),Y(!0))}),()=>{ve=!0}},[l,N,c,u]);const S=Math.max(0,Math.min(1,d)),F=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),L=N||40,G=o.useMemo(()=>O_({bars:L,trackDurationSec:y,leadInMs:m,tailMs:g}),[L,y,m,g]),ae=o.useMemo(()=>Array.from({length:L}).map((ve,Ce)=>{const de=Ce>=G.lead&&Ce<G.lead+G.sound,fe=G.sound>0&&de?Math.min(L-1,Math.round((Ce-G.lead)/G.sound*L)):-1,be=de?x&&x[fe]!=null?x[fe]:null:x?0:null,he=be==null?null:Math.min(1,be/F*S),Le=he!=null&&E>0&&kr(he)<=Rc,Fe=he==null?.15:Le?0:Ar(he),$e=Le,qe=L>1?Ce/(L-1):0;return n.jsx("div",{className:$e?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":Fe,"--i":Ce,"--mix":qe}},Ce)}),[L,x,F,S,E,G]),se={"--progress":String(Math.max(0,Math.min(1,r)))},me=o.useMemo(()=>A&&A.length&&Math.max(...A.map(ve=>Number.isFinite(ve)?Math.abs(ve):0))||1,[A]),X=S*Math.max(0,i),z=!l||!A||!A.length?1:Math.max(1,X),ne={"--bar-gap":`${B}px`,"--wave-h":`${kr(z)}px`,"--wave-h1":`${bs}px`},W=k&&(l?!!A||$:!0);o.useEffect(()=>{W&&P(!0)},[W]);const q=T?k:W;o.useEffect(()=>{h?.(q)},[q,h]);const pe=N||40,Se=o.useMemo(()=>Array.from({length:pe}).map((ve,Ce)=>{const de=A&&A[Ce]!=null?A[Ce]:null,fe=de==null?0:Math.abs(de)/me*X,be=Math.max(G_,Ar(fe)),he=pe>1?Ce/(pe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":be,"--i":Ce,"--mix":he}},Ce)}),[pe,A,me,X,E]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:Se}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${q?"is-ready":""}`,ref:C,children:ae}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${q?"is-ready":""}`,ref:s,style:se,children:ae})]})]})}const Pc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function gs(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 d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const Y_=2e3;function Ic(e,t=Y_){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 Z_({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 d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function X_(){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 J_({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 Q_(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 ex=400,tx=2e3,Fc=5;function nx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=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(In){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>ex){const x=h.current===null||f-h.current>tx;if(h.current=f,x&&d.current<Fc){d.current+=1;const b=d.current;let k=null;try{k=typeof document<"u"?document.visibilityState:null}catch{}Et(`progress-ticker-slow-frames#${b}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,k==="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.",b>=Fc?`(${b}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${b}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,b=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,k=b?0:Q_(f),_=t.current,N=(i||0)>0||(u||0)>0,v=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(k===null&&!v)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const B=b?x.duration:k||0;In&&v&&!(B>0)&&Et("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 w=N?F_({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:B,leadInMs:i||0,tailMs:u||0}):I_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:k??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${w*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(w))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function ys({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=Be.useTranslation(),m=e,g=wr(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),b=X_(),k=o.useRef(null),_=o.useRef(!1),N=o.useRef(null),{ref:v,rect:B,show:w,hide:E}=J_();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[D,A]=o.useState(!1),[R,$]=o.useState("idle"),[Y,T]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=Y},[Y]);const[M,Z]=o.useState(0),[V,O]=o.useState("active"),te=o.useRef(!1);o.useEffect(()=>{if(V!=="playMode"||!te.current)return;te.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const ue=x.current?.querySelectorAll("button")[1];try{ue?.focus()}catch{}},[V]);const[I,U]=o.useState(null),[Q,H]=o.useState(null),[S,F]=o.useState(0),[L,G]=o.useState(!1),[ae,se]=o.useState(0),me=g?.playbackRate??1,X=g?.mainVolume??1,z=g?hs(g.settings):0,ne=g?Dc(g.settings):X,[W,q]=o.useState("idle"),[pe,Se]=o.useState(""),[ve]=o.useState("top"),Ce=o.useRef(null),de=o.useRef(0),fe=o.useRef(null),be=o.useRef(!0),he=__({mountedRef:be}),Le=o.useRef(null),Fe=o.useRef(d),$e=o.useRef(h);o.useEffect(()=>{Fe.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{$e.current=Math.max(0,h||0)},[h]);const{start:qe,stop:He,settleTo:it}=nx({audioRef:C,fillRef:f,waveProgressRef:fe,sourcesRef:Ce,currentIndexRef:de,sequencer:he,leadInMs:d,tailMs:h}),{onReadyChange:rt,waitForReady:Qe,markNotReady:ft}=Z_({showSoundWaveForm:u,showNoiseWaveForm:c}),Ee=o.useRef(null),Ue=o.useRef(s),Ae=o.useRef(r),Ve=o.useRef(null),Je=o.useRef(!1),[ot,At]=o.useState(!1),_t=o.useCallback(J=>{Je.current=J,At(J)},[]),It=o.useRef(null),{activeNoiseUrl:et,noiseSettingsRef:at,fadeInNoise:xt,fadeOutNoise:Bt}=E_({noisePlayer:g,audioRef:C,playbackStateRef:P,sequencer:he}),{startTTS:St,stopTTS:Pt}=D_({ttsText:l,playbackRate:me,mainVolume:ne,fillRef:f,waveProgressRef:fe,setProgress:Z,setPlaybackState:T,setStateLocal:O,fadeInNoise:xt,fadeOutNoise:Bt,noiseSettingsRef:at,onDoneRef:Ae,handleEndRef:It});o.useEffect(()=>{ct.current=Pt});const xe=J=>{if(typeof window>"u"||!window.speechSynthesis){try{Se(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}St(J);return}wt("tts"),St(J)},Te=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Me=(!Te||Te.length===0)&&!!l,We=Array.isArray(I)&&I.length>0?I:Array.isArray(Q)&&Q.length>0?Q:null,dt=Math.max(Array.isArray(We)?We.length:0,Te.length);o.useEffect(()=>(be.current=!0,()=>{be.current=!1}),[]);const ut=()=>{he.abort()},ct=o.useRef(null),Ze=o.useRef(null),gt=o.useRef(null),jt=o.useRef(null);jt.current||(jt.current=()=>{gt.current=null;const J=C.current;if(Ze.current==="audio"&&J&&(!J.paused||he.isRunning())){ut();try{J.pause()}catch{}be.current&&(T("paused"),He(),Bt())}else if(Ze.current==="tts")try{ct.current?.()}catch{}});const wt=J=>{Ze.current=J,gt.current=Ua(jt.current)},bt=()=>{gt.current?.(),gt.current=null};o.useEffect(()=>()=>{jt.current&&fr(jt.current)},[]);const yt=o.useRef(me);o.useEffect(()=>{yt.current=me||1},[me]);const ke=o.useCallback(J=>{const ue=yt.current||1;try{J.defaultPlaybackRate=ue}catch{}try{J.playbackRate=ue}catch{}},[]),nt=o.useCallback((J,ue)=>{if(!U_(J,ue)){try{J.currentTime=0}catch{}ke(J);return}J.src=ue,ke(J),J.load(),ke(J)},[ke]),re=o.useCallback(()=>{Ve.current&&(clearTimeout(Ve.current),Ve.current=null),q("idle")},[]),_e=o.useCallback(async(J,ue=3,De=50,Ie=0)=>{re();const Ye=he.generation(),Xe=!!J&&J.currentTime>0&&!J.ended,ht=Math.max(0,Fe.current-Math.max(0,Ie));if(ht>0&&!Xe){wt("audio"),qe(),T("playing");const mt=at.current;if(mt?.enabled&&(mt.volume??0)>0)try{xt(mt.volume)}catch{}if(!await he.waitPad(ht,"lead",Ie)||!be.current||!he.isCurrent(Ye))return!1}he.enterSound();for(let mt=0;mt<ue;mt++){if(!be.current||!he.isCurrent(Ye))return!1;try{return wt("audio"),await J.play(),!0}catch(ye){if((ye instanceof Error||typeof ye=="object"&&ye&&"name"in ye?ye.name:void 0)==="AbortError"){if(!he.isCurrent(Ye))return!1;await new Promise(j=>setTimeout(j,De));continue}try{Se(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Se(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,qe,he,xt,at,re]),Pe=o.useCallback(J=>{const ue=he.generation(),De=Math.max(0,$e.current-Math.max(0,J));qe();const Ie=at.current;if(Ie?.enabled&&(Ie.volume??0)>0)try{xt(Ie.volume)}catch{}const Ye=()=>{try{Le.current?.()}catch{}};if(De<=0){he.leave(),Ye();return}he.waitPad(De,"tail",J).then(Xe=>{he.leave(),Xe&&he.isCurrent(ue)&&Ye()}).catch(()=>{})},[he,qe,xt,at]),Ge=o.useCallback(()=>{const J=C.current;if(!J)return;const ue=()=>{T("playing"),O("playMode"),G(!0),qe();try{to(),rr(J).then(Xe=>{if(be.current)try{y.current?.("main",Xe)}catch{}})}catch{}const Ye=at.current;Ye?.enabled&&(Ye?.volume??0)>0&&xt(Ye.volume)},De=()=>{W_({ended:!!J?.ended,completedByEnd:Je.current})||(T("paused"),He(),Bt())},Ie=()=>{const Ye=()=>{try{const Xe=Ce.current,ht=z_(Xe,de.current);if(ht!==null){de.current=ht,F(ht),G(!0);const mt=Xe?.[ht]&&Xe[ht].src;if(mt&&J){nt(J,mt),_e(J).catch(()=>{});return}}}catch{}T("stopped"),Z(1);try{if(J)try{J.currentTime=0}catch{}}catch{}He(),G(!1),Bt();try{!Ue.current&&It.current&&It.current()}catch{}};if(Le.current=Ye,$e.current>0){qe(),he.waitPad($e.current,"tail").then(Xe=>{he.leave(),Xe&&Ye()}).catch(()=>{});return}Ye()};return J.addEventListener("play",ue),J.addEventListener("pause",De),J.addEventListener("ended",Ie),()=>{try{J.removeEventListener("play",ue),J.removeEventListener("pause",De),J.removeEventListener("ended",Ie),He()}catch{}}},[xt,Bt,_e,at,qe,He,he]);o.useEffect(()=>Ge(),[Ge]),o.useEffect(()=>{Ue.current=s},[s]),o.useEffect(()=>{Ae.current=r},[r]),o.useEffect(()=>{if(s||V!=="active")return;const J=N.current;if(!J)return;let ue=null;const De=requestAnimationFrame(()=>{try{const Ie=J.getTotalLength();if(!Ie)return;const Ye=Ie*.2;J.style.strokeDasharray=`${Ie-Ye} ${Ye}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);ue=document.createElement("style"),ue.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ie}}}`,document.head.appendChild(ue),J.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(De),ue?.remove()}},[V,s]),o.useEffect(()=>{Ce.current=I},[I]),o.useEffect(()=>{de.current=S},[S]),o.useEffect(()=>{const J=x.current,ue=k.current;if(!J||!ue)return;let De=null;const Ie=32,Ye=60,Xe=()=>{try{const mt=Array.from(J.querySelectorAll(":scope > .button"));let ye=0;mt.forEach(je=>{if(je===ue)return;const ze=je.getBoundingClientRect();ye+=ze.width});const j=J.getBoundingClientRect().width,ee=Math.max(0,Math.floor(j-ye-8)),K=dt;if(!K||ee<=0){Array.from(ue.children).forEach(je=>{try{je.style.width=""}catch{}});return}let ie=Math.floor(ee/K);ie>Ye&&(ie=Ye),ie<Ie&&(ie=Math.max(Ie,Math.floor(ee/K))),Array.from(ue.querySelectorAll(".button")).forEach(je=>{try{je.style.width=`${ie}px`}catch{}})}catch{}},ht=requestAnimationFrame(Xe);try{De=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),De.observe(J),De.observe(ue),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(ht)}catch{}try{De&&(De.disconnect(),De=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[I,Q,dt]),o.useEffect(()=>()=>{try{Ee.current&&(clearTimeout(Ee.current),Ee.current=null),Ve.current&&(clearTimeout(Ve.current),Ve.current=null)}catch{}},[]);const vt=(J,ue)=>{U(J),se(ue),ft(),H(H_(J)),Ce.current=J},st=()=>{O("playMode"),F(0),G(!0)},Vt=async(J,ue)=>{_t(!1),_.current=!1,nt(J,ue),await Ic(J),await Qe()!==!1&&(A(!1),st(),await _e(J))},Yt=async(J,ue=!1)=>{const De=C.current;A(!0),$("measuring_duration");try{const Ie=await gs(J,{timeoutMs:1e4,rejectOnError:!0});vt([{src:J,objectUrl:null,duration:Ie}],Ie),$("ready"),ue&&De&&await Vt(De,J)}finally{_.current=!1,A(!1)}},Xt=async(J,ue=!1)=>{const De=C.current;A(!0),$("measuring_duration");try{const Ie=await Promise.all(J.map(Xe=>gs(Xe,{timeoutMs:1e4})));if(!be.current)return;const Ye=J.map((Xe,ht)=>({src:Xe,objectUrl:null,duration:Ie[ht]||0}));vt(Ye,V_(Ye)),$("ready"),ue&&De&&Ye.length>0&&await Vt(De,Ye[0].src)}finally{_.current=!1,A(!1)}},$t=async(J=!1,ue=!0)=>{const De=C.current,Ie=t?Array.isArray(t)?t:[t]:[];if(!Ie||Ie.length===0||!Ie.some(Boolean))return!1;if(_.current)return null;_.current=!0,ue&&A(!0),$("resolving");try{const Ye=q_(t,a,xl),Xe=[];let ht=0;for(const mt of Ye){let ye=mt.src??null,j=null;if(!ye&&mt.resolvedPath){try{$("getting_signed_url"),ye=await wl(mt.resolvedPath)}catch{ye=null}if(!be.current)return!1;if(!ye)try{$("downloading");const K=await Bl(mt.resolvedPath);if(!be.current)return!1;if(K){const ie=K instanceof Blob?K:new Blob([K]);j=b.track(URL.createObjectURL(ie)),ye=j}}catch{$("error");try{Se(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),O("active")}catch{}}}if(!ye)continue;let ee=0;try{$("measuring_duration"),ee=await gs(ye,{timeoutMs:3e3})}catch{ee=0}if(!be.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const K of Xe)if(K.objectUrl)try{URL.revokeObjectURL(K.objectUrl)}catch{}return!1}ht+=ee||0,Xe.push({...mt,src:ye,objectUrl:j,duration:ee})}if(vt(Xe,ht),Xe.length>0&&J&&De){const mt=Xe[0];_t(!1);try{b.keepOnly(Xe.map(ye=>ye.objectUrl))}catch{}if($("ready"),_.current=!1,mt.src&&De)try{if(nt(De,mt.src),await Ic(De),await Qe()===!1)return!1;ue&&A(!1),st(),De&&await _e(De)}catch{ue&&A(!1)}else ue&&A(!1);O("playMode"),F(0),G(!0)}return Xe.length>0}finally{_.current=!1,ue&&A(!1),$(Ye=>Ye==="ready"?"ready":"idle")}},zt=async J=>{const ue=he.isRunning();if(J.paused&&!ue){if(Je.current){await Ft();return}const De=he.resume();if(De){if(T("playing"),De.phase==="tail"){Pe(De.elapsed);return}await _e(J,3,50,De.elapsed);return}await _e(J),T("playing")}else he.pause(),ut(),J.pause(),T("paused"),ue&&(He(),Bt())},sn=async()=>{const J=C.current;if(!(!J&&!Me)){if(Me){const ue=window.speechSynthesis;if(V==="active"){const De=Da(),Ie=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(De&&Ie.length>0){if(_.current)return;O("load"),A(!0),$("synthesizing"),_.current=!0;try{const Ye=await Promise.all(Ie.map(Xe=>Promise.resolve(De(Xe))));Ye.length>1?await Xt(Ye,!0):await Yt(Ye[0],!0)}catch{_.current=!1,A(!1),O("active"),xe(Ie.length>0?Ie:void 0)}return}xe(Ie.length>0?Ie:void 0);return}if(V==="playMode"){const De=!!ue&&(ue.speaking||ue.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!De){await zt(J);return}try{if(ue&&ue.paused)try{wt("tts"),ue.resume(),T("playing")}catch{}else try{ue.pause(),T("paused")}catch{}}catch{}}return}if(V==="active"){if(s&&Array.isArray(Ce.current)&&Ce.current.length>0){const De=Ce.current[0];try{if(De.src&&J)try{nt(J,De.src),st(),J&&await _e(J)}catch{}st();return}catch{}}O("load");let ue;try{ue=await $t(!0)}catch{ue=!1}if(ue===!1&&be.current){try{Se(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}O("active")}return}if(V!=="load"&&(V==="playMode"||V==="active"))try{J&&await zt(J)}catch(ue){(ue instanceof Error||typeof ue=="object"&&ue&&"name"in ue)&&ue.name}}},Ft=async()=>{const J=C.current;if(J)try{const ue=Ce.current;if(Array.isArray(ue)&&ue.length>1){await fn(0);return}_t(!1);try{J.currentTime=0}catch{}J&&await _e(J),T("playing"),O("playMode")}catch{}},Cn=()=>{ut(),bt(),ct.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Bt(),T("stopped"),O("active"),Z(0),G(!1)},Nt=async(J,{sameSegment:ue=!1}={})=>{ut();const De=he.generation(),Ie=C.current,Ye=Ce.current?.[J]?.src;try{if(_t(!1),F(J),G(!0),de.current=J,!Ye||!Ie||(ue||ft(),nt(Ie,Ye),!ue&&await Qe()===!1)||!he.isCurrent(De)||(await _e(Ie),!he.isCurrent(De)))return;T("playing"),O("playMode")}catch{}},kt=async()=>{const J=Ce.current,ue=de.current||0;if(!J||ue<=0){await Ft();return}await Nt(ue-1)},pt=async()=>{const J=Ce.current,ue=de.current||0;if(!J||ue>=J.length-1){Cn();return}await Nt(ue+1)},Tt=()=>{if(Je.current)return;const J=200,ue=340;_t(!0),ut(),bt();try{Z(1)}catch{}it(1);try{q("hold")}catch{}try{const De=C.current,Ie=Me&&!!De?.src;if(!Me||Ie){if(De){De.pause();try{De.currentTime=0}catch{}}}else Pt();Bt()}catch{}try{T("stopped")}catch{}if(G(!1),!Ue.current)try{Ve.current&&(clearTimeout(Ve.current),Ve.current=null),Ve.current=setTimeout(()=>{try{q("out")}catch{}Ve.current=setTimeout(()=>{try{typeof Ae.current=="function"&&Ae.current(!0)}catch{}try{q("idle")}catch{}Ve.current=null},ue)},J)}catch{}};o.useEffect(()=>{It.current=Tt});const ln=o.useCallback(()=>Se(""),[]),fn=async J=>{(Ce.current||[])[J]&&await Nt(J,{sameSegment:J===de.current})},Wt=Y==="playing",vn=o.useMemo(()=>{if(!Q||Q.length<=1)return Q;const J=Q[S];return J?[J]:Q},[Q,S]),un=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&ke(J)}catch{}},[me,ke]);const bn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const ue=Math.max(0,Math.min(1,ne)),De=bn.current,Ie=()=>{De.raf!==null&&(cancelAnimationFrame(De.raf),De.raf=null),De.timer!==null&&(clearTimeout(De.timer),De.timer=null)};Ie();const Ye=or(J);if(J.paused||Math.abs(Ye-ue)<.001||typeof requestAnimationFrame!="function"){try{zn(J,ue)}catch{}return}const Xe=performance.now(),ht=()=>{const mt=Math.min(1,(performance.now()-Xe)/150);try{zn(J,Ye+(ue-Ye)*mt)}catch{}De.raf=mt<1?requestAnimationFrame(ht):null};return De.raf=requestAnimationFrame(ht),De.timer=setTimeout(()=>{Ie();try{zn(J,ue)}catch{}},200),Ie},[ne]);const Ut=W==="hold",Bn=W==="out",ce=V==="playMode"&&!D&&!ot||Ut||Bn,we=Y!=="stopped"||Ut||Bn,Re=Y==="paused",Ke=Math.max(0,Math.min(100,(M||0)*100)),Oe=Ne("audio-player__fill",ce?"is-visible":"",we?"is-expanded":"",Re?"is-paused":"",Bn?"is-out":"");return n.jsxs("div",{className:`audio-player ${un?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Wt?"is-playing":""} ${D?"is-loading":""} ${V!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Pc[R]?"status":void 0,"aria-live":Pc[R]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,V==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:un,onClick:()=>{te.current=gr(),E(),sn()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:w,onMouseLeave:E,onFocus:w,onBlur:E,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:N,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,B&&n.jsx(Sn,{anchorRect:B,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${V==="playMode"||Wt?"is-visible":""}`,inert:!(V==="playMode"||Wt)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:kt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:V!=="playMode"}),n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Wt?"pause":"play",onClick:sn,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Wt,width:"60px",variant:"transparent-white",disabled:V!=="playMode"}),n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Cn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:V!=="playMode"}),dt>1?n.jsx("div",{ref:k,className:"audio-player__source-buttons",children:Array.from({length:dt}).map((J,ue)=>n.jsx(ge,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ue+1),onClick:()=>{try{fn(ue)}catch{}},ariaLabel:p("training.sourcePlay",{n:ue+1}),variant:"transparent-white",selected:L&&S===ue,disabled:V!=="playMode"||!(Array.isArray(I)&&I[ue]),showTooltipInfo:!0},ue))}):null,!Array.isArray(I)||I.length<=1?n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Ft,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:V!=="playMode"}):null,n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:pt,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:V!=="playMode"}),n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Tt,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:V!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Oe,ref:f,style:{left:`${Ke}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(K_,{segments:vn,progress:M,totalDuration:ae,waveProgressRef:fe,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:I?.[S]?.duration??0,noiseSrc:c&&g?.settings.enabled&&z>0?et:null,noiseRatio:g?tr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:X,onReadyChange:rt})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(tt,{icon:"triangle-alert",size:14}),p("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:pe,position:ve,onClose:ln})]})}function Nr(e){const{t}=Be.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=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:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Pi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(N=>N==="dark"?"light":"dark"),[]),x=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),b=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],k={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},_=n.jsxs("div",{className:le(`text-box-tooltip__root ${c==="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:k,children:b.map((N,v)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[b.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:v+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},v))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(ge,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(ge,{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(ge,{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(ge,{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(xn,{anchorRect:s,className:le(`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:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function Oc({state:e="disabled"}){const{t}=Be.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(tt,{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 zc(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(),d=c?Array.from(c.querySelectorAll(kn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)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 d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Wc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=Be.useTranslation(),m=gn("(max-width: 767px)"),g=`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),[b,k]=o.useState(null),[_,N]=o.useState(null);zc(f&&!!b,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip__content"));for(let A=D.length-1;A>=0;A--)if(D[A].querySelector(".text-box-tooltip__root"))return D[A];return null},()=>C.current?.querySelector("button")??null);const v=o.useRef(l);o.useEffect(()=>{v.current=l});const B=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),w=o.useCallback(()=>{x(!1),k(null),N(null)},[]);o.useEffect(()=>{if(!f)return;let D;try{typeof v.current=="function"&&(D=v.current())}catch{}if(D===!1){w();return}N(typeof D<"u"&&D!==null?D:null)},[B]);const E=o.useCallback(()=>{let D;try{typeof l=="function"&&(D=l())}catch{}if(D!==!1){if(N(typeof D<"u"&&D!==null?D:i),!C.current){x(A=>!A);return}if(f)x(!1),k(null),N(null);else{const A=C.current.getBoundingClientRect();k(A),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,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(ge,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(ge,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,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(Nr,{text:_??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:b,onClose:w,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function vs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function na({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=Be.useTranslation(),[p,m]=o.useState(()=>vs(e,t));o.useEffect(()=>{const v=vs(e,t);if(v!==p){const B=setTimeout(()=>m(v),0);return()=>clearTimeout(B)}},[e,t,p]);const g=o.useCallback((...v)=>{vs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...v)},[e,t,p,u]),[y,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),b=o.useCallback(v=>{if(!v)return null;try{const B=v;if(typeof v=="object"&&(B.currentTarget||B.target)&&(B.nativeEvent||B.type)){const D=B.currentTarget??B.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(v instanceof DOMRect)return v;const w=v;if(w&&typeof w.getBoundingClientRect=="function")return w.getBoundingClientRect();const E=v?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),k=o.useCallback((v,{text:B="",label:w="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:A="top"}={})=>{const R=b(v);x({text:B,label:w,anchorRect:R,backdrop:E,alignX:D,alignY:A}),C(!0)},[b]),_=o.useCallback(()=>{C(!1),x(v=>({...v,anchorRect:null}))},[]),N=o.Children.map(l,v=>{if(o.isValidElement(v)){const B=v;if(typeof B.type=="string")return B;const w=B.props??{},E=typeof w.onDone=="function"?w.onDone:g,D=typeof w.disabled=="boolean";let A=p==="disabled";return D&&(A=!!w.disabled),o.cloneElement(B,{onDone:E,disabled:A,showTooltip:k,hideTooltip:_})}return v});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Oc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Wc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),N]}),y?n.jsx(xn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Nr,{text:f.text,onClose:_})}):null]})}function Hc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=Be.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($=>$==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Pi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),b=o.useRef(!1),k=o.useCallback(()=>{b.current=gr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>f(""),[]),N=$=>{try{f($)}catch{}},v=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const B=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[w,E]=o.useState(B);w!==B&&(E(B),l("disabled"));const D=t==="disabled"?s:t,A=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",R=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(D==="disabled"||!b.current)return;b.current=!1;const $=document.activeElement;$&&$!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:x,className:`training-text-box ${A} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(ge,{htmlType:"button",size:48,type:"bar",onClick:k,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":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:R,children:B})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(ge,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(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(ge,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>N(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:!p,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(ge,{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 aa(e){return e==="active"||e==="done"}function _s({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=Be.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),b=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,N=d?d.join("||"):"",v=h?h.join("||"):"",[B,w]=o.useState(()=>Array.isArray(_)?C?La(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?w(C?La(_):_.slice()):w(void 0)},[c,N,v,C]);const[E,D]=o.useState(null),[A,R]=o.useState(()=>new Set);o.useEffect(()=>{D(null),R(new Set)},[v,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const P=$.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(D(null),R(new Set)),$.current=t},[t,e]);const Y=o.useCallback(P=>{if(!aa(k))return;const M=B?.[P];if(M==null)return;const Z=M;if(p){const V=new Set(A);V.has(Z)?V.delete(Z):V.add(Z),R(V),typeof u=="function"&&u({selectedValues:[...V],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...V],__ts:Date.now()})}else D(Z),typeof u=="function"&&u({selectedIndex:P,selectedValue:Z,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:Z,__ts:Date.now()})},[B,k,p,u,A]),T=`training-step__buttons${Array.isArray(B)&&B.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(B)&&B.length>0?B.map((P,M)=>n.jsx(ge,{htmlType:"button",size:56,type:"bar",onClick:()=>Y(M),ariaLabel:String(P),label:P,useLabel:!0,icon:y?y[String(P)]:void 0,variant:"default",disabled:k==="disabled",selected:p?A.has(P):E===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=Be.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=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(g)}\0${JSON.stringify(y??null)}`,[b,k]=o.useState(x);b!==x&&(k(x),c==null&&f(null));const[_,N]=o.useState(c);Object.is(_,c)||(N(c),f(c??null));const v=o.useRef(void 0);o.useEffect(()=>{const D=v.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&f(null),v.current=t},[t,e,c]);const B=o.useCallback(D=>{const A=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(A),aa(m)&&typeof l=="function"&&l(A)},[i,m,l]),w=o.useCallback(()=>{aa(m)&&(f(!1),B(!1))},[B,m]),E=o.useCallback(()=>{aa(m)&&(f(!0),B(!0))},[B,m]);return n.jsxs(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Hc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((D,A)=>n.jsx(ge,{htmlType:"button",size:56,type:"bar",onClick:()=>{aa(m)&&(f(A),B&&B(A))},disabled:m==="disabled",ariaLabel:String(D),label:D,variant:m,selected:C===A},A)):n.jsxs(n.Fragment,{children:[n.jsx(ge,{htmlType:"button",size:56,type:"bar",onClick:w,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(ge,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function ws({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:x}=Be.useTranslation(),b=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),k=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(na,{index:e,stepIndex:t,isLast:a,title:b,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(ys,{soundSrc:i,ttsText:i?null:d??b,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:k,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const ax=[];function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=ax}){const{t:c}=Be.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=H=>typeof H=="string"?H:H&&(H.context||H.sentence||H.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((H,S)=>({id:S,text:h(H)}))),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),b=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const H=Array.isArray(u)?u:[];m(H);const S=(F=>{const L=(F||[]).map((me,X)=>({id:X,text:h(me)}));if(L.length<=1)return L;const G=(me,X)=>{if(me.length!==X.length)return!1;for(let z=0;z<me.length;z++)if(me[z].text!==X[z].text)return!1;return!0};let ae=La(L),se=0;for(;G(ae,L)&&se<20;)ae=La(L),se+=1;return ae})(H);y(S);try{if(typeof i=="function"){const F=S.filter((L,G)=>L.text===h(H[G])).length;i({shuffled:S,score:F,total:(H||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const F=S.filter((L,G)=>L.text===h(H[G])).length;b.current=u,l({shuffled:S,score:F,total:(H||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||b.current===u||(b.current=u,typeof l!="function"))return;const H=Array.isArray(u)?u:[],S=g.filter((F,L)=>F.text===h(H[L])).length;l({shuffled:g,score:S,total:H.length,initial:!0,__ts:Date.now()})},[C,u]);const k=(H,S)=>{const F=[...g],L=H+S;if(L<0||L>=F.length)return;const G=F[L];F[L]=F[H],F[H]=G,Z(F);try{if(typeof l=="function"&&C==="active"){const ae=F.filter((se,me)=>se.text===h(p[me])).length;l({shuffled:F,score:ae,total:(p||[]).length,__ts:Date.now()})}}catch{}},[_,N]=o.useState(null),v=o.useRef(null),B=o.useRef(null),w=o.useRef(null),E=o.useRef(null),D=o.useRef(null),A=o.useRef({x:0,y:0}),R=o.useRef(null),$=o.useRef({dx:0,dy:0}),Y=()=>{if(R.current!==null)return;const H=()=>{if(!v.current){R.current=null;return}R.current=requestAnimationFrame(H);const S=A.current,F=$.current||{dx:0,dy:0};v.current&&(v.current.style.transform=`translate3d(${S.x-F.dx}px, ${S.y-F.dy}px, 0)`)};R.current=requestAnimationFrame(H)},T=o.useRef(new Map),P=o.useRef(new Map),M=()=>{const H=new Map;return T.current.forEach((S,F)=>{S&&S.getBoundingClientRect&&H.set(F,S.getBoundingClientRect())}),H},Z=H=>{const S=M();y(H);try{if(typeof i=="function"){const F=H.filter((L,G)=>L.text===h(p[G])).length;i({shuffled:H,score:F,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const F=M();H.forEach(L=>{const G=S.get(L.id),ae=F.get(L.id),se=T.current.get(L.id);if(!se||!G||!ae)return;const me=G.top-ae.top;me&&(se.style.transition="none",se.style.transform=`translateY(${me}px)`,requestAnimationFrame(()=>{se.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",se.style.transform="";const X=()=>{se.style.transition="",se.removeEventListener("transitionend",X)};se.addEventListener("transitionend",X)}))})})},V=(H,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(H))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const F=document.createElement("div");F.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(F),S.dataTransfer?.setDragImage(F,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(F)}catch{}})}catch{}}catch{}N(H);try{const F=g[H],L=document.createElement("div");L.className="order-list__dragging-object order-list__dragging-object--visible",L.textContent=F&&F.text?F.text:"",document.body.appendChild(L),v.current=L;const G=T.current.get(F.id);let ae=S.clientX||0,se=S.clientY||0;try{if(G&&G.getBoundingClientRect){const q=G.getBoundingClientRect();ae=q.left+q.width/2,se=q.top+q.height/2}}catch{}const me=L.getBoundingClientRect(),X=me.width/2,z=me.height/2;$.current={dx:X,dy:z},L.style.transition="none",A.current={x:ae,y:se},L.style.transform=`translate3d(${ae-X}px, ${se-z}px, 0)`,requestAnimationFrame(()=>{try{L.style.transition=""}catch{}Y()});const ne=q=>{const pe=q;A.current={x:pe.clientX,y:pe.clientY},Y()};w.current=ne,document.addEventListener("mousemove",ne);const W=q=>{const pe=q;A.current={x:pe.clientX,y:pe.clientY},Y()};B.current=W,document.addEventListener("dragover",W);try{S.dataTransfer?.setData("text/plain",String(H));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:H}))}catch{}}catch{}}catch{}},O=(H,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const F=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(F&&E.current!==F){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{F.classList.add("drag-over")}catch{}E.current=F}}catch{}},te=(H,S)=>{S.preventDefault();const F=S.dataTransfer?.getData("text/plain")||"",L=F?parseInt(F,10):_,G=H;if(typeof L!="number"||isNaN(L)||L===G){N(null),Q(),I();return}const ae=xf(g,L,G);Z(ae),N(null),I();try{if(typeof l=="function"&&C==="active"){const se=ae.filter((me,X)=>me.text===h(p[X])).length;l({shuffled:ae,score:se,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const se=document.querySelectorAll(".order-list .order-list__item")[G];if(!se)return;const me=se.querySelector(".order-list__slot")||se;try{me.classList.add("pulse"),me.offsetHeight,me.classList.add("to-dark");const X=()=>{me.classList.remove("pulse","to-dark"),me.removeEventListener("transitionend",X)};me.addEventListener("transitionend",X)}catch{}})}catch{}Q()},I=()=>{if(v.current){try{document.body.removeChild(v.current)}catch{}v.current=null}B.current&&(document.removeEventListener("dragover",B.current),B.current=null),w.current&&(document.removeEventListener("mousemove",w.current),w.current=null),R.current!==null&&(cancelAnimationFrame(R.current),R.current=null)},U=()=>{N(null),Q(),I()};o.useEffect(()=>()=>I(),[]);const Q=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(H=>H.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const H=Math.max(1,(g||[]).length);g.forEach((S,F)=>{const L=P.current.get(S.id);if(!L)return;let G=50;H>1&&(G=Math.round(F/(H-1)*100));try{L.style.setProperty("--marker-pos",G+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{I(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((H,S)=>{const F=Math.max(1,(g||[]).length),L=F>1?Math.round(S/(F-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":L+"%"},ref:G=>{const ae=P.current;G?ae.set(H.id,G):ae.delete(H.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:G=>{const ae=T.current;G?ae.set(H.id,G):ae.delete(H.id)},className:`order-list__draggable ${_===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?G=>V(S,G):void 0,onDragEnter:f?G=>O(S,G):void 0,onDragOver:f?G=>O(S,G):void 0,onDragLeave:f?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const G=document.querySelectorAll(".order-list .order-list__item");G&&G[S]&&(G[S].classList.remove("drag-over"),E.current===G[S]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?G=>te(S,G):void 0,onDragEnd:f?U:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:H.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(ge,{htmlType:"button",size:32,type:"dot",onClick:()=>k(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(ge,{htmlType:"button",size:32,type:"dot",onClick:()=>k(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},H.id)})})})}const rx=8e3;function ox(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Vc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=Be.useTranslation(),y=s??g("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=p??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const b=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",[_,N]=o.useState(null),v=o.useRef([]),[B,w]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const A=o.useMemo(()=>C.map(M=>M?.id??M?.word??"").join("|"),[C]);o.useEffect(()=>{N(null)},[A]);const R=o.useRef(void 0);o.useEffect(()=>{const M=R.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&N(null),R.current=t},[t,e]);const $=o.useCallback((M,Z)=>{if(c)return;const V={item:M,index:Z,__ts:Date.now()};try{typeof i=="function"&&i(V)}catch{}if(k==="active"&&typeof l=="function")try{l(V)}catch{}},[c,i,k,l]),Y=o.useRef(m);o.useEffect(()=>{Y.current=Math.max(0,m||0)},[m]);const T=o.useCallback(async()=>{if(B||k==="disabled")return;w(!0);let M=!1;const Z=new Promise(V=>{E.current=()=>{M=!0,V()}});try{for(let V=0;V<x.length&&!(!D.current||M);V++){const O=v.current[V];if(!O)continue;await Promise.race([ox(O.play(),rx),Z]);const te=Math.max(0,Y.current||0);te>0&&V<x.length-1&&!M&&D.current&&await Promise.race([new Promise(I=>{setTimeout(I,te)}),Z])}}finally{E.current=null,w(!1)}},[B,k,x.length]),P=o.useCallback((M,Z)=>{if(!aa(k))return;N(Z);const V={selectedValue:M.word||M.title||"",selectedIndex:Z,item:M,__ts:Date.now()};try{typeof i=="function"&&i(V)}catch{}if(typeof l=="function")try{l(V)}catch{}},[i,k,l]);return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:T,playAllActive:B},children:n.jsx("div",{className:"training-step__cards",onClickCapture:M=>{const Z=E.current;if(!Z)return;const V=M.target;V&&typeof V.closest=="function"&&V.closest(".training-word-card__bottom")&&Z()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((M,Z)=>n.jsx(Qo,{ref:V=>{v.current[Z]=V},item:M,disabled:k==="disabled",onPlayDone:()=>$(M,Z),selectable:c,selected:c&&_===Z,onSelect:c?()=>P(M,Z):void 0,flipDelay:Z*120,hideLabel:d,hideAudio:h},M&&M.id||Z))})})}const sx=160,qc=()=>{};function Rn(e){const t=o.useId();if(!("variant"in e)){const{label:b,sub:k,onClick:_,children:N,align:v="horizontal",icon:B,useFullWidth:w=!1}=e,E=D=>{_&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),_())};return n.jsxs("div",{className:Ne("panel-row",v==="vertical"?"panel-row--vertical":"",w?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?E:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[B!=null&&n.jsx("div",{className:"panel-row__icon",children:B}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:b}),k&&n.jsx("div",{className:"panel-row__sub caption-1",children:k})]}),n.jsx("div",{className:"panel-row__right",children:N})]})}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(da,{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:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const b=e;m=n.jsx(Bu,{checked:b.checked,onChange:b.onChange,id:g})}else if(a==="segmented"){const b=e;m=n.jsx(An,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??40,ariaLabel:r})}else if(a==="dropdown"){const b=e,k=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((_,N)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(yn,{options:_.options,value:_.value,onChange:_.onChange,placeholder:_.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},N))}):n.jsx(yn,{options:b.options??[],value:b.value??"",onChange:b.onChange??qc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[k,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):k}else if(a==="button"){const b=e;b.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((k,_)=>n.jsx(ge,{htmlType:"button",size:k.btnSize??40,variant:k.btnVariant??"default",disabled:k.disabled,onClick:k.onClick,children:k.label},_))}):m=n.jsx(ge,{htmlType:"button",size:b.btnSize??40,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Jn,{value:b.value,onChange:b.onChange??qc,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:b.helperText?C:void 0}),b.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" 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")&&d,x=b=>{p&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())};return n.jsxs("div",{className:Ne("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?x:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,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 Uc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function lx({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=Be.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(ge,{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(Lt,{size:"small",variant:Uu(i.device),fill:"soft",label:Gu(i.device,r)}),Uc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Uc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Zo(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 Er({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:x,empty:b,children:k}){const _=Ne("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),N={};i!==void 0&&(N.minHeight=i),u!==void 0&&(N.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(N["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const v=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(N).length?N:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:Ne("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(tt,{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(Rn,{variant:"loading"}):b!=null&&o.Children.toArray(k).length===0?n.jsx(Rn,{variant:"empty",children:b}):d?n.jsx("div",{className:Ne("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:k}):k]})}function ix({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,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 ux(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 Gc(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"}]}ux(Gt.t.bind(Gt)),Gc(Gt.t.bind(Gt));const Dr="none",cx=.5,dx=1.5,px=.25;function ks({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(Rn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Iu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(Ne("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function Kc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=Be.useTranslation(),s=gn("(max-width: 767px)")?40:24,l=wr(),i=tr(l?.settings??ta),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),g=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),y=o.useCallback(x=>{const b=Math.min(er,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:b})}catch{}},[l]),C=o.useCallback(x=>{try{x===Dr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Dr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Gc(r).map(x=>({key:x.value,label:x.label}))];return n.jsx(xn,{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(ge,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Er,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ks,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ks,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:cx,max:dx,step:px,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(Rn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(An,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Dr,onChange:C})}),n.jsx(ks,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:er,step:Nc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(Rn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(An,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Dr,onChange:()=>{}})})})]})})}function Yc({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:d=!1}){const{t:h}=Be.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),b=o.useRef(null),k=wr(),_=u>0,N=_&&i<u-1,v=!_||i>=u-1,B=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const w=o.useCallback(()=>{m(!1),y(null)},[]),E=o.useCallback(()=>{if(p){m(!1),y(null);return}const Z=x?.current?.getBoundingClientRect();Z&&y(Z),t?.(),m(!0)},[p,t]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const Z=b?.current?.getBoundingClientRect();Z&&y(Z),t?.(),m(!0)},[p,t]),A=gn("(max-width: 767px)"),R=o.useRef(null),[$,Y]=o.useState(null),T=o.useCallback(()=>{f(Z=>{const V=!Z;return Y(V?R.current?.getBoundingClientRect()??null:null),V})},[]),P=o.useCallback(()=>{f(!1),Y(null)},[]);o.useEffect(()=>{c&&(f(!1),Y(null))},[c]);const M=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(Go,{analyser:k?.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(Go,{analyser:k?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return zc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,b.current].map(Z=>Z?.querySelector("button")??null).find(Z=>!!Z&&Z.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(ge,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"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:b,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(ge,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:R,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(ge,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:C,"aria-expanded":A?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!A&&n.jsx("div",{className:"pp-bottom__meters",children:M})]}),e&&C&&A&&$&&n.jsx(xn,{anchorRect:$,onClose:P,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:M})}),n.jsxs("div",{className:"pp-bottom__right",children:[v&&n.jsx(ge,{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:!B}),N&&n.jsx(ge,{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:!B})]}),e&&p&&n.jsx(Kc,{anchorRect:g,onClose:w,hideNoiseRows:d})]})}function Zc({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=Be.useTranslation(),y=gn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,x=p||m,b=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,k=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,N=!!(k||_),v=N?k||_:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),B=b||(k?t:void 0),w=y&&typeof B=="string"&&(B.includes(" \xB7 ")||B.includes(" / "))?B.split(/\s[·/]\s/).pop():B,E=o.useMemo(()=>{const D=l&&typeof l=="object"?{...l}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(ge,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Cu,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[w?n.jsx("span",{className:"pp-title__depth caption-1",children:w}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:v}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Wu,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function hx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function mx(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 Xc=(e,t)=>{if(!t)return t;const a=typeof Gt?.t=="function"?Gt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function Jc(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Kl().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?Xc(`topic.${l.key}`,l.label):void 0,i?Xc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function As(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Qc(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 Cx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function fx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=Jc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function bx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function gx(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 yx(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 ed(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function vx(e,t,a,r){return ed(e,t*a+r)}function _x({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 xx(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 td=o.createContext(null);function wx(){const e=o.useContext(td);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Bx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Be.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const k=C.current;typeof k=="number"&&typeof t=="number"&&typeof e=="number"&&k>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const f=o.useMemo(()=>p.filter(k=>k!==null).length+1,[p]),x=o.useCallback(k=>{if(!aa(h))return;const _=p;let N;if(_[k]!=null){const B=_[k];N=_.map(w=>w!==null&&w>=B?null:w)}else N=[..._],N[k]=f;m(N);const v={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(v)}catch{}if(_[k]==null&&N.length>0&&N.every(B=>B!==null))try{typeof i=="function"&&i(v)}catch{}},[h,p,f,u,i,l]),b=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:b,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((k,_)=>n.jsx(Qo,{item:{word:k},disabled:h==="disabled",selectable:!0,selected:p[_]!==null,orderRank:p[_],onSelect:()=>x(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${k}-${_}`))})})}function Sr(e){return null}Sr.__isTrainingPage=!0;function wa(e,t){const a=wx();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 nd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=wa(e,t);return n.jsx(ws,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ad({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(_s,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function rd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function od({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function sd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Vc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function kx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Bx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const ld=3e4,Ax=/^(https?:|blob:|data:audio|\/|\.\/)/;function id(e){return typeof e=="string"&&Ax.test(e)?e:null}const Nx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ns=Symbol("timed-out");function Ex(e,t){if(t<=0)return Promise.resolve(Ns);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ns),t)})]).finally(()=>clearTimeout(a))}function Dx(e){return e?Da()||ar()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Sx(e,t){const a=[],r=id(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",Da()],["fallbackUrlResolver",ar()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Ex(i(s),u)}catch(h){return Et(`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===Ns?(Et(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${ld}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):Nx(c)||(Et(`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 jx(){return Date.now()+ld}const Tx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Mx(e){Et("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 jr(...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 Lx(e){return jr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function $x(e){return id(jr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function ud(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=jr(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 cd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=Be.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const A=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(A)}},[t,a]);const m=o.useCallback(D=>{const A=ud(D),R=jr(D?.wording,D?.label);return A===!0?{variant:"main",label:R??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:A===!1?{variant:"danger",label:R??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:R??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,b]=o.useState(null),k=o.useCallback(()=>{f.current?.(),f.current=null,b(null)},[]);o.useEffect(()=>k,[k]);const _=o.useRef(0),N=(D,A)=>{if(!In)return;const R=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${R}ms ${D}`,A??"")},v=o.useRef(0),B=o.useCallback((D,A,R)=>{k();const $=++v.current,Y=()=>v.current===$;_.current=In?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:A,rawUrl:R}),b(D),f.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),v.current++,Xr()};const T=V=>{N("\uD2BC\uB2E4",V);const O=Ga(V,te=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${te?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:Y()}),te&&Y()&&(f.current=null,b(null))});return f.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),v.current++,O.stop(),Xr()},O.done},P=Sx(A,R);N("\uCC28\uB840",P.map(V=>V.kind));const M=P[0]?.kind==="raw",Z=M?T(R):Promise.resolve(!1);(async()=>{if(await Z||!Y())return;const V=jx(),O=M?P.slice(1):P;for(let te=0;te<O.length;te++){if(!Y())return;N(`${O[te].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const I=await O[te].resolve(Tx(V,O.length-te));if(N(`${O[te].kind} \uAC00 \uB2F5\uD588\uB2E4`,I),!Y()||I&&(await T(I)||!Y()))return}Y()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Mx(A),f.current=()=>{v.current++,Xr()},N("\uB0AD\uB3C5\uD55C\uB2E4"),D1(A,{onEnd:()=>{Y()&&(f.current=null,b(null))}}))})()},[k]),w=o.useMemo(()=>C.map(D=>{const A=D??{},R=Lx(A)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:Y}=m(A),T=Array.isArray(A.corrects)?A.corrects:[],P=T.length?T.join(", "):A.answer!=null&&A.answer!==""?String(A.answer):null,M=typeof A.selectedText=="string"?A.selectedText:null,Z=ud(A)===!0,V=$x(A),O=!!V||Dx(R);return{problem:R,variant:$,label:Y,answer:P,selectedText:M,isCorrect:Z,sound:V,canHear:O}}),[C,m,d]),E=o.useMemo(()=>w.some(D=>D.answer!==null||D.selectedText!==null),[w]);return n.jsx(Hn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:D,closeWithAnimation:A})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("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(ge,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(l)}),n.jsx(ge,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:A,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:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("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":d("training.result.scoreAria",{correct:y,total:g}),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:g})]})})]}),w.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":d("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:d("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),w.map((D,A)=>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(A+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(ge,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===A?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===A?d("training.result.replaySoundStop",{no:A+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:A+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===A?k():B(A,D.problem,D.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[D.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(Lt,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},A))]})})]})})}const Es=new Set;function Rx(e){o.useEffect(()=>{if(!e||Es.has(e))return;Es.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 p=Date.now(),m=p-h;l=s,kf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Es.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function Mr(e,t){return e&&e.key||`step-${t??0}`}function Lr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Px(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Ix=300,Fx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Pn=Object.freeze({}),dd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ds(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 Ox=e=>n.jsx(cd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function zx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:b,ariaLabel:k,label:_,buildResults:N,onResult:v,typeKey:B,entryPoint:w,dailyTotal:E,itemRef:D,renderResultPopup:A,noiseOverride:R,hideNoiseRows:$=!1}=e;Rx(B&&!dd.has(B)?B:"");const Y=o.useRef(0);o.useEffect(()=>{Y.current=Date.now()},[]);const{t:T}=Be.useTranslation(),P=v,M=!!t,Z=t?.id||null,V=t?.meta||{},O=Array.isArray(t?.pages)?t.pages:[],te=Array.isArray(b)||o.isValidElement(b)&&typeof b!="function"?o.Children.toArray(b).filter(o.isValidElement):[],I=te.length>0,U=ce=>ce===Sr||ce?.__isTrainingPage===!0,Q=I&&te.some(ce=>U(ce.type)),H=Q?te.filter(ce=>U(ce.type)).map((ce,we)=>{const Re=ce.props||{};return{id:`children-page-${we}`,steps:o.Children.toArray(Re.children).filter(o.isValidElement),pageTop:Re.pageTop||Re.top||null,pageBottom:Re.pageBottom||Re.bottom||null}}):[{id:"children-page-0",steps:te}],S=I&&!M&&typeof b!="function",F=S?Math.max(1,H.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 ce=document.body;return ce.dataset.ihabTrainingPopupCount=String(Number(ce.dataset.ihabTrainingPopupCount||"0")+1),ce.classList.add("ihab-training-popup-open"),()=>{const we=Number(ce.dataset.ihabTrainingPopupCount||"1")-1;we>0?ce.dataset.ihabTrainingPopupCount=String(we):(delete ce.dataset.ihabTrainingPopupCount,ce.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return iv()},[]);const[L,G]=o.useState({...ta,enabled:!1}),ae=o.useRef(L);o.useEffect(()=>{ae.current=L},[L]);const se=o.useRef(R),me=o.useRef(!1),X=o.useRef(null);o.useEffect(()=>{let ce=!1;const we=Re=>{if(ce)return;me.current=!0;const Ke=Re?ea({...ta,enabled:!1},Re):{...ta},Oe=X.current;X.current=null;const J=Oe?ea(Ke,Oe):Ke;ae.current=J,G(J),Oe&&!se.current&&co(J),ir(J);const ue=se.current;if(ue){const De=typeof ue=="function"?ue(J):ue,Ie=ea(J,De);ae.current=Ie,G(Ie),ir(Ie)}};return Rf().then(Re=>{if(ce){const Ke=X.current;if(X.current=null,Ke&&!se.current){const Oe=Re?ea({...ta,enabled:!1},Re):{...ta};co(ea(Oe,Ke))}return}we(Re)}),()=>{ce=!0}},[]);const[z,ne]=o.useState(null),[W,q]=o.useState(null),pe=o.useCallback((ce,we)=>{ce==="main"?ne(we):q(we)},[]),Se=o.useRef(null),ve=o.useRef(null),Ce=o.useCallback(()=>{ve.current!==null&&(clearTimeout(ve.current),ve.current=null);const ce=Se.current;Se.current=null,ce&&co(ce)},[]);o.useEffect(()=>{if(typeof window>"u")return;const ce=()=>{document.visibilityState==="hidden"&&Ce()};return window.addEventListener("pagehide",Ce),document.addEventListener("visibilitychange",ce),()=>{window.removeEventListener("pagehide",Ce),document.removeEventListener("visibilitychange",ce),Ce()}},[Ce]);const de=o.useCallback(ce=>{const we=ea(ae.current,ce);if(ae.current=we,G(we),!me.current){X.current={...X.current??{},...ce},ir(we);return}se.current||(Se.current=we,ve.current!==null&&clearTimeout(ve.current),ve.current=setTimeout(Ce,Ix)),ir(we)},[Ce]),fe=L.mainSpeed,be=L.mainVolume,he=o.useCallback(ce=>de({mainSpeed:ce}),[de]),Le=o.useCallback(ce=>de({mainVolume:ce}),[de]),Fe=o.useMemo(()=>({settings:L,setSettings:de,registerAnalyser:pe,mainAnalyser:z,noiseAnalyser:W,playbackRate:fe,setPlaybackRate:he,mainVolume:be,setMainVolume:Le}),[L,de,pe,z,W,fe,he,be,Le]),$e=o.useRef(null),[qe,He]=o.useState(0),it=o.useRef([]),[rt,Qe]=o.useState("center"),[ft,Ee]=o.useState(!1),Ue=o.useRef(!1),Ae=o.useRef(null),Ve=o.useCallback(ce=>{Ue.current||(Ue.current=!0,Ee(!0),Ae.current=setTimeout(()=>{try{ce()}catch{Ue.current=!1,Ee(!1)}},Fx()?0:sx))},[]);o.useEffect(()=>()=>{Ae.current&&clearTimeout(Ae.current)},[]);const Je=o.useRef(m);o.useEffect(()=>{Je.current=m});const ot=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const ce=$e.current,we=ot.current;if(fo(ce,we),ce){const Re=Array.from(ce.querySelectorAll(kn)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if(Re)try{Re.focus()}catch{}}return()=>{const Re=document.activeElement;if(!Re||Re===document.body||ce&&ce.contains(Re))try{bo(we)?.focus?.()}catch{}}},[]),o.useEffect(()=>Kn(()=>Ve(()=>{const ce=Je.current;typeof ce=="function"&&ce()})),[Ve]),mo($e,!0);const[At,_t]=o.useState(!1),It=o.useRef(!1),[et,at]=o.useState(null),xt=o.useRef(0),Bt=o.useRef(0),St=()=>{xt.current+=1,Bt.current+=1,at(null)},[Pt,xe]=o.useState(""),[Te,Me]=o.useState(()=>Lr()),We=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!M&&!S||(Me(Lr()),St())},[M,Z,S]),o.useEffect(()=>{S&&Me(ce=>{const we=Math.max(0,Math.min(ce.pageIndex,Math.max(0,F-1)));return we!==ce.pageIndex?{...ce,pageIndex:we,stepIndex:0}:ce})},[S,F]);const dt=S?Math.max(0,Math.min(Te.pageIndex,F-1)):0,ut=S?H[dt]:null,ct=S&&ut&&Array.isArray(ut.steps)?ut.steps:[],Ze=M?Te.pageIndex:S?dt:typeof c=="number"?c:0,gt=M?O[Math.max(0,Math.min(Te.pageIndex,Math.max(0,O.length-1)))]:null,jt=M&>&&Array.isArray(gt.steps)?gt.steps:[],wt=M?jt.length:S?ct.length:typeof p=="number"?p:0,bt=M||S?Math.max(0,Math.min(Te.stepIndex,Math.max(0,wt))):typeof h=="number"?h:0,yt=M?O.length:S?F:typeof d=="number"?d:0;o.useEffect(()=>{if(!M&&!S)return;const ce=M?Tr(gt,Ze):ut?.id||`children-page-${Ze??0}`,we=new Date().toISOString();for(let Re=0;Re<=bt;Re+=1){const Ke=M?Mr(jt[Re],Re):`step-${Re}`,Oe=_e(ce,Ke);re.current.has(Oe)||re.current.set(Oe,we)}},[M,S,Ze,bt,ut?.id]),o.useLayoutEffect(()=>{const ce=We.current;if(typeof Ze=="number"&&ce!==null&&Ze!==ce&&Ze>ce)try{xe(T("training.problemNotice",{n:Ze+1}))}catch{}We.current=typeof Ze=="number"?Ze:We.current},[Ze,c,T]),o.useLayoutEffect(()=>{const ce=$e.current;if(!ce)return;const we=()=>ce.querySelector(".page-popup__scroll");let Re=null,Ke=null,Oe=null;const J=Xe=>{const ht=we();if(!ht)return;const mt=ht.scrollHeight<=ht.clientHeight;if(Qe(mt?"center":"top"),Xe&&!It.current){It.current=!0;try{_t(!0)}catch{}try{Ie.disconnect()}catch{}}},ue=()=>{Re!==null&&cancelAnimationFrame(Re),Re=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>J(!0),60)})},De=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>J(!1))};ue(),window.addEventListener("resize",De);const Ie=new MutationObserver(ue);Ie.observe(ce,{childList:!0,subtree:!0,attributes:!0});const Ye=setTimeout(()=>{It.current||J(!0)},400);return()=>{window.removeEventListener("resize",De),Re!==null&&cancelAnimationFrame(Re),Ke!==null&&clearTimeout(Ke),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(Ye);try{Ie.disconnect()}catch{}}},[$e]);const ke=o.useCallback(ce=>{$e.current&&($e.current._childOnNext=ce)},[]),nt=o.useCallback(ce=>{$e.current&&($e.current._childOnResult=ce)},[]),re=o.useRef(new Map),_e=(ce,we)=>`${ce}\0${we}`,Pe=o.useCallback((ce,we,Re)=>{Me(Ke=>{const Oe=Ke.answersByPage[ce]||{},J=Oe[we],ue=As(Re),De=As(J);if(J&&De>ue)return Ke;const Ie=Qc(Re,re.current.get(_e(ce,we)),ue);return{...Ke,answersByPage:{...Ke.answersByPage,[ce]:{...Oe,[we]:Ie}}}})},[Me]),Ge=o.useCallback((ce,we,Re)=>{const Ke=Tr(gt,Ze),Oe=Mr(ce,we);Pe(Ke,Oe,Re)},[gt,Ze,Pe]),vt=o.useCallback((ce,we,Re)=>{const Ke=Tr(gt,Ze),Oe=Mr(ce,we);Pe(Ke,Oe,Re),!Re?.allowChange&&ce?.autoAdvance!==!1&&Me(J=>({...J,stepIndex:Math.max(J.stepIndex,we+1)}))},[gt,Ze,Pe,Me]),st=o.useCallback((ce,we)=>{const Re=ut?.id||`children-page-${Ze??0}`,Ke=typeof we=="number"?we:bt??0,Oe=`step-${Ke}`;Pe(Re,Oe,ce),ce?.allowChange||Me(J=>({...J,stepIndex:Math.max(J.stepIndex,Ke+1)}))},[ut,Ze,bt,Pe,Me]),Vt=o.useCallback((ce,we)=>{const Re=ut?.id||`children-page-${Ze??0}`,Ke=`step-${typeof we=="number"?we:bt??0}`;Pe(Re,Ke,ce)},[ut,Ze,bt,Pe]),Yt=S?{currentPageIndex:Ze??0,currentStepIndex:bt??0,totalStepsInPage:ct.length,handleStepDone:st,handleStepChange:Vt}:null,Xt=async()=>{const ce=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:O,flowState:Te,answersByPage:Te.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(ce))||ce},$t=async()=>{const ce=ut?.id||`children-page-${Te.pageIndex}`,we=Te.answersByPage[ce]||{},Re=Q?(()=>{const J={};let ue=0;return H.forEach(De=>{const Ie=Te.answersByPage[De.id]||{},Ye=Array.isArray(De.steps)?De.steps.length:0;for(let Xe=0;Xe<Ye;Xe+=1){const ht=Ie[`step-${Xe}`];typeof ht<"u"&&(J[`step-${ue+Xe}`]=ht)}ue+=Ye}),J})():we;if(typeof N=="function"){const J=await Promise.resolve(N(Re,{pageAnswers:we,answersByPage:Te.answersByPage,pages:H,currentPageId:ce}));return typeof P=="function"&&await Promise.resolve(P(J))||J}const Ke=Object.entries(we).map(([J,ue],De)=>({index:De,key:J,payload:ue})),Oe={results:Ke,answers:Ke,score:0};return typeof P=="function"&&await Promise.resolve(P(Oe))||Oe},zt=()=>{const ce=++xt.current,we=()=>ce!==xt.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(M){const Oe=Xt();at(Pn);const J=Oe;Promise.resolve(J).then(ue=>{we()||at(ue||{isEmpty:!0})}).catch(ue=>{!we()&&at({isEmpty:!0})});return}if(S){const Oe=$t();at(Pn);const J=Oe;Promise.resolve(J).then(ue=>{we()||at(ue||{isEmpty:!0})}).catch(ue=>{!we()&&at({isEmpty:!0})});return}const Re=$e.current&&$e.current._childOnResult,Ke=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof Re=="function"){const Oe=Ke(Re);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?at(Oe):at(Oe&&typeof Oe.then=="function"?Pn:{});const J=()=>{we()||at(ue=>ue===Pn?{}:ue)};Promise.resolve(Oe).then(ue=>{ue&&!we()?at(ue):J()}).catch(ue=>{J()});return}if(typeof P=="function"){const Oe=Ke(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?at(Oe):at(Oe&&typeof Oe.then=="function"?Pn:{});const J=()=>{we()||at(ue=>ue===Pn?{}:ue)};Promise.resolve(Oe).then(ue=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ue&&!we()?at(ue):J()}).catch(ue=>{console.error("viewResults external handler failed",ue),J()});return}},sn=()=>{if(M){if(typeof Ze=="number"&&typeof yt=="number"&&Ze<yt-1){Me(we=>({...we,pageIndex:we.pageIndex+1,stepIndex:0}));return}return zt()}if(S){const we=ct.length;if(typeof bt=="number"&&bt<we-1){Me(Re=>({...Re,stepIndex:Re.stepIndex+1}));return}if(typeof Ze=="number"&&typeof yt=="number"&&Ze<yt-1){Me(Re=>({...Re,pageIndex:Re.pageIndex+1,stepIndex:0}));return}return zt()}if(typeof C=="function"){try{C()}catch{}return}const ce=$e.current&&$e.current._childOnNext;if(typeof ce=="function"){try{ce()}catch{}return}},Ft=M?V.title||V.label||k||T("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||k||T("common.popup","\uD31D\uC5C5"),Cn=k||Ft,Nt=M?V.title??V.label??Ft:a??_??Ft,kt=(ce,we)=>{const Re=Tr(gt,Ze),Ke=Mr(ce,we),Oe=Te.answersByPage[Re]?.[Ke],J=Px(ce,{page:gt,pageIndex:Ze,step:ce,stepIndex:we,storedPayload:Oe,answersByPage:Te.answersByPage,flowState:Te}),ue={key:Ke,index:we,stepIndex:bt,isLast:we===jt.length-1};switch(ce?.type){case"listen":return n.jsx(ws,{...ue,...J,onDone:De=>vt(ce,we,De)});case"confirm":return n.jsx(_s,{...ue,...J,onDone:De=>vt(ce,we,De),onChange:De=>Ge(ce,we,De)});case"confirmWithText":return n.jsx(xs,{...ue,...J,onDone:De=>vt(ce,we,De),onChange:De=>Ge(ce,we,De)});case"orderList":return n.jsx(Bs,{...ue,...J,onDone:De=>vt(ce,we,De),onChange:De=>Ge(ce,we,De)});default:return null}},pt=o.useRef(void 0);o.useEffect(()=>{const ce=pt.current;if(pt.current=Ze,ce===void 0||ce===Ze||!gr())return;const we=$e.current;if(!we)return;const Re=document.activeElement;if(!(!Re||Re===document.body||!we.contains(Re)||Re.disabled===!0))return;const Ke=we.querySelector(`.training-steps ${kn.split(", ").join(", .training-steps ")}`)??Array.from(we.querySelectorAll(kn)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Ze]);const Tt=M?O.length>0?n.jsx("div",{className:"training-steps",children:jt.map((ce,we)=>kt(ce,we))},`replay-${qe}`):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,ln=S?n.jsxs(td.Provider,{value:Yt,children:[ut?.pageTop?n.jsx("div",{className:"training-page-top",children:ut.pageTop}):null,n.jsx("div",{className:"training-steps",children:ct.map((ce,we)=>{const Re=ce;return o.cloneElement(Re,{...Re.props,_stepIndex:we,_totalSteps:ct.length,_stepKey:`step-${we}`,_pageIndex:Ze})})},`replay-${qe}`),ut?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:ut.pageBottom}):null]}):null,fn=o.useRef(-1),Wt=o.useCallback(()=>{if(!B)return;const ce=et,{results:we,correct:Re,total:Ke}=Ds(et),Oe={correct:Re,total:Ke,attempt:it.current.length+1,previousAttempts:[...it.current]};if(fn.current===Bt.current)return Oe;fn.current=Bt.current,Af({items:$f(we),category:dd.has(B)?"sentence":"word",trainingType:B,entryPoint:w??"sentence",itemRef:D??null,correct:Re,total:Ke,score:typeof ce?.score=="number"?ce.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-Y.current)/1e3)),dailyTotal:E??null});try{y?.(Oe)}catch{}return Oe},[B,w,E,D,et,y]);o.useEffect(()=>{!et||et===Pn||et?.isEmpty||(Ds(et).total??0)>0&&Wt()},[et,Wt]);const vn=o.useCallback(()=>{const ce=Wt();St(),Ve(()=>{typeof g=="function"&&g(ce),typeof m=="function"&&m()})},[g,m,Wt,at,Ve]),un=o.useCallback(()=>xe(""),[xe]),bn=o.useCallback(()=>{Ve(()=>{typeof m=="function"&&m()})},[m,Ve]),Ut=n.jsxs("div",{className:`page-popup${ft?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Cn,children:[n.jsxs("div",{ref:$e,className:`page-popup__panel ${At?"":"page-popup__panel--measuring"} ${rt==="center"?"page-popup__panel--center":rt==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Zc,{title:Nt,subtitle:M?V.subtitle||V.label:Array.isArray(s)?s.join(" / "):void 0,desc:M?void 0:r,depth:M?V.depth:s,icon:M?V.icon:l,wrapperStyle:M?V.wrapperStyle:i,iconTooltip:M?V.iconTooltip:u,progressMax:yt,progressIndex:Ze,pageIndex:Ze,pageCount:yt,onBack:bn,onClose:bn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${rt==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?ln:M?Tt:typeof b=="function"?b({registerOnNext:ke,registerOnResult:nt,panelRef:$e,setResultOverlay:at}):b})}),n.jsx(Yc,{onSettings:f,onNext:sn,onResult:zt,useNoiseSettingBtn:!!(M?V.useNoiseSetting??!0:x),stepIndex:bt,stepCount:wt,pageIndex:Ze,pageCount:yt,resultOpen:!!(et&&!et.isEmpty),hideNoiseRows:$})]}),et&&!et.isEmpty&&(A??Ox)({score:et.score,results:et.results||et.answers||[],contextsLength:et.results?et.results.length:et.answers?et.answers.length:0,onReplay:()=>{if(Y.current=Date.now(),et!==Pn){const{correct:ce,total:we}=Ds(et);it.current.push({correct:ce,total:we})}if(St(),He(ce=>ce+1),M){if(Me(Lr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){Me(Lr());return}try{const ce=$e.current&&$e.current._childOnResult;typeof ce=="function"&&ce({replay:!0})}catch{}},onClose:vn,pending:et===Pn}),et?.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(ge,{htmlType:"button",variant:"main",size:48,onClick:vn,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ba,{message:Pt,position:"top",onClose:un})]}),Bn=n.jsx(Cs.Provider,{value:Fe,children:Ut});return typeof document<"u"&&document.body?cn.createPortal(Bn,document.body):Bn}const Vn=zx;Vn.Page=Sr,Vn.ListenStep=nd,Vn.ConfirmStep=ad,Vn.ConfirmWithTextStep=rd,Vn.OrderListStep=od,Vn.CardStep=sd,Vn.CardOrderStep=kx;function Wx({label:e,homonum:t}){const a=ia()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=Jo(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:u})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function pd({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,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:cn.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(Wx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Hx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,sectionType:y="page",disc:C}){const{t:f,i18n:x}=Be.useTranslation(),b=x.language?.startsWith("ko")??!1,{anchorRect:k,openAt:_,close:N}=Fa(),[v,B]=o.useState(null),w=o.useCallback(()=>{N(),B(null)},[N]);Py(w,!!v);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",A=D.length>0,R=r===void 0&&t===void 0,$=A?"match":R?"original":"ganada",[Y,T]=o.useState(()=>$),[P,M]=o.useState("50"),[Z,V]=o.useState(1),[O,te]=o.useState(A);O!==A&&(te(A),T($));const I=Y==="match"&&!A||Y==="original"&&!R?$:Y,U=o.useMemo(()=>[...A?[{value:"match",label:f("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...R?[{value:"original",label:f("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:f("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:f("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:f("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:f("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:f("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:f("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[f,A,R]),Q=o.useMemo(()=>["10","25","50","100"].map(de=>({value:de,label:f("wordSearch.pageSize",{count:Number(de),defaultValue:`${de}\uAC1C\uC529 \uBCF4\uAE30`})})),[f]),H=de=>de.words?.[0],S=o.useMemo(()=>{const de=[...D].length,fe=lf(D),be=new Map;return he=>{let Le=be.get(he);return Le===void 0&&(Le=fe((he.words?.[0]?.label??"").slice(0,de))?0:1,be.set(he,Le)),Le}},[D]),F=o.useCallback((de,fe)=>{const be=Fe=>H(Fe)?.label??"",he=Fe=>H(Fe)?.syllables??[...be(Fe)].length,Le=Fe=>(Fe.words??[]).reduce(($e,qe)=>{const He=parseInt(qe.grade??"",10);return Number.isFinite(He)&&He<$e?He:$e},999);switch(I){case"match":return S(de)-S(fe)||hn(be(de),be(fe));case"ganada":return hn(be(de),be(fe));case"ganada_desc":return hn(be(fe),be(de));case"syllable":return he(de)-he(fe)||hn(be(de),be(fe));case"syllable_desc":return he(fe)-he(de)||hn(be(de),be(fe));case"grade":return Le(de)-Le(fe)||hn(be(de),be(fe));case"grade_desc":return Le(fe)-Le(de)||hn(be(de),be(fe));default:return 0}},[I,S]),L=o.useMemo(()=>s.slice().sort(F),[s,F]),G=Number(P)||10,ae=o.useMemo(()=>(l??[]).flatMap(de=>de.items.slice().sort(F).map(fe=>({item:fe,label:de.label}))),[l,F]),se=l?ae.length:L.length,me=Math.max(1,Math.ceil(se/G)),X=Math.min(Z,me),z=o.useMemo(()=>L.slice((X-1)*G,X*G),[L,X,G]),ne=o.useId(),W=o.useMemo(()=>{if(!l)return null;const de=ae.slice((X-1)*G,X*G),fe=new Map;for(const{item:be,label:he}of de)fe.has(he)||fe.set(he,[]),fe.get(he).push(be);return[...fe.entries()].map(([be,he])=>({label:be,items:he}))},[l,ae,X,G]);o.useEffect(()=>{V(1)},[Y,P,se,r]);const q=se>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(yn,{size:40,options:U,value:I,onChange:T,ariaLabel:f("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(yn,{size:40,options:Q,value:P,onChange:M,ariaLabel:f("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Po,{page:X,totalPages:me,onChange:V})]}):void 0,pe=de=>{u&&u(de)},Se=t!==void 0&&a?n.jsxs(n.Fragment,{children:[f("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),f("wordSearch.resultTitleSuffix",{unit:b?yf(a):a})]}):void 0,ve=t!==void 0&&t>0&&c!==void 0&&a?f("wordSearch.resultDisc",{unit:b?_f(a):a,max:c,selected:i.length}):void 0,Ce=C??ve;return n.jsxs(ya,{type:y,className:Ne("word-search-result-block",m),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(Se||q||Ce)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(tt,{icon:e,className:"word-search-result-block__head-icon"}),Se&&n.jsx("span",{className:"word-search-result-block__title h3",children:Se})]}),q&&n.jsx("div",{className:"word-search-result-block__head-actions",children:q}),Ce&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Ce})]}),(l?l.length===0:s.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:f("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(W??[]).map(de=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${ne}-${de.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${ne}-${de.label}`,children:de.label}),n.jsx("div",{className:"word-search-result-block__items",children:de.items.map(fe=>{const be=i.includes(fe.id);return n.jsx("div",{onMouseEnter:he=>{_(he.currentTarget),B(fe.words??[])},onMouseLeave:w,children:n.jsx(ge,{htmlType:"button",size:"word",align:"grid",label:(fe.words??[]).map(he=>he.label),subLabel:(fe.words??[]).some(he=>he.subLabel)?(fe.words??[]).map(he=>he.subLabel):void 0,selected:be,onClick:()=>pe(fe.id),minWidth:200})},fe.id)})})]},de.label)):n.jsx("div",{className:"word-search-result-block__items",children:z.map(de=>{const fe=i.includes(de.id);return n.jsx("div",{onMouseEnter:be=>{_(be.currentTarget),B(de.words??[])},onMouseLeave:w,children:n.jsx(ge,{htmlType:"button",size:"word",align:"grid",label:(de.words??[]).map(be=>be.label),subLabel:(de.words??[]).some(be=>be.subLabel)?(de.words??[]).map(be=>be.subLabel):void 0,selected:fe,onClick:()=>pe(de.id),minWidth:200})},de.id)})}),v&&k&&n.jsx(pd,{words:v,anchorRect:k})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(ge,{htmlType:"button",size:"56",type:"bar",label:f("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(ge,{htmlType:"button",size:"56",type:"bar",variant:"main",label:f("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Vx(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 qx({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:b=!1,searchLabel:k,searchChecking:_=!1,pairMode:N=!1,sectionType:v="page",beforeSearchContent:B,beforeContent:w,afterContent:E,hideCountControl:D=!1,ordinal:A=!1}){const{t:R}=Be.useTranslation(),$=o.useMemo(()=>R("wordPairs.infoNotes",{returnObjects:!0}),[R]),Y=o.useMemo(()=>Array.from({length:s-l+1},(S,F)=>{const L=l+F;return{key:String(L),label:R("wordPairs.count",{n:L})}}),[R,s,l]),T=o.useMemo(()=>R("wordPairs.ordinals",{returnObjects:!0}),[R]),P=o.useCallback(S=>A?R("wordPairs.phonemeOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeSingleLabel","\uC74C\uC808"):R("wordPairs.phonemeN",{n:S}),[A,T,a,R]),M=o.useCallback(S=>A?R("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):R("wordPairs.phonemeContrast",{n:S}),[A,T,a,R]),Z=o.useCallback((S,F)=>F?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:V,toggleAt:O,close:te}=Fa(),I=o.useCallback(S=>r(Number(S)),[r]),U=gn("(max-width: 767px)"),Q=o.useCallback(S=>Vx(S,e).map(({label:F,value:L,displayLabel:G})=>{const ae=!!L&&L!=="\uC5C6\uC74C";return n.jsxs("span",{className:Ne("phoneme-select-block__cell-jamo-part",L?"":"phoneme-select-block__cell-jamo-part--empty",ae?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${L==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:L==="\uC5C6\uC74C"?"x":L||d}),ae&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:G??F})]},F)}),[e,d]),H=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(ge,{htmlType:"button",size:40,type:U?"dot":void 0,icon:"info",label:U?void 0:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:V?"is-selected":void 0,"aria-expanded":!!V,"aria-haspopup":"dialog",onClick:S=>O(S.currentTarget)})}),V&&n.jsx(Yn,{title:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:V,onClose:te})]});return n.jsxs(ya,{type:v,title:p,icon:m,disc:g,action:y?H:void 0,className:Ne("phoneme-select-block",h),children:[w,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(An,{options:Y,value:String(a),onChange:I,size:40,ariaLabel:R("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,F)=>{const L=t[F*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:Q(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:R("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,F)=>{const L=t[F*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:Q(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(F+1)})]},F)})})]}):t.map((S,F)=>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:Q(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?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((S,F)=>{const L=t[F*2]??{};return n.jsx($n,{title:Z(P(F+1),F===0),sections:u?u(L,F*2):i,selected:L,onSelect:c?.(F*2),align:"newline"},F)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,F)=>{const L=t[F*2+1]??{};return n.jsx($n,{title:M(F+1),sections:u?u(L,F*2+1):i,selected:L,onSelect:c?.(F*2+1),align:"newline"},F)})})]}):t.map((S,F)=>n.jsx($n,{title:Z(P(F+1),F===0),sections:u?u(S,F):i,selected:S,onSelect:c?.(F),align:"newline"},F))})}),B&&n.jsx("div",{className:"phoneme-select-block__before-search",children:B}),(C||f||_)&&(()=>{const S=t.every(F=>{const L=af(F);return Object.entries(L).every(([G,ae])=>!ae||G==="coda"&&ae===Ll)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?x:void 0,children:[C&&n.jsx(ge,{htmlType:"button",size:"56",type:"bar",label:R("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),f?n.jsx(ge,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:k??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||b||_,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:k??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function Ux({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=Be.useTranslation();return n.jsx($n,{className:h,title:e??p("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:d,align:"inline"})}function Gx({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=Be.useTranslation();return a.length===0?null:n.jsx($n,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function Kx({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=Be.useTranslation(),p={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}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(qa,{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:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(qa,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(qa,{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={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(f,x)=>{x===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):x===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):x===p.count?i(f===m(2)?2:1):x===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx($n,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function Yx(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:b,countLabel:k,topContent:_,className:N=""}=e,{t:v}=Be.useTranslation(),B=u??v("common.search","\uAC80\uC0C9"),w=x??v("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=b??v("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,A]=o.useState(""),[R,$]=o.useState(d??r[0]?.key??""),[Y,T]=o.useState(h),[P,M]=o.useState(String(f??C[0]??10)),[Z,V]=o.useState(1);o.useEffect(()=>{V(1)},[D,P]);const O=c!==null,te=o.useCallback((se,me)=>{if(!me)return!0;const X=me.toLowerCase();return r.some(z=>{const ne=se[z.key];return ne==null?!1:String(ne).toLowerCase().includes(X)})},[r]),I=c??te,U=o.useMemo(()=>{const se=O?a.filter(me=>I(me,D)):a;return R?[...se].sort((me,X)=>{const z=me[R],ne=X[R];return z===ne?0:hr(z,ne,Y)}):se},[a,D,R,Y,O,I]),Q=Math.max(1,Math.ceil(U.length/Number(P)));Z>Q&&V(Q);const H=Math.min(Z,Q),S=U.slice((H-1)*Number(P),H*Number(P)),F=o.useCallback(se=>{R===se?T(me=>!me):($(se),T(!0)),V(1)},[R]),L=o.useMemo(()=>{if(typeof k=="function"){const se=U.length,me=k(se);if(typeof me=="string"){const X=me.lastIndexOf(String(se));if(X>=0)return{prefix:me.slice(0,X),suffix:me.slice(X+String(se).length)}}return{label:me}}if(typeof k=="string"&&k.includes("{n}")){const[se,me]=k.split("{n}");return{prefix:se,suffix:me}}return{prefix:v("common.totalCountPrefix","\uCD1D "),suffix:v("common.totalCountSuffix","\uAC1C")}},[k,U.length,v]),G=o.useMemo(()=>r.map(se=>({label:se.label,onClick:se.sortable!==!1?()=>F(se.key):void 0,className:se.className,sortDir:se.sortable!==!1&&R===se.key?Y?"asc":"desc":null})),[r,R,Y,F]),ae=o.useMemo(()=>C.map(se=>({value:String(se),label:v("common.pageSizeLabel",{n:se})})),[C,v]);return n.jsxs(Hn,{className:`popup-list ${N}`,title:t,onClose:y,children:[_,"label"in L&&n.jsx("p",{className:"toolbar__count body-1",children:L.label}),n.jsx(Io,{count:"label"in L?void 0:{value:U.length,prefix:L.prefix,suffix:L.suffix},search:O?{value:D,onChange:A,placeholder:B}:void 0,pageSize:{options:ae,value:P,onChange:M},pagination:{page:H,total:Q,onChange:V}}),n.jsx(Yo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:G,items:S,onRowClick:g,renderRow:se=>{const me=m!=null?se.id!=null&&m.has(se.id):p!=null&&se.id===p;return r.map(X=>({content:X.render?X.render(se):se[X.key]??"",className:Ne(X.className,me&&"popup-list__row--selected")}))},empty:O&&D!==""&&a.length>0?E:w})]})}function hd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:f="small",className:x,initialFocus:b="close"}=e,{t:k}=Be.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||b==="close")return;const D=_.current?.closest(".popup-panel"),A=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),R=b==="confirm"?A[A.length-1]:c?void 0:A[d?1:0];R&&!R.disabled&&R.focus()},[]);const N=o.useRef(!1),[v,B]=o.useState(!1),w=D=>{let A=!1;return{close:()=>{A=!0,D()},didClose:()=>A}},E=async D=>{if(N.current)return;N.current=!0;const A=typeof document<"u"?document.activeElement:null;B(!0);let R=!1;try{R=await D()}catch($){typeof console<"u"&&console.error($)}finally{R||(N.current=!1,B(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&A?.isConnected&&A.focus()}))}};return n.jsxs(Hn,{title:t,onClose:y,closeDisabled:v,inline:C,size:f,className:Ne("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||v,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const A=w(D);await d.onClick(A.close);const R=d.closeOnClick??!0;return R&&D(),R||A.didClose()})}}]:[],...c?[]:[{label:u??k("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:v,onClick:({closeWithAnimation:D})=>D()}],{label:i??k("common.confirm","\uD655\uC778"),variant:h,disabled:p||v,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const A=w(D);return await m(A.close),g&&D(),g||A.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Er,{children:s.map((D,A)=>n.jsx(Rn,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},A))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function Zx(e,t,a={}){const{t:r}=Be.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]),d=s?n.jsx(hd,{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:d,allowClose:u}}function Xx({onApply:e,onCancel:t}){const{t:a}=Be.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(Il(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Hn,{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})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,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:g,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 md=["var(--color-main)","var(--color-sub)"],Jx=2e3;function Qx(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 Ss({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=(b,k)=>Array.from({length:b}).map((_,N)=>{const v=6+Math.random()*12,B=Math.round(Math.min(18,v*Math.min(1.5,1+r*.4))),w=md[Math.floor(Math.random()*md.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,A=(k==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,R=Math.cos(A)*D,$=Math.sin(A)*D*1.35,Y=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${k}-${N}`,side:k,size:B,color:w,delay:E,vx:R,vy:$,angularVel:Y,life:T,borderRadius:P}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{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=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const te=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(te)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,b=Math.max(60,(window.innerHeight||800)*.05),k=te=>Math.max(40,(te||window.innerWidth)*.02),_=x?.width||window.innerWidth||375,N=x?.height||window.innerHeight||812,v=te=>{const I=[...te].sort((U,Q)=>U-Q);return I[Math.floor(I.length/2)]||1},B=v(i.map(te=>Math.abs(te.vy))),w=v(i.map(te=>Math.abs(te.vx))),E=Math.sqrt(2*C*(N*.72+b))/B,D=B*E/C,A=_*.5/(w*D),R=(te,I,U)=>Math.min(U,Math.max(I,te)),$=R(E,.8,2.4),Y=R(A,.7,2.2),T=a>0?a/Jx:1,P=i.map(te=>({...te,life:te.life*T,vx:te.vx*Y,vy:te.vy*$,startTime:f+te.delay,ended:!1})),M=x?{x:x.left-k(x.width),y:x.top+x.height+b}:{x:-k(window.innerWidth),y:window.innerHeight+b},Z=x?{x:x.left+x.width+k(x.width),y:x.top+x.height+b}:{x:window.innerWidth+k(window.innerWidth),y:window.innerHeight+b},V=te=>{let I=!1;for(const U of P){const Q=c.current[U.id];if(!Q||!Q)continue;if(te<U.startTime){Q.style.display="none",I=!0;continue}if(!U._inited){const z=U.side==="left"?M.x:Z.x,ne=U.side==="left"?M.y:Z.y;Q.style.left=`${z}px`,Q.style.top=`${ne}px`,Q.style.transform="translate3d(0px, 0px, 0)",Q.style.display="block",Q.style.zIndex="100000",typeof U.color=="string"&&U.color.startsWith("var(")&&(Q.style.background=Qx(Q,U.color)??"#FF0060"),U._inited=!0}const H=(te-U.startTime)/1e3;if(H<0)continue;const S=U.life/1e3;if(H>=S){Q.style.opacity="0",Q.style.display="none",U.ended=!0;continue}I=!0;const F=U.side==="left"?M.x:Z.x,L=U.side==="left"?M.y:Z.y,G=F+U.vx*H,ae=L+U.vy*H+.5*C*H*H,se=(U.angularVel||0)*H,me=G-F,X=ae-L;Q.style.transform=`translate3d(${me}px, ${X}px, 0) rotate(${se}deg)`,Q.style.opacity=`${Math.max(0,1-H/S)}`}I?d.current=requestAnimationFrame(V):h.current?.()};d.current=requestAnimationFrame(V);const O=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const te=document.createElement("div");te.className="party-container",te.style.position="fixed",te.style.inset="0",te.style.pointerEvents="none",te.style.overflow="visible",te.style.zIndex="2147483647";for(const I of i){const U=document.createElement("span");U.className=`confetti confetti--${I.side}`,U.setAttribute("aria-hidden","true"),U.style.display="none",U.style.position="fixed",U.style.left="0px",U.style.top="0px",U.style.width=`${I.size}px`,U.style.height=`${Math.max(4,I.size*.6)}px`,U.style.background=I.color,U.style.borderRadius=I.borderRadius,U.style.transform="translate3d(0,0,0)",U.style.opacity="0",te.appendChild(U),c.current[I.id]=U}(document.body||m.current).appendChild(te),p.current=te}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(O),p.current){try{p.current.remove()}catch{}p.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"?cn.createPortal(y,m.current||document.body):y}const js=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function ew({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:js(u.count),strength:js(u.strength),duration:js(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(Ss,{active:t,trigger:e}),a&&n.jsx(Ss,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function tw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=Be.useTranslation();wy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"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(ge,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(Lt,{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 nw(e){return e??""}const Cd=o.createContext({words:[],loading:!1});function aw(){return o.useContext(Cd)}function rw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){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(Cd.Provider,{value:h,children:d})}function ow({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((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 sw=(e,t)=>`${e} / ${t}`;function lw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=sw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=Be.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[x,b]=o.useState(!1);o.useEffect(()=>{const T=p.current;if(!T)return;const P=()=>b(T.scrollWidth>T.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const M=new ResizeObserver(P);return M.observe(T),()=>M.disconnect()},[C]);const k=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),_=C&&C.shape===k?C.pages:null,[N,v]=o.useState(0);o.useEffect(()=>{const T=y.current;if(!T||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>v(T.offsetHeight));return P.observe(T),()=>P.disconnect()},[]);const[B,w]=o.useState(0);o.useEffect(()=>{const T=m.current;if(!T||typeof ResizeObserver>"u")return;let P=null;const M=typeof requestAnimationFrame=="function"?O=>requestAnimationFrame(O):O=>setTimeout(O,16),Z=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:O=>clearTimeout(O),V=new ResizeObserver(()=>{P==null&&(P=M(()=>{P=null,w(O=>O+1)}))});return Array.from(T.children).forEach(O=>V.observe(O)),()=>{V.disconnect(),P!=null&&Z(P)}},[k]),o.useLayoutEffect(()=>{const T=m.current,P=y.current;if(!T||!P)return;const M=S=>S.getBoundingClientRect().height||S.offsetHeight,Z=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{Z.set(S.dataset.chromeSection??"",M(S))});const V=S=>M(P)-(Z.get(S??"")??0),O=Array.from(T.children).map(S=>M(S)),te=[];e.forEach((S,F)=>{const L=te[te.length-1],G=L?e[L[0]]:void 0;G&&S.group!=null&&G.group===S.group&&G.section===S.section?L.push(F):te.push([F])});const I=[];let U=[],Q=0;const H=()=>{U.length&&I.push(U),U=[],Q=0};te.forEach(S=>{const F=S.reduce((G,ae)=>G+O[ae],0),L=V(e[S[0]].section);U.length&&e[U[0]].section!==e[S[0]].section&&H(),F>L?S.forEach(G=>{U.length&&Q+O[G]>L+.01&&H(),U.push(G),Q+=O[G]}):(U.length&&Q+F>L+.01&&H(),S.forEach(G=>U.push(G)),Q+=F)}),H(),f(S=>S&&S.shape===k&&JSON.stringify(S.pages)===JSON.stringify(I)?S:{shape:k,pages:I})},[k,N,l,i,u,B]);const E=Mo,D=E,A=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),R=(T,P,M)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:M!=null&&t?.[M]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:A}),n.jsx("span",{className:"report-doc__page-no",children:s(T,P)})]})}),$=Array.from(new Set(e.map(T=>T.section??""))),Y={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:Ne("report-doc",c),style:Y,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:g,children:$.map(T=>{const P=R(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[P.header,P.footer]},T)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((T,P)=>{const{header:M,footer:Z}=R(P+1,_.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[M,T.map(V=>n.jsx("div",{children:e[V].content},e[V].id)),Z]},P)})})]})}function iw({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 ra=new Map;let $r=null;const uw=12;function cw(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 Rr(){const e=new Map;for(const t of ra.keys()){if(!t.isConnected)continue;const a=cw(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+uw)}}}function dw(e){return typeof window>"u"?()=>{}:(ra.set(e,(ra.get(e)??0)+1),ra.get(e)===1&&typeof ResizeObserver<"u"&&($r??($r=new ResizeObserver(()=>Rr())),$r.observe(e)),Rr(),()=>{const t=(ra.get(e)??1)-1;if(t>0){ra.set(e,t),Rr();return}ra.delete(e),$r?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Rr()})}function pw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=Be.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?dw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&cr(p)}},[]),n.jsxs("div",{ref:d,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":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(Hs,{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(ge,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function hw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=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:Ne("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:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{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 mw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:f}=Be.useTranslation(),x=o.useId(),b=t?`h${t}`:"span",k=s!=null,_=Ne("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",k&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:p,onDragLeave:m,onDrop:g,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:[k&&n.jsx(ge,{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(b,{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:N=>N.stopPropagation(),children:[l,i&&n.jsx(yn,{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:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const Cw="speechear:saved_word_tables";function fw(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 bw(){try{const e=localStorage.getItem(Cw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(fw):[]}catch{return[]}}function fd(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 Ts(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function gw(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 yw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:b,onReset:k,resetLabel:_,saveButtonLabel:N,secondarySaveButtonLabel:v,onReorder:B,showCellCount:w,onAddItem:E,className:D,renderSavePopup:A,renderWordSearch:R,hideControls:$,saveOnly:Y,tableName:T,nameValue:P,onNameChange:M,descriptionValue:Z,onDescriptionChange:V,namePlaceholder:O,descriptionPlaceholder:te,existingNames:I,editingName:U,onCancel:Q,initialItemsPerPage:H,renderCellAction:S,actionsLeftExtra:F}){const{t:L}=Be.useTranslation(),G=_??L("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),ae=C===void 0,se=!!M,[me,X]=o.useState([]),z=(P??"").trim(),ne=z||(O??"").trim(),W=(Z??"").trim()||(te??"").trim(),q=(I??[]).map(K=>K.trim().toLowerCase()),pe=[U?.trim().toLowerCase(),...me].filter(K=>!!K),Se=[...q];for(const K of pe){const ie=Se.indexOf(K);ie!==-1&&Se.splice(ie,1)}const ve=z!==""&&Se.includes(z.toLowerCase()),[Ce,de]=o.useState(Array(4).fill(null)),[fe,be]=o.useState(4),[he,Le]=o.useState(null),Fe=Ce.slice(0,fe),$e=!!d?.show,[qe,He]=o.useState(!0),[it,rt]=o.useState(!0),Qe=d&&{...d,top:qe,bottom:it},[ft,Ee]=o.useState("landscape"),[Ue,Ae]=o.useState(["image","word","caption","standardPron"]),[Ve,Je]=o.useState("show"),[ot,At]=o.useState(!0),[_t,It]=o.useState(!0),et=o.useRef(null),at=o.useRef([]),[xt,Bt]=o.useState(H==="all"?Number.POSITIVE_INFINITY:H??8),[St,Pt]=o.useState("right"),[xe,Te]=o.useState(!1),[Me,We]=o.useState(!1),{toastMessage:dt,toastType:ut,showWarning:ct,clearToast:Ze}=Vi("warning"),gt=o.useCallback(()=>Le(null),[Le]);E&&!ae&&!w&&!g&&Et("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&ae&&Et("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[jt,wt]=o.useState(()=>Math.max(C?.length??1,1)),bt=Math.max(g??0,C?.length??0,1),yt=ae?fe:w?Math.max(jt,C?.length??1,1):bt,{width:ke,height:nt}=Qn[ft],re=!ae&&!w,_e=Math.max(1,Math.min(bt,y??bt)),Pe=Math.min(xt,_e),Ge=re?Pe:yt,vt=Math.ceil((C?.length??0)/Math.max(1,Ge)),st=(C?.length??0)<bt?Math.floor((C?.length??0)/Math.max(1,Ge))+1:0,Vt=re?Math.max(1,vt,st):0,Yt=re?Array.from({length:Vt},(K,ie)=>(C??[]).slice(ie*Ge,(ie+1)*Ge)):null,Xt=!!Yt&&Yt.length>1,$t=ae?Fe.some(K=>K!==null&&K.length>1):(C??[]).some(K=>(K.words??[]).length>1),zt=T?.trim()||`${Ul(Ra())} ${$t?L("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):L("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,sn=o.useCallback(()=>Xt?at.current.filter(K=>K!==null):et.current?[et.current]:[],[Xt]),{print:Ft,openNewWindow:Cn,downloadHtml:Nt}=cs({getElements:sn,paperW:ke,paperH:nt,fileName:zt,onPopupBlocked:()=>{ct(L("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."))}}),kt=K=>{be(K),de(ie=>ie.length>=K?ie:[...ie,...Array(K-ie.length).fill(null)]),Le(null)},pt=K=>{de(ie=>{const je=[...ie];return je[K]=null,je}),he===K&&Le(null)},Tt=K=>{if(he===null)return;const ie=he;de(ze=>{const lt=[...ze];return lt[ie]=K.length>0?K:null,lt});const je=Fe.findIndex((ze,lt)=>lt>ie&&ze===null);Le(je!==-1?je:null)},ln=ae?Fe.some(K=>K?.some(ie=>!!ie.colloquialPronunciation)):(C??[]).some(K=>(K.words??[]).some(ie=>!!ie.colloquialLabel)),fn=!ae&&[...p?[p]:[],...C??[]].some(K=>(K.words??[]).some(ie=>!!ie.captionBadge||!!ie.captionLabel)),Wt=o.useMemo(()=>ia()?ae?Ce.slice(0,fe).flatMap(K=>(K??[]).map(ie=>[ie.word,ie.homonum])):(K=>K.flatMap(ie=>(ie.words??[]).map(je=>[je.label,je.homonum])))([...p?[p]:[],...C??[]]):[],[ae,Ce,fe,C,p]),[vn,un]=o.useState(!1);o.useEffect(()=>{if(Wt.length===0)return;let K=!1;return Promise.all(Wt.map(([ie,je])=>Sl(ie,je))).then(ie=>{K||un(ie.some(Boolean))},()=>{}),()=>{K=!0}},[Wt]);const bn=Wt.length>0&&vn,Ut=o.useMemo(()=>[...ae||w?[{label:L("wordTable.filter.columns","\uCE78 \uC218"),items:$4.map(K=>({value:`${K}\uCE78`,displayLabel:L("wordTable.filter.column",{count:K})})),display:"segmented"}]:[],...re&&(C?.length??0)>0?[gc(L,{hasPairs:$t,itemCount:bt,max:y})]:[],...Xt?[P4(L)]:[]],[L,ae,w,re,C?.length,$t,bt,y,Xt]),Bn={...ae||w?{[L("wordTable.filter.columns","\uCE78 \uC218")]:`${yt}\uCE78`}:{},...re&&(C?.length??0)>0?{[L($t?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Pe}\uAC1C`}:{},...Xt?{[L("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:St}:{}},ce=(K,ie)=>{ie===L("wordTable.filter.columns","\uCE78 \uC218")?ae?kt(parseInt(K)):wt(parseInt(K)):ie===L($t?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Bt(yc(parseInt(K),bt)):ie===L("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Pt(vc(K))},we=ae?gw(Fe.filter(K=>K!==null&&K.length>0).map(K=>({id:Ts(K),words:K.map(fd)}))):C??[],Re=()=>{ae&&de(K=>K.length>fe?K.slice(0,fe):K)},Ke=(K=!1)=>{if(We(K),se&&f){const ie=ne.trim().toLowerCase();ie&&X(je=>je.includes(ie)?je:[...je,ie]),f(ne,we,W||void 0,K),Re();return}if(Y&&f){f("",we,void 0,K),Re();return}if(f){Te(!0);return}Nt()},[Oe,J]=o.useState(!1),[ue,De]=o.useState(""),Ie=ue.trim(),Ye=Ie!==""&&q.includes(Ie.toLowerCase()),Xe=()=>{De(ne?L("wordTable.save.copyName",{name:ne,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),J(!0)},ht=()=>{!Ie||Ye||!f||(f(Ie,we,W||void 0,!0),Re(),J(!1))},mt=we.length===0,ye=mt||se&&(ne===""||ve),j=()=>{if(mt){ct(L("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(se&&ne===""){ct(L("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}se&&ve&&ct(L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},ee=n.jsx(va,{items:we,orientation:ft,contentTypes:Ue,baseItem:p,baseContentTypes:m,cutLine:Ve,showOutline:ot,showDivLine:_t,count:yt});return n.jsxs(n.Fragment,{children:[n.jsxs(ya,{type:"page",icon:t,title:e,disc:a,className:Ne("word-table-block",D),children:[Oe&&n.jsx(Hn,{size:"small",title:v??L("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>J(!1),footer:({closeWithAnimation:K})=>n.jsxs(n.Fragment,{children:[n.jsx(ge,{htmlType:"button",size:48,type:"bar",label:L("common.cancel","\uCDE8\uC18C"),onClick:K}),n.jsx(ge,{htmlType:"button",size:48,type:"bar",variant:"main",label:L("common.save","\uC800\uC7A5"),disabled:!Ie||Ye,onClick:ht})]}),children:n.jsx(Jn,{label:L("wordTable.save.nameLabel","\uC774\uB984"),value:ue,onChange:De,placeholder:L("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:ht,error:Ye?L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),xe&&f&&A?.({defaultName:typeof e=="string"?e:L("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:ee,previewW:ke,previewH:nt,items:we,existingNames:bw().map(K=>K.name),saveAsNew:Me,onSave:(K,ie)=>{f(K,we,ie,Me),Re(),Te(!1)},onCancel:()=>Te(!1)}),(ae||E)&&he!==null&&R?.({cellIndex:he,onConfirm:ae?Tt:K=>{if(E){const ie=K[0];if(ie){const je=new Set((C??[]).map(lt=>lt.id));let ze=Ts([ie]);for(let lt=2;je.has(ze);lt++)ze=`${Ts([ie])}~${lt}`;E({id:ze,words:[fd(ie)]})}}Le(null)},onClose:gt}),!$&&n.jsx(ss,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:bn,hasColloquial:ln,hasCaption:fn,contentTypes:Ue,orientation:ft,showOutline:ot,cutLine:Ve,showDivLine:_t,setters:{setContentTypes:Ae,setOrientation:Ee,setShowOutline:At,setCutLine:Je,setShowDivLine:It,setShowTopInfo:He,setShowBottomInfo:rt},showCutLine:(re?Ge:yt)>1,showDivLine2:$t,middleSections:Ut,extraSelected:Bn,onExtraSelect:ce,showPaperBands:$e,showTopInfo:qe,showBottomInfo:it}),Xt&&Yt?n.jsx("div",{className:"word-table-block__pages",children:Yt.map((K,ie)=>n.jsx(va,{orientation:ft,contentTypes:Ue,cutLine:Ve,showOutline:ot,showDivLine:_t,count:Ge,items:K,baseItem:p,baseContentTypes:m,onRemoveItem:b,onReorder:B&&((je,ze)=>B(je+ie*Ge,ze+ie*Ge)),renderCellAction:S&&((je,ze)=>S(je+ie*Ge,ze)),showFillerAdd:!!E,onActivateCell:E?(je=>Le(je+ie*Ge)):void 0,addableCount:Math.max(0,Math.min(Ge,bt-ie*Ge)),brand:Qe,code:h,contentRef:je=>{at.current[ie]=je},pageNumber:{current:ie+1,total:Yt.length},pageNumberPosition:St},ie))}):n.jsx(va,{orientation:ft,contentTypes:Ue,cutLine:Ve,showOutline:ot,showDivLine:_t,count:yt,items:ae?void 0:C??[],baseItem:ae?void 0:p,baseContentTypes:m,editCells:ae?Fe:void 0,activeCell:he,onActivateCell:ae||E?Le:void 0,onRemoveCell:ae?pt:void 0,onRemoveItem:ae?void 0:b,onReorder:ae?void 0:B,renderCellAction:ae?void 0:S,brand:Qe,code:h,showFillerAdd:!!E,contentRef:et}),!$&&!Y&&F!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:F}),se&&!$&&n.jsxs(Er,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(Rn,{variant:"custom",label:L("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{required:!0,value:P??"",onChange:M,placeholder:O?O+L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):L("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:L("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:ve?L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:K=>{(K.key==="Tab"&&!K.shiftKey||K.key===" ")&&!(P??"").trim()&&(O??"").trim()&&(K.preventDefault(),M?.(O??""))}})}),n.jsx(Rn,{variant:"custom",label:L("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{value:Z??"",onChange:V,placeholder:te?te+L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):L("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:L("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:K=>{(K.key==="Tab"&&!K.shiftKey||K.key===" ")&&!(Z??"").trim()&&(te??"").trim()&&(K.preventDefault(),V?.(te??""))}})})]})]}),!$&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!Y&&x&&n.jsx(ge,{htmlType:"button",size:40,type:"bar",label:L("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!Y&&k&&n.jsx(ge,{htmlType:"button",size:40,type:"bar",label:G,onClick:k}),!Y&&n.jsx(ge,{htmlType:"button",size:40,type:"bar",label:L("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Cn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[Q&&n.jsx(ge,{htmlType:"button",size:"56",type:"bar",label:L("common.cancel","\uCDE8\uC18C"),onClick:Q}),!Y&&n.jsx(ge,{htmlType:"button",size:"56",type:"bar",label:L("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Ft}),v&&n.jsx(ge,{htmlType:"button",size:"56",type:"bar",label:v,onClick:()=>se?Xe():Ke(!0),disabled:mt,onDisabledClick:()=>{ct(L("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(ge,{htmlType:"button",size:"56",type:"bar",variant:"main",label:N??L("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>Ke(!1),disabled:ye,onDisabledClick:j})]})]}),n.jsx(ba,{message:dt,type:ut,onClose:Ze})]})}const vw=8;function bd({items:e,className:t}){const{t:a}=Be.useTranslation(),r=e.length,s=r<=3?1:2,l=vw,i=r>l,u=e.slice(0,i?l-1:l),c=r-u.length,d=Math.ceil(Math.min(r,l)/s)||1,h=s*d;return n.jsx("div",{className:Ne("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:h},(p,m)=>{if(i&&m===l-1)return n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--more",children:n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:c,defaultValue:"+{{count}}"})})},m);const g=u[m];return g?n.jsx("div",{className:"word-table-thumb__cell",children:(g.words?.length?g.words:[{label:g.id}]).map((y,C)=>n.jsxs(o.Fragment,{children:[C>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:y.label})]},C))},m):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},m)})})}function _w({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:f,onMore:x,titleNode:b,className:k}){const{t:_}=Be.useTranslation(),N=b!=null,v=h!=null||p!=null||m!=null||g!=null,B=w=>{w.target===w.currentTarget&&!N&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),f?.())};return n.jsxs("div",{className:Ne("word-table-button",C?"word-table-button--selected":"",v?"":"word-table-button--no-footer",k),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:f,onKeyDown:B,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(bd,{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:[b??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&&!N&&n.jsx(ge,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:w=>{w.stopPropagation(),x(w)}})]}),(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?ql(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(Lt,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(Lt,{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:w=>{w.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:ql(p,_)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(Lt,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(Lt,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":_("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
|
|
1040
|
+
`).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:Mo,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 x_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=Be.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const x=Kn(()=>{const _=document.getElementById(g);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),b=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,B=_=>{_.matches&&m(!1)};return b&&(b.matches&&m(!1),b.addEventListener?.("change",B)),()=>{x(),b?.removeEventListener?.("change",B)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,b)=>u?u(x,{onClick:b}):n.jsx("a",{href:x.href,onClick:b,"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,b)=>n.jsx("span",{children:f(x)},`${b}:${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":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"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:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,b)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${b}:${x.href}`))})})]})}function w_({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,...Yu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function B_({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 b=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(B=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),B(!!e.current&&b===a.current)},C);r.current=_})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=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:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const xa=9,k_=e=>Math.round(Math.min(xa,Math.max(0,e))/xa*100),A_=e=>e/100*xa,er=2,Nc=.1,N_=e=>Math.min(er,Math.max(0,e)),E_=.1,D_=e=>Math.round(e*1e6)/1e6;function tr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return N_(t);const a=Math.min(xa,Math.max(0,Number(e.level)||0))/xa,r=Number(e.mainVolume);return r>0?a>0?D_(Math.min(er,Math.max(E_,a/r))):0:1}const Ec=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Dc(e){return Ec(e)}function hs(e){return Ec(e)*tr(e)}function ms(e,t=R1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,hs(e)/a)}function ea(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=tr({level:a.level,mainVolume:a.mainVolume})),a}const ta={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Cs=o.createContext(null);function wr(){return o.useContext(Cs)}const fs=e=>`${$1()}/${e}`,Sc=e=>Array.from({length:10},(t,a)=>fs(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Br={get defaultNoise(){return fs("noise1.mp3")},get street(){return Sc("noise2")},get restaurant(){return Sc("noise3")},get buzz(){return fs("noise4.mp3")}};function S_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Br.defaultNoise;case"street":return Br.street[t];case"restaurant":return Br.restaurant[t];case"buzz":return Br.buzz;default:return null}}function j_({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),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),f=o.useCallback((N,v=250)=>{const k=l.current;if(!k)return;const w=d.current;if(w){d.current=null;try{k.pause()}catch{}k.src=w,k.load()}if(!k.src)return;m.current+=1,C();try{to(),rr(k).then(R=>{if(l.current===k)try{s.current?.("noise",R)}catch{}})}catch{}const A=k.paused?0:or(k);k.paused&&zn(k,0),k.play().catch(()=>{});const D=performance.now(),E=()=>{const R=Math.min(1,(performance.now()-D)/v);try{zn(k,A+(N-A)*R)}catch{}R<1?p.current=requestAnimationFrame(E):p.current=null};p.current=requestAnimationFrame(E)},[C]),x=o.useCallback((N=250,v)=>{const k=l.current;if(!k||k.paused){v?.();return}const w=++m.current;C();const A=performance.now(),D=or(k),E=()=>{const R=Math.min(1,(performance.now()-A)/N);try{zn(k,D*(1-R))}catch{}if(R<1)p.current=requestAnimationFrame(E);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{k.pause()}catch{}v?.()}};p.current=requestAnimationFrame(E),g.current=setTimeout(()=>{if(g.current=null,m.current===w){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{k.paused||(zn(k,0),k.pause(),v?.())}catch{}}},N+150)},[C]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{C();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const b=e?ms(e.settings):0,B=!!e?.settings.enabled&&b>0;o.useEffect(()=>{if(!B)return;let N=0;const v=setInterval(()=>{const k=l.current;if(!k||k.paused){N=0;return}const w=t.current;if(w&&!w.paused&&!w.ended||y()||a.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,x())},400);return()=>clearInterval(v)},[x,B,t,a,y]),o.useEffect(()=>{const N=()=>{const v=l.current;if(document.hidden){if(v&&!v.paused){C();try{v.pause()}catch{}}return}if(!v||!v.paused)return;const k=t.current,w=!!k&&!k.paused&&!k.ended||y()||a.current==="playing",A=h.current;w&&A?.enabled&&A.volume>0&&f(A.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:b,type:e.settings.type}:null},[e,e?.settings.enabled,b,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const N=e?.settings,v=l.current;if(!v)return;const k=N?ms(N):0;if(!N||!N.enabled||k===0){x();return}if(c.current!==N.type){const w=S_(N.type);w&&(c.current=N.type,u(w),d.current=w,x(150,()=>{if(d.current!==w)return;d.current=null,v.src=w,v.load();const A=t.current;if(A&&!A.paused||y()){_.current?.();const D=()=>{v.removeEventListener("canplay",D),_.current===E&&(_.current=null);const R=t.current,$=h.current;(R&&!R.paused&&!R.ended||y())&&$?.enabled&&$.volume>0&&f($.volume)},E=()=>v.removeEventListener("canplay",D);_.current=E,v.addEventListener("canplay",D)}}))}else{const w=t.current,A=!!w&&!w.paused&&!w.ended||y()||a.current==="playing";if(A&&d.current)f(k);else if(A&&v.paused&&v.src)f(k);else if(!v.paused)if(!A)x();else{C();const D=or(v),E=performance.now(),R=()=>{const $=Math.min(1,(performance.now()-E)/150);try{zn(v,D+(k-D)*$)}catch{}$<1?p.current=requestAnimationFrame(R):p.current=null};p.current=requestAnimationFrame(R)}}},[e?.settings,e?.settings.enabled,b,e?.settings.type,C,f,x,t,a,h,y]),o.useEffect(()=>{const N=l.current;if(N)try{N.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 T_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=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 b=(N,v=1)=>{try{const k=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(k*300/Math.max(.25,v)))}catch{return 1200}},B=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const v=window.speechSynthesis,k=++f.current;try{try{v.cancel()}catch{}const w=N??e,A=Array.isArray(w)?w.filter(T=>!!T):[w||""];A.length===0&&A.push("");const D=Math.max(.3,Math.min(3,t));y.current=A.reduce((T,F)=>T+b(F,D||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const E=h.current;E?.enabled&&(E?.volume??0)>0&&c(E.volume);const R=()=>{try{const T=g.current||performance.now(),F=performance.now()-T,M=y.current||1200,X=Math.min(1,F/M);try{r.current&&(r.current.style.left=`${X*100}%`),s.current&&s.current.style.setProperty("--progress",String(X))}catch{}X<1&&(C.current=requestAnimationFrame(R))}catch{}},$=()=>{if(k===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=T=>{const F=new SpeechSynthesisUtterance(A[T]);try{F.rate=D}catch{}try{F.volume=Math.max(0,Math.min(1,a))}catch{}F.onend=()=>{if(k===f.current){if(T<A.length-1){try{G(T+1)}catch{$()}return}$()}},F.onerror=()=>{$()},F.onstart=()=>{if(!(T>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(R)}catch{}},x.current=!0,v.speak(F)};try{G(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),_=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:B,stopTTS:_}}const M_=.01,L_=.3;async function $_(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 g=Math.floor(L_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=M_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,f=Math.min(C+m,c+p,u.length);let x=0;for(let b=C;b<f;b++){const B=Math.abs(u[b]);B>x&&(x=B)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function jc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await $_(l,t,a,r)}catch(s){try{const l=Il(s)}catch{}return null}}const bs=45,R_=74,P_=2;function kr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function Ar(e){return kr(e)/45}const I_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Tc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Mc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Tc(t),s=Tc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",I_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Lc(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 F_(e,t){const a=Lc(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 O_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Lc(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 z_({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 W_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Mc({durationsSec:[r],leadInMs:s,tailMs:l});return F_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function H_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return O_(Mc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function V_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function q_({ended:e,completedByEnd:t}){return!!e||!!t}function U_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function G_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function K_(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 Y_(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?$c(a)!==$c(t):!0}function $c(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Rc=4,Z_=Ar(Rc/bs);function X_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[x,b]=o.useState(null),[B,_]=o.useState(!1),[N,v]=o.useState(null),[k,w]=o.useState(2),[A,D]=o.useState(0),[E,R]=o.useState(null),[$,G]=o.useState(!1),[T,F]=o.useState(!1),M=3,X=3,Z=1,O=300,Y=o.useRef(0),I=o.useCallback(()=>{const xe=C.current,Ce=f&&f.current?f.current:xe?xe.closest(".audio-player__wave"):null,ce=Ce?Ce.getBoundingClientRect():xe?xe.getBoundingClientRect():null,ge=ce?ce.width:0,be=ce?Math.max(100,ce.width):320,he=ce?ce.height:0,Me=Math.max(Z,Math.min(O,Math.floor((be+X)/(M+X)))),We=Me*M,Re=Math.max(0,Me-1),qe=Math.max(0,Re>0?(be-We)/Re:X);return{bars:Me,gap:qe,height:he,width:ge}},[]),q=o.useRef(void 0),Q=o.useRef(null),H=o.useCallback(async(xe,Ce,{quiet:ce=!1}={})=>{const ge=++Y.current,be=()=>Y.current===ge;try{if(ce||_(!1),q.current=xe,!xe){be()&&b(null);return}let he=Ce;if(!he)try{for(let Re=0;Re<4&&!(C.current||f.current);Re++)await new Promise(qe=>requestAnimationFrame(qe));await new Promise(Re=>requestAnimationFrame(Re));const We=I();We.height>0&&D(We.height),he=We.bars,w(We.gap)}catch{he=120}Q.current=he;const Me=await jc(xe,he);if(!be())return;if(!Me){b(null),_(!1);return}b(Me),v(he),_(!0)}catch{if(!be())return;b(null),_(!1)}},[_,b,D,w,v,I]);o.useEffect(()=>{const xe=f.current;if(!xe||typeof ResizeObserver>"u")return;let Ce=null;const ce=new ResizeObserver(()=>{Ce!==null&&cancelAnimationFrame(Ce),Ce=requestAnimationFrame(()=>{Ce=null;try{const ge=I();if(ge.width<=0||(ge.height>0&&D(ge.height),Q.current===null||ge.bars===Q.current))return;const be=q.current;w(ge.gap),be?H(be,ge.bars,{quiet:!0}).catch(()=>{}):Q.current=ge.bars}catch{}})});return ce.observe(xe),()=>{ce.disconnect(),Ce!==null&&cancelAnimationFrame(Ce)}},[I,H]),o.useEffect(()=>{const xe=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;H(typeof xe=="string"?xe:void 0).catch(()=>{}),F(!1)},[t,a,H]),o.useEffect(()=>{let xe=!1;if(G(!1),R(null),!l||!N)return;const Ce=c>0?c*(u||1):void 0;return jc(l,N,Ce,!0).then(ce=>{xe||(R(ce),ce||G(!0))}).catch(()=>{xe||(R(null),G(!0))}),()=>{xe=!0}},[l,N,c,u]);const S=Math.max(0,Math.min(1,d)),P=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),L=N||40,U=o.useMemo(()=>H_({bars:L,trackDurationSec:y,leadInMs:m,tailMs:g}),[L,y,m,g]),ae=o.useMemo(()=>Array.from({length:L}).map((xe,Ce)=>{const ce=Ce>=U.lead&&Ce<U.lead+U.sound,ge=U.sound>0&&ce?Math.min(L-1,Math.round((Ce-U.lead)/U.sound*L)):-1,be=ce?x&&x[ge]!=null?x[ge]:null:x?0:null,he=be==null?null:Math.min(1,be/P*S),Me=he!=null&&A>0&&kr(he)<=Rc,We=he==null?.15:Me?0:Ar(he),Re=Me,qe=L>1?Ce/(L-1):0;return n.jsx("div",{className:Re?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":We,"--i":Ce,"--mix":qe}},Ce)}),[L,x,P,S,A,U]),se={"--progress":String(Math.max(0,Math.min(1,r)))},me=o.useMemo(()=>E&&E.length&&Math.max(...E.map(xe=>Number.isFinite(xe)?Math.abs(xe):0))||1,[E]),te=S*Math.max(0,i),z=!l||!E||!E.length?1:Math.max(1,te),ne={"--bar-gap":`${k}px`,"--wave-h":`${kr(z)}px`,"--wave-h1":`${bs}px`},W=B&&(l?!!E||$:!0);o.useEffect(()=>{W&&F(!0)},[W]);const V=T?B:W;o.useEffect(()=>{h?.(V)},[V,h]);const pe=N||40,Ee=o.useMemo(()=>Array.from({length:pe}).map((xe,Ce)=>{const ce=E&&E[Ce]!=null?E[Ce]:null,ge=ce==null?0:Math.abs(ce)/me*te,be=Math.max(Z_,Ar(ge)),he=pe>1?Ce/(pe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":be,"--i":Ce,"--mix":he}},Ce)}),[pe,E,me,te,A]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:Ee}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${V?"is-ready":""}`,ref:C,children:ae}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${V?"is-ready":""}`,ref:s,style:se,children:ae})]})]})}const Pc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function gs(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 d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const J_=2e3;function Ic(e,t=J_){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 Q_({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 d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function ex(){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 tx({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 nx(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 ax=400,rx=2e3,Fc=5;function ox({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=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(In){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>ax){const x=h.current===null||f-h.current>rx;if(h.current=f,x&&d.current<Fc){d.current+=1;const b=d.current;let B=null;try{B=typeof document<"u"?document.visibilityState:null}catch{}kt(`progress-ticker-slow-frames#${b}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,B==="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.",b>=Fc?`(${b}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${b}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,b=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,B=b?0:nx(f),_=t.current,N=(i||0)>0||(u||0)>0,v=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(B===null&&!v)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const k=b?x.duration:B||0;In&&v&&!(k>0)&&kt("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 w=N?W_({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:k,leadInMs:i||0,tailMs:u||0}):z_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:B??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${w*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(w))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function ys({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=Be.useTranslation(),m=e,g=wr(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),b=ex(),B=o.useRef(null),_=o.useRef(!1),N=o.useRef(null),{ref:v,rect:k,show:w,hide:A}=tx();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[D,E]=o.useState(!1),[R,$]=o.useState("idle"),[G,T]=o.useState("stopped"),F=o.useRef("stopped");o.useEffect(()=>{F.current=G},[G]);const[M,X]=o.useState(0),[Z,O]=o.useState("active"),Y=o.useRef(!1);o.useEffect(()=>{if(Z!=="playMode"||!Y.current)return;Y.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const ue=x.current?.querySelectorAll("button")[1];try{ue?.focus()}catch{}},[Z]);const[I,q]=o.useState(null),[Q,H]=o.useState(null),[S,P]=o.useState(0),[L,U]=o.useState(!1),[ae,se]=o.useState(0),me=g?.playbackRate??1,te=g?.mainVolume??1,z=g?hs(g.settings):0,ne=g?Dc(g.settings):te,[W,V]=o.useState("idle"),[pe,Ee]=o.useState(""),[xe]=o.useState("top"),Ce=o.useRef(null),ce=o.useRef(0),ge=o.useRef(null),be=o.useRef(!0),he=B_({mountedRef:be}),Me=o.useRef(null),We=o.useRef(d),Re=o.useRef(h);o.useEffect(()=>{We.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Re.current=Math.max(0,h||0)},[h]);const{start:qe,stop:He,settleTo:st}=ox({audioRef:C,fillRef:f,waveProgressRef:ge,sourcesRef:Ce,currentIndexRef:ce,sequencer:he,leadInMs:d,tailMs:h}),{onReadyChange:lt,waitForReady:Qe,markNotReady:dt}=Q_({showSoundWaveForm:u,showNoiseWaveForm:c}),Se=o.useRef(null),Ge=o.useRef(s),Ne=o.useRef(r),Ie=o.useRef(null),Je=o.useRef(!1),[nt,Nt]=o.useState(!1),_t=o.useCallback(J=>{Je.current=J,Nt(J)},[]),Lt=o.useRef(null),{activeNoiseUrl:et,noiseSettingsRef:at,fadeInNoise:Et,fadeOutNoise:wt}=j_({noisePlayer:g,audioRef:C,playbackStateRef:F,sequencer:he}),{startTTS:Tt,stopTTS:Dt}=T_({ttsText:l,playbackRate:me,mainVolume:ne,fillRef:f,waveProgressRef:ge,setProgress:X,setPlaybackState:T,setStateLocal:O,fadeInNoise:Et,fadeOutNoise:wt,noiseSettingsRef:at,onDoneRef:Ne,handleEndRef:Lt});o.useEffect(()=>{Ze.current=Dt});const gt=J=>{if(typeof window>"u"||!window.speechSynthesis){try{Ee(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Tt(J);return}Bt("tts"),Tt(J)},rt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],ut=(!rt||rt.length===0)&&!!l,ye=Array.isArray(I)&&I.length>0?I:Array.isArray(Q)&&Q.length>0?Q:null,Le=Math.max(Array.isArray(ye)?ye.length:0,rt.length);o.useEffect(()=>(be.current=!0,()=>{be.current=!1}),[]);const je=()=>{he.abort()},Ze=o.useRef(null),Ue=o.useRef(null),yt=o.useRef(null),bt=o.useRef(null);bt.current||(bt.current=()=>{yt.current=null;const J=C.current;if(Ue.current==="audio"&&J&&(!J.paused||he.isRunning())){je();try{J.pause()}catch{}be.current&&(T("paused"),He(),wt())}else if(Ue.current==="tts")try{Ze.current?.()}catch{}});const Bt=J=>{Ue.current=J,yt.current=Ua(bt.current)},pt=()=>{yt.current?.(),yt.current=null};o.useEffect(()=>()=>{bt.current&&fr(bt.current)},[]);const vt=o.useRef(me);o.useEffect(()=>{vt.current=me||1},[me]);const Te=o.useCallback(J=>{const ue=vt.current||1;try{J.defaultPlaybackRate=ue}catch{}try{J.playbackRate=ue}catch{}},[]),it=o.useCallback((J,ue)=>{if(!Y_(J,ue)){try{J.currentTime=0}catch{}Te(J);return}J.src=ue,Te(J),J.load(),Te(J)},[Te]),re=o.useCallback(()=>{Ie.current&&(clearTimeout(Ie.current),Ie.current=null),V("idle")},[]),fe=o.useCallback(async(J,ue=3,Ae=50,Fe=0)=>{re();const Ye=he.generation(),Xe=!!J&&J.currentTime>0&&!J.ended,ht=Math.max(0,We.current-Math.max(0,Fe));if(ht>0&&!Xe){Bt("audio"),qe(),T("playing");const mt=at.current;if(mt?.enabled&&(mt.volume??0)>0)try{Et(mt.volume)}catch{}if(!await he.waitPad(ht,"lead",Fe)||!be.current||!he.isCurrent(Ye))return!1}he.enterSound();for(let mt=0;mt<ue;mt++){if(!be.current||!he.isCurrent(Ye))return!1;try{return Bt("audio"),await J.play(),!0}catch(_e){if((_e instanceof Error||typeof _e=="object"&&_e&&"name"in _e?_e.name:void 0)==="AbortError"){if(!he.isCurrent(Ye))return!1;await new Promise(j=>setTimeout(j,Ae));continue}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,qe,he,Et,at,re]),Pe=o.useCallback(J=>{const ue=he.generation(),Ae=Math.max(0,Re.current-Math.max(0,J));qe();const Fe=at.current;if(Fe?.enabled&&(Fe.volume??0)>0)try{Et(Fe.volume)}catch{}const Ye=()=>{try{Me.current?.()}catch{}};if(Ae<=0){he.leave(),Ye();return}he.waitPad(Ae,"tail",J).then(Xe=>{he.leave(),Xe&&he.isCurrent(ue)&&Ye()}).catch(()=>{})},[he,qe,Et,at]),Ve=o.useCallback(()=>{const J=C.current;if(!J)return;const ue=()=>{T("playing"),O("playMode"),U(!0),qe();try{to(),rr(J).then(Xe=>{if(be.current)try{y.current?.("main",Xe)}catch{}})}catch{}const Ye=at.current;Ye?.enabled&&(Ye?.volume??0)>0&&Et(Ye.volume)},Ae=()=>{q_({ended:!!J?.ended,completedByEnd:Je.current})||(T("paused"),He(),wt())},Fe=()=>{const Ye=()=>{try{const Xe=Ce.current,ht=V_(Xe,ce.current);if(ht!==null){ce.current=ht,P(ht),U(!0);const mt=Xe?.[ht]&&Xe[ht].src;if(mt&&J){it(J,mt),fe(J).catch(()=>{});return}}}catch{}T("stopped"),X(1);try{if(J)try{J.currentTime=0}catch{}}catch{}He(),U(!1),wt();try{!Ge.current&&Lt.current&&Lt.current()}catch{}};if(Me.current=Ye,Re.current>0){qe(),he.waitPad(Re.current,"tail").then(Xe=>{he.leave(),Xe&&Ye()}).catch(()=>{});return}Ye()};return J.addEventListener("play",ue),J.addEventListener("pause",Ae),J.addEventListener("ended",Fe),()=>{try{J.removeEventListener("play",ue),J.removeEventListener("pause",Ae),J.removeEventListener("ended",Fe),He()}catch{}}},[Et,wt,fe,at,qe,He,he]);o.useEffect(()=>Ve(),[Ve]),o.useEffect(()=>{Ge.current=s},[s]),o.useEffect(()=>{Ne.current=r},[r]),o.useEffect(()=>{if(s||Z!=="active")return;const J=N.current;if(!J)return;let ue=null;const Ae=requestAnimationFrame(()=>{try{const Fe=J.getTotalLength();if(!Fe)return;const Ye=Fe*.2;J.style.strokeDasharray=`${Fe-Ye} ${Ye}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);ue=document.createElement("style"),ue.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Fe}}}`,document.head.appendChild(ue),J.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Ae),ue?.remove()}},[Z,s]),o.useEffect(()=>{Ce.current=I},[I]),o.useEffect(()=>{ce.current=S},[S]),o.useEffect(()=>{const J=x.current,ue=B.current;if(!J||!ue)return;let Ae=null;const Fe=32,Ye=60,Xe=()=>{try{const mt=Array.from(J.querySelectorAll(":scope > .button"));let _e=0;mt.forEach(De=>{if(De===ue)return;const ze=De.getBoundingClientRect();_e+=ze.width});const j=J.getBoundingClientRect().width,ee=Math.max(0,Math.floor(j-_e-8)),K=Le;if(!K||ee<=0){Array.from(ue.children).forEach(De=>{try{De.style.width=""}catch{}});return}let ie=Math.floor(ee/K);ie>Ye&&(ie=Ye),ie<Fe&&(ie=Math.max(Fe,Math.floor(ee/K))),Array.from(ue.querySelectorAll(".button")).forEach(De=>{try{De.style.width=`${ie}px`}catch{}})}catch{}},ht=requestAnimationFrame(Xe);try{Ae=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),Ae.observe(J),Ae.observe(ue),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(ht)}catch{}try{Ae&&(Ae.disconnect(),Ae=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[I,Q,Le]),o.useEffect(()=>()=>{try{Se.current&&(clearTimeout(Se.current),Se.current=null),Ie.current&&(clearTimeout(Ie.current),Ie.current=null)}catch{}},[]);const ft=(J,ue)=>{q(J),se(ue),dt(),H(U_(J)),Ce.current=J},ot=()=>{O("playMode"),P(0),U(!0)},zt=async(J,ue)=>{_t(!1),_.current=!1,it(J,ue),await Ic(J),await Qe()!==!1&&(E(!1),ot(),await fe(J))},Jt=async(J,ue=!1)=>{const Ae=C.current;E(!0),$("measuring_duration");try{const Fe=await gs(J,{timeoutMs:1e4,rejectOnError:!0});ft([{src:J,objectUrl:null,duration:Fe}],Fe),$("ready"),ue&&Ae&&await zt(Ae,J)}finally{_.current=!1,E(!1)}},Qt=async(J,ue=!1)=>{const Ae=C.current;E(!0),$("measuring_duration");try{const Fe=await Promise.all(J.map(Xe=>gs(Xe,{timeoutMs:1e4})));if(!be.current)return;const Ye=J.map((Xe,ht)=>({src:Xe,objectUrl:null,duration:Fe[ht]||0}));ft(Ye,G_(Ye)),$("ready"),ue&&Ae&&Ye.length>0&&await zt(Ae,Ye[0].src)}finally{_.current=!1,E(!1)}},$t=async(J=!1,ue=!0)=>{const Ae=C.current,Fe=t?Array.isArray(t)?t:[t]:[];if(!Fe||Fe.length===0||!Fe.some(Boolean))return!1;if(_.current)return null;_.current=!0,ue&&E(!0),$("resolving");try{const Ye=K_(t,a,xl),Xe=[];let ht=0;for(const mt of Ye){let _e=mt.src??null,j=null;if(!_e&&mt.resolvedPath){try{$("getting_signed_url"),_e=await wl(mt.resolvedPath)}catch{_e=null}if(!be.current)return!1;if(!_e)try{$("downloading");const K=await Bl(mt.resolvedPath);if(!be.current)return!1;if(K){const ie=K instanceof Blob?K:new Blob([K]);j=b.track(URL.createObjectURL(ie)),_e=j}}catch{$("error");try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),O("active")}catch{}}}if(!_e)continue;let ee=0;try{$("measuring_duration"),ee=await gs(_e,{timeoutMs:3e3})}catch{ee=0}if(!be.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const K of Xe)if(K.objectUrl)try{URL.revokeObjectURL(K.objectUrl)}catch{}return!1}ht+=ee||0,Xe.push({...mt,src:_e,objectUrl:j,duration:ee})}if(ft(Xe,ht),Xe.length>0&&J&&Ae){const mt=Xe[0];_t(!1);try{b.keepOnly(Xe.map(_e=>_e.objectUrl))}catch{}if($("ready"),_.current=!1,mt.src&&Ae)try{if(it(Ae,mt.src),await Ic(Ae),await Qe()===!1)return!1;ue&&E(!1),ot(),Ae&&await fe(Ae)}catch{ue&&E(!1)}else ue&&E(!1);O("playMode"),P(0),U(!0)}return Xe.length>0}finally{_.current=!1,ue&&E(!1),$(Ye=>Ye==="ready"?"ready":"idle")}},on=async J=>{const ue=he.isRunning();if(J.paused&&!ue){if(Je.current){await Pt();return}const Ae=he.resume();if(Ae){if(T("playing"),Ae.phase==="tail"){Pe(Ae.elapsed);return}await fe(J,3,50,Ae.elapsed);return}await fe(J),T("playing")}else he.pause(),je(),J.pause(),T("paused"),ue&&(He(),wt())},sn=async()=>{const J=C.current;if(!(!J&&!ut)){if(ut){const ue=window.speechSynthesis;if(Z==="active"){const Ae=Da(),Fe=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Ae&&Fe.length>0){if(_.current)return;O("load"),E(!0),$("synthesizing"),_.current=!0;try{const Ye=await Promise.all(Fe.map(Xe=>Promise.resolve(Ae(Xe))));Ye.length>1?await Qt(Ye,!0):await Jt(Ye[0],!0)}catch{_.current=!1,E(!1),O("active"),gt(Fe.length>0?Fe:void 0)}return}gt(Fe.length>0?Fe:void 0);return}if(Z==="playMode"){const Ae=!!ue&&(ue.speaking||ue.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!Ae){await on(J);return}try{if(ue&&ue.paused)try{Bt("tts"),ue.resume(),T("playing")}catch{}else try{ue.pause(),T("paused")}catch{}}catch{}}return}if(Z==="active"){if(s&&Array.isArray(Ce.current)&&Ce.current.length>0){const Ae=Ce.current[0];try{if(Ae.src&&J)try{it(J,Ae.src),ot(),J&&await fe(J)}catch{}ot();return}catch{}}O("load");let ue;try{ue=await $t(!0)}catch{ue=!1}if(ue===!1&&be.current){try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}O("active")}return}if(Z!=="load"&&(Z==="playMode"||Z==="active"))try{J&&await on(J)}catch(ue){(ue instanceof Error||typeof ue=="object"&&ue&&"name"in ue)&&ue.name}}},Pt=async()=>{const J=C.current;if(J)try{const ue=Ce.current;if(Array.isArray(ue)&&ue.length>1){await mn(0);return}_t(!1);try{J.currentTime=0}catch{}J&&await fe(J),T("playing"),O("playMode")}catch{}},xn=()=>{je(),pt(),Ze.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}wt(),T("stopped"),O("active"),X(0),U(!1)},xt=async(J,{sameSegment:ue=!1}={})=>{je();const Ae=he.generation(),Fe=C.current,Ye=Ce.current?.[J]?.src;try{if(_t(!1),P(J),U(!0),ce.current=J,!Ye||!Fe||(ue||dt(),it(Fe,Ye),!ue&&await Qe()===!1)||!he.isCurrent(Ae)||(await fe(Fe),!he.isCurrent(Ae)))return;T("playing"),O("playMode")}catch{}},Rt=async()=>{const J=Ce.current,ue=ce.current||0;if(!J||ue<=0){await Pt();return}await xt(ue-1)},Ut=async()=>{const J=Ce.current,ue=ce.current||0;if(!J||ue>=J.length-1){xn();return}await xt(ue+1)},Gt=()=>{if(Je.current)return;const J=200,ue=340;_t(!0),je(),pt();try{X(1)}catch{}st(1);try{V("hold")}catch{}try{const Ae=C.current,Fe=ut&&!!Ae?.src;if(!ut||Fe){if(Ae){Ae.pause();try{Ae.currentTime=0}catch{}}}else Dt();wt()}catch{}try{T("stopped")}catch{}if(U(!1),!Ge.current)try{Ie.current&&(clearTimeout(Ie.current),Ie.current=null),Ie.current=setTimeout(()=>{try{V("out")}catch{}Ie.current=setTimeout(()=>{try{typeof Ne.current=="function"&&Ne.current(!0)}catch{}try{V("idle")}catch{}Ie.current=null},ue)},J)}catch{}};o.useEffect(()=>{Lt.current=Gt});const Pn=o.useCallback(()=>Ee(""),[]),mn=async J=>{(Ce.current||[])[J]&&await xt(J,{sameSegment:J===ce.current})},Ft=G==="playing",gn=o.useMemo(()=>{if(!Q||Q.length<=1)return Q;const J=Q[S];return J?[J]:Q},[Q,S]),ln=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&Te(J)}catch{}},[me,Te]);const Cn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const ue=Math.max(0,Math.min(1,ne)),Ae=Cn.current,Fe=()=>{Ae.raf!==null&&(cancelAnimationFrame(Ae.raf),Ae.raf=null),Ae.timer!==null&&(clearTimeout(Ae.timer),Ae.timer=null)};Fe();const Ye=or(J);if(J.paused||Math.abs(Ye-ue)<.001||typeof requestAnimationFrame!="function"){try{zn(J,ue)}catch{}return}const Xe=performance.now(),ht=()=>{const mt=Math.min(1,(performance.now()-Xe)/150);try{zn(J,Ye+(ue-Ye)*mt)}catch{}Ae.raf=mt<1?requestAnimationFrame(ht):null};return Ae.raf=requestAnimationFrame(ht),Ae.timer=setTimeout(()=>{Fe();try{zn(J,ue)}catch{}},200),Fe},[ne]);const Ht=W==="hold",wn=W==="out",de=Z==="playMode"&&!D&&!nt||Ht||wn,we=G!=="stopped"||Ht||wn,$e=G==="paused",Ke=Math.max(0,Math.min(100,(M||0)*100)),Oe=ke("audio-player__fill",de?"is-visible":"",we?"is-expanded":"",$e?"is-paused":"",wn?"is-out":"");return n.jsxs("div",{className:`audio-player ${ln?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Ft?"is-playing":""} ${D?"is-loading":""} ${Z!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Pc[R]?"status":void 0,"aria-live":Pc[R]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,Z==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:ln,onClick:()=>{Y.current=gr(),A(),sn()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:w,onMouseLeave:A,onFocus:w,onBlur:A,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:N,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,k&&n.jsx(Dn,{anchorRect:k,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${Z==="playMode"||Ft?"is-visible":""}`,inert:!(Z==="playMode"||Ft)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Rt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Ft?"pause":"play",onClick:sn,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Ft,width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}),n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:xn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),Le>1?n.jsx("div",{ref:B,className:"audio-player__source-buttons",children:Array.from({length:Le}).map((J,ue)=>n.jsx(ve,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ue+1),onClick:()=>{try{mn(ue)}catch{}},ariaLabel:p("training.sourcePlay",{n:ue+1}),variant:"transparent-white",selected:L&&S===ue,disabled:Z!=="playMode"||!(Array.isArray(I)&&I[ue]),showTooltipInfo:!0},ue))}):null,!Array.isArray(I)||I.length<=1?n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Pt,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}):null,n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Ut,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Gt,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Oe,ref:f,style:{left:`${Ke}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(X_,{segments:gn,progress:M,totalDuration:ae,waveProgressRef:ge,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:I?.[S]?.duration??0,noiseSrc:c&&g?.settings.enabled&&z>0?et:null,noiseRatio:g?tr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:te,onReadyChange:lt})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(tt,{icon:"triangle-alert",size:14}),p("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:pe,position:xe,onClose:Pn})]})}function Nr(e){const{t}=Be.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=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:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Pi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(N=>N==="dark"?"light":"dark"),[]),x=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),b=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],B={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},_=n.jsxs("div",{className:le(`text-box-tooltip__root ${c==="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:B,children:b.map((N,v)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[b.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:v+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},v))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(ve,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(ve,{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(ve,{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(ve,{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(vn,{anchorRect:s,className:le(`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:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function Oc({state:e="disabled"}){const{t}=Be.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(tt,{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 zc(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(),d=c?Array.from(c.querySelectorAll(Bn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)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 d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Wc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=Be.useTranslation(),m=fn("(max-width: 767px)"),g=`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),[b,B]=o.useState(null),[_,N]=o.useState(null);zc(f&&!!b,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip__content"));for(let E=D.length-1;E>=0;E--)if(D[E].querySelector(".text-box-tooltip__root"))return D[E];return null},()=>C.current?.querySelector("button")??null);const v=o.useRef(l);o.useEffect(()=>{v.current=l});const k=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),w=o.useCallback(()=>{x(!1),B(null),N(null)},[]);o.useEffect(()=>{if(!f)return;let D;try{typeof v.current=="function"&&(D=v.current())}catch{}if(D===!1){w();return}N(typeof D<"u"&&D!==null?D:null)},[k]);const A=o.useCallback(()=>{let D;try{typeof l=="function"&&(D=l())}catch{}if(D!==!1){if(N(typeof D<"u"&&D!==null?D:i),!C.current){x(E=>!E);return}if(f)x(!1),B(null),N(null);else{const E=C.current.getBoundingClientRect();B(E),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,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(ve,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(ve,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:A,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(Nr,{text:_??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:b,onClose:w,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function vs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function na({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=Be.useTranslation(),[p,m]=o.useState(()=>vs(e,t));o.useEffect(()=>{const v=vs(e,t);if(v!==p){const k=setTimeout(()=>m(v),0);return()=>clearTimeout(k)}},[e,t,p]);const g=o.useCallback((...v)=>{vs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...v)},[e,t,p,u]),[y,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),b=o.useCallback(v=>{if(!v)return null;try{const k=v;if(typeof v=="object"&&(k.currentTarget||k.target)&&(k.nativeEvent||k.type)){const D=k.currentTarget??k.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(v instanceof DOMRect)return v;const w=v;if(w&&typeof w.getBoundingClientRect=="function")return w.getBoundingClientRect();const A=v?.current;return A&&typeof A.getBoundingClientRect=="function"?A.getBoundingClientRect():null}catch{return null}},[]),B=o.useCallback((v,{text:k="",label:w="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:A=!1,alignX:D="center",alignY:E="top"}={})=>{const R=b(v);x({text:k,label:w,anchorRect:R,backdrop:A,alignX:D,alignY:E}),C(!0)},[b]),_=o.useCallback(()=>{C(!1),x(v=>({...v,anchorRect:null}))},[]),N=o.Children.map(l,v=>{if(o.isValidElement(v)){const k=v;if(typeof k.type=="string")return k;const w=k.props??{},A=typeof w.onDone=="function"?w.onDone:g,D=typeof w.disabled=="boolean";let E=p==="disabled";return D&&(E=!!w.disabled),o.cloneElement(k,{onDone:A,disabled:E,showTooltip:B,hideTooltip:_})}return v});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Oc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Wc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),N]}),y?n.jsx(vn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Nr,{text:f.text,onClose:_})}):null]})}function Hc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=Be.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($=>$==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Pi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),b=o.useRef(!1),B=o.useCallback(()=>{b.current=gr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>f(""),[]),N=$=>{try{f($)}catch{}},v=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const k=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[w,A]=o.useState(k);w!==k&&(A(k),l("disabled"));const D=t==="disabled"?s:t,E=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",R=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(D==="disabled"||!b.current)return;b.current=!1;const $=document.activeElement;$&&$!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:x,className:`training-text-box ${E} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(ve,{htmlType:"button",size:48,type:"bar",onClick:B,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":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:R,children:k})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(ve,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(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(ve,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>N(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:!p,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(ve,{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 aa(e){return e==="active"||e==="done"}function _s({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=Be.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),b=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,N=d?d.join("||"):"",v=h?h.join("||"):"",[k,w]=o.useState(()=>Array.isArray(_)?C?La(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?w(C?La(_):_.slice()):w(void 0)},[c,N,v,C]);const[A,D]=o.useState(null),[E,R]=o.useState(()=>new Set);o.useEffect(()=>{D(null),R(new Set)},[v,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const F=$.current;typeof F=="number"&&typeof t=="number"&&typeof e=="number"&&F>=e&&t<e&&(D(null),R(new Set)),$.current=t},[t,e]);const G=o.useCallback(F=>{if(!aa(B))return;const M=k?.[F];if(M==null)return;const X=M;if(p){const Z=new Set(E);Z.has(X)?Z.delete(X):Z.add(X),R(Z),typeof u=="function"&&u({selectedValues:[...Z],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...Z],__ts:Date.now()})}else D(X),typeof u=="function"&&u({selectedIndex:F,selectedValue:X,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:F,selectedValue:X,__ts:Date.now()})},[k,B,p,u,E]),T=`training-step__buttons${Array.isArray(k)&&k.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(k)&&k.length>0?k.map((F,M)=>n.jsx(ve,{htmlType:"button",size:56,type:"bar",onClick:()=>G(M),ariaLabel:String(F),label:F,useLabel:!0,icon:y?y[String(F)]:void 0,variant:"default",disabled:B==="disabled",selected:p?E.has(F):A===F,useDisabledCovered:g,minWidth:0},String(F))):null})})}function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=Be.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=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(g)}\0${JSON.stringify(y??null)}`,[b,B]=o.useState(x);b!==x&&(B(x),c==null&&f(null));const[_,N]=o.useState(c);Object.is(_,c)||(N(c),f(c??null));const v=o.useRef(void 0);o.useEffect(()=>{const D=v.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&f(null),v.current=t},[t,e,c]);const k=o.useCallback(D=>{const E=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(E),aa(m)&&typeof l=="function"&&l(E)},[i,m,l]),w=o.useCallback(()=>{aa(m)&&(f(!1),k(!1))},[k,m]),A=o.useCallback(()=>{aa(m)&&(f(!0),k(!0))},[k,m]);return n.jsxs(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Hc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((D,E)=>n.jsx(ve,{htmlType:"button",size:56,type:"bar",onClick:()=>{aa(m)&&(f(E),k&&k(E))},disabled:m==="disabled",ariaLabel:String(D),label:D,variant:m,selected:C===E},E)):n.jsxs(n.Fragment,{children:[n.jsx(ve,{htmlType:"button",size:56,type:"bar",onClick:w,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(ve,{htmlType:"button",size:56,type:"bar",onClick:A,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function ws({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:x}=Be.useTranslation(),b=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),B=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(na,{index:e,stepIndex:t,isLast:a,title:b,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(ys,{soundSrc:i,ttsText:i?null:d??b,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:B,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const sx=[];function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=sx}){const{t:c}=Be.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=H=>typeof H=="string"?H:H&&(H.context||H.sentence||H.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((H,S)=>({id:S,text:h(H)}))),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),b=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const H=Array.isArray(u)?u:[];m(H);const S=(P=>{const L=(P||[]).map((me,te)=>({id:te,text:h(me)}));if(L.length<=1)return L;const U=(me,te)=>{if(me.length!==te.length)return!1;for(let z=0;z<me.length;z++)if(me[z].text!==te[z].text)return!1;return!0};let ae=La(L),se=0;for(;U(ae,L)&&se<20;)ae=La(L),se+=1;return ae})(H);y(S);try{if(typeof i=="function"){const P=S.filter((L,U)=>L.text===h(H[U])).length;i({shuffled:S,score:P,total:(H||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const P=S.filter((L,U)=>L.text===h(H[U])).length;b.current=u,l({shuffled:S,score:P,total:(H||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||b.current===u||(b.current=u,typeof l!="function"))return;const H=Array.isArray(u)?u:[],S=g.filter((P,L)=>P.text===h(H[L])).length;l({shuffled:g,score:S,total:H.length,initial:!0,__ts:Date.now()})},[C,u]);const B=(H,S)=>{const P=[...g],L=H+S;if(L<0||L>=P.length)return;const U=P[L];P[L]=P[H],P[H]=U,X(P);try{if(typeof l=="function"&&C==="active"){const ae=P.filter((se,me)=>se.text===h(p[me])).length;l({shuffled:P,score:ae,total:(p||[]).length,__ts:Date.now()})}}catch{}},[_,N]=o.useState(null),v=o.useRef(null),k=o.useRef(null),w=o.useRef(null),A=o.useRef(null),D=o.useRef(null),E=o.useRef({x:0,y:0}),R=o.useRef(null),$=o.useRef({dx:0,dy:0}),G=()=>{if(R.current!==null)return;const H=()=>{if(!v.current){R.current=null;return}R.current=requestAnimationFrame(H);const S=E.current,P=$.current||{dx:0,dy:0};v.current&&(v.current.style.transform=`translate3d(${S.x-P.dx}px, ${S.y-P.dy}px, 0)`)};R.current=requestAnimationFrame(H)},T=o.useRef(new Map),F=o.useRef(new Map),M=()=>{const H=new Map;return T.current.forEach((S,P)=>{S&&S.getBoundingClientRect&&H.set(P,S.getBoundingClientRect())}),H},X=H=>{const S=M();y(H);try{if(typeof i=="function"){const P=H.filter((L,U)=>L.text===h(p[U])).length;i({shuffled:H,score:P,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const P=M();H.forEach(L=>{const U=S.get(L.id),ae=P.get(L.id),se=T.current.get(L.id);if(!se||!U||!ae)return;const me=U.top-ae.top;me&&(se.style.transition="none",se.style.transform=`translateY(${me}px)`,requestAnimationFrame(()=>{se.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",se.style.transform="";const te=()=>{se.style.transition="",se.removeEventListener("transitionend",te)};se.addEventListener("transitionend",te)}))})})},Z=(H,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(H))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const P=document.createElement("div");P.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(P),S.dataTransfer?.setDragImage(P,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(P)}catch{}})}catch{}}catch{}N(H);try{const P=g[H],L=document.createElement("div");L.className="order-list__dragging-object order-list__dragging-object--visible",L.textContent=P&&P.text?P.text:"",document.body.appendChild(L),v.current=L;const U=T.current.get(P.id);let ae=S.clientX||0,se=S.clientY||0;try{if(U&&U.getBoundingClientRect){const V=U.getBoundingClientRect();ae=V.left+V.width/2,se=V.top+V.height/2}}catch{}const me=L.getBoundingClientRect(),te=me.width/2,z=me.height/2;$.current={dx:te,dy:z},L.style.transition="none",E.current={x:ae,y:se},L.style.transform=`translate3d(${ae-te}px, ${se-z}px, 0)`,requestAnimationFrame(()=>{try{L.style.transition=""}catch{}G()});const ne=V=>{const pe=V;E.current={x:pe.clientX,y:pe.clientY},G()};w.current=ne,document.addEventListener("mousemove",ne);const W=V=>{const pe=V;E.current={x:pe.clientX,y:pe.clientY},G()};k.current=W,document.addEventListener("dragover",W);try{S.dataTransfer?.setData("text/plain",String(H));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:H}))}catch{}}catch{}}catch{}},O=(H,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const P=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(P&&A.current!==P){if(A.current)try{A.current.classList.remove("drag-over")}catch{}try{P.classList.add("drag-over")}catch{}A.current=P}}catch{}},Y=(H,S)=>{S.preventDefault();const P=S.dataTransfer?.getData("text/plain")||"",L=P?parseInt(P,10):_,U=H;if(typeof L!="number"||isNaN(L)||L===U){N(null),Q(),I();return}const ae=xf(g,L,U);X(ae),N(null),I();try{if(typeof l=="function"&&C==="active"){const se=ae.filter((me,te)=>me.text===h(p[te])).length;l({shuffled:ae,score:se,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const se=document.querySelectorAll(".order-list .order-list__item")[U];if(!se)return;const me=se.querySelector(".order-list__slot")||se;try{me.classList.add("pulse"),me.offsetHeight,me.classList.add("to-dark");const te=()=>{me.classList.remove("pulse","to-dark"),me.removeEventListener("transitionend",te)};me.addEventListener("transitionend",te)}catch{}})}catch{}Q()},I=()=>{if(v.current){try{document.body.removeChild(v.current)}catch{}v.current=null}k.current&&(document.removeEventListener("dragover",k.current),k.current=null),w.current&&(document.removeEventListener("mousemove",w.current),w.current=null),R.current!==null&&(cancelAnimationFrame(R.current),R.current=null)},q=()=>{N(null),Q(),I()};o.useEffect(()=>()=>I(),[]);const Q=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),A.current){try{A.current.classList.remove("drag-over")}catch{}A.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(H=>H.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const H=Math.max(1,(g||[]).length);g.forEach((S,P)=>{const L=F.current.get(S.id);if(!L)return;let U=50;H>1&&(U=Math.round(P/(H-1)*100));try{L.style.setProperty("--marker-pos",U+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{I(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((H,S)=>{const P=Math.max(1,(g||[]).length),L=P>1?Math.round(S/(P-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":L+"%"},ref:U=>{const ae=F.current;U?ae.set(H.id,U):ae.delete(H.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:U=>{const ae=T.current;U?ae.set(H.id,U):ae.delete(H.id)},className:`order-list__draggable ${_===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?U=>Z(S,U):void 0,onDragEnter:f?U=>O(S,U):void 0,onDragOver:f?U=>O(S,U):void 0,onDragLeave:f?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const U=document.querySelectorAll(".order-list .order-list__item");U&&U[S]&&(U[S].classList.remove("drag-over"),A.current===U[S]&&(A.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?U=>Y(S,U):void 0,onDragEnd:f?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:H.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(ve,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(ve,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},H.id)})})})}const lx=8e3;function ix(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Vc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=Be.useTranslation(),y=s??g("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=p??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const b=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",[_,N]=o.useState(null),v=o.useRef([]),[k,w]=o.useState(!1),A=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const E=o.useMemo(()=>C.map(M=>M?.id??M?.word??"").join("|"),[C]);o.useEffect(()=>{N(null)},[E]);const R=o.useRef(void 0);o.useEffect(()=>{const M=R.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&N(null),R.current=t},[t,e]);const $=o.useCallback((M,X)=>{if(c)return;const Z={item:M,index:X,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(B==="active"&&typeof l=="function")try{l(Z)}catch{}},[c,i,B,l]),G=o.useRef(m);o.useEffect(()=>{G.current=Math.max(0,m||0)},[m]);const T=o.useCallback(async()=>{if(k||B==="disabled")return;w(!0);let M=!1;const X=new Promise(Z=>{A.current=()=>{M=!0,Z()}});try{for(let Z=0;Z<x.length&&!(!D.current||M);Z++){const O=v.current[Z];if(!O)continue;await Promise.race([ix(O.play(),lx),X]);const Y=Math.max(0,G.current||0);Y>0&&Z<x.length-1&&!M&&D.current&&await Promise.race([new Promise(I=>{setTimeout(I,Y)}),X])}}finally{A.current=null,w(!1)}},[k,B,x.length]),F=o.useCallback((M,X)=>{if(!aa(B))return;N(X);const Z={selectedValue:M.word||M.title||"",selectedIndex:X,item:M,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(typeof l=="function")try{l(Z)}catch{}},[i,B,l]);return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:T,playAllActive:k},children:n.jsx("div",{className:"training-step__cards",onClickCapture:M=>{const X=A.current;if(!X)return;const Z=M.target;Z&&typeof Z.closest=="function"&&Z.closest(".training-word-card__bottom")&&X()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((M,X)=>n.jsx(Qo,{ref:Z=>{v.current[X]=Z},item:M,disabled:B==="disabled",onPlayDone:()=>$(M,X),selectable:c,selected:c&&_===X,onSelect:c?()=>F(M,X):void 0,flipDelay:X*120,hideLabel:d,hideAudio:h},M&&M.id||X))})})}const ux=160,qc=()=>{};function $n(e){const t=o.useId();if(!("variant"in e)){const{label:b,sub:B,onClick:_,children:N,align:v="horizontal",icon:k,useFullWidth:w=!1}=e,A=D=>{_&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),_())};return n.jsxs("div",{className:ke("panel-row",v==="vertical"?"panel-row--vertical":"",w?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?A:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[k!=null&&n.jsx("div",{className:"panel-row__icon",children:k}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:b}),B&&n.jsx("div",{className:"panel-row__sub caption-1",children:B})]}),n.jsx("div",{className:"panel-row__right",children:N})]})}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(da,{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:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const b=e;m=n.jsx(Bu,{checked:b.checked,onChange:b.onChange,id:g})}else if(a==="segmented"){const b=e;m=n.jsx(kn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??40,ariaLabel:r})}else if(a==="dropdown"){const b=e,B=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((_,N)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(bn,{options:_.options,value:_.value,onChange:_.onChange,placeholder:_.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},N))}):n.jsx(bn,{options:b.options??[],value:b.value??"",onChange:b.onChange??qc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[B,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):B}else if(a==="button"){const b=e;b.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((B,_)=>n.jsx(ve,{htmlType:"button",size:B.btnSize??40,variant:B.btnVariant??"default",disabled:B.disabled,onClick:B.onClick,children:B.label},_))}):m=n.jsx(ve,{htmlType:"button",size:b.btnSize??40,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Jn,{value:b.value,onChange:b.onChange??qc,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:b.helperText?C:void 0}),b.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" 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")&&d,x=b=>{p&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())};return n.jsxs("div",{className:ke("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?x:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,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 Uc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function cx({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=Be.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(ve,{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(jt,{size:"small",variant:Uu(i.device),fill:"soft",label:Gu(i.device,r)}),Uc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Uc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Zo(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 Er({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:x,empty:b,children:B}){const _=ke("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),N={};i!==void 0&&(N.minHeight=i),u!==void 0&&(N.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(N["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const v=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(N).length?N:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:ke("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(tt,{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($n,{variant:"loading"}):b!=null&&o.Children.toArray(B).length===0?n.jsx($n,{variant:"empty",children:b}):d?n.jsx("div",{className:ke("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:B}):B]})}function dx({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:ke("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 px(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 Gc(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"}]}px(Vt.t.bind(Vt)),Gc(Vt.t.bind(Vt));const Dr="none",hx=.5,mx=1.5,Cx=.25;function ks({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs($n,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Iu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(ke("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function Kc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=Be.useTranslation(),s=fn("(max-width: 767px)")?40:24,l=wr(),i=tr(l?.settings??ta),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),g=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),y=o.useCallback(x=>{const b=Math.min(er,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:b})}catch{}},[l]),C=o.useCallback(x=>{try{x===Dr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Dr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Gc(r).map(x=>({key:x.value,label:x.label}))];return n.jsx(vn,{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(ve,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Er,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ks,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ks,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:hx,max:mx,step:Cx,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx($n,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(kn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Dr,onChange:C})}),n.jsx(ks,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:er,step:Nc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx($n,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(kn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Dr,onChange:()=>{}})})})]})})}function Yc({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:d=!1}){const{t:h}=Be.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),b=o.useRef(null),B=wr(),_=u>0,N=_&&i<u-1,v=!_||i>=u-1,k=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const w=o.useCallback(()=>{m(!1),y(null)},[]),A=o.useCallback(()=>{if(p){m(!1),y(null);return}const X=x?.current?.getBoundingClientRect();X&&y(X),t?.(),m(!0)},[p,t]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const X=b?.current?.getBoundingClientRect();X&&y(X),t?.(),m(!0)},[p,t]),E=fn("(max-width: 767px)"),R=o.useRef(null),[$,G]=o.useState(null),T=o.useCallback(()=>{f(X=>{const Z=!X;return G(Z?R.current?.getBoundingClientRect()??null:null),Z})},[]),F=o.useCallback(()=>{f(!1),G(null)},[]);o.useEffect(()=>{c&&(f(!1),G(null))},[c]);const M=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(Go,{analyser:B?.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(Go,{analyser:B?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return zc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,b.current].map(X=>X?.querySelector("button")??null).find(X=>!!X&&X.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(ve,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:A,className:p?"is-selected":void 0,"aria-expanded":p,"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:b,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(ve,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:R,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(ve,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:C,"aria-expanded":E?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!E&&n.jsx("div",{className:"pp-bottom__meters",children:M})]}),e&&C&&E&&$&&n.jsx(vn,{anchorRect:$,onClose:F,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:M})}),n.jsxs("div",{className:"pp-bottom__right",children:[v&&n.jsx(ve,{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:!k}),N&&n.jsx(ve,{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:!k})]}),e&&p&&n.jsx(Kc,{anchorRect:g,onClose:w,hideNoiseRows:d})]})}function Zc({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=Be.useTranslation(),y=fn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,x=p||m,b=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,B=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,N=!!(B||_),v=N?B||_:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),k=b||(B?t:void 0),w=y&&typeof k=="string"&&(k.includes(" \xB7 ")||k.includes(" / "))?k.split(/\s[·/]\s/).pop():k,A=o.useMemo(()=>{const D=l&&typeof l=="object"?{...l}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(ve,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Cu,{icon:s,label:e,tooltip:i,wrapperStyle:A}):null}),n.jsxs("div",{className:"pp-title__text",children:[w?n.jsx("span",{className:"pp-title__depth caption-1",children:w}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:v}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Wu,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function fx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function bx(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 Xc=(e,t)=>{if(!t)return t;const a=typeof Vt?.t=="function"?Vt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function Jc(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Kl().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?Xc(`topic.${l.key}`,l.label):void 0,i?Xc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function As(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Qc(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 gx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function yx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=Jc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function vx(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 xx(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 ed(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function wx(e,t,a,r){return ed(e,t*a+r)}function Bx({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 kx(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 td=o.createContext(null);function Ax(){const e=o.useContext(td);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Nx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Be.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const B=C.current;typeof B=="number"&&typeof t=="number"&&typeof e=="number"&&B>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const f=o.useMemo(()=>p.filter(B=>B!==null).length+1,[p]),x=o.useCallback(B=>{if(!aa(h))return;const _=p;let N;if(_[B]!=null){const k=_[B];N=_.map(w=>w!==null&&w>=k?null:w)}else N=[..._],N[B]=f;m(N);const v={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(v)}catch{}if(_[B]==null&&N.length>0&&N.every(k=>k!==null))try{typeof i=="function"&&i(v)}catch{}},[h,p,f,u,i,l]),b=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:b,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((B,_)=>n.jsx(Qo,{item:{word:B},disabled:h==="disabled",selectable:!0,selected:p[_]!==null,orderRank:p[_],onSelect:()=>x(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${B}-${_}`))})})}function Sr(e){return null}Sr.__isTrainingPage=!0;function wa(e,t){const a=Ax();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 nd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=wa(e,t);return n.jsx(ws,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ad({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(_s,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function rd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function od({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function sd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Vc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Ex({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Nx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const ld=3e4,Dx=/^(https?:|blob:|data:audio|\/|\.\/)/;function id(e){return typeof e=="string"&&Dx.test(e)?e:null}const Sx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ns=Symbol("timed-out");function jx(e,t){if(t<=0)return Promise.resolve(Ns);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ns),t)})]).finally(()=>clearTimeout(a))}function Tx(e){return e?Da()||ar()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Mx(e,t){const a=[],r=id(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",Da()],["fallbackUrlResolver",ar()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await jx(i(s),u)}catch(h){return kt(`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===Ns?(kt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${ld}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):Sx(c)||(kt(`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 Lx(){return Date.now()+ld}const $x=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Rx(e){kt("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 jr(...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 Px(e){return jr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Ix(e){return id(jr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function ud(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=jr(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 cd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=Be.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const E=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(E)}},[t,a]);const m=o.useCallback(D=>{const E=ud(D),R=jr(D?.wording,D?.label);return E===!0?{variant:"main",label:R??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:E===!1?{variant:"danger",label:R??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:R??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,b]=o.useState(null),B=o.useCallback(()=>{f.current?.(),f.current=null,b(null)},[]);o.useEffect(()=>B,[B]);const _=o.useRef(0),N=(D,E)=>{if(!In)return;const R=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${R}ms ${D}`,E??"")},v=o.useRef(0),k=o.useCallback((D,E,R)=>{B();const $=++v.current,G=()=>v.current===$;_.current=In?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:E,rawUrl:R}),b(D),f.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),v.current++,Xr()};const T=Z=>{N("\uD2BC\uB2E4",Z);const O=Ga(Z,Y=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${Y?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),Y&&G()&&(f.current=null,b(null))});return f.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),v.current++,O.stop(),Xr()},O.done},F=Mx(E,R);N("\uCC28\uB840",F.map(Z=>Z.kind));const M=F[0]?.kind==="raw",X=M?T(R):Promise.resolve(!1);(async()=>{if(await X||!G())return;const Z=Lx(),O=M?F.slice(1):F;for(let Y=0;Y<O.length;Y++){if(!G())return;N(`${O[Y].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const I=await O[Y].resolve($x(Z,O.length-Y));if(N(`${O[Y].kind} \uAC00 \uB2F5\uD588\uB2E4`,I),!G()||I&&(await T(I)||!G()))return}G()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Rx(E),f.current=()=>{v.current++,Xr()},N("\uB0AD\uB3C5\uD55C\uB2E4"),D1(E,{onEnd:()=>{G()&&(f.current=null,b(null))}}))})()},[B]),w=o.useMemo(()=>C.map(D=>{const E=D??{},R=Px(E)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:G}=m(E),T=Array.isArray(E.corrects)?E.corrects:[],F=T.length?T.join(", "):E.answer!=null&&E.answer!==""?String(E.answer):null,M=typeof E.selectedText=="string"?E.selectedText:null,X=ud(E)===!0,Z=Ix(E),O=!!Z||Tx(R);return{problem:R,variant:$,label:G,answer:F,selectedText:M,isCorrect:X,sound:Z,canHear:O}}),[C,m,d]),A=o.useMemo(()=>w.some(D=>D.answer!==null||D.selectedText!==null),[w]);return n.jsx(Hn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:D,closeWithAnimation:E})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("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(ve,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(l)}),n.jsx(ve,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:E,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:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("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":d("training.result.scoreAria",{correct:y,total:g}),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:g})]})})]}),w.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${A?" result-table--answer":""}`,role:"table","aria-label":d("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:d("common.col.problem","\uBB38\uC81C")}),A&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),w.map((D,E)=>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(E+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(ve,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===E?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===E?d("training.result.replaySoundStop",{no:E+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:E+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===E?B():k(E,D.problem,D.sound)})]}),A&&n.jsxs("div",{className:"trp-row__answers",children:[D.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(jt,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},E))]})})]})})}const Es=new Set;function Fx(e){o.useEffect(()=>{if(!e||Es.has(e))return;Es.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 p=Date.now(),m=p-h;l=s,kf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Es.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function Mr(e,t){return e&&e.key||`step-${t??0}`}function Lr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Ox(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const zx=300,Wx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Rn=Object.freeze({}),dd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ds(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 Hx=e=>n.jsx(cd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Vx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:b,ariaLabel:B,label:_,buildResults:N,onResult:v,typeKey:k,entryPoint:w,dailyTotal:A,itemRef:D,renderResultPopup:E,noiseOverride:R,hideNoiseRows:$=!1}=e;Fx(k&&!dd.has(k)?k:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:T}=Be.useTranslation(),F=v,M=!!t,X=t?.id||null,Z=t?.meta||{},O=Array.isArray(t?.pages)?t.pages:[],Y=Array.isArray(b)||o.isValidElement(b)&&typeof b!="function"?o.Children.toArray(b).filter(o.isValidElement):[],I=Y.length>0,q=de=>de===Sr||de?.__isTrainingPage===!0,Q=I&&Y.some(de=>q(de.type)),H=Q?Y.filter(de=>q(de.type)).map((de,we)=>{const $e=de.props||{};return{id:`children-page-${we}`,steps:o.Children.toArray($e.children).filter(o.isValidElement),pageTop:$e.pageTop||$e.top||null,pageBottom:$e.pageBottom||$e.bottom||null}}):[{id:"children-page-0",steps:Y}],S=I&&!M&&typeof b!="function",P=S?Math.max(1,H.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 de=document.body;return de.dataset.ihabTrainingPopupCount=String(Number(de.dataset.ihabTrainingPopupCount||"0")+1),de.classList.add("ihab-training-popup-open"),()=>{const we=Number(de.dataset.ihabTrainingPopupCount||"1")-1;we>0?de.dataset.ihabTrainingPopupCount=String(we):(delete de.dataset.ihabTrainingPopupCount,de.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return iv()},[]);const[L,U]=o.useState({...ta,enabled:!1}),ae=o.useRef(L);o.useEffect(()=>{ae.current=L},[L]);const se=o.useRef(R),me=o.useRef(!1),te=o.useRef(null);o.useEffect(()=>{let de=!1;const we=$e=>{if(de)return;me.current=!0;const Ke=$e?ea({...ta,enabled:!1},$e):{...ta},Oe=te.current;te.current=null;const J=Oe?ea(Ke,Oe):Ke;ae.current=J,U(J),Oe&&!se.current&&co(J),ir(J);const ue=se.current;if(ue){const Ae=typeof ue=="function"?ue(J):ue,Fe=ea(J,Ae);ae.current=Fe,U(Fe),ir(Fe)}};return Rf().then($e=>{if(de){const Ke=te.current;if(te.current=null,Ke&&!se.current){const Oe=$e?ea({...ta,enabled:!1},$e):{...ta};co(ea(Oe,Ke))}return}we($e)}),()=>{de=!0}},[]);const[z,ne]=o.useState(null),[W,V]=o.useState(null),pe=o.useCallback((de,we)=>{de==="main"?ne(we):V(we)},[]),Ee=o.useRef(null),xe=o.useRef(null),Ce=o.useCallback(()=>{xe.current!==null&&(clearTimeout(xe.current),xe.current=null);const de=Ee.current;Ee.current=null,de&&co(de)},[]);o.useEffect(()=>{if(typeof window>"u")return;const de=()=>{document.visibilityState==="hidden"&&Ce()};return window.addEventListener("pagehide",Ce),document.addEventListener("visibilitychange",de),()=>{window.removeEventListener("pagehide",Ce),document.removeEventListener("visibilitychange",de),Ce()}},[Ce]);const ce=o.useCallback(de=>{const we=ea(ae.current,de);if(ae.current=we,U(we),!me.current){te.current={...te.current??{},...de},ir(we);return}se.current||(Ee.current=we,xe.current!==null&&clearTimeout(xe.current),xe.current=setTimeout(Ce,zx)),ir(we)},[Ce]),ge=L.mainSpeed,be=L.mainVolume,he=o.useCallback(de=>ce({mainSpeed:de}),[ce]),Me=o.useCallback(de=>ce({mainVolume:de}),[ce]),We=o.useMemo(()=>({settings:L,setSettings:ce,registerAnalyser:pe,mainAnalyser:z,noiseAnalyser:W,playbackRate:ge,setPlaybackRate:he,mainVolume:be,setMainVolume:Me}),[L,ce,pe,z,W,ge,he,be,Me]),Re=o.useRef(null),[qe,He]=o.useState(0),st=o.useRef([]),[lt,Qe]=o.useState("center"),[dt,Se]=o.useState(!1),Ge=o.useRef(!1),Ne=o.useRef(null),Ie=o.useCallback(de=>{Ge.current||(Ge.current=!0,Se(!0),Ne.current=setTimeout(()=>{try{de()}catch{Ge.current=!1,Se(!1)}},Wx()?0:ux))},[]);o.useEffect(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);const Je=o.useRef(m);o.useEffect(()=>{Je.current=m});const nt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const de=Re.current,we=nt.current;if(fo(de,we),de){const $e=Array.from(de.querySelectorAll(Bn)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if($e)try{$e.focus()}catch{}}return()=>{const $e=document.activeElement;if(!$e||$e===document.body||de&&de.contains($e))try{bo(we)?.focus?.()}catch{}}},[]),o.useEffect(()=>Kn(()=>Ie(()=>{const de=Je.current;typeof de=="function"&&de()})),[Ie]),mo(Re,!0);const[Nt,_t]=o.useState(!1),Lt=o.useRef(!1),[et,at]=o.useState(null),Et=o.useRef(0),wt=o.useRef(0),Tt=()=>{Et.current+=1,wt.current+=1,at(null)},[Dt,gt]=o.useState(""),[rt,ut]=o.useState(()=>Lr()),ye=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!M&&!S||(ut(Lr()),Tt())},[M,X,S]),o.useEffect(()=>{S&&ut(de=>{const we=Math.max(0,Math.min(de.pageIndex,Math.max(0,P-1)));return we!==de.pageIndex?{...de,pageIndex:we,stepIndex:0}:de})},[S,P]);const Le=S?Math.max(0,Math.min(rt.pageIndex,P-1)):0,je=S?H[Le]:null,Ze=S&&je&&Array.isArray(je.steps)?je.steps:[],Ue=M?rt.pageIndex:S?Le:typeof c=="number"?c:0,yt=M?O[Math.max(0,Math.min(rt.pageIndex,Math.max(0,O.length-1)))]:null,bt=M&&yt&&Array.isArray(yt.steps)?yt.steps:[],Bt=M?bt.length:S?Ze.length:typeof p=="number"?p:0,pt=M||S?Math.max(0,Math.min(rt.stepIndex,Math.max(0,Bt))):typeof h=="number"?h:0,vt=M?O.length:S?P:typeof d=="number"?d:0;o.useEffect(()=>{if(!M&&!S)return;const de=M?Tr(yt,Ue):je?.id||`children-page-${Ue??0}`,we=new Date().toISOString();for(let $e=0;$e<=pt;$e+=1){const Ke=M?Mr(bt[$e],$e):`step-${$e}`,Oe=fe(de,Ke);re.current.has(Oe)||re.current.set(Oe,we)}},[M,S,Ue,pt,je?.id]),o.useLayoutEffect(()=>{const de=ye.current;if(typeof Ue=="number"&&de!==null&&Ue!==de&&Ue>de)try{gt(T("training.problemNotice",{n:Ue+1}))}catch{}ye.current=typeof Ue=="number"?Ue:ye.current},[Ue,c,T]),o.useLayoutEffect(()=>{const de=Re.current;if(!de)return;const we=()=>de.querySelector(".page-popup__scroll");let $e=null,Ke=null,Oe=null;const J=Xe=>{const ht=we();if(!ht)return;const mt=ht.scrollHeight<=ht.clientHeight;if(Qe(mt?"center":"top"),Xe&&!Lt.current){Lt.current=!0;try{_t(!0)}catch{}try{Fe.disconnect()}catch{}}},ue=()=>{$e!==null&&cancelAnimationFrame($e),$e=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>J(!0),60)})},Ae=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>J(!1))};ue(),window.addEventListener("resize",Ae);const Fe=new MutationObserver(ue);Fe.observe(de,{childList:!0,subtree:!0,attributes:!0});const Ye=setTimeout(()=>{Lt.current||J(!0)},400);return()=>{window.removeEventListener("resize",Ae),$e!==null&&cancelAnimationFrame($e),Ke!==null&&clearTimeout(Ke),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(Ye);try{Fe.disconnect()}catch{}}},[Re]);const Te=o.useCallback(de=>{Re.current&&(Re.current._childOnNext=de)},[]),it=o.useCallback(de=>{Re.current&&(Re.current._childOnResult=de)},[]),re=o.useRef(new Map),fe=(de,we)=>`${de}\0${we}`,Pe=o.useCallback((de,we,$e)=>{ut(Ke=>{const Oe=Ke.answersByPage[de]||{},J=Oe[we],ue=As($e),Ae=As(J);if(J&&Ae>ue)return Ke;const Fe=Qc($e,re.current.get(fe(de,we)),ue);return{...Ke,answersByPage:{...Ke.answersByPage,[de]:{...Oe,[we]:Fe}}}})},[ut]),Ve=o.useCallback((de,we,$e)=>{const Ke=Tr(yt,Ue),Oe=Mr(de,we);Pe(Ke,Oe,$e)},[yt,Ue,Pe]),ft=o.useCallback((de,we,$e)=>{const Ke=Tr(yt,Ue),Oe=Mr(de,we);Pe(Ke,Oe,$e),!$e?.allowChange&&de?.autoAdvance!==!1&&ut(J=>({...J,stepIndex:Math.max(J.stepIndex,we+1)}))},[yt,Ue,Pe,ut]),ot=o.useCallback((de,we)=>{const $e=je?.id||`children-page-${Ue??0}`,Ke=typeof we=="number"?we:pt??0,Oe=`step-${Ke}`;Pe($e,Oe,de),de?.allowChange||ut(J=>({...J,stepIndex:Math.max(J.stepIndex,Ke+1)}))},[je,Ue,pt,Pe,ut]),zt=o.useCallback((de,we)=>{const $e=je?.id||`children-page-${Ue??0}`,Ke=`step-${typeof we=="number"?we:pt??0}`;Pe($e,Ke,de)},[je,Ue,pt,Pe]),Jt=S?{currentPageIndex:Ue??0,currentStepIndex:pt??0,totalStepsInPage:Ze.length,handleStepDone:ot,handleStepChange:zt}:null,Qt=async()=>{const de=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:O,flowState:rt,answersByPage:rt.answersByPage})):null;return typeof F=="function"&&await Promise.resolve(F(de))||de},$t=async()=>{const de=je?.id||`children-page-${rt.pageIndex}`,we=rt.answersByPage[de]||{},$e=Q?(()=>{const J={};let ue=0;return H.forEach(Ae=>{const Fe=rt.answersByPage[Ae.id]||{},Ye=Array.isArray(Ae.steps)?Ae.steps.length:0;for(let Xe=0;Xe<Ye;Xe+=1){const ht=Fe[`step-${Xe}`];typeof ht<"u"&&(J[`step-${ue+Xe}`]=ht)}ue+=Ye}),J})():we;if(typeof N=="function"){const J=await Promise.resolve(N($e,{pageAnswers:we,answersByPage:rt.answersByPage,pages:H,currentPageId:de}));return typeof F=="function"&&await Promise.resolve(F(J))||J}const Ke=Object.entries(we).map(([J,ue],Ae)=>({index:Ae,key:J,payload:ue})),Oe={results:Ke,answers:Ke,score:0};return typeof F=="function"&&await Promise.resolve(F(Oe))||Oe},on=()=>{const de=++Et.current,we=()=>de!==Et.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(M){const Oe=Qt();at(Rn);const J=Oe;Promise.resolve(J).then(ue=>{we()||at(ue||{isEmpty:!0})}).catch(ue=>{!we()&&at({isEmpty:!0})});return}if(S){const Oe=$t();at(Rn);const J=Oe;Promise.resolve(J).then(ue=>{we()||at(ue||{isEmpty:!0})}).catch(ue=>{!we()&&at({isEmpty:!0})});return}const $e=Re.current&&Re.current._childOnResult,Ke=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof $e=="function"){const Oe=Ke($e);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?at(Oe):at(Oe&&typeof Oe.then=="function"?Rn:{});const J=()=>{we()||at(ue=>ue===Rn?{}:ue)};Promise.resolve(Oe).then(ue=>{ue&&!we()?at(ue):J()}).catch(ue=>{J()});return}if(typeof F=="function"){const Oe=Ke(F);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?at(Oe):at(Oe&&typeof Oe.then=="function"?Rn:{});const J=()=>{we()||at(ue=>ue===Rn?{}:ue)};Promise.resolve(Oe).then(ue=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}ue&&!we()?at(ue):J()}).catch(ue=>{console.error("viewResults external handler failed",ue),J()});return}},sn=()=>{if(M){if(typeof Ue=="number"&&typeof vt=="number"&&Ue<vt-1){ut(we=>({...we,pageIndex:we.pageIndex+1,stepIndex:0}));return}return on()}if(S){const we=Ze.length;if(typeof pt=="number"&&pt<we-1){ut($e=>({...$e,stepIndex:$e.stepIndex+1}));return}if(typeof Ue=="number"&&typeof vt=="number"&&Ue<vt-1){ut($e=>({...$e,pageIndex:$e.pageIndex+1,stepIndex:0}));return}return on()}if(typeof C=="function"){try{C()}catch{}return}const de=Re.current&&Re.current._childOnNext;if(typeof de=="function"){try{de()}catch{}return}},Pt=M?Z.title||Z.label||B||T("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||B||T("common.popup","\uD31D\uC5C5"),xn=B||Pt,xt=M?Z.title??Z.label??Pt:a??_??Pt,Rt=(de,we)=>{const $e=Tr(yt,Ue),Ke=Mr(de,we),Oe=rt.answersByPage[$e]?.[Ke],J=Ox(de,{page:yt,pageIndex:Ue,step:de,stepIndex:we,storedPayload:Oe,answersByPage:rt.answersByPage,flowState:rt}),ue={key:Ke,index:we,stepIndex:pt,isLast:we===bt.length-1};switch(de?.type){case"listen":return n.jsx(ws,{...ue,...J,onDone:Ae=>ft(de,we,Ae)});case"confirm":return n.jsx(_s,{...ue,...J,onDone:Ae=>ft(de,we,Ae),onChange:Ae=>Ve(de,we,Ae)});case"confirmWithText":return n.jsx(xs,{...ue,...J,onDone:Ae=>ft(de,we,Ae),onChange:Ae=>Ve(de,we,Ae)});case"orderList":return n.jsx(Bs,{...ue,...J,onDone:Ae=>ft(de,we,Ae),onChange:Ae=>Ve(de,we,Ae)});default:return null}},Ut=o.useRef(void 0);o.useEffect(()=>{const de=Ut.current;if(Ut.current=Ue,de===void 0||de===Ue||!gr())return;const we=Re.current;if(!we)return;const $e=document.activeElement;if(!(!$e||$e===document.body||!we.contains($e)||$e.disabled===!0))return;const Ke=we.querySelector(`.training-steps ${Bn.split(", ").join(", .training-steps ")}`)??Array.from(we.querySelectorAll(Bn)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Ue]);const Gt=M?O.length>0?n.jsx("div",{className:"training-steps",children:bt.map((de,we)=>Rt(de,we))},`replay-${qe}`):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,Pn=S?n.jsxs(td.Provider,{value:Jt,children:[je?.pageTop?n.jsx("div",{className:"training-page-top",children:je.pageTop}):null,n.jsx("div",{className:"training-steps",children:Ze.map((de,we)=>{const $e=de;return o.cloneElement($e,{...$e.props,_stepIndex:we,_totalSteps:Ze.length,_stepKey:`step-${we}`,_pageIndex:Ue})})},`replay-${qe}`),je?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:je.pageBottom}):null]}):null,mn=o.useRef(-1),Ft=o.useCallback(()=>{if(!k)return;const de=et,{results:we,correct:$e,total:Ke}=Ds(et),Oe={correct:$e,total:Ke,attempt:st.current.length+1,previousAttempts:[...st.current]};if(mn.current===wt.current)return Oe;mn.current=wt.current,Af({items:$f(we),category:dd.has(k)?"sentence":"word",trainingType:k,entryPoint:w??"sentence",itemRef:D??null,correct:$e,total:Ke,score:typeof de?.score=="number"?de.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:A??null});try{y?.(Oe)}catch{}return Oe},[k,w,A,D,et,y]);o.useEffect(()=>{!et||et===Rn||et?.isEmpty||(Ds(et).total??0)>0&&Ft()},[et,Ft]);const gn=o.useCallback(()=>{const de=Ft();Tt(),Ie(()=>{typeof g=="function"&&g(de),typeof m=="function"&&m()})},[g,m,Ft,at,Ie]),ln=o.useCallback(()=>gt(""),[gt]),Cn=o.useCallback(()=>{Ie(()=>{typeof m=="function"&&m()})},[m,Ie]),Ht=n.jsxs("div",{className:`page-popup${dt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":xn,children:[n.jsxs("div",{ref:Re,className:`page-popup__panel ${Nt?"":"page-popup__panel--measuring"} ${lt==="center"?"page-popup__panel--center":lt==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Zc,{title:xt,subtitle:M?Z.subtitle||Z.label:Array.isArray(s)?s.join(" / "):void 0,desc:M?void 0:r,depth:M?Z.depth:s,icon:M?Z.icon:l,wrapperStyle:M?Z.wrapperStyle:i,iconTooltip:M?Z.iconTooltip:u,progressMax:vt,progressIndex:Ue,pageIndex:Ue,pageCount:vt,onBack:Cn,onClose:Cn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${lt==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?Pn:M?Gt:typeof b=="function"?b({registerOnNext:Te,registerOnResult:it,panelRef:Re,setResultOverlay:at}):b})}),n.jsx(Yc,{onSettings:f,onNext:sn,onResult:on,useNoiseSettingBtn:!!(M?Z.useNoiseSetting??!0:x),stepIndex:pt,stepCount:Bt,pageIndex:Ue,pageCount:vt,resultOpen:!!(et&&!et.isEmpty),hideNoiseRows:$})]}),et&&!et.isEmpty&&(E??Hx)({score:et.score,results:et.results||et.answers||[],contextsLength:et.results?et.results.length:et.answers?et.answers.length:0,onReplay:()=>{if(G.current=Date.now(),et!==Rn){const{correct:de,total:we}=Ds(et);st.current.push({correct:de,total:we})}if(Tt(),He(de=>de+1),M){if(ut(Lr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){ut(Lr());return}try{const de=Re.current&&Re.current._childOnResult;typeof de=="function"&&de({replay:!0})}catch{}},onClose:gn,pending:et===Rn}),et?.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(ve,{htmlType:"button",variant:"main",size:48,onClick:gn,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ba,{message:Dt,position:"top",onClose:ln})]}),wn=n.jsx(Cs.Provider,{value:We,children:Ht});return typeof document<"u"&&document.body?un.createPortal(wn,document.body):wn}const Vn=Vx;Vn.Page=Sr,Vn.ListenStep=nd,Vn.ConfirmStep=ad,Vn.ConfirmWithTextStep=rd,Vn.OrderListStep=od,Vn.CardStep=sd,Vn.CardOrderStep=Ex;function qx({label:e,homonum:t}){const a=ia()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=Jo(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:u})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function pd({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,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:un.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(qx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Ux({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,sectionType:y="page",disc:C}){const{t:f,i18n:x}=Be.useTranslation(),b=x.language?.startsWith("ko")??!1,{anchorRect:B,openAt:_,close:N}=Fa(),[v,k]=o.useState(null),w=o.useCallback(()=>{N(),k(null)},[N]);Py(w,!!v);const A=(r??"").trim(),D=/^[^,[\]\s]+$/.test(A)?A:"",E=D.length>0,R=r===void 0&&t===void 0,$=E?"match":R?"original":"ganada",[G,T]=o.useState(()=>$),[F,M]=o.useState("50"),[X,Z]=o.useState(1),[O,Y]=o.useState(E);O!==E&&(Y(E),T($));const I=G==="match"&&!E||G==="original"&&!R?$:G,q=o.useMemo(()=>[...E?[{value:"match",label:f("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...R?[{value:"original",label:f("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:f("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:f("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:f("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:f("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:f("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:f("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[f,E,R]),Q=o.useMemo(()=>["10","25","50","100"].map(ce=>({value:ce,label:f("wordSearch.pageSize",{count:Number(ce),defaultValue:`${ce}\uAC1C\uC529 \uBCF4\uAE30`})})),[f]),H=ce=>ce.words?.[0],S=o.useMemo(()=>{const ce=[...D].length,ge=lf(D),be=new Map;return he=>{let Me=be.get(he);return Me===void 0&&(Me=ge((he.words?.[0]?.label??"").slice(0,ce))?0:1,be.set(he,Me)),Me}},[D]),P=o.useCallback((ce,ge)=>{const be=We=>H(We)?.label??"",he=We=>H(We)?.syllables??[...be(We)].length,Me=We=>(We.words??[]).reduce((Re,qe)=>{const He=parseInt(qe.grade??"",10);return Number.isFinite(He)&&He<Re?He:Re},999);switch(I){case"match":return S(ce)-S(ge)||pn(be(ce),be(ge));case"ganada":return pn(be(ce),be(ge));case"ganada_desc":return pn(be(ge),be(ce));case"syllable":return he(ce)-he(ge)||pn(be(ce),be(ge));case"syllable_desc":return he(ge)-he(ce)||pn(be(ce),be(ge));case"grade":return Me(ce)-Me(ge)||pn(be(ce),be(ge));case"grade_desc":return Me(ge)-Me(ce)||pn(be(ce),be(ge));default:return 0}},[I,S]),L=o.useMemo(()=>s.slice().sort(P),[s,P]),U=Number(F)||10,ae=o.useMemo(()=>(l??[]).flatMap(ce=>ce.items.slice().sort(P).map(ge=>({item:ge,label:ce.label}))),[l,P]),se=l?ae.length:L.length,me=Math.max(1,Math.ceil(se/U)),te=Math.min(X,me),z=o.useMemo(()=>L.slice((te-1)*U,te*U),[L,te,U]),ne=o.useId(),W=o.useMemo(()=>{if(!l)return null;const ce=ae.slice((te-1)*U,te*U),ge=new Map;for(const{item:be,label:he}of ce)ge.has(he)||ge.set(he,[]),ge.get(he).push(be);return[...ge.entries()].map(([be,he])=>({label:be,items:he}))},[l,ae,te,U]);o.useEffect(()=>{Z(1)},[G,F,se,r]);const V=se>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(bn,{size:40,options:q,value:I,onChange:T,ariaLabel:f("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(bn,{size:40,options:Q,value:F,onChange:M,ariaLabel:f("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Po,{page:te,totalPages:me,onChange:Z})]}):void 0,pe=ce=>{u&&u(ce)},Ee=t!==void 0&&a?n.jsxs(n.Fragment,{children:[f("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),f("wordSearch.resultTitleSuffix",{unit:b?yf(a):a})]}):void 0,xe=t!==void 0&&t>0&&c!==void 0&&a?f("wordSearch.resultDisc",{unit:b?_f(a):a,max:c,selected:i.length}):void 0,Ce=C??xe;return n.jsxs(ya,{type:y,className:ke("word-search-result-block",m),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(Ee||V||Ce)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(tt,{icon:e,className:"word-search-result-block__head-icon"}),Ee&&n.jsx("span",{className:"word-search-result-block__title h3",children:Ee})]}),V&&n.jsx("div",{className:"word-search-result-block__head-actions",children:V}),Ce&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Ce})]}),(l?l.length===0:s.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:f("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(W??[]).map(ce=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${ne}-${ce.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${ne}-${ce.label}`,children:ce.label}),n.jsx("div",{className:"word-search-result-block__items",children:ce.items.map(ge=>{const be=i.includes(ge.id);return n.jsx("div",{onMouseEnter:he=>{_(he.currentTarget),k(ge.words??[])},onMouseLeave:w,children:n.jsx(ve,{htmlType:"button",size:"word",align:"grid",label:(ge.words??[]).map(he=>he.label),subLabel:(ge.words??[]).some(he=>he.subLabel)?(ge.words??[]).map(he=>he.subLabel):void 0,selected:be,onClick:()=>pe(ge.id),minWidth:200})},ge.id)})})]},ce.label)):n.jsx("div",{className:"word-search-result-block__items",children:z.map(ce=>{const ge=i.includes(ce.id);return n.jsx("div",{onMouseEnter:be=>{_(be.currentTarget),k(ce.words??[])},onMouseLeave:w,children:n.jsx(ve,{htmlType:"button",size:"word",align:"grid",label:(ce.words??[]).map(be=>be.label),subLabel:(ce.words??[]).some(be=>be.subLabel)?(ce.words??[]).map(be=>be.subLabel):void 0,selected:ge,onClick:()=>pe(ce.id),minWidth:200})},ce.id)})}),v&&B&&n.jsx(pd,{words:v,anchorRect:B})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(ve,{htmlType:"button",size:"56",type:"bar",label:f("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(ve,{htmlType:"button",size:"56",type:"bar",variant:"main",label:f("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Gx(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 Kx({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:b=!1,searchLabel:B,searchChecking:_=!1,pairMode:N=!1,sectionType:v="page",beforeSearchContent:k,beforeContent:w,afterContent:A,hideCountControl:D=!1,ordinal:E=!1}){const{t:R}=Be.useTranslation(),$=o.useMemo(()=>R("wordPairs.infoNotes",{returnObjects:!0}),[R]),G=o.useMemo(()=>Array.from({length:s-l+1},(S,P)=>{const L=l+P;return{key:String(L),label:R("wordPairs.count",{n:L})}}),[R,s,l]),T=o.useMemo(()=>R("wordPairs.ordinals",{returnObjects:!0}),[R]),F=o.useCallback(S=>E?R("wordPairs.phonemeOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeSingleLabel","\uC74C\uC808"):R("wordPairs.phonemeN",{n:S}),[E,T,a,R]),M=o.useCallback(S=>E?R("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):R("wordPairs.phonemeContrast",{n:S}),[E,T,a,R]),X=o.useCallback((S,P)=>P?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:Z,toggleAt:O,close:Y}=Fa(),I=o.useCallback(S=>r(Number(S)),[r]),q=fn("(max-width: 767px)"),Q=o.useCallback(S=>Gx(S,e).map(({label:P,value:L,displayLabel:U})=>{const ae=!!L&&L!=="\uC5C6\uC74C";return n.jsxs("span",{className:ke("phoneme-select-block__cell-jamo-part",L?"":"phoneme-select-block__cell-jamo-part--empty",ae?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${L==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:L==="\uC5C6\uC74C"?"x":L||d}),ae&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:U??P})]},P)}),[e,d]),H=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(ve,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:Z?"is-selected":void 0,"aria-expanded":!!Z,"aria-haspopup":"dialog",onClick:S=>O(S.currentTarget)})}),Z&&n.jsx(Yn,{title:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:Z,onClose:Y})]});return n.jsxs(ya,{type:v,title:p,icon:m,disc:g,action:y?H:void 0,className:ke("phoneme-select-block",h),children:[w,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(kn,{options:G,value:String(a),onChange:I,size:40,ariaLabel:R("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,P)=>{const L=t[P*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:Q(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:F(P+1)})]},P)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:R("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,P)=>{const L=t[P*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:Q(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(P+1)})]},P)})})]}):t.map((S,P)=>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:Q(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:F(P+1)})]},P))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?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((S,P)=>{const L=t[P*2]??{};return n.jsx(Ln,{title:X(F(P+1),P===0),sections:u?u(L,P*2):i,selected:L,onSelect:c?.(P*2),align:"newline"},P)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,P)=>{const L=t[P*2+1]??{};return n.jsx(Ln,{title:M(P+1),sections:u?u(L,P*2+1):i,selected:L,onSelect:c?.(P*2+1),align:"newline"},P)})})]}):t.map((S,P)=>n.jsx(Ln,{title:X(F(P+1),P===0),sections:u?u(S,P):i,selected:S,onSelect:c?.(P),align:"newline"},P))})}),k&&n.jsx("div",{className:"phoneme-select-block__before-search",children:k}),(C||f||_)&&(()=>{const S=t.every(P=>{const L=af(P);return Object.entries(L).every(([U,ae])=>!ae||U==="coda"&&ae===Ll)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?x:void 0,children:[C&&n.jsx(ve,{htmlType:"button",size:"56",type:"bar",label:R("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),f?n.jsx(ve,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||b||_,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:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),A]})}function Yx({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=Be.useTranslation();return n.jsx(Ln,{className:h,title:e??p("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:d,align:"inline"})}function Zx({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=Be.useTranslation();return a.length===0?null:n.jsx(Ln,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function Xx({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=Be.useTranslation(),p={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}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(qa,{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:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(qa,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(qa,{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={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(f,x)=>{x===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):x===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):x===p.count?i(f===m(2)?2:1):x===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx(Ln,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function Jx(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:b,countLabel:B,topContent:_,className:N=""}=e,{t:v}=Be.useTranslation(),k=u??v("common.search","\uAC80\uC0C9"),w=x??v("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),A=b??v("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,E]=o.useState(""),[R,$]=o.useState(d??r[0]?.key??""),[G,T]=o.useState(h),[F,M]=o.useState(String(f??C[0]??10)),[X,Z]=o.useState(1);o.useEffect(()=>{Z(1)},[D,F]);const O=c!==null,Y=o.useCallback((se,me)=>{if(!me)return!0;const te=me.toLowerCase();return r.some(z=>{const ne=se[z.key];return ne==null?!1:String(ne).toLowerCase().includes(te)})},[r]),I=c??Y,q=o.useMemo(()=>{const se=O?a.filter(me=>I(me,D)):a;return R?[...se].sort((me,te)=>{const z=me[R],ne=te[R];return z===ne?0:hr(z,ne,G)}):se},[a,D,R,G,O,I]),Q=Math.max(1,Math.ceil(q.length/Number(F)));X>Q&&Z(Q);const H=Math.min(X,Q),S=q.slice((H-1)*Number(F),H*Number(F)),P=o.useCallback(se=>{R===se?T(me=>!me):($(se),T(!0)),Z(1)},[R]),L=o.useMemo(()=>{if(typeof B=="function"){const se=q.length,me=B(se);if(typeof me=="string"){const te=me.lastIndexOf(String(se));if(te>=0)return{prefix:me.slice(0,te),suffix:me.slice(te+String(se).length)}}return{label:me}}if(typeof B=="string"&&B.includes("{n}")){const[se,me]=B.split("{n}");return{prefix:se,suffix:me}}return{prefix:v("common.totalCountPrefix","\uCD1D "),suffix:v("common.totalCountSuffix","\uAC1C")}},[B,q.length,v]),U=o.useMemo(()=>r.map(se=>({label:se.label,onClick:se.sortable!==!1?()=>P(se.key):void 0,className:se.className,sortDir:se.sortable!==!1&&R===se.key?G?"asc":"desc":null})),[r,R,G,P]),ae=o.useMemo(()=>C.map(se=>({value:String(se),label:v("common.pageSizeLabel",{n:se})})),[C,v]);return n.jsxs(Hn,{className:`popup-list ${N}`,title:t,onClose:y,children:[_,"label"in L&&n.jsx("p",{className:"toolbar__count body-1",children:L.label}),n.jsx(Io,{count:"label"in L?void 0:{value:q.length,prefix:L.prefix,suffix:L.suffix},search:O?{value:D,onChange:E,placeholder:k}:void 0,pageSize:{options:ae,value:F,onChange:M},pagination:{page:H,total:Q,onChange:Z}}),n.jsx(Yo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:U,items:S,onRowClick:g,renderRow:se=>{const me=m!=null?se.id!=null&&m.has(se.id):p!=null&&se.id===p;return r.map(te=>({content:te.render?te.render(se):se[te.key]??"",className:ke(te.className,me&&"popup-list__row--selected")}))},empty:O&&D!==""&&a.length>0?A:w})]})}function hd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:f="small",className:x,initialFocus:b="close"}=e,{t:B}=Be.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||b==="close")return;const D=_.current?.closest(".popup-panel"),E=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),R=b==="confirm"?E[E.length-1]:c?void 0:E[d?1:0];R&&!R.disabled&&R.focus()},[]);const N=o.useRef(!1),[v,k]=o.useState(!1),w=D=>{let E=!1;return{close:()=>{E=!0,D()},didClose:()=>E}},A=async D=>{if(N.current)return;N.current=!0;const E=typeof document<"u"?document.activeElement:null;k(!0);let R=!1;try{R=await D()}catch($){typeof console<"u"&&console.error($)}finally{R||(N.current=!1,k(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&E?.isConnected&&E.focus()}))}};return n.jsxs(Hn,{title:t,onClose:y,closeDisabled:v,inline:C,size:f,className:ke("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||v,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const E=w(D);await d.onClick(E.close);const R=d.closeOnClick??!0;return R&&D(),R||E.didClose()})}}]:[],...c?[]:[{label:u??B("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:v,onClick:({closeWithAnimation:D})=>D()}],{label:i??B("common.confirm","\uD655\uC778"),variant:h,disabled:p||v,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const E=w(D);return await m(E.close),g&&D(),g||E.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Er,{children:s.map((D,E)=>n.jsx($n,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},E))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function Qx(e,t,a={}){const{t:r}=Be.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]),d=s?n.jsx(hd,{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:d,allowClose:u}}function ew({onApply:e,onCancel:t}){const{t:a}=Be.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(Il(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Hn,{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})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,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:g,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 md=["var(--color-main)","var(--color-sub)"],tw=2e3;function nw(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 Ss({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=(b,B)=>Array.from({length:b}).map((_,N)=>{const v=6+Math.random()*12,k=Math.round(Math.min(18,v*Math.min(1.5,1+r*.4))),w=md[Math.floor(Math.random()*md.length)],A=Math.random()*300,D=(360+Math.random()*260)*r*1.2,E=(B==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,R=Math.cos(E)*D,$=Math.sin(E)*D*1.35,G=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),F=Math.random()>.7?"50%":"3px";return{id:`${B}-${N}`,side:B,size:k,color:w,delay:A,vx:R,vy:$,angularVel:G,life:T,borderRadius:F}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{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=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Y=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Y)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,b=Math.max(60,(window.innerHeight||800)*.05),B=Y=>Math.max(40,(Y||window.innerWidth)*.02),_=x?.width||window.innerWidth||375,N=x?.height||window.innerHeight||812,v=Y=>{const I=[...Y].sort((q,Q)=>q-Q);return I[Math.floor(I.length/2)]||1},k=v(i.map(Y=>Math.abs(Y.vy))),w=v(i.map(Y=>Math.abs(Y.vx))),A=Math.sqrt(2*C*(N*.72+b))/k,D=k*A/C,E=_*.5/(w*D),R=(Y,I,q)=>Math.min(q,Math.max(I,Y)),$=R(A,.8,2.4),G=R(E,.7,2.2),T=a>0?a/tw:1,F=i.map(Y=>({...Y,life:Y.life*T,vx:Y.vx*G,vy:Y.vy*$,startTime:f+Y.delay,ended:!1})),M=x?{x:x.left-B(x.width),y:x.top+x.height+b}:{x:-B(window.innerWidth),y:window.innerHeight+b},X=x?{x:x.left+x.width+B(x.width),y:x.top+x.height+b}:{x:window.innerWidth+B(window.innerWidth),y:window.innerHeight+b},Z=Y=>{let I=!1;for(const q of F){const Q=c.current[q.id];if(!Q||!Q)continue;if(Y<q.startTime){Q.style.display="none",I=!0;continue}if(!q._inited){const z=q.side==="left"?M.x:X.x,ne=q.side==="left"?M.y:X.y;Q.style.left=`${z}px`,Q.style.top=`${ne}px`,Q.style.transform="translate3d(0px, 0px, 0)",Q.style.display="block",Q.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Q.style.background=nw(Q,q.color)??"#FF0060"),q._inited=!0}const H=(Y-q.startTime)/1e3;if(H<0)continue;const S=q.life/1e3;if(H>=S){Q.style.opacity="0",Q.style.display="none",q.ended=!0;continue}I=!0;const P=q.side==="left"?M.x:X.x,L=q.side==="left"?M.y:X.y,U=P+q.vx*H,ae=L+q.vy*H+.5*C*H*H,se=(q.angularVel||0)*H,me=U-P,te=ae-L;Q.style.transform=`translate3d(${me}px, ${te}px, 0) rotate(${se}deg)`,Q.style.opacity=`${Math.max(0,1-H/S)}`}I?d.current=requestAnimationFrame(Z):h.current?.()};d.current=requestAnimationFrame(Z);const O=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Y=document.createElement("div");Y.className="party-container",Y.style.position="fixed",Y.style.inset="0",Y.style.pointerEvents="none",Y.style.overflow="visible",Y.style.zIndex="2147483647";for(const I of i){const q=document.createElement("span");q.className=`confetti confetti--${I.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=`${I.size}px`,q.style.height=`${Math.max(4,I.size*.6)}px`,q.style.background=I.color,q.style.borderRadius=I.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",Y.appendChild(q),c.current[I.id]=q}(document.body||m.current).appendChild(Y),p.current=Y}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(O),p.current){try{p.current.remove()}catch{}p.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"?un.createPortal(y,m.current||document.body):y}const js=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function aw({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:js(u.count),strength:js(u.strength),duration:js(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(Ss,{active:t,trigger:e}),a&&n.jsx(Ss,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function rw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=Be.useTranslation();wy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"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(ve,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(jt,{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 ow(e){return e??""}const Cd=o.createContext({words:[],loading:!1});function sw(){return o.useContext(Cd)}function lw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){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(Cd.Provider,{value:h,children:d})}function iw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:ke("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 uw=(e,t)=>`${e} / ${t}`;function cw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=uw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=Be.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[x,b]=o.useState(!1);o.useEffect(()=>{const T=p.current;if(!T)return;const F=()=>b(T.scrollWidth>T.clientWidth+1);if(F(),typeof ResizeObserver>"u")return;const M=new ResizeObserver(F);return M.observe(T),()=>M.disconnect()},[C]);const B=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),_=C&&C.shape===B?C.pages:null,[N,v]=o.useState(0);o.useEffect(()=>{const T=y.current;if(!T||typeof ResizeObserver>"u")return;const F=new ResizeObserver(()=>v(T.offsetHeight));return F.observe(T),()=>F.disconnect()},[]);const[k,w]=o.useState(0);o.useEffect(()=>{const T=m.current;if(!T||typeof ResizeObserver>"u")return;let F=null;const M=typeof requestAnimationFrame=="function"?O=>requestAnimationFrame(O):O=>setTimeout(O,16),X=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:O=>clearTimeout(O),Z=new ResizeObserver(()=>{F==null&&(F=M(()=>{F=null,w(O=>O+1)}))});return Array.from(T.children).forEach(O=>Z.observe(O)),()=>{Z.disconnect(),F!=null&&X(F)}},[B]),o.useLayoutEffect(()=>{const T=m.current,F=y.current;if(!T||!F)return;const M=S=>S.getBoundingClientRect().height||S.offsetHeight,X=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{X.set(S.dataset.chromeSection??"",M(S))});const Z=S=>M(F)-(X.get(S??"")??0),O=Array.from(T.children).map(S=>M(S)),Y=[];e.forEach((S,P)=>{const L=Y[Y.length-1],U=L?e[L[0]]:void 0;U&&S.group!=null&&U.group===S.group&&U.section===S.section?L.push(P):Y.push([P])});const I=[];let q=[],Q=0;const H=()=>{q.length&&I.push(q),q=[],Q=0};Y.forEach(S=>{const P=S.reduce((U,ae)=>U+O[ae],0),L=Z(e[S[0]].section);q.length&&e[q[0]].section!==e[S[0]].section&&H(),P>L?S.forEach(U=>{q.length&&Q+O[U]>L+.01&&H(),q.push(U),Q+=O[U]}):(q.length&&Q+P>L+.01&&H(),S.forEach(U=>q.push(U)),Q+=P)}),H(),f(S=>S&&S.shape===B&&JSON.stringify(S.pages)===JSON.stringify(I)?S:{shape:B,pages:I})},[B,N,l,i,u,k]);const A=Mo,D=A,E=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),R=(T,F,M)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:M!=null&&t?.[M]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:E}),n.jsx("span",{className:"report-doc__page-no",children:s(T,F)})]})}),$=Array.from(new Set(e.map(T=>T.section??""))),G={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:ke("report-doc",c),style:G,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:g,children:$.map(T=>{const F=R(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[F.header,F.footer]},T)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((T,F)=>{const{header:M,footer:X}=R(F+1,_.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[M,T.map(Z=>n.jsx("div",{children:e[Z].content},e[Z].id)),X]},F)})})]})}function dw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:ke("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 ra=new Map;let $r=null;const pw=12;function hw(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 Rr(){const e=new Map;for(const t of ra.keys()){if(!t.isConnected)continue;const a=hw(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+pw)}}}function mw(e){return typeof window>"u"?()=>{}:(ra.set(e,(ra.get(e)??0)+1),ra.get(e)===1&&typeof ResizeObserver<"u"&&($r??($r=new ResizeObserver(()=>Rr())),$r.observe(e)),Rr(),()=>{const t=(ra.get(e)??1)-1;if(t>0){ra.set(e,t),Rr();return}ra.delete(e),$r?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Rr()})}function Cw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=Be.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?mw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&cr(p)}},[]),n.jsxs("div",{ref:d,className:ke("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(Hs,{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(ve,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function fw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=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:ke("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:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{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 bw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:f}=Be.useTranslation(),x=o.useId(),b=t?`h${t}`:"span",B=s!=null,_=ke("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",B&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:p,onDragLeave:m,onDrop:g,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:[B&&n.jsx(ve,{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(b,{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:N=>N.stopPropagation(),children:[l,i&&n.jsx(bn,{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:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const gw="speechear:saved_word_tables";function yw(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 vw(){try{const e=localStorage.getItem(gw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(yw):[]}catch{return[]}}function fd(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 Ts(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 xw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:b,onReset:B,resetLabel:_,saveButtonLabel:N,secondarySaveButtonLabel:v,onReorder:k,showCellCount:w,onAddItem:A,className:D,renderSavePopup:E,renderWordSearch:R,hideControls:$,saveOnly:G,tableName:T,nameValue:F,onNameChange:M,descriptionValue:X,onDescriptionChange:Z,namePlaceholder:O,descriptionPlaceholder:Y,existingNames:I,editingName:q,onCancel:Q,initialItemsPerPage:H,renderCellAction:S,actionsLeftExtra:P}){const{t:L}=Be.useTranslation(),U=_??L("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),ae=C===void 0,se=!!M,[me,te]=o.useState([]),z=(F??"").trim(),ne=z||(O??"").trim(),W=(X??"").trim()||(Y??"").trim(),V=(I??[]).map(K=>K.trim().toLowerCase()),pe=[q?.trim().toLowerCase(),...me].filter(K=>!!K),Ee=[...V];for(const K of pe){const ie=Ee.indexOf(K);ie!==-1&&Ee.splice(ie,1)}const xe=z!==""&&Ee.includes(z.toLowerCase()),[Ce,ce]=o.useState(Array(4).fill(null)),[ge,be]=o.useState(4),[he,Me]=o.useState(null),We=Ce.slice(0,ge),Re=!!d?.show,[qe,He]=o.useState(!0),[st,lt]=o.useState(!0),Qe=d&&{...d,top:qe,bottom:st},[dt,Se]=o.useState("landscape"),[Ge,Ne]=o.useState(["image","word","caption","standardPron"]),[Ie,Je]=o.useState("show"),[nt,Nt]=o.useState(!0),[_t,Lt]=o.useState(!0),et=o.useRef(null),at=o.useRef([]),[Et,wt]=o.useState(H==="all"?Number.POSITIVE_INFINITY:H??8),[Tt,Dt]=o.useState("right"),[gt,rt]=o.useState(!1),[ut,ye]=o.useState(!1),{toastMessage:Le,toastType:je,showWarning:Ze,clearToast:Ue}=Vi("warning"),yt=o.useCallback(()=>Me(null),[Me]);A&&!ae&&!w&&!g&&kt("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&ae&&kt("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[bt,Bt]=o.useState(()=>Math.max(C?.length??1,1)),pt=Math.max(g??0,C?.length??0,1),vt=ae?ge:w?Math.max(bt,C?.length??1,1):pt,{width:Te,height:it}=Qn[dt],re=!ae&&!w,fe=Math.max(1,Math.min(pt,y??pt)),Pe=Math.min(Et,fe),Ve=re?Pe:vt,ft=Math.ceil((C?.length??0)/Math.max(1,Ve)),ot=(C?.length??0)<pt?Math.floor((C?.length??0)/Math.max(1,Ve))+1:0,zt=re?Math.max(1,ft,ot):0,Jt=re?Array.from({length:zt},(K,ie)=>(C??[]).slice(ie*Ve,(ie+1)*Ve)):null,Qt=!!Jt&&Jt.length>1,$t=ae?We.some(K=>K!==null&&K.length>1):(C??[]).some(K=>(K.words??[]).length>1),on=T?.trim()||`${Ul(Ra())} ${$t?L("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):L("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,sn=o.useCallback(()=>Qt?at.current.filter(K=>K!==null):et.current?[et.current]:[],[Qt]),{print:Pt,openNewWindow:xn,downloadHtml:xt}=cs({getElements:sn,paperW:Te,paperH:it,fileName:on,onPopupBlocked:()=>{Ze(L("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."))}}),Rt=K=>{be(K),ce(ie=>ie.length>=K?ie:[...ie,...Array(K-ie.length).fill(null)]),Me(null)},Ut=K=>{ce(ie=>{const De=[...ie];return De[K]=null,De}),he===K&&Me(null)},Gt=K=>{if(he===null)return;const ie=he;ce(ze=>{const ct=[...ze];return ct[ie]=K.length>0?K:null,ct});const De=We.findIndex((ze,ct)=>ct>ie&&ze===null);Me(De!==-1?De:null)},Pn=ae?We.some(K=>K?.some(ie=>!!ie.colloquialPronunciation)):(C??[]).some(K=>(K.words??[]).some(ie=>!!ie.colloquialLabel)),mn=!ae&&[...p?[p]:[],...C??[]].some(K=>(K.words??[]).some(ie=>!!ie.captionBadge||!!ie.captionLabel)),Ft=o.useMemo(()=>ia()?ae?Ce.slice(0,ge).flatMap(K=>(K??[]).map(ie=>[ie.word,ie.homonum])):(K=>K.flatMap(ie=>(ie.words??[]).map(De=>[De.label,De.homonum])))([...p?[p]:[],...C??[]]):[],[ae,Ce,ge,C,p]),[gn,ln]=o.useState(!1);o.useEffect(()=>{if(Ft.length===0)return;let K=!1;return Promise.all(Ft.map(([ie,De])=>Sl(ie,De))).then(ie=>{K||ln(ie.some(Boolean))},()=>{}),()=>{K=!0}},[Ft]);const Cn=Ft.length>0&&gn,Ht=o.useMemo(()=>[...ae||w?[{label:L("wordTable.filter.columns","\uCE78 \uC218"),items:I4.map(K=>({value:`${K}\uCE78`,displayLabel:L("wordTable.filter.column",{count:K})})),display:"segmented"}]:[],...re&&(C?.length??0)>0?[gc(L,{hasPairs:$t,itemCount:pt,max:y})]:[],...Qt?[O4(L)]:[]],[L,ae,w,re,C?.length,$t,pt,y,Qt]),wn={...ae||w?{[L("wordTable.filter.columns","\uCE78 \uC218")]:`${vt}\uCE78`}:{},...re&&(C?.length??0)>0?{[L($t?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Pe}\uAC1C`}:{},...Qt?{[L("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:Tt}:{}},de=(K,ie)=>{ie===L("wordTable.filter.columns","\uCE78 \uC218")?ae?Rt(parseInt(K)):Bt(parseInt(K)):ie===L($t?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?wt(yc(parseInt(K),pt)):ie===L("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Dt(vc(K))},we=ae?_w(We.filter(K=>K!==null&&K.length>0).map(K=>({id:Ts(K),words:K.map(fd)}))):C??[],$e=()=>{ae&&ce(K=>K.length>ge?K.slice(0,ge):K)},Ke=(K=!1)=>{if(ye(K),se&&f){const ie=ne.trim().toLowerCase();ie&&te(De=>De.includes(ie)?De:[...De,ie]),f(ne,we,W||void 0,K),$e();return}if(G&&f){f("",we,void 0,K),$e();return}if(f){rt(!0);return}xt()},[Oe,J]=o.useState(!1),[ue,Ae]=o.useState(""),Fe=ue.trim(),Ye=Fe!==""&&V.includes(Fe.toLowerCase()),Xe=()=>{Ae(ne?L("wordTable.save.copyName",{name:ne,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),J(!0)},ht=()=>{!Fe||Ye||!f||(f(Fe,we,W||void 0,!0),$e(),J(!1))},mt=we.length===0,_e=mt||se&&(ne===""||xe),j=()=>{if(mt){Ze(L("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(se&&ne===""){Ze(L("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}se&&xe&&Ze(L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},ee=n.jsx(va,{items:we,orientation:dt,contentTypes:Ge,baseItem:p,baseContentTypes:m,cutLine:Ie,showOutline:nt,showDivLine:_t,count:vt});return n.jsxs(n.Fragment,{children:[n.jsxs(ya,{type:"page",icon:t,title:e,disc:a,className:ke("word-table-block",D),children:[Oe&&n.jsx(Hn,{size:"small",title:v??L("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>J(!1),footer:({closeWithAnimation:K})=>n.jsxs(n.Fragment,{children:[n.jsx(ve,{htmlType:"button",size:48,type:"bar",label:L("common.cancel","\uCDE8\uC18C"),onClick:K}),n.jsx(ve,{htmlType:"button",size:48,type:"bar",variant:"main",label:L("common.save","\uC800\uC7A5"),disabled:!Fe||Ye,onClick:ht})]}),children:n.jsx(Jn,{label:L("wordTable.save.nameLabel","\uC774\uB984"),value:ue,onChange:Ae,placeholder:L("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:ht,error:Ye?L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),gt&&f&&E?.({defaultName:typeof e=="string"?e:L("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:ee,previewW:Te,previewH:it,items:we,existingNames:vw().map(K=>K.name),saveAsNew:ut,onSave:(K,ie)=>{f(K,we,ie,ut),$e(),rt(!1)},onCancel:()=>rt(!1)}),(ae||A)&&he!==null&&R?.({cellIndex:he,onConfirm:ae?Gt:K=>{if(A){const ie=K[0];if(ie){const De=new Set((C??[]).map(ct=>ct.id));let ze=Ts([ie]);for(let ct=2;De.has(ze);ct++)ze=`${Ts([ie])}~${ct}`;A({id:ze,words:[fd(ie)]})}}Me(null)},onClose:yt}),!$&&n.jsx(ss,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Cn,hasColloquial:Pn,hasCaption:mn,contentTypes:Ge,orientation:dt,showOutline:nt,cutLine:Ie,showDivLine:_t,setters:{setContentTypes:Ne,setOrientation:Se,setShowOutline:Nt,setCutLine:Je,setShowDivLine:Lt,setShowTopInfo:He,setShowBottomInfo:lt},showCutLine:(re?Ve:vt)>1,showDivLine2:$t,middleSections:Ht,extraSelected:wn,onExtraSelect:de,showPaperBands:Re,showTopInfo:qe,showBottomInfo:st}),Qt&&Jt?n.jsx("div",{className:"word-table-block__pages",children:Jt.map((K,ie)=>n.jsx(va,{orientation:dt,contentTypes:Ge,cutLine:Ie,showOutline:nt,showDivLine:_t,count:Ve,items:K,baseItem:p,baseContentTypes:m,onRemoveItem:b,onReorder:k&&((De,ze)=>k(De+ie*Ve,ze+ie*Ve)),indexOffset:ie*Ve,totalCount:C?.length??0,renderCellAction:S&&((De,ze)=>S(De+ie*Ve,ze)),showFillerAdd:!!A,onActivateCell:A?(De=>Me(De+ie*Ve)):void 0,addableCount:Math.max(0,Math.min(Ve,pt-ie*Ve)),brand:Qe,code:h,contentRef:De=>{at.current[ie]=De},pageNumber:{current:ie+1,total:Jt.length},pageNumberPosition:Tt},ie))}):n.jsx(va,{orientation:dt,contentTypes:Ge,cutLine:Ie,showOutline:nt,showDivLine:_t,count:vt,items:ae?void 0:C??[],baseItem:ae?void 0:p,baseContentTypes:m,editCells:ae?We:void 0,activeCell:he,onActivateCell:ae||A?Me:void 0,onRemoveCell:ae?Ut:void 0,onRemoveItem:ae?void 0:b,onReorder:ae?void 0:k,renderCellAction:ae?void 0:S,brand:Qe,code:h,showFillerAdd:!!A,contentRef:et}),!$&&!G&&P!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:P}),se&&!$&&n.jsxs(Er,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx($n,{variant:"custom",label:L("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{required:!0,value:F??"",onChange:M,placeholder:O?O+L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):L("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:L("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:xe?L("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:K=>{(K.key==="Tab"&&!K.shiftKey||K.key===" ")&&!(F??"").trim()&&(O??"").trim()&&(K.preventDefault(),M?.(O??""))}})}),n.jsx($n,{variant:"custom",label:L("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{value:X??"",onChange:Z,placeholder:Y?Y+L("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):L("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:L("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:K=>{(K.key==="Tab"&&!K.shiftKey||K.key===" ")&&!(X??"").trim()&&(Y??"").trim()&&(K.preventDefault(),Z?.(Y??""))}})})]})]}),!$&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!G&&x&&n.jsx(ve,{htmlType:"button",size:40,type:"bar",label:L("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!G&&B&&n.jsx(ve,{htmlType:"button",size:40,type:"bar",label:U,onClick:B}),!G&&n.jsx(ve,{htmlType:"button",size:40,type:"bar",label:L("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:xn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[Q&&n.jsx(ve,{htmlType:"button",size:"56",type:"bar",label:L("common.cancel","\uCDE8\uC18C"),onClick:Q}),!G&&n.jsx(ve,{htmlType:"button",size:"56",type:"bar",label:L("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Pt}),v&&n.jsx(ve,{htmlType:"button",size:"56",type:"bar",label:v,onClick:()=>se?Xe():Ke(!0),disabled:mt,onDisabledClick:()=>{Ze(L("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(ve,{htmlType:"button",size:"56",type:"bar",variant:"main",label:N??L("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>Ke(!1),disabled:_e,onDisabledClick:j})]})]}),n.jsx(ba,{message:Le,type:je,onClose:Ue})]})}const ww=8;function bd({items:e,className:t}){const{t:a}=Be.useTranslation(),r=e.length,s=r<=3?1:2,l=ww,i=r>l,u=e.slice(0,i?l-1:l),c=r-u.length,d=Math.ceil(Math.min(r,l)/s)||1,h=s*d;return n.jsx("div",{className:ke("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:h},(p,m)=>{if(i&&m===l-1)return n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--more",children:n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:c,defaultValue:"+{{count}}"})})},m);const g=u[m];return g?n.jsx("div",{className:"word-table-thumb__cell",children:(g.words?.length?g.words:[{label:g.id}]).map((y,C)=>n.jsxs(o.Fragment,{children:[C>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:y.label})]},C))},m):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},m)})})}function Bw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:f,onMore:x,titleNode:b,className:B}){const{t:_}=Be.useTranslation(),N=b!=null,v=h!=null||p!=null||m!=null||g!=null,k=w=>{w.target===w.currentTarget&&!N&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),f?.())};return n.jsxs("div",{className:ke("word-table-button",C?"word-table-button--selected":"",v?"":"word-table-button--no-footer",B),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:f,onKeyDown:k,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(bd,{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:[b??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&&!N&&n.jsx(ve,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:w=>{w.stopPropagation(),x(w)}})]}),(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?ql(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(jt,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(jt,{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:w=>{w.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:ql(p,_)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":_("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
|
|
1041
1041
|
* @license lucide-react v1.38.0 - ISC
|
|
1042
1042
|
*
|
|
1043
1043
|
* This source code is licensed under the ISC license.
|
|
1044
1044
|
* See the LICENSE file in the root directory of this source tree.
|
|
1045
|
-
*/const
|
|
1045
|
+
*/const kw=[["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"}]],Aw=oe("image",kw);/**
|
|
1046
1046
|
* @license lucide-react v1.38.0 - ISC
|
|
1047
1047
|
*
|
|
1048
1048
|
* This source code is licensed under the ISC license.
|
|
1049
1049
|
* See the LICENSE file in the root directory of this source tree.
|
|
1050
|
-
*/const Bw=[["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"}]],kw=oe("circle-x",Bw);function Aw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ms({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=Be.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=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(Gs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(kw,{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(Lt,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(Lt,{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:d}%`:void 0}})})]})]})}function Nw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=Be.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=Aw(u),C=u==="done",f=!!c;function x(B){return f&&y===B?"error":y>B?"done":y===B?"active":"pending"}const b=x(1),k=x(2),_=x(3),N=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,v=o.useMemo(()=>{if(k!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:po(p),total:po(m)})}},[k,u,h,m,p,i]);return n.jsx(Hn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(ge,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(ge,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(ge,{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(Ms,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:b,subText:b==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ms,{icon:n.jsx(ww,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:k,pct:N,subText:v}),n.jsx(Ms,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?g??0:void 0,subText:void 0})]})})}function Ew({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=Be.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="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}]}:g==="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}]}:g==="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}]}:g==="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(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=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:d,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:p,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=Zy,exports.ActionCard=iy,exports.Alert=O2,exports.AppHeader=n2,exports.AudioMeter=Go,exports.AudioPlayer=ys,exports.Avatar=G2,exports.Badge=Lt,exports.BarChart=Ov,exports.BarChartControls=Tu,exports.Board=dv,exports.BottomNav=Ki,exports.BrandIdentity=Qi,exports.BrandLogo=Mv,exports.Breadcrumb=Z2,exports.BulkBar=wv,exports.Button=ge,exports.CORE_VERSION=Jg,exports.Calendar=u4,exports.CardStep=sd,exports.ChartLegend=Fo,exports.ChartSection=Oo,exports.ChartTotal=Ja,exports.Checkbox=ku,exports.ChoiceChips=b_,exports.CircleBadge=R2,exports.CodeBox=xv,exports.ColorPicker=tv,exports.CompanyMeta=bv,exports.ConfirmPopup=hd,exports.ConfirmStep=ad,exports.ConfirmWithTextStep=rd,exports.ContrastFilterPanel=Kx,exports.CoreScope=uy,exports.CountTile=lv,exports.CouponInputPopup=Xx,exports.DEFAULT_NOISE_SETTINGS=ta,exports.DatePicker=jv,exports.DebugResultLauncher=Ew,exports.DescriptionTooltip=Yn,exports.DeviceSideTable=s4,exports.Dialog=cv,exports.Divider=P2,exports.Dropdown=yn,exports.EffectPartyPopper=Ss,exports.EffectPartyPopperHost=ew,exports.EmptyState=sy,exports.ErrorState=ly,exports.FILTER_ALL_VALUE=wn,exports.FileUpload=Y2,exports.FilterPanel=$n,exports.FilterSectionInfo=qa,exports.Footer=g_,exports.GameIntro=Hv,exports.Header=eu,exports.Icon=tt,exports.IconGridMenu=f_,exports.IconRenderer=tt,exports.InfoTooltip=Sn,exports.ItemActions=kv,exports.LEVEL_MAX=xa,exports.LINE_CHART_HOVER_DELAY_MS=Mu,exports.LandingBottomSticky=v_,exports.LandingHeader=y_,exports.LineChart=Wv,exports.ListPopup=Yx,exports.ListenStep=nd,exports.Loader=da,exports.MARKS=_r,exports.MARK_ICON=Qu,exports.MARK_VARIANT=ec,exports.MediaQueryOverrideContext=ai,exports.MenuTooltip=Wa,exports.NOISE_RATIO_MAX=er,exports.NOISE_RATIO_STEP=Nc,exports.NoisePlayerContext=Cs,exports.NoiseSettingsTooltip=Kc,exports.NoticeBox=dy,exports.NotifyTextPreview=Tv,exports.OrderListStep=od,exports.PASS_CARD_BG_VARS=Xn,exports.POS_LABEL=ac,exports.PROMO_BANNER_BG_COMPONENTS=Ri,exports.PROMO_BANNER_BG_OPTIONS=_y,exports.PROMO_BANNER_BG_VARS=Ia,exports.Page=Sr,exports.PageTitle=tw,exports.Pagination=Po,exports.Panel=Er,exports.PanelGrid=ix,exports.PanelRow=Rn,exports.PanelRowDevice=lx,exports.PassCard=cu,exports.PassCardBg=T2,exports.PassCardBgIHAB=M2,exports.PassCardBgLeftColorGrid=L2,exports.PassCardBgTwoCircle=ou,exports.PaymentPlan=j2,exports.PersonCard=pv,exports.PhonemeFilterPanel=Gx,exports.PhonemeSelectBlock=qx,exports.Popup=Hn,exports.ProgressBar=Zv,exports.ProgressIndicator=Wu,exports.PromoBanner=Gy,exports.PromoBannerBgDark=_i,exports.PromoBannerBgDeep=Ci,exports.PromoBannerBgDiagonal=ki,exports.PromoBannerBgDots=Ni,exports.PromoBannerBgInstagram=$i,exports.PromoBannerBgMain=ui,exports.PromoBannerBgNaver=Mi,exports.PromoBannerBgOutline=Di,exports.PromoBannerBgRadial=wi,exports.PromoBannerBgSoft=di,exports.PromoBannerBgSoftSub=bi,exports.PromoBannerBgSub=hi,exports.PromoBannerBgSuccess=ji,exports.PromoBannerBgWarm=yi,exports.PublicationCard=mv,exports.Radio=mu,exports.RadioGroup=I2,exports.Rating=J2,exports.ReportDocument=lw,exports.ReportInfoPanel=iw,exports.RingChart=qv,exports.SENTENCE_TRAINING_TYPES=ds,exports.SearchSummary=H2,exports.Section=ya,exports.SectionHeadFloat=Eu,exports.SectionHeader=fv,exports.SegmentedControl=An,exports.ShortcutBadge=hu,exports.SideNav=Ji,exports.Slider=Iu,exports.SoundCompass=$2,exports.SplashLogo=Cv,exports.StatChart=Uv,exports.SummaryStrip=ow,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=fu,exports.Table=Yo,exports.TableFilterPanel=ss,exports.Tabs=V2,exports.TextBoxTooltip=Nr,exports.TextField=Jn,exports.Timeline=hv,exports.Toast=ba,exports.Toggle=Bu,exports.Toolbar=Io,exports.Tooltip=xn,exports.TooltipInfo=Sn,exports.TooltipTextBox=Nr,exports.TopBanner=Ky,exports.TrainingBlock=d4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=h4,exports.TrainingCard=hw,exports.TrainingCardGroup=mw,exports.TrainingPagePopup=Vn,exports.TrainingPagePopupBottom=Yc,exports.TrainingPagePopupTitle=Zc,exports.TrainingResultPopup=cd,exports.TrainingStep=na,exports.TrainingStepAudioPlayer=ys,exports.TrainingStepBullet=Oc,exports.TrainingStepCard=Vc,exports.TrainingStepConfirm=_s,exports.TrainingStepConfirmWithText=xs,exports.TrainingStepListen=ws,exports.TrainingStepOrderList=Bs,exports.TrainingStepTextBox=Hc,exports.TrainingStepTitle=Wc,exports.TrainingTooltip=bu,exports.TrainingWordCard=Qo,exports.UpdateAlert=pw,exports.WAVE_A_MAX=L_,exports.WAVE_H1_PX=bs,exports.WAVE_HMAX_PX=M_,exports.WORD_LABEL_I18N_KEYS=B4,exports.WORD_TABLE_PAPER=Qn,exports.WORD_TYPE_LABEL=rc,exports.WordDataProvider=rw,exports.WordDataUpdatePopup=Nw,exports.WordImageTooltip=pd,exports.WordSearchFilterPanel=Ux,exports.WordSearchResultBlock=Hx,exports.WordTable=va,exports.WordTableBlock=yw,exports.WordTableButton=_w,exports.WordTablePopup=W4,exports.WordTableThumbnail=bd,exports.buildMonthChartData=$v,exports.cellKey=Z4,exports.cellLabel=Y4,exports.cellsForLabels=i_,exports.clearPassCardBgTheme=Mn,exports.clearPromoBannerBgTheme=en,exports.closeTrainingPopup=hx,exports.companyTypeLabel=nw,exports.createTrainingScenario=fx,exports.cx=Ne,exports.deriveNoiseContexts=xx,exports.derivePassCard=nu,exports.draftValues=m_,exports.effectiveNoiseVolume=hs,exports.effectiveSpeechVolume=Dc,exports.expandSlashLabel=as,exports.formatDuration=u_,exports.getControlDateRange=Vv,exports.getPayloadTimestamp=As,exports.getPromoBannerBgTheme=xo,exports.getSelectedFromPayload=gx,exports.getSelectedText=yx,exports.getStepPayload=ed,exports.getSteppedPayload=vx,exports.injectPassCardBgTheme=Tn,exports.injectPromoBannerBgTheme=Qt,exports.isSelectionCorrect=_x,exports.labelOfCellKey=kc,exports.labelsForSave=K4,exports.levelToPct=x_,exports.markAfterClick=Ju,exports.marksForSave=es,exports.mergeNoiseSettings=ea,exports.missesByType=r_,exports.monthKeyOf=Qa,exports.monthKeyOfDate=zo,exports.nextFocus=e_,exports.nextMisses=a_,exports.noiseElementVolume=ms,exports.noiseRatioOf=tr,exports.pageStartIndexes=tc,exports.parseMonthKey=fa,exports.passCardBgIhabTheme=du,exports.passCardBgLeftColorGridTheme=pu,exports.passCardBgTwoCircleTheme=ru,exports.pctToLevel=w_,exports.posLabels=oc,exports.printWordTable=y4,exports.promoBannerBgDarkTheme=vi,exports.promoBannerBgDeepTheme=mi,exports.promoBannerBgDiagonalTheme=Bi,exports.promoBannerBgDotsTheme=Ai,exports.promoBannerBgInstagramTheme=Li,exports.promoBannerBgMainTheme=ii,exports.promoBannerBgNaverTheme=Ti,exports.promoBannerBgOutlineTheme=Ei,exports.promoBannerBgRadialTheme=xi,exports.promoBannerBgSoftSubTheme=fi,exports.promoBannerBgSoftTheme=ci,exports.promoBannerBgSubTheme=pi,exports.promoBannerBgSuccessTheme=Si,exports.promoBannerBgWarmTheme=gi,exports.recommendTables=s_,exports.regenerateUnpinned=h_,exports.removeItem=p_,exports.resolveTrainingItems=Cx,exports.resolveTrainingPopupMeta=Jc,exports.reviewCells=V4,exports.reviewMeta=G4,exports.reviewSetPlan=o_,exports.reviewTableName=U4,exports.scoreKey=vr,exports.scoreSheetHeader=X4,exports.shouldConfirmDiscard=g4,exports.splitTrainingVariants=mx,exports.summarize=b4,exports.summarizeMisses=n_,exports.tableTrends=Q4,exports.toDraft=c_,exports.toTrainingText=bx,exports.togglePin=d_,exports.uncoveredLabels=l_,exports.useAnchoredMenu=za,exports.useBarChartControl=ju,exports.useCalendarMonth=Au,exports.useComboboxSuggestions=xu,exports.useDiscardGuard=Zx,exports.useFitScale=uc,exports.useNoisePlayer=wr,exports.useSoundCompassExam=Fy,exports.useToastLifecycle=Ou,exports.useWordData=aw,exports.useWordTableDisplaySettings=wc,exports.useWordTablePrint=cs,exports.waveBarPx=kr,exports.waveBarVal=Ar,exports.weakItems=J4,exports.weekValueOf=Wo,exports.withStepTimes=Qc,exports.wordTypeLabels=sc;
|
|
1050
|
+
*/const Nw=[["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"}]],Ew=oe("circle-x",Nw);function Dw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ms({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=Be.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=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(Gs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Ew,{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(jt,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(jt,{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:d}%`:void 0}})})]})]})}function Sw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=Be.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=Dw(u),C=u==="done",f=!!c;function x(k){return f&&y===k?"error":y>k?"done":y===k?"active":"pending"}const b=x(1),B=x(2),_=x(3),N=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,v=o.useMemo(()=>{if(B!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:po(p),total:po(m)})}},[B,u,h,m,p,i]);return n.jsx(Hn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(ve,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(ve,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(ve,{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(Ms,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:b,subText:b==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ms,{icon:n.jsx(Aw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:B,pct:N,subText:v}),n.jsx(Ms,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?g??0:void 0,subText:void 0})]})})}function jw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=Be.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="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}]}:g==="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}]}:g==="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}]}:g==="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(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=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:d,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:p,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=Zy,exports.ActionCard=iy,exports.Alert=O2,exports.AppHeader=n2,exports.AudioMeter=Go,exports.AudioPlayer=ys,exports.Avatar=G2,exports.Badge=jt,exports.BarChart=Ov,exports.BarChartControls=Tu,exports.Board=dv,exports.BottomNav=Ki,exports.BrandIdentity=Qi,exports.BrandLogo=Mv,exports.Breadcrumb=Z2,exports.BulkBar=wv,exports.Button=ve,exports.CORE_VERSION=Jg,exports.Calendar=p4,exports.CardStep=sd,exports.ChartLegend=Fo,exports.ChartSection=Oo,exports.ChartTotal=Ja,exports.Checkbox=ku,exports.ChoiceChips=v_,exports.CircleBadge=R2,exports.CodeBox=xv,exports.ColorPicker=tv,exports.CompanyMeta=bv,exports.ConfirmPopup=hd,exports.ConfirmStep=ad,exports.ConfirmWithTextStep=rd,exports.ContrastFilterPanel=Xx,exports.CoreScope=uy,exports.CountTile=lv,exports.CouponInputPopup=ew,exports.DEFAULT_NOISE_SETTINGS=ta,exports.DatePicker=jv,exports.DebugResultLauncher=jw,exports.DescriptionTooltip=Yn,exports.DeviceSideTable=u4,exports.Dialog=cv,exports.Divider=P2,exports.Dropdown=bn,exports.EffectPartyPopper=Ss,exports.EffectPartyPopperHost=aw,exports.EmptyState=sy,exports.ErrorState=ly,exports.FILTER_ALL_VALUE=_n,exports.FileUpload=Y2,exports.FilterPanel=Ln,exports.FilterSectionInfo=qa,exports.Footer=__,exports.GameIntro=Hv,exports.Header=eu,exports.Icon=tt,exports.IconGridMenu=y_,exports.IconRenderer=tt,exports.InfoTooltip=Dn,exports.ItemActions=kv,exports.LEVEL_MAX=xa,exports.LINE_CHART_HOVER_DELAY_MS=Mu,exports.LandingBottomSticky=w_,exports.LandingHeader=x_,exports.LineChart=Wv,exports.ListPopup=Jx,exports.ListenStep=nd,exports.Loader=da,exports.MARKS=_r,exports.MARK_ICON=Qu,exports.MARK_VARIANT=ec,exports.MediaQueryOverrideContext=ai,exports.MenuTooltip=Wa,exports.NOISE_RATIO_MAX=er,exports.NOISE_RATIO_STEP=Nc,exports.NoisePlayerContext=Cs,exports.NoiseSettingsTooltip=Kc,exports.NoticeBox=dy,exports.NotifyTextPreview=Tv,exports.OrderListStep=od,exports.PASS_CARD_BG_VARS=Xn,exports.POS_LABEL=ac,exports.PROMO_BANNER_BG_COMPONENTS=Ri,exports.PROMO_BANNER_BG_OPTIONS=_y,exports.PROMO_BANNER_BG_VARS=Ia,exports.Page=Sr,exports.PageTitle=rw,exports.Pagination=Po,exports.Panel=Er,exports.PanelGrid=dx,exports.PanelRow=$n,exports.PanelRowDevice=cx,exports.PassCard=cu,exports.PassCardBg=T2,exports.PassCardBgIHAB=M2,exports.PassCardBgLeftColorGrid=L2,exports.PassCardBgTwoCircle=ou,exports.PaymentPlan=j2,exports.PersonCard=pv,exports.PhonemeFilterPanel=Zx,exports.PhonemeSelectBlock=Kx,exports.Popup=Hn,exports.ProgressBar=Zv,exports.ProgressIndicator=Wu,exports.PromoBanner=Gy,exports.PromoBannerBgDark=_i,exports.PromoBannerBgDeep=Ci,exports.PromoBannerBgDiagonal=ki,exports.PromoBannerBgDots=Ni,exports.PromoBannerBgInstagram=$i,exports.PromoBannerBgMain=ui,exports.PromoBannerBgNaver=Mi,exports.PromoBannerBgOutline=Di,exports.PromoBannerBgRadial=wi,exports.PromoBannerBgSoft=di,exports.PromoBannerBgSoftSub=bi,exports.PromoBannerBgSub=hi,exports.PromoBannerBgSuccess=ji,exports.PromoBannerBgWarm=yi,exports.PublicationCard=mv,exports.Radio=mu,exports.RadioGroup=I2,exports.Rating=J2,exports.ReportDocument=cw,exports.ReportInfoPanel=dw,exports.RingChart=qv,exports.SENTENCE_TRAINING_TYPES=ds,exports.SearchSummary=H2,exports.Section=ya,exports.SectionHeadFloat=Eu,exports.SectionHeader=fv,exports.SegmentedControl=kn,exports.ShortcutBadge=hu,exports.SideNav=Ji,exports.Slider=Iu,exports.SoundCompass=$2,exports.SplashLogo=Cv,exports.StatChart=Uv,exports.SummaryStrip=iw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=fu,exports.Table=Yo,exports.TableFilterPanel=ss,exports.Tabs=V2,exports.TextBoxTooltip=Nr,exports.TextField=Jn,exports.Timeline=hv,exports.Toast=ba,exports.Toggle=Bu,exports.Toolbar=Io,exports.Tooltip=vn,exports.TooltipInfo=Dn,exports.TooltipTextBox=Nr,exports.TopBanner=Ky,exports.TrainingBlock=m4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=f4,exports.TrainingCard=fw,exports.TrainingCardGroup=bw,exports.TrainingPagePopup=Vn,exports.TrainingPagePopupBottom=Yc,exports.TrainingPagePopupTitle=Zc,exports.TrainingResultPopup=cd,exports.TrainingStep=na,exports.TrainingStepAudioPlayer=ys,exports.TrainingStepBullet=Oc,exports.TrainingStepCard=Vc,exports.TrainingStepConfirm=_s,exports.TrainingStepConfirmWithText=xs,exports.TrainingStepListen=ws,exports.TrainingStepOrderList=Bs,exports.TrainingStepTextBox=Hc,exports.TrainingStepTitle=Wc,exports.TrainingTooltip=bu,exports.TrainingWordCard=Qo,exports.UpdateAlert=Cw,exports.WAVE_A_MAX=P_,exports.WAVE_H1_PX=bs,exports.WAVE_HMAX_PX=R_,exports.WORD_LABEL_I18N_KEYS=N4,exports.WORD_TABLE_PAPER=Qn,exports.WORD_TYPE_LABEL=rc,exports.WordDataProvider=lw,exports.WordDataUpdatePopup=Sw,exports.WordImageTooltip=pd,exports.WordSearchFilterPanel=Yx,exports.WordSearchResultBlock=Ux,exports.WordTable=va,exports.WordTableBlock=xw,exports.WordTableButton=Bw,exports.WordTablePopup=q4,exports.WordTableThumbnail=bd,exports.buildMonthChartData=$v,exports.cellKey=Q4,exports.cellLabel=J4,exports.cellsForLabels=d_,exports.clearPassCardBgTheme=Tn,exports.clearPromoBannerBgTheme=Xt,exports.closeTrainingPopup=fx,exports.companyTypeLabel=ow,exports.createTrainingScenario=yx,exports.cx=ke,exports.deriveNoiseContexts=kx,exports.derivePassCard=nu,exports.draftValues=b_,exports.effectiveNoiseVolume=hs,exports.effectiveSpeechVolume=Dc,exports.expandSlashLabel=as,exports.formatDuration=p_,exports.getControlDateRange=Vv,exports.getPayloadTimestamp=As,exports.getPromoBannerBgTheme=xo,exports.getSelectedFromPayload=_x,exports.getSelectedText=xx,exports.getStepPayload=ed,exports.getSteppedPayload=wx,exports.injectPassCardBgTheme=jn,exports.injectPromoBannerBgTheme=Zt,exports.isSelectionCorrect=Bx,exports.labelOfCellKey=kc,exports.labelsForSave=X4,exports.levelToPct=k_,exports.markAfterClick=Ju,exports.marksForSave=es,exports.mergeNoiseSettings=ea,exports.missesByType=l_,exports.monthKeyOf=Qa,exports.monthKeyOfDate=zo,exports.nextFocus=a_,exports.nextMisses=s_,exports.noiseElementVolume=ms,exports.noiseRatioOf=tr,exports.pageStartIndexes=tc,exports.parseMonthKey=fa,exports.passCardBgIhabTheme=du,exports.passCardBgLeftColorGridTheme=pu,exports.passCardBgTwoCircleTheme=ru,exports.pctToLevel=A_,exports.posLabels=oc,exports.printWordTable=x4,exports.promoBannerBgDarkTheme=vi,exports.promoBannerBgDeepTheme=mi,exports.promoBannerBgDiagonalTheme=Bi,exports.promoBannerBgDotsTheme=Ai,exports.promoBannerBgInstagramTheme=Li,exports.promoBannerBgMainTheme=ii,exports.promoBannerBgNaverTheme=Ti,exports.promoBannerBgOutlineTheme=Ei,exports.promoBannerBgRadialTheme=xi,exports.promoBannerBgSoftSubTheme=fi,exports.promoBannerBgSoftTheme=ci,exports.promoBannerBgSubTheme=pi,exports.promoBannerBgSuccessTheme=Si,exports.promoBannerBgWarmTheme=gi,exports.recommendTables=u_,exports.regenerateUnpinned=f_,exports.removeItem=C_,exports.resolveTrainingItems=gx,exports.resolveTrainingPopupMeta=Jc,exports.reviewCells=G4,exports.reviewMeta=Z4,exports.reviewSetPlan=i_,exports.reviewTableName=Y4,exports.scoreKey=vr,exports.scoreSheetHeader=e_,exports.shouldConfirmDiscard=_4,exports.splitTrainingVariants=bx,exports.summarize=v4,exports.summarizeMisses=o_,exports.tableTrends=n_,exports.toDraft=h_,exports.toTrainingText=vx,exports.togglePin=m_,exports.uncoveredLabels=c_,exports.useAnchoredMenu=za,exports.useBarChartControl=ju,exports.useCalendarMonth=Au,exports.useComboboxSuggestions=xu,exports.useDiscardGuard=Qx,exports.useFitScale=uc,exports.useNoisePlayer=wr,exports.useSoundCompassExam=Fy,exports.useToastLifecycle=Ou,exports.useWordData=sw,exports.useWordTableDisplaySettings=wc,exports.useWordTablePrint=cs,exports.waveBarPx=kr,exports.waveBarVal=Ar,exports.weakItems=t_,exports.weekValueOf=Wo,exports.withStepTimes=Qc,exports.wordTypeLabels=sc;
|