1import k from"./DYiKc8Cq.js";import y from"./Dl1B8w5w.js";import g from"./CWbIKBpY.js";import{_ as w}from"./DEWBa1i1.js";import{P as C,r as l,B as V,c as i,a as n,w as E,o as c,j as e,t as m,u as s,k as p,i as N}from"#entry";import"./DFuKEkiz.js";import"./IljeZfEr.js";import"./em0n8Frv.js";import"./DpJz9ovz.js";import"./BiPjllOI.js";import"./DlAUqK2U.js";import"./DOBxUZCA.js";import"./DLTAocxR.js";import"./CBRtWl27.js";import"./CJ5NhiWv.js";import"./Bf_2DgNn.js";import"./Bv_fBYKe.js";import"./Bd_6KxB9.js";const D={class:"text-center text-3xl sm:text-5xl font-bold tracking-tight text-default-text-base my-8"},T={class:"text-lg my-8"},$={class:"mb-4"},j={class:"flex flex-wrap flex-col justify-between my-4"},M={class:"flex space-x-4 mb-4"},R={key:0,class:"mb-4"},S={class:"bg-default-bg-light p-4 rounded"},A={key:1,class:"text-red-500 mb-4"},ot={__name:"base64-str",setup(F){const{page:_}=C(),o=l(""),a=l(""),t=l("");function f(){try{a.value=btoa(o.value),t.value=""}catch{t.value="Error encoding to Base64. Make sure the input is valid."}}function x(){try{a.value=atob(o.value),t.value=""}catch{t.value="Error decoding from Base64. Make sure the input is valid Base64."}}return V(o,()=>{a.value="",t.value=""},{immediate:!0}),(u,r)=>{const v=k,d=y,b=g,h=w;return c(),i("div",null,[n(h,null,{default:E(()=>[e("h1",D,m(s(_).title),1),e("div",T,[e("div",$,[n(v,{label:"Enter text to encode or Base64 to decode",modelValue:s(o),"onUpdate:modelValue":r[0]||(r[0]=B=>N(o)?o.value=B:null),class:"my-4",rows:4},null,8,["modelValue"])]),e("div",j,[e("div",M,[n(d,{onClick:f,label:"Encode to Base64"}),n(d,{onClick:x,label:"Decode from Base64"})])]),s(a)?(c(),i("div",R,[r[1]||(r[1]=e("label",{for:"result-text",class:"block mb-2"},"Result:",-1)),e("div",S,m(s(a)),1)])):p("",!0),s(t)?(c(),i("div",A,m(s(t)),1)):p("",!0),n(b)])]),_:1})])}}};export{ot as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.