@ihabdevteam/core 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hooks.esm.js
CHANGED
|
@@ -780,4 +780,4 @@ import{useState as B,useEffect as X,createContext as Gn,useContext as Yn,useRef
|
|
|
780
780
|
* See the LICENSE file in the root directory of this source tree.
|
|
781
781
|
*/const b0=[["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"}]],k0=C("thumbs-up",b0),kr={"alert-triangle":_r,"align-start-vertical":ei,anchor:L1,"arrow-down":ni,"arrow-left":ri,"arrow-right":ai,"arrow-right-left":li,"arrow-up-a-z":I1,"audio-lines":si,baby:hi,ban:fi,"bar-chart-2":P1,bell:yi,"book-marked":gi,"book-open":Ei,"bow-arrow":ki,braces:wi,bug:Ni,calendar:F1,"calendar-check":Ti,"calendar-days":Di,camera:vi,car:z1,"chart-column":Li,"chart-line":Ii,"chart-pie":Pi,check:Fi,"chevron-down":s0,"chevron-left":zi,"chevron-right":Ui,"chevron-up":h0,circle:f0,"clipboard-list":Yi,coffee:U1,combine:Wi,copy:Xi,"credit-card":Ji,database:el,diff:nl,download:rl,ear:al,edit:ll,"edit-2":sl,"edit-3":hl,ellipsis:Er,eraser:Cl,"external-link":ml,eye:_l,"file-text":bl,"flip-horizontal":Al,"folder-open":Sl,"folder-plus":Ml,gamepad:Bl,"gamepad-2":Y1,gavel:xl,"git-merge":Ol,globe:Rl,headphones:jl,heart:$l,home:Hl,inbox:W1,info:Vl,"key-round":Gl,landmark:ql,layers:Kl,"layout-dashboard":Zl,leaf:Ql,lightbulb:tc,link:oc,"link-2":uc,"link-2-off":ic,list:cc,"list-checks":dc,"list-ordered":pc,"list-tree":X1,loader:Cc,"log-out":mc,mail:_c,"map-pin":bc,menu:g0,"message-circle":Ac,"message-circle-question-mark":Sc,"message-square":Mc,"message-square-more":J1,"message-square-text":Bc,minus:e0,"minus-circle":xc,moon:E0,"more-horizontal":Er,package:Oc,palette:Rc,"party-popper":jc,pause:$c,pencil:Hc,phone:Vc,play:Gc,"play-circle":qc,plus:Kc,printer:Zc,"refresh-cw":Qc,repeat:ts,replace:os,rocket:us,"rotate-ccw":is,"rotate-cw":cs,salad:ds,"scan-search":ps,search:gs,"circle-alert":br,"alert-circle":br,"check-circle":ys,scissors:Es,"search-x":ks,send:ws,settings:Ns,"share-2":n0,"shield-check":Ts,"shopping-cart":Ds,shuffle:vs,"skip-back":Ls,"skip-forward":Is,sparkles:r0,square:Ps,star:Fs,store:zs,"sun-medium":Us,table:Ys,"table-2":Ws,terminal:Xs,"text-cursor-input":Js,"text-initial":e1,"thumbs-up":k0,ticket:n1,triangle:y0,"trash-2":r1,"trending-up":a1,"triangle-alert":_r,trophy:l1,type:a0,unlink:s1,upload:h1,user:f1,"user-plus":y1,"user-round":g1,"user-round-check":E1,users:k1,"users-round":w1,volume:l0,"volume-2":N1,wrench:T1,x:D1,zap:v1};function A0(e){return kr[e]??null}const Ar=new Set,w0=(()=>{try{if(import.meta.env?.DEV)return!0}catch{}try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function S0(e){return w0&&!(e in kr)&&!Ar.has(e)&&(Ar.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 N0=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 M0(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/"))return null;const n=(e.split("/").pop()||"").replace(/\.svg$/,"");return n?N0(n):null}const wr=new Map;function T0(e){const t=typeof e=="string"?M0(e):null,n=t?A0(t)??wr.get(t)??null:null,[o,r]=B(null);return X(()=>{if(!t||n)return;let u=!1;return S0(t).then(i=>{wr.set(t,i),u||r(i)}),()=>{u=!0}},[t,n]),n??o}/*! @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 Sr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function B0(e){if(Array.isArray(e))return e}function D0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,u,i,l=[],c=!0,f=!1;try{if(u=(n=n.call(e)).next,t!==0)for(;!(c=(o=u.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(h){f=!0,r=h}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(f)throw r}}return l}}function x0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
782
782
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v0(e,t){return B0(e)||D0(e,t)||O0(e,t)||x0()}function O0(e,t){if(e){if(typeof e=="string")return Sr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sr(e,t):void 0}}const Nr=Object.entries,Mr=Object.setPrototypeOf,L0=Object.isFrozen,R0=Object.getPrototypeOf,I0=Object.getOwnPropertyDescriptor;let ye=Object.freeze,Ee=Object.seal,jt=Object.create,Tr=typeof Reflect<"u"&&Reflect,no=Tr.apply,oo=Tr.construct;ye||(ye=function(t){return t}),Ee||(Ee=function(t){return t}),no||(no=function(t,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),u=2;u<o;u++)r[u-2]=arguments[u];return t.apply(n,r)}),oo||(oo=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return new t(...o)});const Nt=pe(Array.prototype.forEach),j0=pe(Array.prototype.lastIndexOf),Br=pe(Array.prototype.pop),en=pe(Array.prototype.push),P0=pe(Array.prototype.splice),Pt=Array.isArray,tn=pe(String.prototype.toLowerCase),ro=pe(String.prototype.toString),Dr=pe(String.prototype.match),nn=pe(String.prototype.replace),xr=pe(String.prototype.indexOf),$0=pe(String.prototype.trim),F0=pe(Number.prototype.toString),H0=pe(Boolean.prototype.toString),vr=typeof BigInt>"u"?null:pe(BigInt.prototype.toString),Or=typeof Symbol>"u"?null:pe(Symbol.prototype.toString),Le=pe(Object.prototype.hasOwnProperty),on=pe(Object.prototype.toString),Me=pe(RegExp.prototype.test),Mt=z0(TypeError);function pe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return no(e,t,o)}}function z0(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return oo(e,n)}}function J(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tn;if(Mr&&Mr(e,null),!Pt(t))return e;let o=t.length;for(;o--;){let r=t[o];if(typeof r=="string"){const u=n(r);u!==r&&(L0(t)||(t[o]=u),r=u)}e[r]=!0}return e}function V0(e){for(let t=0;t<e.length;t++)Le(e,t)||(e[t]=null);return e}function $e(e){const t=jt(null);for(const o of Nr(e)){var n=v0(o,2);const r=n[0],u=n[1];Le(e,r)&&(Pt(u)?t[r]=V0(u):u&&typeof u=="object"&&u.constructor===Object?t[r]=$e(u):t[r]=u)}return t}function U0(e){switch(typeof e){case"string":return e;case"number":return F0(e);case"boolean":return H0(e);case"bigint":return vr?vr(e):"0";case"symbol":return Or?Or(e):"Symbol()";case"undefined":return on(e);case"function":case"object":{if(e===null)return on(e);const t=e,n=We(t,"toString");if(typeof n=="function"){const o=n(t);return typeof o=="string"?o:on(o)}return on(e)}default:return on(e)}}function We(e,t){for(;e!==null;){const o=I0(e,t);if(o){if(o.get)return pe(o.get);if(typeof o.value=="function")return pe(o.value)}e=R0(e)}function n(){return null}return n}function G0(e){try{return Me(e,""),!0}catch{return!1}}const Lr=ye(["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"]),uo=ye(["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"]),ao=ye(["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"]),Y0=ye(["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"]),io=ye(["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"]),q0=ye(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rr=ye(["#text"]),Ir=ye(["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"]),lo=ye(["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"]),jr=ye(["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"]),Bn=ye(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W0=Ee(/{{[\w\W]*|^[\w\W]*}}/g),K0=Ee(/<%[\w\W]*|^[\w\W]*%>/g),X0=Ee(/\${[\w\W]*/g),Z0=Ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),J0=Ee(/^aria-[\-\w]+$/),Pr=Ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q0=Ee(/^(?:\w+script|data):/i),ed=Ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),td=Ee(/^html$/i),nd=Ee(/^[a-z][.\w]*(-[.\w]+)+$/i),$r=Ee(/<[/\w!]/g),Fr=Ee(/<[/\w]/g),od=Ee(/<\/no(script|embed|frames)/i),rd=Ee(/\/>/i),Fe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hr=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],ud=ye(J({},Hr)),ad=(function(){const e={};return Nt(Hr,t=>{e[t]=Ee(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),ye(e)})(),id=function(){return typeof window>"u"?null:window},ld=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const u="dompurify"+(o?"#"+o:"");try{return t.createPolicy(u,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},zr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},gt=function(t,n,o,r){return Le(t,n)&&Pt(t[n])?J(r.base?$e(r.base):{},t[n],r.transform):o},co=function(t,n,o){const r=Le(t,n)?t[n]:void 0;return r&&typeof r=="object"?$e(r):o()};function Vr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:id();const t=N=>Vr(N);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Fe.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const o=n,r=o.currentScript;e.DocumentFragment;const u=e.HTMLTemplateElement,i=e.Node,l=e.Element,c=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,s=l.prototype,y=We(s,"cloneNode"),b=We(s,"remove"),w=We(s,"nextSibling"),g=We(s,"childNodes"),m=We(s,"parentNode"),E=We(s,"shadowRoot"),k=We(s,"attributes"),x=i&&i.prototype?We(i.prototype,"nodeType"):null,R=i&&i.prototype?We(i.prototype,"nodeName"):null,v=i&&i.prototype?We(i.prototype,"ownerDocument"):null,j=function(a){return x?x(a):a.nodeType},H=function(a){return R?R(a):a.nodeName};if(typeof u=="function"){const N=n.createElement("template");N.content&&N.content.ownerDocument&&(n=N.content.ownerDocument)}let U,F="",Q,G=!1,W=0;const z=function(){if(W>0)throw Mt('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.')},D=function(a){z(),W++;try{return U.createHTML(a)}finally{W--}},O=function(a){z(),W++;try{return U.createScriptURL(a)}finally{W--}},me=function(){return G||(Q=ld(p,r),G=!0),Q},Z=n,ee=Z.implementation,S=Z.createNodeIterator,P=Z.createDocumentFragment,re=Z.getElementsByTagName,ue=o.importNode;let Y=zr();t.isSupported=typeof Nr=="function"&&typeof m=="function"&&ee&&ee.createHTMLDocument!==void 0;const Ae=W0,M=K0,fe=X0,Ce=Z0,He=J0,ft=Q0,Ke=ed,rt=nd;let Ue=Pr,te=null;const ut=J({},[...Lr,...uo,...ao,...io,...Rr]);let ae=null;const A=J({},[...Ir,...lo,...jr,...Bn]);let L=Object.seal(jt(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}})),$=null,K=null;const ne=Object.seal(jt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Te=!0,Xe=!1,Ge=!0,ge=!1,ze=!0,Re=!1,Ct=!1,Ze=null,at=null,it=!1,lt=!1,Tt=!1,Et=!1,Ft=!0,_e=!1;const Bt="user-content-";let Dt=!0,ct=!1,yt={},Je=null;const ie=J({},["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 Qe=null;const Ht=J({},["audio","video","img","source","image","track"]);let xt=null;const ko=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pn="http://www.w3.org/1998/Math/MathML",fn="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let vt=et,jn=!1,Pn=null;const su=J({},[pn,fn,et],ro),Ao=ye(["mi","mo","mn","ms","mtext"]);let $n=J({},Ao);const wo=ye(["annotation-xml"]);let Fn=J({},wo);const du=J({},["title","style","font","a","script"]);let zt=null;const hu=["application/xhtml+xml","text/html"],pu="text/html";let he=null,Ot=null;const fu=n.createElement("form"),So=function(a){return a instanceof RegExp||a instanceof Function},Hn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ot&&Ot===a)return;(!a||typeof a!="object")&&(a={}),a=$e(a),zt=hu.indexOf(a.PARSER_MEDIA_TYPE)===-1?pu:a.PARSER_MEDIA_TYPE,he=zt==="application/xhtml+xml"?ro:tn,te=gt(a,"ALLOWED_TAGS",ut,{transform:he}),ae=gt(a,"ALLOWED_ATTR",A,{transform:he}),Pn=gt(a,"ALLOWED_NAMESPACES",su,{transform:ro}),xt=gt(a,"ADD_URI_SAFE_ATTR",ko,{transform:he,base:ko}),Qe=gt(a,"ADD_DATA_URI_TAGS",Ht,{transform:he,base:Ht}),Je=gt(a,"FORBID_CONTENTS",ie,{transform:he}),$=gt(a,"FORBID_TAGS",$e({}),{transform:he}),K=gt(a,"FORBID_ATTR",$e({}),{transform:he}),yt=Le(a,"USE_PROFILES")?a.USE_PROFILES&&typeof a.USE_PROFILES=="object"?$e(a.USE_PROFILES):a.USE_PROFILES:!1,De=a.ALLOW_ARIA_ATTR!==!1,Te=a.ALLOW_DATA_ATTR!==!1,Xe=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ge=a.SAFE_FOR_TEMPLATES||!1,ze=a.SAFE_FOR_XML!==!1,Re=a.WHOLE_DOCUMENT||!1,lt=a.RETURN_DOM||!1,Tt=a.RETURN_DOM_FRAGMENT||!1,Et=a.RETURN_TRUSTED_TYPE||!1,it=a.FORCE_BODY||!1,Ft=a.SANITIZE_DOM!==!1,_e=a.SANITIZE_NAMED_PROPS||!1,Dt=a.KEEP_CONTENT!==!1,ct=a.IN_PLACE||!1,Ue=G0(a.ALLOWED_URI_REGEXP)?a.ALLOWED_URI_REGEXP:Pr,vt=typeof a.NAMESPACE=="string"?a.NAMESPACE:et,$n=co(a,"MATHML_TEXT_INTEGRATION_POINTS",()=>J({},Ao)),Fn=co(a,"HTML_INTEGRATION_POINTS",()=>J({},wo));const d=co(a,"CUSTOM_ELEMENT_HANDLING",()=>jt(null));if(L=jt(null),Le(d,"tagNameCheck")&&So(d.tagNameCheck)&&(L.tagNameCheck=d.tagNameCheck),Le(d,"attributeNameCheck")&&So(d.attributeNameCheck)&&(L.attributeNameCheck=d.attributeNameCheck),Le(d,"allowCustomizedBuiltInElements")&&typeof d.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=d.allowCustomizedBuiltInElements),Ee(L),ge&&(Te=!1),Tt&&(lt=!0),yt&&(te=J({},Rr),ae=jt(null),yt.html===!0&&(J(te,Lr),J(ae,Ir)),yt.svg===!0&&(J(te,uo),J(ae,lo),J(ae,Bn)),yt.svgFilters===!0&&(J(te,ao),J(ae,lo),J(ae,Bn)),yt.mathMl===!0&&(J(te,io),J(ae,jr),J(ae,Bn))),ne.tagCheck=null,ne.attributeCheck=null,Le(a,"ADD_TAGS")&&(typeof a.ADD_TAGS=="function"?ne.tagCheck=a.ADD_TAGS:Pt(a.ADD_TAGS)&&(te===ut&&(te=$e(te)),J(te,a.ADD_TAGS,he))),Le(a,"ADD_ATTR")&&(typeof a.ADD_ATTR=="function"?ne.attributeCheck=a.ADD_ATTR:Pt(a.ADD_ATTR)&&(ae===A&&(ae=$e(ae)),J(ae,a.ADD_ATTR,he))),Le(a,"ADD_FORBID_CONTENTS")&&Pt(a.ADD_FORBID_CONTENTS)&&(Je===ie&&(Je=$e(Je)),J(Je,a.ADD_FORBID_CONTENTS,he)),Dt&&(te["#text"]=!0),Re&&J(te,["html","head","body"]),te.table&&(J(te,["tbody"]),delete $.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const _=U;U=a.TRUSTED_TYPES_POLICY;try{F=D("")}catch(T){throw U=_,T}}else a.TRUSTED_TYPES_POLICY===null?(U=void 0,F=""):(U===void 0&&(U=me()),U&&typeof F=="string"&&(F=D("")));ye&&ye(a),Ot=a},No=J({},[...uo,...ao,...Y0]),Mo=J({},[...io,...q0]),Cu=function(a,d,_){return d.namespaceURI===et?a==="svg":d.namespaceURI===pn?a==="svg"&&(_==="annotation-xml"||$n[_]):!!No[a]},yu=function(a,d,_){return d.namespaceURI===et?a==="math":d.namespaceURI===fn?a==="math"&&Fn[_]:!!Mo[a]},mu=function(a,d,_){return d.namespaceURI===fn&&!Fn[_]||d.namespaceURI===pn&&!$n[_]?!1:!Mo[a]&&(du[a]||!No[a])},gu=function(a){let d=m(a);(!d||!d.tagName)&&(d={namespaceURI:vt,tagName:"template"});const _=tn(a.tagName),T=tn(d.tagName);return Pn[a.namespaceURI]?a.namespaceURI===fn?Cu(_,d,T):a.namespaceURI===pn?yu(_,d,T):a.namespaceURI===et?mu(_,d,T):!!(zt==="application/xhtml+xml"&&Pn[a.namespaceURI]):!1},mt=function(a){en(t.removed,{element:a});try{m(a).removeChild(a)}catch{if(b(a),!m(a))throw Mt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},To=function(a,d,_){try{a.removeAttributeNode(d)}catch{try{a.removeAttribute(_)}catch{}}},Cn=function(a){yn(a);const d=g(a);if(d){const T=[];Nt(d,I=>{en(T,I)}),Nt(T,I=>{try{b(I)}catch{}})}const _=k(a);if(_)for(let T=_.length-1;T>=0;--T){const I=_[T],V=I&&I.name;typeof V=="string"&&To(a,I,V)}},bt=function(a,d,_){if(!_)try{_=d.getAttributeNode(a)}catch{_=null}en(t.removed,{attribute:_||null,from:d});try{_?d.removeAttributeNode(_):d.removeAttribute(a)}catch{try{d.removeAttribute(a)}catch{}}if(a==="is")if(lt||Tt)try{mt(d)}catch{}else try{d.setAttribute(a,"")}catch{}},_u=function(a){const d=k(a);if(d)for(let _=d.length-1;_>=0;--_){const T=d[_],I=T&&T.name;typeof I!="string"||ae[he(I)]||To(a,T,I)}},yn=function(a){const d=[a];for(;d.length>0;){const _=d.pop();j(_)===Fe.element&&_u(_);const I=g(_);if(I)for(let V=I.length-1;V>=0;--V)d.push(I[V])}},Bo=function(a,d){return ze?a==="patchsrc"?!0:a==="for"&&d!=="label"&&d!=="output":!1},Eu=function(a){if(!ze)return;const d=[a];for(;d.length>0;){const _=d.pop(),T=j(_);if(T===Fe.processingInstruction||T===Fe.comment&&Me(Fr,_.data)){try{b(_)}catch{}continue}if(T===Fe.element){const V=_,ce=he(H(_));try{V.hasAttribute&&V.hasAttribute("patchsrc")&&V.removeAttribute("patchsrc"),V.hasAttribute&&V.hasAttribute("for")&&Bo("for",ce)&&V.removeAttribute("for")}catch{}}const I=g(_);if(I)for(let V=I.length-1;V>=0;--V)d.push(I[V])}},Do=function(a){let d=null,_=null;if(it)a="<remove></remove>"+a;else{const V=Dr(a,/^[\r\n\t ]+/);_=V&&V[0]}zt==="application/xhtml+xml"&&vt===et&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");const T=U?D(a):a;if(vt===et)try{d=new h().parseFromString(T,zt)}catch{}if(!d||!d.documentElement){d=ee.createDocument(vt,"template",null);try{d.documentElement.innerHTML=jn?F:T}catch{}}const I=d.body||d.documentElement;return a&&_&&I.insertBefore(n.createTextNode(_),I.childNodes[0]||null),vt===et?re.call(d,Re?"html":"body")[0]:Re?d.documentElement:I},xo=function(a){const d=v?v(a):a.ownerDocument;return S.call(d||a,a,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mn=function(a){return a=nn(a,Ae," "),a=nn(a,M," "),a=nn(a,fe," "),a},zn=function(a){var d;a.normalize();const _=v?v(a):a.ownerDocument,T=S.call(_||a,a,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let I=T.nextNode();for(;I;)I.data=mn(I.data),I=T.nextNode();const V=(d=a.querySelectorAll)===null||d===void 0?void 0:d.call(a,"template");V&&Nt(V,ce=>{Lt(ce.content)&&zn(ce.content)})},gn=function(a){const d=R?R(a):null;return typeof d!="string"||he(d)!=="form"?!1:typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||a.attributes!==k(a)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function"||a.nodeType!==x(a)||a.childNodes!==g(a)},Lt=function(a){if(!x||typeof a!="object"||a===null)return!1;try{return x(a)===Fe.documentFragment}catch{return!1}},Vt=function(a){if(!x||typeof a!="object"||a===null)return!1;try{return typeof x(a)=="number"}catch{return!1}};function tt(N,a,d){N.length!==0&&Nt(N,_=>{_.call(t,a,d,Ot)})}const bu=function(a,d){return!!(ze&&a.hasChildNodes()&&!Vt(a.firstElementChild)&&Me($r,a.textContent)&&Me($r,a.innerHTML)||ze&&a.namespaceURI===et&&ud[d]&&(Vt(a.firstElementChild)||typeof a.textContent=="string"&&Me(ad[d],a.textContent))||a.nodeType===Fe.processingInstruction||ze&&a.nodeType===Fe.comment&&Me(Fr,a.data))},_n=function(a,d){if(a instanceof RegExp)return Me(a,d);if(a instanceof Function){for(var _=arguments.length,T=new Array(_>2?_-2:0),I=2;I<_;I++)T[I-2]=arguments[I];return!!a(d,...T)}return!1},ku=function(a,d,_){if(!$[d]&&Io(d)&&_n(L.tagNameCheck,d))return!1;if(Dt&&!Je[d]){const T=m(a),I=g(a);if(I&&T){const V=I.length;for(let ce=V-1;ce>=0;--ce){const de=a===_?y(I[ce],!0):I[ce];T.insertBefore(de,w(a))}}}return mt(a),!0},vo=function(a,d,_,T){return a.length===0?d:d===_||d===T?$e(d):d},Oo=function(a,d){return a===d||m(a)!==null?!1:(ct&&yn(a),!0)},Lo=function(a,d){if(tt(Y.beforeSanitizeElements,a,null),Oo(a,d))return!0;if(gn(a))return mt(a),!0;const _=he(H(a));if(te=vo(Y.uponSanitizeElement,te,ut,Ze),tt(Y.uponSanitizeElement,a,{tagName:_,allowedTags:te}),Oo(a,d))return!0;if(bu(a,_))return mt(a),!0;if($[_]||!(ne.tagCheck instanceof Function&&ne.tagCheck(_))&&!te[_]){const I=ku(a,_,d);return I===!1&&tt(Y.afterSanitizeElements,a,null),I}if(j(a)===Fe.element&&!gu(a)||(_==="noscript"||_==="noembed"||_==="noframes")&&Me(od,a.innerHTML))return mt(a),!0;if(ge&&a.nodeType===Fe.text){const I=mn(a.textContent);a.textContent!==I&&(en(t.removed,{element:a.cloneNode()}),a.textContent=I)}return tt(Y.afterSanitizeElements,a,null),!1},Ro=function(a,d,_){if(K[d]||Bo(d,a)||Ft&&(d==="id"||d==="name")&&(_ in n||_ in fu))return!1;const T=ae[d]||ne.attributeCheck instanceof Function&&ne.attributeCheck(d,a);return Te&&Me(Ce,d)||De&&Me(He,d)?!0:T?xt[d]||Me(Ue,nn(_,Ke,""))||(d==="src"||d==="xlink:href"||d==="href")&&a!=="script"&&xr(_,"data:")===0&&Qe[a]||Xe&&!Me(ft,nn(_,Ke,""))?!0:!_:Io(a)&&_n(L.tagNameCheck,a)&&_n(L.attributeNameCheck,d,a)||d==="is"&&L.allowCustomizedBuiltInElements&&_n(L.tagNameCheck,_)},Au=J({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Io=function(a){return!Au[tn(a)]&&Me(rt,a)},wu=function(a,d,_,T){if(U&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!_)switch(p.getAttributeType(a,d)){case"TrustedHTML":return D(T);case"TrustedScriptURL":return O(T)}return T},Su=function(a,d,_,T){try{_?a.setAttributeNS(_,d,T):a.setAttribute(d,T),gn(a)?mt(a):Br(t.removed)}catch{bt(d,a)}},jo=function(a){tt(Y.beforeSanitizeAttributes,a,null);const d=a.attributes;if(!d||gn(a))return;ae=vo(Y.uponSanitizeAttribute,ae,A,at);const _={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0};let T=d.length;const I=he(a.nodeName);for(;T--;){const V=d[T],ce=V.name,de=V.namespaceURI,xe=V.value,ve=he(ce),Un=xe;let Be=ce==="value"?Un:$0(Un);if(_.attrName=ve,_.attrValue=Be,_.keepAttr=!0,_.forceKeepAttr=void 0,tt(Y.uponSanitizeAttribute,a,_),Be=_.attrValue,_e&&(ve==="id"||ve==="name")&&xr(Be,Bt)!==0&&(bt(ce,a,V),Be=Bt+Be),ze&&Me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){bt(ce,a,V);continue}if(ve==="attributename"&&Dr(Be,"href")){bt(ce,a,V);continue}if(!_.forceKeepAttr){if(!_.keepAttr){bt(ce,a,V);continue}if(!Ge&&Me(rd,Be)){bt(ce,a,V);continue}if(ge&&(Be=mn(Be)),!Ro(I,ve,Be)){bt(ce,a,V);continue}Be=wu(I,ve,de,Be),Be!==Un&&Su(a,ce,de,Be)}}tt(Y.afterSanitizeAttributes,a,null)},En=function(a){let d=null;const _=xo(a);for(tt(Y.beforeSanitizeShadowDOM,a,null);d=_.nextNode();)if(tt(Y.uponSanitizeShadowNode,d,null),Lo(d,a),jo(d),Lt(d.content)&&En(d.content),j(d)===Fe.element){const T=E(d);Lt(T)&&(Vn(T),En(T))}tt(Y.afterSanitizeShadowDOM,a,null)},Vn=function(a){const d=[{node:a,shadow:null}];for(;d.length>0;){const _=d.pop();if(_.shadow){En(_.shadow);continue}const T=_.node,V=j(T)===Fe.element,ce=g(T);if(ce)for(let de=ce.length-1;de>=0;--de)d.push({node:ce[de],shadow:null});if(V){const de=R?R(T):null;if(typeof de=="string"&&he(de)==="template"){const xe=T.content;Lt(xe)&&d.push({node:xe,shadow:null})}}if(V){const de=E(T);Lt(de)&&d.push({node:null,shadow:de},{node:de,shadow:null})}}};return t.sanitize=function(N){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=null,_=null,T=null,I=null;if(jn=!N,jn&&(N="<!-->"),typeof N!="string"&&!Vt(N)&&(N=U0(N),typeof N!="string"))throw Mt("dirty is not a string, aborting");if(!t.isSupported)return N;Ct?(te=Ze,ae=at):Hn(a),(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&(te=$e(te)),Y.uponSanitizeAttribute.length>0&&(ae=$e(ae)),t.removed=[];const V=ct&&typeof N!="string"&&Vt(N);if(V){Eu(N);const xe=H(N);if(typeof xe=="string"){const ve=he(xe);if(!te[ve]||$[ve])throw Cn(N),Mt("root node is forbidden and cannot be sanitized in-place")}if(gn(N))throw Cn(N),Mt("root node is clobbered and cannot be sanitized in-place");try{Vn(N)}catch(ve){throw Cn(N),ve}}else if(Vt(N))d=Do("<!---->"),_=d.ownerDocument.importNode(N,!0),_.nodeType===Fe.element&&_.nodeName==="BODY"||_.nodeName==="HTML"?d=_:d.appendChild(_),Vn(_);else{if(!lt&&!ge&&!Re&&N.indexOf("<")===-1)return U&&Et?D(N):N;if(d=Do(N),!d)return lt?null:Et?F:""}d&&it&&mt(d.firstChild);const ce=V?N:d;try{const xe=xo(ce);for(;T=xe.nextNode();)Lo(T,ce),jo(T),Lt(T.content)&&En(T.content)}catch(xe){throw V&&(Cn(N),Nt(t.removed,ve=>{ve.element&&yn(ve.element)})),xe}if(V)return Nt(t.removed,xe=>{xe.element&&yn(xe.element)}),ge&&zn(N),N;if(lt){if(ge&&zn(d),Tt)for(I=P.call(d.ownerDocument);d.firstChild;)I.appendChild(d.firstChild);else I=d;return(ae.shadowroot||ae.shadowrootmode)&&(I=ue.call(o,I,!0)),I}let de=Re?d.outerHTML:d.innerHTML;return Re&&te["!doctype"]&&d.ownerDocument&&d.ownerDocument.doctype&&d.ownerDocument.doctype.name&&Me(td,d.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+d.ownerDocument.doctype.name+`>
|
|
783
|
-
`+de),ge&&(de=mn(de)),U&&Et?D(de):de},t.setConfig=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hn(N),Ct=!0,Ze=te,at=ae},t.clearConfig=function(){Ot=null,Ct=!1,Ze=null,at=null,U=Q,F=""},t.isValidAttribute=function(N,a,d){Ot||Hn({});const _=he(N),T=he(a);return Ro(_,T,d)},t.addHook=function(N,a){typeof a=="function"&&Le(Y,N)&&en(Y[N],a)},t.removeHook=function(N,a){if(Le(Y,N)){if(a!==void 0){const d=j0(Y[N],a);return d===-1?void 0:P0(Y[N],d,1)[0]}return Br(Y[N])}},t.removeHooks=function(N){Le(Y,N)&&(Y[N]=[])},t.removeAllHooks=function(){Y=zr()},t}var cd=Vr();const sd=/^(?:[a-z]+:)?\/\//i;let dd="";function hd(){return dd}function so(e){const t=String(e||"").trim();if(!t)return"";if(sd.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const n=t.startsWith("/")?t:`/${t}`,o=hd();return o?`${o}${n}`:n}function pd(){return Dn(new Date)}function Dn(e){if(e==null||e==="")return"";const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t)}const rn=[],un=[],an=[],ln=[],xn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},vn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},fd={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let ho=null,Ur=null,_t=null;function Cd({counts:e,forceRefresh:t}={}){const n=Object.assign({},fd,e||{}),o=pd(),r=Dn(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),u=JSON.stringify(n);if(!t&&Ur===o&&ho===u&&_t)return Object.assign(xn,_t.today),Object.assign(vn,_t.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:xn,yesterday:vn};const i={LISTEN_IN_NOISE:dt(rn,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:dt(un,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:dt(an,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:dt(ln,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let l=null;return _t&&ho===u&&_t.yesterday&&_t.yesterday.date===r&&(l=_t.yesterday.selection),l||(l={LISTEN_IN_NOISE:dt(rn,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:dt(un,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:dt(an,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:dt(ln,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(xn,i),Object.assign(vn,l),Ur=o,ho=u,_t={today:i,yesterday:{date:r,countsKey:u,selection:l}},{today:xn,yesterday:vn}}let Gr=!1,cn=null;async function yd(){try{const e=import.meta&&import.meta.env&&import.meta.env.BASE_URL||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function md(){if(!Gr)return cn||(cn=(async()=>{const e=await yd();if(!e){cn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{for(const t of Object.keys(e||{})){const n=e[t]||[];for(const o of n){const r=o,u=String(r.training_type||t),i=String(r.category_main_code||r.category_main||r.category_0||""),l=String(r.category_sub_code||r.category_sub||r.category_1||""),c=Object.assign({},r,{training_type:u,category_0:i,category_1:l});u==="LISTEN_IN_NOISE"?rn.push(c):u==="SHORT_STORY"?un.push(c):u==="LONG_STORY"?an.push(c):u==="ORDERING_SENTENCE"&&ln.push(c)}}}catch{cn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}try{Cd()}catch{}Gr=!0})(),cn)}async function gd(e=3e3){const t=md();return Promise.race([t,new Promise(n=>setTimeout(n,e))])}const _d=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"party-popper",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."}],Ed={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function bd(e){return _d.map(t=>{const n=Ed[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}function kd(e){return typeof window>"u"?"":cd.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use"],FORBID_ATTR:["xlink:href","href"]})}function Ad(e){const[t,n]=B(null),[o,r]=B(null),[u,i]=B(null),[l,c]=B(null);return X(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){n(null),r(null),i(null);return}const f=e.split("/").pop();let h=e;f&&(e.startsWith("/")?h=so(e):/^(Logo|Symbol)/i.test(f)?h=so(`logo/${f}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),h=e)),n(h)},[e]),X(()=>{if(!t)return;let f=!1;async function h(){try{let p=await fetch(t);p.ok||(p=await fetch(t));const s=p.headers.get("content-type")||"";if(f)return;if(s.includes("svg")){r("mask");return}if(s.startsWith("image/")){r("img");return}const y=await fetch(t);if(!y.ok)throw new Error("not ok");const b=await y.text();if(f)return;if(/^\s*<svg[\s>]/i.test(b)){const w=kd(b);if(!w){r("none");return}i(w),r("inline");return}r("none")}catch{f||r("none")}}return h(),()=>{f=!0}},[t]),X(()=>{let f=!1,h=null;return o==="mask"&&t&&fetch(t).then(p=>{if(!p.ok)throw new Error("fetch failed");return p.blob()}).then(p=>{f||(h=URL.createObjectURL(p),c(h))}).catch(()=>{f||r("img")}),()=>{f=!0,h&&URL.revokeObjectURL(h),c(null)}},[o,t]),{iconToUse:t,mode:o,svgText:u,blobUrl:l}}function wd(e){const{icon:t,label:n,className:o,imgClassName:r,maskClassName:u,svgClassName:i,wrapperStyle:l,size:c}=e||{},f=o??"iconRenderer-icon",h=r??"iconRenderer-icon-image",p=u??"iconRenderer-icon-mask",s=i??"iconRenderer-icon-svg",y=typeof t=="string"?t:null,b=T0(y),{iconToUse:w,mode:g,svgText:m,blobUrl:E}=Ad(y),k=(j,H={})=>oe("span",{className:f,style:l,...H,children:j}),x=(j,H={})=>oe("img",{src:j,alt:typeof n=="string"?n:n?String(n):"",className:h,...H});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(oe("span",{className:s,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(b)try{return k(Ut(b,{className:s,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(w&&w.endsWith(".svg")){if(g==="mask"){const j={"--icon-url":E?`url(${E})`:`url(${w})`};return k(oe("span",{className:p,style:j}),{"aria-hidden":"true"})}return g==="img"?k(x(w,{onError:j=>{j.currentTarget.onerror=null,j.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):g==="inline"?k(oe("span",{className:s,dangerouslySetInnerHTML:m?{__html:m}: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 x(so(t),{style:l,onError:j=>{j.currentTarget.onerror=null,j.currentTarget.style.display="none"}});const R=typeof c=="number"?c:20,v=`<svg width="${R}" height="${R}" 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(oe("span",{className:s,dangerouslySetInnerHTML:{__html:v}}),{"aria-hidden":"true"})}function Yr(e){const{anchorRect:t,anchorEl:n,offset:o=20,edgeMargin:r=20,onClose:u,closeOnOutsideClick:i=!0,className:l="",role:c="dialog",ariaLabel:f="",children:h,backdrop:p=!1,isMobilePopup:s=!1,useBorder:y=!0,header:b}=e||{},w=Oe(null),[g,m]=B({position:"fixed",left:0,top:-9999}),[E,k]=B(!1),[x,R]=B("bottom"),[v,j]=B(!1),[H,U]=B(!1),F=!t&&!n,Q=q((D=!1)=>{if(H&&s)return;const O=n?n.getBoundingClientRect():t;if(!O||!w.current)return;const me=w.current,{offsetWidth:Z,offsetHeight:ee}=me,S=window.innerWidth,P=window.innerHeight,re=S-O.right,ue=O.left,Y=O.top,Ae=P-O.bottom;let M=0,fe=0,Ce="top";if(Y>=ee+o)Ce="top",fe=O.top-o-ee,M=O.left+O.width/2-Z/2;else if(Ae>=ee+o)Ce="bottom",fe=O.bottom+o,M=O.left+O.width/2-Z/2;else if(re>=Z+o)Ce="right",M=O.right+o,fe=O.top+O.height/2-ee/2;else if(ue>=Z+o)Ce="left",M=O.left-o-Z,fe=O.top+O.height/2-ee/2;else{const rt=Math.max(Y,Ae,re,ue);rt===Y?(Ce="top",fe=O.top-o-ee,M=O.left+O.width/2-Z/2):rt===Ae?(Ce="bottom",fe=O.bottom+o,M=O.left+O.width/2-Z/2):rt===re?(Ce="right",M=O.right+o,fe=O.top+O.height/2-ee/2):(Ce="left",M=O.left-o-Z,fe=O.top+O.height/2-ee/2)}const He=Number(r)||8;M=Math.min(Math.max(M,He),S-Z-He),fe=Math.min(Math.max(fe,He),P-ee-He);const ft=Math.round(M),Ke=Math.round(fe);D&&w.current?(w.current.style.left=`${ft}px`,w.current.style.top=`${Ke}px`,w.current.dataset.placement=Ce):(R(Ce||x),m({position:"fixed",left:ft,top:Ke}),j(!0))},[H,s,n,t,o,r,x]);Nu(()=>{if(F)return;if(H&&s){m({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),j(!0);return}Q();const D=requestAnimationFrame(()=>Q());return()=>cancelAnimationFrame(D)},[t,n,o,h,r,F,H,s,Q]),X(()=>{if(F||H&&s||!w.current||typeof ResizeObserver>"u")return;const D=new ResizeObserver(()=>{t&&Q()});return D.observe(w.current),()=>D.disconnect()},[t,h,r,F,H,s,Q]),X(()=>{if(F||H&&s)return;const D=()=>Q(!0);return window.addEventListener("resize",D),document.addEventListener("scroll",D,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",D),document.removeEventListener("scroll",D,{capture:!0})}},[t,o,h,r,F,H,s,Q]),X(()=>{if(typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(max-width: 768px)"),O=()=>U(!!D.matches);O();try{D.addEventListener?D.addEventListener("change",O):D.addListener(O)}catch{try{D.addListener(O)}catch{}}return()=>{try{D.removeEventListener?D.removeEventListener("change",O):D.removeListener(O)}catch{}}},[]);const G=Oe(!1),W=q((D=!1)=>{if(!(E||G.current)){if(G.current=!0,D){k(!0);try{u&&u()}catch{}return}k(!0),setTimeout(()=>{u&&u()},200)}},[E,u,k]);X(()=>{const D=Z=>{const ee=w.current;if(!ee)return;const S=Z.target;if(S&&!ee.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},O=Z=>{const ee=w.current;if(!ee)return;const S=Z.target;if(S&&!ee.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},me=Z=>{if(Z.key==="Escape"){Z.stopPropagation(),W();return}if(Z.key==="Tab"){const ee=w.current;if(!ee)return;const S=ee.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!S||S.length===0)return;const P=S[0],re=S[S.length-1],ue=document.activeElement;Z.shiftKey?ue===P&&(Z.preventDefault(),re.focus()):ue===re&&(Z.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",D,!0),document.addEventListener("click",O,!0),document.addEventListener("keydown",me),()=>{document.removeEventListener("pointerdown",D,!0),document.removeEventListener("click",O,!0),document.removeEventListener("keydown",me)}},[u,i,W]),X(()=>{const D=()=>{W(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",D),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",D)}},[W]);const z=Ie("div",{ref:w,className:`tooltip-content ${y?"tooltip-content--bordered":""} ${E?"is-closing":""} ${l} ${H&&s?"is-mobile":""}`,role:c,"aria-label":f||void 0,style:F?{}:{...g,visibility:v?"visible":"hidden"},tabIndex:-1,"data-placement":x,"data-left":F?"":g.left,"data-top":F?"":g.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:[b!=null&&oe("div",{className:"tooltip-content__header h5",children:b}),h]});if(F||typeof document>"u")return z;if(p||H&&s){const D=Ie("div",{className:"tooltip-portal",children:[oe("div",{className:"tooltip-backdrop",onClick:()=>{i&&W(!0)}}),z]});return $o(D,document.body)}return $o(z,document.body)}function Sd(e){const{anchorRect:t,text:n,offset:o=8,onClose:r,className:u="",ariaLabel:i}=e||{};return n?oe(Yr,{anchorRect:t,offset:o,onClose:r,closeOnOutsideClick:!1,className:`tooltip-info ${u}`,ariaLabel:i||n,children:oe("div",{className:"tooltip-info__content body-3",children:n})}):null}function qr(e){const{anchorRect:t,title:n,items:o,activeIndex:r=-1,showIndex:u=!0,onClose:i,offset:l=12}=e||{},c=Array.isArray(o)?o:o?[o]:[];return!c.length&&!n?null:oe(Yr,{anchorRect:t,offset:l,onClose:i,closeOnOutsideClick:!0,useBorder:!1,className:"tooltip-description",children:Ie("div",{className:"tooltip-description__box",children:[n&&oe("span",{className:"tooltip-description__title body-2",children:n}),oe("ol",{className:"tooltip-description__items",children:c.map((f,h)=>Ie("li",{className:`tooltip-description__item body-3${h===r?" tooltip-description__item--active":""}`,children:[u&&c.length>1&&Ie("span",{className:"tooltip-description__index button-1",children:[h+1,"."]}),oe("span",{children:f})]},h))})]})})}function Nd(e){const{size:t=48,type:n,htmlType:o,href:r,target:u,rel:i,icon:l,rightIcon:c,label:f,count:h,subLabel:p,children:s,ariaLabel:y,variant:b="default",align:w="center",selected:g,toggleable:m=!1,disabled:E=!1,useLabel:k=!0,useBorder:x=!0,useBG:R=!0,useDisabledCovered:v=!1,useDisabledInvisible:j=!1,width:H,minWidth:U,onClick:F,onDisabledClick:Q,showTooltipInfo:G=!1,tooltipInfoText:W=null,tooltipDescription:z=null,iconSize:D="medium",iconColor:O,shape:me="rounded",color:Z,className:ee,...S}=e,P=typeof t=="string"&&isNaN(Number(t))?t.toLowerCase():String(Number(t)||48),re=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ue=Number(t),Y=!isNaN(ue)&&ue<40?"button-2":"button-1",Ae=f??s,M=E||!!S.disabled,fe=M?v?"disabled-covered":j?"disabled-invisibled":"disabled":b,Ce=fe?`button--variant-${fe}`:"",He=w?`button--align-${w}`:"",ft=me?`button--shape-${me}`:"",Ke=typeof O=="string"&&O.startsWith("--")?`var(${O})`:O,rt={...H?{width:typeof H=="number"?`${H}px`:H}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...x?{}:{"--button-border":M?"0":"1px solid transparent"},...Ke?{"--button-icon-color":Ke}:{},...Z?{"--color-main":Z}:{}},Ue=k===!1?"":Ae,te=Array.isArray(Ue)?Ue.length>0:!!Ue,ut=!!c,ae=n??(te||l||ut?"bar":"dot"),A=`${re}--${ae}`,L=Oe(null),$=Oe(M),[K,ne]=B(!!g),[De,Te]=B(!1),[Xe,Ge]=B(null),ge=q(()=>Te(!1),[]);X(()=>{(G||z)&&M&&De&&(Te(!1),Ge(null))},[M,G,z,De]),X(()=>{typeof g=="boolean"&&ne(g)},[g]),X(()=>{if($.current&&!M&&L.current){const ie=L.current;ie.blur(),ie.style.pointerEvents="none";const Qe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{L.current&&(L.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Qe)}$.current=M},[M]);const ze=typeof g=="boolean"?!!g:K,Re=m||typeof g=="boolean"?ze?"true":"false":void 0,Ct=Ga("button",re,A,Ce,He,ft,ze?"is-selected":null,R?null:"button--no-bg",ee),Ze=`button__icon button__icon--${D}`,at=Array.isArray(p)?p:p!==void 0?[p]:[],it=()=>{if(Array.isArray(Ue))return Ue.map((Qe,Ht)=>{const xt=at[Ht];return Ie("span",{className:`button__label-text${xt!==void 0?" button__label-text--has-sub":""}`,children:[Qe,xt!==void 0&&oe("span",{className:"button__sub-label-text caption-1",children:xt})]},Ht)});const ie=p!==void 0;return Ie("span",{className:`button__label-text${ie?" button__label-text--has-sub":""}`,children:[Ue,h!=null&&oe("span",{className:"button__count",children:h}),ie&&oe("span",{className:"button__sub-label-text caption-1",children:p})]})},lt=ie=>{M||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(ie),typeof g!="boolean"&&ne(!1),ie.currentTarget.blur())},Tt=ie=>{if(M){Q?.(ie);return}typeof g!="boolean"&&m&&ne(Qe=>!Qe),F?.(ie)},Et=q(()=>{!M&&(G||z)&&(Te(!0),Ge(L.current?.getBoundingClientRect()??null))},[M,G,z]),Ft=q(()=>{(G||z)&&(Te(!1),Ge(null))},[G,z]),_e={...S};delete _e.disabled,delete _e.className,delete _e.faded,delete _e.useFaded,delete _e.loading,delete _e.onMouseLeave,delete _e.onPointerEnter,delete _e.onPointerLeave,delete _e.onFocus,delete _e.onBlur,M&&(Object.keys(_e).forEach(ie=>{/^on[A-Z]/.test(ie)&&typeof _e[ie]=="function"&&delete _e[ie]}),_e["aria-disabled"]="true");const Bt=(typeof G=="string"?G:null)??(typeof W=="string"?W:null)??(typeof y=="string"?y:null)??(typeof Ae=="string"?Ae:null)??void 0,Dt=typeof y=="string"?y:typeof Ae=="string"?Ae:Bt,ct=(ie,Qe)=>oe(wd,{icon:ie,label:Qe??Dt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>ae==="dot"?Ie(Gt,{children:[ct(l),te&&oe("span",{className:`button__label ${Y}`,children:it()})]}):w==="center"&&l?Ie(Gt,{children:[Ie("span",{className:"button__center-group",children:[oe("span",{className:"button__left",children:ct(l)}),te&&oe("span",{className:`button__label ${Y}`,children:it()})]}),ut&&oe("span",{className:"button__right",children:ct(c)})]}):Ie(Gt,{children:[l&&oe("span",{className:"button__left",children:ct(l,y??Ae)}),te&&oe("span",{className:`button__label ${Y}`,children:it()}),ut&&oe("span",{className:"button__right",children:ct(c)})]}),Je=!!r&&!M;return Ie(Gt,{children:[oe(Je?"a":"button",{..._e,ref:L,...Je?{href:r,target:u,rel:i??(u==="_blank"?"noreferrer":void 0)}:{type:o,disabled:M&&!Q},className:Ct,"aria-pressed":Re,"aria-label":Dt,"aria-disabled":Je&&M?!0:void 0,style:rt,onClick:Tt,onMouseLeave:lt,onPointerEnter:ie=>{Et(),!M&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(ie)},onPointerLeave:ie=>{Ft(),!M&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(ie)},onFocus:ie=>{Et(),!M&&typeof S.onFocus=="function"&&S.onFocus(ie)},onBlur:ie=>{lt(ie),Ft(),!M&&typeof S.onBlur=="function"&&S.onBlur(ie)},children:yt()}),De&&z?oe(qr,{anchorRect:Xe,title:z.title,items:z.items,onClose:ge}):De&&Bt?oe(Sd,{anchorRect:Xe,text:Bt,onClose:ge}):null]})}function Wr(){const[e,t]=B(null),n=q(u=>t(u.getBoundingClientRect()),[]),o=q(()=>t(null),[]),r=q(u=>{const i=u.getBoundingClientRect();t(l=>l?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:r}}function Md(e){const[t,n]=B(null),[o,r]=B(null),u=Oe(null);X(()=>()=>{u.current&&clearTimeout(u.current)},[]);const i=q((c,f)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{n(c),r(f)},e)},[e]),l=q(()=>{u.current&&clearTimeout(u.current),n(null),r(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:i,close:l}}function Td({title:e,items:t}){const{t:n}=kt(),{anchorRect:o,openAt:r,close:u}=Wr();return Ie(Gt,{children:[oe(Nd,{size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!o,ariaLabel:n("common.info","\uC124\uBA85"),onPointerEnter:i=>r(i.currentTarget),onPointerLeave:u,onFocus:i=>r(i.currentTarget),onBlur:u}),o&&oe(qr,{title:e,items:t,showIndex:t.length>1,anchorRect:o,onClose:u})]})}function Kr(){const{t:e}=kt();return we(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function Xr(e,t,n){return{label:t.difficulty,items:[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction}}function Zr(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function Jr(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function Bd(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function Dd(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction}}function xd(e,t){const{label:n,headValue:o,midValue:r,tailValue:u,includeMid:i=!0,headDisabled:l,midDisabled:c,tailDisabled:f,allOptionDisabled:h,groupLabel:p,labelAction:s}=t;return{label:n,...p?{groupLabel:p}:{},...s?{labelAction:s}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...h?{allOptionDisabled:h}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:l},...i?[{value:r,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:c}]:[],{value:u,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:f}]}}function vd(e,t,n){if(t===St){const{[n]:u,...i}=e;return i}const o=e[n]??[],r=o.includes(t)?o.filter(u=>u!==t):[...o,t];if(r.length===0){const{[n]:u,...i}=e;return i}return{...e,[n]:r}}Object.fromEntries(Object.entries(ia).map(([e,{nucleus:t}])=>[e,t]));const Od={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},Ld={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},Rd={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",posMap:Ld,typeMap:Od};function Id(e,t,n=Rd){const o=t[n.difficulty];if(o?.length&&!o.some(l=>e.grade===l.replace(/\D/g,"")))return!1;const r=t[n.syllables];if(r?.length){const l=e.syllables??0;if(!r.some(c=>c===n.syllable5plus?l>=5:l===parseInt(c)))return!1}const u=t[n.partOfSpeech];if(u?.length&&!u.flatMap(l=>n.posMap[l]??[l]).some(l=>(e.pos??"").includes(l)))return!1;const i=t[n.wordType];return!(i?.length&&!i.some(l=>e.wordType===n.typeMap[l]))}const ht=(e,t)=>t.map(n=>({jamos:[n],tooltip:e})),ke=(e,t)=>({jamos:[...e],tooltip:t}),po={cho:[ht("\uC591\uC21C\uC74C",["\u3142","\u3143","\u314D","\u3141"]),ht("\uCE58\uC870\uC74C",["\u3137","\u3138","\u314C","\u3134","\u3139"]),ht("\uCE58\uC870\uC74C",["\u3145","\u3146"]),ht("\uACBD\uAD6C\uAC1C\uC74C",["\u3148","\u3149","\u314A"]),ht("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3132","\u314B"]),ht("\uC131\uBB38\uC74C",["\u314E"])],jung:[[ke("\u3163","\uC804\uC124 \uACE0\uBAA8\uC74C"),ke("\u315F","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 w\uD65C\uC74C"),ke("\u3162","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 \u0270\uD65C\uC74C")],[ke("\u3161","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C")],[ke("\u315C","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"),ke("\u3160","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[ke("\u3154\u3150","\uC804\uC124 \uC911\uBAA8\uC74C"),ke("\u3156\u3152","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 j\uD65C\uC74C"),ke("\u3159\u315A\u315E","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 w\uD65C\uC74C")],[ke("\u3153","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"),ke("\u3155","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 j\uD65C\uC74C"),ke("\u315D","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 w\uD65C\uC74C")],[ke("\u3157","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"),ke("\u315B","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[ke("\u314F","\uC800\uBAA8\uC74C"),ke("\u3151","\uC800\uBAA8\uC74C \xB7 j\uD65C\uC74C"),ke("\u3158","\uC800\uBAA8\uC74C \xB7 w\uD65C\uC74C")]],jong:[ht("\uC591\uC21C\uC74C",["\u3142","\u3141"]),ht("\uCE58\uC870\uC74C",["\u3137","\u3134","\u3139"]),ht("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3147"])]},jd=[...Se],Pd=[...st],$d=Ve.filter(e=>e!==""),pt=e=>e===nt?[]:Array.from(e),nt="__NO_CODA__",Qr=[1,2,3,4],ot=5,Fd=12,eu="SYL_",fo=e=>`${eu}${e}`,Hd=e=>Number(e.slice(eu.length));function Co(e){return e>=ot?Array.from({length:Fd-ot+1},(t,n)=>ot+n):[e]}const tu={cho:jd,jung:Pd,jong:$d},yo=e=>e.map(t=>t.map(({jamos:n,tooltip:o})=>({v:n.join(""),tooltip:o}))),mo={cho:yo(po.cho),jung:yo(po.jung),jong:yo(po.jong)},nu={};mo.jung.flat().forEach(({v:e})=>{for(const t of pt(e))nu[t]=e});const zd=new Set(mo.cho.flat().map(e=>e.v));function ou(e,t){return e==="cho"?zd.has(t)?t:null:e==="jung"?nu[t]??t:nr(t)}function ru(e,t,n){if(e==="jung"){const o=pt(t);return n&&o.includes(n)?n:o[0]??t}return t}function uu(e,t,n){const o=(r,u)=>u?r==="jong"&&u===nt?nt:t==="pron"?ou(r,u):ru(r,u,r==="jung"?n:null):null;return{...e,cho:o("cho",e.cho),jung:o("jung",e.jung),jong:o("jong",e.jong)}}const go={cho:null,jung:null,jong:null,syllable:null},Vd="wt_filter",au=e=>`wt_filter_${e}`;function Ud(e){try{const t=localStorage.getItem(au(e))??localStorage.getItem(Vd);if(t)return JSON.parse(t)}catch{}return null}function Gd(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...go,cho:t.choseong}:go}function Yd(e,t,n){const{t:o,i18n:r}=kt(),[u]=B(()=>n?.resetOnMount?null:Ud(e)),i=u?.contrastCount,l=typeof i=="number"&&Number.isFinite(i)?i:1,[c,f]=B(Math.min(5,Math.max(1,l))),[h,p]=B(u?.phonemeView==="pron"?"pron":u?.phonemeView==="direct"?"direct":"char"),[s,y]=B(()=>Gd(u)),b=q(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:nt,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?nt:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);X(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||y(A=>A.cho||A.jung||A.syllable!=null||A.jong?A:b())},[]);const w=we(()=>be(s.cho)||be(s.jung)||be(s.jong)?"count":"random",[s.cho,s.jung,s.jong]),g=Oe(h==="char"?s.jung:null);X(()=>{h==="char"&&(g.current=s.jung)},[h,s.jung]);const[m,E]=B(n?.resetOnMount?!!n?.defaultImageOnly:u?.excludeNoImage??!0),[k,x]=B(n?.resetOnMount?!1:u?.sameStructureOnly??!0),[R,v]=B(Array.isArray(u?.gradeFilter)?u.gradeFilter:[]),[j,H]=B(Array.isArray(u?.posFilter)?u.posFilter:[]),[U,F]=B(Array.isArray(u?.wordTypeFilter)?u.wordTypeFilter:[]),Q=Oe(n?.resetKey);X(()=>{Q.current!==n?.resetKey&&(Q.current=n?.resetKey,y(b()),E(!1),x(!1),v([]),H([]),F([]),f(1))},[n?.resetKey]);const G=Kr(),[W,z]=B({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[D,O]=B(!1),[me,Z]=B(null),ee=1,S=Math.max(1,[s.cho,s.jung,s.jong].filter(Boolean).length);X(()=>{c<S&&f(S)},[S,c]),X(()=>{if(!n?.resetOnMount)try{localStorage.setItem(au(e),JSON.stringify({contrastCount:c,composition:s,excludeNoImage:m,sameStructureOnly:k,phonemeView:h,gradeFilter:R,posFilter:j,wordTypeFilter:U}))}catch{}},[n?.resetOnMount,e,c,s,m,k,h,R,j,U]);const[P,re]=B(0);zo("wordpool:update",()=>re(A=>A+1));const ue=Oe(r.language);X(()=>{ue.current!==r.language&&(ue.current=r.language,re(A=>A+1))},[r.language]),X(()=>{if(!t.choseong)return;let A=!1;return Ua({difficulty:w,excludeNoImage:m}).then(L=>{A||(z(L),L.cho.size+L.jung.size+L.jong.size>0&&O(!0))}).catch(()=>{A||z({cho:new Set,jung:new Set,jong:new Set,syllable:new Set})}),()=>{A=!0}},[t.choseong,w,m,P]),X(()=>{let A=!1;const L=s,$=L.cho?pt(L.cho):null,K=L.jung?pt(L.jung):null,ne=L.jong===nt,De=ne?null:L.jong?pt(L.jong):null,Te=L.syllable!=null?Co(L.syllable):null,Xe=!!($||K||De||ne||Te);return Va({difficulty:t.difficulty?w:null,contrastCount:t.difficulty?c:1,composition:t.choseong&&Xe?{cho:$,jung:K,jong:De,jongNone:ne,syllable:Te}:null,excludeNoImage:m,sameStructureOnly:k,phonemeView:h==="pron"?"pron":"char",grade:R.length>0?R:null}).then(Ge=>{A||Z(Ge)}).catch(()=>{A||Z(null)}),()=>{A=!0}},[t.choseong,t.difficulty,w,c,s,h,m,k,P,R]),X(()=>{D&&y(A=>{const L={...A};let $=!1;return["cho","jung","jong"].forEach(K=>{const ne=A[K];!ne||ne===nt||pt(ne).some(De=>W[K].has(De))||(L[K]=null,$=!0)}),A.syllable!=null&&t.fixedSyllable==null&&(A.syllable>=ot?[...W.syllable].some(K=>K>=ot)||(L.syllable=null,$=!0):(!W.syllable.has(A.syllable)||A.syllable<ee)&&(L.syllable=null,$=!0)),$?L:A})},[W,D,ee,t.fixedSyllable]);const Y=we(()=>{const A=L=>{const $=new Set;for(const K of tu[L])W[L].has(K)&&$.add(K);return $};return{cho:A("cho"),jung:A("jung"),jong:A("jong")}},[W]),Ae=we(()=>({exact:new Set(Qr.filter(A=>W.syllable.has(A))),min:[...W.syllable].some(A=>A>=ot)}),[W]),M=we(()=>({diffPhonemeCount:o("training.contrast.diffPhonemeCount",{defaultValue:"\uB2E4\uB978 \uC74C\uC18C\uC758 \uCD1D \uAC2F\uC218"}),composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),fe=we(()=>({[M.trainOnset]:"cho",[M.trainVowel]:"jung",[M.trainCoda]:"jong"}),[M]),Ce=q((A,L)=>Ut(Td,{title:L,items:A}),[]),He=we(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\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."}),o("training.filter.sameStructureInfo",{defaultValue:"\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."})],[o]),ft=we(()=>{const A=[];if(t.choseong){const L={value:nt,displayLabel:M.codaExclude},$=t.fixedNoCoda===!0,K=(ne,De)=>{const Te=$&&ne==="jong",Xe={label:De,groupLabel:M.phonemeGroup,allOption:!t.requireSyllable,allLabel:M.noLimit,allOptionDisabled:Te};if(h==="pron"){const ge=mo[ne].map(ze=>ze.map(({v:Re,tooltip:Ct})=>{const Ze=pt(Re),at=Te||!Ze.some(it=>W[ne].has(it));return Ze.length>1?{value:Re,labels:Ze,tooltip:Ct,disabled:at}:{value:Re,tooltip:Ct,disabled:at}}));return ne==="jong"&&!t.requireCoda&&ge.unshift([L]),{...Xe,groups:ge}}const Ge=tu[ne].map(ge=>!Te&&Y[ne].has(ge)?ge:{value:ge,disabled:!0});return{...Xe,items:ne==="jong"&&!t.requireCoda?[L,...Ge]:Ge}};A.push(K("cho",M.trainOnset)),A.push(K("jung",M.trainVowel)),A.push(K("jong",M.trainCoda))}if(A.push({...Xr(o,G,{labelAction:Ce([o("wordPairs.filter.difficultyInfo",{defaultValue:"\uAD6D\uB9BD\uAD6D\uC5B4\uC6D0\uC758 \uAE30\uCD08 \uC5B4\uD718 \uB4F1\uAE09\uC774 \uACB0\uACFC\uC5D0 \uBC18\uC601\uB429\uB2C8\uB2E4."})])}),label:M.gradeLabel}),t.partOfSpeech&&A.push(Zr(G)),t.wordType&&A.push(Jr(G)),t.choseong||t.fixedSyllable!=null){const L=t.fixedSyllable;A.push({label:M.syllableCount,items:[...Qr.map($=>({value:fo($),displayLabel:o("wordPairs.syllableN",{n:$,defaultValue:"{{n}}\uC74C\uC808"}),disabled:L!=null?$!==L:!Ae.exact.has($)||$<ee})),{value:fo(ot),displayLabel:o("wordPairs.syllableNPlus",{n:ot,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:L!=null?ot!==L:!Ae.min}],allOption:!0,allOptionDisabled:L!=null})}return t.choseong?A.push({label:M.exclude,displayLabel:M.selectLabel,multiple:!0,items:[M.excludeImage,M.sameStructure],labelAction:Ce(He)}):A.push({label:M.exclude,displayLabel:M.selectLabel,multiple:!0,items:[M.excludeImage],labelAction:Ce([He[0]])}),A},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,ee,Y,W,h,Ae,M,o,Ce,He,G]),Ke={...t.difficulty?{[M.diffPhonemeCount]:String(c)}:{},...(t.choseong||t.fixedSyllable!=null)&&s.syllable!=null?{[M.syllableCount]:fo(s.syllable)}:{},...t.choseong&&s.cho?{[M.trainOnset]:s.cho}:{},...t.choseong&&s.jung?{[M.trainVowel]:s.jung}:{},...t.choseong&&s.jong?{[M.trainCoda]:s.jong}:{},[M.exclude]:[...m?[M.excludeImage]:[],...k?[M.sameStructure]:[]],[M.gradeLabel]:R.map(A=>o("wordSearch.filter.grade",{n:Number(A),defaultValue:"{{n}}\uB4F1\uAE09"})),...t.partOfSpeech?{[G.partOfSpeech]:j}:{},...t.wordType?{[G.wordType]:U}:{}},rt=q((A,L)=>{if(L===M.diffPhonemeCount){const $=Number(A);$>=1&&f($)}else if(L===M.exclude)A===M.excludeImage?E($=>!$):A===M.sameStructure&&x($=>!$);else if(L===M.syllableCount)y($=>{if(!A||A===St)return{...$,syllable:null};const K=Hd(A);return{...$,syllable:$.syllable===K?null:K}});else if(L===M.gradeLabel){if(!A||A===St){v([]);return}const $=A.replace(/\D/g,"");v(K=>K.includes($)?K.filter(ne=>ne!==$):[...K,$])}else if(L===G.partOfSpeech){if(!A||A===St){H([]);return}H($=>$.includes(A)?$.filter(K=>K!==A):[...$,A])}else if(L===G.wordType){if(!A||A===St){F([]);return}F($=>$.includes(A)?$.filter(K=>K!==A):[...$,A])}else{const $=fe[L];if(!$)return;y(K=>t.requireSyllable?A&&A!==St?{...K,[$]:A}:K:!A||A===St||K[$]===A?{...K,[$]:null}:{...K,[$]:A})}},[M,fe,G,t.requireSyllable]),Ue=q(A=>!t.partOfSpeech&&!t.wordType?!0:Id(A,{...t.partOfSpeech?{[G.partOfSpeech]:j}:{},...t.wordType?{[G.wordType]:U}:{}},G),[t.partOfSpeech,t.wordType,j,U,G]),te=q(A=>{A!==h&&(A!=="direct"&&h!=="direct"&&y(L=>uu(L,A,g.current)),p(A))},[h]),ut=q(()=>({composition:s,contrastCount:c,excludeNoImage:m,sameStructureOnly:k,phonemeView:h,gradeFilter:R}),[s,c,m,k,h,R]),ae=q(A=>{y(A.composition),f(A.contrastCount),E(A.excludeNoImage),x(A.sameStructureOnly??!0),p(A.phonemeView),v(Array.isArray(A.gradeFilter)?A.gradeFilter:[])},[]);return{difficulty:w,contrastCount:c,composition:s,choseong:s.cho,excludeNoImage:m,sameStructureOnly:k,gradeFilter:R,posFilter:j,wordTypeFilter:U,matchesWordAttributes:Ue,poolVersion:P,filterSections:ft,filterSelected:Ke,handleFilterSelect:rt,phonemeView:h,setPhonemeView:te,phonemeGroupLabel:M.phonemeGroup,wordCount:me,getFilterSnapshot:ut,restoreFilterSnapshot:ae}}function qd(e){const t=l=>l?pt(l):null,n=t(e.cho),o=t(e.jung),r=e.jong===nt,u=r?null:t(e.jong),i=e.syllable!=null?Co(e.syllable):null;return!n&&!o&&!u&&!r&&!i?null:{cho:n,jung:o,jong:u,jongNone:r,syllable:i}}function Wd(e,t,n,o,r,u,i=!0,l="char",c=[]){const[f,h]=B({}),[p,s]=B(!1),{cho:y=null,jung:b=null,jong:w=null,syllable:g=null}=o??{};return X(()=>{u>0&&za(r).catch(()=>{})},[u,r]),X(()=>{let m=!1;return s(!0),(async()=>{const E=qd({cho:y,jung:b,jong:w,syllable:g}),k=c.length>0?c.slice().sort().join(","):"",x=`${y??""}_${b??""}_${w??""}_${g??""}_${k}`,R={};await Promise.all(e.map(async v=>{const j=Wn[v.key];try{const H=await yr(v.key,{difficulty:j.difficulty?t:null,contrastCount:j.difficulty?n:1,composition:j.choseong?E:null,count:5,excludeNoImage:r,sameStructureOnly:i,phonemeView:l,grade:c.length>0?c:null});H&&H.length>0?R[v.key]={id:`wt-${v.key}-${t}-${x}-${Date.now()}`,name:v.label,training_type:v.key,category_main_code:"WORD",iconColor:v.color,subTitle:v.subTitle,items:H,itemCount:H.length}:R[v.key]={id:`wt-${v.key}-empty`,name:v.label,training_type:v.key,category_main_code:"WORD",iconColor:v.color,subTitle:v.subTitle,items:[],itemCount:0,__empty:!0}}catch{R[v.key]=null}})),m||(h(R),s(!1))})(),()=>{m=!0}},[t,n,y,b,w,g,r,i,l,u,c]),{perTypeData:f,generating:p}}function Kd(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Xd(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const On=dt;function _o(e,t){const n=t?Xd(Kd(t)):Math.random;return{LISTEN_IN_NOISE:On(rn,Math.max(0,e.LISTEN_IN_NOISE||0),n),SHORT_STORY:On(un,Math.max(0,e.SHORT_STORY||0),n),LONG_STORY:On(an,Math.max(0,e.LONG_STORY||0),n),ORDERING_SENTENCE:On(ln,Math.max(0,e.ORDERING_SENTENCE||0),n)}}function iu(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Zd={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function lu(e=!1,t=Zd,n){const o=Dn(Date.now()),r=Dn(Date.now()-864e5),u=`${n??""}|${o}`,i=`${n??""}|${r}`;return rn.length>0||un.length>0||an.length>0||ln.length>0?{today:_o(t,u),yesterday:_o(t,i)}:{today:_o(t,u),yesterday:null}}function Jd(e){const t=Oe({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=Oe(null),[o,r]=B(!1),[u,i]=B(!1),[l,c]=B(0);X(()=>{let h=!1,p,s=0;const y=40,b=()=>{p!==void 0&&(clearInterval(p),p=void 0)};let w=!1;try{const E=new URLSearchParams(window.location.search),k=E.get("forceRefresh")||E.get("force");w=k==="1"||k==="true"}catch{}const g=E=>{t.current=E.today,n.current=E.yesterday,r(!0),c(k=>k+1),h=!0,b()},m=async()=>{if(h)return;if(!w){const k=lu(!1,void 0,e);if(iu(k.today)){g(k);return}}try{await gd(3e3)}catch{}if(h)return;const E=lu(w,void 0,e);if(iu(E.today)){g(E);return}++s>=y&&(r(!0),h=!0,b())};return m(),p=setInterval(m,250),()=>{h=!0,b()}},[e]);const f=q(h=>{const p=u?n.current:t.current,s=u?t.current:n.current;return p?.[h]?.length?p[h]:s?.[h]?.length?s[h]:void 0},[u,l]);return{loaded:o,showYesterday:u,setShowYesterday:i,getTrainingPerType:f}}const $t=[];let Ln=!1;function cu(e){if(e.key!=="Escape"||e.defaultPrevented)return;const t=$t[$t.length-1];t&&(e.stopPropagation(),t())}function Qd(e){return $t.push(e),!Ln&&typeof document<"u"&&(document.addEventListener("keydown",cu),Ln=!0),()=>{const t=$t.lastIndexOf(e);t>=0&&$t.splice(t,1),$t.length===0&&Ln&&typeof document<"u"&&(document.removeEventListener("keydown",cu),Ln=!1)}}function eh(e,t=!0){const n=Ho(e);X(()=>{if(t)return Qd(()=>{n.current?.()})},[t,n])}const Eo=(e,t)=>`${e}:${t??1}`,bo=new Map;function th(e,t){const[n,o]=B(0),r=e.map(u=>Eo(u.word,u.homonum)).join("|");return X(()=>{const u=(r?r.split("|"):[]).filter(c=>!bo.has(c));if(u.length===0)return;let i=!1;const l=Array.from(new Set(u.map(c=>c.slice(0,c.lastIndexOf(":")))));return t(l).then(c=>{if(!(i||c.length===0)){for(const f of c)f.Meaning&&bo.set(Eo(f.Word,f.Homonum??void 0),f.Meaning);o(f=>f+1)}}),()=>{i=!0}},[r,t]),we(()=>{const u=r?r.split("|"):[],i=new Map;for(const l of u){const c=bo.get(l);c!=null&&i.set(l,c)}return i},[r,n])}function nh(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,r=Math.max(1,Math.ceil(e.length/o)),u=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),r):1;return{pageItems:we(()=>e.slice((u-1)*o,u*o),[e,u,o]),totalPages:r,curPage:u}}function oh(e="warning"){const[t,n]=B(""),[o,r]=B(e),[u,i]=B(0),l=q((p,s)=>{r(s),n(p),i(y=>y+1)},[]),c=q(p=>l(p,"warning"),[l]),f=q(p=>l(p,"normal"),[l]),h=q(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:u,showToast:l,showWarning:c,showNormal:f,clearToast:h}}const sn={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},dn=sn.blue,Rn=sn.green,hn=sn.amber,In=sn.purple,rh=sn.pink,uh=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:dn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:dn,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:dn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:dn,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:dn,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:Rn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:Rn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:Rn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:Rn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:hn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:hn,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:hn,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:hn,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:In,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:In,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:In,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:In,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:rh,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function ah(){const{t:e}=kt();return we(()=>{const t=Object.fromEntries(bd(e).map(o=>[o.key,o.label])),n={...t};return uh.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}export{Xo as CACHE_GROUPS,Uo as DocumentTitleSuppressContext,go as EMPTY_COMPOSITION,Fo as MediaQueryOverrideContext,nt as NO_CODA,ot as SYLLABLE_MIN,er as VAP_PAGE_SIZE_OPTIONS,Xr as buildGradeSection,Zr as buildPartOfSpeechSection,xd as buildPositionSection,Dd as buildSelectSection,Bd as buildSyllableSection,Jr as buildWordTypeSection,ou as charToPronValue,uu as convertComposition,qu as fmtBytes,Zo as lsBytes,Eo as meaningKey,ru as pronToCharValue,Co as syllableToFilter,Kt as today,vd as toggleAttributeFilter,Wu as useCacheManagement,Jd as useDailyTrainingSelection,Md as useDelayedHoverAnchor,oa as useDeviceManagement,Du as useDocumentTitle,eh as useEscToClose,Mu as useFontScale,Wr as useHoverAnchor,Bu as useMediaQuery,nh as usePagedList,vu as usePasswordChange,xu as useRelativeDay,ta as useTablePaging,na as useTableSort,oh as useToastState,ah as useTrainingTypeLabels,ea as useVisitAllPanel,Zu as useVisitHistory,Qu as useVisitSchedule,zo as useWindowEvent,Kr as useWordAttributeFilterKeys,Ku as useWordDataStats,th as useWordMeanings,Wd as useWordTrainingDataGeneration,Yd as useWordTrainingFilter,pt as valueToJamos};
|
|
783
|
+
`+de),ge&&(de=mn(de)),U&&Et?D(de):de},t.setConfig=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hn(N),Ct=!0,Ze=te,at=ae},t.clearConfig=function(){Ot=null,Ct=!1,Ze=null,at=null,U=Q,F=""},t.isValidAttribute=function(N,a,d){Ot||Hn({});const _=he(N),T=he(a);return Ro(_,T,d)},t.addHook=function(N,a){typeof a=="function"&&Le(Y,N)&&en(Y[N],a)},t.removeHook=function(N,a){if(Le(Y,N)){if(a!==void 0){const d=j0(Y[N],a);return d===-1?void 0:P0(Y[N],d,1)[0]}return Br(Y[N])}},t.removeHooks=function(N){Le(Y,N)&&(Y[N]=[])},t.removeAllHooks=function(){Y=zr()},t}var cd=Vr();const sd=/^(?:[a-z]+:)?\/\//i;let dd="";function hd(){return dd}function so(e){const t=String(e||"").trim();if(!t)return"";if(sd.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const n=t.startsWith("/")?t:`/${t}`,o=hd();return o?`${o}${n}`:n}function pd(){return Dn(new Date)}function Dn(e){if(e==null||e==="")return"";const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t)}const rn=[],un=[],an=[],ln=[],xn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},vn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},fd={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let ho=null,Ur=null,_t=null;function Cd({counts:e,forceRefresh:t}={}){const n=Object.assign({},fd,e||{}),o=pd(),r=Dn(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),u=JSON.stringify(n);if(!t&&Ur===o&&ho===u&&_t)return Object.assign(xn,_t.today),Object.assign(vn,_t.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:xn,yesterday:vn};const i={LISTEN_IN_NOISE:dt(rn,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:dt(un,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:dt(an,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:dt(ln,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let l=null;return _t&&ho===u&&_t.yesterday&&_t.yesterday.date===r&&(l=_t.yesterday.selection),l||(l={LISTEN_IN_NOISE:dt(rn,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:dt(un,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:dt(an,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:dt(ln,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(xn,i),Object.assign(vn,l),Ur=o,ho=u,_t={today:i,yesterday:{date:r,countsKey:u,selection:l}},{today:xn,yesterday:vn}}let Gr=!1,cn=null;async function yd(){try{const e=import.meta&&import.meta.env&&import.meta.env.BASE_URL||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function md(){if(!Gr)return cn||(cn=(async()=>{const e=await yd();if(!e){cn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{for(const t of Object.keys(e||{})){const n=e[t]||[];for(const o of n){const r=o,u=String(r.training_type||t),i=String(r.category_main_code||r.category_main||r.category_0||""),l=String(r.category_sub_code||r.category_sub||r.category_1||""),c=Object.assign({},r,{training_type:u,category_0:i,category_1:l});u==="LISTEN_IN_NOISE"?rn.push(c):u==="SHORT_STORY"?un.push(c):u==="LONG_STORY"?an.push(c):u==="ORDERING_SENTENCE"&&ln.push(c)}}}catch{cn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}try{Cd()}catch{}Gr=!0})(),cn)}async function gd(e=3e3){const t=md();return Promise.race([t,new Promise(n=>setTimeout(n,e))])}const _d=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"party-popper",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."}],Ed={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function bd(e){return _d.map(t=>{const n=Ed[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}function kd(e){return typeof window>"u"?"":cd.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use"],FORBID_ATTR:["xlink:href","href"]})}function Ad(e){const[t,n]=B(null),[o,r]=B(null),[u,i]=B(null),[l,c]=B(null);return X(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){n(null),r(null),i(null);return}const f=e.split("/").pop();let h=e;f&&(e.startsWith("/")?h=so(e):/^(Logo|Symbol)/i.test(f)?h=so(`logo/${f}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),h=e)),n(h)},[e]),X(()=>{if(!t)return;let f=!1;async function h(){try{let p=await fetch(t);p.ok||(p=await fetch(t));const s=p.headers.get("content-type")||"";if(f)return;if(s.includes("svg")){r("mask");return}if(s.startsWith("image/")){r("img");return}const y=await fetch(t);if(!y.ok)throw new Error("not ok");const b=await y.text();if(f)return;if(/^\s*<svg[\s>]/i.test(b)){const w=kd(b);if(!w){r("none");return}i(w),r("inline");return}r("none")}catch{f||r("none")}}return h(),()=>{f=!0}},[t]),X(()=>{let f=!1,h=null;return o==="mask"&&t&&fetch(t).then(p=>{if(!p.ok)throw new Error("fetch failed");return p.blob()}).then(p=>{f||(h=URL.createObjectURL(p),c(h))}).catch(()=>{f||r("img")}),()=>{f=!0,h&&URL.revokeObjectURL(h),c(null)}},[o,t]),{iconToUse:t,mode:o,svgText:u,blobUrl:l}}function wd(e){const{icon:t,label:n,className:o,imgClassName:r,maskClassName:u,svgClassName:i,wrapperStyle:l,size:c}=e||{},f=o??"iconRenderer-icon",h=r??"iconRenderer-icon-image",p=u??"iconRenderer-icon-mask",s=i??"iconRenderer-icon-svg",y=typeof t=="string"?t:null,b=T0(y),{iconToUse:w,mode:g,svgText:m,blobUrl:E}=Ad(y),k=(j,H={})=>oe("span",{className:f,style:l,...H,children:j}),x=(j,H={})=>oe("img",{src:j,alt:typeof n=="string"?n:n?String(n):"",className:h,...H});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(oe("span",{className:s,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(b)try{return k(Ut(b,{className:s,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(w&&w.endsWith(".svg")){if(g==="mask"){const j={"--icon-url":E?`url(${E})`:`url(${w})`};return k(oe("span",{className:p,style:j}),{"aria-hidden":"true"})}return g==="img"?k(x(w,{onError:j=>{j.currentTarget.onerror=null,j.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):g==="inline"?k(oe("span",{className:s,dangerouslySetInnerHTML:m?{__html:m}: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 x(so(t),{style:l,onError:j=>{j.currentTarget.onerror=null,j.currentTarget.style.display="none"}});const R=typeof c=="number"?c:20,v=`<svg width="${R}" height="${R}" 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(oe("span",{className:s,dangerouslySetInnerHTML:{__html:v}}),{"aria-hidden":"true"})}function Yr(e){const{anchorRect:t,anchorEl:n,offset:o=20,edgeMargin:r=20,onClose:u,closeOnOutsideClick:i=!0,className:l="",role:c="dialog",ariaLabel:f="",children:h,backdrop:p=!1,isMobilePopup:s=!1,useBorder:y=!0,header:b}=e||{},w=Oe(null),[g,m]=B({position:"fixed",left:0,top:-9999}),[E,k]=B(!1),[x,R]=B("bottom"),[v,j]=B(!1),[H,U]=B(!1),F=!t&&!n,Q=q((D=!1)=>{if(H&&s)return;const O=n?n.getBoundingClientRect():t;if(!O||!w.current)return;const me=w.current,{offsetWidth:Z,offsetHeight:ee}=me,S=window.innerWidth,P=window.innerHeight,re=S-O.right,ue=O.left,Y=O.top,Ae=P-O.bottom;let M=0,fe=0,Ce="top";if(Y>=ee+o)Ce="top",fe=O.top-o-ee,M=O.left+O.width/2-Z/2;else if(Ae>=ee+o)Ce="bottom",fe=O.bottom+o,M=O.left+O.width/2-Z/2;else if(re>=Z+o)Ce="right",M=O.right+o,fe=O.top+O.height/2-ee/2;else if(ue>=Z+o)Ce="left",M=O.left-o-Z,fe=O.top+O.height/2-ee/2;else{const rt=Math.max(Y,Ae,re,ue);rt===Y?(Ce="top",fe=O.top-o-ee,M=O.left+O.width/2-Z/2):rt===Ae?(Ce="bottom",fe=O.bottom+o,M=O.left+O.width/2-Z/2):rt===re?(Ce="right",M=O.right+o,fe=O.top+O.height/2-ee/2):(Ce="left",M=O.left-o-Z,fe=O.top+O.height/2-ee/2)}const He=Number(r)||8;M=Math.min(Math.max(M,He),S-Z-He),fe=Math.min(Math.max(fe,He),P-ee-He);const ft=Math.round(M),Ke=Math.round(fe);D&&w.current?(w.current.style.left=`${ft}px`,w.current.style.top=`${Ke}px`,w.current.dataset.placement=Ce):(R(Ce||x),m({position:"fixed",left:ft,top:Ke}),j(!0))},[H,s,n,t,o,r,x]);Nu(()=>{if(F)return;if(H&&s){m({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),j(!0);return}Q();const D=requestAnimationFrame(()=>Q());return()=>cancelAnimationFrame(D)},[t,n,o,h,r,F,H,s,Q]),X(()=>{if(F||H&&s||!w.current||typeof ResizeObserver>"u")return;const D=new ResizeObserver(()=>{t&&Q()});return D.observe(w.current),()=>D.disconnect()},[t,h,r,F,H,s,Q]),X(()=>{if(F||H&&s)return;const D=()=>Q(!0);return window.addEventListener("resize",D),document.addEventListener("scroll",D,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",D),document.removeEventListener("scroll",D,{capture:!0})}},[t,o,h,r,F,H,s,Q]),X(()=>{if(typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(max-width: 768px)"),O=()=>U(!!D.matches);O();try{D.addEventListener?D.addEventListener("change",O):D.addListener(O)}catch{try{D.addListener(O)}catch{}}return()=>{try{D.removeEventListener?D.removeEventListener("change",O):D.removeListener(O)}catch{}}},[]);const G=Oe(!1),W=q((D=!1)=>{if(!(E||G.current)){if(G.current=!0,D){k(!0);try{u&&u()}catch{}return}k(!0),setTimeout(()=>{u&&u()},200)}},[E,u,k]);X(()=>{const D=Z=>{const ee=w.current;if(!ee)return;const S=Z.target;if(S&&!ee.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},O=Z=>{const ee=w.current;if(!ee)return;const S=Z.target;if(S&&!ee.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},me=Z=>{if(Z.key==="Escape"){Z.stopPropagation(),W();return}if(Z.key==="Tab"){const ee=w.current;if(!ee)return;const S=ee.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!S||S.length===0)return;const P=S[0],re=S[S.length-1],ue=document.activeElement;Z.shiftKey?ue===P&&(Z.preventDefault(),re.focus()):ue===re&&(Z.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",D,!0),document.addEventListener("click",O,!0),document.addEventListener("keydown",me),()=>{document.removeEventListener("pointerdown",D,!0),document.removeEventListener("click",O,!0),document.removeEventListener("keydown",me)}},[u,i,W]),X(()=>{const D=()=>{W(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",D),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",D)}},[W]);const z=Ie("div",{ref:w,className:`tooltip-content ${y?"tooltip-content--bordered":""} ${E?"is-closing":""} ${l} ${H&&s?"is-mobile":""}`,role:c,"aria-label":f||void 0,style:F?{}:{...g,visibility:v?"visible":"hidden"},tabIndex:-1,"data-placement":x,"data-left":F?"":g.left,"data-top":F?"":g.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:[b!=null&&oe("div",{className:"tooltip-content__header h5",children:b}),h]});if(F||typeof document>"u")return z;if(p||H&&s){const D=Ie("div",{className:"tooltip-portal",children:[oe("div",{className:"tooltip-backdrop",onClick:()=>{i&&W(!0)}}),z]});return $o(D,document.body)}return $o(z,document.body)}function Sd(e){const{anchorRect:t,text:n,offset:o=8,onClose:r,className:u="",ariaLabel:i}=e||{};return n?oe(Yr,{anchorRect:t,offset:o,onClose:r,closeOnOutsideClick:!1,className:`tooltip-info ${u}`,ariaLabel:i||n,children:oe("div",{className:"tooltip-info__content body-3",children:n})}):null}function qr(e){const{anchorRect:t,title:n,items:o,activeIndex:r=-1,showIndex:u=!0,onClose:i,offset:l=12}=e||{},c=Array.isArray(o)?o:o?[o]:[];return!c.length&&!n?null:oe(Yr,{anchorRect:t,offset:l,onClose:i,closeOnOutsideClick:!0,useBorder:!1,className:"tooltip-description",children:Ie("div",{className:"tooltip-description__box",children:[n&&oe("span",{className:"tooltip-description__title body-2",children:n}),oe("ol",{className:"tooltip-description__items",children:c.map((f,h)=>Ie("li",{className:`tooltip-description__item body-3${h===r?" tooltip-description__item--active":""}`,children:[u&&c.length>1&&Ie("span",{className:"tooltip-description__index button-1",children:[h+1,"."]}),oe("span",{children:f})]},h))})]})})}function Nd(e){const{size:t=48,type:n,htmlType:o,href:r,target:u,rel:i,icon:l,rightIcon:c,label:f,count:h,subLabel:p,children:s,ariaLabel:y,variant:b="default",align:w="center",selected:g,toggleable:m=!1,disabled:E=!1,useLabel:k=!0,useBorder:x=!0,useBG:R=!0,useDisabledCovered:v=!1,useDisabledInvisible:j=!1,width:H,minWidth:U,onClick:F,onDisabledClick:Q,showTooltipInfo:G=!1,tooltipInfoText:W=null,tooltipDescription:z=null,iconSize:D="medium",iconColor:O,shape:me="rounded",color:Z,className:ee,...S}=e,P=typeof t=="string"&&isNaN(Number(t))?t.toLowerCase():String(Number(t)||48),re=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ue=Number(t),Y=!isNaN(ue)&&ue<40?"button-2":"button-1",Ae=f??s,M=E||!!S.disabled,fe=M?v?"disabled-covered":j?"disabled-invisibled":"disabled":b,Ce=fe?`button--variant-${fe}`:"",He=w?`button--align-${w}`:"",ft=me?`button--shape-${me}`:"",Ke=typeof O=="string"&&O.startsWith("--")?`var(${O})`:O,rt={...H?{width:typeof H=="number"?`${H}px`:H}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...x?{}:{"--button-border":M?"0":"1px solid transparent"},...Ke?{"--button-icon-color":Ke}:{},...Z?{"--color-main":Z}:{}},Ue=k===!1?"":Ae,te=Array.isArray(Ue)?Ue.length>0:!!Ue,ut=!!c,ae=n??(te||l||ut?"bar":"dot"),A=`${re}--${ae}`,L=Oe(null),$=Oe(M),[K,ne]=B(!!g),[De,Te]=B(!1),[Xe,Ge]=B(null),ge=q(()=>Te(!1),[]);X(()=>{(G||z)&&M&&De&&(Te(!1),Ge(null))},[M,G,z,De]),X(()=>{typeof g=="boolean"&&ne(g)},[g]),X(()=>{if($.current&&!M&&L.current){const ie=L.current;ie.blur(),ie.style.pointerEvents="none";const Qe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{L.current&&(L.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Qe)}$.current=M},[M]);const ze=typeof g=="boolean"?!!g:K,Re=m||typeof g=="boolean"?ze?"true":"false":void 0,Ct=Ga("button",re,A,Ce,He,ft,ze?"is-selected":null,R?null:"button--no-bg",ee),Ze=`button__icon button__icon--${D}`,at=Array.isArray(p)?p:p!==void 0?[p]:[],it=()=>{if(Array.isArray(Ue))return Ue.map((Qe,Ht)=>{const xt=at[Ht];return Ie("span",{className:`button__label-text${xt!==void 0?" button__label-text--has-sub":""}`,children:[Qe,xt!==void 0&&oe("span",{className:"button__sub-label-text caption-1",children:xt})]},Ht)});const ie=p!==void 0;return Ie("span",{className:`button__label-text${ie?" button__label-text--has-sub":""}`,children:[Ue,h!=null&&oe("span",{className:"button__count",children:h}),ie&&oe("span",{className:"button__sub-label-text caption-1",children:p})]})},lt=ie=>{M||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(ie),typeof g!="boolean"&&ne(!1),ie.currentTarget.blur())},Tt=ie=>{if(M){Q?.(ie);return}typeof g!="boolean"&&m&&ne(Qe=>!Qe),F?.(ie)},Et=q(()=>{!M&&(G||z)&&(Te(!0),Ge(L.current?.getBoundingClientRect()??null))},[M,G,z]),Ft=q(()=>{(G||z)&&(Te(!1),Ge(null))},[G,z]),_e={...S};delete _e.disabled,delete _e.className,delete _e.faded,delete _e.useFaded,delete _e.loading,delete _e.onMouseLeave,delete _e.onPointerEnter,delete _e.onPointerLeave,delete _e.onFocus,delete _e.onBlur,M&&(Object.keys(_e).forEach(ie=>{/^on[A-Z]/.test(ie)&&typeof _e[ie]=="function"&&delete _e[ie]}),_e["aria-disabled"]="true");const Bt=(typeof G=="string"?G:null)??(typeof W=="string"?W:null)??(typeof y=="string"?y:null)??(typeof Ae=="string"?Ae:null)??void 0,Dt=typeof y=="string"?y:typeof Ae=="string"?Ae:Bt,ct=(ie,Qe)=>oe(wd,{icon:ie,label:Qe??Dt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>ae==="dot"?Ie(Gt,{children:[ct(l),te&&oe("span",{className:`button__label ${Y}`,children:it()})]}):w==="center"&&l?Ie(Gt,{children:[Ie("span",{className:"button__center-group",children:[oe("span",{className:"button__left",children:ct(l)}),te&&oe("span",{className:`button__label ${Y}`,children:it()})]}),ut&&oe("span",{className:"button__right",children:ct(c)})]}):Ie(Gt,{children:[l&&oe("span",{className:"button__left",children:ct(l,y??Ae)}),te&&oe("span",{className:`button__label ${Y}`,children:it()}),ut&&oe("span",{className:"button__right",children:ct(c)})]}),Je=!!r&&!M;return Ie(Gt,{children:[oe(Je?"a":"button",{..._e,ref:L,...Je?{href:r,target:u,rel:i??(u==="_blank"?"noreferrer":void 0)}:{type:o,disabled:M&&!Q},className:Ct,"aria-pressed":Re,"aria-label":Dt,"aria-disabled":Je&&M?!0:void 0,style:rt,onClick:Tt,onMouseLeave:lt,onPointerEnter:ie=>{Et(),!M&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(ie)},onPointerLeave:ie=>{Ft(),!M&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(ie)},onFocus:ie=>{Et(),!M&&typeof S.onFocus=="function"&&S.onFocus(ie)},onBlur:ie=>{lt(ie),Ft(),!M&&typeof S.onBlur=="function"&&S.onBlur(ie)},children:yt()}),De&&z?oe(qr,{anchorRect:Xe,title:z.title,items:z.items,onClose:ge}):De&&Bt?oe(Sd,{anchorRect:Xe,text:Bt,onClose:ge}):null]})}function Wr(){const[e,t]=B(null),n=q(u=>t(u.getBoundingClientRect()),[]),o=q(()=>t(null),[]),r=q(u=>{const i=u.getBoundingClientRect();t(l=>l?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:r}}function Md(e){const[t,n]=B(null),[o,r]=B(null),u=Oe(null);X(()=>()=>{u.current&&clearTimeout(u.current)},[]);const i=q((c,f)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{n(c),r(f)},e)},[e]),l=q(()=>{u.current&&clearTimeout(u.current),n(null),r(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:i,close:l}}function Td({title:e,items:t}){const{t:n}=kt(),{anchorRect:o,openAt:r,close:u}=Wr();return Ie(Gt,{children:[oe(Nd,{size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!o,ariaLabel:n("common.info","\uC124\uBA85"),onPointerEnter:i=>r(i.currentTarget),onPointerLeave:u,onFocus:i=>r(i.currentTarget),onBlur:u}),o&&oe(qr,{title:e,items:t,showIndex:t.length>1,anchorRect:o,onClose:u})]})}function Kr(){const{t:e}=kt();return we(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function Xr(e,t,n){return{label:t.difficulty,items:[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction}}function Zr(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function Jr(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function Bd(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function Dd(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction}}function xd(e,t){const{label:n,headValue:o,midValue:r,tailValue:u,includeMid:i=!0,headDisabled:l,midDisabled:c,tailDisabled:f,allOptionDisabled:h,groupLabel:p,labelAction:s}=t;return{label:n,...p?{groupLabel:p}:{},...s?{labelAction:s}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...h?{allOptionDisabled:h}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:l},...i?[{value:r,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:c}]:[],{value:u,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:f}]}}function vd(e,t,n){if(t===St){const{[n]:u,...i}=e;return i}const o=e[n]??[],r=o.includes(t)?o.filter(u=>u!==t):[...o,t];if(r.length===0){const{[n]:u,...i}=e;return i}return{...e,[n]:r}}Object.fromEntries(Object.entries(ia).map(([e,{nucleus:t}])=>[e,t]));const Od={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},Ld={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},Rd={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",posMap:Ld,typeMap:Od};function Id(e,t,n=Rd){const o=t[n.difficulty];if(o?.length&&!o.some(l=>e.grade===l.replace(/\D/g,"")))return!1;const r=t[n.syllables];if(r?.length){const l=e.syllables??0;if(!r.some(c=>c===n.syllable5plus?l>=5:l===parseInt(c)))return!1}const u=t[n.partOfSpeech];if(u?.length&&!u.flatMap(l=>n.posMap[l]??[l]).some(l=>(e.pos??"").includes(l)))return!1;const i=t[n.wordType];return!(i?.length&&!i.some(l=>e.wordType===n.typeMap[l]))}const ht=(e,t)=>t.map(n=>({jamos:[n],tooltip:e})),ke=(e,t)=>({jamos:[...e],tooltip:t}),po={cho:[ht("\uC591\uC21C\uC74C",["\u3142","\u3143","\u314D","\u3141"]),ht("\uCE58\uC870\uC74C",["\u3137","\u3138","\u314C","\u3134","\u3139"]),ht("\uCE58\uC870\uC74C",["\u3145","\u3146"]),ht("\uACBD\uAD6C\uAC1C\uC74C",["\u3148","\u3149","\u314A"]),ht("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3132","\u314B"]),ht("\uC131\uBB38\uC74C",["\u314E"])],jung:[[ke("\u3163","\uC804\uC124 \uACE0\uBAA8\uC74C"),ke("\u315F","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 w\uD65C\uC74C"),ke("\u3162","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 \u0270\uD65C\uC74C")],[ke("\u3161","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C")],[ke("\u315C","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"),ke("\u3160","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[ke("\u3154\u3150","\uC804\uC124 \uC911\uBAA8\uC74C"),ke("\u3156\u3152","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 j\uD65C\uC74C"),ke("\u3159\u315A\u315E","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 w\uD65C\uC74C")],[ke("\u3153","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"),ke("\u3155","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 j\uD65C\uC74C"),ke("\u315D","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 w\uD65C\uC74C")],[ke("\u3157","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"),ke("\u315B","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[ke("\u314F","\uC800\uBAA8\uC74C"),ke("\u3151","\uC800\uBAA8\uC74C \xB7 j\uD65C\uC74C"),ke("\u3158","\uC800\uBAA8\uC74C \xB7 w\uD65C\uC74C")]],jong:[ht("\uC591\uC21C\uC74C",["\u3142","\u3141"]),ht("\uCE58\uC870\uC74C",["\u3137","\u3134","\u3139"]),ht("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3147"])]},jd=[...Se],Pd=[...st],$d=Ve.filter(e=>e!==""),pt=e=>e===nt?[]:Array.from(e),nt="__NO_CODA__",Qr=[1,2,3,4],ot=5,Fd=12,eu="SYL_",fo=e=>`${eu}${e}`,Hd=e=>Number(e.slice(eu.length));function Co(e){return e>=ot?Array.from({length:Fd-ot+1},(t,n)=>ot+n):[e]}const tu={cho:jd,jung:Pd,jong:$d},yo=e=>e.map(t=>t.map(({jamos:n,tooltip:o})=>({v:n.join(""),tooltip:o}))),mo={cho:yo(po.cho),jung:yo(po.jung),jong:yo(po.jong)},nu={};mo.jung.flat().forEach(({v:e})=>{for(const t of pt(e))nu[t]=e});const zd=new Set(mo.cho.flat().map(e=>e.v));function ou(e,t){return e==="cho"?zd.has(t)?t:null:e==="jung"?nu[t]??t:nr(t)}function ru(e,t,n){if(e==="jung"){const o=pt(t);return n&&o.includes(n)?n:o[0]??t}return t}function uu(e,t,n){const o=(r,u)=>u?r==="jong"&&u===nt?nt:t==="pron"?ou(r,u):ru(r,u,r==="jung"?n:null):null;return{...e,cho:o("cho",e.cho),jung:o("jung",e.jung),jong:o("jong",e.jong)}}const go={cho:null,jung:null,jong:null,syllable:null},Vd="wt_filter",au=e=>`wt_filter_${e}`;function Ud(e){try{const t=localStorage.getItem(au(e))??localStorage.getItem(Vd);if(t)return JSON.parse(t)}catch{}return null}function Gd(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...go,cho:t.choseong}:go}function Yd(e,t,n){const{t:o,i18n:r}=kt(),[u]=B(()=>n?.resetOnMount?null:Ud(e)),i=u?.contrastCount,l=typeof i=="number"&&Number.isFinite(i)?i:1,[c,f]=B(Math.min(5,Math.max(1,l))),[h,p]=B(u?.phonemeView==="pron"?"pron":u?.phonemeView==="direct"?"direct":"char"),[s,y]=B(()=>Gd(u)),b=q(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:nt,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?nt:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);X(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||y(A=>A.cho||A.jung||A.syllable!=null||A.jong?A:b())},[]);const w=we(()=>be(s.cho)||be(s.jung)||be(s.jong)?"count":"random",[s.cho,s.jung,s.jong]),g=Oe(h==="char"?s.jung:null);X(()=>{h==="char"&&(g.current=s.jung)},[h,s.jung]);const[m,E]=B(n?.resetOnMount?!!n?.defaultImageOnly:u?.excludeNoImage??!0),[k,x]=B(n?.resetOnMount?!1:u?.sameStructureOnly??!0),[R,v]=B(Array.isArray(u?.gradeFilter)?u.gradeFilter:[]),[j,H]=B(Array.isArray(u?.posFilter)?u.posFilter:[]),[U,F]=B(Array.isArray(u?.wordTypeFilter)?u.wordTypeFilter:[]),Q=Oe(n?.resetKey);X(()=>{Q.current!==n?.resetKey&&(Q.current=n?.resetKey,y(b()),E(!1),x(!1),v([]),H([]),F([]),f(1))},[n?.resetKey]);const G=Kr(),[W,z]=B({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[D,O]=B(!1),[me,Z]=B(null),ee=1,S=Math.max(1,[s.cho,s.jung,s.jong].filter(Boolean).length);X(()=>{c<S&&f(S)},[S,c]),X(()=>{if(!n?.resetOnMount)try{localStorage.setItem(au(e),JSON.stringify({contrastCount:c,composition:s,excludeNoImage:m,sameStructureOnly:k,phonemeView:h,gradeFilter:R,posFilter:j,wordTypeFilter:U}))}catch{}},[n?.resetOnMount,e,c,s,m,k,h,R,j,U]);const[P,re]=B(0);zo("wordpool:update",()=>re(A=>A+1));const ue=Oe(r.language);X(()=>{ue.current!==r.language&&(ue.current=r.language,re(A=>A+1))},[r.language]),X(()=>{if(!t.choseong)return;let A=!1;return Ua({difficulty:w,excludeNoImage:m}).then(L=>{A||(z(L),L.cho.size+L.jung.size+L.jong.size>0&&O(!0))}).catch(()=>{A||z({cho:new Set,jung:new Set,jong:new Set,syllable:new Set})}),()=>{A=!0}},[t.choseong,w,m,P]),X(()=>{let A=!1;const L=s,$=L.cho?pt(L.cho):null,K=L.jung?pt(L.jung):null,ne=L.jong===nt,De=ne?null:L.jong?pt(L.jong):null,Te=L.syllable!=null?Co(L.syllable):null,Xe=!!($||K||De||ne||Te);return Va({difficulty:t.difficulty?w:null,contrastCount:t.difficulty?c:1,composition:t.choseong&&Xe?{cho:$,jung:K,jong:De,jongNone:ne,syllable:Te}:null,excludeNoImage:m,sameStructureOnly:k,phonemeView:h==="pron"?"pron":"char",grade:R.length>0?R:null}).then(Ge=>{A||Z(Ge)}).catch(()=>{A||Z(null)}),()=>{A=!0}},[t.choseong,t.difficulty,w,c,s,h,m,k,P,R]),X(()=>{D&&y(A=>{const L={...A};let $=!1;return["cho","jung","jong"].forEach(K=>{const ne=A[K];!ne||ne===nt||pt(ne).some(De=>W[K].has(De))||(L[K]=null,$=!0)}),A.syllable!=null&&t.fixedSyllable==null&&(A.syllable>=ot?[...W.syllable].some(K=>K>=ot)||(L.syllable=null,$=!0):(!W.syllable.has(A.syllable)||A.syllable<ee)&&(L.syllable=null,$=!0)),$?L:A})},[W,D,ee,t.fixedSyllable]);const Y=we(()=>{const A=L=>{const $=new Set;for(const K of tu[L])W[L].has(K)&&$.add(K);return $};return{cho:A("cho"),jung:A("jung"),jong:A("jong")}},[W]),Ae=we(()=>({exact:new Set(Qr.filter(A=>W.syllable.has(A))),min:[...W.syllable].some(A=>A>=ot)}),[W]),M=we(()=>({diffPhonemeCount:o("training.contrast.diffPhonemeCount",{defaultValue:"\uB2E4\uB978 \uC74C\uC18C\uC758 \uCD1D \uAC2F\uC218"}),composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),fe=we(()=>({[M.trainOnset]:"cho",[M.trainVowel]:"jung",[M.trainCoda]:"jong"}),[M]),Ce=q((A,L)=>Ut(Td,{title:L,items:A}),[]),He=we(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\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."}),o("training.filter.sameStructureInfo",{defaultValue:"\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."})],[o]),ft=we(()=>{const A=[];if(t.choseong){const L={value:nt,displayLabel:M.codaExclude},$=t.fixedNoCoda===!0,K=(ne,De)=>{const Te=$&&ne==="jong",Xe={label:De,groupLabel:M.phonemeGroup,allOption:!t.requireSyllable,allLabel:M.noLimit,allOptionDisabled:Te};if(h==="pron"){const ge=mo[ne].map(ze=>ze.map(({v:Re,tooltip:Ct})=>{const Ze=pt(Re),at=Te||!Ze.some(it=>W[ne].has(it));return Ze.length>1?{value:Re,labels:Ze,tooltip:Ct,disabled:at}:{value:Re,tooltip:Ct,disabled:at}}));return ne==="jong"&&!t.requireCoda&&ge.unshift([L]),{...Xe,groups:ge}}const Ge=tu[ne].map(ge=>!Te&&Y[ne].has(ge)?ge:{value:ge,disabled:!0});return{...Xe,items:ne==="jong"&&!t.requireCoda?[L,...Ge]:Ge}};A.push(K("cho",M.trainOnset)),A.push(K("jung",M.trainVowel)),A.push(K("jong",M.trainCoda))}if(A.push({...Xr(o,G,{labelAction:Ce([o("wordPairs.filter.difficultyInfo",{defaultValue:"\uAD6D\uB9BD\uAD6D\uC5B4\uC6D0\uC758 \uAE30\uCD08 \uC5B4\uD718 \uB4F1\uAE09\uC774 \uACB0\uACFC\uC5D0 \uBC18\uC601\uB429\uB2C8\uB2E4."})])}),label:M.gradeLabel}),t.partOfSpeech&&A.push(Zr(G)),t.wordType&&A.push(Jr(G)),t.choseong||t.fixedSyllable!=null){const L=t.fixedSyllable;A.push({label:M.syllableCount,items:[...Qr.map($=>({value:fo($),displayLabel:o("wordPairs.syllableN",{n:$,defaultValue:"{{n}}\uC74C\uC808"}),disabled:L!=null?$!==L:!Ae.exact.has($)||$<ee})),{value:fo(ot),displayLabel:o("wordPairs.syllableNPlus",{n:ot,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:L!=null?ot!==L:!Ae.min}],allOption:!0,allOptionDisabled:L!=null})}return t.choseong?A.push({label:M.exclude,displayLabel:M.selectLabel,multiple:!0,items:[M.excludeImage,M.sameStructure],labelAction:Ce(He)}):A.push({label:M.exclude,displayLabel:M.selectLabel,multiple:!0,items:[M.excludeImage],labelAction:Ce([He[0]])}),A},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,ee,Y,W,h,Ae,M,o,Ce,He,G]),Ke={...t.difficulty?{[M.diffPhonemeCount]:String(c)}:{},...(t.choseong||t.fixedSyllable!=null)&&s.syllable!=null?{[M.syllableCount]:fo(s.syllable)}:{},...t.choseong&&s.cho?{[M.trainOnset]:s.cho}:{},...t.choseong&&s.jung?{[M.trainVowel]:s.jung}:{},...t.choseong&&s.jong?{[M.trainCoda]:s.jong}:{},[M.exclude]:[...m?[M.excludeImage]:[],...k?[M.sameStructure]:[]],[M.gradeLabel]:R.map(A=>o("wordSearch.filter.grade",{n:Number(A),defaultValue:"{{n}}\uB4F1\uAE09"})),...t.partOfSpeech?{[G.partOfSpeech]:j}:{},...t.wordType?{[G.wordType]:U}:{}},rt=q((A,L)=>{if(L===M.diffPhonemeCount){const $=Number(A);$>=1&&f($)}else if(L===M.exclude)A===M.excludeImage?E($=>!$):A===M.sameStructure&&x($=>!$);else if(L===M.syllableCount)y($=>{if(!A||A===St)return{...$,syllable:null};const K=Hd(A);return{...$,syllable:$.syllable===K?null:K}});else if(L===M.gradeLabel){if(!A||A===St){v([]);return}const $=A.replace(/\D/g,"");v(K=>K.includes($)?K.filter(ne=>ne!==$):[...K,$])}else if(L===G.partOfSpeech){if(!A||A===St){H([]);return}H($=>$.includes(A)?$.filter(K=>K!==A):[...$,A])}else if(L===G.wordType){if(!A||A===St){F([]);return}F($=>$.includes(A)?$.filter(K=>K!==A):[...$,A])}else{const $=fe[L];if(!$)return;y(K=>t.requireSyllable?A&&A!==St?{...K,[$]:A}:K:!A||A===St||K[$]===A?{...K,[$]:null}:{...K,[$]:A})}},[M,fe,G,t.requireSyllable]),Ue=q(A=>!t.partOfSpeech&&!t.wordType?!0:Id(A,{...t.partOfSpeech?{[G.partOfSpeech]:j}:{},...t.wordType?{[G.wordType]:U}:{}},G),[t.partOfSpeech,t.wordType,j,U,G]),te=q(A=>{A!==h&&(A!=="direct"&&h!=="direct"&&y(L=>uu(L,A,g.current)),p(A))},[h]),ut=q(()=>({composition:s,contrastCount:c,excludeNoImage:m,sameStructureOnly:k,phonemeView:h,gradeFilter:R}),[s,c,m,k,h,R]),ae=q(A=>{y(A.composition),f(A.contrastCount),E(A.excludeNoImage),x(A.sameStructureOnly??!0),p(A.phonemeView),v(Array.isArray(A.gradeFilter)?A.gradeFilter:[])},[]);return{difficulty:w,contrastCount:c,composition:s,choseong:s.cho,excludeNoImage:m,sameStructureOnly:k,gradeFilter:R,posFilter:j,wordTypeFilter:U,matchesWordAttributes:Ue,poolVersion:P,filterSections:ft,filterSelected:Ke,handleFilterSelect:rt,phonemeView:h,setPhonemeView:te,phonemeGroupLabel:M.phonemeGroup,wordCount:me,getFilterSnapshot:ut,restoreFilterSnapshot:ae}}function qd(e){const t=l=>l?pt(l):null,n=t(e.cho),o=t(e.jung),r=e.jong===nt,u=r?null:t(e.jong),i=e.syllable!=null?Co(e.syllable):null;return!n&&!o&&!u&&!r&&!i?null:{cho:n,jung:o,jong:u,jongNone:r,syllable:i}}function Wd(e,t,n,o,r,u,i=!0,l="char",c=[]){const[f,h]=B({}),[p,s]=B(!1),{cho:y=null,jung:b=null,jong:w=null,syllable:g=null}=o??{},m=c.length>0?c.slice().sort().join(","):"";return X(()=>{u>0&&za(r).catch(()=>{})},[u,r]),X(()=>{let E=!1;return s(!0),(async()=>{const k=qd({cho:y,jung:b,jong:w,syllable:g}),x=`${y??""}_${b??""}_${w??""}_${g??""}_${m}`,R={};await Promise.all(e.map(async v=>{const j=Wn[v.key];try{const H=await yr(v.key,{difficulty:j.difficulty?t:null,contrastCount:j.difficulty?n:1,composition:j.choseong?k:null,count:5,excludeNoImage:r,sameStructureOnly:i,phonemeView:l,grade:c.length>0?c:null});H&&H.length>0?R[v.key]={id:`wt-${v.key}-${t}-${x}-${Date.now()}`,name:v.label,training_type:v.key,category_main_code:"WORD",iconColor:v.color,subTitle:v.subTitle,items:H,itemCount:H.length}:R[v.key]={id:`wt-${v.key}-empty`,name:v.label,training_type:v.key,category_main_code:"WORD",iconColor:v.color,subTitle:v.subTitle,items:[],itemCount:0,__empty:!0}}catch{R[v.key]=null}})),E||(h(R),s(!1))})(),()=>{E=!0}},[t,n,y,b,w,g,r,i,l,u,m]),{perTypeData:f,generating:p}}function Kd(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Xd(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const On=dt;function _o(e,t){const n=t?Xd(Kd(t)):Math.random;return{LISTEN_IN_NOISE:On(rn,Math.max(0,e.LISTEN_IN_NOISE||0),n),SHORT_STORY:On(un,Math.max(0,e.SHORT_STORY||0),n),LONG_STORY:On(an,Math.max(0,e.LONG_STORY||0),n),ORDERING_SENTENCE:On(ln,Math.max(0,e.ORDERING_SENTENCE||0),n)}}function iu(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Zd={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function lu(e=!1,t=Zd,n){const o=Dn(Date.now()),r=Dn(Date.now()-864e5),u=`${n??""}|${o}`,i=`${n??""}|${r}`;return rn.length>0||un.length>0||an.length>0||ln.length>0?{today:_o(t,u),yesterday:_o(t,i)}:{today:_o(t,u),yesterday:null}}function Jd(e){const t=Oe({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=Oe(null),[o,r]=B(!1),[u,i]=B(!1),[l,c]=B(0);X(()=>{let h=!1,p,s=0;const y=40,b=()=>{p!==void 0&&(clearInterval(p),p=void 0)};let w=!1;try{const E=new URLSearchParams(window.location.search),k=E.get("forceRefresh")||E.get("force");w=k==="1"||k==="true"}catch{}const g=E=>{t.current=E.today,n.current=E.yesterday,r(!0),c(k=>k+1),h=!0,b()},m=async()=>{if(h)return;if(!w){const k=lu(!1,void 0,e);if(iu(k.today)){g(k);return}}try{await gd(3e3)}catch{}if(h)return;const E=lu(w,void 0,e);if(iu(E.today)){g(E);return}++s>=y&&(r(!0),h=!0,b())};return m(),p=setInterval(m,250),()=>{h=!0,b()}},[e]);const f=q(h=>{const p=u?n.current:t.current,s=u?t.current:n.current;return p?.[h]?.length?p[h]:s?.[h]?.length?s[h]:void 0},[u,l]);return{loaded:o,showYesterday:u,setShowYesterday:i,getTrainingPerType:f}}const $t=[];let Ln=!1;function cu(e){if(e.key!=="Escape"||e.defaultPrevented)return;const t=$t[$t.length-1];t&&(e.stopPropagation(),t())}function Qd(e){return $t.push(e),!Ln&&typeof document<"u"&&(document.addEventListener("keydown",cu),Ln=!0),()=>{const t=$t.lastIndexOf(e);t>=0&&$t.splice(t,1),$t.length===0&&Ln&&typeof document<"u"&&(document.removeEventListener("keydown",cu),Ln=!1)}}function eh(e,t=!0){const n=Ho(e);X(()=>{if(t)return Qd(()=>{n.current?.()})},[t,n])}const Eo=(e,t)=>`${e}:${t??1}`,bo=new Map;function th(e,t){const[n,o]=B(0),r=e.map(u=>Eo(u.word,u.homonum)).join("|");return X(()=>{const u=(r?r.split("|"):[]).filter(c=>!bo.has(c));if(u.length===0)return;let i=!1;const l=Array.from(new Set(u.map(c=>c.slice(0,c.lastIndexOf(":")))));return t(l).then(c=>{if(!(i||c.length===0)){for(const f of c)f.Meaning&&bo.set(Eo(f.Word,f.Homonum??void 0),f.Meaning);o(f=>f+1)}}),()=>{i=!0}},[r,t]),we(()=>{const u=r?r.split("|"):[],i=new Map;for(const l of u){const c=bo.get(l);c!=null&&i.set(l,c)}return i},[r,n])}function nh(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,r=Math.max(1,Math.ceil(e.length/o)),u=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),r):1;return{pageItems:we(()=>e.slice((u-1)*o,u*o),[e,u,o]),totalPages:r,curPage:u}}function oh(e="warning"){const[t,n]=B(""),[o,r]=B(e),[u,i]=B(0),l=q((p,s)=>{r(s),n(p),i(y=>y+1)},[]),c=q(p=>l(p,"warning"),[l]),f=q(p=>l(p,"normal"),[l]),h=q(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:u,showToast:l,showWarning:c,showNormal:f,clearToast:h}}const sn={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},dn=sn.blue,Rn=sn.green,hn=sn.amber,In=sn.purple,rh=sn.pink,uh=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:dn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:dn,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:dn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:dn,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:dn,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:Rn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:Rn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:Rn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:Rn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:hn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:hn,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:hn,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:hn,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:In,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:In,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:In,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:In,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:rh,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function ah(){const{t:e}=kt();return we(()=>{const t=Object.fromEntries(bd(e).map(o=>[o.key,o.label])),n={...t};return uh.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}export{Xo as CACHE_GROUPS,Uo as DocumentTitleSuppressContext,go as EMPTY_COMPOSITION,Fo as MediaQueryOverrideContext,nt as NO_CODA,ot as SYLLABLE_MIN,er as VAP_PAGE_SIZE_OPTIONS,Xr as buildGradeSection,Zr as buildPartOfSpeechSection,xd as buildPositionSection,Dd as buildSelectSection,Bd as buildSyllableSection,Jr as buildWordTypeSection,ou as charToPronValue,uu as convertComposition,qu as fmtBytes,Zo as lsBytes,Eo as meaningKey,ru as pronToCharValue,Co as syllableToFilter,Kt as today,vd as toggleAttributeFilter,Wu as useCacheManagement,Jd as useDailyTrainingSelection,Md as useDelayedHoverAnchor,oa as useDeviceManagement,Du as useDocumentTitle,eh as useEscToClose,Mu as useFontScale,Wr as useHoverAnchor,Bu as useMediaQuery,nh as usePagedList,vu as usePasswordChange,xu as useRelativeDay,ta as useTablePaging,na as useTableSort,oh as useToastState,ah as useTrainingTypeLabels,ea as useVisitAllPanel,Zu as useVisitHistory,Qu as useVisitSchedule,zo as useWindowEvent,Kr as useWordAttributeFilterKeys,Ku as useWordDataStats,th as useWordMeanings,Wd as useWordTrainingDataGeneration,Yd as useWordTrainingFilter,pt as valueToJamos};
|