(function(a,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(a=typeof globalThis<"u"?globalThis:a||self,A(a.lib={}))})(this,function(a){"use strict";let A=[],c=0,i=0,o=0;const d=e=>{e.length>=2&&(A=[...e],c=A.length,i=Math.ceil(Math.log(65536)/Math.log(c)),o=Math.ceil(Math.log(256)/Math.log(c)))};d(["‌","‍","‬","\uFEFF"]);const D=(e,F)=>g(e,T(F),i),B=(e,F)=>g(e,R(F),o),C=e=>{let F=s(e);return{original:F.originalText,hidden:p(F.hiddenText)}},f=e=>{let F=s(e);return{original:F.originalText,hidden:b(F.hiddenText)}},T=e=>{let F=new Array(e.length),t="",u,l,r,n;for(u=0;u{let F=new Array(e.length),t="",u,l,r;for(u=0;u{let F={originalText:"",hiddenText:""};return F.originalText=e.replace(new RegExp("["+A.join("")+"]","g"),""),F.hiddenText=e.replace(new RegExp("[^"+A.join("")+"]","g"),""),F},p=e=>{let F=e,t,u=[];for(t=0;t{let F=e,t,u,l=new Uint8Array(Math.ceil(e.length/o));for(t=0;t