import{k as ne,j as g,t as ae,h as se,m as oe,n as r,p as t,i as d,v as re,A as ce,x,s as pe}from"./web.Os7kOAdY.js";import{c as $e}from"./clipboard.BNxbz_oK.js";import{g as q,t as ge}from"./i18n-runtime._BAkvU05.js";var de=ce('<div class=panel style=display:flex;flex-direction:column;gap:14px><div class=tool-field><span class=tool-label></span><textarea class="tool-textarea is-wrap"></textarea></div><div class=tool-grid-3><div class=tool-field><span class=tool-label></span><input class=tool-input maxlength=3></div><div class=tool-field><span class=tool-label></span><label style=margin-top:8px;display:inline-flex;align-items:center;gap:6px><input type=checkbox> <!$><!/></label></div><div class=tool-field><span class=tool-label></span><span class=tool-hint style=padding-top:8px><!$><!/> <!$><!/></span></div></div><div class=tool-field><span class=tool-label>Slug</span><pre class=tool-pre style=font-size:15px></pre></div><div class=tool-actions><button class="tool-btn is-primary"></button><button class="tool-btn is-ghost"></button></div><p class=tool-hint><!$><!/>{L} / \\p{N}<!$><!/>');function xe(a,i="-",e=!0){let l=a.normalize("NFKD").replace(/[\u0300-\u036f]/g,"");return e&&(l=l.toLowerCase()),l=l.replace(/[^\p{L}\p{N}]+/gu,i),l=l.replace(new RegExp(`^${f(i)}+|${f(i)}+$`,"g"),""),l=l.replace(new RegExp(`${f(i)}{2,}`,"g"),i),l}function f(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(){const[a,i]=g(q(),{equals:!1}),e=n=>ge(n,a());ae(()=>{const n=p=>{const s=p.detail?.locale;s&&i(s)};window.addEventListener("taitan:locale-change",n),i(q()),pe(()=>window.removeEventListener("taitan:locale-change",n))});const[l,v]=g("Hello World — TaiTan 在线工具集合 v1.0"),[S,A]=g("-"),[h,D]=g(!0),c=se(()=>xe(l(),S()||"-",h()));return(()=>{var n=oe(de),p=n.firstChild,s=p.firstChild,m=s.nextSibling,C=p.nextSibling,y=C.firstChild,w=y.firstChild,E=w.nextSibling,L=y.nextSibling,k=L.firstChild,T=k.nextSibling,u=T.firstChild,F=u.nextSibling,I=F.nextSibling,[K,P]=r(I.nextSibling),U=L.nextSibling,N=U.firstChild,_=N.nextSibling,W=_.firstChild,[R,B]=r(W.nextSibling),G=R.nextSibling,J=G.nextSibling,[O,Q]=r(J.nextSibling),M=C.nextSibling,V=M.firstChild,X=V.nextSibling,z=M.nextSibling,$=z.firstChild,H=$.nextSibling,b=z.nextSibling,Y=b.firstChild,[j,Z]=r(Y.nextSibling),ee=j.nextSibling,le=ee.nextSibling,[te,ie]=r(le.nextSibling);return t(s,()=>e("原文")),m.$$input=o=>v(o.currentTarget.value),t(w,()=>e("分隔符")),E.$$input=o=>A(o.currentTarget.value||"-"),t(k,()=>e("小写化")),u.addEventListener("change",o=>D(o.currentTarget.checked)),t(T,()=>e("转小写"),K,P),t(N,()=>e("长度")),t(_,()=>c().length,R,B),t(_,()=>e("字符"),O,Q),t(X,()=>c()||"(空)"),$.$$click=()=>$e(c()),t($,()=>e("复制")),H.$$click=()=>v(""),t(H,()=>e("清空")),t(b,()=>e("使用 Unicode 属性正则 \\p"),j,Z),t(b,()=>e("，中日韩字符会被原样保留；如需进一步拼音化请用专门工具。"),te,ie),d(()=>x($,"disabled",!c())),d(()=>x(m,"value",l())),d(()=>x(E,"value",S())),d(()=>x(u,"checked",h())),re(),n})()}ne(["input","click"]);export{fe as default};
